Rename isident() to cppIsident()

This commit is contained in:
Jiří Techet 2016-08-07 01:19:23 +02:00
parent 1d48599d3c
commit 95f94629f0
3 changed files with 7 additions and 7 deletions

View File

@ -210,7 +210,7 @@ static void readIdentifier (int c, vString *const name)
{ {
vStringPut (name, c); vStringPut (name, c);
c = getcFromInputFile (); c = getcFromInputFile ();
} while (c != EOF && isident (c)); } while (c != EOF && cppIsident (c));
ungetcToInputFile (c); ungetcToInputFile (c);
vStringTerminate (name); vStringTerminate (name);
} }
@ -810,9 +810,9 @@ process:
int prev2 = getNthPrevCFromInputFile (2, '\0'); int prev2 = getNthPrevCFromInputFile (2, '\0');
int prev3 = getNthPrevCFromInputFile (3, '\0'); int prev3 = getNthPrevCFromInputFile (3, '\0');
if (! isident (prev) || if (! cppIsident (prev) ||
(! isident (prev2) && (prev == 'L' || prev == 'u' || prev == 'U')) || (! cppIsident (prev2) && (prev == 'L' || prev == 'u' || prev == 'U')) ||
(! isident (prev3) && (prev2 == 'u' && prev == '8'))) (! cppIsident (prev3) && (prev2 == 'u' && prev == '8')))
{ {
int next = getcFromInputFile (); int next = getcFromInputFile ();
if (next != DOUBLE_QUOTE) if (next != DOUBLE_QUOTE)

View File

@ -22,7 +22,7 @@
/* Is the character valid as a character of a C identifier? /* Is the character valid as a character of a C identifier?
* VMS allows '$' in identifiers. * VMS allows '$' in identifiers.
*/ */
#define isident(c) (isalnum(c) || (c) == '_' || (c) == '$') #define cppIsident(c) (isalnum(c) || (c) == '_' || (c) == '$')
/* Is the character valid as the first character of a C identifier? /* Is the character valid as the first character of a C identifier?
* C++ allows '~' in destructors. * C++ allows '~' in destructors.

View File

@ -1786,7 +1786,7 @@ static void readIdentifier (tokenInfo *const token, const int firstChar)
{ {
vStringPut (name, c); vStringPut (name, c);
c = cppGetc (); c = cppGetc ();
} while (isident (c) || (isInputLanguage (Lang_vala) && '.' == c)); } while (cppIsident (c) || (isInputLanguage (Lang_vala) && '.' == c));
vStringTerminate (name); vStringTerminate (name);
cppUngetc (c); /* unget non-identifier character */ cppUngetc (c); /* unget non-identifier character */
@ -1810,7 +1810,7 @@ static void readPackageName (tokenInfo *const token, const int firstChar)
initToken (token); initToken (token);
while (isident (c) || c == '.') while (cppIsident (c) || c == '.')
{ {
vStringPut (name, c); vStringPut (name, c);
c = cppGetc (); c = cppGetc ();