This commit is contained in:
David Given 2016-11-10 22:06:08 +01:00
commit 4d7c27391f
143 changed files with 432 additions and 94 deletions

View file

@ -31,6 +31,7 @@ int ltype,rtype;
void
conversion(oldtype,newtype) conversion(oldtype,newtype)
int oldtype,newtype; int oldtype,newtype;
{ {
@ -71,6 +72,7 @@ int oldtype,newtype;
void
extraconvert(oldtype,newtype,topstack) extraconvert(oldtype,newtype,topstack)
int oldtype,newtype,topstack; int oldtype,newtype,topstack;
{ {
@ -509,6 +511,7 @@ endarrayload()
void
loadarray(type) loadarray(type)
int type; int type;
{ {

View file

@ -68,6 +68,7 @@ char *str;
void
dcltype(s) dcltype(s)
Symbol *s; Symbol *s;
{ {

View file

@ -16,6 +16,7 @@ int errorcnt;
void
warning(str) warning(str)
char *str; char *str;
{ {

View file

@ -52,6 +52,8 @@ extern int lint_skip_comment;
static struct token LexStack[MAX_LL_DEPTH]; static struct token LexStack[MAX_LL_DEPTH];
static LexSP = 0; static LexSP = 0;
void skipcomment();
/* In PushLex() the actions are taken in order to initialise or /* In PushLex() the actions are taken in order to initialise or
re-initialise the lexical scanner. re-initialise the lexical scanner.
E.g. at the invocation of a sub-parser that uses LLlex(), the E.g. at the invocation of a sub-parser that uses LLlex(), the
@ -442,6 +444,7 @@ garbage:
} }
#ifndef NOPP #ifndef NOPP
void
skipcomment() skipcomment()
{ {
/* The last character read has been the '*' of '/_*'. The /* The last character read has been the '*' of '/_*'. The

View file

@ -30,6 +30,7 @@ extern char options[];
extern arith flt_flt2arith(); extern arith flt_flt2arith();
extern label code_string(); extern label code_string();
void
arithbalance(e1p, oper, e2p) /* 3.1.2.5 */ arithbalance(e1p, oper, e2p) /* 3.1.2.5 */
register struct expr **e1p, **e2p; register struct expr **e1p, **e2p;
int oper; int oper;
@ -523,6 +524,7 @@ opnd2logical(expp, oper)
} }
} }
void
opnd2test(expp, oper) opnd2test(expp, oper)
register struct expr **expp; register struct expr **expp;
{ {
@ -548,6 +550,7 @@ opnd2test(expp, oper)
ch3bin(expp, NOTEQUAL, intexpr((arith)0, INT)); ch3bin(expp, NOTEQUAL, intexpr((arith)0, INT));
} }
void
any2opnd(expp, oper) any2opnd(expp, oper)
register struct expr **expp; register struct expr **expp;
{ {

View file

@ -23,11 +23,14 @@ extern char options[];
extern char *symbol2str(); extern char *symbol2str();
extern struct type *qualifier_type(); extern struct type *qualifier_type();
void ch3cast();
/* Most expression-handling routines have a pointer to a /* Most expression-handling routines have a pointer to a
(struct type *) as first parameter. The object under the pointer (struct type *) as first parameter. The object under the pointer
gets updated in the process. gets updated in the process.
*/ */
void
ch3sel(expp, oper, idf) ch3sel(expp, oper, idf)
struct expr **expp; struct expr **expp;
struct idf *idf; struct idf *idf;
@ -169,6 +172,7 @@ ch3incr(expp, oper)
ch3asgn(expp, oper, intexpr((arith)1, INT)); ch3asgn(expp, oper, intexpr((arith)1, INT));
} }
void
ch3cast(expp, oper, tp) ch3cast(expp, oper, tp)
register struct expr **expp; register struct expr **expp;
register struct type *tp; register struct type *tp;

View file

@ -19,6 +19,8 @@
extern char options[]; extern char options[];
extern char *symbol2str(); extern char *symbol2str();
void pntminuspnt();
/* This chapter asks for the repeated application of code to handle /* This chapter asks for the repeated application of code to handle
an operation that may be executed at compile time or at run time, an operation that may be executed at compile time or at run time,
depending on the constancy of the operands. depending on the constancy of the operands.
@ -32,6 +34,7 @@ extern char *symbol2str();
#define commutative_binop(expp, oper, expr) mk_binop(expp, oper, expr, 1) #define commutative_binop(expp, oper, expr) mk_binop(expp, oper, expr, 1)
#define non_commutative_relop(expp, oper, expr) mk_binop(expp, oper, expr, 1) #define non_commutative_relop(expp, oper, expr) mk_binop(expp, oper, expr, 1)
void
ch3bin(expp, oper, expr) ch3bin(expp, oper, expr)
register struct expr **expp; register struct expr **expp;
struct expr *expr; struct expr *expr;
@ -292,6 +295,7 @@ ch3bin(expp, oper, expr)
} }
} }
void
pntminuspnt(expp, oper, expr) pntminuspnt(expp, oper, expr)
register struct expr **expp, *expr; register struct expr **expp, *expr;
{ {

View file

@ -64,6 +64,8 @@ extern char options[];
extern char *symbol2str(); extern char *symbol2str();
extern char *source; extern char *source;
void loc_init();
#ifndef LINT #ifndef LINT
init_code(dst_file) init_code(dst_file)
char *dst_file; char *dst_file;
@ -415,6 +417,7 @@ do_return_expr(expr)
return_expr_occurred = 1; return_expr_occurred = 1;
} }
void
code_declaration(idf, expr, lvl, sc) code_declaration(idf, expr, lvl, sc)
register struct idf *idf; /* idf to be declared */ register struct idf *idf; /* idf to be declared */
struct expr *expr; /* initialisation; NULL if absent */ struct expr *expr; /* initialisation; NULL if absent */
@ -527,6 +530,7 @@ code_declaration(idf, expr, lvl, sc)
} }
} }
void
loc_init(expr, id) loc_init(expr, id)
struct expr *expr; struct expr *expr;
struct idf *id; struct idf *id;
@ -721,6 +725,7 @@ code_break()
it generates a branch instruction to the continue label of the it generates a branch instruction to the continue label of the
innermost statement in which continue has a meaning. innermost statement in which continue has a meaning.
*/ */
void
code_continue() code_continue()
{ {
register struct stmt_block *stmt_block = stmt_stack; register struct stmt_block *stmt_block = stmt_stack;

View file

@ -34,6 +34,9 @@ char ifstack[IFDEPTH]; /* if-stack: the content of an entry is */
int nestlevel = -1; int nestlevel = -1;
void macro_def();
void do_define();
struct idf * struct idf *
GetIdentifier(skiponerr) GetIdentifier(skiponerr)
int skiponerr; /* skip the rest of the line on error */ int skiponerr; /* skip the rest of the line on error */
@ -145,6 +148,7 @@ domacro()
int lint_skip_comment; int lint_skip_comment;
#endif #endif
void
skip_block(to_endif) skip_block(to_endif)
int to_endif; int to_endif;
{ {
@ -347,6 +351,7 @@ do_include()
} }
} }
void
do_define() do_define()
{ {
/* do_define() interprets a #define control line. /* do_define() interprets a #define control line.
@ -574,6 +579,7 @@ getparams(buf, parbuf)
/*NOTREACHED*/ /*NOTREACHED*/
} }
void
macro_def(id, text, nformals, length, flags) macro_def(id, text, nformals, length, flags)
register struct idf *id; register struct idf *id;
char *text; char *text;

View file

@ -57,7 +57,7 @@ extern char loptions[];
expression, whereas other errors use the information in the token. expression, whereas other errors use the information in the token.
*/ */
static _error(); static void _error();
#if __STDC__ #if __STDC__
/*VARARGS*/ /*VARARGS*/
@ -521,7 +521,7 @@ fatal(va_alist) /* fmt, args */
} }
#endif #endif
static static void
_error(class, fn, ln, fmt, ap) _error(class, fn, ln, fmt, ap)
int class; int class;
char *fn; char *fn;

View file

@ -37,6 +37,9 @@ arith NewLocal(); /* util.c */
#define LocalPtrVar() NewLocal(pointer_size, pointer_align, reg_pointer, REGISTER) #define LocalPtrVar() NewLocal(pointer_size, pointer_align, reg_pointer, REGISTER)
extern int err_occurred; /* error.c */ extern int err_occurred; /* error.c */
void store_val();
void load_val();
/* EVAL() is the main expression-tree evaluator, which turns /* EVAL() is the main expression-tree evaluator, which turns
any legal expression tree into EM code. parameters.h: any legal expression tree into EM code. parameters.h:
@ -63,6 +66,7 @@ extern int err_occurred; /* error.c */
labels, in case they are specified (i.e. are non-zero) labels, in case they are specified (i.e. are non-zero)
*/ */
void
EVAL(expr, val, code, true_label, false_label) EVAL(expr, val, code, true_label, false_label)
register struct expr *expr; register struct expr *expr;
int val, code; int val, code;
@ -836,6 +840,7 @@ ptr_add(size)
- into a local static variable - into a local static variable
- absolute addressing - absolute addressing
*/ */
void
store_val(vl, tp) store_val(vl, tp)
register struct value *vl; register struct value *vl;
register struct type *tp; register struct type *tp;
@ -907,6 +912,7 @@ store_val(vl, tp)
- static variable - static variable
- local variable - local variable
*/ */
void
load_val(expr, rlval) load_val(expr, rlval)
register struct expr *expr; /* expression containing the value */ register struct expr *expr; /* expression containing the value */
int rlval; /* generate either LVAL or RVAL */ int rlval; /* generate either LVAL or RVAL */

View file

