diff options
author | Kitware Robot <kwrobot@kitware.com> | 2016-05-16 14:34:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-16 20:05:19 (GMT) |
commit | d9fd2f5402eeaa345691313658e02b51038f570b (patch) | |
tree | dca71b9a7e267f4c6300da3eb770415381726785 /Source/cmFortranParser.h | |
parent | 82df6deaafb36cbbfd450202bb20b320f637751a (diff) | |
download | CMake-d9fd2f5402eeaa345691313658e02b51038f570b.zip CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.bz2 |
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update
all our C++ code to a new style defined by `.clang-format`.
Use `clang-format` version 3.8.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
Diffstat (limited to 'Source/cmFortranParser.h')
-rw-r--r-- | Source/cmFortranParser.h | 70 |
1 files changed, 28 insertions, 42 deletions
diff --git a/Source/cmFortranParser.h b/Source/cmFortranParser.h index 2ad951e..07e1b1c 100644 --- a/Source/cmFortranParser.h +++ b/Source/cmFortranParser.h @@ -13,7 +13,7 @@ #define cmFortranParser_h #if !defined(cmFortranLexer_cxx) && !defined(cmFortranParser_cxx) -# include "cmStandardIncludes.h" +#include "cmStandardIncludes.h" #endif #include <stddef.h> /* size_t */ @@ -22,53 +22,37 @@ typedef struct cmFortranParser_s cmFortranParser; /* Functions to enter/exit #include'd files in order. */ -bool cmFortranParser_FilePush(cmFortranParser* parser, - const char* fname); +bool cmFortranParser_FilePush(cmFortranParser* parser, const char* fname); bool cmFortranParser_FilePop(cmFortranParser* parser); /* Callbacks for lexer. */ -int cmFortranParser_Input(cmFortranParser* parser, - char* buffer, size_t bufferSize); - +int cmFortranParser_Input(cmFortranParser* parser, char* buffer, + size_t bufferSize); void cmFortranParser_StringStart(cmFortranParser* parser); const char* cmFortranParser_StringEnd(cmFortranParser* parser); -void cmFortranParser_StringAppend(cmFortranParser* parser, - char c); +void cmFortranParser_StringAppend(cmFortranParser* parser, char c); -void cmFortranParser_SetInInterface(cmFortranParser* parser, - bool is_in); +void cmFortranParser_SetInInterface(cmFortranParser* parser, bool is_in); bool cmFortranParser_GetInInterface(cmFortranParser* parser); - -void cmFortranParser_SetInPPFalseBranch(cmFortranParser* parser, - bool is_in); +void cmFortranParser_SetInPPFalseBranch(cmFortranParser* parser, bool is_in); bool cmFortranParser_GetInPPFalseBranch(cmFortranParser* parser); - -void cmFortranParser_SetOldStartcond(cmFortranParser* parser, - int arg); +void cmFortranParser_SetOldStartcond(cmFortranParser* parser, int arg); int cmFortranParser_GetOldStartcond(cmFortranParser* parser); /* Callbacks for parser. */ -void cmFortranParser_Error(cmFortranParser* parser, - const char* message); -void cmFortranParser_RuleUse(cmFortranParser* parser, - const char* name); +void cmFortranParser_Error(cmFortranParser* parser, const char* message); +void cmFortranParser_RuleUse(cmFortranParser* parser, const char* name); void cmFortranParser_RuleLineDirective(cmFortranParser* parser, const char* filename); -void cmFortranParser_RuleInclude(cmFortranParser* parser, - const char* name); -void cmFortranParser_RuleModule(cmFortranParser* parser, - const char* name); -void cmFortranParser_RuleDefine(cmFortranParser* parser, - const char* name); -void cmFortranParser_RuleUndef(cmFortranParser* parser, - const char* name); -void cmFortranParser_RuleIfdef(cmFortranParser* parser, - const char* name); -void cmFortranParser_RuleIfndef(cmFortranParser* parser, - const char* name); +void cmFortranParser_RuleInclude(cmFortranParser* parser, const char* name); +void cmFortranParser_RuleModule(cmFortranParser* parser, const char* name); +void cmFortranParser_RuleDefine(cmFortranParser* parser, const char* name); +void cmFortranParser_RuleUndef(cmFortranParser* parser, const char* name); +void cmFortranParser_RuleIfdef(cmFortranParser* parser, const char* name); +void cmFortranParser_RuleIfndef(cmFortranParser* parser, const char* name); void cmFortranParser_RuleIf(cmFortranParser* parser); void cmFortranParser_RuleElif(cmFortranParser* parser); void cmFortranParser_RuleElse(cmFortranParser* parser); @@ -83,19 +67,18 @@ union cmFortran_yystype_u /* Setup the proper yylex interface. */ #define YY_EXTRA_TYPE cmFortranParser* -#define YY_DECL \ -int cmFortran_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner) +#define YY_DECL int cmFortran_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner) #define YYSTYPE cmFortran_yystype #define YYSTYPE_IS_DECLARED 1 #if !defined(cmFortranLexer_cxx) -# include "cmFortranLexer.h" +#include "cmFortranLexer.h" #endif #if !defined(cmFortranLexer_cxx) #if !defined(cmFortranParser_cxx) -# undef YY_EXTRA_TYPE -# undef YY_DECL -# undef YYSTYPE -# undef YYSTYPE_IS_DECLARED +#undef YY_EXTRA_TYPE +#undef YY_DECL +#undef YYSTYPE +#undef YYSTYPE_IS_DECLARED #endif #endif @@ -128,9 +111,12 @@ int cmFortran_yyparse(yyscan_t); // Define parser object internal structure. struct cmFortranFile { - cmFortranFile(FILE* file, YY_BUFFER_STATE buffer, - const std::string& dir): - File(file), Buffer(buffer), Directory(dir) {} + cmFortranFile(FILE* file, YY_BUFFER_STATE buffer, const std::string& dir) + : File(file) + , Buffer(buffer) + , Directory(dir) + { + } FILE* File; YY_BUFFER_STATE Buffer; std::string Directory; |