xpressn.c, fetchid(), #13/15 local scope

This commit is contained in:
rlar 2015-10-10 17:10:31 +02:00
parent 9041bf93ca
commit ff74222538
1 changed files with 2 additions and 7 deletions

View File

@ -699,9 +699,6 @@ static const char *
fetchid(SPICE_DSTRINGPTR t, const char *s, const char *s_end)
/* copy next identifier from s into t, advance and return scan index i */
{
char c;
bool ok;
spice_dstring_reinit(t);
// facts: alfa(*s) == true && s < s_end
@ -709,15 +706,13 @@ fetchid(SPICE_DSTRINGPTR t, const char *s, const char *s_end)
for (; s < s_end; ) {
c = *s++;
char c = *s++;
// facts: upcase('\0') == '\0'
// facts: alfanum('\0') == false
// facts: alfanum(upcase(x)) == alfanum(x)
ok = alfanum(c) || c == '.';
if (!ok)
if (!(alfanum(c) || c == '.'))
return s - 1;
cadd(t, upcase(c));