diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 1998-11-10 19:47:00 -0500 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 1998-11-10 19:47:00 -0500 |
commit | d3f9d5478df478427c2aa5db4507ddd0a38f0eb6 (patch) | |
tree | e27eacd6bbda653dd77f11cc020b9e0a59f7f4fc /WWW/Library/Implementation/HTLex.c | |
parent | 18024037b515bfff83e0230b35151babe6005e18 (diff) | |
download | lynx-snapshots-d3f9d5478df478427c2aa5db4507ddd0a38f0eb6.tar.gz |
snapshot of project "lynx", label v2-8-2dev_2
Diffstat (limited to 'WWW/Library/Implementation/HTLex.c')
-rw-r--r-- | WWW/Library/Implementation/HTLex.c | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/WWW/Library/Implementation/HTLex.c b/WWW/Library/Implementation/HTLex.c index 6cffe648..633286de 100644 --- a/WWW/Library/Implementation/HTLex.c +++ b/WWW/Library/Implementation/HTLex.c @@ -14,6 +14,7 @@ */ #include <HTUtils.h> + #include <HTAAUtil.h> #include <HTLex.h> /* Implemented here */ @@ -77,14 +78,14 @@ PUBLIC LexItem lex ARGS1(FILE *, fp) else return LEX_ALPH_STR; } else switch(ch) { - case EOF: return LEX_EOF; break; + case EOF: return LEX_EOF; case '\n': - HTlex_line++; return LEX_REC_SEP; break; - case ':': return LEX_FIELD_SEP; break; - case ',': return LEX_ITEM_SEP; break; - case '(': return LEX_OPEN_PAREN; break; - case ')': return LEX_CLOSE_PAREN; break; - case '@': return LEX_AT_SIGN; break; + HTlex_line++; return LEX_REC_SEP; + case ':': return LEX_FIELD_SEP; + case ',': return LEX_ITEM_SEP; + case '(': return LEX_OPEN_PAREN; + case ')': return LEX_CLOSE_PAREN; + case '@': return LEX_AT_SIGN; default: ; /* Leading white space ignored (SP,TAB,CR) */ } break; @@ -99,44 +100,33 @@ PUBLIC LexItem lex ARGS1(FILE *, fp) PUBLIC char *lex_verbose ARGS1(LexItem, lex_item) { - static char msg[100]; + static char msg[100]; /* @@@@@@@@ */ switch (lex_item) { case LEX_NONE: /* Internally used */ return "NO-LEX-ITEM"; - break; case LEX_EOF: /* End of file */ return "end-of-file"; - break; case LEX_REC_SEP: /* Record separator */ return "record separator (newline)"; - break; case LEX_FIELD_SEP: /* Field separator */ return "field separator ':'"; - break; case LEX_ITEM_SEP: /* List item separator */ return "item separator ','"; - break; case LEX_OPEN_PAREN: /* Group start tag */ return "'('"; - break; case LEX_CLOSE_PAREN: /* Group end tag */ return "')'"; - break; case LEX_AT_SIGN: /* Address qualifier */ return "address qualifier '@'"; - break; case LEX_ALPH_STR: /* Alphanumeric string */ sprintf(msg, "alphanumeric string '%s'", HTlex_buffer); return msg; - break; case LEX_TMPL_STR: /* Template string */ sprintf(msg, "template string '%s'", HTlex_buffer); return msg; - break; default: return "UNKNOWN-LEX-ITEM"; - break; } } |