diff options
author | John Ankarström <john@ankarstrom.se> | 2021-07-25 15:16:22 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-07-25 15:16:22 +0200 |
commit | 48aac8801df86e743f5890a3cdc4882d0af89a4e (patch) | |
tree | fbef1606ce6784a8811bc10326218dcd3183e85d /src/lex.c | |
parent | 0a1fe85b05749c9d1bb23142f4f9874ec716426b (diff) | |
download | jwm-48aac8801df86e743f5890a3cdc4882d0af89a4e.tar.gz |
Convert remaining function definitions
Diffstat (limited to 'src/lex.c')
-rw-r--r-- | src/lex.c | 28 |
1 files changed, 21 insertions, 7 deletions
@@ -96,7 +96,9 @@ static TokenType LookupType(const char *name, TokenNode *np); /***************************************************************************** *****************************************************************************/ -TokenNode *Tokenize(const char *line, const char *fileName) { +TokenNode * +Tokenize(const char *line, const char *fileName) +{ TokenNode *np; AttributeNode *ap; @@ -386,7 +388,9 @@ IsSpace(char ch, int *lineNumber) /***************************************************************************** *****************************************************************************/ -char *ReadElementName(const char *line) { +char * +ReadElementName(const char *line) +{ char *buffer; int len, max; int x; @@ -409,7 +413,9 @@ char *ReadElementName(const char *line) { /***************************************************************************** *****************************************************************************/ -char *ReadElementValue(const char *line, const char *file, int *lineNumber) { +char * +ReadElementValue(const char *line, const char *file, int *lineNumber) +{ char *buffer; char ch; int len, max; @@ -513,7 +519,9 @@ LookupType(const char *name, TokenNode *np) /***************************************************************************** *****************************************************************************/ -const char *GetTokenName(const TokenNode *tp) { +const char * +GetTokenName(const TokenNode *tp) +{ if(tp->invalidName) { return tp->invalidName; } else if(tp->type >= sizeof(TOKEN_MAP) / sizeof(const char*)) { @@ -525,13 +533,17 @@ const char *GetTokenName(const TokenNode *tp) { /***************************************************************************** *****************************************************************************/ -const char *GetTokenTypeName(TokenType type) { +const char * +GetTokenTypeName(TokenType type) +{ return TOKEN_MAP[type]; } /***************************************************************************** *****************************************************************************/ -TokenNode *CreateNode(TokenNode *parent, const char *file, int line) { +TokenNode * +CreateNode(TokenNode *parent, const char *file, int line) +{ TokenNode *np; np = Allocate(sizeof(TokenNode)); @@ -568,7 +580,9 @@ TokenNode *CreateNode(TokenNode *parent, const char *file, int line) { /***************************************************************************** *****************************************************************************/ -AttributeNode *CreateAttribute(TokenNode *np) { +AttributeNode * +CreateAttribute(TokenNode *np) +{ AttributeNode *ap; ap = Allocate(sizeof(AttributeNode)); |