@ -369,6 +369,7 @@ new_oper(tp, e1, oper, e2)
return expr; return expr;
} }
void
chk_cst_expr(expp) chk_cst_expr(expp)
struct expr **expp; struct expr **expp;
{ {

View file

@ -37,6 +37,8 @@ extern char *symbol2str();
#include <idf_pkg.body> #include <idf_pkg.body>
void global_redecl();
struct idf * struct idf *
gen_idf() gen_idf()
{ {
@ -248,6 +250,7 @@ declare_idf(ds, dc, lvl)
} }
} }
int
actual_declaration(sc, tp) actual_declaration(sc, tp)
int sc; int sc;
struct type *tp; struct type *tp;
@ -269,6 +272,7 @@ actual_declaration(sc, tp)
return 1; return 1;
} }
void
global_redecl(idf, new_sc, tp) global_redecl(idf, new_sc, tp)
register struct idf *idf; register struct idf *idf;
struct type *tp; struct type *tp;
@ -393,6 +397,7 @@ declare_params(dc)
} }
} }
void
idf_initialized(idf) idf_initialized(idf)
register struct idf *idf; register struct idf *idf;
{ {
@ -429,6 +434,7 @@ declare_enum(tp, idf, l)
idf->id_def->df_address = l; idf->id_def->df_address = l;
} }
void
check_formals(idf, dc) check_formals(idf, dc)
struct idf *idf; struct idf *idf;
struct declarator *dc; struct declarator *dc;

View file

@ -46,6 +46,11 @@ static int pack_level;
struct type **gen_tphead(), **gen_tpmiddle(); struct type **gen_tphead(), **gen_tpmiddle();
struct sdef *gen_align_to_next(); struct sdef *gen_align_to_next();
struct e_stack *p_stack; struct e_stack *p_stack;
void pad();
void gen_simple_exp();
void gen_tpcheck();
} }
/* initial_value recursively guides the initialisation expression. /* initial_value recursively guides the initialisation expression.
@ -122,6 +127,7 @@ initial_value_list(register struct type **tpp; struct expr **expp;)
; ;
{ {
void
gen_tpcheck(tpp) gen_tpcheck(tpp)
struct type **tpp; struct type **tpp;
{ {
@ -147,6 +153,7 @@ gen_tpcheck(tpp)
} }
} }
void
gen_simple_exp(tpp, expp) gen_simple_exp(tpp, expp)
struct type **tpp; struct type **tpp;
struct expr **expp; struct expr **expp;
@ -465,6 +472,7 @@ check_and_pad(expp, tpp)
/* pad() fills an element of type tp with zeroes. /* pad() fills an element of type tp with zeroes.
If the element is an aggregate, pad() is called recursively. If the element is an aggregate, pad() is called recursively.
*/ */
void
pad(tpx) pad(tpx)
struct type *tpx; struct type *tpx;
{ {

View file

@ -46,6 +46,8 @@ struct sp_id special_ids[] = {
{0, 0} {0, 0}
}; };
void dependency();
#ifndef NOCROSS #ifndef NOCROSS
arith arith
short_size = SZ_SHORT, short_size = SZ_SHORT,
@ -181,6 +183,7 @@ char *s;
} }
} }
void
dependency(s, source) dependency(s, source)
char *s, *source; char *s, *source;
{ {

View file

@ -26,6 +26,7 @@
extern char options[]; extern char options[];
void
check_for_void(pl) check_for_void(pl)
register struct proto *pl; register struct proto *pl;
{ {
@ -261,6 +262,7 @@ declare_protos(dc)
} }
void
update_proto(tp, otp) update_proto(tp, otp)
register struct type *tp, *otp; register struct type *tp, *otp;
{ {
@ -312,6 +314,7 @@ update_proto(tp, otp)
/* struct/union and enum tags can be declared inside prototypes /* struct/union and enum tags can be declared inside prototypes
* remove them from the symbol-table * remove them from the symbol-table
*/ */
void
remove_proto_tag(tp) remove_proto_tag(tp)
struct type *tp; struct type *tp;
{ {
@ -380,6 +383,7 @@ remove_proto_idfs(pl)
} }
} }
void
call_proto(expp) call_proto(expp)
register struct expr **expp; register struct expr **expp;
{ {

View file

@ -26,6 +26,10 @@ extern int InputLevel;
struct repl *ReplaceList; /* list of currently active macros */ struct repl *ReplaceList; /* list of currently active macros */
extern char *strcat(), *strcpy(); extern char *strcat(), *strcpy();
void macro2buffer();
void getactuals();
void expand_defined();
int int
replace(idf) replace(idf)
register struct idf *idf; register struct idf *idf;
@ -172,6 +176,7 @@ expand_macro(repl, idf)
return 1; return 1;
} }
void
expand_defined(repl) expand_defined(repl)
register struct repl *repl; register struct repl *repl;
{ {
@ -211,6 +216,7 @@ newarg(args)
args->a_rawptr = args->a_rawbuf = Malloc(args->a_rawsize = ARGBUF); args->a_rawptr = args->a_rawbuf = Malloc(args->a_rawsize = ARGBUF);
} }
void
getactuals(repl, idf) getactuals(repl, idf)
struct repl *repl; struct repl *repl;
register struct idf *idf; register struct idf *idf;
@ -529,6 +535,7 @@ macro_func(idef)
} }
} }
void
macro2buffer(repl, idf, args) macro2buffer(repl, idf, args)
register struct repl *repl; register struct repl *repl;
register struct idf *idf; register struct idf *idf;

View file

@ -72,7 +72,7 @@ adds_db_str(s)
while (*s) addc_db_str(*s++); while (*s) addc_db_str(*s++);
} }
static static void
stb_type(tp) stb_type(tp)
register struct type *tp; register struct type *tp;
{ {

View file

@ -57,6 +57,7 @@ stack_level() {
#endif /* LINT */ #endif /* LINT */
} }
void
stack_idf(idf, stl) stack_idf(idf, stl)
struct idf *idf; struct idf *idf;
register struct stack_level *stl; register struct stack_level *stl;

View file

@ -159,6 +159,7 @@ code_endswitch()
unstack_stmt(); unstack_stmt();
} }
void
code_case(expr) code_case(expr)
struct expr *expr; struct expr *expr;
{ {
@ -227,6 +228,7 @@ code_case(expr)
} }
} }
void
code_default() code_default()
{ {
register struct switch_hdr *sh = switch_stack; register struct switch_hdr *sh = switch_stack;

View file

@ -163,6 +163,7 @@ LocalFinish()
#endif #endif
} }
void
RegisterAccount(offset, size, regtype, sc) RegisterAccount(offset, size, regtype, sc)
arith offset, size; arith offset, size;
{ {

View file

@ -35,6 +35,8 @@ extern arith char_constant();
#define FLG_ESEEN 0x01 /* possibly a floating point number */ #define FLG_ESEEN 0x01 /* possibly a floating point number */
#define FLG_DOTSEEN 0x02 /* certainly a floating point number */ #define FLG_DOTSEEN 0x02 /* certainly a floating point number */
void skipcomment();
int int
LLlex() LLlex()
{ {
@ -325,6 +327,7 @@ garbage:
/*NOTREACHED*/ /*NOTREACHED*/
} }
void
skipcomment() skipcomment()
{ {
/* The last character read has been the '*' of '/_*'. The /* The last character read has been the '*' of '/_*'. The

View file

@ -32,6 +32,9 @@ int svnestlevel[30] = {-1};
int nestcount; int nestcount;
extern int do_preprocess; extern int do_preprocess;
void macro_def();
void do_define();
char * char *
GetIdentifier(skiponerr) GetIdentifier(skiponerr)
int skiponerr; /* skip the rest of the line on error */ int skiponerr; /* skip the rest of the line on error */
@ -148,6 +151,7 @@ domacro()
} }
} }
void
skip_block(to_endif) skip_block(to_endif)
int to_endif; int to_endif;
{ {
@ -327,6 +331,7 @@ do_include()
} }
} }
void
do_define() do_define()
{ {
/* do_define() interprets a #define control line. /* do_define() interprets a #define control line.
@ -566,6 +571,7 @@ getparams(buf, parbuf)
/*NOTREACHED*/ /*NOTREACHED*/
} }
void
macro_def(id, text, nformals, length, flags) macro_def(id, text, nformals, length, flags)
register struct idf *id; register struct idf *id;
char *text; char *text;

View file

@ -32,6 +32,8 @@ char *prog_name;
extern char **inctable; extern char **inctable;
extern int inc_max, inc_total; extern int inc_max, inc_total;
void dependency();
main(argc, argv) main(argc, argv)
char *argv[]; char *argv[];
{ {
@ -140,6 +142,7 @@ add_dependency(s)
} }
} }
void
dependency(s, source) dependency(s, source)
char *s, *source; char *s, *source;
{ {

View file

@ -102,6 +102,7 @@ do_pragma()
char Xbuf[256]; char Xbuf[256];
void
preprocess(fn) preprocess(fn)
char *fn; char *fn;
{ {

View file

@ -26,6 +26,10 @@ extern char *strcat();
extern int InputLevel; extern int InputLevel;
struct repl *ReplaceList; /* list of currently active macros */ struct repl *ReplaceList; /* list of currently active macros */
void expand_defined();
void getactuals();
void macro2buffer();
int int
replace(idf) replace(idf)
register struct idf *idf; register struct idf *idf;
@ -165,6 +169,7 @@ expand_macro(repl, idf)
return 1; return 1;
} }
void
expand_defined(repl) expand_defined(repl)
register struct repl *repl; register struct repl *repl;
{ {
@ -208,6 +213,7 @@ newarg(args)
args->a_rawptr = args->a_rawbuf = Malloc((unsigned)(args->a_rawsize = ARGBUF)); args->a_rawptr = args->a_rawbuf = Malloc((unsigned)(args->a_rawsize = ARGBUF));
} }
void
getactuals(repl, idf) getactuals(repl, idf)
struct repl *repl; struct repl *repl;
register struct idf *idf; register struct idf *idf;
@ -522,6 +528,7 @@ macro_func(idef)
} }
} }
void
macro2buffer(repl, idf, args) macro2buffer(repl, idf, args)
register struct repl *repl; register struct repl *repl;
register struct idf *idf; register struct idf *idf;

