Explorar o código

Modernised usage of system header files.

dtrg %!s(int64=18) %!d(string=hai) anos
pai
achega
963a256f68
Modificáronse 5 ficheiros con 15 adicións e 9 borrados
  1. 2 0
      util/ack/main.c
  2. 6 4
      util/ack/mktables.c
  3. 1 0
      util/ack/run.c
  4. 2 0
      util/ack/trans.c
  5. 4 5
      util/ack/util.c

+ 2 - 0
util/ack/main.c

@@ -4,6 +4,8 @@
  *
  */
 
+#include <stdlib.h>
+#include <stdio.h>
 #include "ack.h"
 #include "list.h"
 #include "trans.h"

+ 6 - 4
util/ack/mktables.c

@@ -4,7 +4,9 @@
  *
  */
 
+#include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 #include <ctype.h>
 
 #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 ;

+ 1 - 0
util/ack/run.c

@@ -4,6 +4,7 @@
  *
  */
 
+#include <stdlib.h>
 #include "ack.h"
 #include "list.h"
 #include "trans.h"

+ 2 - 0
util/ack/trans.c

@@ -4,6 +4,8 @@
  *
  */
 
+#include <stdlib.h>
+#include <string.h>
 #include "ack.h"
 #include "list.h"
 #include "trans.h"

+ 4 - 5
util/ack/util.c

@@ -11,9 +11,11 @@
 /*                                                                    */
 /**********************************************************************/
 
-#include "ack.h"
-#include <ctype.h>
+#include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#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