skip-ws, #4/6, drop `TEMPORARY_SKIP_WS_X0'
use TEMPORARY_SKIP_WS_X1 instead of TEMPORARY_SKIP_WS_X0
This commit is contained in:
parent
a86f2068c8
commit
d12679fccd
|
|
@ -113,7 +113,7 @@ com_let(wordlist *wl)
|
|||
free_pnode(names); /* frees also t, if pnode `names' is simple value */
|
||||
|
||||
s = q;
|
||||
TEMPORARY_SKIP_WS_X0(s);
|
||||
TEMPORARY_SKIP_WS_X1(s);
|
||||
}
|
||||
}
|
||||
/* vector name at p */
|
||||
|
|
|
|||
|
|
@ -133,11 +133,11 @@ atodims(char *p, int *data, int *outlength)
|
|||
return 0;
|
||||
}
|
||||
|
||||
TEMPORARY_SKIP_WS_X0(p);
|
||||
TEMPORARY_SKIP_WS_X1(p);
|
||||
|
||||
if (*p == '[') {
|
||||
p++;
|
||||
TEMPORARY_SKIP_WS_X0(p);
|
||||
TEMPORARY_SKIP_WS_X1(p);
|
||||
needbracket = 1;
|
||||
}
|
||||
|
||||
|
|
@ -184,7 +184,7 @@ atodims(char *p, int *data, int *outlength)
|
|||
break;
|
||||
}
|
||||
|
||||
TEMPORARY_SKIP_WS_X0(p);
|
||||
TEMPORARY_SKIP_WS_X1(p);
|
||||
}
|
||||
|
||||
*outlength = length;
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ hlp_thandle(topic **parent)
|
|||
}
|
||||
|
||||
s = buf;
|
||||
TEMPORARY_SKIP_WS_X0(s);
|
||||
TEMPORARY_SKIP_WS_X1(s);
|
||||
switch (*s) {
|
||||
case '?':
|
||||
fprintf(cp_out,
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
|
|||
/* Put the first token from line into s */
|
||||
strncpy(name, dd->li_line, BSIZE_SP);
|
||||
s = name;
|
||||
TEMPORARY_SKIP_WS_X0(s);
|
||||
TEMPORARY_SKIP_WS_X1(s);
|
||||
t = s;
|
||||
TEMPORARY_SKIP_NON_WS_X0(t);
|
||||
*t = '\0';
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ com_reshape(wordlist *wl)
|
|||
wlast = wlast->wl_next;
|
||||
}
|
||||
|
||||
TEMPORARY_SKIP_WS_X0(p);
|
||||
TEMPORARY_SKIP_WS_X1(p);
|
||||
|
||||
switch (state) {
|
||||
case 0: /* p just at or before a number */
|
||||
|
|
@ -131,7 +131,7 @@ com_reshape(wordlist *wl)
|
|||
}
|
||||
}
|
||||
|
||||
TEMPORARY_SKIP_WS_X0(p);
|
||||
TEMPORARY_SKIP_WS_X1(p);
|
||||
|
||||
} while (state < 3);
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ inp_nutsource(FILE *fp, bool comfile, char *filename)
|
|||
}
|
||||
(void) strncpy(name, dd->li_line, BSIZE_SP);
|
||||
s = name;
|
||||
TEMPORARY_SKIP_WS_X0(s);
|
||||
TEMPORARY_SKIP_WS_X1(s);
|
||||
t = s;
|
||||
TEMPORARY_SKIP_NON_WS_X0(t);
|
||||
*t = '\0';
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ inp_subcktexpand(struct line *deck) {
|
|||
continue; /* skip .commands */
|
||||
} else { /* any other line . . . */
|
||||
TEMPORARY_SKIP_NON_WS_X0(s);
|
||||
TEMPORARY_SKIP_WS_X0(s);
|
||||
TEMPORARY_SKIP_WS_X1(s);
|
||||
|
||||
if (*s == '(') {
|
||||
int level = 0;
|
||||
|
|
@ -1310,7 +1310,7 @@ finishLine(struct bxx_buffer *t, char *src, char *scname)
|
|||
continue;
|
||||
}
|
||||
s = src + 1;
|
||||
TEMPORARY_SKIP_WS_X0(s);
|
||||
TEMPORARY_SKIP_WS_X1(s);
|
||||
if (!*s || (*s != '(')) {
|
||||
lastwasalpha = isalpha_c(*src);
|
||||
bxx_putc(t, *src++);
|
||||
|
|
@ -1467,7 +1467,7 @@ numnodes(char *name, struct subs *subs, wordlist const *modnames)
|
|||
const wordlist *wl;
|
||||
int n, i, gotit;
|
||||
|
||||
TEMPORARY_SKIP_WS_X0(name);
|
||||
TEMPORARY_SKIP_WS_X1(name);
|
||||
|
||||
c = *name;
|
||||
if (isupper_c(c))
|
||||
|
|
@ -1571,7 +1571,7 @@ static int
|
|||
numdevs(char *s)
|
||||
{
|
||||
|
||||
TEMPORARY_SKIP_WS_X0(s);
|
||||
TEMPORARY_SKIP_WS_X1(s);
|
||||
switch (*s) {
|
||||
case 'K':
|
||||
case 'k':
|
||||
|
|
@ -1680,7 +1680,7 @@ devmodtranslate(struct line *s, char *subname, wordlist * const orig_modnames)
|
|||
printf("In devmodtranslate, examining line %s.\n", t);
|
||||
#endif
|
||||
|
||||
TEMPORARY_SKIP_WS_X0(t);
|
||||
TEMPORARY_SKIP_WS_X1(t);
|
||||
c = *t; /* set c to first char in line. . . . */
|
||||
if (isupper_c(c))
|
||||
c = tolower_c(c);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
#define ngspice_STRINGSKIP_H
|
||||
|
||||
#define TEMPORARY_SKIP_NON_WS_X0(s) do { while (*(s) && !isspace_c(*(s))) (s)++; } while(0)
|
||||
#define TEMPORARY_SKIP_WS_X0(s) do { while (*(s) && isspace_c(*(s))) (s)++; } while(0)
|
||||
#define TEMPORARY_SKIP_WS_X1(s) do { while ( isspace_c(*(s))) (s)++; } while(0)
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ tildexpand(char *string)
|
|||
if (!string)
|
||||
return NULL;
|
||||
|
||||
TEMPORARY_SKIP_WS_X0(string);
|
||||
TEMPORARY_SKIP_WS_X1(string);
|
||||
|
||||
if (*string != '~')
|
||||
return copy(string);
|
||||
|
|
|
|||
Loading…
Reference in New Issue