* V1.0, 08-Mar-89 AJM
*/
+#include <stdlib.h>
#include <stdio.h>
#include "out.h"
#include "arm.h"
* It uses ~em/modules/lib/libobject.a.
*/
+#include <stdlib.h>
#include <stdio.h>
struct xexec {
char *chars, *xname;
struct outname *names;
register char *xptr;
- extern char *malloc();
long off = OFF_CHAR(outhead);
register char *p;
register struct outname *np;
#include <stdio.h>
#include <out.h>
#include <assert.h>
+#include <stdlib.h>
struct outhead outhead;
struct outsect outsect[S_MAX];
*/
emits(section) struct outsect *section ; {
char *p;
- char *calloc(), *malloc();
long sz = section->os_flen;
rd_outsect(section - outsect);
/* ========== 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
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"
/* ========== Machine independent C routines ========== */
-stop() {
+void stop() {
#if DEBUG < 2
unlink(temppath);
#ifdef LISTING
static char rcsid[] = "$Id$";
#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
#include "assert.h"
#include "param.h"
#include "tables.h"
static char rcsid[] = "$Id$";
#endif
+#include <stdlib.h>
+#include <string.h>
#include "param.h"
#include "tables.h"
#include "types.h"
static char rcsid[] = "$Id$";
#endif
+#include <stdlib.h>
#include "assert.h"
#include "param.h"
#include "tables.h"
char *stab[MAXSTAB];
int nstab=0;
-string malloc();
string myalloc(size) {
register string p;
static char rcsid[] = "$Id$";
#endif
+#include <stdlib.h>
#include "assert.h"
#include <stdio.h>
#include "param.h"
static char rcsid[] = "$Id$";
#endif
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
#include "assert.h"
#include "param.h"
#include "tables.h"
static char rcsid[] = "$Id$";
#endif
+#include <stdlib.h>
+#include <string.h>
#include "param.h"
#include "tables.h"
#include "types.h"
*/
extern string myalloc();
-extern char *strcpy();
glosym_p glolist= (glosym_p) 0;
static char rcsid[] = "$Id$";
#endif
+#include <stdlib.h>
#include "assert.h"
#include "param.h"
#include "tables.h"
char *stab[MAXSTAB];
int nstab=0;
-string malloc();
string myalloc(size) {
register string p;
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"
#include <stdio.h>
#include <out.h>
#include <assert.h>
+#include <stdlib.h>
long lseek();
*/
emits(section) struct outsect *section ; {
char *p;
- char *calloc(), *malloc();
long sz = section->os_flen;
rd_outsect(section - outsect);
register struct outname *A;
struct sym *MACHnames;
register struct sym *M;
- extern char *malloc(), *calloc();
char *chars;
long offX = OFF_CHAR(outhead) - 4;
indicated by the parameters, and then give a core dump
*/
+#include <string.h>
#include <system.h>
static
/* I/O part of em_code module.
Also contains C_open, C_close
*/
+
+#include <stdlib.h>
+#include <stdio.h>
#include <alloc.h>
#include <em_arith.h>
#include "insert.h"
*/
/* $Id$ */
+#include <string.h>
#include <system.h>
#include "print.h"
if (! checkarg(&(p->em_arg), cst_ptyp)) return;
}
else {
-#include "C_mnem_narg"
+#include "C_mnem_narg.h"
return;
}
break;
}
-#include "C_mnem"
+#include "C_mnem.h"
}
PRIVATE void
some routines from the system module. and the em_code module
*/
+#include <stdlib.h>
+#include <stdio.h>
#include <assert.h>
#include <alloc.h>
#include <system.h>
#define ungetbyte(uch) ((uch) >= 0 && (*--_ich = (uch)))
#define init_input() (_fill(), _ich--)
-#define EOF -1
-
static File *fd;
static char *_ich;
*/
#include <ctype.h>
+#include <string.h>
/* #define XXX_YYY /* only for early debugging */
*/
/* $Id$ */
-#include <system.h>
+#include "system.h"
int
sys_access(path, mode)
*/
/* $Id$ */
-#include <system.h>
-
-char *sbrk();
+#include "system.h"
+#include <unistd.h>
char *
sys_break(incr)
int incr;
{
- char *sbrk();
register char *brk = sbrk(incr);
if (brk == (char *) 0 || brk == (char *)-1)
*/
/* $Id$ */
-#include <system.h>
+#include "system.h"
int
sys_chmode(path, mode)
*/
/* $Id$ */
-#include <system.h>
+#include "system.h"
void
sys_close(fp)
*/
/* $Id$ */
-#include <system.h>
+#include "system.h"
extern File *_get_entry();
#include <sys/types.h>
#include <sys/stat.h>
-#include <system.h>
+#include "system.h"
long
sys_filesize(path)
*/
/* $Id$ */
-#include <system.h>
+#include "system.h"
int
sys_lock(path)
#include <sys/types.h>
#include <sys/stat.h>
-
-#include <system.h>
+#include "system.h"
long
sys_modtime(path)
*/
/* $Id$ */
-#include <system.h>
+#include "system.h"
extern File *_get_entry();
*/
/* $Id$ */
-#include <system.h>
+#include "system.h"
int
sys_read(fp, bufptr, bufsiz, pnbytes)
*/
/* $Id$ */
-#include <system.h>
+#include "system.h"
int
sys_remove(path)
*/
/* $Id$ */
-#include <system.h>
+#include "system.h"
int
sys_rename(path1, path2)
*/
/* $Id$ */
-#include <system.h>
+#include "system.h"
long lseek();
/* $Id$ */
#include <stdlib.h>
-#include <system.h>
+#include "system.h"
void
sys_stop(how)
*/
/* RCS: $Id$ */
-#include <system.h>
+#include "system.h"
File _sys_ftab[SYS_NOPEN] = {
{ 0, OP_READ},
/* return value for sys_break */
#define ILL_BREAK ((char *)0)
-/* system's idea of block */
-#define BUFSIZ 1024
#endif /* __SYSTEM_INCLUDED__ */
*/
/* $Id$ */
-#include <system.h>
+#include "system.h"
long time();
*/
/* $Id$ */
-#include <system.h>
+#include "system.h"
int
sys_unlock(path)
*/
/* $Id$ */
-#include <system.h>
+#include "system.h"
int
sys_write(fp, bufptr, nbytes)
#endif
*/
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
unsigned int tnum = 0;
char *tstrtab;
unsigned int tssiz = 0;
-char *malloc(), *realloc(), *strcpy(), *strncpy();
long time();
unsigned int tabsz, strtabsz;
#else
+#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include "states.h"
+#include <stdlib.h>
+#include <string.h>
+
#if __STDC__
#include <stdarg.h>
extern out(char *, ...);
*/
{
+#include <stdlib.h>
+#include <string.h>
#include "decl.h"
extern int lineno, yyleng;
* Author: Hans van Staveren
*/
+#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <assert.h>
#include <em_spec.h>
#include <em_flag.h>
inst_t yy_instance;
}
-%type <yy_list1> list1,structlistel
-%type <yy_list2> structlist,structdecl
+%type <yy_list1> list1 structlistel
+%type <yy_list2> structlist structdecl
%type <yy_expr> expr optexpr
%type <yy_cost> optcost cost optcommacost
%type <yy_int> optboolexpr optnocoerc mnem emargno tokargno optprop
%type <yy_instance> tokeninstance
%type <yy_string> optformat
%token <yy_string> IDENT TYPENAME
-%token <yy_ident> RIDENT,PIDENT,TIDENT,EIDENT
-%token <yy_string> LSTRING,STRING
+%token <yy_ident> RIDENT PIDENT TIDENT EIDENT
+%token <yy_string> LSTRING STRING
%token <yy_int> NUMBER
%token <yy_intp> CIDENT
%token REGISTERHEAD TOKENHEAD EXPRESSIONHEAD CODEHEAD MOVEHEAD TESTHEAD STACKHEAD
%left OR2
%left AND2
-%left CMPEQ,CMPNE
-%left CMPLT,CMPLE,CMPGT,CMPGE
-%left RSHIFT,LSHIFT
-%left '+','-'
-%left '*','/','%'
-%nonassoc NOT,COMP,UMINUS
+%left CMPEQ CMPNE
+%left CMPLT CMPLE CMPGT CMPGE
+%left RSHIFT LSHIFT
+%left '+' '-'
+%left '*' '/' '%'
+%nonassoc NOT COMP UMINUS
%nonassoc '$'
%%
machinespec
+#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <ctype.h>
+#include <string.h>
#include <em_spec.h>
#include <em_flag.h>
#include <em_reg.h>
#include "booth.h"
-extern char *strncpy(), *strcpy();
-extern char *malloc();
-#ifndef __STDC__
-extern char *sprintf();
-#else
-/* sprintf should be declared in stdio.h, as returning an int */
-#endif
-
char * myalloc(n) {
register char *p;
Many mods by Ceriel Jacobs
*/
+#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#ifndef NORCSID
static char *RcsId = "$Id$";
int TabSize = 128; /* default size of generated table */
char *InitialValue; /* initial value of all table entries */
-extern char *malloc(), *strcpy();
-
main(argc, argv)
char *argv[];
{
*/
/* PREPROCESSOR: MACRO-TEXT REPLACEMENT ROUTINES */
+#include <stdlib.h>
+#include <string.h>
#include "debug.h" /* UF */
#include "pathlength.h" /* UF */
#include "textsize.h" /* UF */