getword(), cleanup

This commit is contained in:
rlar
2018-02-17 19:15:54 +01:00
parent 51c9f93b7a
commit f5d686e23c
-6
View File
@@ -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++));