Add function prototypes to mach/proto/ncg/regvar.c

This commit is contained in:
George Koehler 2017-10-15 11:01:18 -04:00
parent d6e9eac785
commit b342b83d28
5 changed files with 23 additions and 7 deletions

View file

@ -14,6 +14,9 @@ static char rcsid[] = "$Id$";
#include "result.h"
#include "glosym.h"
#include "extern.h"
#ifdef REGVARS
#include "regvar.h"
#endif
#ifdef USE_TES
#include "label.h"
#endif

View file

@ -365,7 +365,6 @@ dopseudo() {
} else if (argval == ms_reg) {
long r_off;
int r_size,r_type,r_score;
struct regvar *linkreg();
if (!regallowed)
error("mes 3 not allowed here");

View file

@ -28,7 +28,7 @@ extern string myalloc();
struct regvar *rvlist;
struct regvar *
linkreg(of,sz,tp,sc) long of; {
linkreg(long of, int sz, int tp, int sc) {
register struct regvar *rvlp;
rvlp= (struct regvar *) myalloc(sizeof *rvlp);
@ -43,7 +43,7 @@ linkreg(of,sz,tp,sc) long of; {
}
void
tryreg(rvlp,typ) register struct regvar *rvlp; {
tryreg(struct regvar *rvlp, int typ) {
int score;
register i;
register struct regassigned *ra;
@ -100,7 +100,8 @@ tryreg(rvlp,typ) register struct regvar *rvlp; {
}
}
fixregvars(saveall) {
void
fixregvars(int saveall) {
register struct regvar *rv;
register rvtyp,i;
@ -141,7 +142,8 @@ fixregvars(saveall) {
f_regsave();
}
isregvar(off) long off; {
int
isregvar(long off) {
register struct regvar *rvlp;
for(rvlp=rvlist;rvlp!=0;rvlp=rvlp->rv_next)
@ -150,7 +152,8 @@ isregvar(off) long off; {
return(-1);
}
isregtyp(off) long off; {
int
isregtyp(long off) {
register struct regvar *rvlp;
for(rvlp=rvlist;rvlp!=0;rvlp=rvlp->rv_next)
@ -159,7 +162,8 @@ isregtyp(off) long off; {
return(-1);
}
unlinkregs() {
void
unlinkregs(void) {
register struct regvar *rvlp,*t;
register struct regassigned *ra;
int rvtyp,i;

View file

@ -21,3 +21,10 @@ struct regassigned {
extern struct regvar *rvlist;
extern int nregvar[];
extern struct regassigned *regassigned[];
struct regvar *linkreg(long, int, int, int);
void tryreg(struct regvar *, int);
void fixregvars(int);
int isregvar(long);
int isregtyp(long);
void unlinkregs(void);

View file

@ -13,6 +13,9 @@ static char rcsid[] = "$Id$";
#include "data.h"
#include "result.h"
#include "extern.h"
#ifdef REGVARS
#include "regvar.h"
#endif
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.