View file

@ -180,6 +180,7 @@ getch()
return ch; return ch;
} }
void
CheckForLineDirective() CheckForLineDirective()
{ {
register int ch = getch(); register int ch = getch();

View file

@ -54,6 +54,9 @@ struct case_entry {
arith ce_low, ce_up; /* lower and upper bound of range */ arith ce_low, ce_up; /* lower and upper bound of range */
}; };
void AddCases();
void AddOneCase();
/* STATICALLOCDEF "case_entry" 20 */ /* STATICALLOCDEF "case_entry" 20 */
/* The constant DENSITY determines when CSA and when CSB instructions /* The constant DENSITY determines when CSA and when CSB instructions
@ -237,6 +240,7 @@ FreeSh(sh)
free_switch_hdr(sh); free_switch_hdr(sh);
} }
void
AddCases(sh, node, lbl) AddCases(sh, node, lbl)
struct switch_hdr *sh; struct switch_hdr *sh;
register t_node *node; register t_node *node;
@ -264,6 +268,7 @@ AddCases(sh, node, lbl)
AddOneCase(sh, node, node, lbl); AddOneCase(sh, node, node, lbl);
} }
void
AddOneCase(sh, lnode, rnode, lbl) AddOneCase(sh, lnode, rnode, lbl)
register struct switch_hdr *sh; register struct switch_hdr *sh;
t_node *lnode, *rnode; t_node *lnode, *rnode;

View file

@ -53,6 +53,7 @@ df_error(nd, mess, edf)
else node_error(nd, mess); else node_error(nd, mess);
} }
void
MkCoercion(pnd, tp) MkCoercion(pnd, tp)
t_node **pnd; t_node **pnd;
register t_type *tp; register t_type *tp;

View file

@ -37,6 +37,10 @@ extern char options[];
extern t_desig null_desig; extern t_desig null_desig;
int fp_used; int fp_used;
void RangeCheck();
void CodeParameters();
void CodeCall();
CodeConst(cst, size) CodeConst(cst, size)
arith cst; arith cst;
int size; int size;
@ -55,6 +59,7 @@ CodeConst(cst, size)
} }
} }
void
CodeString(nd) CodeString(nd)
register t_node *nd; register t_node *nd;
{ {
@ -288,6 +293,7 @@ CodeCoercion(t1, t2)
} }
} }
void
CodeCall(nd) CodeCall(nd)
register t_node *nd; register t_node *nd;
{ {
@ -355,6 +361,7 @@ CodeCall(nd)
DoLineno(nd); DoLineno(nd);
} }
void
CodeParameters(param, arg) CodeParameters(param, arg)
t_param *param; t_param *param;
register t_node *arg; register t_node *arg;
@ -672,6 +679,7 @@ needs_rangecheck(tpl, tpr)
return 0; return 0;
} }
void
RangeCheck(tpl, tpr) RangeCheck(tpl, tpr)
register t_type *tpl, *tpr; register t_type *tpl, *tpr;
{ {

View file

@ -45,6 +45,8 @@ arith min_int[] = { 0L, -128L, -32768L, 0L, -2147483647L-1 };
extern char options[]; extern char options[];
void CutSize();
overflow(expp) overflow(expp)
t_node *expp; t_node *expp;
{ {
@ -160,6 +162,7 @@ divide(pdiv, prem)
#endif #endif
} }
void
cstibin(expp) cstibin(expp)
t_node **expp; t_node **expp;
{ {
@ -351,6 +354,7 @@ cstfbin(expp)
CutSize(exp); CutSize(exp);
} }
void
cstubin(expp) cstubin(expp)
t_node **expp; t_node **expp;
{ {
@ -457,6 +461,7 @@ cstubin(expp)
CutSize(exp); CutSize(exp);
} }
void
cstset(expp) cstset(expp)
t_node **expp; t_node **expp;
{ {
@ -648,6 +653,7 @@ cstcall(expp, call)
} }
} }
void
CutSize(expr) CutSize(expr)
register t_node *expr; register t_node *expr;
{ {

View file

@ -533,6 +533,7 @@ CodeFieldDesig(df, ds)
} }
} }
void
CodeVarDesig(df, ds) CodeVarDesig(df, ds)
register t_def *df; register t_def *df;
register t_desig *ds; register t_desig *ds;

View file

@ -247,6 +247,7 @@ EnterParamList(ppr, Idlist, type, VARp, off)
STATIC t_def *DoImport(); STATIC t_def *DoImport();
void
ImportEffects(idef, scope, flag) ImportEffects(idef, scope, flag)
register t_def *idef; register t_def *idef;
t_scope *scope; t_scope *scope;
@ -481,6 +482,7 @@ CheckForImports(df)
} }
} }
void
EnterFromImportList(idlist, FromDef, FromId) EnterFromImportList(idlist, FromDef, FromId)
register t_node *idlist; register t_node *idlist;
register t_def *FromDef; register t_def *FromDef;

View file

@ -61,6 +61,8 @@ extern char *symbol2str();
node, whereas other errors use the information in the token. node, whereas other errors use the information in the token.
*/ */
void _error();
#if __STDC__ #if __STDC__
#ifdef DEBUG #ifdef DEBUG
/*VARARGS*/ /*VARARGS*/
@ -318,6 +320,7 @@ crash(va_alist)
} }
#endif #endif
void
_error(class, node, fmt, ap, warn_class) _error(class, node, fmt, ap, warn_class)
int class; int class;
t_node *node; t_node *node;

View file

@ -81,6 +81,7 @@ dot2leaf(class)
return nd; return nd;
} }
void
FreeNode(nd) FreeNode(nd)
register t_node *nd; register t_node *nd;
{ {

View file

@ -71,7 +71,7 @@ adds_db_str(s)
while (*s) addc_db_str(*s++); while (*s) addc_db_str(*s++);
} }
static static void
stb_type(tp, assign_num) stb_type(tp, assign_num)
register t_type *tp; register t_type *tp;
{ {

View file

@ -74,6 +74,8 @@ t_type
*std_type, *std_type,
*error_type; *error_type;
void ArraySizes();
t_type * t_type *
construct_type(fund, tp) construct_type(fund, tp)
int fund; int fund;
@ -576,6 +578,7 @@ ArrayElSize(tp)
} }
} }
void
ArraySizes(tp) ArraySizes(tp)
register t_type *tp; register t_type *tp;
{ {

View file

@ -64,7 +64,7 @@ static int WalkDef();
static int stabdef(); static int stabdef();
#endif #endif
static int MkCalls(); static int MkCalls();
static int UseWarnings(); static void UseWarnings();
#define NO_EXIT_LABEL ((label) 0) #define NO_EXIT_LABEL ((label) 0)
#define RETURN_LABEL ((label) 1) #define RETURN_LABEL ((label) 1)
@ -72,6 +72,8 @@ static int UseWarnings();
#define REACH_FLAG 1 #define REACH_FLAG 1
#define EXIT_FLAG 2 #define EXIT_FLAG 2
void DoAssign();
int int
LblWalkNode(lbl, nd, exit, reach) LblWalkNode(lbl, nd, exit, reach)
label lbl, exit; label lbl, exit;
@ -995,6 +997,7 @@ node_warning(nd, W_OLDFASHIONED, "compatibility required in FOR statement");
return 1; return 1;
} }
void
DoAssign(nd) DoAssign(nd)
register t_node *nd; register t_node *nd;
{ {
@ -1057,7 +1060,7 @@ RegisterMessage(df)
} }
} }
static static void
df_warning(nd, df, warning) df_warning(nd, df, warning)
t_node *nd; t_node *nd;
t_def *df; t_def *df;
@ -1080,7 +1083,7 @@ df_warning(nd, df, warning)
} }
} }
static static void
UseWarnings(df) UseWarnings(df)
register t_def *df; register t_def *df;
{ {

View file

@ -120,7 +120,7 @@ CommentOptions()
} }
STATIC STATIC void
SkipComment() SkipComment()
{ {
/* Skip ISO-Pascal comments (* ... *) or { ... }. /* Skip ISO-Pascal comments (* ... *) or { ... }.
@ -216,6 +216,7 @@ register int delim;
static char *s_error = "illegal line directive"; static char *s_error = "illegal line directive";
void
CheckForLineDirective() CheckForLineDirective()
{ {
register int ch; register int ch;

View file

@ -47,6 +47,7 @@ MarkDef(nd, flags, on)
} }
} }
void
AssertStat(expp, line) AssertStat(expp, line)
register struct node *expp; register struct node *expp;
unsigned short line; unsigned short line;
@ -69,6 +70,7 @@ AssertStat(expp, line)
} }
} }
void
AssignStat(left, right) AssignStat(left, right)
register struct node *left, *right; register struct node *left, *right;
{ {
@ -131,6 +133,7 @@ AssignStat(left, right)
FreeNode(right); FreeNode(right);
} }
void
ProcStat(nd) ProcStat(nd)
register struct node *nd; register struct node *nd;
{ {
@ -142,6 +145,7 @@ ProcStat(nd)
} }
} }
void
ChkForStat(nd) ChkForStat(nd)
register struct node *nd; register struct node *nd;
{ {
@ -202,6 +206,7 @@ ChkForStat(nd)
return; return;
} }
void
EndForStat(nd) EndForStat(nd)
register struct node *nd; register struct node *nd;
{ {
@ -283,6 +288,7 @@ CodeEndFor(nd, stepsize, l1, l2, tmp2)
C_asp(int_size); C_asp(int_size);
} }
void
WithStat(nd) WithStat(nd)
struct node *nd; struct node *nd;
{ {

View file

@ -40,6 +40,7 @@ struct case_entry {
*/ */
#define compact(nr, low, up) (nr != 0 && (up - low) / nr <= DENSITY) #define compact(nr, low, up) (nr != 0 && (up - low) / nr <= DENSITY)
void
CaseExpr(nd) CaseExpr(nd)
struct node *nd; struct node *nd;
{ {
@ -62,6 +63,7 @@ CaseExpr(nd)
} }
} }
void
CaseEnd(nd, exit_label) CaseEnd(nd, exit_label)
struct node *nd; struct node *nd;
label exit_label; label exit_label;

