Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Sun, 07 Aug 2016 16:31:30 UTC Commit: 2671d73b6759a9ba2c7cab1ae54a84e52cb40874 https://github.com/geany/geany/commit/2671d73b6759a9ba2c7cab1ae54a84e52cb408...
Log Message: ----------- Use skipToCharacterInInputFile() in all parsers
Modified Paths: -------------- ctags/parsers/jscript.c ctags/parsers/php.c ctags/parsers/powershell.c
Modified: ctags/parsers/jscript.c 16 lines changed, 3 insertions(+), 13 deletions(-) =================================================================== @@ -323,16 +323,6 @@ static void makeFunctionTag (tokenInfo *const token, vString *const signature) * Parsing functions */
-static int skipToCharacter (const int c) -{ - int d; - do - { - d = getcFromInputFile (); - } while (d != EOF && d != c); - return d; -} - static void parseString (vString *const string, const int delimiter) { boolean end = FALSE; @@ -586,7 +576,7 @@ static void readTokenFull (tokenInfo *const token, boolean include_newlines, vSt { do { - skipToCharacter ('*'); + skipToCharacterInInputFile ('*'); c = getcFromInputFile (); if (c == '/') break; @@ -597,7 +587,7 @@ static void readTokenFull (tokenInfo *const token, boolean include_newlines, vSt } else if (d == '/') /* is this the start of a comment? */ { - skipToCharacter ('\n'); + skipToCharacterInInputFile ('\n'); /* if we care about newlines, put it back so it is seen */ if (include_newlines) ungetcToInputFile ('\n'); @@ -618,7 +608,7 @@ static void readTokenFull (tokenInfo *const token, boolean include_newlines, vSt } else { - skipToCharacter ('\n'); + skipToCharacterInInputFile ('\n'); goto getNextChar; } break;
Modified: ctags/parsers/php.c 12 lines changed, 1 insertions(+), 11 deletions(-) =================================================================== @@ -483,16 +483,6 @@ static boolean isIdentChar (const int c) return (isalnum (c) || c == '_' || c >= 0x80); }
-static int skipToCharacter (const int c) -{ - int d; - do - { - d = getcFromInputFile (); - } while (d != EOF && d != c); - return d; -} - static void parseString (vString *const string, const int delimiter) { while (TRUE) @@ -897,7 +887,7 @@ static void readToken (tokenInfo *const token) { do { - c = skipToCharacter ('*'); + c = skipToCharacterInInputFile ('*'); if (c != EOF) { c = getcFromInputFile ();
Modified: ctags/parsers/powershell.c 12 lines changed, 1 insertions(+), 11 deletions(-) =================================================================== @@ -188,16 +188,6 @@ static boolean isIdentChar (const int c) return (isalnum (c) || c == ':' || c == '_' || c == '-' || c >= 0x80); }
-static int skipToCharacter (const int c) -{ - int d; - do - { - d = getcFromInputFile (); - } while (d != EOF && d != c); - return d; -} - static void parseString (vString *const string, const int delimiter) { while (TRUE) @@ -309,7 +299,7 @@ static void readToken (tokenInfo *const token) /* <# ... #> multiline comment */ do { - c = skipToCharacter ('#'); + c = skipToCharacterInInputFile ('#'); if (c != EOF) { c = getcFromInputFile ();
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).