Rationalised use of #includes to be more standards-compliant.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
* V1.0, 08-Mar-89 AJM
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "out.h"
|
||||
#include "arm.h"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
* It uses ~em/modules/lib/libobject.a.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
struct xexec {
|
||||
@@ -351,7 +352,6 @@ emit_symtab()
|
||||
char *chars, *xname;
|
||||
struct outname *names;
|
||||
register char *xptr;
|
||||
extern char *malloc();
|
||||
long off = OFF_CHAR(outhead);
|
||||
register char *p;
|
||||
register struct outname *np;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <stdio.h>
|
||||
#include <out.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct outhead outhead;
|
||||
struct outsect outsect[S_MAX];
|
||||
@@ -163,7 +164,6 @@ main(argc, argv)
|
||||
*/
|
||||
emits(section) struct outsect *section ; {
|
||||
char *p;
|
||||
char *calloc(), *malloc();
|
||||
long sz = section->os_flen;
|
||||
|
||||
rd_outsect(section - outsect);
|
||||
|
||||
@@ -78,11 +78,15 @@ separate linker only possible if relocation info produced
|
||||
/* ========== Machine independent type declarations ========== */
|
||||
|
||||
#ifdef _include
|
||||
_include <stdlib.h>
|
||||
_include <stdio.h>
|
||||
_include <string.h>
|
||||
_include <ctype.h>
|
||||
_include <signal.h>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
@@ -116,14 +116,6 @@ extern valu_t load();
|
||||
extern FILE *ffcreat();
|
||||
extern FILE *fftemp();
|
||||
|
||||
/* some library functions used */
|
||||
extern char *mktemp();
|
||||
extern char *malloc();
|
||||
extern char *realloc();
|
||||
extern char *calloc();
|
||||
extern char *getenv();
|
||||
extern char *strncpy();
|
||||
|
||||
/* ========== Machine dependent C declarations ========== */
|
||||
|
||||
#include "mach1.c"
|
||||
|
||||
@@ -20,7 +20,7 @@ extern YYSTYPE yylval;
|
||||
|
||||
/* ========== Machine independent C routines ========== */
|
||||
|
||||
stop() {
|
||||
void stop() {
|
||||
#if DEBUG < 2
|
||||
unlink(temppath);
|
||||
#ifdef LISTING
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "assert.h"
|
||||
#include "param.h"
|
||||
#include "tables.h"
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "param.h"
|
||||
#include "tables.h"
|
||||
#include "types.h"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "assert.h"
|
||||
#include "param.h"
|
||||
#include "tables.h"
|
||||
@@ -29,7 +30,6 @@ static char rcsid[] = "$Id$";
|
||||
|
||||
char *stab[MAXSTAB];
|
||||
int nstab=0;
|
||||
string malloc();
|
||||
|
||||
string myalloc(size) {
|
||||
register string p;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "assert.h"
|
||||
#include <stdio.h>
|
||||
#include "param.h"
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "assert.h"
|
||||
#include "param.h"
|
||||
#include "tables.h"
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "param.h"
|
||||
#include "tables.h"
|
||||
#include "types.h"
|
||||
@@ -15,7 +17,6 @@ static char rcsid[] = "$Id$";
|
||||
*/
|
||||
|
||||
extern string myalloc();
|
||||
extern char *strcpy();
|
||||
|
||||
glosym_p glolist= (glosym_p) 0;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "assert.h"
|
||||
#include "param.h"
|
||||
#include "tables.h"
|
||||
@@ -29,7 +30,6 @@ static char rcsid[] = "$Id$";
|
||||
|
||||
char *stab[MAXSTAB];
|
||||
int nstab=0;
|
||||
string malloc();
|
||||
|
||||
string myalloc(size) {
|
||||
register string p;
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
static char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
#include "assert.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "assert.h"
|
||||
#include "param.h"
|
||||
#include "tables.h"
|
||||
#include "types.h"
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <stdio.h>
|
||||
#include <out.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
long lseek();
|
||||
|
||||
@@ -270,7 +271,6 @@ writef(addr,sz,cnt)
|
||||
*/
|
||||
emits(section) struct outsect *section ; {
|
||||
char *p;
|
||||
char *calloc(), *malloc();
|
||||
long sz = section->os_flen;
|
||||
|
||||
rd_outsect(section - outsect);
|
||||
@@ -484,7 +484,6 @@ emit_symtab()
|
||||
register struct outname *A;
|
||||
struct sym *MACHnames;
|
||||
register struct sym *M;
|
||||
extern char *malloc(), *calloc();
|
||||
char *chars;
|
||||
long offX = OFF_CHAR(outhead) - 4;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user