diff --git a/ctags/main/lcpp.c b/ctags/main/lcpp.c index 16462d2c..e3141c1b 100644 --- a/ctags/main/lcpp.c +++ b/ctags/main/lcpp.c @@ -210,7 +210,7 @@ static void readIdentifier (int c, vString *const name) { vStringPut (name, c); c = getcFromInputFile (); - } while (c != EOF && isident (c)); + } while (c != EOF && cppIsident (c)); ungetcToInputFile (c); vStringTerminate (name); } @@ -810,9 +810,9 @@ process: int prev2 = getNthPrevCFromInputFile (2, '\0'); int prev3 = getNthPrevCFromInputFile (3, '\0'); - if (! isident (prev) || - (! isident (prev2) && (prev == 'L' || prev == 'u' || prev == 'U')) || - (! isident (prev3) && (prev2 == 'u' && prev == '8'))) + if (! cppIsident (prev) || + (! cppIsident (prev2) && (prev == 'L' || prev == 'u' || prev == 'U')) || + (! cppIsident (prev3) && (prev2 == 'u' && prev == '8'))) { int next = getcFromInputFile (); if (next != DOUBLE_QUOTE) diff --git a/ctags/main/lcpp.h b/ctags/main/lcpp.h index 03b082ec..4f8af6a0 100644 --- a/ctags/main/lcpp.h +++ b/ctags/main/lcpp.h @@ -22,7 +22,7 @@ /* Is the character valid as a character of a C identifier? * 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? * C++ allows '~' in destructors. diff --git a/ctags/parsers/c.c b/ctags/parsers/c.c index 939c1cce..42ce5bf2 100644 --- a/ctags/parsers/c.c +++ b/ctags/parsers/c.c @@ -1786,7 +1786,7 @@ static void readIdentifier (tokenInfo *const token, const int firstChar) { vStringPut (name, c); c = cppGetc (); - } while (isident (c) || (isInputLanguage (Lang_vala) && '.' == c)); + } while (cppIsident (c) || (isInputLanguage (Lang_vala) && '.' == c)); vStringTerminate (name); cppUngetc (c); /* unget non-identifier character */ @@ -1810,7 +1810,7 @@ static void readPackageName (tokenInfo *const token, const int firstChar) initToken (token); - while (isident (c) || c == '.') + while (cppIsident (c) || c == '.') { vStringPut (name, c); c = cppGetc ();