Browse Source

Rationalised use of #includes to be more standards-compliant.

dtrg 18 years ago
parent
commit
cd09c29949
7 changed files with 12 additions and 1 deletions
  1. 2 0
      util/grind/make.allocd
  2. 2 0
      util/ncgg/emlookup.c
  3. 1 0
      util/ncgg/error.c
  4. 2 0
      util/ncgg/expr.c
  5. 2 0
      util/ncgg/iocc.c
  6. 1 0
      util/ncgg/main.c
  7. 2 1
      util/ncgg/subr.c

+ 2 - 0
util/grind/make.allocd

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 sed -e '
 s:^.*[ 	]ALLOCDEF[ 	].*"\(.*\)"[ 	]*\([0-9][0-9]*\).*$:\
 /* allocation definitions of struct \1 */\

+ 2 - 0
util/ncgg/emlookup.c

@@ -6,6 +6,8 @@
 static char rcsid[]= "$Id$";
 #endif
 
+#include <stdlib.h>
+#include <string.h>
 #include "param.h"
 #include "expr.h"
 #include <em_spec.h>

+ 1 - 0
util/ncgg/error.c

@@ -6,6 +6,7 @@
 static char rcsid[]= "$Id$";
 #endif
 
+#include <stdlib.h>
 #include <stdio.h>
 
 int nerrors=0;

+ 2 - 0
util/ncgg/expr.c

@@ -6,6 +6,8 @@
 static char rcsid[]= "$Id$";
 #endif
 
+#include <stdlib.h>
+#include <stdio.h>
 #include "assert.h"
 #include "param.h"
 #include "set.h"

+ 2 - 0
util/ncgg/iocc.c

@@ -6,6 +6,8 @@
 static char rcsid[]= "$Id$";
 #endif
 
+#include <stdlib.h>
+#include <stdio.h>
 #include "assert.h"
 #include "param.h"
 #include "set.h"

+ 1 - 0
util/ncgg/main.c

@@ -6,6 +6,7 @@
 static char rcsid[]= "$Id$";
 #endif
 
+#include <stdlib.h>
 #include <stdio.h>
 
 char *filename;

+ 2 - 1
util/ncgg/subr.c

@@ -6,6 +6,8 @@
 static char rcsid[]= "$Id$";
 #endif
 
+#include <stdlib.h>
+#include <string.h>
 #include "param.h"
 #include "reg.h"
 #include "lookup.h"
@@ -352,7 +354,6 @@ char *mystrcpy(s) char *s; {
 
 char *myalloc(n) register n; {
 	register char *p,*result;
-	char *malloc();
 
 	result=p=malloc(n);
 	if (p== (char *) 0)