PFLAGS=
CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG
LDFLAGS=-i $(PFLAGS)
-LINTOPTS=-hbxac
+LINTOPTS=-bx
CDIR=$(EMHOME)/mach/proto/top
CFILES=$(CDIR)/top.c $(CDIR)/queue.c
OFILES=top.o queue.o
PFLAGS=
CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG
LDFLAGS=-i $(PFLAGS)
-LINTOPTS=-hbxac
+LINTOPTS=-bx
CDIR=$(EMHOME)/mach/proto/top
CFILES=$(CDIR)/top.c $(CDIR)/queue.c
OFILES=top.o queue.o
PFLAGS=
CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG
LDFLAGS=-i $(PFLAGS)
-LINTOPTS=-hbxac
+LINTOPTS=-bx
CDIR=$(EMHOME)/mach/proto/top
CFILES=$(CDIR)/top.c $(CDIR)/queue.c
OFILES=top.o queue.o
PFLAGS=
CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG
LDFLAGS=-i $(PFLAGS)
-LINTOPTS=-hbxac
+LINTOPTS=-bx
CDIR=$(EMHOME)/mach/proto/top
CFILES=$(CDIR)/top.c $(CDIR)/queue.c
OFILES=top.o queue.o
cp = findcoerc((token_p) 0, &machsets[tokexp[i]]);
if (cp==0) {
for (j=0;j<nregneeded;j++)
- myfree(regls[j]);
+ myfree((string) (regls[j]));
#ifndef ALLOW_NEXTEM
assert(!toplevel);
BROKE();
mincost = t;
besttup = tup;
} else
- myfree(tup);
+ myfree((string) tup);
RESTST;
}
FREEST;
for (i=0;i<nregneeded;i++)
- myfree(regls[i]);
+ myfree((string)(regls[i]));
if (totalcost+mincost>costlimit) {
if (besttup)
- myfree(besttup);
+ myfree((string)besttup);
normalfailed: if (stackpad!=tokpatlen) {
if (stackpad) {
if (costlimit<MAXINT)
}
for (i=0;i<nregneeded;i++)
totalcost += docoerc(regtp[i],regcp[i],ply,toplevel,besttup->p_rar[i]);
- myfree(besttup);
+ myfree((string)besttup);
break;
}
case DO_TOSTACK:
* Author: Hans van Staveren
*/
+extern char *sprintf();
+
#define LLEAF 01
#define LDEF 02
#define RLEAF 04
char buf[25];
if (n>=-20 && n<=20 && (n&1)==0) {
- if (digstr[(n>>1)+10][0]==0)
- sprintf(digstr[(n>>1)+10],WRD_FMT,n);
- return(digstr[(n>>1)+10]);
+ if (digstr[((int)n>>1)+10][0]==0)
+ sprintf(digstr[((int)n>>1)+10],WRD_FMT,n);
+ return(digstr[((int)n>>1)+10]);
}
sprintf(buf,WRD_FMT,n);
return(mystrcpy(buf));
* Author: Hans van Staveren
*/
+extern char *sprintf();
+
#ifndef newplb /* retrofit for older mach.h */
#define newplb newilb
#endif
word romcont[MAXROM+1];
int nromwords;
int rombit,rommask;
- unsigned dummy,stackupto();
+ unsigned stackupto();
if (nextispseu==0 || nemlines>0)
error("No table entry for %d",emlines[0].em_instr);
case sp_ilb1:
case sp_ilb2:
swtxt();
- dummy = stackupto(&fakestack[stackheight-1],maxply,TRUE);
+ /* dummy = */stackupto(&fakestack[stackheight-1],maxply,TRUE);
cleanregs();
strarg(savetab1);
newilb(argstr);
* Author: Hans van Staveren
*/
+extern char *sprintf();
+
string mystrcpy();
FILE *codefile;
*/
extern string myalloc();
+extern char *strcpy();
glosym_p glolist= (glosym_p) 0;
char *progname;
extern char startupcode[];
+extern unsigned codegen();
int maxply=1;
#ifndef NDEBUG
int Debug=0;
for(rvlp=rvlist;rvlp!=0;rvlp=t) {
t=rvlp->rv_next;
- myfree(rvlp);
+ myfree((string)rvlp);
}
rvlist=0;
for (rvtyp=reg_any;rvtyp<=reg_float;rvtyp++) {
string myalloc(size) {
register string p;
- p = (string) malloc(size);
+ p = (string) malloc((unsigned)size);
if (p==0)
fatal("Out of memory");
return(p);
if (nstab<THRESHOLD)
return;
- qsort(stab,nstab,sizeof (char *),compar);
+ qsort((char *)stab,nstab,sizeof (char *),compar);
for (i=0;i<nstab;i++)
used[i]= FALSE;
for(emlp=emlines;emlp<emlines+nemlines;emlp++)
}
if (curreglist->rl_n != 0)
return(cp);
- myfree(curreglist);
+ myfree((string)curreglist);
}
}
return(0); /* nothing found */
tdp->t_cost.ct_space = costcalc(tdp->t_cost);
}
+/*VARARGS1*/
error(s,a1,a2,a3,a4,a5,a6,a7,a8) char *s; {
fprintf(stderr,"Error: ");
exit(-1);
}
+/*VARARGS1*/
fatal(s,a1,a2,a3,a4,a5,a6,a7,a8) char *s; {
fprintf(stderr,"Fatal: ");
PFLAGS=
CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG
LDFLAGS=-i $(PFLAGS)
-LINTOPTS=-hbxac
+LINTOPTS=-bx
CDIR=$(EMHOME)/mach/proto/top
CFILES=$(CDIR)/top.c $(CDIR)/queue.c
OFILES=top.o queue.o
extern instr_p read_instr();
extern instr_p gen_instr();
extern char * malloc();
+extern char *strcat();
+extern char *strcpy();
+extern char *sprintf();
+extern char *strncpy();
struct variable var[NRVARS+1];
struct variable ANY; /* ANY symbol matching any instruction */
PFLAGS=
CFLAGS=$(PREFLAGS) $(PFLAGS) -O -DNDEBUG
LDFLAGS=-i $(PFLAGS)
-LINTOPTS=-hbxac
+LINTOPTS=-bx
CDIR=$(EMHOME)/mach/proto/top
CFILES=$(CDIR)/top.c $(CDIR)/queue.c
OFILES=top.o queue.o