From: Godzil Date: Tue, 19 Mar 2013 08:46:55 +0000 (+0100) Subject: Now CGG compile without warns ;) X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=0f7eaacc5f917e53aa93ad6fe7f53d5c8f7c114e;p=ack.git Now CGG compile without warns ;) --- diff --git a/util/cgg/bootgram.y b/util/cgg/bootgram.y index 48f68e5e4..9f67a60c4 100644 --- a/util/cgg/bootgram.y +++ b/util/cgg/bootgram.y @@ -1,9 +1,4 @@ %{ - -#ifndef NORCSID -static char rcsid[]="$Id$"; -#endif - /* * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". diff --git a/util/cgg/booth.h b/util/cgg/booth.h index 7d5c89aea..f781bc874 100644 --- a/util/cgg/booth.h +++ b/util/cgg/booth.h @@ -217,7 +217,35 @@ extern int rvnumbers[4][MAXREGVARS]; /* The register numbers */ #define MUST1BEBOOL(e) int exp1=e.expr_index;tstbool(e) #define MUST2BEBOOL(e1,e2) int exp1=e1.expr_index,exp2=e2.expr_index;tstbool(e1);tstbool(e2) -extern ident_p ilookup(); -extern list2 lookstruct(); -extern string scopy(); -extern unsigned hash(); +ident_p ilookup(string name, int enterf); +list2 lookstruct(list2 ll); +string scopy(string s); +unsigned hash(string name); +int argtyp(int mn); +int findstructel(int number, string name, int *t); +int eqregclass(int r1, int r2); +void inbetween(); +int strlookup(string s); +void tabovf(string tablename); +int max(int a, int b); +int structsize(list2 s); +void setfields(token_p tp, string format); +void tstint(expr_t e); +void outbyte(int n); +void out(int n); +void patbyte(int n); +void patshort(int n); +void pat(int n); +int mlookup(char *name); +ident_p ilookup(string name, int enterf); +int exprlookup(set_t sett); +void tstbool(expr_t e); +int stringno(string s); +int lookup(int comm, int operator, int lnode, int rnode); +void chkregexp(int number); +int commontype(expr_t e1, expr_t e2); +int instno(inst_t inst); + +void yyerror(char *, ...); +int yyparse(void); +int yylex(void); \ No newline at end of file diff --git a/util/cgg/bootlex.l b/util/cgg/bootlex.l index b7d3f6457..ec796a578 100644 --- a/util/cgg/bootlex.l +++ b/util/cgg/bootlex.l @@ -1,8 +1,4 @@ %{ - -#ifndef NORCSID -static char rcsid2[]="$Id$"; -#endif /* * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". @@ -13,6 +9,7 @@ static char rcsid2[]="$Id$"; #define MAXBACKUP 50 #include +#include #include #include #include @@ -21,11 +18,8 @@ static char rcsid2[]="$Id$"; #include "booth.h" #include "y.tab.h" -void yyerror(string s); - int lineno = 1; extern char *iname; -extern char *scopy(); %} %p 2000 @@ -160,9 +154,13 @@ return return(RETURN); . return(yytext[0]); %% -void yyerror(string s) +void yyerror(string s, ...) { + va_list va; + va_start(va, s); fprintf(stderr,"\"%s\", line %d:",iname ? iname : "",lineno); + vfprintf(stderr, s, va); + va_end(va); fprintf(stderr,"\n"); nerrors++; } diff --git a/util/cgg/main.c b/util/cgg/main.c index 651478b2d..186bbc966 100644 --- a/util/cgg/main.c +++ b/util/cgg/main.c @@ -48,7 +48,7 @@ void tstbool(expr_t e) yyerror("Must be boolean expression"); } -int structsize(register list2 s) +int structsize(list2 s) { list1 l; int sum;