From cd09c29949458f9fa7fa9bda6ce0f03de1b7b14d Mon Sep 17 00:00:00 2001 From: dtrg Date: Tue, 18 Jul 2006 17:18:42 +0000 Subject: [PATCH] Rationalised use of #includes to be more standards-compliant. --- util/grind/make.allocd | 2 ++ util/ncgg/emlookup.c | 2 ++ util/ncgg/error.c | 1 + util/ncgg/expr.c | 2 ++ util/ncgg/iocc.c | 2 ++ util/ncgg/main.c | 1 + util/ncgg/subr.c | 3 ++- 7 files changed, 12 insertions(+), 1 deletion(-) diff --git a/util/grind/make.allocd b/util/grind/make.allocd index c4dd3e17c..e3077691d 100755 --- a/util/grind/make.allocd +++ b/util/grind/make.allocd @@ -1,3 +1,5 @@ +#!/bin/sh + sed -e ' s:^.*[ ]ALLOCDEF[ ].*"\(.*\)"[ ]*\([0-9][0-9]*\).*$:\ /* allocation definitions of struct \1 */\ diff --git a/util/ncgg/emlookup.c b/util/ncgg/emlookup.c index 0daa8736b..6d0d9a3f1 100644 --- a/util/ncgg/emlookup.c +++ b/util/ncgg/emlookup.c @@ -6,6 +6,8 @@ static char rcsid[]= "$Id$"; #endif +#include +#include #include "param.h" #include "expr.h" #include diff --git a/util/ncgg/error.c b/util/ncgg/error.c index 1a6971d7a..48cac2c00 100644 --- a/util/ncgg/error.c +++ b/util/ncgg/error.c @@ -6,6 +6,7 @@ static char rcsid[]= "$Id$"; #endif +#include #include int nerrors=0; diff --git a/util/ncgg/expr.c b/util/ncgg/expr.c index cdd6b72a7..77afe5774 100644 --- a/util/ncgg/expr.c +++ b/util/ncgg/expr.c @@ -6,6 +6,8 @@ static char rcsid[]= "$Id$"; #endif +#include +#include #include "assert.h" #include "param.h" #include "set.h" diff --git a/util/ncgg/iocc.c b/util/ncgg/iocc.c index 9b2065f98..a6f4506b1 100644 --- a/util/ncgg/iocc.c +++ b/util/ncgg/iocc.c @@ -6,6 +6,8 @@ static char rcsid[]= "$Id$"; #endif +#include +#include #include "assert.h" #include "param.h" #include "set.h" diff --git a/util/ncgg/main.c b/util/ncgg/main.c index 1ff83a530..2c805e7a8 100644 --- a/util/ncgg/main.c +++ b/util/ncgg/main.c @@ -6,6 +6,7 @@ static char rcsid[]= "$Id$"; #endif +#include #include char *filename; diff --git a/util/ncgg/subr.c b/util/ncgg/subr.c index 883d7e147..60caad8f3 100644 --- a/util/ncgg/subr.c +++ b/util/ncgg/subr.c @@ -6,6 +6,8 @@ static char rcsid[]= "$Id$"; #endif +#include +#include #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)