From e72b754bd8a8f61ab01670bb37421196e1288e49 Mon Sep 17 00:00:00 2001 From: Ole Streicher Date: Mon, 8 Apr 2024 16:22:48 +0200 Subject: [PATCH] Remove all "register" modifiers in cl and ecl In modern languages, the "register" modifier is ignored, and the variables are placed in the register by the compiler's decision. --- pkg/cl/binop.c | 6 +-- pkg/cl/bkg.c | 28 +++++----- pkg/cl/builtin.c | 126 ++++++++++++++++++++++---------------------- pkg/cl/clsystem.c | 4 +- pkg/cl/compile.c | 10 ++-- pkg/cl/debug.c | 20 +++---- pkg/cl/decl.c | 8 +-- pkg/cl/edcap.c | 10 ++-- pkg/cl/eparam.c | 40 +++++++------- pkg/cl/eparam.h | 2 +- pkg/cl/errs.c | 2 +- pkg/cl/exec.c | 36 ++++++------- pkg/cl/gquery.c | 6 +-- pkg/cl/gram.c | 38 +++++++------- pkg/cl/grammar.l | 4 +- pkg/cl/history.c | 38 +++++++------- pkg/cl/lexicon.c | 6 +-- pkg/cl/lexyy.c | 8 +-- pkg/cl/lists.c | 2 +- pkg/cl/main.c | 12 ++--- pkg/cl/modes.c | 26 ++++----- pkg/cl/opcodes.c | 14 ++--- pkg/cl/operand.c | 8 +-- pkg/cl/param.c | 34 ++++++------ pkg/cl/param.h | 8 +-- pkg/cl/pfiles.c | 50 +++++++++--------- pkg/cl/prcache.c | 38 +++++++------- pkg/cl/proto.h | 94 ++++++++++++++++----------------- pkg/cl/stack.c | 2 +- pkg/cl/task.c | 22 ++++---- pkg/cl/task.h | 2 +- pkg/cl/unop.c | 4 +- pkg/ecl/binop.c | 6 +-- pkg/ecl/bkg.c | 28 +++++----- pkg/ecl/builtin.c | 128 ++++++++++++++++++++++----------------------- pkg/ecl/clsystem.c | 4 +- pkg/ecl/compile.c | 10 ++-- pkg/ecl/debug.c | 20 +++---- pkg/ecl/decl.c | 8 +-- pkg/ecl/edcap.c | 10 ++-- pkg/ecl/eparam.c | 40 +++++++------- pkg/ecl/eparam.h | 2 +- pkg/ecl/errs.c | 4 +- pkg/ecl/exec.c | 42 +++++++-------- pkg/ecl/gquery.c | 6 +-- pkg/ecl/gram.c | 38 +++++++------- pkg/ecl/grammar.l | 4 +- pkg/ecl/history.c | 40 +++++++------- pkg/ecl/lexicon.c | 6 +-- pkg/ecl/lexyy.c | 8 +-- pkg/ecl/lists.c | 2 +- pkg/ecl/main.c | 14 ++--- pkg/ecl/modes.c | 26 ++++----- pkg/ecl/opcodes.c | 14 ++--- pkg/ecl/operand.c | 8 +-- pkg/ecl/param.c | 34 ++++++------ pkg/ecl/param.h | 8 +-- pkg/ecl/pfiles.c | 50 +++++++++--------- pkg/ecl/prcache.c | 38 +++++++------- pkg/ecl/proto.h | 94 ++++++++++++++++----------------- pkg/ecl/stack.c | 2 +- pkg/ecl/task.c | 22 ++++---- pkg/ecl/task.h | 2 +- pkg/ecl/unop.c | 4 +- 64 files changed, 715 insertions(+), 715 deletions(-) diff --git a/pkg/cl/binop.c b/pkg/cl/binop.c index 5ddc2e128..5326c8f6b 100644 --- a/pkg/cl/binop.c +++ b/pkg/cl/binop.c @@ -43,7 +43,7 @@ #define RIGHTSIDE 1 char * -strint (register char *s, int side) +strint (char *s, int side) { if (side == LEFTSIDE) { while (isdigit (*s)) @@ -75,7 +75,7 @@ strint (register char *s, int side) void binop (int opcode) { - register int typ1, typ2; + int typ1, typ2; struct operand o1, o2, result; char res[2*SZ_LINE]; char *o1sp; @@ -545,7 +545,7 @@ binop (int opcode) void binexp (int opcode) { - register int typ1, typ2; + int typ1, typ2; struct operand o1, o2, result; int strres=0, dostr=0; diff --git a/pkg/cl/bkg.c b/pkg/cl/bkg.c index 34c33b8d7..97d6d975a 100644 --- a/pkg/cl/bkg.c +++ b/pkg/cl/bkg.c @@ -123,8 +123,8 @@ bkg_spawn ( char *cmd /* command entered by user to spawn job */ ) { - register struct _bkgjob *bk; - register int jobno, stat; + struct _bkgjob *bk; + int jobno, stat; int curpid = c_getpid(); /* Find first unused slot in a circular search. @@ -183,9 +183,9 @@ bkg_spawn ( * all bkg jobs to terminate. */ void -bkg_wait (register int job) +bkg_wait (int job) { - register int j; + int j; int active_jobs; if (job < 0 || job > NBKG) @@ -213,8 +213,8 @@ bkg_wait (register int job) void bkg_kill (int job) { - register struct _bkgjob *bk; - register int j; + struct _bkgjob *bk; + int j; bkg_update (1); if (job < 0 || job > NBKG) @@ -253,9 +253,9 @@ bkg_jobstatus ( int job /* job(s) */ ) { - register struct _bkgjob *bk; - register int j, n, ch; - register char *ip; + struct _bkgjob *bk; + int j, n, ch; + char *ip; long seconds; bkg_update (1); @@ -327,8 +327,8 @@ bkg_update ( int pmsg /* print event messages */ ) { - register struct _bkgjob *bk; - register int j; + struct _bkgjob *bk; + int j; for (bk=jobtable, j=1; j <= NBKG; j++, bk++) { if (busy(j)) { @@ -355,7 +355,7 @@ bkg_close ( int pmsg /* print termination message */ ) { - register struct _bkgjob *bk = &jobtable[job-1]; + struct _bkgjob *bk = &jobtable[job-1]; bk->b_clock = c_clktime (bk->b_clock); bk->b_exitcode = c_prcldpr (bk->b_jobno); @@ -418,8 +418,8 @@ bkg_delfiles (int job) void bkg_abort (void) { - register int job; - register struct task *tp; + int job; + struct task *tp; for (job=1; job <= NBKG; job++) if (busy (job)) diff --git a/pkg/cl/builtin.c b/pkg/cl/builtin.c index db2e4e4f1..8ab8fa455 100644 --- a/pkg/cl/builtin.c +++ b/pkg/cl/builtin.c @@ -92,9 +92,9 @@ clbye (void) void cllogout (void) { - register int n; - register struct d_alloc *dv; - register struct pfile *pfp; + int n; + struct d_alloc *dv; + struct pfile *pfp; struct operand o; char owner[SZ_FNAME+1]; @@ -177,7 +177,7 @@ clclbye (void) void clcache (void) { - register struct pfile *pfp; + struct pfile *pfp; char pfilename[SZ_PATHNAME]; char **list, **next; struct operand o; @@ -278,7 +278,7 @@ cl_locate (char *task_spec, int first_only) void clwhich (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; int n; @@ -303,7 +303,7 @@ clwhich (void) void clwhereis (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; int n; @@ -329,8 +329,8 @@ clwhereis (void) void clflprcache (void) { - register struct pfile *pfp; - register int n, pid; + struct pfile *pfp; + int n, pid; struct operand o; struct ltask *ltp; int break_locks = 1; @@ -376,8 +376,8 @@ clflprcache (void) void clprcache (void) { - register struct pfile *pfp; - register int n, pid; + struct pfile *pfp; + int n, pid; struct operand o; pfp = newtask->t_pfp; @@ -429,7 +429,7 @@ static char cd_emsg[] = "Cannot change directory to `%s'"; void clchdir (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; char *dirname; @@ -504,8 +504,8 @@ clback (void) void clerror (void) { - register struct param *arg1, *arg2; - register struct pfile *pfp; + struct param *arg1, *arg2; + struct pfile *pfp; char *errmsg; pfp = newtask->t_pfp; @@ -563,8 +563,8 @@ clerror (void) void clhelp (void) { - register struct pfile *pfp; - register struct package *pkp; + struct pfile *pfp; + struct package *pkp; struct operand o; int n, nleft, show_invis=NO; @@ -611,7 +611,7 @@ clallhelp (void) void clhistory (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; static int default_max_history = 15; int max_history; @@ -646,7 +646,7 @@ clhistory (void) void dotrace (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; int value = !cltrace; @@ -679,7 +679,7 @@ clehistory (void) void clservice (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; int bkgjob; @@ -713,7 +713,7 @@ clservice (void) void clkeep (void) { - register struct task *tp, *root_task = (struct task *) NULL; + struct task *tp, *root_task = (struct task *) NULL; if (nargs (newtask->t_pfp) > 0) cl_error (E_UERR, "`keep' command has no arguments"); @@ -753,8 +753,8 @@ clkeep (void) void clkill (void) { - register struct pfile *pfp; - register int n, jn; + struct pfile *pfp; + int n, jn; struct operand o; pfp = newtask->t_pfp; @@ -779,7 +779,7 @@ clkill (void) void cleparam (void) { - register struct pfile *pfp; + struct pfile *pfp; int n, nleft, quit; struct operand o; @@ -815,8 +815,8 @@ cleparam (void) void cllparam (void) { - register struct ltask *ltp; - register struct pfile *pfp; + struct ltask *ltp; + struct pfile *pfp; struct operand o; int n, nleft; @@ -848,7 +848,7 @@ cllparam (void) void cldparam (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; int n, nleft; @@ -891,9 +891,9 @@ cldparam (void) void clpack (void) { - register struct pfile *pfp; - register struct task *tp; - register struct package *pkp; + struct pfile *pfp; + struct task *tp; + struct package *pkp; char *paknam, *bindir; struct operand o1, o2; int n; @@ -1205,7 +1205,7 @@ clscanf (void) void clputlog (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; char *usermsg; int n; @@ -1241,7 +1241,7 @@ clputlog (void) void clset (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand onam, oval; int scantemp, n, show_redefs=YES; @@ -1279,7 +1279,7 @@ clset (void) void clreset (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand onam, oval; int scantemp, n, show_redefs=YES; @@ -1319,7 +1319,7 @@ clreset (void) void clshow (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand onam; int n, show_redefs=NO; char val[SZ_VALUE]; @@ -1351,8 +1351,8 @@ clshow (void) void clstty (void) { - register struct pfile *pfp; - register char *ip, *op; + struct pfile *pfp; + char *ip, *op; char sttycmd[2048], args[1024], *argp[100]; int argc, i; XINT std_in = STDIN, std_out = STDOUT; @@ -1396,7 +1396,7 @@ clstty (void) void cltask (int redef) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; int n, scantmp; char *physname, *logname; @@ -1497,8 +1497,8 @@ clntask (void) void clforeign (void) { - register struct pfile *pfp; - register char *ip, *op; + struct pfile *pfp; + char *ip, *op; char oscmd[1024], args[1024], *argp[100], *ap; int dolseen, mapfname; int argc, n1, n2, ch, n; @@ -1603,8 +1603,8 @@ clforeign (void) append_all = (out == err); if (newtask->t_flags & T_APPEND) { - register int ch; - register FILE *fp=NULL, *outfp=NULL; + int ch; + FILE *fp=NULL, *outfp=NULL; char tmpfile[SZ_PATHNAME]; /* Execute the command spooling the output in a temporary @@ -1643,8 +1643,8 @@ void clunlearn (void) { static char errfmt[] = "Warning: Cannot unlearn params for `%s'\n"; - register struct pfile *pfp; - register struct ltask *ltp, *ltt; + struct pfile *pfp; + struct ltask *ltp, *ltt; char *x1, *pk, *t, *x2; struct operand o; int n; @@ -1694,8 +1694,8 @@ clupdate (void) { /* x1 and x2 are just place holders for the call to breakout. */ - register struct pfile *pfp; - register struct ltask *ltp; + struct pfile *pfp; + struct ltask *ltp; char *x1, *pk, *t, *x2; struct operand o; int n; @@ -1731,8 +1731,8 @@ clhidetask (void) { /* x1 and x2 are just place holders for the call to breakout. */ - register struct pfile *pfp; - register struct ltask *ltp; + struct pfile *pfp; + struct ltask *ltp; char *x1, *pk, *t, *x2; struct operand o; int n; @@ -1759,8 +1759,8 @@ clhidetask (void) void clwait (void) { - register struct pfile *pfp; - register int n, jn; + struct pfile *pfp; + int n, jn; struct operand o; pfp = newtask->t_pfp; @@ -1789,8 +1789,8 @@ clwait (void) void cljobs (void) { - register struct pfile *pfp; - register int n, jn; + struct pfile *pfp; + int n, jn; struct operand o; pfp = newtask->t_pfp; @@ -1868,7 +1868,7 @@ clclear (void) void clsleep (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; pfp = newtask->t_pfp; @@ -1896,7 +1896,7 @@ clsleep (void) void cledit (void) { - register struct pfile *pfp; + struct pfile *pfp; char oscmd[SZ_LINE], os_filelist[SZ_LINE]; char osfn[SZ_PATHNAME]; struct operand o; @@ -1936,8 +1936,8 @@ cledit (void) void clallocate (void) { - register struct pfile *pfp; - register int n; + struct pfile *pfp; + int n; static char noalloc[] = "cannot allocate device %s"; struct operand o; char device[SZ_FNAME+1]; @@ -2000,8 +2000,8 @@ clallocate (void) void cldeallocate (void) { - register struct pfile *pfp; - register int n; + struct pfile *pfp; + int n; static char nodealloc[] = "cannot deallocate device %s"; struct operand o; char device[SZ_FNAME+1]; @@ -2064,7 +2064,7 @@ cldeallocate (void) void cldevstatus (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; char device[SZ_FNAME+1]; @@ -2095,7 +2095,7 @@ cldevstatus (void) * b_f. Setting LT_INVIS will keep it from being seen in the menu. */ void -setbuiltins (register struct package *pkp) +setbuiltins (struct package *pkp) { /* Debugging functions are in debug.c. */ @@ -2184,7 +2184,7 @@ setbuiltins (register struct package *pkp) { "_devstatus", cldevstatus, LT_INVIS}, }; - register struct builtin *bp; + struct builtin *bp; for (bp = btbl; bp < &btbl[sizeof(btbl)/sizeof(struct builtin)]; bp++) newbuiltin (pkp, bp->b_name, bp->b_f, bp->b_flags, "", 0); @@ -2207,7 +2207,7 @@ newbuiltin ( int redef /* permit redefinitions */ ) { - register struct ltask *newltp; + struct ltask *newltp; newltp = addltask (pkp, NULL, lname, redef); @@ -2231,12 +2231,12 @@ newbuiltin ( */ int mkarglist ( - register struct pfile *pfp, /* pfile pointer */ + struct pfile *pfp, /* pfile pointer */ char *args, /* string buffer for arg chars */ char *argp[] /* array of arg pointers */ ) { - register char *ip, *op; + char *ip, *op; struct operand o_v, o_n; int argc, n; @@ -2286,7 +2286,7 @@ mkarglist ( * a builtin will be accessed right-to-left. */ void -pushfparams (register struct param *pp) +pushfparams (struct param *pp) { struct operand onam; @@ -2360,7 +2360,7 @@ nargs (struct pfile *pfp) * referenced task terminates. */ void -keep (register struct task *tp) +keep (struct task *tp) { if (cldebug) { eprintf ("currentask: %d, prevtask: %d\n",currentask,prevtask); diff --git a/pkg/cl/clsystem.c b/pkg/cl/clsystem.c index afa6889ba..8fd62eb89 100644 --- a/pkg/cl/clsystem.c +++ b/pkg/cl/clsystem.c @@ -21,8 +21,8 @@ clsystem ( FILE *taskerr /* stderr of task */ ) { - register char *ip; - register int ch; + char *ip; + int ch; char outfile[SZ_PATHNAME], errfile[SZ_PATHNAME]; FILE *fp; diff --git a/pkg/cl/compile.c b/pkg/cl/compile.c index 87d2f46b5..ee8b0c952 100644 --- a/pkg/cl/compile.c +++ b/pkg/cl/compile.c @@ -42,8 +42,8 @@ extern int cldebug; int compile (int opcode, ...) { - register struct codeentry *cep; - register int status = OK; + struct codeentry *cep; + int status = OK; va_list argp; @@ -91,7 +91,7 @@ compile (int opcode, ...) * the operand and change o_val.v_s to point to it. */ case PUSHCONST: { - register memel *argsaddr; + memel *argsaddr; struct operand *op, *dp; op = va_arg (argp, struct operand *); @@ -208,9 +208,9 @@ compile (int opcode, ...) * (comdstr() should be used to copy a string into the dictionary) */ int -comstr (register char *s, memel *loc) +comstr (char *s, memel *loc) { - register char *to, *from; + char *to, *from; from = to = (char *)loc; while ( (*to++ = *s++) ) diff --git a/pkg/cl/debug.c b/pkg/cl/debug.c index 3377dcec2..00c63a388 100644 --- a/pkg/cl/debug.c +++ b/pkg/cl/debug.c @@ -40,9 +40,9 @@ static void dd_f(char *msg, char *fname); * instructions. Done directly. */ void -d_stack (register XINT locpc, int ss) +d_stack (XINT locpc, int ss) { - register struct codeentry *cep; + struct codeentry *cep; int n, opcode, errs = 0; do { @@ -66,9 +66,9 @@ d_stack (register XINT locpc, int ss) * the instruction in memel is returned as the function value. */ int -d_instr (FILE *fp, char *prefix, register XINT locpc) +d_instr (FILE *fp, char *prefix, XINT locpc) { - register struct codeentry *cep; + struct codeentry *cep; int opcode, extra=0; cep = coderef (locpc); @@ -235,9 +235,9 @@ d_d (void) void d_p (void) { - register struct pfile *pfp; - register struct param *pp; - register FILE *fp; + struct pfile *pfp; + struct param *pp; + FILE *fp; int flags; fp = currentask->t_stderr; @@ -294,8 +294,8 @@ d_t (void) void d_l (void) { - register struct package *pkp; - register struct ltask *ltp; + struct package *pkp; + struct ltask *ltp; int flags; eprintf ("loaded packages -\n"); @@ -394,7 +394,7 @@ e_dumpop (void) void d_fmtmsg (FILE *fp, char *prefix, char *message, int width) { - register char *ip, *op, *cp; + char *ip, *op, *cp; char lbuf[SZ_COMMAND], obuf[SZ_COMMAND]; int len_prefix, nchars; diff --git a/pkg/cl/decl.c b/pkg/cl/decl.c index f16439dcd..37ad57651 100644 --- a/pkg/cl/decl.c +++ b/pkg/cl/decl.c @@ -105,7 +105,7 @@ get_dim (char *pname) int maketype (int type, int list) { - register int p = -1; + int p = -1; switch (type) { case V_BOOL: p = OT_BOOL; @@ -550,11 +550,11 @@ scanmin ( */ int scanenum ( - register struct param *pp, - register struct operand *o + struct param *pp, + struct operand *o ) { - register int bastype; + int bastype; bastype = pp->p_type & OT_BASIC; diff --git a/pkg/cl/edcap.c b/pkg/cl/edcap.c index c7b903346..1821cef9b 100644 --- a/pkg/cl/edcap.c +++ b/pkg/cl/edcap.c @@ -49,7 +49,7 @@ static void map_escapes(char *input, char *output); void edtinit (void) { - register int i; + int i; char editor[SZ_FNAME]; /* the name of the editor */ /* See if the current editor is the one to use. If not, get the @@ -244,9 +244,9 @@ map_escapes ( { static char *echars = "befnrt"; static char *ecodes = "\b\033\f\n\r\t"; - register char *ip = input; - register char *op = output; - register int n; + char *ip = input; + char *op = output; + int n; while (*ip != '\0') { if (*ip == '\\') { @@ -285,7 +285,7 @@ what_cmd ( int first_char /* the first unprintable character */ ) { - register int nchars, k; + int nchars, k; char cmd_string[9]; char *cmd; diff --git a/pkg/cl/eparam.c b/pkg/cl/eparam.c index 25d778e08..d61382ebb 100644 --- a/pkg/cl/eparam.c +++ b/pkg/cl/eparam.c @@ -92,7 +92,7 @@ int eh_standout = YES; /* ehist default for standout */ int eh_bol = NO; /* start ehist at beginning of line */ int eh_verify = NO; /* use ehist with history meta-chars */ -char *e_tonextword(register char *ip), *e_toprevword(char *ip, char *string); +char *e_tonextword(char *ip), *e_toprevword(char *ip, char *string); int eparam (struct ep_context *cx, int *update, int *nextcmd, char *nextpset); @@ -293,8 +293,8 @@ e_makelist ( struct pfile *pfileptr ) { - register struct param *pp; - register char c, *p; + struct param *pp; + char c, *p; int numnew; /* number of newlines */ int totlines; /* count of current total lines */ @@ -616,8 +616,8 @@ char *p; char *bp; int indent; { - register int i; - register char c; + int i; + char c; while ((*bp++ = c = *p++) != '\0') if (c == '\n') @@ -722,7 +722,7 @@ e_check_vals ( if (isarray) { char outstring[G_MAXSTRING]; - char *in, *e_getfield(register char *ip, char *outstr, int maxch); + char *in, *e_getfield(char *ip, char *outstr, int maxch); int first, nelem, flen; /* Get the length of the first dimension, and the starting point. @@ -791,10 +791,10 @@ e_check_vals ( */ int e_undef ( - register char *s + char *s ) { - register int n = 0; + int n = 0; for (; (*s != '*') && (*s != '\0'); s++) ; @@ -848,7 +848,7 @@ e_rpterror ( void e_clrerror (void) { - register int i, len; + int i, len; len = strlen (message); @@ -874,12 +874,12 @@ e_clrerror (void) */ char * e_getfield ( - register char *ip, /* pointer into input string */ + char *ip, /* pointer into input string */ char *outstr, /* receives token */ int maxch /* max chars out */ ) { - register char *op, *otop; + char *op, *otop; while (*ip == ' ' || *ip == ',') ip++; @@ -900,7 +900,7 @@ e_getfield ( */ int e_moreflag ( - register int topkey + int topkey ) { if ((numkeys == botkey) && (topkey == 1)) @@ -937,7 +937,7 @@ e_moreflag ( int e_scrollit (void) { - register int i; + int i; if (nextline == cmdline) { ; @@ -1593,8 +1593,8 @@ e_ttyinit (void) int e_colon (void) { - register char *ip, *op; - register int ch; + char *ip, *op; + int ch; char buf[SZ_LINE+1], *pset; struct param *pp; int ucasein_set; @@ -1800,7 +1800,7 @@ e_psetok ( char *pset ) { - register struct pfile *pfp; + struct pfile *pfp; char errmsg[SZ_LINE+1], *errfmt, *errarg; XINT save_topd; @@ -1985,7 +1985,7 @@ e_movedown ( */ char * e_tonextword ( - register char *ip + char *ip ) { ip++; @@ -2066,8 +2066,8 @@ e_putline ( char *stwing ) { - register char *ip, *op; - register int ch, n; + char *ip, *op; + int ch, n; char obuf[512]; int map_cc=0; @@ -2141,7 +2141,7 @@ e_displayml ( int ccol /* start col of continuation lines */ ) { - register char *ip, *op; + char *ip, *op; char lbuf[512], *line; int ocol; diff --git a/pkg/cl/eparam.h b/pkg/cl/eparam.h index 32ada4462..5e4233501 100644 --- a/pkg/cl/eparam.h +++ b/pkg/cl/eparam.h @@ -104,5 +104,5 @@ extern struct edit_commands command[MAX_COMMANDS]; extern char *cmdnames[MAX_COMMANDS]; extern int numcommands; -char *enumin(register struct param *pp), *minmax(register struct param *pp); +char *enumin(struct param *pp), *minmax(struct param *pp); char *host_editor(char *editor); diff --git a/pkg/cl/errs.c b/pkg/cl/errs.c index 82de2ae3d..e94d244c5 100644 --- a/pkg/cl/errs.c +++ b/pkg/cl/errs.c @@ -102,7 +102,7 @@ void cl_error (int errtype, char *diagstr, ...) { va_list args; - register struct task *tp; + struct task *tp; static int nfatal = 0; static int break_locks = 1; diff --git a/pkg/cl/exec.c b/pkg/cl/exec.c index 35e4b1d9a..11682d6f3 100644 --- a/pkg/cl/exec.c +++ b/pkg/cl/exec.c @@ -56,8 +56,8 @@ extern int loggingout; /* in the process of logging out */ void run (void) { - register struct codeentry *cp; - register int opcode; + struct codeentry *cp; + int opcode; if (cltrace) eprintf ("\t----- task %s -----\n", @@ -156,7 +156,7 @@ callnewtask (char *name) } else { if (ltp->lt_flags & LT_PFILE) { - register struct pfile *pfp; + struct pfile *pfp; /* This task has a real pfile. read in if not already in * core. Copy if not already one and not just cl. @@ -173,7 +173,7 @@ callnewtask (char *name) * head of the list, pointed to by the task descriptor. */ if (pfp->pf_flags & PF_PSETREF) { - register struct param *pp; + struct param *pp; struct operand o; char *pset; @@ -250,7 +250,7 @@ void execnewtask (void) { /* VMS C V2.1 cannot handle this (see below). - * register struct pfile *pfp; + * struct pfile *pfp; */ static struct pfile *pfp; @@ -521,7 +521,7 @@ mk_startupmsg ( int maxch /* max chars out */ ) { - register char *ip, *op, *cp; + char *ip, *op, *cp; struct pfile *pfp; struct operand o; struct param *pp; @@ -781,9 +781,9 @@ findexe ( * control stack but continue reading from the current command stream. */ void -set_clio (register struct task *newtask) +set_clio (struct task *newtask) { - register struct task *tp; + struct task *tp; if ((newtask->t_stdin == currentask->t_stdin) && (currentask->t_in != stdin)) { @@ -927,9 +927,9 @@ psetreload ( * it might call us again and cause an inf. loop. */ void -iofinish (register struct task *tp) +iofinish (struct task *tp) { - register FILE *fp; + FILE *fp; int flags; flags = tp->t_flags; @@ -1019,10 +1019,10 @@ void restor (struct task *tp) { memel *topdp; - register struct ltask *ltp; - register struct package *pkp; - register struct param *pp; - register struct pfile *pfp; + struct ltask *ltp; + struct package *pkp; + struct param *pp; + struct pfile *pfp; struct param *last_pp; int n; @@ -1161,8 +1161,8 @@ restor (struct task *tp) void oneof (void) { - register struct pfile *pfp; - register struct package *pkp; + struct pfile *pfp; + struct package *pkp; static int nerrs = 0; int flags; @@ -1213,7 +1213,7 @@ oneof (void) void printcall (FILE *fp, struct task *tp) { - register struct param *pp; + struct param *pp; int notfirst = 0; fprintf (fp, " %s (", tp->t_ltp->lt_lname); @@ -1249,7 +1249,7 @@ printcall (FILE *fp, struct task *tp) * again. */ void -killtask (register struct task *tp) +killtask (struct task *tp) { char buf[128]; diff --git a/pkg/cl/gquery.c b/pkg/cl/gquery.c index 521daa5e6..95719789b 100644 --- a/pkg/cl/gquery.c +++ b/pkg/cl/gquery.c @@ -36,7 +36,7 @@ static char *e2 = "Parameter value is out of range"; char * gquery (struct param *pp, char *string) { - register char *ip; + char *ip; char buf[SZ_LINE]; char *query_status, *nlp, *errmsg; int arrflag=0, offset=0, bastype=0, batch=0; @@ -144,7 +144,7 @@ gquery (struct param *pp, char *string) /* MINMAX -- Format the minimum and maximum values of a parameter, if any. */ char * -minmax (register struct param *pp) +minmax (struct param *pp) { static char message[SZ_LINE]; @@ -180,7 +180,7 @@ minmax (register struct param *pp) /* ENUMIN -- Format the enumeration string for a parameter. */ char * -enumin (register struct param *pp) +enumin (struct param *pp) { static char message[SZ_LINE]; diff --git a/pkg/cl/gram.c b/pkg/cl/gram.c index 9199d2933..3b013c71c 100644 --- a/pkg/cl/gram.c +++ b/pkg/cl/gram.c @@ -90,7 +90,7 @@ yyerror (char *s) void rerun (void) { - register struct codeentry *cp; + struct codeentry *cp; do { cp = coderef (pc); @@ -159,7 +159,7 @@ crackident (char *s) { "", 0, 0 } }; - register struct keywords *kp; + struct keywords *kp; XINT oldtopd; static char sch, kch; /* static storage is faster here */ char *scopy; /* non-makelower'd copy */ @@ -242,7 +242,7 @@ crackident (char *s) XINT addconst (char *s, int t) { - register struct operand *op; + struct operand *op; XINT lasttopd; lasttopd = topd; /* could just derefenece op */ @@ -270,7 +270,7 @@ addconst (char *s, int t) void listparams (struct pfile *pfp) { - register struct param *pp; + struct param *pp; for (pp = pfp->pf_pp; pp != NULL; pp = pp->p_np) if (!(pp->p_mode & M_HIDDEN)) @@ -289,7 +289,7 @@ listparams (struct pfile *pfp) void pretty_param (struct param *pp, FILE *fp) { - register char ch, *p; + char ch, *p; char buf[SZ_LINE]; int nchars, maxch; @@ -404,8 +404,8 @@ pretty_param (struct param *pp, FILE *fp) void dumpparams (struct pfile *pfp) { - register struct param *pp; - register FILE *fp = currentask->t_stdout; + struct param *pp; + FILE *fp = currentask->t_stdout; for (pp = pfp->pf_pp; pp != NULL; pp = pp->p_np) if (!(pp->p_mode & M_HIDDEN)) @@ -457,8 +457,8 @@ void listhelp (struct package *pkp, int show_invis) { static int first_col=7, maxch=20, ncol=0; - register struct ltask *ltp; - register char *ip, *op; + struct ltask *ltp; + char *ip, *op; char buf[4096], *list[MAXMENU]; int nltask, last_col; @@ -508,7 +508,7 @@ listhelp (struct package *pkp, int show_invis) void listallhelp (int show_invis) { - register struct package *pkp; + struct package *pkp; pkp = curpack; do { @@ -544,8 +544,8 @@ listallhelp (int show_invis) void breakout (char *full, char **pk, char **t, char **p, char **f) { - register char *cp; - register int npts, n; + char *cp; + int npts, n; char *pts[3]; static char buffer[SZ_LINE+1]; @@ -610,7 +610,7 @@ breakout (char *full, char **pk, char **t, char **p, char **f) * (and abbrevs are enabled). */ int -fieldcvt (register char *f) +fieldcvt (char *f) { /* Field name and corresponding code tables. */ @@ -652,10 +652,10 @@ fieldcvt (register char *f) * at which s matched. */ int -keyword (register char *tbl[], register char *s) +keyword (char *tbl[], char *s) { - register int i; - register char *kentry; + int i; + char *kentry; int cand, len; i = 0; @@ -912,9 +912,9 @@ getpipe (void) * deleted and the pipestack is cleared (i.e., during error recovery). */ void -delpipes (register int npipes) +delpipes (int npipes) { - register int pipe; + int pipe; if (npipes == 0) { while (nextpipe > 0) @@ -1292,7 +1292,7 @@ y_typedef (char *key) void p_position (void) { - register int i; + int i; eprintf ("**: %s ", cmdblk); /* '\n' in cmdblk */ diff --git a/pkg/cl/grammar.l b/pkg/cl/grammar.l index 9a809ade1..4b73608da 100644 --- a/pkg/cl/grammar.l +++ b/pkg/cl/grammar.l @@ -21,7 +21,7 @@ A [a-zA-Z] * '!'. Let clsystem decide what to do with null cmd. * Must precede the "!" YOP_NOT spec in this file. */ - register char *cp; + char *cp; for (cp = yytext; *cp++ != '!'; ) ; yylval = addconst (cp, OT_STRING); @@ -145,7 +145,7 @@ A [a-zA-Z] traverse (delim) char delim; { - register char *op, *cp, ch; + char *op, *cp, ch; static char *esc_ch = "ntfr\\\"'"; static char *esc_val = "\n\t\f\r\\\"\'"; diff --git a/pkg/cl/history.c b/pkg/cl/history.c index f82ae8688..639bbc269 100644 --- a/pkg/cl/history.c +++ b/pkg/cl/history.c @@ -74,7 +74,7 @@ extern char *ifseen; /* Processing an IF statement? */ int yy_getc (FILE *fp) { - register char ch; + char ch; while ((ch = *ip_cmdblk++) == EOS) if (get_command (fp) == EOF) { @@ -97,7 +97,7 @@ yy_getc (FILE *fp) void yy_startblock (int logflag) { - register char *ip; + char *ip; if (cldebug) eprintf ("startblock (%d)\n", logflag); @@ -166,7 +166,7 @@ curcmd (void) int get_command (FILE *fp) { - register char *ip, *op; + char *ip, *op; char raw_cmd[SZ_LINE+1]; /* buffer for raw command line */ char new_cmd[SZ_CMDBLK+1]; /* temporary for processed cmd */ int execute=1, temp, status; @@ -355,7 +355,7 @@ get_command (FILE *fp) int process_history_directive (char *directive, char *new_command_block) { - register char *ip, *op, *p; + char *ip, *op, *p; char last_command_block[SZ_CMDBLK+1]; int execute=1, edit=0; int record; @@ -436,7 +436,7 @@ process_history_directive (char *directive, char *new_command_block) int search_history (char *directive, char *new_command_block) { - register char *ip, *op, *p; + char *ip, *op, *p; char pattern[SZ_FNAME]; int match_only_at_bol=1, record, patlen; @@ -514,7 +514,7 @@ stredit ( char *out_text /* buffer for output text */ ) { - register char *ip, *op, *pp; + char *ip, *op, *pp; char metacharacter; char pattern[SZ_LINE+1], text[SZ_LINE+1]; int replace_all_occurrences=0; @@ -614,7 +614,7 @@ stredit ( int expand_history_macros (char *in_text, char *out_text) { - register char *ip, *op, *ap; + char *ip, *op, *ap; char cmdblk[SZ_CMDBLK+1], *argp[100]; int nargs=0, nrep=0, argno=0, have_arg_strings=0; @@ -702,8 +702,8 @@ get_arglist ( char *argp[] /* receives argument pointers */ ) { - register char *cp; - register int nargs; + char *cp; + int nargs; for (cp=cmdblk, nargs=0; *cp != EOS; ) { /* Advance to next token; convert newline to EOS. */ @@ -736,7 +736,7 @@ get_arglist ( void put_history (char *command) { - register char *ip, *op, *otop; + char *ip, *op, *otop; /* Make sure there is exactly one newline at the end of the command. */ for (ip = command + strlen(command) - 1; ip >= command; --ip) @@ -788,8 +788,8 @@ get_history (int record, char *command, int maxch) void fetch_history (char *recptr, char *command, int maxch) { - register char *ip, *op, *itop; - register int n; + char *ip, *op, *itop; + int n; itop = histbuf + SZ_HISTBUF; ip = recptr; @@ -818,7 +818,7 @@ fetch_history (char *recptr, char *command, int maxch) char * find_history (int record) { - register char *ip, *op, *bufptr; + char *ip, *op, *bufptr; static int current_record = 0; static char *recptr, *old_ophist = NULL; @@ -915,7 +915,7 @@ show_history (FILE *fp, int max_commands) * if menus() are enabled and a new package has been invoked. */ void -pprompt (register char *string) +pprompt (char *string) { static struct package *lastpack = NULL; @@ -993,7 +993,7 @@ open_logfile (char *fname) void close_logfile (char *fname) { - register FILE *fp; + FILE *fp; if (logfp != NULL) { if (share_logfile) { @@ -1031,13 +1031,13 @@ reset_logfile (void) */ void print_command ( - register FILE *fp, + FILE *fp, char *command, char *marg1, char *marg2 /* margin strings of first and subseq. cmds */ ) { - register char *ip; + char *ip; fprintf (fp, marg1); for (ip=command; *ip != EOS; ip++) { @@ -1079,8 +1079,8 @@ putlog ( char *usermsg ) { - register char *ip, *op, *otop; - register int n; + char *ip, *op, *otop; + int n; char msg[SZ_LOGBUF], job[5]; char *pkg, *tname, *today(void); extern int bkgno; /* job number if bkg job */ diff --git a/pkg/cl/lexicon.c b/pkg/cl/lexicon.c index 18093bb7c..6b821fbfb 100644 --- a/pkg/cl/lexicon.c +++ b/pkg/cl/lexicon.c @@ -40,7 +40,7 @@ int lhs; /* "left hand side" switch for [] */ int yylex (void) { - register int token; + int token; if (_lexmodes && parenlevel == 0 && bracelevel < PBRACE) { while (!(token = lexicon())) @@ -146,8 +146,8 @@ int lexicon (void) { char *bkgerr = "ERROR: cannot submit background job inside {}\n"; - register int ch, cch; - register int token; + int ch, cch; + int token; int stringtok = 1, identifier = 1, setlevel = 0; int clswitch; char *op; diff --git a/pkg/cl/lexyy.c b/pkg/cl/lexyy.c index 5f13d41fc..359e37866 100644 --- a/pkg/cl/lexyy.c +++ b/pkg/cl/lexyy.c @@ -60,7 +60,7 @@ case 4: * '!'. Let clsystem decide what to do with null cmd. * Must precede the "!" YOP_NOT spec in this file. */ - register char *cp; + char *cp; for (cp = yytext; *cp++ != '!'; ) ; yylval = addconst (cp, OT_STRING); @@ -240,7 +240,7 @@ fprintf(yyout,"bad switch yylook %d",nstr); int traverse (int delim) { - register char *op, *cp, ch; + char *op, *cp, ch; static char *esc_ch = "ntfr\\\"'"; static char *esc_val = "\n\t\f\r\\\"\'"; @@ -731,8 +731,8 @@ extern struct yysvf *yyestate; int yyprevious = YYNEWLINE; int yylook (void){ - register struct yysvf *yystate, **lsp; - register struct yywork *yyt; + struct yysvf *yystate, **lsp; + struct yywork *yyt; struct yysvf *yyz; int yych, yyfirst; struct yywork *yyr; diff --git a/pkg/cl/lists.c b/pkg/cl/lists.c index 56ab5f577..508141f8a 100644 --- a/pkg/cl/lists.c +++ b/pkg/cl/lists.c @@ -113,7 +113,7 @@ again: fgets (line, SZ_LINE, pp->p_listfp); * already closed and that we're not closing the real stdin. */ void -closelist (register struct param *pp) +closelist (struct param *pp) { if (pp->p_listfp != NULL) { if (pp->p_listfp != stdin) diff --git a/pkg/cl/main.c b/pkg/cl/main.c index 36ba3ef01..b6aa678f8 100644 --- a/pkg/cl/main.c +++ b/pkg/cl/main.c @@ -344,8 +344,8 @@ execute (int mode) static void login (char *cmd) { - register struct task *tp; - register char *ip, *op; + struct task *tp; + char *ip, *op; struct ltask *ltp; struct operand o; char loginfile[SZ_PATHNAME]; @@ -514,7 +514,7 @@ login (char *cmd) static void logout (void) { - register struct task *tp; + struct task *tp; char logoutfile[SZ_PATHNAME]; FILE *fp; @@ -697,9 +697,9 @@ onerr (void) */ void cl_amovi ( - register int *ip, - register int *op, - register int len + int *ip, + int *op, + int len ) { while (--len) diff --git a/pkg/cl/modes.c b/pkg/cl/modes.c index 540e4b62e..99857b29f 100644 --- a/pkg/cl/modes.c +++ b/pkg/cl/modes.c @@ -73,7 +73,7 @@ effmode (struct param *pp) static char *localerr = "Attempt to access undefined local variable `%s'.\n"; - register int mode, modebits; + int mode, modebits; struct operand o; int clmode, ltmode, pkmode, offset; int interactive; @@ -192,9 +192,9 @@ effmode (struct param *pp) /* TASKMODE -- Determine the effective mode for a task. */ int -taskmode (register struct task *tp) +taskmode (struct task *tp) { - register int modebits, mode; + int modebits, mode; struct pfile *pfp; int clmode, pkmode, ltmode; int interactive, learn; @@ -264,12 +264,12 @@ query (struct param *pp) { static char *oormsg = "ERROR: Parameter value is out of range; try again"; - register char *ip; + char *ip; char buf[SZ_PROMPTBUF+1]; struct operand o; int bastype, batch, arrflag, offset=0, n_ele, max_ele, fd; char *nlp, *nextstr(char **pbuf, FILE *fp); - char *bkg_query(char *obuf, int maxch, register struct param *pp), *query_status; + char *bkg_query(char *obuf, int maxch, struct param *pp), *query_status; char *abuf; bastype = pp->p_type & OT_BASIC; @@ -646,7 +646,7 @@ nxtchr (char *p, FILE *fp) /* PQUERY -- Print the query message. */ void -pquery (register struct param *pp, FILE *fp) +pquery (struct param *pp, FILE *fp) { struct operand o; int offset=0, arrflag=0; @@ -746,7 +746,7 @@ char * bkg_query ( char *obuf, /* same calling sequence as 'fgets' */ int maxch, - register struct param *pp + struct param *pp ) { char bqfile[SZ_PATHNAME], qrfile[SZ_PATHNAME]; @@ -812,7 +812,7 @@ service_bkgquery ( int bkgno /* ordinal of job requiring service */ ) { - register int ch; + int ch; char bqfile[SZ_PATHNAME], qrfile[SZ_PATHNAME]; char qrtemp[SZ_PATHNAME]; char response[SZ_LINE+1]; @@ -890,9 +890,9 @@ get_bkgqfiles (int bkgno, int pid, char *bkg_query_file, char *query_response_fi * This routine uses binexp() and thus the operand stack. */ int -inrange (register struct param *pp, register struct operand *op) +inrange (struct param *pp, struct operand *op) { - register int fulltype, bastype; + int fulltype, bastype; struct operand omin, test; fulltype = pp->p_type; @@ -1046,8 +1046,8 @@ range_check (struct param *pp) void setclmodes (struct task *tp) { - register struct param *pp; - register char *name; + struct param *pp; + char *name; int bastype; clabbrev = clmenus = clshowtype = clkeeplog = cllexmodes = cllogfile = @@ -1109,7 +1109,7 @@ setclmodes (struct task *tp) void parse_clmodes (struct param *pp, struct operand *newval) { - register char *name, *ip; + char *name, *ip; name = pp->p_name; diff --git a/pkg/cl/opcodes.c b/pkg/cl/opcodes.c index 502dd3393..aec764c8f 100644 --- a/pkg/cl/opcodes.c +++ b/pkg/cl/opcodes.c @@ -922,8 +922,8 @@ o_redirin (memel *argp) void o_gsredir (memel *argp) { - register char *ip; - register FILE *fp; + char *ip; + FILE *fp; char *streams = (char *)argp; struct operand o; char *fname; @@ -1242,8 +1242,8 @@ o_doswitch ( void o_swoff (memel *argp) { - register char *pname = (char *)argp; - register struct param *pp; + char *pname = (char *)argp; + struct param *pp; struct operand o; struct pfile *pfp; char *pk, *t, *p, *f; @@ -1271,8 +1271,8 @@ o_swoff (memel *argp) void o_swon (memel *argp) { - register char *pname = (char *)argp; - register struct param *pp; + char *pname = (char *)argp; + struct param *pp; struct pfile *pfp; struct operand o; char *pk, *t, *p, *f; @@ -1309,7 +1309,7 @@ o_swon (memel *argp) void o_fixlanguage (memel *argp) { - register struct ltask *ltp; + struct ltask *ltp; ltp = ltasksrch (CLPACKAGE, ROOTPACKAGE); ltp->lt_flags |= (LT_PACCL|LT_CL); diff --git a/pkg/cl/operand.c b/pkg/cl/operand.c index af2b64b50..2727b129e 100644 --- a/pkg/cl/operand.c +++ b/pkg/cl/operand.c @@ -38,9 +38,9 @@ extern char *epsilonstr; /* SPROP -- Format the value of a parameter into the output string. */ void -sprop (register char *outstr, register struct operand *op) +sprop (char *outstr, struct operand *op) { - register int type; + int type; if (opundef (op)) cl_error (E_IERR, "can not print an undefined operand"); @@ -296,8 +296,8 @@ opcast (int newtype) struct operand makeop (char *str, int type) { - register char *s, *ip; - register char c; + char *s, *ip; + char c; char *format; char hexnum[MAX_DIGITS]; char firstchar; diff --git a/pkg/cl/param.c b/pkg/cl/param.c index a1f02968b..5c1b2d3bd 100644 --- a/pkg/cl/param.c +++ b/pkg/cl/param.c @@ -51,8 +51,8 @@ char *loc_field = "Attempt to access undefined field in local variable %s.\n"; struct param * paramfind (struct pfile *pfp, char *pname, int pos, int exact) { - register char first_char; - register struct param *pp; + char first_char; + struct param *pp; struct ltask *ltp; if (pfp == NULL) @@ -139,7 +139,7 @@ paramfind (struct pfile *pfp, char *pname, int pos, int exact) * order of interpolator (3|5|7) (5): */ void -paramset (register struct param *pp, char field) +paramset (struct param *pp, char field) { struct operand o; int bastype; /* OT_BASIC portion of p_type */ @@ -359,7 +359,7 @@ paramset (register struct param *pp, char field) * or if pp is out of range. Call error if return value would be undefined. */ void -validparamget (register struct param *pp, char field) +validparamget (struct param *pp, char field) { struct operand o; @@ -380,7 +380,7 @@ validparamget (register struct param *pp, char field) * is out of range. Value returned may be undefined. */ void -paramget (register struct param *pp, char field) +paramget (struct param *pp, char field) { char mode[5]; /* used to turn bits into string */ struct operand result; @@ -635,7 +635,7 @@ paramget (register struct param *pp, char field) void makemode (struct param *pp, char *s) { - register int m = pp->p_mode; + int m = pp->p_mode; if (m & M_AUTO) *s++ = PF_AUTO; @@ -659,7 +659,7 @@ makemode (struct param *pp, char *s) struct param * newparam (struct pfile *pfp) { - register struct param *newpp; + struct param *newpp; newpp = (struct param *) memneed (PARAMSIZ); @@ -704,7 +704,7 @@ newparam (struct pfile *pfp) struct param * paramsrch (char *pkname, char *ltname, char *pname) { - register struct param *pp; + struct param *pp; struct pfile *pfp; struct param *lookup_param(char *pkname, char *ltname, char *pname); @@ -797,9 +797,9 @@ defvar (char *envvar) struct param * lookup_param (char *pkname, char *ltname, char *pname) { - register struct param *pp; - register struct package *pkp; - register struct ltask *ltp; + struct param *pp; + struct package *pkp; + struct ltask *ltp; struct pfile *pfp; struct pfile *pfiles[64]; struct param *candidate; @@ -934,10 +934,10 @@ lookup_param (char *pkname, char *ltname, char *pname) * Don't call error() so caller can have a chance to close the file. */ int -printparam (struct param *pp, register FILE *fp) +printparam (struct param *pp, FILE *fp) { - register int type, bastype; - register char *bp; + int type, bastype; + char *bp; char buf[20]; int arrflag; int size_arr=0; @@ -1187,9 +1187,9 @@ printparam (struct param *pp, register FILE *fp) * sequences, so that they can later be read back in unmodified. */ void -qputs (register char *str, register FILE *fp) +qputs (char *str, FILE *fp) { - register char ch; + char ch; fputc ('"', fp); while ((ch = *str++) != '\0') { @@ -1263,7 +1263,7 @@ newfakeparam ( int string_len /* if new param is type string, size of string */ ) { - register struct param *pp; + struct param *pp; pp = newparam (pfp); if (name == NULL || *name == '\0') { diff --git a/pkg/cl/param.h b/pkg/cl/param.h index 728b8f05e..1039c2d17 100644 --- a/pkg/cl/param.h +++ b/pkg/cl/param.h @@ -201,7 +201,7 @@ struct pfile { char *nextfield(char **pp, FILE *fp); /* cracks next pfile line field */ -char *makelower(register char *cp); /* upper to lower, in place and return */ +char *makelower(char *cp); /* upper to lower, in place and return */ struct param *paramfind(struct pfile *pfp, char *pname, int pos, int exact); /* searches for a param on a given pfile*/ struct param *paramsrch(char *pkname, char *ltname, char *pname); /* search, make sure param is there */ @@ -210,11 +210,11 @@ struct param *newparam(struct pfile *pfp); /* allocate and link a new param */ struct param *addparam(struct pfile *pfp, char *buf, FILE *fp); /* make a new param off given pfile */ struct param *newfakeparam(struct pfile *pfp, char *name, int pos, int type, int string_len); /* add a fake param to pfile */ struct pfile *pfilesrch(char *pfilepath); /* read named pfile or ltask pfile */ -struct pfile *pfileload(register struct ltask *ltp); /* load pfile for ltask into memory */ +struct pfile *pfileload(struct ltask *ltp); /* load pfile for ltask into memory */ struct pfile *pfileread(struct ltask *ltp, char *pfilename, int checkmode); /* read and make params from a pfile */ -struct pfile *pfilefind(register struct ltask *ltp); /* look for pfile with given name */ +struct pfile *pfilefind(struct ltask *ltp); /* look for pfile with given name */ struct pfile *newpfile(struct ltask *ltp); /* add a new pfile off parhead */ -struct pfile *pfilecopy(register struct pfile *pfp); /* make an in-core copy of a pfile */ +struct pfile *pfilecopy(struct pfile *pfp); /* make an in-core copy of a pfile */ int defpar(char *param_spec); /* determine whether param exists */ int defvar(char *envvar); /* determine whether envvar exists */ diff --git a/pkg/cl/pfiles.c b/pkg/cl/pfiles.c index 7408f9549..1a9108bbf 100644 --- a/pkg/cl/pfiles.c +++ b/pkg/cl/pfiles.c @@ -43,7 +43,7 @@ newpfile ( struct ltask *ltp /* ltask descriptor */ ) { - register struct pfile *pfp, *head_pfp; + struct pfile *pfp, *head_pfp; pfp = (struct pfile *) memneed (PFILESIZ); head_pfp = reference (pfile, parhead); @@ -69,10 +69,10 @@ newpfile ( */ void pfileunlink ( - register struct pfile *pfp /* pfile to be unlinked */ + struct pfile *pfp /* pfile to be unlinked */ ) { - register struct pfile *npf; + struct pfile *npf; if ((npf = reference (pfile, parhead)) == pfp) parhead = dereference (pfp->pf_npf); @@ -95,10 +95,10 @@ pfileunlink ( */ struct pfile * pfilefind ( - register struct ltask *ltp /* ltask descriptor */ + struct ltask *ltp /* ltask descriptor */ ) { - register struct pfile *pfp; + struct pfile *pfp; for (pfp = reference (pfile, parhead); pfp != NULL; pfp = pfp->pf_npf) if (pfp->pf_ltp == ltp) @@ -154,12 +154,12 @@ pfilesrch ( */ struct pfile * pfileload ( - register struct ltask *ltp /* ltask descriptor */ + struct ltask *ltp /* ltask descriptor */ ) { static long sys_ftime = 0; - register struct task *tp; - register struct param *pp; + struct task *tp; + struct param *pp; char usr_pfile[SZ_FNAME+1]; char pkg_pfile[SZ_FNAME+1]; char pkgdir[SZ_FNAME+1]; @@ -321,7 +321,7 @@ pfilemerge ( char *opfile /* old parameter file */ ) { - register struct param *o_pp, *n_pp, *l_pp; + struct param *o_pp, *n_pp, *l_pp; int bastype; XINT save_topd; struct pfile *opf; @@ -456,7 +456,7 @@ pfileread ( int checkmode /* check for "mode" parameter */ ) { - register char *ip; + char *ip; char buf[SZ_LINE+1]; struct pfile *pfp; struct param *pp; @@ -600,7 +600,7 @@ pfilewrite ( char *pfilename /* file to be written */ ) { - register char *ip, *op, *dot; + char *ip, *op, *dot; char pfname[SZ_PATHNAME+1]; struct param *pp; int nparams; @@ -727,7 +727,7 @@ pfileinit (struct ltask *ltp) int is_pfilename (char *opstr) { - register char *ip; + char *ip; char *dot; /* If the named object has a ".par" extension we assume it is a @@ -783,7 +783,7 @@ mkpfilename ( static void mapname (char *in, char *out, int maxlen) { - register int ip, op; + int ip, op; ip = 0; op = 0; @@ -835,9 +835,9 @@ filetime ( * these events happened for this particular run of the task. */ struct pfile * -pfilecopy (register struct pfile *pfp) +pfilecopy (struct pfile *pfp) { - register struct param *pp, *newpp; + struct param *pp, *newpp; struct pfile *newpfp; int bastype; @@ -982,7 +982,7 @@ pfilecopy (register struct pfile *pfp) void pfcopyback (struct pfile *pff) { - register struct param *pt, *pf; + struct param *pt, *pf; struct pfile *pft; int bastype; int pfflags; @@ -1134,8 +1134,8 @@ addparam (struct pfile *pfp, char *buf, FILE *fp) static char *umquotes = "unmatched quotes in %s field for `%s'\n"; - register struct param *pp; /* new param being filled up */ - register char *s; /* pointer to compiled string. */ + struct param *pp; /* new param being filled up */ + char *s; /* pointer to compiled string. */ char *pnamehold; /* param's name as soon as we know it */ int len; /* used to measure string lengths */ int bastype; /* OT_BASIC part of type as soon as know*/ @@ -1627,7 +1627,7 @@ char * nextfield (char **pp, FILE *fp) { static char readbuf[SZ_LINE]; - register char c, *p; /* fast references to field */ + char c, *p; /* fast references to field */ char buf[SZ_LINE]; /* working scratch buffer */ char *bp = buf; /* pointer into scratch buffer */ char *start = NULL; /* start of compiled string in dictnry */ @@ -1789,10 +1789,10 @@ nextfield (char **pp, FILE *fp) * you have ASCII. */ char * -makelower (register char *cp) +makelower (char *cp) { char *start = cp; - register char c; + char c; while ((c = *cp) != '\0') { if ('A' <= c && c <= 'Z') @@ -1813,8 +1813,8 @@ makelower (register char *cp) int scanmode (char *s) { - register int mode = 0; - register char *str, *ip, *op; + int mode = 0; + char *str, *ip, *op; static char *badstr = "bad mode string `%s'"; char strings[4][25]; int i, n; @@ -1900,11 +1900,11 @@ scanmode (char *s) * N.B. hope ERR doesn't map into a reasonable set of flags. */ int -scantype (register char *s) +scantype (char *s) { static char *badtype = "bad type spec `%c'"; static char *cnfltype = "conflicting type spec `%c'"; - register int type; + int type; type = 0; diff --git a/pkg/cl/prcache.c b/pkg/cl/prcache.c index d7f063bd3..21eda8691 100644 --- a/pkg/cl/prcache.c +++ b/pkg/cl/prcache.c @@ -124,7 +124,7 @@ pr_connect ( int timeit /* if !0, time command */ ) { - register int pid; + int pid; /* Connect subprocess. */ if ((pid = pr_pconnect (process, in, out)) == 0) @@ -369,7 +369,7 @@ pr_cachetask ( char *ltname /* logical task name */ ) { - register int pid; + int pid; struct ltask *ltp; FILE *fdummy; @@ -392,7 +392,7 @@ pr_cachetask ( */ void pr_lock ( - register int pid /* process id */ + int pid /* process id */ ) { struct process *pr; @@ -414,7 +414,7 @@ pr_lock ( */ int pr_unlock ( - register int pid /* process id */ + int pid /* process id */ ) { struct process *pr; @@ -436,7 +436,7 @@ pr_listcache ( FILE *fp /* output file */ ) { - register struct process *pr; + struct process *pr; pr_checkup(); for (pr=pr_head; pr != NULL; pr=pr->pr_dn) @@ -476,8 +476,8 @@ pr_listcache ( void pr_dumpcache (int pid, int break_locks) { - register struct process *pr; - register int n; + struct process *pr; + int n; pr_checkup(); @@ -505,8 +505,8 @@ pr_dumpcache (int pid, int break_locks) void pr_prunecache (int pno) { - register struct process *pr; - register int n; + struct process *pr; + int n; pr_checkup(); @@ -538,7 +538,7 @@ pr_getpno (void) int pr_pnametopid (char *pname) { - register struct process *pr; + struct process *pr; pr_checkup(); for (pr=pr_head; pr != NULL; pr=pr->pr_dn) @@ -553,9 +553,9 @@ pr_pnametopid (char *pname) * of all connected but idle processes if pid=0. */ void -pr_chdir (register int pid, char *newdir) +pr_chdir (int pid, char *newdir) { - register struct process *pr; + struct process *pr; pr_checkup(); for (pr=pr_head; pr != NULL; pr=pr->pr_dn) { @@ -571,9 +571,9 @@ pr_chdir (register int pid, char *newdir) * or in all connected but idle processes if pid=0. */ void -pr_envset (register int pid, char *envvar, char *valuestr) +pr_envset (int pid, char *envvar, char *valuestr) { - register struct process *pr; + struct process *pr; pr_checkup(); for (pr=pr_head; pr != NULL; pr=pr->pr_dn) { @@ -592,8 +592,8 @@ pr_envset (register int pid, char *envvar, char *valuestr) void pr_checkup (void) { - register struct process *pr; - register int n; + struct process *pr; + int n; /* Do not traverse list using list pointers, because the first * pr_disconnect will leave process pr at the tail of the list, @@ -622,7 +622,7 @@ onipc ( funcptr_t *next_handler /* next handler to be called */ ) { - register struct process *pr; + struct process *pr; for (pr=pr_head; pr != NULL; pr=pr->pr_dn) { if (pr->pr_pid != 0) { @@ -642,8 +642,8 @@ onipc ( void pr_initcache (void) { - register struct process *pr; - register int n; + struct process *pr; + int n; for (pr=pr_cache, n=MAXSUBPROC; --n >= 0; pr++) { pr->pr_pid = 0; diff --git a/pkg/cl/proto.h b/pkg/cl/proto.h index 1aef570c7..95aa6085b 100644 --- a/pkg/cl/proto.h +++ b/pkg/cl/proto.h @@ -1,11 +1,11 @@ /* binop.c */ -extern char *strint(register char *s, int side); +extern char *strint(char *s, int side); extern void binop(int opcode); extern void binexp(int opcode); /* bkg.c */ extern void bkg_init(char *bcs); extern void bkg_spawn(char *cmd); -extern void bkg_wait(register int job); +extern void bkg_wait(int job); extern void bkg_kill(int job); extern void bkg_jobstatus(struct _iobuf *fp, int job); extern int bkg_jobactive(int job); @@ -78,14 +78,14 @@ extern void cldevstatus(void); extern void clerrpsh(void); extern void clerreset(void); extern void clonerror(void); -extern void setbuiltins(register struct package *pkp); +extern void setbuiltins(struct package *pkp); extern void newbuiltin(struct package *pkp, char *lname, void (*fp)(void), int flags, char *ftprefix, int redef); -extern int mkarglist(register struct pfile *pfp, char *args, char *argp[]); -extern void pushfparams(register struct param *pp); +extern int mkarglist(struct pfile *pfp, char *args, char *argp[]); +extern void pushfparams(struct param *pp); extern void pushbparams(struct param *pp); extern void pushbpvals(struct param *pp); extern int nargs(struct pfile *pfp); -extern void keep(register struct task *tp); +extern void keep(struct task *tp); /* clprintf.c */ extern void u_eprintf(char *fmt, ...); extern void oprintf(char *fmt, ...); @@ -97,14 +97,14 @@ extern void strtable(struct _iobuf *fp, char *list[], int nstr, int first_col, i extern void clsystem(char *cmd, struct _iobuf *taskout, struct _iobuf *taskerr); /* compile.c */ extern int compile(int opcode, ...); -extern int comstr(register char *s, memel *loc); +extern int comstr(char *s, memel *loc); extern char *comdstr(char *s); extern void catdstr(char *es, char *ns); /* debug.c */ extern void d_asmark(void); extern void d_assemble(void); -extern void d_stack(register XINT locpc, int ss); -extern int d_instr(struct _iobuf *fp, char *prefix, register XINT locpc); +extern void d_stack(XINT locpc, int ss); +extern int d_instr(struct _iobuf *fp, char *prefix, XINT locpc); extern void d_d(void); extern void d_p(void); extern void d_t(void); @@ -126,7 +126,7 @@ extern int scanftype(struct param *pp, struct operand *o); extern int c_scanmode(struct param *pp, struct operand *o); extern int scanlen(struct param *pp, struct operand *o); extern int scanmin(struct param *pp, struct operand *o); -extern int scanenum(register struct param *pp, register struct operand *o); +extern int scanenum(struct param *pp, struct operand *o); extern int scanmax(struct param *pp, struct operand *o); extern void proc_params(int npar); extern struct param *initparam(struct operand *op, int isparam, int type, int list); @@ -150,10 +150,10 @@ extern void e_pheader(struct pfile *pfp, int cmdline, int maxcol); extern void e_drawkey(void); extern void e_encode_vstring(struct param *pp, char *outbuf); extern void e_check_vals(char *string); -extern int e_undef(register char *s); +extern int e_undef(char *s); extern void e_rpterror(char *errstr); extern void e_clrerror(void); -extern char *e_getfield(register char *ip, char *outstr, int maxch); +extern char *e_getfield(char *ip, char *outstr, int maxch); extern int e_psetok(char *pset); extern void e_puterr(char *errmsg); extern void e_ttyexit(void); @@ -164,7 +164,7 @@ extern int e_colon (void); extern int editstring (char *string, int eparam); extern int e_moveup(int eparam); extern int e_movedown(int eparam); -extern char *e_tonextword(register char *ip); +extern char *e_tonextword(char *ip); extern char *e_toprevword(char *ip, char *string); extern void e_ctrl(char *cap); extern void e_goto(int col, int line); @@ -182,20 +182,20 @@ extern void callnewtask(char *name); extern void execnewtask(void); extern void mk_startupmsg(struct task *tp, char *cmd, int maxch); extern char *findexe(struct package *pkg, char *pkg_path); -extern void set_clio(register struct task *newtask); +extern void set_clio(struct task *newtask); extern struct param *ppfind(struct pfile *pfp, char *tn, char *pn, int pos, int abbrev); extern void psetreload(struct pfile *main_pfp, struct param *psetp); -extern void iofinish(register struct task *tp); +extern void iofinish(struct task *tp); extern void restor(struct task *tp); extern void oneof(void); extern void printcall(struct _iobuf *fp, struct task *tp); extern void print_call_line(struct _iobuf *out, int line, char *fname, int flags); -extern void killtask(register struct task *tp); +extern void killtask(struct task *tp); /* globals.c */ /* gquery.c */ extern char *gquery(struct param *pp, char *string); -extern char *minmax(register struct param *pp); -extern char *enumin(register struct param *pp); +extern char *minmax(struct param *pp); +extern char *enumin(struct param *pp); /* gram.c */ extern int yywrap(void); extern void yyerror(char *s); @@ -209,14 +209,14 @@ extern void show_param(struct ltask *ltp, struct param *pp, struct _iobuf *fp); extern void listhelp(struct package *pkp, int show_invis); extern void listallhelp(int show_invis); extern void breakout(char *full, char **pk, char **t, char **p, char **f); -extern int fieldcvt(register char *f); -extern int keyword(register char *tbl[], register char *s); +extern int fieldcvt(char *f); +extern int keyword(char *tbl[], char *s); extern void intrfunc(char *fname, int nargs); extern struct operand sexa(char *s); extern void sexa_to_index(double r, int *i1, int *i2); extern char *addpipe(void); extern char *getpipe(void); -extern void delpipes(register int npipes); +extern void delpipes(int npipes); extern char *pipefile(int pipecode); extern void loopincr(void); extern void loopdecr(void); @@ -245,14 +245,14 @@ extern int get_history(int record, char *command, int maxch); extern void fetch_history(char *recptr, char *command, int maxch); extern char *find_history(int record); extern void show_history(struct _iobuf *fp, int max_commands); -extern void pprompt(register char *string); -extern void get_prompt(register char *string); +extern void pprompt(char *string); +extern void get_prompt(char *string); extern void put_logfile(char *command); extern int open_logfile(char *fname); extern void close_logfile(char *fname); extern void reset_logfile(void); extern int edit_history_directive(char *args, char *new_cmd); -extern void print_command(register struct _iobuf *fp, char *command, char *marg1, char *marg2); +extern void print_command(struct _iobuf *fp, char *command, char *marg1, char *marg2); extern char *today(void); extern int what_record(void); extern void putlog(struct task *tp, char *usermsg); @@ -262,7 +262,7 @@ extern int lexicon(void); extern void lexinit(void); /* lists.c */ extern struct operand readlist(struct param *pp); -extern void closelist(register struct param *pp); +extern void closelist(struct param *pp); /* main.c */ extern int cmain_(short *cmd); extern void clexit(void); @@ -275,15 +275,15 @@ extern void onerr(void); extern void cl_amovi(int *ip, int *op, int len); /* modes.c */ extern int effmode(struct param *pp); -extern int taskmode(register struct task *tp); +extern int taskmode(struct task *tp); extern void query(struct param *pp); extern char *nextstr(char **pbuf, struct _iobuf *fp); extern char *nxtchr(char *p, struct _iobuf *fp); -extern void pquery(register struct param *pp, struct _iobuf *fp); -extern char *bkg_query(char *obuf, int maxch, register struct param *pp); +extern void pquery(struct param *pp, struct _iobuf *fp); +extern char *bkg_query(char *obuf, int maxch, struct param *pp); extern void service_bkgquery(int bkgno); extern void get_bkgqfiles(int bkgno, int pid, char *bkg_query_file, char *query_response_file); -extern int inrange(register struct param *pp, register struct operand *op); +extern int inrange(struct param *pp, struct operand *op); extern int range_check(struct param *pp); extern void setclmodes(struct task *tp); extern void parse_clmodes(struct param *pp, struct operand *newval); @@ -350,7 +350,7 @@ extern void o_fixlanguage (memel *argp); extern void o_doswitch (memel *argp); extern void o_pushindex (memel *argp); /* operand.c */ -extern void sprop(register char *outstr, register struct operand *op); +extern void sprop(char *outstr, struct operand *op); extern void spparval(char *outstr, struct param *pp); extern void fprop(struct _iobuf *fp, struct operand *op); extern void oprop(struct operand *op); @@ -360,17 +360,17 @@ extern void opcast(int newtype); extern struct operand makeop(char *str, int type); /* param.c */ extern struct param *paramfind(struct pfile *pfp, char *pname, int pos, int exact); -extern void paramset(register struct param *pp, char field); -extern void validparamget(register struct param *pp, char field); -extern void paramget(register struct param *pp, char field); +extern void paramset(struct param *pp, char field); +extern void validparamget(struct param *pp, char field); +extern void paramget(struct param *pp, char field); extern void makemode(struct param *pp, char *s); extern struct param *newparam(struct pfile *pfp); extern struct param *paramsrch(char *pkname, char *ltname, char *pname); extern int defpar(char *param_spec); extern int defvar(char *envvar); extern struct param *lookup_param(char *pkname, char *ltname, char *pname); -extern int printparam(struct param *pp, register struct _iobuf *fp); -extern void qputs(register char *str, register struct _iobuf *fp); +extern int printparam(struct param *pp, struct _iobuf *fp); +extern void qputs(char *str, struct _iobuf *fp); extern int pvaldefined(struct param *pp, char *s); extern struct param *newfakeparam(struct pfile *pfp, char *name, int pos, int type, int string_len); extern int getoffset(struct param *pp); @@ -378,10 +378,10 @@ extern void offsetmode(int mode); extern int size_array(struct param *pp); /* pfiles.c */ extern struct pfile *newpfile(struct ltask *ltp); -extern void pfileunlink(register struct pfile *pfp); -extern struct pfile *pfilefind(register struct ltask *ltp); +extern void pfileunlink(struct pfile *pfp); +extern struct pfile *pfilefind(struct ltask *ltp); extern struct pfile *pfilesrch(char *pfilepath); -extern struct pfile *pfileload(register struct ltask *ltp); +extern struct pfile *pfileload(struct ltask *ltp); extern int pfilemerge(struct pfile *npf, char *opfile); extern void pfileupdate(struct pfile *pfp); extern struct pfile *pfileread(struct ltask *ltp, char *pfilename, int checkmode); @@ -390,29 +390,29 @@ extern int pfileinit(struct ltask *ltp); extern int is_pfilename(char *opstr); extern void mkpfilename(char *buf, char *dir, char *pkname, char *ltname, char *extn); extern long filetime(char *fname, char *timecode); -extern struct pfile *pfilecopy(register struct pfile *pfp); +extern struct pfile *pfilecopy(struct pfile *pfp); extern void pfcopyback(struct pfile *pff); extern struct param *addparam(struct pfile *pfp, char *buf, struct _iobuf *fp); extern int ck_atoi(char *str, int *val); extern char *nextfield(char **pp, struct _iobuf *fp); -extern char *makelower(register char *cp); +extern char *makelower(char *cp); extern int scanmode(char *s); -extern int scantype(register char *s); +extern int scantype(char *s); /* prcache.c */ extern int pr_connect(char *process, char *command, struct _iobuf **in, struct _iobuf **out, struct _iobuf *t_in, struct _iobuf *t_out, struct _iobuf *t_err, struct _iobuf *t_gr, struct _iobuf *t_im, struct _iobuf *t_pl, int timeit); extern void pr_disconnect(int pid); extern int pr_pconnect(char *process, struct _iobuf **in, struct _iobuf **out); extern void pr_setcache(int new_szprcache); extern int pr_cachetask(char *ltname); -extern void pr_lock(register int pid); -extern int pr_unlock(register int pid); +extern void pr_lock(int pid); +extern int pr_unlock(int pid); extern void pr_listcache(struct _iobuf *fp); extern void pr_dumpcache(int pid, int break_locks); extern void pr_prunecache(int pno); extern int pr_getpno(void); extern int pr_pnametopid(char *pname); -extern void pr_chdir(register int pid, char *newdir); -extern void pr_envset(register int pid, char *envvar, char *valuestr); +extern void pr_chdir(int pid, char *newdir); +extern void pr_envset(int pid, char *envvar, char *valuestr); extern void pr_checkup(void); extern void pr_initcache(void); /* scan.c */ @@ -423,7 +423,7 @@ extern void lentst(char *buf); /* stack.c */ extern void pushmem(memel v); extern memel popmem(void); -extern void ppushmem(register memel p); +extern void ppushmem(memel p); extern struct operand pushop(struct operand *op); extern struct operand popop(void); extern struct task *pushtask(void); @@ -438,7 +438,7 @@ extern struct ltask *ltaskfind(struct package *pkp, char *name, int enable_abbre extern int deftask(char *task_spec); extern void taskunwind(void); extern struct ltask *addltask(struct package *pkp, char *ptname, char *ltname, int redef); -extern struct ltask *newltask(register struct package *pkp, char *lname, char *pname, struct ltask *oldltp); +extern struct ltask *newltask(struct package *pkp, char *lname, char *pname, struct ltask *oldltp); extern struct package *newpac(char *name, char *bin); /* unop.c */ extern void unop(int opcode); diff --git a/pkg/cl/stack.c b/pkg/cl/stack.c index 9118573e1..3126e10b6 100644 --- a/pkg/cl/stack.c +++ b/pkg/cl/stack.c @@ -80,7 +80,7 @@ popmem (void) void ppushmem (memel p) { - register memel q; + memel q; q = popmem(); pushmem(p); diff --git a/pkg/cl/task.c b/pkg/cl/task.c index db040ab03..35a7775cd 100644 --- a/pkg/cl/task.c +++ b/pkg/cl/task.c @@ -50,8 +50,8 @@ XINT pachead; /* dict index of first package */ struct ltask * cmdsrch (char *pkname, char *ltname) { - register struct ltask *ltp = NULL; - register struct package *pkp, *pkcand; + struct ltask *ltp = NULL; + struct package *pkp, *pkcand; static struct ltask pacltask; /* used to signal a package change */ struct ltask *temptaskset(); char *name; @@ -154,9 +154,9 @@ ltasksrch (char *pkname, char *ltname) struct ltask * _ltasksrch (char *pkname, char *ltname, struct package **o_pkp) { - register struct ltask *ltp, *ltcand; - register struct package *pkp; - register char first_char = ltname[0]; + struct ltask *ltp, *ltcand; + struct package *pkp; + char first_char = ltname[0]; ltcand = NULL; if (*pkname != '\0') { @@ -285,7 +285,7 @@ ltaskfind ( int enable_abbreviations /* enable abbrev. in search */ ) { - register struct ltask *ltp; + struct ltask *ltp; struct ltask *candidate; int n; @@ -398,8 +398,8 @@ taskunwind (void) struct ltask * addltask (struct package *pkp, char *ptname, char *ltname, int redef) { - register char *cp; - register struct ltask *ltp; + char *cp; + struct ltask *ltp; char *ltbase; int flags; @@ -484,9 +484,9 @@ addltask (struct package *pkp, char *ptname, char *ltname, int redef) * Null out all unused fields. */ struct ltask * -newltask (register struct package *pkp, char *lname, char *pname, struct ltask *oldltp) +newltask (struct package *pkp, char *lname, char *pname, struct ltask *oldltp) { - register struct ltask *ltp, *newltp; + struct ltask *ltp, *newltp; if (oldltp == NULL) { newltp = (struct ltask *) memneed (LTASKSIZ); @@ -533,7 +533,7 @@ newltask (register struct package *pkp, char *lname, char *pname, struct ltask * struct package * newpac (char *name, char *bin) { - register struct package *pkp; + struct package *pkp; if (pacfind (name) != NULL) cl_error (E_UERR, "package `%s' already exists", name); diff --git a/pkg/cl/task.h b/pkg/cl/task.h index 1e9446286..e17019598 100644 --- a/pkg/cl/task.h +++ b/pkg/cl/task.h @@ -204,7 +204,7 @@ struct package { #define PACKAGESIZ btoi (sizeof (struct package)) struct package *newpac(char *name, char *bin), *pacfind(char *name); -struct ltask *addltask(struct package *pkp, char *ptname, char *ltname, int redef), *newltask(register struct package *pkp, char *lname, char *pname, struct ltask *oldltp), *ltaskfind(struct package *pkp, char *name, int enable_abbreviations), *cmdsrch(char *pkname, char *ltname); +struct ltask *addltask(struct package *pkp, char *ptname, char *ltname, int redef), *newltask(struct package *pkp, char *lname, char *pname, struct ltask *oldltp), *ltaskfind(struct package *pkp, char *name, int enable_abbreviations), *cmdsrch(char *pkname, char *ltname); struct ltask *ltasksrch(char *pkname, char *ltname), *_ltasksrch(char *pkname, char *ltname, struct package **o_pkp); struct task *pushtask(void), *poptask(void); int deftask(char *task_spec), defpac(char *pkname); diff --git a/pkg/cl/unop.c b/pkg/cl/unop.c index 5d188e436..991d03aeb 100644 --- a/pkg/cl/unop.c +++ b/pkg/cl/unop.c @@ -38,8 +38,8 @@ extern int cldebug; void unop (int opcode) { - register int out_type; /* bool, int, real, string */ - register int in_type; /* bool, int, real, string */ + int out_type; /* bool, int, real, string */ + int in_type; /* bool, int, real, string */ struct operand o, result; double rval=0.0, rresult; /* input value, result */ long ival=0, iresult; diff --git a/pkg/ecl/binop.c b/pkg/ecl/binop.c index aad9ca8d4..62e18ab0a 100644 --- a/pkg/ecl/binop.c +++ b/pkg/ecl/binop.c @@ -46,7 +46,7 @@ char * -strint (register char *s, int side) +strint (char *s, int side) { if (side == LEFTSIDE) { while (isdigit (*s)) @@ -78,7 +78,7 @@ strint (register char *s, int side) void binop (int opcode) { - register int typ1, typ2; + int typ1, typ2; struct operand o1, o2, result; char res[2*SZ_LINE]; char *o1sp; @@ -706,7 +706,7 @@ binop (int opcode) void binexp (int opcode) { - register int typ1, typ2; + int typ1, typ2; struct operand o1, o2, result; int strres=0, dostr=0; diff --git a/pkg/ecl/bkg.c b/pkg/ecl/bkg.c index b612e887f..79a2db177 100644 --- a/pkg/ecl/bkg.c +++ b/pkg/ecl/bkg.c @@ -124,8 +124,8 @@ bkg_spawn ( char *cmd /* command entered by user to spawn job */ ) { - register struct _bkgjob *bk; - register int jobno, stat; + struct _bkgjob *bk; + int jobno, stat; int curpid = c_getpid(); /* Find first unused slot in a circular search. @@ -185,9 +185,9 @@ bkg_spawn ( * all bkg jobs to terminate. */ void -bkg_wait (register int job) +bkg_wait (int job) { - register int j; + int j; int active_jobs; if (job < 0 || job > NBKG) @@ -215,8 +215,8 @@ bkg_wait (register int job) void bkg_kill (int job) { - register struct _bkgjob *bk; - register int j; + struct _bkgjob *bk; + int j; bkg_update (1); if (job < 0 || job > NBKG) @@ -255,9 +255,9 @@ bkg_jobstatus ( int job /* job(s) */ ) { - register struct _bkgjob *bk; - register int j, n, ch; - register char *ip; + struct _bkgjob *bk; + int j, n, ch; + char *ip; long seconds; bkg_update (1); @@ -329,8 +329,8 @@ bkg_update ( int pmsg /* print event messages */ ) { - register struct _bkgjob *bk; - register int j; + struct _bkgjob *bk; + int j; for (bk=jobtable, j=1; j <= NBKG; j++, bk++) { if (busy(j)) { @@ -357,7 +357,7 @@ bkg_close ( int pmsg /* print termination message */ ) { - register struct _bkgjob *bk = &jobtable[job-1]; + struct _bkgjob *bk = &jobtable[job-1]; bk->b_clock = c_clktime (bk->b_clock); bk->b_exitcode = c_prcldpr (bk->b_jobno); @@ -420,8 +420,8 @@ bkg_delfiles (int job) void bkg_abort (void) { - register int job; - register struct task *tp; + int job; + struct task *tp; for (job=1; job <= NBKG; job++) if (busy (job)) diff --git a/pkg/ecl/builtin.c b/pkg/ecl/builtin.c index 212770a4f..dfd2a83d4 100644 --- a/pkg/ecl/builtin.c +++ b/pkg/ecl/builtin.c @@ -96,9 +96,9 @@ clbye (void) void cllogout (void) { - register int n; - register struct d_alloc *dv; - register struct pfile *pfp; + int n; + struct d_alloc *dv; + struct pfile *pfp; struct operand o; char owner[SZ_FNAME+1]; @@ -181,7 +181,7 @@ clclbye (void) void clcache (void) { - register struct pfile *pfp; + struct pfile *pfp; char pfilename[SZ_PATHNAME]; char **list, **next; struct operand o; @@ -282,7 +282,7 @@ cl_locate (char *task_spec, int first_only) void clwhich (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; int n; @@ -307,7 +307,7 @@ clwhich (void) void clwhereis (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; int n; @@ -333,8 +333,8 @@ clwhereis (void) void clflprcache (void) { - register struct pfile *pfp; - register int n, pid; + struct pfile *pfp; + int n, pid; struct operand o; struct ltask *ltp; int break_locks = 1; @@ -378,7 +378,7 @@ clflprcache (void) void flpr_task (char *task) { - register int pid, break_locks = 1; + int pid, break_locks = 1; struct ltask *ltp; if (strcmp (task, "cl") == 0) @@ -402,8 +402,8 @@ flpr_task (char *task) void clprcache (void) { - register struct pfile *pfp; - register int n, pid; + struct pfile *pfp; + int n, pid; struct operand o; pfp = newtask->t_pfp; @@ -455,7 +455,7 @@ static char cd_emsg[] = "Cannot change directory to `%s'"; void clchdir (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; char *dirname; @@ -530,8 +530,8 @@ clback (void) void clerror (void) { - register struct param *arg1, *arg2, *pp; - register struct pfile *pfp; + struct param *arg1, *arg2, *pp; + struct pfile *pfp; int errcode; char *errmsg; extern char *onerr_handler; @@ -670,8 +670,8 @@ clerror (void) void clhelp (void) { - register struct pfile *pfp; - register struct package *pkp; + struct pfile *pfp; + struct package *pkp; struct operand o; int n, nleft, show_invis=NO; @@ -718,7 +718,7 @@ clallhelp (void) void clhistory (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; static int default_max_history = 15; int max_history; @@ -753,7 +753,7 @@ clhistory (void) void dotrace (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; int value = !cltrace; @@ -786,7 +786,7 @@ clehistory (void) void clservice (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; int bkgjob; @@ -820,7 +820,7 @@ clservice (void) void clkeep (void) { - register struct task *tp, *root_task = (struct task *) NULL; + struct task *tp, *root_task = (struct task *) NULL; if (strncmp ("keep", currentask->t_ltp->lt_lname, 4) == 0) { @@ -862,8 +862,8 @@ clkeep (void) void clkill (void) { - register struct pfile *pfp; - register int n, jn; + struct pfile *pfp; + int n, jn; struct operand o; pfp = newtask->t_pfp; @@ -888,7 +888,7 @@ clkill (void) void cleparam (void) { - register struct pfile *pfp; + struct pfile *pfp; int n, nleft, quit; struct operand o; @@ -924,8 +924,8 @@ cleparam (void) void cllparam (void) { - register struct ltask *ltp; - register struct pfile *pfp; + struct ltask *ltp; + struct pfile *pfp; struct operand o; int n, nleft; @@ -957,7 +957,7 @@ cllparam (void) void cldparam (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; int n, nleft; @@ -1000,9 +1000,9 @@ cldparam (void) void clpack (void) { - register struct pfile *pfp; - register struct task *tp; - register struct package *pkp; + struct pfile *pfp; + struct task *tp; + struct package *pkp; char *paknam, *bindir; struct operand o1, o2; int n; @@ -1314,7 +1314,7 @@ clscanf (void) void clputlog (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; char *usermsg; int n; @@ -1350,7 +1350,7 @@ clputlog (void) void clset (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand onam, oval; int scantemp, n, show_redefs=YES; @@ -1390,7 +1390,7 @@ clset (void) void clreset (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand onam, oval; int scantemp, n, show_redefs=YES; @@ -1432,7 +1432,7 @@ clreset (void) void clshow (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand onam; int n, show_redefs=NO; char val[SZ_VALUE]; @@ -1464,8 +1464,8 @@ clshow (void) void clstty (void) { - register struct pfile *pfp; - register char *ip, *op; + struct pfile *pfp; + char *ip, *op; char sttycmd[2048], args[1024], *argp[100]; int argc, i; XINT std_in = STDIN, std_out = STDOUT; @@ -1509,7 +1509,7 @@ clstty (void) void cltask (int redef) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; int n, scantmp; char *physname, *logname; @@ -1610,8 +1610,8 @@ clntask (void) void clforeign (void) { - register struct pfile *pfp; - register char *ip, *op; + struct pfile *pfp; + char *ip, *op; char oscmd[1024], args[1024], *argp[100], *ap; int dolseen, mapfname; int argc, n1, n2, ch, n; @@ -1716,8 +1716,8 @@ clforeign (void) append_all = (out == err); if (newtask->t_flags & T_APPEND) { - register int ch; - register FILE *fp=NULL, *outfp=NULL; + int ch; + FILE *fp=NULL, *outfp=NULL; char tmpfile[SZ_PATHNAME]; /* Execute the command spooling the output in a temporary @@ -1756,8 +1756,8 @@ void clunlearn (void) { static char errfmt[] = "Warning: Cannot unlearn params for `%s'\n"; - register struct pfile *pfp; - register struct ltask *ltp, *ltt; + struct pfile *pfp; + struct ltask *ltp, *ltt; char *x1, *pk, *t, *x2; struct operand o; int n; @@ -1807,8 +1807,8 @@ clupdate (void) { /* x1 and x2 are just place holders for the call to breakout. */ - register struct pfile *pfp; - register struct ltask *ltp; + struct pfile *pfp; + struct ltask *ltp; char *x1, *pk, *t, *x2; struct operand o; int n; @@ -1844,8 +1844,8 @@ clhidetask (void) { /* x1 and x2 are just place holders for the call to breakout. */ - register struct pfile *pfp; - register struct ltask *ltp; + struct pfile *pfp; + struct ltask *ltp; char *x1, *pk, *t, *x2; struct operand o; int n; @@ -1872,8 +1872,8 @@ clhidetask (void) void clwait (void) { - register struct pfile *pfp; - register int n, jn; + struct pfile *pfp; + int n, jn; struct operand o; pfp = newtask->t_pfp; @@ -1902,8 +1902,8 @@ clwait (void) void cljobs (void) { - register struct pfile *pfp; - register int n, jn; + struct pfile *pfp; + int n, jn; struct operand o; pfp = newtask->t_pfp; @@ -1981,7 +1981,7 @@ clclear (void) void clsleep (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; pfp = newtask->t_pfp; @@ -2009,7 +2009,7 @@ clsleep (void) void cledit (void) { - register struct pfile *pfp; + struct pfile *pfp; char oscmd[SZ_LINE], os_filelist[SZ_LINE]; char osfn[SZ_PATHNAME]; struct operand o; @@ -2050,8 +2050,8 @@ cledit (void) void clallocate (void) { - register struct pfile *pfp; - register int n; + struct pfile *pfp; + int n; static char noalloc[] = "cannot allocate device %s"; struct operand o; char device[SZ_FNAME+1]; @@ -2114,8 +2114,8 @@ clallocate (void) void cldeallocate (void) { - register struct pfile *pfp; - register int n; + struct pfile *pfp; + int n; static char nodealloc[] = "cannot deallocate device %s"; struct operand o; char device[SZ_FNAME+1]; @@ -2178,7 +2178,7 @@ cldeallocate (void) void cldevstatus (void) { - register struct pfile *pfp; + struct pfile *pfp; struct operand o; char device[SZ_FNAME+1]; @@ -2288,7 +2288,7 @@ clonerror (void) * b_f. Setting LT_INVIS will keep it from being seen in the menu. */ void -setbuiltins (register struct package *pkp) +setbuiltins (struct package *pkp) { /* Debugging functions are in debug.c. */ @@ -2384,7 +2384,7 @@ setbuiltins (register struct package *pkp) { "onerror", clonerror, 0}, /* post user error handler */ }; - register struct builtin *bp; + struct builtin *bp; for (bp = btbl; bp < &btbl[sizeof(btbl)/sizeof(struct builtin)]; bp++) newbuiltin (pkp, bp->b_name, bp->b_f, bp->b_flags, "", 0); @@ -2407,7 +2407,7 @@ newbuiltin ( int redef /* permit redefinitions */ ) { - register struct ltask *newltp; + struct ltask *newltp; newltp = addltask (pkp, NULL, lname, redef); @@ -2431,12 +2431,12 @@ newbuiltin ( */ int mkarglist ( - register struct pfile *pfp, /* pfile pointer */ + struct pfile *pfp, /* pfile pointer */ char *args, /* string buffer for arg chars */ char *argp[] /* array of arg pointers */ ) { - register char *ip, *op; + char *ip, *op; struct operand o_v, o_n; int argc, n; @@ -2486,7 +2486,7 @@ mkarglist ( * a builtin will be accessed right-to-left. */ void -pushfparams (register struct param *pp) +pushfparams (struct param *pp) { struct operand onam; @@ -2560,7 +2560,7 @@ nargs (struct pfile *pfp) * referenced task terminates. */ void -keep (register struct task *tp) +keep (struct task *tp) { if (cldebug) { eprintf ("currentask: %d, prevtask: %d\n",currentask,prevtask); diff --git a/pkg/ecl/clsystem.c b/pkg/ecl/clsystem.c index 116991e61..979230fdb 100644 --- a/pkg/ecl/clsystem.c +++ b/pkg/ecl/clsystem.c @@ -21,8 +21,8 @@ clsystem ( FILE *taskerr /* stderr of task */ ) { - register char *ip; - register int ch; + char *ip; + int ch; char outfile[SZ_PATHNAME], errfile[SZ_PATHNAME]; FILE *fp; diff --git a/pkg/ecl/compile.c b/pkg/ecl/compile.c index 0e91386a8..d9e02ebba 100644 --- a/pkg/ecl/compile.c +++ b/pkg/ecl/compile.c @@ -42,8 +42,8 @@ extern int cldebug, cltrace; int compile (int opcode, ...) { - register struct codeentry *cep; - register int status = OK; + struct codeentry *cep; + int status = OK; va_list argp; @@ -96,7 +96,7 @@ compile (int opcode, ...) * the operand and change o_val.v_s to point to it. */ case PUSHCONST: { - register memel *argsaddr; + memel *argsaddr; struct operand *op, *dp; op = va_arg (argp, struct operand *); @@ -217,9 +217,9 @@ compile (int opcode, ...) * (comdstr() should be used to copy a string into the dictionary) */ int -comstr (register char *s, memel *loc) +comstr (char *s, memel *loc) { - register char *to, *from; + char *to, *from; from = to = (char *)loc; while ( (*to++ = *s++) ) diff --git a/pkg/ecl/debug.c b/pkg/ecl/debug.c index f74e2c2b0..4a166d461 100644 --- a/pkg/ecl/debug.c +++ b/pkg/ecl/debug.c @@ -59,9 +59,9 @@ d_assemble (void) } void -d_stack (register XINT locpc, int ss, int endpc) +d_stack (XINT locpc, int ss, int endpc) { - register struct codeentry *cep; + struct codeentry *cep; int n, opcode, errs = 0; do { @@ -88,9 +88,9 @@ d_stack (register XINT locpc, int ss, int endpc) * the instruction in memel is returned as the function value. */ int -d_instr (FILE *fp, char *prefix, register XINT locpc) +d_instr (FILE *fp, char *prefix, XINT locpc) { - register struct codeentry *cep; + struct codeentry *cep; int opcode, extra=0; cep = coderef (locpc); @@ -270,9 +270,9 @@ d_d (void) void d_p (void) { - register struct pfile *pfp; - register struct param *pp; - register FILE *fp; + struct pfile *pfp; + struct param *pp; + FILE *fp; int flags; fp = currentask->t_stderr; @@ -329,8 +329,8 @@ d_t (void) void d_l (void) { - register struct package *pkp; - register struct ltask *ltp; + struct package *pkp; + struct ltask *ltp; int flags; eprintf ("loaded packages -\n"); @@ -429,7 +429,7 @@ e_dumpop (void) void d_fmtmsg (FILE *fp, char *prefix, char *message, int width) { - register char *ip, *op, *cp; + char *ip, *op, *cp; char lbuf[SZ_COMMAND], obuf[SZ_COMMAND]; int len_prefix, nchars; diff --git a/pkg/ecl/decl.c b/pkg/ecl/decl.c index 1f019287a..c77d46114 100644 --- a/pkg/ecl/decl.c +++ b/pkg/ecl/decl.c @@ -105,7 +105,7 @@ get_dim (char *pname) int maketype (int type, int list) { - register int p = -1; + int p = -1; switch (type) { case V_BOOL: p = OT_BOOL; @@ -550,11 +550,11 @@ scanmin ( */ int scanenum ( - register struct param *pp, - register struct operand *o + struct param *pp, + struct operand *o ) { - register int bastype; + int bastype; bastype = pp->p_type & OT_BASIC; diff --git a/pkg/ecl/edcap.c b/pkg/ecl/edcap.c index 419d9082e..79b0877f0 100644 --- a/pkg/ecl/edcap.c +++ b/pkg/ecl/edcap.c @@ -49,7 +49,7 @@ static void map_escapes(char *input, char *output); void edtinit (void) { - register int i; + int i; char editor[SZ_FNAME]; /* the name of the editor */ /* See if the current editor is the one to use. If not, get the @@ -244,9 +244,9 @@ map_escapes ( { static char *echars = "befnrt"; static char *ecodes = "\b\033\f\n\r\t"; - register char *ip = input; - register char *op = output; - register int n; + char *ip = input; + char *op = output; + int n; while (*ip != '\0') { if (*ip == '\\') { @@ -285,7 +285,7 @@ what_cmd ( int first_char /* the first unprintable character */ ) { - register int nchars, k; + int nchars, k; char cmd_string[9]; char *cmd; diff --git a/pkg/ecl/eparam.c b/pkg/ecl/eparam.c index 52b55e480..12c3ec16e 100644 --- a/pkg/ecl/eparam.c +++ b/pkg/ecl/eparam.c @@ -98,7 +98,7 @@ int eh_readline = YES; /* use readline() for terminal input */ #endif int eh_longprompt = YES; /* print full package name as prompt */ -char *e_tonextword(register char *ip), *e_toprevword(char *ip, char *string); +char *e_tonextword(char *ip), *e_toprevword(char *ip, char *string); char epar_cmdbuf[SZ_LINE]; @@ -304,8 +304,8 @@ e_makelist ( struct pfile *pfileptr ) { - register struct param *pp; - register char c, *p; + struct param *pp; + char c, *p; int numnew; /* number of newlines */ int totlines; /* count of current total lines */ @@ -627,8 +627,8 @@ char *p; char *bp; int indent; { - register int i; - register char c; + int i; + char c; while ((*bp++ = c = *p++) != '\0') if (c == '\n') @@ -733,7 +733,7 @@ e_check_vals ( if (isarray) { char outstring[G_MAXSTRING]; - char *in, *e_getfield(register char *ip, char *outstr, int maxch); + char *in, *e_getfield(char *ip, char *outstr, int maxch); int first, nelem, flen; /* Get the length of the first dimension, and the starting point. @@ -802,10 +802,10 @@ e_check_vals ( */ int e_undef ( - register char *s + char *s ) { - register int n = 0; + int n = 0; for (; (*s != '*') && (*s != '\0'); s++) ; @@ -859,7 +859,7 @@ e_rpterror ( void e_clrerror (void) { - register int i, len; + int i, len; len = strlen (message); @@ -885,12 +885,12 @@ e_clrerror (void) */ char * e_getfield ( - register char *ip, /* pointer into input string */ + char *ip, /* pointer into input string */ char *outstr, /* receives token */ int maxch /* max chars out */ ) { - register char *op, *otop; + char *op, *otop; while (*ip == ' ' || *ip == ',') ip++; @@ -911,7 +911,7 @@ e_getfield ( */ int e_moreflag ( - register int topkey + int topkey ) { if ((numkeys == botkey) && (topkey == 1)) @@ -948,7 +948,7 @@ e_moreflag ( int e_scrollit (void) { - register int i; + int i; if (nextline == cmdline) { ; @@ -1604,8 +1604,8 @@ e_ttyinit (void) int e_colon (void) { - register char *ip, *op; - register int ch; + char *ip, *op; + int ch; char buf[SZ_LINE+1], *pset; struct param *pp; int ucasein_set; @@ -1811,7 +1811,7 @@ e_psetok ( char *pset ) { - register struct pfile *pfp; + struct pfile *pfp; char errmsg[SZ_LINE+1], *errfmt, *errarg; XINT save_topd; @@ -1996,7 +1996,7 @@ e_movedown ( */ char * e_tonextword ( - register char *ip + char *ip ) { ip++; @@ -2077,8 +2077,8 @@ e_putline ( char *stwing ) { - register char *ip, *op; - register int ch, n; + char *ip, *op; + int ch, n; char obuf[512]; int map_cc=0; @@ -2152,7 +2152,7 @@ e_displayml ( int ccol /* start col of continuation lines */ ) { - register char *ip, *op; + char *ip, *op; char lbuf[512], *line; int ocol; diff --git a/pkg/ecl/eparam.h b/pkg/ecl/eparam.h index 32ada4462..5e4233501 100644 --- a/pkg/ecl/eparam.h +++ b/pkg/ecl/eparam.h @@ -104,5 +104,5 @@ extern struct edit_commands command[MAX_COMMANDS]; extern char *cmdnames[MAX_COMMANDS]; extern int numcommands; -char *enumin(register struct param *pp), *minmax(register struct param *pp); +char *enumin(struct param *pp), *minmax(struct param *pp); char *host_editor(char *editor); diff --git a/pkg/ecl/errs.c b/pkg/ecl/errs.c index 7409d13fe..c94c57422 100644 --- a/pkg/ecl/errs.c +++ b/pkg/ecl/errs.c @@ -124,7 +124,7 @@ void cl_error (int errtype, char *diagstr, ...) { va_list args; - register struct task *tp; + struct task *tp; static int nfatal = 0; static int break_locks = 1; @@ -299,7 +299,7 @@ cl_error (int errtype, char *diagstr, ...) if ((err_abort == YES && do_error == NO) || (do_error == YES || (errtype & E_UERR))) { extern ErrCom errcom; - register struct param *pp; + struct param *pp; if (!errcom.errcode && (errtype & E_UERR)) { diff --git a/pkg/ecl/exec.c b/pkg/ecl/exec.c index 8ecfc96e0..148876c9c 100644 --- a/pkg/ecl/exec.c +++ b/pkg/ecl/exec.c @@ -65,8 +65,8 @@ char *onerr_handler = NULL; void run (void) { - register struct codeentry *cp; - register int opcode; + struct codeentry *cp; + int opcode; char *task; if (cltrace) { @@ -197,7 +197,7 @@ callnewtask (char *name) } else { if (ltp->lt_flags & LT_PFILE) { - register struct pfile *pfp; + struct pfile *pfp; /* This task has a real pfile. read in if not already in * core. Copy if not already one and not just cl. @@ -214,7 +214,7 @@ callnewtask (char *name) * head of the list, pointed to by the task descriptor. */ if (pfp->pf_flags & PF_PSETREF) { - register struct param *pp; + struct param *pp; struct operand o; char *pset; @@ -291,7 +291,7 @@ void execnewtask (void) { /* VMS C V2.1 cannot handle this (see below). - * register struct pfile *pfp; + * struct pfile *pfp; */ struct codeentry *cep; static struct pfile *pfp; @@ -567,7 +567,7 @@ mk_startupmsg ( int maxch /* max chars out */ ) { - register char *ip, *op, *cp; + char *ip, *op, *cp; struct pfile *pfp; struct operand o; struct param *pp; @@ -827,9 +827,9 @@ findexe ( * control stack but continue reading from the current command stream. */ void -set_clio (register struct task *newtask) +set_clio (struct task *newtask) { - register struct task *tp; + struct task *tp; if ((newtask->t_stdin == currentask->t_stdin) && (currentask->t_in != stdin)) { @@ -973,9 +973,9 @@ psetreload ( * it might call us again and cause an inf. loop. */ void -iofinish (register struct task *tp) +iofinish (struct task *tp) { - register FILE *fp; + FILE *fp; int flags; flags = tp->t_flags; @@ -1065,10 +1065,10 @@ void restor (struct task *tp) { memel *topdp; - register struct ltask *ltp; - register struct package *pkp; - register struct param *pp; - register struct pfile *pfp; + struct ltask *ltp; + struct package *pkp; + struct param *pp; + struct pfile *pfp; struct param *last_pp; int n; @@ -1207,9 +1207,9 @@ restor (struct task *tp) void oneof (void) { - register struct pfile *pfp; - register struct package *pkp; - register struct param *pp; + struct pfile *pfp; + struct package *pkp; + struct param *pp; static int nerrs = 0; int flags; extern ErrCom errcom; @@ -1282,7 +1282,7 @@ oneof (void) void printcall (FILE *fp, struct task *tp) { - register struct param *pp; + struct param *pp; int notfirst = 0; extern int unwind_level; @@ -1327,8 +1327,8 @@ printcall (FILE *fp, struct task *tp) void print_call_line (FILE *out, int line, char *fname, int flags) { - register int i, len; - register FILE *fp; + int i, len; + FILE *fp; char buf[SZ_LINE+1]; extern int unwind_level; @@ -1377,7 +1377,7 @@ print_call_line (FILE *out, int line, char *fname, int flags) * again. */ void -killtask (register struct task *tp) +killtask (struct task *tp) { char buf[128]; diff --git a/pkg/ecl/gquery.c b/pkg/ecl/gquery.c index 521daa5e6..95719789b 100644 --- a/pkg/ecl/gquery.c +++ b/pkg/ecl/gquery.c @@ -36,7 +36,7 @@ static char *e2 = "Parameter value is out of range"; char * gquery (struct param *pp, char *string) { - register char *ip; + char *ip; char buf[SZ_LINE]; char *query_status, *nlp, *errmsg; int arrflag=0, offset=0, bastype=0, batch=0; @@ -144,7 +144,7 @@ gquery (struct param *pp, char *string) /* MINMAX -- Format the minimum and maximum values of a parameter, if any. */ char * -minmax (register struct param *pp) +minmax (struct param *pp) { static char message[SZ_LINE]; @@ -180,7 +180,7 @@ minmax (register struct param *pp) /* ENUMIN -- Format the enumeration string for a parameter. */ char * -enumin (register struct param *pp) +enumin (struct param *pp) { static char message[SZ_LINE]; diff --git a/pkg/ecl/gram.c b/pkg/ecl/gram.c index 1af23f264..67b31b5f0 100644 --- a/pkg/ecl/gram.c +++ b/pkg/ecl/gram.c @@ -149,7 +149,7 @@ yyerror (char *s) void rerun (void) { - register struct codeentry *cp; + struct codeentry *cp; do { cp = coderef (pc); @@ -227,7 +227,7 @@ crackident (char *s) { "", 0, 0 } }; - register struct keywords *kp; + struct keywords *kp; XINT oldtopd; static char sch, kch; /* static storage is faster here */ char *scopy; /* non-makelower'd copy */ @@ -342,7 +342,7 @@ crackident (char *s) XINT addconst (char *s, int t) { - register struct operand *op; + struct operand *op; XINT lasttopd; lasttopd = topd; /* could just derefenece op */ @@ -370,7 +370,7 @@ addconst (char *s, int t) void listparams (struct pfile *pfp) { - register struct param *pp; + struct param *pp; for (pp = pfp->pf_pp; pp != NULL; pp = pp->p_np) if (!(pp->p_mode & M_HIDDEN)) @@ -389,7 +389,7 @@ listparams (struct pfile *pfp) void pretty_param (struct param *pp, FILE *fp) { - register char ch, *p; + char ch, *p; char buf[SZ_LINE]; int nchars, maxch; @@ -504,8 +504,8 @@ pretty_param (struct param *pp, FILE *fp) void dumpparams (struct pfile *pfp) { - register struct param *pp; - register FILE *fp = currentask->t_stdout; + struct param *pp; + FILE *fp = currentask->t_stdout; for (pp = pfp->pf_pp; pp != NULL; pp = pp->p_np) if (!(pp->p_mode & M_HIDDEN)) @@ -557,8 +557,8 @@ void listhelp (struct package *pkp, int show_invis) { static int first_col=7, maxch=20, ncol=0; - register struct ltask *ltp; - register char *ip, *op; + struct ltask *ltp; + char *ip, *op; char buf[4096], *list[MAXMENU]; int nltask, last_col; @@ -608,7 +608,7 @@ listhelp (struct package *pkp, int show_invis) void listallhelp (int show_invis) { - register struct package *pkp; + struct package *pkp; pkp = curpack; do { @@ -644,8 +644,8 @@ listallhelp (int show_invis) void breakout (char *full, char **pk, char **t, char **p, char **f) { - register char *cp; - register int npts, n; + char *cp; + int npts, n; char *pts[3]; static char buffer[SZ_LINE+1]; @@ -710,7 +710,7 @@ breakout (char *full, char **pk, char **t, char **p, char **f) * (and abbrevs are enabled). */ int -fieldcvt (register char *f) +fieldcvt (char *f) { /* Field name and corresponding code tables. */ @@ -752,10 +752,10 @@ fieldcvt (register char *f) * at which s matched. */ int -keyword (register char *tbl[], register char *s) +keyword (char *tbl[], char *s) { - register int i; - register char *kentry; + int i; + char *kentry; int cand, len; i = 0; @@ -1105,9 +1105,9 @@ getpipe (void) * deleted and the pipestack is cleared (i.e., during error recovery). */ void -delpipes (register int npipes) +delpipes (int npipes) { - register int pipe; + int pipe; if (npipes == 0) { while (nextpipe > 0) @@ -1485,7 +1485,7 @@ y_typedef (char *key) void p_position (void) { - register int i; + int i; eprintf ("**: %s ", cmdblk); /* '\n' in cmdblk */ diff --git a/pkg/ecl/grammar.l b/pkg/ecl/grammar.l index 9a809ade1..4b73608da 100644 --- a/pkg/ecl/grammar.l +++ b/pkg/ecl/grammar.l @@ -21,7 +21,7 @@ A [a-zA-Z] * '!'. Let clsystem decide what to do with null cmd. * Must precede the "!" YOP_NOT spec in this file. */ - register char *cp; + char *cp; for (cp = yytext; *cp++ != '!'; ) ; yylval = addconst (cp, OT_STRING); @@ -145,7 +145,7 @@ A [a-zA-Z] traverse (delim) char delim; { - register char *op, *cp, ch; + char *op, *cp, ch; static char *esc_ch = "ntfr\\\"'"; static char *esc_val = "\n\t\f\r\\\"\'"; diff --git a/pkg/ecl/history.c b/pkg/ecl/history.c index 7da1dbaa2..379680c96 100644 --- a/pkg/ecl/history.c +++ b/pkg/ecl/history.c @@ -80,7 +80,7 @@ int add_history (char *buf); int yy_getc (FILE *fp) { - register char ch; + char ch; while ((ch = *ip_cmdblk++) == EOS) if (get_command (fp) == EOF) { @@ -103,7 +103,7 @@ yy_getc (FILE *fp) void yy_startblock (int logflag) { - register char *ip; + char *ip; if (cldebug) eprintf ("startblock (%d)\n", logflag); @@ -172,7 +172,7 @@ curcmd (void) int get_command (FILE *fp) { - register char *ip, *op; + char *ip, *op; char raw_cmd[SZ_LINE+1]; /* buffer for raw command line */ char new_cmd[SZ_CMDBLK+1]; /* temporary for processed cmd */ int execute=1, temp, status; @@ -408,7 +408,7 @@ add_history (char *buf) { } int process_history_directive (char *directive, char *new_command_block) { - register char *ip, *op, *p; + char *ip, *op, *p; char last_command_block[SZ_CMDBLK+1]; int execute=1, edit=0; int record; @@ -489,7 +489,7 @@ process_history_directive (char *directive, char *new_command_block) int search_history (char *directive, char *new_command_block) { - register char *ip, *op, *p; + char *ip, *op, *p; char pattern[SZ_FNAME]; int match_only_at_bol=1, record, patlen; @@ -567,7 +567,7 @@ stredit ( char *out_text /* buffer for output text */ ) { - register char *ip, *op, *pp; + char *ip, *op, *pp; char metacharacter; char pattern[SZ_LINE+1], text[SZ_LINE+1]; int replace_all_occurrences=0; @@ -667,7 +667,7 @@ stredit ( int expand_history_macros (char *in_text, char *out_text) { - register char *ip, *op, *ap; + char *ip, *op, *ap; char cmdblk[SZ_CMDBLK+1], *argp[100]; int nargs=0, nrep=0, argno=0, have_arg_strings=0; @@ -755,8 +755,8 @@ get_arglist ( char *argp[] /* receives argument pointers */ ) { - register char *cp; - register int nargs; + char *cp; + int nargs; for (cp=cmdblk, nargs=0; *cp != EOS; ) { /* Advance to next token; convert newline to EOS. */ @@ -789,7 +789,7 @@ get_arglist ( void put_history (char *command) { - register char *ip, *op, *otop; + char *ip, *op, *otop; /* Make sure there is exactly one newline at the end of the command. */ for (ip = command + strlen(command) - 1; ip >= command; --ip) @@ -841,8 +841,8 @@ get_history (int record, char *command, int maxch) void fetch_history (char *recptr, char *command, int maxch) { - register char *ip, *op, *itop; - register int n; + char *ip, *op, *itop; + int n; itop = histbuf + SZ_HISTBUF; ip = recptr; @@ -871,7 +871,7 @@ fetch_history (char *recptr, char *command, int maxch) char * find_history (int record) { - register char *ip, *op, *bufptr; + char *ip, *op, *bufptr; static int current_record = 0; static char *recptr, *old_ophist = NULL; @@ -968,7 +968,7 @@ show_history (FILE *fp, int max_commands) * if menus() are enabled and a new package has been invoked. */ void -pprompt (register char *string) +pprompt (char *string) { static struct package *lastpack = NULL; extern long int run_level; @@ -996,7 +996,7 @@ pprompt (register char *string) * if menus() are enabled and a new package has been invoked. */ void -get_prompt (register char *string) +get_prompt (char *string) { static struct package *lastpack = NULL; extern long int run_level; @@ -1081,7 +1081,7 @@ open_logfile (char *fname) void close_logfile (char *fname) { - register FILE *fp; + FILE *fp; if (logfp != NULL) { if (share_logfile) { @@ -1119,13 +1119,13 @@ reset_logfile (void) */ void print_command ( - register FILE *fp, + FILE *fp, char *command, char *marg1, char *marg2 /* margin strings of first and subseq. cmds */ ) { - register char *ip; + char *ip; fprintf (fp, marg1); for (ip=command; *ip != EOS; ip++) { @@ -1167,8 +1167,8 @@ putlog ( char *usermsg ) { - register char *ip, *op, *otop; - register int n; + char *ip, *op, *otop; + int n; char msg[SZ_LOGBUF], job[5]; char *pkg, *tname, *today(void); extern int bkgno; /* job number if bkg job */ diff --git a/pkg/ecl/lexicon.c b/pkg/ecl/lexicon.c index b987831cd..1c480a2cb 100644 --- a/pkg/ecl/lexicon.c +++ b/pkg/ecl/lexicon.c @@ -40,7 +40,7 @@ int lhs; /* "left hand side" switch for [] */ int yylex (void) { - register int token; + int token; if (_lexmodes && parenlevel == 0 && bracelevel < PBRACE) { while (!(token = lexicon())) @@ -146,8 +146,8 @@ int lexicon (void) { char *bkgerr = "ERROR: cannot submit background job inside {}\n"; - register int ch, cch; - register int token; + int ch, cch; + int token; int stringtok = 1, identifier = 1, setlevel = 0; int clswitch; char *op; diff --git a/pkg/ecl/lexyy.c b/pkg/ecl/lexyy.c index 5f13d41fc..359e37866 100644 --- a/pkg/ecl/lexyy.c +++ b/pkg/ecl/lexyy.c @@ -60,7 +60,7 @@ case 4: * '!'. Let clsystem decide what to do with null cmd. * Must precede the "!" YOP_NOT spec in this file. */ - register char *cp; + char *cp; for (cp = yytext; *cp++ != '!'; ) ; yylval = addconst (cp, OT_STRING); @@ -240,7 +240,7 @@ fprintf(yyout,"bad switch yylook %d",nstr); int traverse (int delim) { - register char *op, *cp, ch; + char *op, *cp, ch; static char *esc_ch = "ntfr\\\"'"; static char *esc_val = "\n\t\f\r\\\"\'"; @@ -731,8 +731,8 @@ extern struct yysvf *yyestate; int yyprevious = YYNEWLINE; int yylook (void){ - register struct yysvf *yystate, **lsp; - register struct yywork *yyt; + struct yysvf *yystate, **lsp; + struct yywork *yyt; struct yysvf *yyz; int yych, yyfirst; struct yywork *yyr; diff --git a/pkg/ecl/lists.c b/pkg/ecl/lists.c index 56ab5f577..508141f8a 100644 --- a/pkg/ecl/lists.c +++ b/pkg/ecl/lists.c @@ -113,7 +113,7 @@ again: fgets (line, SZ_LINE, pp->p_listfp); * already closed and that we're not closing the real stdin. */ void -closelist (register struct param *pp) +closelist (struct param *pp) { if (pp->p_listfp != NULL) { if (pp->p_listfp != stdin) diff --git a/pkg/ecl/main.c b/pkg/ecl/main.c index 56b0681b9..eb62fb675 100644 --- a/pkg/ecl/main.c +++ b/pkg/ecl/main.c @@ -368,9 +368,9 @@ execute (int mode) static void login (char *cmd) { - register struct task *tp; - register char *ip, *op, *arg; - register struct param *pp; + struct task *tp; + char *ip, *op, *arg; + struct param *pp; struct ltask *ltp; struct operand o; char loginfile[SZ_PATHNAME]; @@ -622,7 +622,7 @@ file_concat (char *in1, char *in2) static void logout (void) { - register struct task *tp; + struct task *tp; char logoutfile[SZ_PATHNAME]; FILE *fp; @@ -807,9 +807,9 @@ onerr (void) */ void cl_amovi ( - register int *ip, - register int *op, - register int len + int *ip, + int *op, + int len ) { while (--len) diff --git a/pkg/ecl/modes.c b/pkg/ecl/modes.c index e818a43d7..555f104ae 100644 --- a/pkg/ecl/modes.c +++ b/pkg/ecl/modes.c @@ -73,7 +73,7 @@ effmode (struct param *pp) static char *localerr = "Attempt to access undefined local variable `%s'.\n"; - register int mode, modebits; + int mode, modebits; struct operand o; int clmode, ltmode, pkmode, offset; int interactive; @@ -192,9 +192,9 @@ effmode (struct param *pp) /* TASKMODE -- Determine the effective mode for a task. */ int -taskmode (register struct task *tp) +taskmode (struct task *tp) { - register int modebits, mode; + int modebits, mode; struct pfile *pfp; int clmode, pkmode, ltmode; int interactive, learn; @@ -264,12 +264,12 @@ query (struct param *pp) { static char *oormsg = "ERROR: Parameter value is out of range; try again"; - register char *ip; + char *ip; char buf[SZ_PROMPTBUF+1]; struct operand o; int bastype, batch, arrflag, offset=0, n_ele, max_ele, fd; char *nlp, *nextstr(char **pbuf, FILE *fp); - char *bkg_query(char *obuf, int maxch, register struct param *pp), *query_status; + char *bkg_query(char *obuf, int maxch, struct param *pp), *query_status; char *abuf; bastype = pp->p_type & OT_BASIC; @@ -646,7 +646,7 @@ nxtchr (char *p, FILE *fp) /* PQUERY -- Print the query message. */ void -pquery (register struct param *pp, FILE *fp) +pquery (struct param *pp, FILE *fp) { struct operand o; int offset=0, arrflag=0; @@ -746,7 +746,7 @@ char * bkg_query ( char *obuf, /* same calling sequence as 'fgets' */ int maxch, - register struct param *pp + struct param *pp ) { char bqfile[SZ_PATHNAME], qrfile[SZ_PATHNAME]; @@ -812,7 +812,7 @@ service_bkgquery ( int bkgno /* ordinal of job requiring service */ ) { - register int ch; + int ch; char bqfile[SZ_PATHNAME], qrfile[SZ_PATHNAME]; char qrtemp[SZ_PATHNAME]; char response[SZ_LINE+1]; @@ -890,9 +890,9 @@ get_bkgqfiles (int bkgno, int pid, char *bkg_query_file, char *query_response_fi * This routine uses binexp() and thus the operand stack. */ int -inrange (register struct param *pp, register struct operand *op) +inrange (struct param *pp, struct operand *op) { - register int fulltype, bastype; + int fulltype, bastype; struct operand omin, test; fulltype = pp->p_type; @@ -1046,8 +1046,8 @@ range_check (struct param *pp) void setclmodes (struct task *tp) { - register struct param *pp; - register char *name; + struct param *pp; + char *name; int bastype; clabbrev = clmenus = clshowtype = clkeeplog = cllexmodes = cllogfile = @@ -1109,7 +1109,7 @@ setclmodes (struct task *tp) void parse_clmodes (struct param *pp, struct operand *newval) { - register char *name, *ip; + char *name, *ip; name = pp->p_name; diff --git a/pkg/ecl/opcodes.c b/pkg/ecl/opcodes.c index df36c6e0a..9b9bd7c61 100644 --- a/pkg/ecl/opcodes.c +++ b/pkg/ecl/opcodes.c @@ -921,8 +921,8 @@ o_redirin (memel *argp) void o_gsredir (memel *argp) { - register char *ip; - register FILE *fp; + char *ip; + FILE *fp; char *streams = (char *)argp; struct operand o; char *fname; @@ -1240,8 +1240,8 @@ o_doswitch (memel *argp) void o_swoff (memel *argp) { - register char *pname = (char *)argp; - register struct param *pp; + char *pname = (char *)argp; + struct param *pp; struct operand o; struct pfile *pfp; char *pk, *t, *p, *f; @@ -1269,8 +1269,8 @@ o_swoff (memel *argp) void o_swon (memel *argp) { - register char *pname = (char *)argp; - register struct param *pp; + char *pname = (char *)argp; + struct param *pp; struct pfile *pfp; struct operand o; char *pk, *t, *p, *f; @@ -1307,7 +1307,7 @@ o_swon (memel *argp) void o_fixlanguage (memel *argp) { - register struct ltask *ltp; + struct ltask *ltp; ltp = ltasksrch (CLPACKAGE, ROOTPACKAGE); ltp->lt_flags |= (LT_PACCL|LT_CL); diff --git a/pkg/ecl/operand.c b/pkg/ecl/operand.c index 46cca220f..dee7ba3ab 100644 --- a/pkg/ecl/operand.c +++ b/pkg/ecl/operand.c @@ -38,9 +38,9 @@ extern char *epsilonstr; /* SPROP -- Format the value of a parameter into the output string. */ void -sprop (register char *outstr, register struct operand *op) +sprop (char *outstr, struct operand *op) { - register int type; + int type; if (opundef (op)) cl_error (E_IERR, "can not print an undefined operand"); @@ -296,8 +296,8 @@ opcast (int newtype) struct operand makeop (char *str, int type) { - register char *s, *ip; - register char c; + char *s, *ip; + char c; char *format; char hexnum[MAX_DIGITS]; char firstchar; diff --git a/pkg/ecl/param.c b/pkg/ecl/param.c index db769b865..386da1172 100644 --- a/pkg/ecl/param.c +++ b/pkg/ecl/param.c @@ -51,8 +51,8 @@ char *loc_field = "Attempt to access undefined field in local variable %s.\n"; struct param * paramfind (struct pfile *pfp, char *pname, int pos, int exact) { - register char first_char; - register struct param *pp; + char first_char; + struct param *pp; struct ltask *ltp; if (pfp == NULL) @@ -139,7 +139,7 @@ paramfind (struct pfile *pfp, char *pname, int pos, int exact) * order of interpolator (3|5|7) (5): */ void -paramset (register struct param *pp, int field) +paramset (struct param *pp, int field) { struct operand o; int bastype; /* OT_BASIC portion of p_type */ @@ -359,7 +359,7 @@ paramset (register struct param *pp, int field) * or if pp is out of range. Call error if return value would be undefined. */ void -validparamget (register struct param *pp, int field) +validparamget (struct param *pp, int field) { struct operand o; @@ -380,7 +380,7 @@ validparamget (register struct param *pp, int field) * is out of range. Value returned may be undefined. */ void -paramget (register struct param *pp, int field) +paramget (struct param *pp, int field) { char mode[5]; /* used to turn bits into string */ struct operand result; @@ -646,7 +646,7 @@ paramget (register struct param *pp, int field) void makemode (struct param *pp, char *s) { - register int m = pp->p_mode; + int m = pp->p_mode; if (m & M_AUTO) *s++ = PF_AUTO; @@ -670,7 +670,7 @@ makemode (struct param *pp, char *s) struct param * newparam (struct pfile *pfp) { - register struct param *newpp; + struct param *newpp; newpp = (struct param *) memneed (PARAMSIZ); @@ -715,7 +715,7 @@ newparam (struct pfile *pfp) struct param * paramsrch (char *pkname, char *ltname, char *pname) { - register struct param *pp; + struct param *pp; struct pfile *pfp; struct param *lookup_param(char *pkname, char *ltname, char *pname); @@ -808,9 +808,9 @@ defvar (char *envvar) struct param * lookup_param (char *pkname, char *ltname, char *pname) { - register struct param *pp; - register struct package *pkp; - register struct ltask *ltp; + struct param *pp; + struct package *pkp; + struct ltask *ltp; struct pfile *pfp; struct pfile *pfiles[64]; struct param *candidate; @@ -945,10 +945,10 @@ lookup_param (char *pkname, char *ltname, char *pname) * Don't call error() so caller can have a chance to close the file. */ int -printparam (struct param *pp, register FILE *fp) +printparam (struct param *pp, FILE *fp) { - register int type, bastype; - register char *bp; + int type, bastype; + char *bp; char buf[20]; int arrflag; int size_arr=0; @@ -1198,9 +1198,9 @@ printparam (struct param *pp, register FILE *fp) * sequences, so that they can later be read back in unmodified. */ void -qputs (register char *str, register FILE *fp) +qputs (char *str, FILE *fp) { - register char ch; + char ch; fputc ('"', fp); while ((ch = *str++) != '\0') { @@ -1274,7 +1274,7 @@ newfakeparam ( int string_len /* if new param is type string, size of string */ ) { - register struct param *pp; + struct param *pp; pp = newparam (pfp); if (name == NULL || *name == '\0') { diff --git a/pkg/ecl/param.h b/pkg/ecl/param.h index 728b8f05e..1039c2d17 100644 --- a/pkg/ecl/param.h +++ b/pkg/ecl/param.h @@ -201,7 +201,7 @@ struct pfile { char *nextfield(char **pp, FILE *fp); /* cracks next pfile line field */ -char *makelower(register char *cp); /* upper to lower, in place and return */ +char *makelower(char *cp); /* upper to lower, in place and return */ struct param *paramfind(struct pfile *pfp, char *pname, int pos, int exact); /* searches for a param on a given pfile*/ struct param *paramsrch(char *pkname, char *ltname, char *pname); /* search, make sure param is there */ @@ -210,11 +210,11 @@ struct param *newparam(struct pfile *pfp); /* allocate and link a new param */ struct param *addparam(struct pfile *pfp, char *buf, FILE *fp); /* make a new param off given pfile */ struct param *newfakeparam(struct pfile *pfp, char *name, int pos, int type, int string_len); /* add a fake param to pfile */ struct pfile *pfilesrch(char *pfilepath); /* read named pfile or ltask pfile */ -struct pfile *pfileload(register struct ltask *ltp); /* load pfile for ltask into memory */ +struct pfile *pfileload(struct ltask *ltp); /* load pfile for ltask into memory */ struct pfile *pfileread(struct ltask *ltp, char *pfilename, int checkmode); /* read and make params from a pfile */ -struct pfile *pfilefind(register struct ltask *ltp); /* look for pfile with given name */ +struct pfile *pfilefind(struct ltask *ltp); /* look for pfile with given name */ struct pfile *newpfile(struct ltask *ltp); /* add a new pfile off parhead */ -struct pfile *pfilecopy(register struct pfile *pfp); /* make an in-core copy of a pfile */ +struct pfile *pfilecopy(struct pfile *pfp); /* make an in-core copy of a pfile */ int defpar(char *param_spec); /* determine whether param exists */ int defvar(char *envvar); /* determine whether envvar exists */ diff --git a/pkg/ecl/pfiles.c b/pkg/ecl/pfiles.c index 7408f9549..1a9108bbf 100644 --- a/pkg/ecl/pfiles.c +++ b/pkg/ecl/pfiles.c @@ -43,7 +43,7 @@ newpfile ( struct ltask *ltp /* ltask descriptor */ ) { - register struct pfile *pfp, *head_pfp; + struct pfile *pfp, *head_pfp; pfp = (struct pfile *) memneed (PFILESIZ); head_pfp = reference (pfile, parhead); @@ -69,10 +69,10 @@ newpfile ( */ void pfileunlink ( - register struct pfile *pfp /* pfile to be unlinked */ + struct pfile *pfp /* pfile to be unlinked */ ) { - register struct pfile *npf; + struct pfile *npf; if ((npf = reference (pfile, parhead)) == pfp) parhead = dereference (pfp->pf_npf); @@ -95,10 +95,10 @@ pfileunlink ( */ struct pfile * pfilefind ( - register struct ltask *ltp /* ltask descriptor */ + struct ltask *ltp /* ltask descriptor */ ) { - register struct pfile *pfp; + struct pfile *pfp; for (pfp = reference (pfile, parhead); pfp != NULL; pfp = pfp->pf_npf) if (pfp->pf_ltp == ltp) @@ -154,12 +154,12 @@ pfilesrch ( */ struct pfile * pfileload ( - register struct ltask *ltp /* ltask descriptor */ + struct ltask *ltp /* ltask descriptor */ ) { static long sys_ftime = 0; - register struct task *tp; - register struct param *pp; + struct task *tp; + struct param *pp; char usr_pfile[SZ_FNAME+1]; char pkg_pfile[SZ_FNAME+1]; char pkgdir[SZ_FNAME+1]; @@ -321,7 +321,7 @@ pfilemerge ( char *opfile /* old parameter file */ ) { - register struct param *o_pp, *n_pp, *l_pp; + struct param *o_pp, *n_pp, *l_pp; int bastype; XINT save_topd; struct pfile *opf; @@ -456,7 +456,7 @@ pfileread ( int checkmode /* check for "mode" parameter */ ) { - register char *ip; + char *ip; char buf[SZ_LINE+1]; struct pfile *pfp; struct param *pp; @@ -600,7 +600,7 @@ pfilewrite ( char *pfilename /* file to be written */ ) { - register char *ip, *op, *dot; + char *ip, *op, *dot; char pfname[SZ_PATHNAME+1]; struct param *pp; int nparams; @@ -727,7 +727,7 @@ pfileinit (struct ltask *ltp) int is_pfilename (char *opstr) { - register char *ip; + char *ip; char *dot; /* If the named object has a ".par" extension we assume it is a @@ -783,7 +783,7 @@ mkpfilename ( static void mapname (char *in, char *out, int maxlen) { - register int ip, op; + int ip, op; ip = 0; op = 0; @@ -835,9 +835,9 @@ filetime ( * these events happened for this particular run of the task. */ struct pfile * -pfilecopy (register struct pfile *pfp) +pfilecopy (struct pfile *pfp) { - register struct param *pp, *newpp; + struct param *pp, *newpp; struct pfile *newpfp; int bastype; @@ -982,7 +982,7 @@ pfilecopy (register struct pfile *pfp) void pfcopyback (struct pfile *pff) { - register struct param *pt, *pf; + struct param *pt, *pf; struct pfile *pft; int bastype; int pfflags; @@ -1134,8 +1134,8 @@ addparam (struct pfile *pfp, char *buf, FILE *fp) static char *umquotes = "unmatched quotes in %s field for `%s'\n"; - register struct param *pp; /* new param being filled up */ - register char *s; /* pointer to compiled string. */ + struct param *pp; /* new param being filled up */ + char *s; /* pointer to compiled string. */ char *pnamehold; /* param's name as soon as we know it */ int len; /* used to measure string lengths */ int bastype; /* OT_BASIC part of type as soon as know*/ @@ -1627,7 +1627,7 @@ char * nextfield (char **pp, FILE *fp) { static char readbuf[SZ_LINE]; - register char c, *p; /* fast references to field */ + char c, *p; /* fast references to field */ char buf[SZ_LINE]; /* working scratch buffer */ char *bp = buf; /* pointer into scratch buffer */ char *start = NULL; /* start of compiled string in dictnry */ @@ -1789,10 +1789,10 @@ nextfield (char **pp, FILE *fp) * you have ASCII. */ char * -makelower (register char *cp) +makelower (char *cp) { char *start = cp; - register char c; + char c; while ((c = *cp) != '\0') { if ('A' <= c && c <= 'Z') @@ -1813,8 +1813,8 @@ makelower (register char *cp) int scanmode (char *s) { - register int mode = 0; - register char *str, *ip, *op; + int mode = 0; + char *str, *ip, *op; static char *badstr = "bad mode string `%s'"; char strings[4][25]; int i, n; @@ -1900,11 +1900,11 @@ scanmode (char *s) * N.B. hope ERR doesn't map into a reasonable set of flags. */ int -scantype (register char *s) +scantype (char *s) { static char *badtype = "bad type spec `%c'"; static char *cnfltype = "conflicting type spec `%c'"; - register int type; + int type; type = 0; diff --git a/pkg/ecl/prcache.c b/pkg/ecl/prcache.c index 071c88fc1..9fad3e774 100644 --- a/pkg/ecl/prcache.c +++ b/pkg/ecl/prcache.c @@ -124,7 +124,7 @@ pr_connect ( int timeit /* if !0, time command */ ) { - register int pid; + int pid; /* Connect subprocess. */ if ((pid = pr_pconnect (process, in, out)) == 0) @@ -369,7 +369,7 @@ pr_cachetask ( char *ltname /* logical task name */ ) { - register int pid; + int pid; struct ltask *ltp; FILE *fdummy; @@ -392,7 +392,7 @@ pr_cachetask ( */ void pr_lock ( - register int pid /* process id */ + int pid /* process id */ ) { struct process *pr; @@ -414,7 +414,7 @@ pr_lock ( */ int pr_unlock ( - register int pid /* process id */ + int pid /* process id */ ) { struct process *pr; @@ -436,7 +436,7 @@ pr_listcache ( FILE *fp /* output file */ ) { - register struct process *pr; + struct process *pr; pr_checkup(); for (pr=pr_head; pr != NULL; pr=pr->pr_dn) @@ -476,8 +476,8 @@ pr_listcache ( void pr_dumpcache (int pid, int break_locks) { - register struct process *pr; - register int n; + struct process *pr; + int n; pr_checkup(); @@ -505,8 +505,8 @@ pr_dumpcache (int pid, int break_locks) void pr_prunecache (int pno) { - register struct process *pr; - register int n; + struct process *pr; + int n; pr_checkup(); @@ -538,7 +538,7 @@ pr_getpno (void) int pr_pnametopid (char *pname) { - register struct process *pr; + struct process *pr; pr_checkup(); for (pr=pr_head; pr != NULL; pr=pr->pr_dn) @@ -553,9 +553,9 @@ pr_pnametopid (char *pname) * of all connected but idle processes if pid=0. */ void -pr_chdir (register int pid, char *newdir) +pr_chdir (int pid, char *newdir) { - register struct process *pr; + struct process *pr; pr_checkup(); for (pr=pr_head; pr != NULL; pr=pr->pr_dn) { @@ -571,9 +571,9 @@ pr_chdir (register int pid, char *newdir) * or in all connected but idle processes if pid=0. */ void -pr_envset (register int pid, char *envvar, char *valuestr) +pr_envset (int pid, char *envvar, char *valuestr) { - register struct process *pr; + struct process *pr; pr_checkup(); for (pr=pr_head; pr != NULL; pr=pr->pr_dn) { @@ -592,8 +592,8 @@ pr_envset (register int pid, char *envvar, char *valuestr) void pr_checkup (void) { - register struct process *pr; - register int n; + struct process *pr; + int n; /* Do not traverse list using list pointers, because the first * pr_disconnect will leave process pr at the tail of the list, @@ -622,7 +622,7 @@ onipc ( funcptr_t *next_handler /* next handler to be called */ ) { - register struct process *pr; + struct process *pr; for (pr=pr_head; pr != NULL; pr=pr->pr_dn) { if (pr->pr_pid != 0) { @@ -642,8 +642,8 @@ onipc ( void pr_initcache (void) { - register struct process *pr; - register int n; + struct process *pr; + int n; for (pr=pr_cache, n=MAXSUBPROC; --n >= 0; pr++) { pr->pr_pid = 0; diff --git a/pkg/ecl/proto.h b/pkg/ecl/proto.h index 95b416d6f..5e94a4f8c 100644 --- a/pkg/ecl/proto.h +++ b/pkg/ecl/proto.h @@ -1,11 +1,11 @@ /* binop.c */ -extern char *strint(register char *s, int side); +extern char *strint(char *s, int side); extern void binop(int opcode); extern void binexp(int opcode); /* bkg.c */ extern void bkg_init(char *bcs); extern void bkg_spawn(char *cmd); -extern void bkg_wait(register int job); +extern void bkg_wait(int job); extern void bkg_kill(int job); extern void bkg_jobstatus(struct _iobuf *fp, int job); extern int bkg_jobactive(int job); @@ -78,14 +78,14 @@ extern void cldevstatus(void); extern void clerrpsh(void); extern void clerreset(void); extern void clonerror(void); -extern void setbuiltins(register struct package *pkp); +extern void setbuiltins(struct package *pkp); extern void newbuiltin(struct package *pkp, char *lname, void (*fp)(void), int flags, char *ftprefix, int redef); -extern int mkarglist(register struct pfile *pfp, char *args, char *argp[]); -extern void pushfparams(register struct param *pp); +extern int mkarglist(struct pfile *pfp, char *args, char *argp[]); +extern void pushfparams(struct param *pp); extern void pushbparams(struct param *pp); extern void pushbpvals(struct param *pp); extern int nargs(struct pfile *pfp); -extern void keep(register struct task *tp); +extern void keep(struct task *tp); /* clprintf.c */ extern void u_eprintf(char *fmt, ...); extern void oprintf(char *fmt, ...); @@ -97,14 +97,14 @@ extern void strtable(struct _iobuf *fp, char *list[], int nstr, int first_col, i extern void clsystem(char *cmd, struct _iobuf *taskout, struct _iobuf *taskerr); /* compile.c */ extern int compile(int opcode, ...); -extern int comstr(register char *s, memel *loc); +extern int comstr(char *s, memel *loc); extern char *comdstr(char *s); extern void catdstr(char *es, char *ns); /* debug.c */ extern void d_asmark(void); extern void d_assemble(void); -extern void d_stack(register XINT locpc, int ss, int endpc); -extern int d_instr(struct _iobuf *fp, char *prefix, register XINT locpc); +extern void d_stack(XINT locpc, int ss, int endpc); +extern int d_instr(struct _iobuf *fp, char *prefix, XINT locpc); extern void d_d(void); extern void d_p(void); extern void d_t(void); @@ -126,7 +126,7 @@ extern int scanftype(struct param *pp, struct operand *o); extern int c_scanmode(struct param *pp, struct operand *o); extern int scanlen(struct param *pp, struct operand *o); extern int scanmin(struct param *pp, struct operand *o); -extern int scanenum(register struct param *pp, register struct operand *o); +extern int scanenum(struct param *pp, struct operand *o); extern int scanmax(struct param *pp, struct operand *o); extern void proc_params(int npar); extern struct param *initparam(struct operand *op, int isparam, int type, int list); @@ -150,10 +150,10 @@ extern void e_pheader(struct pfile *pfp, int cmdline, int maxcol); extern void e_drawkey(void); extern void e_encode_vstring(struct param *pp, char *outbuf); extern void e_check_vals(char *string); -extern int e_undef(register char *s); +extern int e_undef(char *s); extern void e_rpterror(char *errstr); extern void e_clrerror(void); -extern char *e_getfield(register char *ip, char *outstr, int maxch); +extern char *e_getfield(char *ip, char *outstr, int maxch); extern int e_psetok(char *pset); extern void e_puterr(char *errmsg); extern void e_ttyexit(void); @@ -164,7 +164,7 @@ extern int e_colon (void); extern int editstring (char *string, int eparam); extern int e_moveup(int eparam); extern int e_movedown(int eparam); -extern char *e_tonextword(register char *ip); +extern char *e_tonextword(char *ip); extern char *e_toprevword(char *ip, char *string); extern void e_ctrl(char *cap); extern void e_goto(int col, int line); @@ -182,20 +182,20 @@ extern void callnewtask(char *name); extern void execnewtask(void); extern void mk_startupmsg(struct task *tp, char *cmd, int maxch); extern char *findexe(struct package *pkg, char *pkg_path); -extern void set_clio(register struct task *newtask); +extern void set_clio(struct task *newtask); extern struct param *ppfind(struct pfile *pfp, char *tn, char *pn, int pos, int abbrev); extern void psetreload(struct pfile *main_pfp, struct param *psetp); -extern void iofinish(register struct task *tp); +extern void iofinish(struct task *tp); extern void restor(struct task *tp); extern void oneof(void); extern void printcall(struct _iobuf *fp, struct task *tp); extern void print_call_line(struct _iobuf *out, int line, char *fname, int flags); -extern void killtask(register struct task *tp); +extern void killtask(struct task *tp); /* globals.c */ /* gquery.c */ extern char *gquery(struct param *pp, char *string); -extern char *minmax(register struct param *pp); -extern char *enumin(register struct param *pp); +extern char *minmax(struct param *pp); +extern char *enumin(struct param *pp); /* gram.c */ extern int yywrap(void); extern void yyerror(char *s); @@ -209,14 +209,14 @@ extern void show_param(struct ltask *ltp, struct param *pp, struct _iobuf *fp); extern void listhelp(struct package *pkp, int show_invis); extern void listallhelp(int show_invis); extern void breakout(char *full, char **pk, char **t, char **p, char **f); -extern int fieldcvt(register char *f); -extern int keyword(register char *tbl[], register char *s); +extern int fieldcvt(char *f); +extern int keyword(char *tbl[], char *s); extern void intrfunc(char *fname, int nargs); extern struct operand sexa(char *s); extern void sexa_to_index(double r, int *i1, int *i2); extern char *addpipe(void); extern char *getpipe(void); -extern void delpipes(register int npipes); +extern void delpipes(int npipes); extern char *pipefile(int pipecode); extern void loopincr(void); extern void loopdecr(void); @@ -245,14 +245,14 @@ extern int get_history(int record, char *command, int maxch); extern void fetch_history(char *recptr, char *command, int maxch); extern char *find_history(int record); extern void show_history(struct _iobuf *fp, int max_commands); -extern void pprompt(register char *string); -extern void get_prompt(register char *string); +extern void pprompt(char *string); +extern void get_prompt(char *string); extern void put_logfile(char *command); extern int open_logfile(char *fname); extern void close_logfile(char *fname); extern void reset_logfile(void); extern int edit_history_directive(char *args, char *new_cmd); -extern void print_command(register struct _iobuf *fp, char *command, char *marg1, char *marg2); +extern void print_command(struct _iobuf *fp, char *command, char *marg1, char *marg2); extern char *today(void); extern int what_record(void); extern void putlog(struct task *tp, char *usermsg); @@ -262,7 +262,7 @@ extern int lexicon(void); extern void lexinit(void); /* lists.c */ extern struct operand readlist(struct param *pp); -extern void closelist(register struct param *pp); +extern void closelist(struct param *pp); /* main.c */ extern int cmain_(short *cmd); extern void clexit(void); @@ -275,15 +275,15 @@ extern void onerr(void); extern void cl_amovi(int *ip, int *op, int len); /* modes.c */ extern int effmode(struct param *pp); -extern int taskmode(register struct task *tp); +extern int taskmode(struct task *tp); extern void query(struct param *pp); extern char *nextstr(char **pbuf, struct _iobuf *fp); extern char *nxtchr(char *p, struct _iobuf *fp); -extern void pquery(register struct param *pp, struct _iobuf *fp); -extern char *bkg_query(char *obuf, int maxch, register struct param *pp); +extern void pquery(struct param *pp, struct _iobuf *fp); +extern char *bkg_query(char *obuf, int maxch, struct param *pp); extern void service_bkgquery(int bkgno); extern void get_bkgqfiles(int bkgno, int pid, char *bkg_query_file, char *query_response_file); -extern int inrange(register struct param *pp, register struct operand *op); +extern int inrange(struct param *pp, struct operand *op); extern int range_check(struct param *pp); extern void setclmodes(struct task *tp); extern void parse_clmodes(struct param *pp, struct operand *newval); @@ -350,7 +350,7 @@ extern void o_fixlanguage (memel *argp); extern void o_doswitch (memel *argp); extern void o_pushindex (memel *argp); /* operand.c */ -extern void sprop(register char *outstr, register struct operand *op); +extern void sprop(char *outstr, struct operand *op); extern void spparval(char *outstr, struct param *pp); extern void fprop(struct _iobuf *fp, struct operand *op); extern void oprop(struct operand *op); @@ -360,17 +360,17 @@ extern void opcast(int newtype); extern struct operand makeop(char *str, int type); /* param.c */ extern struct param *paramfind(struct pfile *pfp, char *pname, int pos, int exact); -extern void paramset(register struct param *pp, int field); -extern void validparamget(register struct param *pp, int field); -extern void paramget(register struct param *pp, int field); +extern void paramset(struct param *pp, int field); +extern void validparamget(struct param *pp, int field); +extern void paramget(struct param *pp, int field); extern void makemode(struct param *pp, char *s); extern struct param *newparam(struct pfile *pfp); extern struct param *paramsrch(char *pkname, char *ltname, char *pname); extern int defpar(char *param_spec); extern int defvar(char *envvar); extern struct param *lookup_param(char *pkname, char *ltname, char *pname); -extern int printparam(struct param *pp, register struct _iobuf *fp); -extern void qputs(register char *str, register struct _iobuf *fp); +extern int printparam(struct param *pp, struct _iobuf *fp); +extern void qputs(char *str, struct _iobuf *fp); extern int pvaldefined(struct param *pp, char *s); extern struct param *newfakeparam(struct pfile *pfp, char *name, int pos, int type, int string_len); extern int getoffset(struct param *pp); @@ -378,10 +378,10 @@ extern void offsetmode(int mode); extern int size_array(struct param *pp); /* pfiles.c */ extern struct pfile *newpfile(struct ltask *ltp); -extern void pfileunlink(register struct pfile *pfp); -extern struct pfile *pfilefind(register struct ltask *ltp); +extern void pfileunlink(struct pfile *pfp); +extern struct pfile *pfilefind(struct ltask *ltp); extern struct pfile *pfilesrch(char *pfilepath); -extern struct pfile *pfileload(register struct ltask *ltp); +extern struct pfile *pfileload(struct ltask *ltp); extern int pfilemerge(struct pfile *npf, char *opfile); extern void pfileupdate(struct pfile *pfp); extern struct pfile *pfileread(struct ltask *ltp, char *pfilename, int checkmode); @@ -390,29 +390,29 @@ extern int pfileinit(struct ltask *ltp); extern int is_pfilename(char *opstr); extern void mkpfilename(char *buf, char *dir, char *pkname, char *ltname, char *extn); extern long filetime(char *fname, char *timecode); -extern struct pfile *pfilecopy(register struct pfile *pfp); +extern struct pfile *pfilecopy(struct pfile *pfp); extern void pfcopyback(struct pfile *pff); extern struct param *addparam(struct pfile *pfp, char *buf, struct _iobuf *fp); extern int ck_atoi(char *str, int *val); extern char *nextfield(char **pp, struct _iobuf *fp); -extern char *makelower(register char *cp); +extern char *makelower(char *cp); extern int scanmode(char *s); -extern int scantype(register char *s); +extern int scantype(char *s); /* prcache.c */ extern int pr_connect(char *process, char *command, struct _iobuf **in, struct _iobuf **out, struct _iobuf *t_in, struct _iobuf *t_out, struct _iobuf *t_err, struct _iobuf *t_gr, struct _iobuf *t_im, struct _iobuf *t_pl, int timeit); extern void pr_disconnect(int pid); extern int pr_pconnect(char *process, struct _iobuf **in, struct _iobuf **out); extern void pr_setcache(int new_szprcache); extern int pr_cachetask(char *ltname); -extern void pr_lock(register int pid); -extern int pr_unlock(register int pid); +extern void pr_lock(int pid); +extern int pr_unlock(int pid); extern void pr_listcache(struct _iobuf *fp); extern void pr_dumpcache(int pid, int break_locks); extern void pr_prunecache(int pno); extern int pr_getpno(void); extern int pr_pnametopid(char *pname); -extern void pr_chdir(register int pid, char *newdir); -extern void pr_envset(register int pid, char *envvar, char *valuestr); +extern void pr_chdir(int pid, char *newdir); +extern void pr_envset(int pid, char *envvar, char *valuestr); extern void pr_checkup(void); extern void pr_initcache(void); /* scan.c */ @@ -423,7 +423,7 @@ extern void lentst(char *buf); /* stack.c */ extern void pushmem(memel v); extern memel popmem(void); -extern void ppushmem(register memel p); +extern void ppushmem(memel p); extern struct operand pushop(struct operand *op); extern struct operand popop(void); extern struct task *pushtask(void); @@ -438,7 +438,7 @@ extern struct ltask *ltaskfind(struct package *pkp, char *name, int enable_abbre extern int deftask(char *task_spec); extern void taskunwind(void); extern struct ltask *addltask(struct package *pkp, char *ptname, char *ltname, int redef); -extern struct ltask *newltask(register struct package *pkp, char *lname, char *pname, struct ltask *oldltp); +extern struct ltask *newltask(struct package *pkp, char *lname, char *pname, struct ltask *oldltp); extern struct package *newpac(char *name, char *bin); /* unop.c */ extern void unop(int opcode); diff --git a/pkg/ecl/stack.c b/pkg/ecl/stack.c index 9118573e1..3126e10b6 100644 --- a/pkg/ecl/stack.c +++ b/pkg/ecl/stack.c @@ -80,7 +80,7 @@ popmem (void) void ppushmem (memel p) { - register memel q; + memel q; q = popmem(); pushmem(p); diff --git a/pkg/ecl/task.c b/pkg/ecl/task.c index 26a131aa0..8b7367a10 100644 --- a/pkg/ecl/task.c +++ b/pkg/ecl/task.c @@ -52,8 +52,8 @@ XINT pachead; /* dict index of first package */ struct ltask * cmdsrch (char *pkname, char *ltname) { - register struct ltask *ltp = NULL; - register struct package *pkp, *pkcand; + struct ltask *ltp = NULL; + struct package *pkp, *pkcand; static struct ltask pacltask; /* used to signal a package change */ struct ltask *temptaskset(); char *name; @@ -157,9 +157,9 @@ ltasksrch (char *pkname, char *ltname) struct ltask * _ltasksrch (char *pkname, char *ltname, struct package **o_pkp) { - register struct ltask *ltp, *ltcand; - register struct package *pkp; - register char first_char = ltname[0]; + struct ltask *ltp, *ltcand; + struct package *pkp; + char first_char = ltname[0]; ltcand = NULL; if (*pkname != '\0') { @@ -288,7 +288,7 @@ ltaskfind ( int enable_abbreviations /* enable abbrev. in search */ ) { - register struct ltask *ltp; + struct ltask *ltp; struct ltask *candidate; int n; @@ -415,8 +415,8 @@ taskunwind (void) struct ltask * addltask (struct package *pkp, char *ptname, char *ltname, int redef) { - register char *cp; - register struct ltask *ltp; + char *cp; + struct ltask *ltp; char *ltbase; int flags; @@ -501,9 +501,9 @@ addltask (struct package *pkp, char *ptname, char *ltname, int redef) * Null out all unused fields. */ struct ltask * -newltask (register struct package *pkp, char *lname, char *pname, struct ltask *oldltp) +newltask (struct package *pkp, char *lname, char *pname, struct ltask *oldltp) { - register struct ltask *ltp, *newltp; + struct ltask *ltp, *newltp; if (oldltp == NULL) { newltp = (struct ltask *) memneed (LTASKSIZ); @@ -550,7 +550,7 @@ newltask (register struct package *pkp, char *lname, char *pname, struct ltask * struct package * newpac (char *name, char *bin) { - register struct package *pkp; + struct package *pkp; if (pacfind (name) != NULL) cl_error (E_UERR, "package `%s' already exists", name); diff --git a/pkg/ecl/task.h b/pkg/ecl/task.h index 3e687e60a..721a31cff 100644 --- a/pkg/ecl/task.h +++ b/pkg/ecl/task.h @@ -219,7 +219,7 @@ struct package { #define TCALLSIZ btoi (sizeof (struct task_call)) struct package *newpac(char *name, char *bin), *pacfind(char *name); -struct ltask *addltask(struct package *pkp, char *ptname, char *ltname, int redef), *newltask(register struct package *pkp, char *lname, char *pname, struct ltask *oldltp), *ltaskfind(struct package *pkp, char *name, int enable_abbreviations), *cmdsrch(char *pkname, char *ltname); +struct ltask *addltask(struct package *pkp, char *ptname, char *ltname, int redef), *newltask(struct package *pkp, char *lname, char *pname, struct ltask *oldltp), *ltaskfind(struct package *pkp, char *name, int enable_abbreviations), *cmdsrch(char *pkname, char *ltname); struct ltask *ltasksrch(char *pkname, char *ltname), *_ltasksrch(char *pkname, char *ltname, struct package **o_pkp); struct task *pushtask(void), *poptask(void); int deftask(char *task_spec), defpac(char *pkname); diff --git a/pkg/ecl/unop.c b/pkg/ecl/unop.c index e6909209b..649183008 100644 --- a/pkg/ecl/unop.c +++ b/pkg/ecl/unop.c @@ -40,8 +40,8 @@ extern int cldebug; void unop (int opcode) { - register int out_type; /* bool, int, real, string */ - register int in_type; /* bool, int, real, string */ + int out_type; /* bool, int, real, string */ + int in_type; /* bool, int, real, string */ struct operand o, result; double rval=0.0, rresult; /* input value, result */ long ival=0, iresult;