|
|
|
@ -153,11 +153,9 @@ collect_global_nodes(struct line *c) |
|
|
|
txfree(gettok(&s)); |
|
|
|
while (*s) { |
|
|
|
char *t = s; |
|
|
|
for (; *s && !isspace_c(*s); s++) |
|
|
|
; |
|
|
|
TEMPORARY_SKIP_NON_WS_X0(s); |
|
|
|
global_nodes[num_global_nodes++] = copy_substring(t, s); |
|
|
|
while (isspace_c(*s)) |
|
|
|
s++; |
|
|
|
TEMPORARY_SKIP_WS_X1(s); |
|
|
|
} |
|
|
|
c->li_line[0] = '*'; /* comment it out */ |
|
|
|
} |
|
|
|
@ -323,10 +321,8 @@ inp_subcktexpand(struct line *deck) { |
|
|
|
} else if (*s == '.') { |
|
|
|
continue; /* skip .commands */ |
|
|
|
} else { /* any other line . . . */ |
|
|
|
while (*s && !isspace_c(*s)) /* skip first token */ |
|
|
|
s++; |
|
|
|
while (*s && isspace_c(*s)) /* skip whitespace */ |
|
|
|
s++; |
|
|
|
TEMPORARY_SKIP_NON_WS_X0(s); |
|
|
|
TEMPORARY_SKIP_WS_X0(s); |
|
|
|
|
|
|
|
if (*s == '(') { |
|
|
|
int level = 0; |
|
|
|
@ -496,12 +492,10 @@ doit(struct line *deck, wordlist *modnames) { |
|
|
|
/* count the number of args in the .subckt line */ |
|
|
|
sss->su_numargs = 0; |
|
|
|
for (;;) { |
|
|
|
while (isspace_c(*s)) |
|
|
|
s++; |
|
|
|
TEMPORARY_SKIP_WS_X1(s); |
|
|
|
if (*s == '\0') |
|
|
|
break; |
|
|
|
while (*s && !isspace_c(*s)) |
|
|
|
s++; |
|
|
|
TEMPORARY_SKIP_NON_WS_X0(s); |
|
|
|
sss->su_numargs ++; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1316,8 +1310,7 @@ finishLine(struct bxx_buffer *t, char *src, char *scname) |
|
|
|
continue; |
|
|
|
} |
|
|
|
s = src + 1; |
|
|
|
for (; *s && isspace_c(*s); s++) |
|
|
|
; |
|
|
|
TEMPORARY_SKIP_WS_X0(s); |
|
|
|
if (!*s || (*s != '(')) { |
|
|
|
lastwasalpha = isalpha_c(*src); |
|
|
|
bxx_putc(t, *src++); |
|
|
|
@ -1327,8 +1320,7 @@ finishLine(struct bxx_buffer *t, char *src, char *scname) |
|
|
|
bxx_putc(t, which = *src); |
|
|
|
src = s; |
|
|
|
bxx_putc(t, *src++); |
|
|
|
while (isspace_c(*src)) |
|
|
|
src++; |
|
|
|
TEMPORARY_SKIP_WS_X1(src); |
|
|
|
for (buf = src; *src && !isspace_c(*src) && *src != ',' && *src != ')'; ) |
|
|
|
src++; |
|
|
|
buf_end = src; |
|
|
|
@ -1475,8 +1467,7 @@ numnodes(char *name, struct subs *subs, wordlist const *modnames) |
|
|
|
const wordlist *wl; |
|
|
|
int n, i, gotit; |
|
|
|
|
|
|
|
while (*name && isspace_c(*name)) |
|
|
|
name++; |
|
|
|
TEMPORARY_SKIP_WS_X0(name); |
|
|
|
|
|
|
|
c = *name; |
|
|
|
if (isupper_c(c)) |
|
|
|
@ -1506,10 +1497,8 @@ numnodes(char *name, struct subs *subs, wordlist const *modnames) |
|
|
|
int nodes = -2; |
|
|
|
for (s = buf; *s; ) { |
|
|
|
nodes++; |
|
|
|
while (*s && !isspace_c(*s)) |
|
|
|
s++; |
|
|
|
while (isspace_c(*s)) |
|
|
|
s++; |
|
|
|
TEMPORARY_SKIP_NON_WS_X0(s); |
|
|
|
TEMPORARY_SKIP_WS_X1(s); |
|
|
|
} |
|
|
|
return (nodes); |
|
|
|
} |
|
|
|
@ -1582,8 +1571,7 @@ static int |
|
|
|
numdevs(char *s) |
|
|
|
{ |
|
|
|
|
|
|
|
while (*s && isspace_c(*s)) |
|
|
|
s++; |
|
|
|
TEMPORARY_SKIP_WS_X0(s); |
|
|
|
switch (*s) { |
|
|
|
case 'K': |
|
|
|
case 'k': |
|
|
|
@ -1692,8 +1680,7 @@ devmodtranslate(struct line *s, char *subname, wordlist * const orig_modnames) |
|
|
|
printf("In devmodtranslate, examining line %s.\n", t); |
|
|
|
#endif |
|
|
|
|
|
|
|
while (*t && isspace_c(*t)) |
|
|
|
t++; |
|
|
|
TEMPORARY_SKIP_WS_X0(t); |
|
|
|
c = *t; /* set c to first char in line. . . . */ |
|
|
|
if (isupper_c(c)) |
|
|
|
c = tolower_c(c); |
|
|
|
|