Modernised usage of system header files.

This commit is contained in:
dtrg 2006-02-03 22:23:37 +00:00
parent c39e85da63
commit 71a92846dd
3 changed files with 5 additions and 3 deletions

View file

@ -16,6 +16,7 @@
* Interface to malloc() and realloc() * Interface to malloc() and realloc()
*/ */
#include <stdlib.h>
# include "types.h" # include "types.h"
# include "extern.h" # include "extern.h"
@ -31,7 +32,6 @@ alloc(size) unsigned size; {
Allocate "size" bytes. Panic if it fails Allocate "size" bytes. Panic if it fails
*/ */
p_mem p; p_mem p;
p_mem malloc();
if ((p = malloc(size)) == 0) fatal(linecount,e_nomem); if ((p = malloc(size)) == 0) fatal(linecount,e_nomem);
return p; return p;
@ -43,8 +43,6 @@ ralloc(p,size) p_mem p; unsigned size; {
Re-allocate the chunk of memory indicated by "p", to Re-allocate the chunk of memory indicated by "p", to
occupy "size" bytes occupy "size" bytes
*/ */
p_mem realloc();
if ((p = realloc(p,size)) == 0) fatal(linecount,e_nomem); if ((p = realloc(p,size)) == 0) fatal(linecount,e_nomem);
return p; return p;
} }

View file

@ -16,6 +16,8 @@
* Several routines to perform checks and printouts * Several routines to perform checks and printouts
*/ */
#include <stdlib.h>
#include <string.h>
# include "types.h" # include "types.h"
# include "extern.h" # include "extern.h"
# include "io.h" # include "io.h"

View file

@ -16,6 +16,8 @@
* Contains main program, and some error message routines * Contains main program, and some error message routines
*/ */
#include <stdlib.h>
#include <string.h>
# include "types.h" # include "types.h"
# include "io.h" # include "io.h"
# include "extern.h" # include "extern.h"