View file

@ -24,6 +24,11 @@
int fp_used; int fp_used;
void Long2Int();
void Int2Long();
void genrck();
void CodeCall();
CodeFil() CodeFil()
{ {
if ( !options['L'] ) if ( !options['L'] )
@ -791,6 +796,7 @@ CodePString(nd, tp)
C_loi(tp->tp_size); C_loi(tp->tp_size);
} }
void
CodeCall(nd) CodeCall(nd)
register struct node *nd; register struct node *nd;
{ {
@ -1095,6 +1101,7 @@ CodeStd(nd)
} }
} }
void
Long2Int() Long2Int()
{ {
/* convert a long to integer */ /* convert a long to integer */
@ -1106,6 +1113,7 @@ Long2Int()
C_cii(); C_cii();
} }
void
Int2Long() Int2Long()
{ {
/* convert integer to long */ /* convert integer to long */
@ -1160,6 +1168,7 @@ RangeCheck(tpl, tpr)
} }
} }
void
genrck(tp) genrck(tp)
register struct type *tp; register struct type *tp;
{ {

View file

@ -66,6 +66,7 @@ cstunary(expp)
expp->nd_right = NULLNODE; expp->nd_right = NULLNODE;
} }
void
cstbin(expp) cstbin(expp)
register struct node *expp; register struct node *expp;
{ {
@ -195,6 +196,7 @@ cstbin(expp)
expp->nd_left = expp->nd_right = NULLNODE; expp->nd_left = expp->nd_right = NULLNODE;
} }
void
cstset(expp) cstset(expp)
register struct node *expp; register struct node *expp;
{ {

View file

@ -116,6 +116,7 @@ define(id, scope, kind)
return MkDef(id, scope, kind); return MkDef(id, scope, kind);
} }
void
DoDirective(directive, nd, tp, scl, function) DoDirective(directive, nd, tp, scl, function)
struct idf *directive; struct idf *directive;
struct node *nd; struct node *nd;

View file

@ -26,6 +26,7 @@
struct desig InitDesig = {DSG_INIT, 0, 0, NULLDEF, 0}; struct desig InitDesig = {DSG_INIT, 0, 0, NULLDEF, 0};
struct withdesig *WithDesigs; struct withdesig *WithDesigs;
void CodeValue();
STATIC int STATIC int
properly(ds, size, al) properly(ds, size, al)
@ -71,6 +72,7 @@ CodeCopy(lhs, rhs, sz, psize)
C_sti(sz); C_sti(sz);
} }
void
CodeMove(rhs, left, rtp) CodeMove(rhs, left, rtp)
register struct desig *rhs; register struct desig *rhs;
register struct node *left; register struct node *left;
@ -150,6 +152,7 @@ CodeMove(rhs, left, rtp)
} }
} }
void
CodeValue(ds, tp) CodeValue(ds, tp)
register struct desig *ds; register struct desig *ds;
register struct type *tp; register struct type *tp;
@ -366,6 +369,7 @@ CodeFieldDesig(df, ds)
ds->dsg_packed = df->fld_flags & F_PACKED; ds->dsg_packed = df->fld_flags & F_PACKED;
} }
void
CodeVarDesig(df, ds) CodeVarDesig(df, ds)
register struct def *df; register struct def *df;
register struct desig *ds; register struct desig *ds;

View file

@ -39,6 +39,8 @@ int err_occurred;
extern char *symbol2str(); extern char *symbol2str();
void _error();
/* There are three general error-message functions: /* There are three general error-message functions:
lexerror() lexical and pre-processor error messages lexerror() lexical and pre-processor error messages
error() syntactic and pre-processor messagese error() syntactic and pre-processor messagese
@ -304,6 +306,7 @@ crash(va_alist)
} }
#endif #endif
void
_error(class, node, fmt, ap) _error(class, node, fmt, ap)
int class; int class;
struct node *node; struct node *node;

View file

@ -12,6 +12,8 @@
#include "scope.h" #include "scope.h"
#include "type.h" #include "type.h"
void CodeLabel();
DeclLabel(nd) DeclLabel(nd)
struct node *nd; struct node *nd;
@ -103,6 +105,7 @@ TstLabel(nd, Slevel)
CodeLabel(df, 1); CodeLabel(df, 1);
} }
void
DefLabel(nd, Slevel) DefLabel(nd, Slevel)
register struct node *nd; register struct node *nd;
{ {
@ -139,6 +142,7 @@ DefLabel(nd, Slevel)
} }
} }
void
CodeLabel(df, local) CodeLabel(df, local)
register struct def *df; register struct def *df;
{ {

View file

@ -42,6 +42,7 @@ MkLeaf(class, token)
return nd; return nd;
} }
void
FreeNode(nd) FreeNode(nd)
register struct node *nd; register struct node *nd;
{ {

View file

@ -15,6 +15,8 @@ static int inpflag = 0; /* input mentioned in heading ? */
static int outpflag = 0; /* output mentioned in heading ? */ static int outpflag = 0; /* output mentioned in heading ? */
static label extfl_label; /* label of array of file pointers */ static label extfl_label; /* label of array of file pointers */
void make_extfl_args();
set_inp() set_inp()
{ {
inpflag = 1; inpflag = 1;
@ -25,6 +27,7 @@ set_outp()
outpflag = 1; outpflag = 1;
} }
void
make_extfl() make_extfl()
{ {
if( err_occurred ) return; if( err_occurred ) return;
@ -54,6 +57,7 @@ make_extfl()
make_extfl_args( GlobalScope->sc_def ); make_extfl_args( GlobalScope->sc_def );
} }
void
make_extfl_args(df) make_extfl_args(df)
register struct def *df; register struct def *df;
{ {

View file

@ -19,6 +19,12 @@
extern char *sprint(); extern char *sprint();
void CodeRead();
void CodeReadln();
void CodeWrite();
void CodeWriteln();
void
ChkRead(arg) ChkRead(arg)
register struct node *arg; register struct node *arg;
{ {
@ -86,6 +92,7 @@ ChkRead(arg)
} }
} }
void
ChkReadln(arg) ChkReadln(arg)
register struct node *arg; register struct node *arg;
{ {
@ -142,6 +149,7 @@ ChkReadln(arg)
CodeReadln(file); CodeReadln(file);
} }
void
ChkWrite(arg) ChkWrite(arg)
register struct node *arg; register struct node *arg;
{ {
@ -183,6 +191,7 @@ ChkWrite(arg)
} }
} }
void
ChkWriteln(arg) ChkWriteln(arg)
register struct node *arg; register struct node *arg;
{ {
@ -318,6 +327,7 @@ ChkStdInOut(name, st_out)
return nd; return nd;
} }
void
CodeRead(file, arg) CodeRead(file, arg)
register struct node *file, *arg; register struct node *file, *arg;
{ {
@ -376,6 +386,7 @@ CodeRead(file, arg)
} }
} }
void
CodeReadln(file) CodeReadln(file)
struct node *file; struct node *file;
{ {
@ -386,6 +397,7 @@ CodeReadln(file)
C_asp(pointer_size); C_asp(pointer_size);
} }
void
CodeWrite(file, arg) CodeWrite(file, arg)
register struct node *file, *arg; register struct node *file, *arg;
{ {
@ -472,6 +484,7 @@ CodeWrite(file, arg)
} }
} }
void
CodeWriteln(file) CodeWriteln(file)
register struct node *file; register struct node *file;
{ {

View file

@ -71,7 +71,7 @@ adds_db_str(s)
while (*s) addc_db_str(*s++); while (*s) addc_db_str(*s++);
} }
static static void
stb_type(tp, assign_num) stb_type(tp, assign_num)
register struct type *tp; register struct type *tp;
{ {
@ -247,6 +247,7 @@ stb_addtp(s, tp)
(arith) 0); (arith) 0);
} }
void
stb_string(df, kind) stb_string(df, kind)
register struct def *df; register struct def *df;
long kind; long kind;

View file

