mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-09-07 21:54:48 +02:00
getword(), cleanup
This commit is contained in:
@@ -1318,18 +1318,12 @@ nupa_substitute(dico_t *dico, const char *s, char *r)
|
||||
|
||||
static const char *
|
||||
getword(const char *s, const char * const s_end, SPICE_DSTRINGPTR tstr_p)
|
||||
/* isolate a word from s after position "after". return i= last read+1 */
|
||||
{
|
||||
s++;
|
||||
s--;
|
||||
while ((s < s_end - 1) && !alfa(*s))
|
||||
s++;
|
||||
s++;
|
||||
|
||||
spice_dstring_reinit(tstr_p);
|
||||
|
||||
s--;
|
||||
|
||||
while ((s < s_end) && (alfa(*s) || isdigit_c(*s)))
|
||||
cadd(tstr_p, toupper_c(*s++));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user