Change the C code to match the new style.

This commit is contained in:
Robert James Kaes 2001-11-25 02:20:54 +00:00
parent c8b2c614f9
commit 09dbdbc3d7
2 changed files with 11 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $Id: grammar.y,v 1.5 2001-09-16 20:08:24 rjkaes Exp $ /* $Id: grammar.y,v 1.6 2001-11-25 02:20:54 rjkaes Exp $
* *
* This is the grammar for tinyproxy's configuration file. It needs to be * This is the grammar for tinyproxy's configuration file. It needs to be
* in sync with scanner.l. If you know more about yacc and lex than I do * in sync with scanner.l. If you know more about yacc and lex than I do
@ -174,7 +174,8 @@ string
extern unsigned int yylineno; extern unsigned int yylineno;
void yyerror(char *s) void
yyerror(char *s)
{ {
fprintf(stderr, "Line %d: %s\n", yylineno, s); fprintf(stderr, "Line %d: %s\n", yylineno, s);
} }

View File

@ -1,4 +1,4 @@
/* $Id: scanner.l,v 1.6 2001-10-25 17:27:39 rjkaes Exp $ /* $Id: scanner.l,v 1.7 2001-11-25 02:20:54 rjkaes Exp $
* *
* This builds the scanner for the tinyproxy configuration file. This * This builds the scanner for the tinyproxy configuration file. This
* file needs to stay in sync with grammar.y. If someone knows lex and yacc * file needs to stay in sync with grammar.y. If someone knows lex and yacc
@ -125,7 +125,8 @@ word [^ \#'"\(\)\{\}\\;\n\t,|\.]
%% %%
int check_reserved_words(char *token) int
check_reserved_words(char *token)
{ {
int i; int i;
@ -138,7 +139,8 @@ int check_reserved_words(char *token)
return IDENTIFIER; return IDENTIFIER;
} }
static void append_string(int length, char *s) static void
append_string(int length, char *s)
{ {
int to_copy = min(MAX_REGEXP_LEN - (tiny_str - tiny_buf) - 1, length); int to_copy = min(MAX_REGEXP_LEN - (tiny_str - tiny_buf) - 1, length);
@ -147,7 +149,8 @@ static void append_string(int length, char *s)
*tiny_str = 0; *tiny_str = 0;
} }
static void append_char(char c) static void
append_char(char c)
{ {
*tiny_str = c; *tiny_str = c;
tiny_str++; tiny_str++;