@ -51,6 +51,8 @@ struct type
*void_type, *void_type,
*error_type; *error_type;
void ArraySizes();
CheckTypeSizes() CheckTypeSizes()
{ {
/* first, do some checking /* first, do some checking
@ -442,6 +444,7 @@ ArrayElSize(tp, packed)
return algn; return algn;
} }
void
ArraySizes(tp) ArraySizes(tp)
register struct type *tp; register struct type *tp;
{ {
@ -489,6 +492,7 @@ ArraySizes(tp)
C_rom_cst(tp->arr_elsize); C_rom_cst(tp->arr_elsize);
} }
void
FreeForward(for_type) FreeForward(for_type)
register struct forwtype *for_type; register struct forwtype *for_type;
{ {

View file

@ -38,6 +38,7 @@ ea_1_16(param)
} }
} }
void
ea_1(param) { ea_1(param) {
if (! address_long) { if (! address_long) {
ea_1_16(param); ea_1_16(param);
@ -134,6 +135,7 @@ regsize(sz)
} }
} }
void
indexed() { indexed() {
if (address_long) { if (address_long) {
mod_2 = 0; mod_2 = 0;

View file

@ -61,6 +61,7 @@ string holstr(n) word n; {
full lbytes; full lbytes;
#endif #endif
void
prolog(nlocals) full nlocals; { prolog(nlocals) full nlocals; {
fputs("push ebp\nmov ebp,esp\n", codefile); fputs("push ebp\nmov ebp,esp\n", codefile);
@ -179,6 +180,7 @@ mach_option(s)
} }
#endif /* MACH_OPTIONS */ #endif /* MACH_OPTIONS */
void
mes(type) word type ; { mes(type) word type ; {
int argt, a1, a2 ; int argt, a1, a2 ;

View file

@ -54,6 +54,7 @@ con_float() {
} }
void
prolog(nlocals) full nlocals; { prolog(nlocals) full nlocals; {
fprintf(codefile,"\tpush\tb\n\tlxi\th,0\n\tdad\tsp\n\tmov\tb,h\n\tmov\tc,l\n"); fprintf(codefile,"\tpush\tb\n\tlxi\th,0\n\tdad\tsp\n\tmov\tb,h\n\tmov\tc,l\n");
@ -67,6 +68,7 @@ prolog(nlocals) full nlocals; {
} }
} }
void
mes(type) word type ; { mes(type) word type ; {
int argt ; int argt ;

View file

@ -61,6 +61,7 @@ string holstr(n) word n; {
full lbytes; full lbytes;
#endif #endif
void
prolog(nlocals) full nlocals; { prolog(nlocals) full nlocals; {
fputs("\tpush\tbp\n\tmov\tbp,sp\n", codefile); fputs("\tpush\tbp\n\tmov\tbp,sp\n", codefile);
@ -157,6 +158,7 @@ regreturn()
} }
#endif /* REGVARS */ #endif /* REGVARS */
void
mes(type) word type ; { mes(type) word type ; {
int argt ; int argt ;

View file

@ -21,6 +21,8 @@
* then emitted in one go, by emit_instr(). * then emitted in one go, by emit_instr().
*/ */
void move_special();
emit_instr() emit_instr()
{ {
register instr_t *ip; register instr_t *ip;
@ -70,6 +72,7 @@ long words;
T_EMIT2((short)(words), 0, 0, 0); T_EMIT2((short)(words), 0, 0, 0);
} }
void
ea_1(sz, bits) ea_1(sz, bits)
{ {
/* Because displacements come in three sizes (null displacement, /* Because displacements come in three sizes (null displacement,
@ -242,6 +245,7 @@ badoperand()
serror("bad operand(s)"); serror("bad operand(s)");
} }
void
shift_op(opc, sz) shift_op(opc, sz)
{ {
if (mrg_1 < 010 && mrg_2 < 010) { if (mrg_1 < 010 && mrg_2 < 010) {
@ -263,6 +267,7 @@ shift_op(opc, sz)
ea_2(SIZE_W, MEM|ALT); ea_2(SIZE_W, MEM|ALT);
} }
void
bitop(opc) bitop(opc)
{ {
register bits; register bits;
@ -291,6 +296,7 @@ bitfield(opc, extension)
ea_2(SIZE_L, (mrg_2 < 010) ? 0 : (CTR | ALT)); ea_2(SIZE_L, (mrg_2 < 010) ? 0 : (CTR | ALT));
} }
void
add(opc, sz) add(opc, sz)
{ {
if ((mrg_2 & 070) == 010) if ((mrg_2 & 070) == 010)
@ -326,6 +332,7 @@ add(opc, sz)
badoperand(); badoperand();
} }
void
and(opc, sz) and(opc, sz)
{ {
if (mrg_1 == 074 && mrg_2 >= 076) { /* ccr or sr */ if (mrg_1 == 074 && mrg_2 >= 076) { /* ccr or sr */
@ -370,6 +377,7 @@ from_dreg(opc, sz, bits)
return(1); return(1);
} }
void
cmp(sz) cmp(sz)
{ {
register opc; register opc;
@ -416,6 +424,7 @@ link_instr(sz, areg)
ea_2(sz, 0); ea_2(sz, 0);
} }
void
move(sz) move(sz)
{ {
register opc; register opc;
@ -448,6 +457,7 @@ move(sz)
ea_2(sz, ALT); ea_2(sz, ALT);
} }
void
move_special(sz) move_special(sz)
{ {
if (mrg_2 >= 076) { if (mrg_2 >= 076) {
@ -514,6 +524,7 @@ reverse(regs, max)
return regs; return regs;
} }
void
movep(sz) movep(sz)
{ {
checksize(sz, 2|4); checksize(sz, 2|4);
@ -530,6 +541,7 @@ movep(sz)
badoperand(); badoperand();
} }
void
branch(opc, exp) branch(opc, exp)
expr_t exp; expr_t exp;
{ {
@ -566,6 +578,7 @@ expr_t exp;
T_EMIT4(exp.val, exp.typ, RELPC|RELO4, relonami); T_EMIT4(exp.val, exp.typ, RELPC|RELO4, relonami);
} }
void
cpbcc(opc, exp) cpbcc(opc, exp)
expr_t exp; expr_t exp;
{ {
@ -593,6 +606,7 @@ expr_t exp;
T_EMIT4(exp.val, exp.typ, RELPC|RELO4, relonami); T_EMIT4(exp.val, exp.typ, RELPC|RELO4, relonami);
} }
void
ea7071(sz) ea7071(sz)
{ {
mrg_2 = 071; mrg_2 = 071;
@ -671,6 +685,7 @@ ea7071(sz)
mrg_2 = 070; mrg_2 = 070;
} }
void
fbranch(opc, exp) fbranch(opc, exp)
expr_t exp; expr_t exp;
{ {

View file

@ -187,6 +187,7 @@ regsave(s,off,size)
fprintf(codefile, "!Local %ld into %s\n",off,s); fprintf(codefile, "!Local %ld into %s\n",off,s);
} }
void
prolog(n) full n; { prolog(n) full n; {
nlocals = n; nlocals = n;
@ -207,6 +208,7 @@ mach_option(s)
} }
#endif /* MACH_OPTIONS */ #endif /* MACH_OPTIONS */
void
mes(type) word type ; { mes(type) word type ; {
int argt, a1, a2 ; int argt, a1, a2 ;

View file

@ -56,6 +56,7 @@ con_mult(word sz)
#define FL_MSB_AT_LOW_ADDRESS 1 #define FL_MSB_AT_LOW_ADDRESS 1
#include <con_float> #include <con_float>
void
prolog(full nlocals) prolog(full nlocals)
{ {
int ss = nlocals + 8; int ss = nlocals + 8;
@ -68,6 +69,7 @@ prolog(full nlocals)
framesize = nlocals; framesize = nlocals;
} }
void
mes(word type) mes(word type)
{ {
int argt ; int argt ;

View file

@ -18,6 +18,9 @@
extern YYSTYPE yylval; extern YYSTYPE yylval;
void setupoutput();
void commfinish();
/* ========== Machine independent C routines ========== */ /* ========== Machine independent C routines ========== */
void stop() { void stop() {
@ -458,6 +461,7 @@ char *s;
#endif #endif
} }
void
setupoutput() setupoutput()
{ {
register sect_t *sp; register sect_t *sp;
@ -493,6 +497,7 @@ setupoutput()
outhead.oh_nchar = off; /* see newsymb() */ outhead.oh_nchar = off; /* see newsymb() */
} }
void
commfinish() commfinish()
{ {
#ifndef ASLD #ifndef ASLD

View file

@ -11,6 +11,8 @@
extern YYSTYPE yylval; extern YYSTYPE yylval;
void putval();
yylex() yylex()
{ {
register c; register c;
@ -68,6 +70,7 @@ yylex()
return(c); return(c);
} }
void
putval(c) putval(c)
{ {
register valu_t v; register valu_t v;

View file

@ -12,6 +12,10 @@
#include "comm1.h" #include "comm1.h"
#include "y.tab.h" #include "y.tab.h"
void switchsect();
void newsymb();
void newident();
newequate(ip, typ) newequate(ip, typ)
register item_t *ip; register item_t *ip;
register int typ; register int typ;
@ -34,6 +38,7 @@ register int typ;
newident(ip, typ); newident(ip, typ);
} }
void
newident(ip, typ) newident(ip, typ)
register item_t *ip; register item_t *ip;
{ {
@ -74,6 +79,7 @@ register item_t *ip;
); );
} }
void
newlabel(ip) newlabel(ip)
register item_t *ip; register item_t *ip;
{ {
@ -183,6 +189,7 @@ valu_t val;
} }
} }
void
switchsect(newtyp) switchsect(newtyp)
int newtyp; int newtyp;
{ {
@ -242,6 +249,7 @@ valu_t bytes;
} }
#ifdef RELOCATION #ifdef RELOCATION
void
newrelo(s, n) newrelo(s, n)
{ {
int iscomm; int iscomm;
@ -326,6 +334,7 @@ new_string(s)
return r; return r;
} }
void
newsymb(name, type, desc, valu) newsymb(name, type, desc, valu)
register char *name; register char *name;
valu_t valu; valu_t valu;

View file

@ -120,6 +120,7 @@ string tostring(n) register word n; {
return(mystrcpy(buf)); return(mystrcpy(buf));
} }
void
compute(node, presult) register node_p node; register result_t *presult; { compute(node, presult) register node_p node; register result_t *presult; {
result_t leaf1,leaf2; result_t leaf1,leaf2;
register token_p tp; register token_p tp;

View file

@ -29,6 +29,8 @@ int maxindex;
int regclass[NREGS]; int regclass[NREGS];
struct perm *perms; struct perm *perms;
void permute();
struct perm * struct perm *
tuples(regls,nregneeded) rl_p *regls; { tuples(regls,nregneeded) rl_p *regls; {
int class=0; int class=0;
@ -64,6 +66,7 @@ tuples(regls,nregneeded) rl_p *regls; {
return(perms); return(perms);
} }
void
permute(index) { permute(index) {
register struct perm *pp; register struct perm *pp;
register rl_p rlp; register rl_p rlp;

View file

@ -83,6 +83,13 @@ extern short em_ptyp[];
extern double atof(); extern double atof();
void prolog(full nlocals); void prolog(full nlocals);
void mes();
void bss();
void savelab();
void dumplab();
void part_flush();
void xdumplab();
void switchseg();
/* Own version of atol that continues computing on overflow. /* Own version of atol that continues computing on overflow.
We don't know that about the ANSI C one. We don't know that about the ANSI C one.
@ -136,6 +143,7 @@ in_start() {
in_finish() { in_finish() {
} }
void
fillemlines() { fillemlines() {
register int t,i; register int t,i;
register struct emline *lp; register struct emline *lp;
@ -226,6 +234,7 @@ fillemlines() {
} }
} }
void
dopseudo() { dopseudo() {
register b,t; register b,t;
register full n; register full n;
@ -605,6 +614,7 @@ char *strarg(t) {
return(mystrcpy(argstr)); return(mystrcpy(argstr));
} }
void
bss(n,t,b) full n; { bss(n,t,b) full n; {
register long s = 0; register long s = 0;
@ -677,6 +687,7 @@ swtxt() {
switchseg(SEGTXT); switchseg(SEGTXT);
} }
void
switchseg(s) { switchseg(s) {
if (s == curseg) if (s == curseg)
@ -686,6 +697,7 @@ switchseg(s) {
fprintf(codefile,"%s\n",segname[s]); fprintf(codefile,"%s\n",segname[s]);
} }
void
savelab() { savelab() {
register char *p,*q; register char *p,*q;
@ -700,6 +712,7 @@ savelab() {
; ;
} }
void
dumplab() { dumplab() {
if (labstr[0] == 0) if (labstr[0] == 0)
@ -709,6 +722,7 @@ dumplab() {
labstr[0] = 0; labstr[0] = 0;
} }
void
xdumplab() { xdumplab() {
if (labstr[0] == 0) if (labstr[0] == 0)
@ -717,6 +731,7 @@ xdumplab() {
newdlb(labstr); newdlb(labstr);
} }
void
part_flush() { part_flush() {
/* /*

View file

@ -108,6 +108,7 @@ gennl() {
putc('\n',codefile); putc('\n',codefile);
} }
void
prtoken(tp,leadingchar) token_p tp; { prtoken(tp,leadingchar) token_p tp; {
register c; register c;
register char *code; register char *code;

View file

@ -7,6 +7,7 @@
static label_p label_list = (label_p)0; static label_p label_list = (label_p)0;
extern char *myalloc(); extern char *myalloc();
void
add_label(num, height, flth) add_label(num, height, flth)
{ {
register label_p lbl = (label_p)0; register label_p lbl = (label_p)0;

View file

@ -42,6 +42,7 @@ linkreg(of,sz,tp,sc) long of; {
return(rvlp); return(rvlp);
} }
void
tryreg(rvlp,typ) register struct regvar *rvlp; { tryreg(rvlp,typ) register struct regvar *rvlp; {
int score; int score;
register i; register i;

View file

@ -32,6 +32,8 @@ static char rcsid[] = "$Id$";
char *stab[MAXSTAB]; char *stab[MAXSTAB];
int nstab=0; int nstab=0;
void chkstr();
string myalloc(size) { string myalloc(size) {
register string p; register string p;
@ -72,6 +74,7 @@ compar(p1,p2) char **p1,**p2; {
return(1); return(1);
} }
void
garbage_collect() { garbage_collect() {
register i; register i;
struct emline *emlp; struct emline *emlp;
@ -116,6 +119,7 @@ garbage_collect() {
nstab = fillp-stab; nstab = fillp-stab;
} }
void
chkstr(str,used) string str; char used[]; { chkstr(str,used) string str; char used[]; {
register low,middle,high; register low,middle,high;

View file

@ -23,6 +23,8 @@ static char rcsid[] = "$Id$";
extern int nstab; /* salloc.c */ extern int nstab; /* salloc.c */
void bmove();
savestatus(sp) register state_p sp; { savestatus(sp) register state_p sp; {
sp->st_sh = stackheight; sp->st_sh = stackheight;
@ -57,6 +59,7 @@ restorestatus(sp) register state_p sp; {
popstr(sp->st_ns); popstr(sp->st_ns);
} }
void
bmove(from,to,nbytes) register short *from,*to; register nbytes; { bmove(from,to,nbytes) register short *from,*to; register nbytes; {
if (nbytes<=0) if (nbytes<=0)

View file

@ -49,6 +49,7 @@ match(tp,tep,optexp) register token_p tp; register set_p tep; {
return(result.e_v.e_con); return(result.e_v.e_con);
} }
void
instance(instno,token) register token_p token; { instance(instno,token) register token_p token; {
register inst_p inp; register inst_p inp;
int i; int i;
@ -145,6 +146,7 @@ instance(instno,token) register token_p token; {
} }
} }
void
cinstance(instno,token,tp,regno) register token_p token,tp; { cinstance(instno,token,tp,regno) register token_p token,tp; {
register inst_p inp; register inst_p inp;
int i; int i;

View file

@ -23,6 +23,9 @@ struct variable ANY; /* ANY symbol matching any instruction */
char *REST; /* Opcode of first instruction not matched by current pattern */ char *REST; /* Opcode of first instruction not matched by current pattern */
void labeldef();
void set_opcode();
#include "gen.c" #include "gen.c"
@ -170,6 +173,7 @@ write_first(w)
/* Try to recognize the opcode part of an instruction */ /* Try to recognize the opcode part of an instruction */
void
set_opcode(ip) set_opcode(ip)
register instr_p ip; register instr_p ip;
{ {
@ -318,6 +322,7 @@ bool split_operands(ip)
void
labeldef(ip) labeldef(ip)
register instr_p ip; register instr_p ip;
{ {

View file

@ -54,7 +54,7 @@ void prolog(full nlocals)
framesize = nlocals; framesize = nlocals;
} }
mes(word type) void mes(word type)
{ {
int argt ; int argt ;

View file

@ -40,9 +40,9 @@ STATIC prline();
STATIC printset(); STATIC printset();
STATIC int check(); STATIC int check();
STATIC moreverbose(); STATIC moreverbose();
STATIC prrule(); STATIC void prrule(p_gram p);
STATIC cfcheck(); STATIC cfcheck();
STATIC resolve(); STATIC void resolve(p_gram p);
STATIC propagate(); STATIC propagate();
STATIC spaces(); STATIC spaces();
@ -283,7 +283,7 @@ moreverbose(t) register p_set t; {
} }
STATIC STATIC
prrule(p) register p_gram p; { void prrule(p_gram p) {
/* /*
* Create a verbose printout of grammar rule p * Create a verbose printout of grammar rule p
*/ */
@ -420,7 +420,7 @@ cfcheck(s1,s2,flag) p_set s1,s2; {
} }
STATIC STATIC
resolve(p) register p_gram p; { void resolve(p_gram p) {
/* /*
* resolve conflicts, as specified by the user * resolve conflicts, as specified by the user
*/ */

View file

@ -41,7 +41,7 @@ typedef struct lngth {
/* Defined in this file : */ /* Defined in this file : */
extern do_compute(); extern do_compute();
STATIC createsets(); STATIC createsets();
STATIC walk(); STATIC void walk();
STATIC co_trans(); STATIC co_trans();
STATIC int nempty(); STATIC int nempty();
extern empty(); extern empty();
@ -49,15 +49,15 @@ STATIC int nfirst();
STATIC first(); STATIC first();
STATIC int nfollow(); STATIC int nfollow();
STATIC follow(); STATIC follow();
STATIC co_dirsymb(); STATIC void co_dirsymb();
STATIC co_others(); STATIC co_others();
STATIC do_lengthcomp(); STATIC do_lengthcomp();
STATIC complength(); STATIC void complength();
STATIC add(); STATIC void add();
STATIC int compare(); STATIC int compare();
STATIC setdefaults(); STATIC void setdefaults();
STATIC do_contains(); STATIC do_contains();
STATIC contains(); STATIC void contains();
STATIC int nsafes(); STATIC int nsafes();
STATIC int do_safes(); STATIC int do_safes();
#ifdef NON_CORRECTING #ifdef NON_CORRECTING
@ -208,7 +208,7 @@ createsets() {
} }
} }
STATIC STATIC void
walk(u, p) p_set u; register p_gram p; { walk(u, p) p_set u; register p_gram p; {
/* /*
* Walk through the grammar rule p, allocating sets * Walk through the grammar rule p, allocating sets
@ -658,7 +658,7 @@ nc_follow(setp,p) p_set setp; register p_gram p; {
#endif #endif
STATIC STATIC void
co_dirsymb(setp,p) p_set setp; register p_gram p; { co_dirsymb(setp,p) p_set setp; register p_gram p; {
/* /*
* Walk the rule p, doing the work for alternations * Walk the rule p, doing the work for alternations
@ -777,7 +777,7 @@ do_lengthcomp() {
free ((p_mem) length); free ((p_mem) length);
} }
STATIC STATIC void
complength(p,le) register p_gram p; p_length le; { complength(p,le) register p_gram p; p_length le; {
/* /*
* Walk grammar rule p, computing minimum lengths * Walk grammar rule p, computing minimum lengths
@ -862,7 +862,7 @@ complength(p,le) register p_gram p; p_length le; {
} }
} }
STATIC STATIC void
add(a, c, v) register p_length a; { add(a, c, v) register p_length a; {
if (a->cnt == INFINITY || c == INFINITY) { if (a->cnt == INFINITY || c == INFINITY) {
@ -879,7 +879,7 @@ compare(a, b) register p_length a, b; {
return a->val - b->val; return a->val - b->val;
} }
STATIC STATIC void
setdefaults(p) register p_gram p; { setdefaults(p) register p_gram p; {
for (;;) { for (;;) {
switch(g_gettype(p)) { switch(g_gettype(p)) {
@ -949,7 +949,7 @@ do_contains(n) register p_nont n; {
} }
} }
STATIC STATIC void
contains(p,set) register p_gram p; register p_set set; { contains(p,set) register p_gram p; register p_set set; {
/* /*
* Does the real computation of the contains-sets * Does the real computation of the contains-sets

View file

@ -57,24 +57,24 @@ STATIC genncrecovery();
#endif #endif
STATIC string genname(); STATIC string genname();
STATIC generate(); STATIC generate();
STATIC prset(); STATIC void prset();
STATIC macro(); STATIC void macro();
STATIC controlline(); STATIC controlline();
STATIC getparams(); STATIC getparams();
STATIC getansiparams(); STATIC getansiparams();
STATIC genprototypes(); STATIC genprototypes();
STATIC gettok(); STATIC gettok();
STATIC rulecode(); STATIC void rulecode();
STATIC int * dopush(); STATIC int * dopush();
STATIC int * mk_tokenlist(); STATIC int * mk_tokenlist();
STATIC getaction(); STATIC void getaction();
STATIC alternation(); STATIC void alternation();
STATIC codeforterm(); STATIC codeforterm();
STATIC genswhead(); STATIC genswhead();
STATIC gencases(); STATIC gencases();
STATIC genpush(); STATIC genpush();
STATIC genpop(); STATIC genpop();
STATIC genincrdecr(); STATIC void genincrdecr();
STATIC add_cases(); STATIC add_cases();
STATIC int analyze_switch(); STATIC int analyze_switch();
STATIC out_list(); STATIC out_list();
@ -414,7 +414,7 @@ generate(f) p_file f; {
} }
} }
STATIC STATIC void
prset(p) p_set p; { prset(p) p_set p; {
register int k; register int k;
register unsigned i; register unsigned i;
@ -435,7 +435,7 @@ prset(p) p_set p; {
/* NOTREACHED */ /* NOTREACHED */
} }
STATIC STATIC void
macro(s,n) string s; p_nont n; { macro(s,n) string s; p_nont n; {
int i; int i;
@ -625,7 +625,7 @@ gettok() {
} }
} }
STATIC STATIC void
rulecode(p,safety,mustscan,mustpop) register p_gram p; { rulecode(p,safety,mustscan,mustpop) register p_gram p; {
/* /*
* Code for a production rule. * Code for a production rule.
@ -735,7 +735,7 @@ rulecode(p,safety,mustscan,mustpop) register p_gram p; {
} }
} }
STATIC STATIC void
alternation(pp, safety, mustscan, mustpop, lb) alternation(pp, safety, mustscan, mustpop, lb)
p_gram pp; p_gram pp;
{ {
@ -956,7 +956,7 @@ dopush(p,safety,toplevel,pp) register p_gram p; int **pp; {
# define max(a,b) ((a) < (b) ? (b) : (a)) # define max(a,b) ((a) < (b) ? (b) : (a))
STATIC STATIC void
getaction(flag) { getaction(flag) {
/* Read an action from the action file. /* Read an action from the action file.
* flag = 1 if it is an action, * flag = 1 if it is an action,
@ -1252,7 +1252,7 @@ genpush(d) {
genincrdecr("incr", d); genincrdecr("incr", d);
} }
STATIC STATIC void
genincrdecr(s, d) string s; { genincrdecr(s, d) string s; {
if (d == NOPOP) return; if (d == NOPOP) return;
if (d >= 0) { if (d >= 0) {

View file

@ -36,7 +36,7 @@ extern error();
extern fatal(); extern fatal();
extern comfatal(); extern comfatal();
extern copyfile(); extern copyfile();
extern install(); extern void install();
extern char *mktemp(); extern char *mktemp();
extern char *sbrk(); extern char *sbrk();
@ -279,6 +279,7 @@ error(lineno,s,t,u) string s,t,u; {
} }
/* VARARGS1 */ /* VARARGS1 */
void
warning(lineno,s,t,u) string s,t,u; { warning(lineno,s,t,u) string s,t,u; {
/* /*
* Just a warning * Just a warning
@ -327,6 +328,7 @@ copyfile(file) string file; {
fclose(f); fclose(f);
} }
void
install(target, source) string target, source; { install(target, source) string target, source; {
/* /*
* Copy the temporary file generated from source to target * Copy the temporary file generated from source to target

View file

@ -29,7 +29,7 @@ static string rcsid8 = "$Id$";
/* In this file the following routines are defined: */ /* In this file the following routines are defined: */
extern co_reach(); extern co_reach();
STATIC reachable(); STATIC reachable();
STATIC reachwalk(); STATIC void reachwalk();
co_reach() { co_reach() {
/* /*
@ -94,7 +94,7 @@ reachable(p) register p_nont p; {
} }
} }
STATIC STATIC void
reachwalk(p) register p_gram p; { reachwalk(p) register p_gram p; {
/* /*
* Walk through rule p, looking for nonterminals. * Walk through rule p, looking for nonterminals.

View file

@ -41,8 +41,8 @@ extern p_set start_firsts;
extern p_set setalloc(); extern p_set setalloc();
extern p_gram search(); extern p_gram search();
STATIC save_rule(); STATIC void save_rule();
STATIC save_set(); STATIC void save_set();
/* t_list will contain terms to be `flattened' */ /* t_list will contain terms to be `flattened' */
static struct t_list { static struct t_list {
@ -267,7 +267,7 @@ save_grammar(f) FILE *f; {
fprintf(fgram, "#define LLNNONTERMINALS %d\n", nt_highest - assval + 1); fprintf(fgram, "#define LLNNONTERMINALS %d\n", nt_highest - assval + 1);
} }
STATIC STATIC void
save_rule(p, tail) register p_gram p; int tail; { save_rule(p, tail) register p_gram p; int tail; {
/* /*
Walk through rule p, saving it. The non-terminal tail is Walk through rule p, saving it. The non-terminal tail is
@ -363,7 +363,7 @@ save_rule(p, tail) register p_gram p; int tail; {
} }
} }
STATIC STATIC void
save_set(p) p_set p; { save_set(p) p_set p; {
register int k; register int k;
register unsigned i; register unsigned i;

View file

@ -92,13 +92,13 @@ extern int scanner();
extern LLmessage(); extern LLmessage();
extern int input(); extern int input();
extern unput(); extern unput();
extern skipcomment(); extern void skipcomment();
# ifdef LINE_DIRECTIVE # ifdef LINE_DIRECTIVE
STATIC linedirective(); STATIC linedirective();
# endif # endif
STATIC string cpy(); STATIC string cpy();
STATIC string vallookup(); STATIC string vallookup();
STATIC copyact(); STATIC void copyact();
static int nparams; static int nparams;
# line 75 "tokens.g" # line 75 "tokens.g"
@ -144,7 +144,7 @@ static t_token savedtok; /* to save lextoken in case of an insertion */
static int nostartline; /* = 0 if at the start of a line */ static int nostartline; /* = 0 if at the start of a line */
# endif # endif
STATIC STATIC void
copyact(ch1,ch2,flag,level) char ch1,ch2; { copyact(ch1,ch2,flag,level) char ch1,ch2; {
/* /*
* Copy an action to file f. Opening bracket is ch1, closing bracket * Copy an action to file f. Opening bracket is ch1, closing bracket
@ -419,7 +419,7 @@ unput(c) {
backupc = c; backupc = c;
} }
skipcomment(flag) { void skipcomment(flag) {
/* /*
* Skip comment. If flag != 0, the comment is inside a fragment * Skip comment. If flag != 0, the comment is inside a fragment
* of C-code, so keep it. * of C-code, so keep it.

View file

@ -33,13 +33,13 @@ extern int scanner();
extern LLmessage(); extern LLmessage();
extern int input(); extern int input();
extern unput(); extern unput();
extern skipcomment(); extern void skipcomment();
# ifdef LINE_DIRECTIVE # ifdef LINE_DIRECTIVE
STATIC linedirective(); STATIC linedirective();
# endif # endif
STATIC string cpy(); STATIC string cpy();
STATIC string vallookup(); STATIC string vallookup();
STATIC copyact(); STATIC void copyact();
static int nparams; static int nparams;
} }
@ -114,7 +114,7 @@ static t_token savedtok; /* to save lextoken in case of an insertion */
static int nostartline; /* = 0 if at the start of a line */ static int nostartline; /* = 0 if at the start of a line */
# endif # endif
STATIC STATIC void
copyact(ch1,ch2,flag,level) char ch1,ch2; { copyact(ch1,ch2,flag,level) char ch1,ch2; {
/* /*
* Copy an action to file f. Opening bracket is ch1, closing bracket * Copy an action to file f. Opening bracket is ch1, closing bracket
@ -389,6 +389,7 @@ unput(c) {
backupc = c; backupc = c;
} }
void
skipcomment(flag) { skipcomment(flag) {
/* /*
* Skip comment. If flag != 0, the comment is inside a fragment * Skip comment. If flag != 0, the comment is inside a fragment

View file

@ -143,6 +143,7 @@ rmfile(file) path *file ; {
} }
} }
void
rmtemps() { rmtemps() {
/* Called in case of disaster, always remove the current output file! /* Called in case of disaster, always remove the current output file!
*/ */

View file

@ -50,6 +50,7 @@ gr_cat(id,string) growstring *id ; char *string ; {
} }
} }
void
gr_throw(id) register growstring *id ; { gr_throw(id) register growstring *id ; {
/* Throw the string away */ /* Throw the string away */
if ( id->gr_max==0 ) return ; if ( id->gr_max==0 ) return ;

View file

@ -20,7 +20,7 @@ typedef struct {
/* Routines used */ /* Routines used */
extern int gr_throw() ; /* To free the core */ extern void gr_throw() ; /* To free the core */
extern int gr_add() ; /* To add one character */ extern int gr_add() ; /* To add one character */
extern int gr_cat() ; /* concatenate the contents and the string */ extern int gr_cat() ; /* concatenate the contents and the string */
extern int gr_init() ; /* Initialize the bookkeeping */ extern int gr_init() ; /* Initialize the bookkeeping */

View file

@ -24,6 +24,8 @@ static int arg_count;
extern char *getenv(); extern char *getenv();
void vieuwargs();
main(argc,argv) char **argv ; { main(argc,argv) char **argv ; {
register list_elem *elem ; register list_elem *elem ;
register char *frontend ; register char *frontend ;
@ -136,6 +138,7 @@ varinit() {
/************************* flag processing ***********************/ /************************* flag processing ***********************/
void
vieuwargs(argc,argv) char **argv ; { vieuwargs(argc,argv) char **argv ; {
register char *argp; register char *argp;
register int nextarg ; register int nextarg ;

View file

@ -22,6 +22,8 @@ FILE *dmach ;
int offset ; int offset ;
void readm();
main(argc,argv) char **argv ; { main(argc,argv) char **argv ; {
register i ; register i ;
@ -70,6 +72,7 @@ FILE *do_open(file) char *file ; {
return fopen(dname,"r"); return fopen(dname,"r");
} }
void
readm() { readm() {
register int i ; register int i ;
register int token ; register int token ;

View file

@ -55,6 +55,7 @@ int getinchar() ;
static char *ty_name ; static char *ty_name ;
static char *bol ; static char *bol ;
void open_in();
static char *inname ; static char *inname ;
@ -263,6 +264,7 @@ static FILE *infile ;
static char *inptr ; static char *inptr ;
char *em_dir = EM_DIR; char *em_dir = EM_DIR;
void
open_in(name) register char *name ; { open_in(name) register char *name ; {
register dmach *cmac ; register dmach *cmac ;

View file

@ -15,6 +15,8 @@
static char rcs_id[] = "$Id$" ; static char rcs_id[] = "$Id$" ;
#endif #endif
void try();
enum f_path getpath(first) register trf **first ; { enum f_path getpath(first) register trf **first ; {
/* Try to find a transformation path */ /* Try to find a transformation path */
@ -61,6 +63,7 @@ start_scan() {
last_ocount= 0 ; last_ocount= 0 ;
} }
void
try(f_scan,suffix) list_elem *f_scan; char *suffix; { try(f_scan,suffix) list_elem *f_scan; char *suffix; {
register list_elem *scan ; register list_elem *scan ;
register trf *trafo ; register trf *trafo ;

View file

@ -28,6 +28,10 @@ static int touch_tail= NO ;
char *headvar(),*tailvar() ; char *headvar(),*tailvar() ;
void condit();
void doassign();
void set_Rflag();
int transform(phase) register trf *phase ; { int transform(phase) register trf *phase ; {
int ok ; int ok ;
@ -153,6 +157,7 @@ transini() {
setpvar(keeps(TAIL),tailvar) ; setpvar(keeps(TAIL),tailvar) ;
} }
void
set_Rflag(argp) register char *argp ; { set_Rflag(argp) register char *argp ; {
register char *eos ; register char *eos ;
register list_elem *prog ; register list_elem *prog ;
@ -413,6 +418,7 @@ growstring scanexpr(line) char *line ; {
return result ; return result ;
} }
void
condit(line,fsuff,lsuff,tailval) growstring *line ; condit(line,fsuff,lsuff,tailval) growstring *line ;
list_head *fsuff, *lsuff; list_head *fsuff, *lsuff;
char *tailval ; char *tailval ;
@ -504,6 +510,7 @@ int mapexpand(mapentry,cflag)
return 1 ; return 1 ;
} }
void
doassign(line,star,length) char *line, *star ; { doassign(line,star,length) char *line, *star ; {
growstring varval, name, temp ; growstring varval, name, temp ;
register char *ptr ; register char *ptr ;
@ -598,6 +605,7 @@ char *c_rep(string,place,rep) char *string, *place, *rep ; {
static list_head *curargs ; static list_head *curargs ;
static list_head *comb_args ; static list_head *comb_args ;
void
addargs(string) char *string ; { addargs(string) char *string ; {
register char *temp, *repc ; register char *temp, *repc ;
register list_elem *elem ; register list_elem *elem ;

View file

@ -32,6 +32,9 @@ extern int n_error;
# define STDOUT stderr # define STDOUT stderr
#endif #endif
void fuerror(const char* fmt, ...);
void werror(const char* fmt, ...);
char *basename(string) char *string ; { char *basename(string) char *string ; {
static char retval[256] ; static char retval[256] ;
char *last_dot, *last_start ; char *last_dot, *last_start ;

View file

@ -35,6 +35,8 @@ long s_base[S_MAX]; /* for specially encoded bases */
char *filename; char *filename;
int narg; int narg;
void do_file();
main(argc, argv) main(argc, argv)
char **argv; char **argv;
{ {
@ -134,6 +136,7 @@ process(fd)
} }
} }
void
do_file(fd) do_file(fd)
int fd; int fd;
{ {

View file

@ -109,6 +109,10 @@ char *temp_arch = &temp_buf[0];
extern char *mktemp(); extern char *mktemp();
extern char *ctime(); extern char *ctime();
void do_object();
void write_symdef();
void add();
usage() usage()
{ {
error(TRUE, "usage: %s [qdprtxl][vlc] archive [file] ...\n", error(TRUE, "usage: %s [qdprtxl][vlc] archive [file] ...\n",
@ -437,6 +441,7 @@ register char *argv[];
close(ar_fd); close(ar_fd);
} }
void
add(name, fd, mess) add(name, fd, mess)
char *name; char *name;
int fd; int fd;
@ -630,6 +635,7 @@ char *s, *name;
* then 4 bytes giving the size of the string table, followed by the string * then 4 bytes giving the size of the string table, followed by the string
* table itself. * table itself.
*/ */
void
write_symdef() write_symdef()
{ {
register struct ranlib *ran; register struct ranlib *ran;
@ -683,6 +689,7 @@ is_outhead(headp)
return !BADMAGIC(*headp) && headp->oh_nname != 0; return !BADMAGIC(*headp) && headp->oh_nname != 0;
} }
void
do_object(f, size) do_object(f, size)
long size; long size;
{ {

View file

@ -150,7 +150,7 @@ STATIC bo_optloop(p,b,x,bra,bcc)
STATIC bo_tryloop(p,loop) STATIC void bo_tryloop(p,loop)
proc_p p; proc_p p;
lset loop; lset loop;
{ {
@ -207,6 +207,7 @@ STATIC mv_code(b1,b2)
} }
} }
void
bo_switch(b) bo_switch(b)
bblock_p b; bblock_p b;
{ {
@ -303,6 +304,7 @@ STATIC bo_cleanproc(p)
} }
} }
void
bo_optimize(p) bo_optimize(p)
proc_p p; proc_p p;
{ {

View file

@ -130,7 +130,7 @@ STATIC int makedmap(dbl)
return cnt; return cnt;
} }
STATIC getdnames(dumpd) STATIC void getdnames(dumpd)
FILE* dumpd; FILE* dumpd;
{ {
/* Read the names of the datalabels from /* Read the names of the datalabels from
@ -151,7 +151,7 @@ STATIC getdnames(dumpd)
} }
} }
STATIC getpnames(dumpp) STATIC void getpnames(dumpp)
FILE* dumpp; FILE* dumpp;
{ {
/* Read the names of the procedures from /* Read the names of the procedures from

View file

@ -298,7 +298,7 @@ STATIC mark_succ(b,lp)
} }
STATIC mark_blocks(lp) STATIC void mark_blocks(lp)
loop_p lp; loop_p lp;
{ {
/* Mark the strong and firm blocks of a loop. /* Mark the strong and firm blocks of a loop.

View file

@ -56,7 +56,7 @@
STATIC int Scj; /* number of optimizations found */ STATIC int Scj; /* number of optimizations found */
STATIC showinstr(); STATIC void showinstr();
@ -289,6 +289,7 @@ STATIC bool try_pred(b)
void
cj_optimize(p) cj_optimize(p)
proc_p p; proc_p p;
{ {
@ -334,7 +335,7 @@ main(argc,argv)
extern char em_mnem[]; /* The mnemonics of the EM instructions. */ extern char em_mnem[]; /* The mnemonics of the EM instructions. */
STATIC showinstr(lnp) line_p lnp; { STATIC void showinstr(lnp) line_p lnp; {
/* Makes the instruction in `lnp' human readable. Only lines that /* Makes the instruction in `lnp' human readable. Only lines that
* can occur in expressions that are going to be eliminated are * can occur in expressions that are going to be eliminated are

View file

@ -34,7 +34,7 @@ STATIC cs_clear()
start_valnum(); start_valnum();
} }
STATIC cs_optimize(p) STATIC void cs_optimize(p)
proc_p p; proc_p p;
{ {
/* Optimize all basic blocks of one procedure. */ /* Optimize all basic blocks of one procedure. */

View file

@ -75,7 +75,7 @@ STATIC bool same_avail(kind, avp1, avp2)
/* NOTREACHED */ /* NOTREACHED */
} }
STATIC check_local(avp) STATIC void check_local(avp)
avail_p avp; avail_p avp;
{ {
/* Check if the local in which the result of avp was stored, /* Check if the local in which the result of avp was stored,

View file

@ -17,7 +17,7 @@
extern char em_mnem[]; /* The mnemonics of the EM instructions. */ extern char em_mnem[]; /* The mnemonics of the EM instructions. */
STATIC showinstr(lnp) STATIC void showinstr(lnp)
line_p lnp; line_p lnp;
{ {
/* Makes the instruction in `lnp' human readable. Only lines that /* Makes the instruction in `lnp' human readable. Only lines that

View file

@ -234,7 +234,7 @@ STATIC kill_local(enp, indir)
} }
} }
STATIC kill_sim() STATIC void kill_sim()
{ {
/* A store is done into the ENIGNMASK. */ /* A store is done into the ENIGNMASK. */

Some files were not shown because too many files have changed in this diff Show more