From: dtrg Date: Thu, 20 Jul 2006 23:04:15 +0000 (+0000) Subject: Rationalised use of #includes to be more standards-compliant. X-Git-Tag: release-6-0-pre-1~119 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=35f2f8b043119bc705159e81fe04212969efe145;p=ack.git Rationalised use of #includes to be more standards-compliant. --- diff --git a/util/opt/alloc.c b/util/opt/alloc.c index ea90d3dcd..af154f21e 100644 --- a/util/opt/alloc.c +++ b/util/opt/alloc.c @@ -2,6 +2,7 @@ static char rcsid[] = "$Id$"; #endif +#include #include #include "param.h" #include "types.h" @@ -427,7 +428,6 @@ coreinit() { short *myalloc(size) register size; { register short *p,*q; - extern char *malloc(); p = (short *)malloc(size); if (p == 0) diff --git a/util/opt/getline.c b/util/opt/getline.c index b3333eacb..c3ed1bb78 100644 --- a/util/opt/getline.c +++ b/util/opt/getline.c @@ -2,6 +2,7 @@ static char rcsid[] = "$Id$"; #endif +#include #include #include "param.h" #include "types.h" diff --git a/util/opt/lookup.c b/util/opt/lookup.c index aca6da985..dbe3f4267 100644 --- a/util/opt/lookup.c +++ b/util/opt/lookup.c @@ -2,6 +2,8 @@ static char rcsid[] = "$Id$"; #endif +#include +#include #include "param.h" #include "types.h" #include "tes.h" diff --git a/util/opt/main.c b/util/opt/main.c index 723464bdc..2990b22b2 100644 --- a/util/opt/main.c +++ b/util/opt/main.c @@ -2,6 +2,7 @@ static char rcsid[] = "$Id$"; #endif +#include #include #include "param.h" #include "types.h" diff --git a/util/opt/mktab.y b/util/opt/mktab.y index 836a49063..d7cec716e 100644 --- a/util/opt/mktab.y +++ b/util/opt/mktab.y @@ -3,7 +3,9 @@ static char rcsid[] = "$Id$"; #endif +#include #include +#include #include "param.h" #include "types.h" #include "pattern.h" @@ -57,18 +59,18 @@ int rplCBO; %left OR1 %left XOR1 %left AND1 -%left CMPEQ,CMPNE -%left CMPLT,CMPLE,CMPGT,CMPGE -%left RSHIFT,LSHIFT -%left ARPLUS,ARMINUS -%left ARTIMES,ARDIVIDE,ARMOD -%nonassoc NOT,COMP,UMINUS +%left CMPEQ CMPNE +%left CMPLT CMPLE CMPGT CMPGE +%left RSHIFT LSHIFT +%left ARPLUS ARMINUS +%left ARTIMES ARDIVIDE ARMOD +%nonassoc NOT COMP UMINUS %nonassoc '$' -%token SFIT,UFIT,NOTREG,PSIZE,WSIZE,DEFINED,SAMESIGN,ROM,ROTATE,STRING +%token SFIT UFIT NOTREG PSIZE WSIZE DEFINED SAMESIGN ROM ROTATE STRING %token MNEM %token NUMBER -%type expr,argno,optexpr +%type expr argno optexpr %start patternlist diff --git a/util/opt/util.c b/util/opt/util.c index a0508675a..9cc650c07 100644 --- a/util/opt/util.c +++ b/util/opt/util.c @@ -2,6 +2,7 @@ static char rcsid[] = "$Id$"; #endif +#include #include #include "param.h" #include "types.h"