Skip to content

Commit

Permalink
Rename getDirectiveNestLevel() to cppGetDirectiveNestLevel()
Browse files Browse the repository at this point in the history
  • Loading branch information
techee committed Aug 7, 2016
1 parent 2638899 commit 4910e25
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ctags/main/lcpp.c
Expand Up @@ -107,7 +107,7 @@ extern boolean cppIsBraceFormat (void)
return BraceFormat;
}

extern unsigned int getDirectiveNestLevel (void)
extern unsigned int cppGetDirectiveNestLevel (void)
{
return Cpp.directive.nestLevel;
}
Expand Down
3 changes: 2 additions & 1 deletion ctags/main/lcpp.h
Expand Up @@ -35,7 +35,8 @@
* FUNCTION PROTOTYPES
*/
extern boolean cppIsBraceFormat (void);
extern unsigned int getDirectiveNestLevel (void);
extern unsigned int cppGetDirectiveNestLevel (void);

extern void cppInit (const boolean state, const boolean hasAtLiteralStrings,
const boolean hasCxxRawLiteralStrings,
const kindOption *defineMacroKind);
Expand Down
6 changes: 3 additions & 3 deletions ctags/parsers/c.c
Expand Up @@ -1653,7 +1653,7 @@ static void skipToMatch (const char *const pair)
{
const boolean braceMatching = (boolean) (strcmp ("{}", pair) == 0);
const boolean braceFormatting = (boolean) (cppIsBraceFormat () && braceMatching);
const unsigned int initialLevel = getDirectiveNestLevel ();
const unsigned int initialLevel = cppGetDirectiveNestLevel ();
const int begin = pair [0], end = pair [1];
const unsigned long inputLineNumber = getInputLineNumber ();
int matchLevel = 1;
Expand All @@ -1665,7 +1665,7 @@ static void skipToMatch (const char *const pair)
if (c == begin)
{
++matchLevel;
if (braceFormatting && getDirectiveNestLevel () != initialLevel)
if (braceFormatting && cppGetDirectiveNestLevel () != initialLevel)
{
skipToFormattedBraceMatch ();
break;
Expand All @@ -1674,7 +1674,7 @@ static void skipToMatch (const char *const pair)
else if (c == end)
{
--matchLevel;
if (braceFormatting && getDirectiveNestLevel () != initialLevel)
if (braceFormatting && cppGetDirectiveNestLevel () != initialLevel)
{
skipToFormattedBraceMatch ();
break;
Expand Down

0 comments on commit 4910e25

Please sign in to comment.