From 250777d1ca3c28564e68c4808306bbbc2b04c499 Mon Sep 17 00:00:00 2001 From: George Koehler Date: Sun, 10 Jun 2018 16:26:54 -0400 Subject: [PATCH] Rename setmode() to set_mode() to avoid BSD prototype. 4.4BSD added a non-standard function setmode() to ; its prototype is not compatible. --- util/ass/ass00.c | 2 +- util/ass/ass80.c | 8 ++++---- util/ass/assci.c | 28 ++++++++++++++-------------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/util/ass/ass00.c b/util/ass/ass00.c index 82651b595..b6c9dc519 100644 --- a/util/ass/ass00.c +++ b/util/ass/ass00.c @@ -369,7 +369,7 @@ end_module() { */ align(wordsize) ; - setmode(DATA_NUL); + set_mode(DATA_NUL); dump(100); enmd_pro(); enmd_glo(); diff --git a/util/ass/ass80.c b/util/ass/ass80.c index 614dbaf47..514c8dbc0 100644 --- a/util/ass/ass80.c +++ b/util/ass/ass80.c @@ -280,7 +280,7 @@ int icount(size) { return amount ; } -setmode(mode) { +set_mode(mode) { if (datamode==mode) { /* in right mode already */ switch ( datamode ) { @@ -302,8 +302,8 @@ setmode(mode) { default: return ; } - setmode(DATA_NUL) ; /* flush current descriptor */ - setmode(mode) ; + set_mode(DATA_NUL) ; /* flush current descriptor */ + set_mode(mode) ; return; } switch(datamode) { /* terminate current mode */ @@ -376,7 +376,7 @@ setmode(mode) { ext8(HEADBSS) ; break; default: - fatal("Unknown mode in setmode") ; + fatal("Unknown mode in set_mode") ; } } diff --git a/util/ass/assci.c b/util/ass/assci.c index 3b9761eac..5c5b1795e 100644 --- a/util/ass/assci.c +++ b/util/ass/assci.c @@ -699,10 +699,10 @@ chkstart() { if ( absout ) return ; if ( !oksizes ) fatal("missing size specification") ; - setmode(DATA_CONST) ; + set_mode(DATA_CONST) ; extconst((cons_t)0) ; databytes= wordsize ; - setmode(DATA_REP) ; + set_mode(DATA_REP) ; if ( wordsize1 ) { - setmode(DATA_REP); + set_mode(DATA_REP); extadr(amount-1) ; } } else { n = (n + wordsize - 1) / wordsize; while (n > MAXBYTE) { - setmode(DATA_BSS); + set_mode(DATA_BSS); ext8(MAXBYTE); n -= MAXBYTE; } - setmode(DATA_BSS); + set_mode(DATA_BSS); ext8((int) n); } } @@ -787,7 +787,7 @@ extloc(lbp) register locl_t *lbp; { * assemble a pointer constant from a local label. * For example con *1 */ - setmode(DATA_IPTR); + set_mode(DATA_IPTR); data_reloc( chp_cast lbp,dataoff,RELLOC); extadr((cons_t)0); } @@ -800,7 +800,7 @@ extglob(agbp,off) glob_t *agbp; cons_t off; { * Various relocation has to be prepared here in some cases */ gbp=agbp; - setmode(DATA_DPTR); + set_mode(DATA_DPTR); if ( gbp->g_status&DEF ) { extadr(gbp->g_val.g_addr+off); } else { @@ -813,7 +813,7 @@ extpro(aprp) proc_t *aprp; { /* * generate a addres that is defined by a procedure descriptor. */ - consiz= ptrsize ; setmode(DATA_UCON); + consiz= ptrsize ; set_mode(DATA_UCON); extarb((int)ptrsize,(long)(aprp->p_num)); } @@ -825,7 +825,7 @@ extstring() { * generate data for a string. */ for(n=strlngth,s=string ; n--; ) { - setmode(DATA_BYTES) ; + set_mode(DATA_BYTES) ; ext8(*s++); } return ; @@ -839,7 +839,7 @@ extxcon(header) { * generate data for a floating constant initialized by a string. */ - setmode(header); + set_mode(header); s = string ; for (n=strlngth ; n-- ;) { if ( *s==0 ) error("Zero byte in initializer") ; @@ -875,7 +875,7 @@ extvcon(header) { * generate data for a constant initialized by a string. */ - setmode(header); + set_mode(header); if ( consiz>4 ) { error("Size of initializer exceeds loader capability") ; }