From 4c0b3bb40f4efeab52e7efe8db09e8f07d41d563 Mon Sep 17 00:00:00 2001 From: dtrg Date: Tue, 24 Jan 2006 22:29:19 +0000 Subject: [PATCH] Modernised usage of system header files. --- util/ack/main.c | 2 ++ util/ack/mktables.c | 10 ++++++---- util/ack/run.c | 1 + util/ack/trans.c | 2 ++ util/ack/util.c | 9 ++++----- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/util/ack/main.c b/util/ack/main.c index 511e439ca..e70598928 100644 --- a/util/ack/main.c +++ b/util/ack/main.c @@ -4,6 +4,8 @@ * */ +#include +#include #include "ack.h" #include "list.h" #include "trans.h" diff --git a/util/ack/mktables.c b/util/ack/mktables.c index 86b261255..1946d09ee 100644 --- a/util/ack/mktables.c +++ b/util/ack/mktables.c @@ -4,7 +4,9 @@ * */ +#include #include +#include #include #ifndef NORCSID @@ -18,7 +20,7 @@ char *tail ; FILE *intab ; FILE *dmach ; -int index ; +int offset ; main(argc,argv) char **argv ; { register i ; @@ -38,7 +40,7 @@ start(dir) char *dir ; { *tail++ = *dir ++ ; } if ( tail!=dname ) *tail++= '/' ; - index=0 ; + offset=0 ; intab= fopen("intable.c","w"); dmach= fopen("dmach.c","w"); if ( intab==NULL || dmach==NULL ) { @@ -79,11 +81,11 @@ readm() { return ; } i=0 ; - fprintf(dmach,"\t{\"%s\",\t%d\t},\n",fname,index) ; + fprintf(dmach,"\t{\"%s\",\t%d\t},\n",fname,offset) ; fprintf(intab,"\n/* %s */\n\t",fname) ; for (;;) { token=getc(in) ; - index++ ; + offset++ ; if ( ++i == 10 ) { fprintf(intab,"\n\t") ; i=0 ; diff --git a/util/ack/run.c b/util/ack/run.c index c3faa3f8d..cff8cdb4c 100644 --- a/util/ack/run.c +++ b/util/ack/run.c @@ -4,6 +4,7 @@ * */ +#include #include "ack.h" #include "list.h" #include "trans.h" diff --git a/util/ack/trans.c b/util/ack/trans.c index 134e2c341..b4b3a143e 100644 --- a/util/ack/trans.c +++ b/util/ack/trans.c @@ -4,6 +4,8 @@ * */ +#include +#include #include "ack.h" #include "list.h" #include "trans.h" diff --git a/util/ack/util.c b/util/ack/util.c index 96110ef3c..6c8f1a68e 100644 --- a/util/ack/util.c +++ b/util/ack/util.c @@ -11,9 +11,11 @@ /* */ /**********************************************************************/ -#include "ack.h" -#include +#include #include +#include +#include +#include "ack.h" #ifndef NORCSID static char rcs_id[] = "$Id$" ; @@ -23,9 +25,6 @@ extern char *progname ; extern int w_flag ; extern int n_error; -extern char *calloc(); -extern char *realloc(); - #ifdef DEBUG # define STDOUT stdout #else -- 2.34.1