From: Jon Trulson Date: Wed, 27 Jun 2018 23:18:06 +0000 (-0600) Subject: dtksh: remove register keyword X-Git-Tag: 2.3.0a~309 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=97264ba971cf0812ab95a9c9a853edb334dbe4e3;p=oweals%2Fcde.git dtksh: remove register keyword --- diff --git a/cde/programs/dtksh/XtCvtrs.c b/cde/programs/dtksh/XtCvtrs.c index 0ded7d79..570b9586 100644 --- a/cde/programs/dtksh/XtCvtrs.c +++ b/cde/programs/dtksh/XtCvtrs.c @@ -200,11 +200,11 @@ DtCompareISOLatin1( char *first, char *second ) { - register unsigned char *ap, *bp; + unsigned char *ap, *bp; for (ap = (unsigned char *) first, bp = (unsigned char *) second; *ap && *bp; ap++, bp++) { - register unsigned char a, b; + unsigned char a, b; if ((a = *ap) != (b = *bp)) { /* try lowercasing and try again */ diff --git a/cde/programs/dtksh/docall.c b/cde/programs/dtksh/docall.c index 9980d6d6..f9367682 100644 --- a/cde/programs/dtksh/docall.c +++ b/cde/programs/dtksh/docall.c @@ -294,7 +294,7 @@ do_call( char *p; char dorun, promptflag; unsigned char freeval, ret_type; - register int i, j, ret; + int i, j, ret; char * msg; char * errbuf; char * errmsg; diff --git a/cde/programs/dtksh/dtkcmds.c b/cde/programs/dtksh/dtkcmds.c index 2e66355b..1c1e273f 100644 --- a/cde/programs/dtksh/dtkcmds.c +++ b/cde/programs/dtksh/dtkcmds.c @@ -69,7 +69,7 @@ #include "msgs.h" #include -extern Namval_t *sh_assignok(register Namval_t *np,int add); +extern Namval_t *sh_assignok(Namval_t *np,int add); static void PendingDestroy( @@ -542,8 +542,8 @@ parse_args( char ** pargv , Boolean postponePixmaps ) { - register int i; - register char *colon, *resource, *val, *p; + int i; + char *colon, *resource, *val, *p; XtArgVal argval; int freeflag, len; char * errmsg; @@ -638,7 +638,7 @@ free_args( int n, Arg *args ) { - register int i; + int i; /* * Free up argument pointers @@ -700,7 +700,7 @@ _CreateWidget( wtab_t *w, *pw, *wtab; char *wname, *wclass, *parentid, *var; Arg args[MAXARGS]; - register int i; + int i; int n; char * errmsg; int pargc; @@ -777,7 +777,7 @@ do_XtCreateApplicationShell( wtab_t *w, *wtab; char *wname, *wclass, *var; Arg args[MAXARGS]; - register int i; + int i; int n; char * errmsg; int pargc; @@ -916,7 +916,7 @@ do_single_widget_arg_func( char **argv ) { wtab_t *w; - register int i; + int i; char * errmsg; if (argc < 2) { @@ -950,7 +950,7 @@ do_single_widget_test_func( char **argv ) { wtab_t *w; - register int i; + int i; char * errmsg; if (argc != 2) { @@ -985,7 +985,7 @@ do_XtIsShell( char *argv[] ) { wtab_t *w; - register int i; + int i; char * errmsg; if (argc != 2) @@ -1044,7 +1044,7 @@ do_XtMapWidget( char *argv[] ) { wtab_t *w; - register int i; + int i; char * errmsg; if (argc < 2) { @@ -1068,7 +1068,7 @@ do_XtUnmapWidget( char **argv ) { wtab_t *w; - register int i; + int i; char * errmsg; if (argc < 2) { @@ -1681,7 +1681,7 @@ do_XtGetValues( int argc, char **argv ) { - register int i, j; + int i, j; int n; char *arg0 = argv[0]; char *val, *p, *str; @@ -2030,7 +2030,7 @@ do_managelist_func( int (*func)() ) { wtab_t *w; - register int i; + int i; Widget widgets[MAXARGS]; Cardinal nwidgets; char * errmsg; @@ -2059,7 +2059,7 @@ do_XtIsSubclass( char *argv[] ) { wtab_t *w; - register int i; + int i; char * errmsg; if (argc != 3) @@ -2095,7 +2095,7 @@ do_XtClass( char *argv[] ) { wtab_t *w; - register int i; + int i; char * errmsg; WidgetClass class; @@ -2346,7 +2346,7 @@ do_XtRemoveAllCallbacks( char *argv[] ) { wtab_t *w; - register int i; + int i; char * errmsg; if (argc != 3) { @@ -2480,7 +2480,7 @@ invokeXDrawFunction( unsigned int width, height; char *s; char *sp; - register int i; + int i; int mode, parse; int text = FALSE; int (*func)(); @@ -3307,7 +3307,7 @@ do_XtAddInput( int argc, char *argv[] ) { - register int i, j; + int i, j; int fd; char *arg0 = argv[0]; char *variable; @@ -3811,7 +3811,7 @@ stdInputCB( char cmdbuf[LINESIZE]; int cmd; char *p; - register int i, n, j; + int i, n, j; char * errmsg; int len; diff --git a/cde/programs/dtksh/dtkcvt.c b/cde/programs/dtksh/dtkcvt.c index cbd2e077..a03ccf6f 100644 --- a/cde/programs/dtksh/dtkcvt.c +++ b/cde/programs/dtksh/dtkcvt.c @@ -450,7 +450,7 @@ DtkshCvtCallbackToString( { XtCallbackList cb; char buf[2048]; - register char *p; + char *p; char * errmsg; Boolean count = 0; diff --git a/cde/programs/dtksh/exksh_prpar.c b/cde/programs/dtksh/exksh_prpar.c index 395f4c34..85dfcc71 100644 --- a/cde/programs/dtksh/exksh_prpar.c +++ b/cde/programs/dtksh/exksh_prpar.c @@ -139,7 +139,7 @@ xk_prin_int( unsigned long *old_v ) { - register int i, printed = 0; + int i, printed = 0; struct symlist *sym; unsigned long v; @@ -226,7 +226,7 @@ xk_par_int( long *v, struct envsymbols *env ) { - register int ret, base; + int ret, base; char *p, *q, *pp; char nbuf[512]; @@ -339,7 +339,7 @@ xk_prin_charstr( unsigned char *str, int len ) { - register int i; + int i; if (str == NULL) *buf += lsprintf(*buf, "NULL"); @@ -390,7 +390,7 @@ xk_prin_hexstr( char *str, int len ) { - register int i; + int i; unsigned char tempc; if (str == NULL) @@ -443,7 +443,7 @@ xk_par_charstr( char **str, int *len ) { - register int i; + int i; char delim; int didmalloc = FALSE, getmode; char cbuf[3]; /* conversion buffer for hex strings */ diff --git a/cde/programs/dtksh/exksh_tbls.c b/cde/programs/dtksh/exksh_tbls.c index 634f8cc1..4b157464 100644 --- a/cde/programs/dtksh/exksh_tbls.c +++ b/cde/programs/dtksh/exksh_tbls.c @@ -168,7 +168,7 @@ xk_parse( memtbl_t *(*tbl_find)() ) { memtbl_t *ntbl; - register int i = 0; + int i = 0; int skind, delim_type; long val = 0; /* used for choice selection */ char *np; @@ -726,7 +726,7 @@ xk_print( memtbl_t *(*tbl_find)() ) { memtbl_t *ntbl; - register int i; + int i; long val; /* used for choice selection */ char *np; int delim = _Delim; @@ -962,7 +962,7 @@ xk_free( memtbl_t *(*tbl_find)() ) { memtbl_t *ntbl; - register int i; + int i; long val; /* used for choice selection */ char *np; int delim = _Delim; diff --git a/cde/programs/dtksh/extra.c b/cde/programs/dtksh/extra.c index 9f6ec459..f183ab4c 100644 --- a/cde/programs/dtksh/extra.c +++ b/cde/programs/dtksh/extra.c @@ -113,7 +113,7 @@ env_set_var( char *var, char *val ) { - register int len; + int len; char tmp[512]; char *set = &tmp[0]; diff --git a/cde/programs/dtksh/ksh93/ship/shipop.c b/cde/programs/dtksh/ksh93/ship/shipop.c index df95e855..ead47dc8 100644 --- a/cde/programs/dtksh/ksh93/ship/shipop.c +++ b/cde/programs/dtksh/ksh93/ship/shipop.c @@ -129,7 +129,7 @@ error __PARAM__((int level, const char* file, const char* msg), (level, file, ms */ static int -shipnewer __PARAM__((register char** argv), (argv)) __OTORP__(register char** argv;){ +shipnewer __PARAM__((char** argv), (argv)) __OTORP__(char** argv;){ unsigned long ref; struct stat st; @@ -146,9 +146,9 @@ static char buf[4096]; static unsigned long sealfile __PARAM__((char* file, int fd, unsigned long s), (file, fd, s)) __OTORP__(char* file; int fd; unsigned long s;){ - register unsigned char* b; - register unsigned char* e; - register int n; + unsigned char* b; + unsigned char* e; + int n; HASHPART(s, 0); while ((n = read(fd, buf, sizeof(buf))) > 0) @@ -166,9 +166,9 @@ sealfile __PARAM__((char* file, int fd, unsigned long s), (file, fd, s)) __OTORP */ static int -shipseal __PARAM__((register char** argv), (argv)) __OTORP__(register char** argv;){ - register char* f; - register int fd; +shipseal __PARAM__((char** argv), (argv)) __OTORP__(char** argv;){ + char* f; + int fd; unsigned long s; s = 0; @@ -192,9 +192,9 @@ shipseal __PARAM__((register char** argv), (argv)) __OTORP__(register char** arg */ static int -shipstate __PARAM__((register char** argv), (argv)) __OTORP__(register char** argv;){ - register char* s; - register int c; +shipstate __PARAM__((char** argv), (argv)) __OTORP__(char** argv;){ + char* s; + int c; long ref; struct stat st; @@ -225,7 +225,7 @@ shipstate __PARAM__((register char** argv), (argv)) __OTORP__(register char** ar */ static int -shiptime __PARAM__((register char** argv), (argv)) __OTORP__(register char** argv;){ +shiptime __PARAM__((char** argv), (argv)) __OTORP__(char** argv;){ struct stat st; time_t date; @@ -262,8 +262,8 @@ static struct optab ops[] = int main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){ - register char* s; - register int i; + char* s; + int i; if (!(s = *++argv)) exit(0); diff --git a/cde/programs/dtksh/ksh93/ship/shipproto.c b/cde/programs/dtksh/ksh93/ship/shipproto.c index a5f34960..0688e245 100644 --- a/cde/programs/dtksh/ksh93/ship/shipproto.c +++ b/cde/programs/dtksh/ksh93/ship/shipproto.c @@ -2037,12 +2037,12 @@ static char* oct = &hex[14]; void -ppfsm __PARAM__((int op, register char* s), (op, s)) __OTORP__(int op; register char* s;){ - register int c; - register int n; - register int i; - register short* rp; - register struct fsminit* fp; +ppfsm __PARAM__((int op, char* s), (op, s)) __OTORP__(int op; char* s;){ + int c; + int n; + int i; + short* rp; + struct fsminit* fp; @@ -2556,8 +2556,8 @@ static int errors; static int -sstrlen __PARAM__((register char* s), (s)) __OTORP__(register char* s;){ - register char* b; +sstrlen __PARAM__((char* s), (s)) __OTORP__(char* s;){ + char* b; for (b = s; *s; s++); return(s - b); @@ -2568,8 +2568,8 @@ sstrlen __PARAM__((register char* s), (s)) __OTORP__(register char* s;){ static int -sstrncmp __PARAM__((register char* s, register char* t, register int n), (s, t, n)) __OTORP__(register char* s; register char* t; register int n;){ - register char* e = s + n; +sstrncmp __PARAM__((char* s, char* t, int n), (s, t, n)) __OTORP__(char* s; char* t; int n;){ + char* e = s + n; while (s < e) { @@ -2585,8 +2585,8 @@ sstrncmp __PARAM__((register char* s, register char* t, register int n), (s, t, static char* -memcopy __PARAM__((register char* s, register char* t, int n), (s, t, n)) __OTORP__(register char* s; register char* t; int n;){ - register char* e = t + n; +memcopy __PARAM__((char* s, char* t, int n), (s, t, n)) __OTORP__(char* s; char* t; int n;){ + char* e = t + n; while (t < e) *s++ = *t++; return(s); @@ -2597,7 +2597,7 @@ memcopy __PARAM__((register char* s, register char* t, int n), (s, t, n)) __OTOR static char* -strcopy __PARAM__((register char* s, register char* t), (s, t)) __OTORP__(register char* s; register char* t;){ +strcopy __PARAM__((char* s, char* t), (s, t)) __OTORP__(char* s; char* t;){ while (*s++ = *t++); return(s - 1); } @@ -2612,8 +2612,8 @@ strcopy __PARAM__((register char* s, register char* t), (s, t)) __OTORP__(regist static char* -comment __PARAM__((register char* p, register char* s, register int n, int u), (p, s, n, u)) __OTORP__(register char* p; register char* s; register int n; int u;){ - register char* e; +comment __PARAM__((char* p, char* s, int n, int u), (p, s, n, u)) __OTORP__(char* p; char* s; int n; int u;){ + char* e; char* m; if (!s) @@ -2675,10 +2675,10 @@ typedef struct } Notice_t; static char* -copyright __PARAM__((register char* p, register char* s), (p, s)) __OTORP__(register char* p; register char* s;){ - register char* v; - register char* x; - register int c; +copyright __PARAM__((char* p, char* s), (p, s)) __OTORP__(char* p; char* s;){ + char* v; + char* x; + int c; int i; int n; unsigned long h; @@ -2909,8 +2909,8 @@ copyright __PARAM__((register char* p, register char* s), (p, s)) __OTORP__(regi static char* -number __PARAM__((register char* p, register long n), (p, n)) __OTORP__(register char* p; register long n;){ - register long d; +number __PARAM__((char* p, long n), (p, n)) __OTORP__(char* p; long n;){ + long d; for (d = 1000000; d > 1; d /= 10) if (n >= d) *p++ = '0' + (n / d) % 10; @@ -2925,13 +2925,13 @@ number __PARAM__((register char* p, register long n), (p, n)) __OTORP__(register static void proto_error __PARAM__((char* iob, int level, char* msg, char* arg), (iob, level, msg, arg)) __OTORP__(char* iob; int level; char* msg; char* arg;){ - register char* p; + char* p; char buf[1024]; p = strcopy(buf, "proto: "); if (iob) { - register struct proto* proto = (struct proto*)(iob - sizeof(struct proto)); + struct proto* proto = (struct proto*)(iob - sizeof(struct proto)); if (proto->line) { @@ -2977,7 +2977,7 @@ proto_error __PARAM__((char* iob, int level, char* msg, char* arg), (iob, level, static char* -linesync __PARAM__((register struct proto* proto, register char* p, register long n), (proto, p, n)) __OTORP__(register struct proto* proto; register char* p; register long n;){ +linesync __PARAM__((struct proto* proto, char* p, long n), (proto, p, n)) __OTORP__(struct proto* proto; char* p; long n;){ if (proto->flags & (1L<<12)) @@ -3077,12 +3077,12 @@ init __PARAM__((char* op, int flags), (op, flags)) __OTORP__(char* op; int flags static int -lex __PARAM__((register struct proto* proto, register long flags), (proto, flags)) __OTORP__(register struct proto* proto; register long flags;){ - register char* ip; - register char* op; - register int c; - register int state; - register short* rp; +lex __PARAM__((struct proto* proto, long flags), (proto, flags)) __OTORP__(struct proto* proto; long flags;){ + char* ip; + char* op; + int c; + int state; + short* rp; char* m; char* e; char* t; @@ -4478,7 +4478,7 @@ if !defined(va_start)\n\ void pppclose __PARAM__((char* iob), (iob)) __OTORP__(char* iob;){ - register struct proto* proto = (struct proto*)(iob - sizeof(struct proto)); + struct proto* proto = (struct proto*)(iob - sizeof(struct proto)); if (proto->flags & (1L<<15)) close(proto->fd); free((char*)proto); @@ -4496,10 +4496,10 @@ pppclose __PARAM__((char* iob), (iob)) __OTORP__(char* iob;){ char* pppopen __PARAM__((char* file, int fd, char* notice, int flags), (file, fd, notice, flags)) __OTORP__(char* file; int fd; char* notice; int flags;){ - register struct proto* proto; - register char* iob; - register long n; - register char* s; + struct proto* proto; + char* iob; + long n; + char* s; int pragma; char* b; @@ -4771,8 +4771,8 @@ pppopen __PARAM__((char* file, int fd, char* notice, int flags), (file, fd, noti int pppread __PARAM__((char* iob), (iob)) __OTORP__(char* iob;){ - register struct proto* proto = (struct proto*)(iob - sizeof(struct proto)); - register int n; + struct proto* proto = (struct proto*)(iob - sizeof(struct proto)); + int n; if (proto->flags & (1L<<17)) { @@ -4796,9 +4796,9 @@ pppread __PARAM__((char* iob), (iob)) __OTORP__(char* iob;){ if (proto->flags & (1L<<29)) { - register char* ip = proto->ip; - register char* op = proto->ob; - register char* ep = proto->ob + proto->oz - 2; + char* ip = proto->ip; + char* op = proto->ob; + char* ep = proto->ob + proto->oz - 2; if (!*ip) { diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/alarm.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/alarm.c index df711165..ae102ab2 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/alarm.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/alarm.c @@ -120,7 +120,7 @@ static void trap_timeout __PROTO__((__V_*)); * insert timeout item on current given list in sorted order */ static __V_ *time_add __PARAM__((struct tevent *item, __V_ *list), (item, list)) __OTORP__(struct tevent *item; __V_ *list;){ - register struct tevent *tp = (struct tevent*)list; + struct tevent *tp = (struct tevent*)list; if(!tp || item->milli < tp->milli) { item->next = tp; @@ -141,8 +141,8 @@ static __V_ *time_add __PARAM__((struct tevent *item, __V_ *list), (item, list)) /* * delete timeout item from current given list, delete timer */ -static __V_ *time_delete __PARAM__((register struct tevent *item, __V_ *list), (item, list)) __OTORP__(register struct tevent *item; __V_ *list;){ - register struct tevent *tp = (struct tevent*)list; +static __V_ *time_delete __PARAM__((struct tevent *item, __V_ *list), (item, list)) __OTORP__(struct tevent *item; __V_ *list;){ + struct tevent *tp = (struct tevent*)list; if(item==tp) list = (__V_*)tp->next; else @@ -158,12 +158,12 @@ static __V_ *time_delete __PARAM__((register struct tevent *item, __V_ *list), } static void print_alarms __PARAM__((__V_ *list), (list)) __OTORP__(__V_ *list;){ - register struct tevent *tp = (struct tevent*)list; + struct tevent *tp = (struct tevent*)list; while(tp) { if(tp->timeout) { - register char *name = nv_name(tp->node); + char *name = nv_name(tp->node); if(tp->flags&R_FLAG) { double d = tp->milli; @@ -177,7 +177,7 @@ static void print_alarms __PARAM__((__V_ *list), (list)) __OTORP__(__V_ *list;){ } static void trap_timeout __PARAM__((__V_* handle), (handle)) __OTORP__(__V_* handle;){ - register struct tevent *tp = (struct tevent*)handle; + struct tevent *tp = (struct tevent*)handle; sh.trapnote |= SH_SIGTRAP; if(!(tp->flags&R_FLAG)) tp->timeout = 0; @@ -188,8 +188,8 @@ static void trap_timeout __PARAM__((__V_* handle), (handle)) __OTORP__(__V_* han } void sh_timetraps __PARAM__((void), ()){ - register struct tevent *tp, *tpnext; - register struct tevent *tptop; + struct tevent *tp, *tpnext; + struct tevent *tptop; while(1) { sh.sigflag[SIGALRM] &= ~SH_SIGTRAP; @@ -222,7 +222,7 @@ void sh_timetraps __PARAM__((void), ()){ static char *setdisc __PARAM__((Namval_t *np, const char *event, Namval_t* action, Namfun_t *fp), (np, event, action, fp)) __OTORP__(Namval_t *np; const char *event; Namval_t* action; Namfun_t *fp;){ - register struct tevent *tp = (struct tevent*)fp; + struct tevent *tp = (struct tevent*)fp; if(!event) return(action?"":(char*)ALARM); if(strcmp(event,ALARM)!=0) @@ -241,8 +241,8 @@ static char *setdisc __PARAM__((Namval_t *np, const char *event, Namval_t* actio * catch assignments and set alarm traps */ static void putval __PARAM__((Namval_t* np, const char* val, int flag, Namfun_t* fp), (np, val, flag, fp)) __OTORP__(Namval_t* np; const char* val; int flag; Namfun_t* fp;){ - register struct tevent *tp; - register double d; + struct tevent *tp; + double d; if(val) { double now; @@ -290,9 +290,9 @@ static const Namdisc_t alarmdisc = }; int b_alarm __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ - register int n,rflag=0; - register Namval_t *np; - register struct tevent *tp; + int n,rflag=0; + Namval_t *np; + struct tevent *tp; NOT_USED(extra); while (n = optget(argv, sh_optalarm)) switch (n) { diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/cd_pwd.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/cd_pwd.c index 18dfeba6..da85d280 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/cd_pwd.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/cd_pwd.c @@ -102,8 +102,8 @@ #include int b_cd __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc; char *argv[];__V_ *extra;){ - register char *dir, *cdpath=""; - register const char *dp; + char *dir, *cdpath=""; + const char *dp; int saverrno=0; int rval,flag = (sh_isoption(SH_PHYSICAL)!=0); char *oldpwd; @@ -174,7 +174,7 @@ int b_cd __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extra)) __ } if(!flag) { - register char *cp; + char *cp; stakseek(PATH_MAX+PATH_OFFSET); #ifdef SHOPT_FS_3D if(!(cp = pathcanon(stakptr(PATH_OFFSET),PATH_DOTDOT))) @@ -235,8 +235,8 @@ success: } int b_pwd __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc; char *argv[];__V_ *extra;){ - register int n, flag = (sh_isoption(SH_PHYSICAL)!=0); - register char *cp; + int n, flag = (sh_isoption(SH_PHYSICAL)!=0); + char *cp; NOT_USED(extra); NOT_USED(argc); while((n = optget(argv,sh_optpwd))) switch(n) diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/cflow.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/cflow.c index a28990a6..ccbd2da0 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/cflow.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/cflow.c @@ -102,9 +102,9 @@ /* * return and exit */ -int b_ret_exit __PARAM__((register int n, register char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(register int n; register char *argv[];__V_ *extra;){ +int b_ret_exit __PARAM__((int n, char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(int n; char *argv[];__V_ *extra;){ struct checkpt *pp = (struct checkpt*)sh.jmplist; - register char *arg; + char *arg; NOT_USED(extra); while((n = optget(argv,sh_optcflow))) switch(n) { @@ -133,9 +133,9 @@ done: /* * break and continue */ -int b_brk_cont __PARAM__((register int n, register char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(register int n; register char *argv[];__V_ *extra;){ +int b_brk_cont __PARAM__((int n, char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(int n; char *argv[];__V_ *extra;){ char *arg; - register int cont= **argv=='c'; + int cont= **argv=='c'; NOT_USED(extra); while((n = optget(argv,sh_optcflow))) switch(n) { diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/getconf.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/getconf.c index 8374470a..0bf7ddb2 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/getconf.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/getconf.c @@ -103,10 +103,10 @@ #define next_config(p) ((Shtable_t*)((char*)(p) + sizeof(*shtab_config))) #define MIN_LEN 20 -int b_getconf __PARAM__((register int argc, char *argv[]), (argc, argv)) __OTORP__(register int argc; char *argv[];){ - register int m,n; - register long val; - register const char *name, *path=""; +int b_getconf __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){ + int m,n; + long val; + const char *name, *path=""; int offset = staktell(); const Shtable_t *tp = shtab_config; error_info.id = argv[0]; diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/getopts.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/getopts.c index d64d3a61..c6abdbcc 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/getopts.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/getopts.c @@ -99,9 +99,9 @@ #include "builtins.h" int b_getopts __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ - register char *options=error_info.context->id; - register Namval_t *np; - register int flag, mode, r=0; + char *options=error_info.context->id; + Namval_t *np; + int flag, mode, r=0; static char value[2], key[2]; NOT_USED(extra); while((flag = optget(argv,sh_optgetopts))) switch(flag) diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/hist.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/hist.c index 88323720..35001f20 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/hist.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/hist.c @@ -106,9 +106,9 @@ static void hist_subst __PROTO__((const char*, int fd, char*)); int b_hist __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[]; __V_ *extra;){ - register History_t *hp; - register char *arg; - register int flag,fdo; + History_t *hp; + char *arg; + int flag,fdo; struct stat statb; time_t before; Sfio_t *outfile; @@ -301,9 +301,9 @@ int b_hist __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra)) */ static void hist_subst __PARAM__((const char *command,int fd,char *replace), (command, fd, replace)) __OTORP__(const char *command;int fd;char *replace;){ - register char *newp=replace; - register char *sp; - register int c; + char *newp=replace; + char *sp; + int c; off_t size; char *string; while(*++newp != '='); /* skip to '=' */ diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/misc.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/misc.c index 890a13c6..56731d0e 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/misc.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/misc.c @@ -109,7 +109,7 @@ static void noexport __PROTO__((Namval_t*)); static char *arg0; int b_exec __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[]; __V_ *extra;){ - register int n; + int n; sh.st.ioset = 0; clear = 0; NOT_USED(extra); @@ -137,7 +137,7 @@ int b_exec __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra return(0); } -static void noexport __PARAM__((register Namval_t* np), (np)) __OTORP__(register Namval_t* np;){ +static void noexport __PARAM__((Namval_t* np), (np)) __OTORP__(Namval_t* np;){ nv_offattr(np,NV_EXPORT); } @@ -149,9 +149,9 @@ int b_login __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra error(ERROR_exit(1),e_restricted,argv[0]); else { - register struct argnod *arg=sh.envlist; - register Namval_t* np; - register char *cp; + struct argnod *arg=sh.envlist; + Namval_t* np; + char *cp; if(sh.subshell) sh_subfork(); if(clear) @@ -183,8 +183,8 @@ int b_login __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra } int b_let __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ - register int r; - register char *arg; + int r; + char *arg; NOT_USED(argc); NOT_USED(extra); while (r = optget(argv,sh_optlet)) switch (r) @@ -205,7 +205,7 @@ int b_let __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) } int b_eval __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[]; __V_ *extra;){ - register int r; + int r; NOT_USED(argc); NOT_USED(extra); while (r = optget(argv,sh_opteval)) switch (r) @@ -228,10 +228,10 @@ int b_eval __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra return(sh.exitval); } -int b_dot_cmd __PARAM__((register int n,char *argv[],__V_* extra), (n, argv, extra)) __OTORP__(register int n;char *argv[];__V_* extra;){ - register char *script; - register Namval_t *np; - register int jmpval; +int b_dot_cmd __PARAM__((int n,char *argv[],__V_* extra), (n, argv, extra)) __OTORP__(int n;char *argv[];__V_* extra;){ + char *script; + Namval_t *np; + int jmpval; int fd; struct dolnod *argsave=0, *saveargfor; char **saveargv; @@ -314,7 +314,7 @@ int b_dot_cmd __PARAM__((register int n,char *argv[],__V_* extra), (n, argv, /* * null, true command */ -int b_true __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;register char *argv[];__V_ *extra;){ +int b_true __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ NOT_USED(argc); NOT_USED(argv[0]); NOT_USED(extra); @@ -324,15 +324,15 @@ int b_true __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, arg /* * false command */ -int b_false __PARAM__((int argc,register char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc;register char *argv[]; __V_ *extra;){ +int b_false __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[]; __V_ *extra;){ NOT_USED(argc); NOT_USED(argv[0]); NOT_USED(extra); return(1); } -int b_shift __PARAM__((register int n, register char *argv[], __V_ *extra), (n, argv, extra)) __OTORP__(register int n; register char *argv[]; __V_ *extra;){ - register char *arg; +int b_shift __PARAM__((int n, char *argv[], __V_ *extra), (n, argv, extra)) __OTORP__(int n; char *argv[]; __V_ *extra;){ + char *arg; NOT_USED(extra); while((n = optget(argv,sh_optcflow))) switch(n) { @@ -357,7 +357,7 @@ int b_shift __PARAM__((register int n, register char *argv[], __V_ *extra), ( return(0); } -int b_wait __PARAM__((register int n,register char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(register int n;register char *argv[];__V_ *extra;){ +int b_wait __PARAM__((int n,char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(int n;char *argv[];__V_ *extra;){ NOT_USED(extra); while((n = optget(argv,sh_optjoblist))) switch(n) { @@ -376,8 +376,8 @@ int b_wait __PARAM__((register int n,register char *argv[],__V_ *extra), (n, } #ifdef JOBS -int b_bg_fg __PARAM__((register int n,register char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(register int n;register char *argv[];__V_ *extra;){ - register int flag = **argv; +int b_bg_fg __PARAM__((int n,char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(int n;char *argv[];__V_ *extra;){ + int flag = **argv; NOT_USED(extra); while((n = optget(argv,sh_optjoblist))) switch(n) { @@ -404,8 +404,8 @@ int b_bg_fg __PARAM__((register int n,register char *argv[],__V_ *extra), (n, return(sh.exitval); } -int b_jobs __PARAM__((register int n,char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(register int n;char *argv[];__V_ *extra;){ - register int flag = 0; +int b_jobs __PARAM__((int n,char *argv[],__V_ *extra), (n, argv, extra)) __OTORP__(int n;char *argv[];__V_ *extra;){ + int flag = 0; NOT_USED(extra); while((n = optget(argv,sh_optjobs))) switch(n) { @@ -443,8 +443,8 @@ int b_jobs __PARAM__((register int n,char *argv[],__V_ *extra), (n, argv, ext * setuniv() calls. */ int b_universe __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc; char *argv[];__V_ *extra;){ - register char *arg; - register int n; + char *arg; + int n; NOT_USED(extra); while((n = optget(argv,sh_optuniverse))) switch(n) { @@ -476,10 +476,10 @@ int b_universe __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extr #endif /* cmd_universe */ #ifdef SHOPT_FS_3D - int b_vpath_map __PARAM__((register int argc,char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(register int argc;char *argv[]; __V_ *extra;){ - register int flag, n; - register const char *optstr; - register char *vend; + int b_vpath_map __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[]; __V_ *extra;){ + int flag, n; + const char *optstr; + char *vend; NOT_USED(extra); if(argv[0][1]=='p') { diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/print.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/print.c index 6d814f99..7c9b637e 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/print.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/print.c @@ -149,7 +149,7 @@ static int outexceptf __PARAM__((Sfio_t* iop, int mode, Sfdisc_t* dp), (iop, mod /* This mess is because /bin/echo on BSD is different */ if(!sh.universe) { - register char *universe; + char *universe; if(universe=astconf("_AST_UNIVERSE",0,0)) bsd_univ = (strcmp(universe,"ucb")==0); sh.universe = 1; @@ -177,8 +177,8 @@ int b_printf __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, ext */ int b_print __PARAM__((int argc, char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc; char *argv[]; __V_ *extra;){ - register Sfio_t *outfile; - register int n, fd = 1; + Sfio_t *outfile; + int n, fd = 1; const char *msg = e_file+4; char *format = 0; int sflag = 0, nflag, rflag; @@ -344,8 +344,8 @@ skip2: */ int sh_echolist __PARAM__((Sfio_t *outfile, int raw, char *argv[]), (outfile, raw, argv)) __OTORP__(Sfio_t *outfile; int raw; char *argv[];){ - register char *cp; - register int n; + char *cp; + int n; while(!cescape && (cp= *argv++)) { if(!raw && (n=fmtvecho(cp))>=0) @@ -364,7 +364,7 @@ int sh_echolist __PARAM__((Sfio_t *outfile, int raw, char *argv[]), (outfile, ra static char *genformat __PARAM__((char *format), (format)) __OTORP__(char *format;){ - register char *fp; + char *fp; stakseek(0); stakputs(preformat); stakputs(format); @@ -374,9 +374,9 @@ static char *genformat __PARAM__((char *format), (format)) __OTORP__(char *forma } static int getarg __PARAM__((int format,union types_t *value), (format, value)) __OTORP__(int format;union types_t *value;){ - register char *argp = *nextarg; + char *argp = *nextarg; char *lastchar = ""; - register int neg = 0; + int neg = 0; if(!argp) { switch(format) @@ -488,7 +488,7 @@ static int getarg __PARAM__((int format,union types_t *value), (format, value)) * This routine adds new % escape sequences to printf */ static int extend __PARAM__((char *invalue,int format,int precis,char **outval), (invalue, format, precis, outval)) __OTORP__(char *invalue;int format;int precis;char **outval;){ - register int n; + int n; NOT_USED(precis); switch(format) { @@ -528,9 +528,9 @@ static int extend __PARAM__((char *invalue,int format,int precis,char **outval), static int fmtvecho __PARAM__((const char *string), (string)) __OTORP__(const char *string;){ static char *nullarg; - register const char *cp = string, *cpmax; - register int c; - register int offset = staktell(); + const char *cp = string, *cpmax; + int c; + int offset = staktell(); int chlen; if (MB_CUR_MAX > 1) { diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/read.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/read.c index 270c0f58..caba67fb 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/read.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/read.c @@ -111,8 +111,8 @@ #define D_FLAG 6 /* must be number of bits for all flags */ int b_read __PARAM__((int argc,char *argv[], __V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[]; __V_ *extra;){ - register char *name; - register int r, flags=0, fd=0; + char *name; + int r, flags=0, fd=0; long timeout = 1000*sh.tmout; int save_prompt; NOT_USED(argc); @@ -203,11 +203,11 @@ static void timedout __PARAM__((__V_ *handle), (handle)) __OTORP__(__V_ *handle; */ int sh_readline __PARAM__((char **names, int fd, int flags,long timeout), (names, fd, flags, timeout)) __OTORP__(char **names; int fd; int flags;long timeout;){ - register int c; - register unsigned char *cp; - register Namval_t *np; - register char *name, *val; - register Sfio_t *iop; + int c; + unsigned char *cp; + Namval_t *np; + char *name, *val; + Sfio_t *iop; char *ifs; unsigned char *cpmax; char was_escape = 0; @@ -437,8 +437,8 @@ int sh_readline __PARAM__((char **names, int fd, int flags,long timeout), (names if(!name && *val) { /* strip off trailing delimiters */ - register char *cp = val + strlen(val); - register int n; + char *cp = val + strlen(val); + int n; while((n=sh.ifstable[*--cp])==S_DELIM || n==S_SPACE); cp[1] = 0; } diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/sleep.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/sleep.c index 7dd64350..7d0e2c33 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/sleep.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/sleep.c @@ -105,9 +105,9 @@ # undef _lib_poll #endif /* _lib_poll_notimer */ -int b_sleep __PARAM__((register int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(register int argc;char *argv[];__V_ *extra;){ - register char *cp; - register double d; +int b_sleep __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ + char *cp; + double d; time_t tloc = 0; NOT_USED(extra); while((argc = optget(argv,sh_optsleep))) switch(argc) @@ -181,7 +181,7 @@ unsigned sleep __PARAM__((unsigned sec), (sec)) __OTORP__(unsigned sec;){ */ void sh_delay __PARAM__((double t), (t)) __OTORP__(double t;){ - register int n = (int)t; + int n = (int)t; #ifdef _lib_poll struct pollfd fd; if(t<=0) diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/test.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/test.c index 6902a1dd..24658e73 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/test.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/test.c @@ -131,8 +131,8 @@ static int ap, ac; static char **av; int b_test __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc; char *argv[];__V_ *extra;){ - register char *cp = argv[0]; - register int not; + char *cp = argv[0]; + int not; NOT_USED(extra); av = argv; ap = 1; @@ -156,7 +156,7 @@ int b_test __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extra)) /* fall through */ case 4: { - register int op = sh_lookup(cp=argv[2],shtab_testops); + int op = sh_lookup(cp=argv[2],shtab_testops); if(op&TEST_BINOP) break; if(!op) @@ -190,9 +190,9 @@ int b_test __PARAM__((int argc, char *argv[],__V_ *extra), (argc, argv, extra)) * flag is 1 when in parenthesis * flag is 2 when evaluating -a */ -static int expr __PARAM__((int register flag), (flag)) __OTORP__(int register flag;){ - register int r; - register char *p; +static int expr __PARAM__((int flag), (flag)) __OTORP__(int flag;){ + int r; + char *p; r = e3(); while(ap < ac) { @@ -243,8 +243,8 @@ static char *nxtarg __PARAM__((int mt), (mt)) __OTORP__(int mt;){ static e3 __PARAM__((void), ()){ - register char *arg, *cp; - register int op; + char *arg, *cp; + int op; char *binop; arg=nxtarg(0); if(c_eq(arg, '!')) @@ -298,7 +298,7 @@ skip: return(test_binop(op,arg,cp)); } -int test_unop __PARAM__((register int op,register const char *arg), (op, arg)) __OTORP__(register int op;register const char *arg;){ +int test_unop __PARAM__((int op,const char *arg), (op, arg)) __OTORP__(int op;const char *arg;){ switch(op) { case 'r': @@ -310,7 +310,7 @@ int test_unop __PARAM__((register int op,register const char *arg), (op, arg)) _ case 'V': #ifdef SHOPT_FS_3D { - register int offset = staktell(); + int offset = staktell(); if(stat(arg,&statb)<0 || !S_ISREG(statb.st_mode)) return(0); /* add trailing / */ @@ -360,7 +360,7 @@ int test_unop __PARAM__((register int op,register const char *arg), (op, arg)) _ case 'H': #ifdef S_ISCDF { - register int offset = staktell(); + int offset = staktell(); if(test_stat(arg,&statb)>=0 && S_ISCDF(statb.st_mode)) return(1); stakputs(arg); @@ -419,8 +419,8 @@ int test_unop __PARAM__((register int op,register const char *arg), (op, arg)) _ } } -test_binop __PARAM__((register int op,const char *left,const char *right), (op, left, right)) __OTORP__(register int op;const char *left;const char *right;){ - register double lnum,rnum; +test_binop __PARAM__((int op,const char *left,const char *right), (op, left, right)) __OTORP__(int op;const char *left;const char *right;){ + double lnum,rnum; if(op&TEST_ARITH) { lnum = sh_arith(left); @@ -498,7 +498,7 @@ test_inode __PARAM__((const char *file1,const char *file2), (file1, file2)) __OT * The static buffer statb is shared with test_mode. */ -sh_access __PARAM__((register const char *name, register int mode), (name, mode)) __OTORP__(register const char *name; register int mode;){ +sh_access __PARAM__((const char *name, int mode), (name, mode)) __OTORP__(const char *name; int mode;){ if(*name==0) return(-1); if(strmatch(name,(char*)e_devfdNN)) @@ -550,7 +550,7 @@ skip: { static int maxgroups = 0; gid_t *groups; - register int n; + int n; if(maxgroups==0) { /* first time */ @@ -584,7 +584,7 @@ skip: * The mode bits are zero if the file doesn't exist. */ -static int test_mode __PARAM__((register const char *file), (file)) __OTORP__(register const char *file;){ +static int test_mode __PARAM__((const char *file), (file)) __OTORP__(const char *file;){ if(file && (*file==0 || test_stat(file,&statb)<0)) return(0); return(statb.st_mode); diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/trap.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/trap.c index 71e16ac5..2496bf81 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/trap.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/trap.c @@ -106,8 +106,8 @@ static int sig_number __PROTO__((const char*)); static void sig_list __PROTO__((int)); int b_trap __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ - register char *arg = argv[1]; - register int sig, pflag = 0; + char *arg = argv[1]; + int sig, pflag = 0; NOT_USED(argc); NOT_USED(extra); while (sig = optget(argv, sh_opttrap)) switch (sig) @@ -127,7 +127,7 @@ int b_trap __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) _ error(ERROR_usage(2),optusage((char*)0)); if(arg = *argv) { - register int clear; + int clear; char *action = arg; if(!pflag) { @@ -210,8 +210,8 @@ int b_trap __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) _ } int b_kill __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ - register char *signame; - register int sig=SIGTERM, flag=0, n; + char *signame; + int sig=SIGTERM, flag=0, n; NOT_USED(argc); NOT_USED(extra); while((n = optget(argv,sh_optkill))) switch(n) @@ -281,7 +281,7 @@ endopts: */ static int sig_number __PARAM__((const char *string), (string)) __OTORP__(const char *string;){ - register int n; + int n; char *last; if(isdigit(*string)) { @@ -291,7 +291,7 @@ static int sig_number __PARAM__((const char *string), (string)) __OTORP__(const } else { - register int c; + int c; n = staktell(); do { @@ -316,9 +316,9 @@ static int sig_number __PARAM__((const char *string), (string)) __OTORP__(const * if is zero, then print all signal names * if is negative, then print all traps */ -static void sig_list __PARAM__((register int flag), (flag)) __OTORP__(register int flag;){ - register const struct shtable2 *tp; - register int sig = sh.sigmax+1; +static void sig_list __PARAM__((int flag), (flag)) __OTORP__(int flag;){ + const struct shtable2 *tp; + int sig = sh.sigmax+1; const char *names[SH_TRAP]; const char *traps[SH_DEBUGTRAP+1]; @@ -353,7 +353,7 @@ static void sig_list __PARAM__((register int flag), (flag)) __OTORP__(register i else if(flag<0) { /* print the traps */ - register char *trap,*sname,**trapcom; + char *trap,*sname,**trapcom; sig = sh.st.trapmax; /* use parent traps if otrapcom is set (for $(trap) */ trapcom = (sh.st.otrapcom?sh.st.otrapcom:sh.st.trapcom); diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/typeset.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/typeset.c index 7fad38d8..69f967ae 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/typeset.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/typeset.c @@ -145,7 +145,7 @@ static const Namdisc_t treedisc = */ int b_read_export __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ - register int flag; + int flag; char *command = argv[0]; NOT_USED(argc); NOT_USED(extra); @@ -178,10 +178,10 @@ int b_read_export __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, } -int b_alias __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;register char *argv[];__V_ *extra;){ - register unsigned flag = NV_ARRAY|NV_NOSCOPE|NV_ASSIGN; - register Hashtab_t *troot = sh.alias_tree; - register int n; +int b_alias __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ + unsigned flag = NV_ARRAY|NV_NOSCOPE|NV_ASSIGN; + Hashtab_t *troot = sh.alias_tree; + int n; NOT_USED(argc); NOT_USED(extra); prefix=0; @@ -230,9 +230,9 @@ int b_alias __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, ar } -int b_typeset __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;register char *argv[];__V_ *extra;){ - register int flag = NV_VARNAME|NV_ASSIGN; - register int n; +int b_typeset __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ + int flag = NV_VARNAME|NV_ASSIGN; + int n; Hashtab_t *troot = sh.var_tree; int isfloat = 0; NOT_USED(argc); @@ -347,8 +347,8 @@ int b_typeset __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, return(b_common(argv,flag,troot)); } -static int b_common __PARAM__((char **argv,register int flag,Hashtab_t *troot), (argv, flag, troot)) __OTORP__(char **argv;register int flag;Hashtab_t *troot;){ - register char *name; +static int b_common __PARAM__((char **argv,int flag,Hashtab_t *troot), (argv, flag, troot)) __OTORP__(char **argv;int flag;Hashtab_t *troot;){ + char *name; int nvflags=(flag&(NV_ARRAY|NV_NOSCOPE|NV_VARNAME|NV_IDENT|NV_ASSIGN)); int r=0, ref=0; #ifdef SHOPT_OO @@ -376,8 +376,8 @@ static int b_common __PARAM__((char **argv,register int flag,Hashtab_t *troo } while(name = *++argv) { - register unsigned newflag; - register Namval_t *np; + unsigned newflag; + Namval_t *np; unsigned curflag; if(troot == sh.fun_tree) { @@ -537,9 +537,9 @@ __V_ **sh_getliblist __PARAM__((void), ()){ * adding builtins requires dlopen() interface */ int b_builtin __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ - register char *arg=0, *name; - register int n, r=0, flag=0; - register Namval_t *np; + char *arg=0, *name; + int n, r=0, flag=0; + Namval_t *np; int dlete=0; static int maxlib, nlib; Fptr_t addr; @@ -659,7 +659,7 @@ int b_builtin __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra) return(r); } -int b_set __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;register char *argv[];__V_ *extra;){ +int b_set __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ NOT_USED(extra); prefix=0; if(argv[1]) @@ -682,21 +682,21 @@ int b_set __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, argv * Non-existent items being deleted give non-zero exit status */ -int b_unalias __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;register char *argv[];__V_ *extra;){ +int b_unalias __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ NOT_USED(extra); return(b_unall(argc,argv,sh.alias_tree)); } -int b_unset __PARAM__((int argc,register char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;register char *argv[];__V_ *extra;){ +int b_unset __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ NOT_USED(extra); return(b_unall(argc,argv,sh.var_tree)); } -static int b_unall __PARAM__((int argc, char **argv, register Hashtab_t *troot), (argc, argv, troot)) __OTORP__(int argc; char **argv; register Hashtab_t *troot;){ - register Namval_t *np; - register struct slnod *slp; - register const char *name; - register int r; +static int b_unall __PARAM__((int argc, char **argv, Hashtab_t *troot), (argc, argv, troot)) __OTORP__(int argc; char **argv; Hashtab_t *troot;){ + Namval_t *np; + struct slnod *slp; + const char *name; + int r; int nflag = 0; int all=0; NOT_USED(argc); @@ -751,7 +751,7 @@ static int b_unall __PARAM__((int argc, char **argv, register Hashtab_t *troot), else if(slp=(struct slnod*)(np->nvenv)) { /* free function definition */ - register char *cp= strrchr(name,'.'); + char *cp= strrchr(name,'.'); if(cp) { Namval_t *npv; @@ -785,8 +785,8 @@ static int b_unall __PARAM__((int argc, char **argv, register Hashtab_t *troot), * print out the name and value of a name-value pair */ -static int print_namval __PARAM__((Sfio_t *file,register Namval_t *np,register int flag), (file, np, flag)) __OTORP__(Sfio_t *file;register Namval_t *np;register int flag;){ - register char *cp; +static int print_namval __PARAM__((Sfio_t *file,Namval_t *np,int flag), (file, np, flag)) __OTORP__(Sfio_t *file;Namval_t *np;int flag;){ + char *cp; sh_sigcheck(); if(flag) flag = '\n'; @@ -816,7 +816,7 @@ static int print_namval __PARAM__((Sfio_t *file,register Namval_t *np,register i } if(cp=nv_getval(np)) { - register Namarr_t *ap; + Namarr_t *ap; sfputr(file,sh_fmtq(nv_name(np)),-1); if(!flag) { @@ -850,9 +850,9 @@ static void print_all __PARAM__((Sfio_t *file,Hashtab_t *root), (file, root)) __ * format initialization list given a list of assignments */ static void genvalue __PARAM__((struct argnod *argp, const char *prefix, int n, int indent), (argp, prefix, n, indent)) __OTORP__(struct argnod *argp; const char *prefix; int n; int indent;){ - register struct argnod *ap; - register char *cp,*nextcp; - register int m,isarray; + struct argnod *ap; + char *cp,*nextcp; + int m,isarray; Namval_t *np; if(n==0) m = strlen(prefix); @@ -947,13 +947,13 @@ static void genvalue __PARAM__((struct argnod *argp, const char *prefix, int n, /* * walk the virtual tree and print or delete name-value pairs */ -static char *walk_tree __PARAM__((register Namval_t *np, int dlete), (np, dlete)) __OTORP__(register Namval_t *np; int dlete;){ +static char *walk_tree __PARAM__((Namval_t *np, int dlete), (np, dlete)) __OTORP__(Namval_t *np; int dlete;){ static Sfio_t *out; int n; Fcin_t save; int savtop = staktell(); char *savptr = stakfreeze(0); - register struct argnod *ap; + struct argnod *ap; struct argnod *arglist=0; char *name = nv_name(np); stakseek(ARGVAL); @@ -985,7 +985,7 @@ static char *walk_tree __PARAM__((register Namval_t *np, int dlete), (np, dlete) /* * get discipline for compound initializations */ -static char *get_tree __PARAM__((register Namval_t *np, Namfun_t *fp), (np, fp)) __OTORP__(register Namval_t *np; Namfun_t *fp;){ +static char *get_tree __PARAM__((Namval_t *np, Namfun_t *fp), (np, fp)) __OTORP__(Namval_t *np; Namfun_t *fp;){ NOT_USED(fp); return(walk_tree(np,0)); } @@ -993,7 +993,7 @@ static char *get_tree __PARAM__((register Namval_t *np, Namfun_t *fp), (np, fp)) /* * put discipline for compound initializations */ -static void put_tree __PARAM__((register Namval_t *np, const char *val, int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(register Namval_t *np; const char *val; int flags;Namfun_t *fp;){ +static void put_tree __PARAM__((Namval_t *np, const char *val, int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t *np; const char *val; int flags;Namfun_t *fp;){ walk_tree(np,1); if(fp = nv_stack(np,NIL(Namfun_t*))) { @@ -1008,8 +1008,8 @@ static void put_tree __PARAM__((register Namval_t *np, const char *val, int flag /* * Insert discipline to cause $x to print current tree */ -void nv_setvtree __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){ - register Namfun_t *nfp = newof(NIL(__V_*),Namfun_t,1,0); +void nv_setvtree __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ + Namfun_t *nfp = newof(NIL(__V_*),Namfun_t,1,0); nfp->disc = &treedisc; nv_stack(np, nfp); } @@ -1017,11 +1017,11 @@ void nv_setvtree __PARAM__((register Namval_t *np), (np)) __OTORP__(register Nam /* * print the attributes of name value pair give by */ -static void print_attribute __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){ - register const Shtable_t *tp; - register char *cp; - register unsigned val; - register unsigned mask; +static void print_attribute __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ + const Shtable_t *tp; + char *cp; + unsigned val; + unsigned mask; #ifdef SHOPT_OO Namval_t *nq; char *cclass=0; @@ -1099,9 +1099,9 @@ static void print_attribute __PARAM__((register Namval_t *np), (np)) __OTORP__(r */ static void print_scan __PARAM__((Sfio_t *file, int flag, Hashtab_t *root, int option), (file, flag, root, option)) __OTORP__(Sfio_t *file; int flag; Hashtab_t *root; int option;){ - register char **argv; - register Namval_t *np; - register int namec; + char **argv; + Namval_t *np; + int namec; Namval_t *onp = 0; flag &= ~NV_ASSIGN; scanmask = flag; @@ -1148,7 +1148,7 @@ static void pushname __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ /* * The inverse of creating a reference node */ -static void unref __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){ +static void unref __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ if(!nv_isattr(np,NV_REF)) return; nv_offattr(np,NV_NOFREE|NV_REF); diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/ulimit.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/ulimit.c index c5091c30..494a3910 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/ulimit.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/ulimit.c @@ -113,8 +113,8 @@ #define SOFT 2 int b_ulimit __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ - register char *limit; - register int flag = 0, mode=0, n; + char *limit; + int flag = 0, mode=0, n; #ifdef _lib_getrlimit struct rlimit rlp; #endif /* _lib_getrlimit */ diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/umask.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/umask.c index 8311502f..f848c3a4 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/umask.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/umask.c @@ -101,8 +101,8 @@ #include "builtins.h" int b_umask __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ - register char *mask; - register int flag = 0, sflag = 0; + char *mask; + int flag = 0, sflag = 0; NOT_USED(extra); while((argc = optget(argv,sh_optumask))) switch(argc) { @@ -121,7 +121,7 @@ int b_umask __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) argv += opt_index; if(mask = *argv) { - register int c; + int c; if(isdigit(*mask)) { while(c = *mask++) diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/whence.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/whence.c index 65ad25ac..55504f37 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/whence.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/bltins/whence.c @@ -113,8 +113,8 @@ static int whence __PROTO__((char**, int)); * In this case return 0 when -v or -V or unknown option, otherwise * the shift count to the command is returned */ -int b_command __PARAM__((register int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(register int argc;char *argv[];__V_ *extra;){ - register int n, flags=0; +int b_command __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ + int n, flags=0; NOT_USED(extra); opt_index = opt_char = 0; while((n = optget(argv,sh_optcommand))) switch(n) @@ -151,7 +151,7 @@ int b_command __PARAM__((register int argc,char *argv[],__V_ *extra), (argc, arg * for the whence command */ int b_whence __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) __OTORP__(int argc;char *argv[];__V_ *extra;){ - register int flags=0, n; + int flags=0, n; NOT_USED(argc); NOT_USED(extra); if(*argv[0]=='t') @@ -183,12 +183,12 @@ int b_whence __PARAM__((int argc,char *argv[],__V_ *extra), (argc, argv, extra)) return(whence(argv, flags)); } -static int whence __PARAM__((char **argv, register int flags), (argv, flags)) __OTORP__(char **argv; register int flags;){ - register const char *name; - register Namval_t *np; - register const char *cp; - register aflag,r=0; - register const char *msg; +static int whence __PARAM__((char **argv, int flags), (argv, flags)) __OTORP__(char **argv; int flags;){ + const char *name; + Namval_t *np; + const char *cp; + int aflag,r=0; + const char *msg; int notrack = 1; while(name= *argv++) { diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/completion.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/completion.c index 80447c9b..99a6ceff 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/completion.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/completion.c @@ -107,7 +107,7 @@ static char macro[] = "_??"; * if is equal to returns +strlen()+1 * otherwise returns +strlen() */ -static char *overlay __PARAM__((register char *str,register const char *newstr), (str, newstr)) __OTORP__(register char *str;register const char *newstr;){ +static char *overlay __PARAM__((char *str,const char *newstr), (str, newstr)) __OTORP__(char *str;const char *newstr;){ while(*str && *str == *newstr++) str++; if(*str) @@ -132,7 +132,7 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur, char *staksav = stakptr(0); struct comnod *comptr = (struct comnod*)stakalloc(sizeof(struct comnod)); struct argnod *ap = (struct argnod*)stakseek(ARGVAL); - register char *out; + char *out; char *begin; int addstar; int rval = 0; @@ -140,8 +140,8 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur, int nomarkdirs = !sh_isoption(SH_MARKDIRS); #ifdef SHOPT_MULTIBYTE { - register int c = *cur; - register genchar *cp; + int c = *cur; + genchar *cp; /* adjust cur */ cp = (genchar *)outbuff + *cur; c = *cp; @@ -157,7 +157,7 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur, ap->argflag = (ARG_MAC|ARG_EXP); ap->argnxt.ap = 0; { - register int c; + int c; if(out>outbuff) { /* go to beginning of word */ @@ -201,10 +201,10 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur, if(mode!='*') sh_onoption(SH_MARKDIRS); { - register char **com; + char **com; char *cp=begin; int narg,cmd_completion=0; - register int size; + int size; while(cp>outbuff && ((size=cp[-1])==' ' || size=='\t')) cp--; if((cp==outbuff || strchr(";&|(",size)) && *begin!='~' && !strchr(ap->argval,'/')) @@ -230,7 +230,7 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur, { if (strip && !cmd_completion) { - register char **ptrcom; + char **ptrcom; for(ptrcom=com;*ptrcom;ptrcom++) /* trim directory prefix */ *ptrcom = path_basename(*ptrcom); @@ -317,7 +317,7 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur, sh_offoption(SH_MARKDIRS); #ifdef SHOPT_MULTIBYTE { - register int c; + int c; /* first re-adjust cur */ out = outbuff + *cur; c = *out; @@ -335,8 +335,8 @@ ed_expand __PARAM__((char outbuff[],int *cur,int *eol,int mode), (outbuff, cur, * look for edit macro named _i * if found, puts the macro definition into lookahead buffer and returns 1 */ -ed_macro __PARAM__((register int i), (i)) __OTORP__(register int i;){ - register char *out; +ed_macro __PARAM__((int i), (i)) __OTORP__(int i;){ + char *out; Namval_t *np; genchar buff[LOOKAHEAD+1]; if(i != '@') @@ -369,7 +369,7 @@ ed_macro __PARAM__((register int i), (i)) __OTORP__(register int i;){ * Enter the fc command on the current history line */ ed_fulledit __PARAM__((void), ()){ - register char *cp; + char *cp; if(!sh.hist_ptr) return(-1); /* use EDITOR on current command */ diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/edit.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/edit.c index a500ad39..e5c5fa64 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/edit.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/edit.c @@ -190,7 +190,7 @@ int tty_check __PARAM__((int fd), (fd)) __OTORP__(int fd;){ * is called again without an intervening tty_set() */ -int tty_get __PARAM__((register int fd, register struct termios *tty), (fd, tty)) __OTORP__(register int fd; register struct termios *tty;){ +int tty_get __PARAM__((int fd, struct termios *tty), (fd, tty)) __OTORP__(int fd; struct termios *tty;){ if(fd == savefd) *tty = savetty; else @@ -243,7 +243,7 @@ int tty_set __PARAM__((int fd, int action, struct termios *tty), (fd, action, tt * }*/ -void tty_cooked __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){ +void tty_cooked __PARAM__((int fd), (fd)) __OTORP__(int fd;){ if(editb.e_raw==0) return; @@ -274,7 +274,7 @@ void tty_cooked __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){ * }*/ -tty_raw __PARAM__((register int fd, int echo), (fd, echo)) __OTORP__(register int fd; int echo;){ +tty_raw __PARAM__((int fd, int echo), (fd, echo)) __OTORP__(int fd; int echo;){ #ifdef L_MASK struct ltchars lchars; #endif /* L_MASK */ @@ -385,7 +385,7 @@ tty_raw __PARAM__((register int fd, int echo), (fd, echo)) __OTORP__(register in */ # ifdef TIOCGETC -tty_alt __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){ +tty_alt __PARAM__((int fd), (fd)) __OTORP__(int fd;){ int mask; struct tchars ttychars; switch(editb.e_raw) @@ -431,7 +431,7 @@ tty_alt __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){ # define IEXTEN 0 # endif /* IEXTEN */ -tty_alt __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){ +tty_alt __PARAM__((int fd), (fd)) __OTORP__(int fd;){ switch(editb.e_raw) { case ECHOMODE: @@ -498,7 +498,7 @@ tty_alt __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){ */ int ed_window __PARAM__((void), ()){ int rows,cols; - register char *cp = nv_getval(COLUMNS); + char *cp = nv_getval(COLUMNS); if(cp) cols = atoi(cp)-1; else @@ -521,8 +521,8 @@ int ed_window __PARAM__((void), ()){ */ void ed_flush __PARAM__((void), ()){ - register int n = editb.e_outptr-editb.e_outbase; - register int fd = ERRIO; + int n = editb.e_outptr-editb.e_outbase; + int fd = ERRIO; if(n<=0) return; write(fd,editb.e_outbase,(unsigned)n); @@ -568,11 +568,11 @@ void ed_crlf __PARAM__((void), ()){ */ void ed_setup __PARAM__((int fd), (fd)) __OTORP__(int fd;){ - register char *pp; - register char *last; + char *pp; + char *last; char *ppmax; int myquote = 0; - register int qlen = 1; + int qlen = 1; char inquote = 0; editb.e_fd = fd; #ifdef KSHELL @@ -584,7 +584,7 @@ void ed_setup __PARAM__((int fd), (fd)) __OTORP__(int fd;){ #endif /* KSHELL */ if(sh.hist_ptr) { - register History_t *hp = sh.hist_ptr; + History_t *hp = sh.hist_ptr; editb.e_hismax = hist_max(hp); editb.e_hismin = hist_min(hp); } @@ -599,7 +599,7 @@ void ed_setup __PARAM__((int fd), (fd)) __OTORP__(int fd;){ ppmax = pp+PRSIZE-1; *pp++ = '\r'; { - register int c; + int c; while(c= *last++) switch(c) { case '\r': @@ -648,7 +648,7 @@ void ed_setup __PARAM__((int fd), (fd)) __OTORP__(int fd;){ *pp = 0; if((editb.e_wsize -= editb.e_plen) < 7) { - register int shift = 7-editb.e_wsize; + int shift = 7-editb.e_wsize; editb.e_wsize = 7; pp = editb.e_prompt+1; strcpy(pp,pp+shift); @@ -675,8 +675,8 @@ void ed_setup __PARAM__((int fd), (fd)) __OTORP__(int fd;){ * sfpkrd() correctly (i,e., those that support poll() or select() */ int ed_read __PARAM__((int fd, char *buff, int size), (fd, buff, size)) __OTORP__(int fd; char *buff; int size;){ - register int rv= -1; - register int delim = (editb.e_raw==RAWMODE?'\r':'\n'); + int rv= -1; + int delim = (editb.e_raw==RAWMODE?'\r':'\n'); sh_onstate(SH_TTYWAIT); errno = EINTR; while(rv<0 && errno==EINTR) @@ -740,10 +740,10 @@ done: * onto the stack so that it can be checked for KEYTRAP * putstack() returns 1 except when in the middle of a multi-byte char */ -static int putstack __PARAM__((char string[], register int nbyte, int type), (string, nbyte, type)) __OTORP__(char string[]; register int nbyte; int type;){ - register int c; +static int putstack __PARAM__((char string[], int nbyte, int type), (string, nbyte, type)) __OTORP__(char string[]; int nbyte; int type;){ + int c; #ifdef SHOPT_MULTIBYTE - register int max,last; + int max,last; static int curchar, cursize=0; last = max = nbyte; nbyte = 0; @@ -829,7 +829,7 @@ static int putstack __PARAM__((char string[], register int nbyte, int type), (st * 2 Next key is literal */ int ed_getchar __PARAM__((int mode), (mode)) __OTORP__(int mode;){ - register int n, c; + int n, c; char readin[LOOKAHEAD+1]; if(!lookahead) { @@ -887,7 +887,7 @@ int ed_getchar __PARAM__((int mode), (mode)) __OTORP__(int mode;){ return(c); } -void ed_ungetchar __PARAM__((register int c), (c)) __OTORP__(register int c;){ +void ed_ungetchar __PARAM__((int c), (c)) __OTORP__(int c;){ if (lookahead < LOOKAHEAD) previous[lookahead++] = c; return; @@ -897,10 +897,10 @@ void ed_ungetchar __PARAM__((register int c), (c)) __OTORP__(register int c;){ * put a character into the output buffer */ -void ed_putchar __PARAM__((register int c), (c)) __OTORP__(register int c;){ - register char *dp = editb.e_outptr; +void ed_putchar __PARAM__((int c), (c)) __OTORP__(int c;){ + char *dp = editb.e_outptr; #ifdef SHOPT_MULTIBYTE - register int d; + int d; /* check for place holder */ if(c == MARKER) return; @@ -934,9 +934,9 @@ void ed_putchar __PARAM__((register int c), (c)) __OTORP__(register int c;){ */ ed_virt_to_phys __PARAM__((genchar *virt,genchar *phys,int cur,int voff,int poff), (virt, phys, cur, voff, poff)) __OTORP__(genchar *virt;genchar *phys;int cur;int voff;int poff;){ - register genchar *sp = virt; - register genchar *dp = phys; - register int c; + genchar *sp = virt; + genchar *dp = phys; + int c; genchar *curp = sp + cur; genchar *dpmax = phys+MAXLINE; int r; @@ -1001,11 +1001,11 @@ ed_virt_to_phys __PARAM__((genchar *virt,genchar *phys,int cur,int voff,int poff */ int ed_internal __PARAM__((const char *src, genchar *dest), (src, dest)) __OTORP__(const char *src; genchar *dest;){ - register const unsigned char *cp = (unsigned char *)src; - register int c; - register genchar *dp = dest; - register int d; - register int size; + const unsigned char *cp = (unsigned char *)src; + int c; + genchar *dp = dest; + int d; + int size; if((unsigned char*)dest == cp) { genchar buffer[MAXLINE]; @@ -1042,9 +1042,9 @@ int ed_internal __PARAM__((const char *src, genchar *dest), (src, dest)) __OTORP */ int ed_external __PARAM__((const genchar *src, char *dest), (src, dest)) __OTORP__(const genchar *src; char *dest;){ - register int c; - register char *dp = dest; - register int d; + int c; + char *dp = dest; + int d; char *dpmax = dp+sizeof(genchar)*MAXLINE-2; if((char*)src == dp) { @@ -1084,7 +1084,7 @@ void ed_gencpy __PARAM__((genchar *dp,const genchar *sp), (dp, sp)) __OTORP__(ge * copy at most items from to */ -void ed_genncpy __PARAM__((register genchar *dp,register const genchar *sp, int n), (dp, sp, n)) __OTORP__(register genchar *dp;register const genchar *sp; int n;){ +void ed_genncpy __PARAM__((genchar *dp,const genchar *sp, int n), (dp, sp, n)) __OTORP__(genchar *dp;const genchar *sp; int n;){ while(n-->0 && (*dp++ = *sp++)); } @@ -1092,8 +1092,8 @@ void ed_genncpy __PARAM__((register genchar *dp,register const genchar *sp, int * find the string length of */ -int ed_genlen __PARAM__((register const genchar *str), (str)) __OTORP__(register const genchar *str;){ - register const genchar *sp = str; +int ed_genlen __PARAM__((const genchar *str), (str)) __OTORP__(const genchar *str;){ + const genchar *sp = str; while(*sp++); return(sp-str-1); } @@ -1108,10 +1108,10 @@ int ed_genlen __PARAM__((register const genchar *str), (str)) __OTORP__(register */ ed_setwidth __PARAM__((const char *string), (string)) __OTORP__(const char *string;){ - register int indx = 0; - register int state = 0; - register int c; - register int n = 0; + int indx = 0; + int state = 0; + int c; + int n = 0; static char widths[6] = {1,1}; while(1) switch(c = *string++) { @@ -1160,7 +1160,7 @@ ed_setwidth __PARAM__((const char *string), (string)) __OTORP__(const char *stri /* * returns 1 when bytes starting at and are equal */ -static int compare __PARAM__((register const char *a,register const char *b,register int n), (a, b, n)) __OTORP__(register const char *a;register const char *b;register int n;){ +static int compare __PARAM__((const char *a,const char *b,int n), (a, b, n)) __OTORP__(const char *a;const char *b;int n;){ while(n-->0) { if(*a++ != *b++) @@ -1188,8 +1188,8 @@ static struct termio ott; tcgetattr __PARAM__((int fd, struct termios *tt), (fd, tt)) __OTORP__(int fd; struct termios *tt;){ - register int r; - register int i; + int r; + int i; tcgeta = 0; echoctl = (ECHOCTL!=0); if((r=ioctl(fd,TCGETS,tt))>=0 || errno!=EINVAL) @@ -1209,10 +1209,10 @@ tcgetattr __PARAM__((int fd, struct termios *tt), (fd, tt)) __OTORP__(int fd; st } tcsetattr __PARAM__((int fd,int mode,struct termios *tt), (fd, mode, tt)) __OTORP__(int fd;int mode;struct termios *tt;){ - register int r; + int r; if(tcgeta) { - register int i; + int i; ott.c_lflag = tt->c_lflag; ott.c_oflag = tt->c_oflag; ott.c_iflag = tt->c_iflag; @@ -1250,10 +1250,10 @@ tcsetattr __PARAM__((int fd,int mode,struct termios *tt), (fd, mode, tt)) __OTOR * Execute keyboard trap on given buffer of given size * < 0 for vi insert mode */ -static int keytrap __PARAM__((char *inbuff,register int insize, int bufsize, int mode), (inbuff, insize, bufsize, mode)) __OTORP__(char *inbuff;register int insize; int bufsize; int mode;){ +static int keytrap __PARAM__((char *inbuff,int insize, int bufsize, int mode), (inbuff, insize, bufsize, mode)) __OTORP__(char *inbuff;int insize; int bufsize; int mode;){ static char vi_insert[2]; static long col; - register char *cp; + char *cp; inbuff[insize] = 0; col = editb.e_cur; if(mode== -2) diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/emacs.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/emacs.c index 4d1abaeb..624ae927 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/emacs.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/emacs.c @@ -190,10 +190,10 @@ static int cr_ok; static Histloc_t location = { -5, 0 }; ed_emacsread __PARAM__((int fd,char *buff,int scend), (fd, buff, scend)) __OTORP__(int fd;char *buff;int scend;){ - register int c; - register int i; - register genchar *out; - register int count; + int c; + int i; + genchar *out; + int count; int adjust,oadjust; char backslash; genchar *kptr; @@ -667,8 +667,8 @@ process: } static void show_info __PARAM__((const char *str), (str)) __OTORP__(const char *str;){ - register genchar *out = drawbuff; - register int c; + genchar *out = drawbuff; + int c; genchar string[LBUF]; int sav_cur = cur; /* save current line */ @@ -690,15 +690,15 @@ static void show_info __PARAM__((const char *str), (str)) __OTORP__(const char * draw(UPDATE); } -static void putstring __PARAM__((register char *sp), (sp)) __OTORP__(register char *sp;){ - register int c; +static void putstring __PARAM__((char *sp), (sp)) __OTORP__(char *sp;){ + int c; while (c= *sp++) putchar(c); } -static int escape __PARAM__((register genchar *out,int count), (out, count)) __OTORP__(register genchar *out;int count;){ - register int i,value; +static int escape __PARAM__((genchar *out,int count), (out, count)) __OTORP__(genchar *out;int count;){ + int i,value; int digit,ch; digit = 0; value = 0; @@ -965,7 +965,7 @@ static int escape __PARAM__((register genchar *out,int count), (out, count)) __O */ static void xcommands __PARAM__((int count), (count)) __OTORP__(int count;){ - register int i = ed_getchar(0); + int i = ed_getchar(0); NOT_USED(count); switch(i) { @@ -1052,9 +1052,9 @@ static void search __PARAM__((genchar *out,int direction), (out, direction)) __O #ifndef ESH_NFIRST Histloc_t location; #endif - register int i,sl; + int i,sl; genchar str_buff[LBUF]; - register genchar *string = drawbuff; + genchar *string = drawbuff; /* save current line */ char sav_cur = cur; genncpy(str_buff,string,sizeof(str_buff)/CHARSIZE-1); @@ -1161,18 +1161,18 @@ static void draw __PARAM__((Draw_t option), (option)) __OTORP__(Draw_t option;){ #define UPPER '>' static char overflow; /* Screen overflow flag set */ - register genchar *sptr; /* Pointer within screen */ + genchar *sptr; /* Pointer within screen */ static int offset; /* Screen offset */ static char scvalid; /* Screen is up to date */ genchar nscreen[2*MAXLINE]; /* New entire screen */ genchar *ncursor; /* New cursor */ - register genchar *nptr; /* Pointer to New screen */ + genchar *nptr; /* Pointer to New screen */ char longline; /* Line overflow */ genchar *logcursor; genchar *nscend; /* end of logical screen */ - register int i; + int i; nptr = nscreen; sptr = drawbuff; @@ -1330,8 +1330,8 @@ static void draw __PARAM__((Draw_t option), (option)) __OTORP__(Draw_t option;){ * cursor is set to reflect the change */ -static void setcursor __PARAM__((register int newp,int c), (newp, c)) __OTORP__(register int newp;int c;){ - register int oldp = cursor - screen; +static void setcursor __PARAM__((int newp,int c), (newp, c)) __OTORP__(int newp;int c;){ + int oldp = cursor - screen; if (oldp > newp) { if (!cr_ok || (2*(newp+plen)>(oldp+plen))) @@ -1359,12 +1359,12 @@ skip: } #ifdef SHOPT_MULTIBYTE -static int print __PARAM__((register int c), (c)) __OTORP__(register int c;){ +static int print __PARAM__((int c), (c)) __OTORP__(int c;){ return((c&~STRIP)==0 && isprint(c)); } -static int isword __PARAM__((register int i), (i)) __OTORP__(register int i;){ - register int c = drawbuff[i]; +static int isword __PARAM__((int i), (i)) __OTORP__(int i;){ + int c = drawbuff[i]; return((c&~STRIP) || isalnum(c)); } #endif /* SHOPT_MULTIBYTE */ diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/history.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/history.c index d55a2880..7d0eba21 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/history.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/history.c @@ -171,7 +171,7 @@ static History_t *hist_ptr; # include int acctinit __PARAM__((void), ()){ - register char *cp, *acctfile; + char *cp, *acctfile; Namval_t *np = nv_search("ACCTFILE",sh.var_tree,0); if(!np || !(acctfile=nv_getval(np))) @@ -229,13 +229,13 @@ static void hist_touch __PARAM__((__V_ *handle), (handle)) __OTORP__(__V_ *handl * hist_open() returns 1, if history file is open */ int sh_histinit __PARAM__((void), ()){ - register int fd; - register History_t *hp; - register char *histname; + int fd; + History_t *hp; + char *histname; char *fname=0; int histmask, maxlines, hist_start; - register char *cp; - register off_t hsize = 0; + char *cp; + off_t hsize = 0; if(sh.hist_ptr=hist_ptr) return(1); @@ -384,7 +384,7 @@ retry: * close the history file and free the space */ -void hist_close __PARAM__((register History_t *hp), (hp)) __OTORP__(register History_t *hp;){ +void hist_close __PARAM__((History_t *hp), (hp)) __OTORP__(History_t *hp;){ sfclose(hp->histfp); free((char*)hp); hist_ptr = 0; @@ -401,7 +401,7 @@ void hist_close __PARAM__((register History_t *hp), (hp)) __OTORP__(register His /* * check history file format to see if it begins with special byte */ -static int hist_check __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){ +static int hist_check __PARAM__((int fd), (fd)) __OTORP__(int fd;){ unsigned char magic[2]; lseek(fd,(off_t)0,SEEK_SET); if((read(fd,(char*)magic,2)!=2) || (magic[0]!=HIST_UNDO)) @@ -422,9 +422,9 @@ static int hist_clean __PARAM__((int fd), (fd)) __OTORP__(int fd;){ */ static void hist_trim __PARAM__((int n), (n)) __OTORP__(int n;){ - register char *cp; - register int incmd=1, c=0; - register History_t *hist_new, *hist_old = hist_ptr; + char *cp; + int incmd=1, c=0; + History_t *hist_new, *hist_old = hist_ptr; char *buff, *endbuff; off_t oldp,newp; struct stat statb; @@ -490,9 +490,9 @@ static void hist_trim __PARAM__((int n), (n)) __OTORP__(int n;){ /* * position history file at size and find next command number */ -static int hist_nearend __PARAM__((Sfio_t *iop, register off_t size), (iop, size)) __OTORP__(Sfio_t *iop; register off_t size;){ - register unsigned char *cp, *endbuff; - register int n, incmd=1; +static int hist_nearend __PARAM__((Sfio_t *iop, off_t size), (iop, size)) __OTORP__(Sfio_t *iop; off_t size;){ + unsigned char *cp, *endbuff; + int n, incmd=1; unsigned char *buff, marker[4]; if(size <= 2L || sfseek(iop,size,SEEK_SET)<0) goto begin; @@ -556,10 +556,10 @@ begin: * the previous command. */ -void hist_eof __PARAM__((register History_t *hp), (hp)) __OTORP__(register History_t *hp;){ - register char *cp,*first,*endbuff; - register int incmd = 0; - register off_t count = hp->histcnt; +void hist_eof __PARAM__((History_t *hp), (hp)) __OTORP__(History_t *hp;){ + char *cp,*first,*endbuff; + int incmd = 0; + off_t count = hp->histcnt; int n,skip=0; char *buff; sfseek(hp->histfp,count,SEEK_SET); @@ -652,8 +652,8 @@ void hist_eof __PARAM__((register History_t *hp), (hp)) __OTORP__(register Histo * This routine will cause the previous command to be cancelled */ -void hist_cancel __PARAM__((register History_t *hp), (hp)) __OTORP__(register History_t *hp;){ - register int c; +void hist_cancel __PARAM__((History_t *hp), (hp)) __OTORP__(History_t *hp;){ + int c; if(!hp) return; sfputc(hp->histfp,HIST_UNDO); @@ -668,8 +668,8 @@ void hist_cancel __PARAM__((register History_t *hp), (hp)) __OTORP__(register Hi * flush the current history command */ -void hist_flush __PARAM__((register History_t *hp), (hp)) __OTORP__(register History_t *hp;){ - register char *buff; +void hist_flush __PARAM__((History_t *hp), (hp)) __OTORP__(History_t *hp;){ + char *buff; if(hp) { if(buff=(char*)sfreserve(hp->histfp,0,1)) @@ -695,11 +695,11 @@ void hist_flush __PARAM__((register History_t *hp), (hp)) __OTORP__(register His * a zero byte. Line sequencing is added as required */ -static int hist_write __PARAM__((Sfio_t *iop,const __V_ *buff,register int insize,Sfdisc_t* handle), (iop, buff, insize, handle)) __OTORP__(Sfio_t *iop;const __V_ *buff;register int insize;Sfdisc_t* handle;){ - register char *bufptr = ((char*)buff)+insize; - register History_t *hp = hist_ptr; - register int c,size = insize; - register off_t cur; +static int hist_write __PARAM__((Sfio_t *iop,const __V_ *buff,int insize,Sfdisc_t* handle), (iop, buff, insize, handle)) __OTORP__(Sfio_t *iop;const __V_ *buff;int insize;Sfdisc_t* handle;){ + char *bufptr = ((char*)buff)+insize; + History_t *hp = hist_ptr; + int c,size = insize; + off_t cur; NOT_USED(handle); if(!histflush) return(write(sffileno(iop),(char*)buff,size)); @@ -769,7 +769,7 @@ static int hist_write __PARAM__((Sfio_t *iop,const __V_ *buff,register int insiz * The buffer must be large enough to hold HIST_MARKSZ chars */ -static void hist_marker __PARAM__((register char *buff,register long cmdno), (buff, cmdno)) __OTORP__(register char *buff;register long cmdno;){ +static void hist_marker __PARAM__((char *buff,long cmdno), (buff, cmdno)) __OTORP__(char *buff;long cmdno;){ *buff++ = HIST_CMDNO; *buff++ = 0; *buff++ = (cmdno>>16); @@ -781,14 +781,14 @@ static void hist_marker __PARAM__((register char *buff,register long cmdno), (bu /* * return byte offset in history file for command */ -off_t hist_tell __PARAM__((register History_t *hp, int n), (hp, n)) __OTORP__(register History_t *hp; int n;){ +off_t hist_tell __PARAM__((History_t *hp, int n), (hp, n)) __OTORP__(History_t *hp; int n;){ return(hp->histcmds[hist_ind(hp,n)]); } /* * seek to the position of command */ -off_t hist_seek __PARAM__((register History_t *hp, int n), (hp, n)) __OTORP__(register History_t *hp; int n;){ +off_t hist_seek __PARAM__((History_t *hp, int n), (hp, n)) __OTORP__(History_t *hp; int n;){ return(sfseek(hp->histfp,hp->histcmds[hist_ind(hp,n)],SEEK_SET)); } @@ -798,9 +798,9 @@ off_t hist_seek __PARAM__((register History_t *hp, int n), (hp, n)) __OTORP__(re * each new-line character is replaced with string . */ -void hist_list __PARAM__((register History_t *hp,Sfio_t *outfile, off_t offset,int last, char *nl), (hp, outfile, offset, last, nl)) __OTORP__(register History_t *hp;Sfio_t *outfile; off_t offset;int last; char *nl;){ - register int oldc=0; - register int c; +void hist_list __PARAM__((History_t *hp,Sfio_t *outfile, off_t offset,int last, char *nl), (hp, outfile, offset, last, nl)) __OTORP__(History_t *hp;Sfio_t *outfile; off_t offset;int last; char *nl;){ + int oldc=0; + int c; if(offset<0 || !hp) { sfputr(outfile,e_unknown,'\n'); @@ -828,8 +828,8 @@ void hist_list __PARAM__((register History_t *hp,Sfio_t *outfile, off_t offset,i * direction < 1 for backwards search */ -Histloc_t hist_find __PARAM__((register History_t*hp,char *string,register int index1,int flag,int direction), (hp, string, index1, flag, direction)) __OTORP__(register History_t*hp;char *string;register int index1;int flag;int direction;){ - register int index2; +Histloc_t hist_find __PARAM__((History_t*hp,char *string,int index1,int flag,int direction), (hp, string, index1, flag, direction)) __OTORP__(History_t*hp;char *string;int index1;int flag;int direction;){ + int index2; off_t offset; int *coffset=0; Histloc_t location; @@ -886,10 +886,10 @@ Histloc_t hist_find __PARAM__((register History_t*hp,char *string,register int i * returns the line number of the match if successful, otherwise -1 */ -int hist_match __PARAM__((register History_t *hp,off_t offset,char *string,int *coffset), (hp, offset, string, coffset)) __OTORP__(register History_t *hp;off_t offset;char *string;int *coffset;){ - register unsigned char *cp; - register int c; - register off_t count; +int hist_match __PARAM__((History_t *hp,off_t offset,char *string,int *coffset), (hp, offset, string, coffset)) __OTORP__(History_t *hp;off_t offset;char *string;int *coffset;){ + unsigned char *cp; + int c; + off_t count; int line = 0; int chrs=0; #ifdef SHOPT_MULTIBYTE @@ -960,10 +960,10 @@ int hist_match __PARAM__((register History_t *hp,off_t offset,char *string,int * */ int hist_copy __PARAM__((char *s1,int size,int command,int line), (s1, size, command, line)) __OTORP__(char *s1;int size;int command;int line;){ - register int c; - register History_t *hp = hist_ptr; - register int count = 0; - register char *s1max = s1+size; + int c; + History_t *hp = hist_ptr; + int count = 0; + char *s1max = s1+size; off_t offset; if(!hp) return(-1); @@ -1002,10 +1002,10 @@ int hist_copy __PARAM__((char *s1,int size,int command,int line), (s1, size, com */ char *hist_word __PARAM__((char *string,int size,int word), (string, size, word)) __OTORP__(char *string;int size;int word;){ - register int c; - register char *s1 = string; - register unsigned char *cp = (unsigned char*)s1; - register int flag = 0; + int c; + char *s1 = string; + unsigned char *cp = (unsigned char*)s1; + int flag = 0; if(!hist_ptr) #ifdef KSHELL { @@ -1047,7 +1047,7 @@ char *hist_word __PARAM__((char *string,int size,int word), (string, size, word) * compute the new command and line number. */ -Histloc_t hist_locate __PARAM__((History_t *hp,register int command,register int line,int lines), (hp, command, line, lines)) __OTORP__(History_t *hp;register int command;register int line;int lines;){ +Histloc_t hist_locate __PARAM__((History_t *hp,int command,int line,int lines), (hp, command, line, lines)) __OTORP__(History_t *hp;int command;int line;int lines;){ Histloc_t next; line += lines; if(!hp) @@ -1057,7 +1057,7 @@ Histloc_t hist_locate __PARAM__((History_t *hp,register int command,register int } if(lines > 0) { - register int count; + int count; while(command <= hp->histind) { count = hist_copy(NIL(char*),0, command,-1); @@ -1069,7 +1069,7 @@ Histloc_t hist_locate __PARAM__((History_t *hp,register int command,register int } else { - register int least = (int)hp->histind-hp->histsize; + int least = (int)hp->histind-hp->histsize; while(1) { if(line >=0) @@ -1094,7 +1094,7 @@ done: * Handle history file exceptions */ static int hist_exceptf __PARAM__((Sfio_t* fp, int type, Sfdisc_t *handle), (fp, type, handle)) __OTORP__(Sfio_t* fp; int type; Sfdisc_t *handle;){ - register int newfd,oldfd; + int newfd,oldfd; History_t *hp = (History_t*)handle; if(type==SF_WRITE) { @@ -1110,7 +1110,7 @@ static int hist_exceptf __PARAM__((Sfio_t* fp, int type, Sfdisc_t *handle), (fp, close(newfd); if(lseek(oldfd,(off_t)0,SEEK_END) < hp->histcnt) { - register int index = hp->histind; + int index = hp->histind; lseek(oldfd,(off_t)2,SEEK_SET); hp->histcnt = 2; hp->histind = 1; diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/vi.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/vi.c index 6527c0bc..72646b8f 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/vi.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/edit/vi.c @@ -247,9 +247,9 @@ static int textmod __PROTO__((int,int)); * -*/ -ed_viread __PARAM__((int fd, register char *shbuf, int nchar), (fd, shbuf, nchar)) __OTORP__(int fd; register char *shbuf; int nchar;){ - register int i; /* general variable */ - register int term_char; /* read() termination character */ +ed_viread __PARAM__((int fd, char *shbuf, int nchar), (fd, shbuf, nchar)) __OTORP__(int fd; char *shbuf; int nchar;){ + int i; /* general variable */ + int term_char; /* read() termination character */ char prompt[PRSIZE+2]; /* prompt */ genchar Physical[2*MAXLINE]; /* physical image */ genchar Ubuf[MAXLINE]; /* used for U command */ @@ -316,7 +316,7 @@ ed_viread __PARAM__((int fd, register char *shbuf, int nchar), (fd, shbuf, nchar } else { - register int c = shbuf[0]; + int c = shbuf[0]; /*** Save and remove the last character if its an eol, ***/ /* changing '\r' to '\n' */ @@ -448,7 +448,7 @@ ed_viread __PARAM__((int fd, register char *shbuf, int nchar), (fd, shbuf, nchar virtual[i] = '\n'; if(!echoctl) { - register int c = virtual[i]; + int c = virtual[i]; if( c<=usrerase) { /*** user typed escaped erase or kill char ***/ @@ -652,7 +652,7 @@ ed_viread __PARAM__((int fd, register char *shbuf, int nchar), (fd, shbuf, nchar #define virtual editb.e_inbuf /* pointer to virtual image buffer */ static void append __PARAM__((int c, int mode), (c, mode)) __OTORP__(int c; int mode;){ - register int i,j; + int i,j; if( last_virt first_virt ) { if( !kshisblank(tcur_virt) && kshisblank(tcur_virt-1) @@ -684,8 +684,8 @@ static void backword __PARAM__((int nwords, register int cmd), (nwords, cmd)) __ --tcur_virt; else if(cmd != 'B') { - register int last = isalph(tcur_virt-1); - register int cur = isalph(tcur_virt); + int last = isalph(tcur_virt-1); + int cur = isalph(tcur_virt); if((!cur && last) || (cur && !last)) --tcur_virt; } @@ -719,8 +719,8 @@ static void backword __PARAM__((int nwords, register int cmd), (nwords, cmd)) __ }*/ static int cntlmode __PARAM__((void), ()){ - register int c; - register int i; + int c; + int i; genchar tmp_u_space[MAXLINE]; /* temporary u_space */ genchar *real_u_space; /* points to real u_space */ int tmp_u_column = INVALID; /* temporary u_column */ @@ -829,7 +829,7 @@ static int cntlmode __PARAM__((void), ()){ case cntl('V'): { - register const char *p = &e_version[5]; + const char *p = &e_version[5]; save_v(); del_line(BAD); while(c = *p++) @@ -971,7 +971,7 @@ static int cntlmode __PARAM__((void), ()){ case '#': /** insert(delete) # to (no)comment command **/ if( cur_virt != INVALID ) { - register genchar *p = &virtual[last_virt+1]; + genchar *p = &virtual[last_virt+1]; *p = 0; /*** see whether first char is comment char ***/ c = (virtual[0]=='#'); @@ -1026,8 +1026,8 @@ static int cntlmode __PARAM__((void), ()){ * }*/ -static void cursor __PARAM__((register int x), (x)) __OTORP__(register int x;){ - register int delta; +static void cursor __PARAM__((int x), (x)) __OTORP__(int x;){ + int delta; #ifdef SHOPT_MULTIBYTE while(physical[x]==MARKER) @@ -1076,9 +1076,9 @@ static void cursor __PARAM__((register int x), (x)) __OTORP__(register int x;){ * }*/ -static void cdelete __PARAM__((register int nchars, int mode), (nchars, mode)) __OTORP__(register int nchars; int mode;){ - register int i; - register genchar *vp; +static void cdelete __PARAM__((int nchars, int mode), (nchars, mode)) __OTORP__(int nchars; int mode;){ + int i; + genchar *vp; if( cur_virt < first_virt ) { @@ -1162,8 +1162,8 @@ static void del_line __PARAM__((int mode), (mode)) __OTORP__(int mode;){ }*/ static int delmotion __PARAM__((int motion, int mode), (motion, mode)) __OTORP__(int motion; int mode;){ - register int begin, end, delta; - /* the following saves a register */ + int begin, end, delta; + /* the following saves a */ if( cur_virt == INVALID ) return(0); @@ -1215,8 +1215,8 @@ static int delmotion __PARAM__((int motion, int mode), (motion, mode)) __OTORP__ * }*/ -static void endword __PARAM__((int nwords, register int cmd), (nwords, cmd)) __OTORP__(int nwords; register int cmd;){ - register int tcur_virt = cur_virt; +static void endword __PARAM__((int nwords, int cmd), (nwords, cmd)) __OTORP__(int nwords; int cmd;){ + int tcur_virt = cur_virt; while( nwords-- ) { if( !kshisblank(tcur_virt) && tcur_virt<=last_virt ) @@ -1251,8 +1251,8 @@ static void endword __PARAM__((int nwords, register int cmd), (nwords, cmd)) __O * }*/ -static void forward __PARAM__((register int nwords, int cmd), (nwords, cmd)) __OTORP__(register int nwords; int cmd;){ - register int tcur_virt = cur_virt; +static void forward __PARAM__((int nwords, int cmd), (nwords, cmd)) __OTORP__(int nwords; int cmd;){ + int tcur_virt = cur_virt; while( nwords-- ) { if( cmd == 'W' ) @@ -1290,8 +1290,8 @@ static void forward __PARAM__((register int nwords, int cmd), (nwords, cmd)) __O * }*/ -static int getcount __PARAM__((register int c), (c)) __OTORP__(register int c;){ - register int i; +static int getcount __PARAM__((int c), (c)) __OTORP__(int c;){ + int i; /*** get any repeat count ***/ @@ -1330,9 +1330,9 @@ static int getcount __PARAM__((register int c), (c)) __OTORP__(register int c;){ * }*/ -static void getline __PARAM__((register int mode), (mode)) __OTORP__(register int mode;){ - register int c; - register int tmp; +static void getline __PARAM__((int mode), (mode)) __OTORP__(int mode;){ + int c; + int tmp; addnl = 1; @@ -1494,11 +1494,11 @@ static void getline __PARAM__((register int mode), (mode)) __OTORP__(register in * }*/ -static int mvcursor __PARAM__((register int motion), (motion)) __OTORP__(register int motion;){ - register int count; - register int tcur_virt; - register int incr = -1; - register int bound = 0; +static int mvcursor __PARAM__((int motion), (motion)) __OTORP__(int motion;){ + int count; + int tcur_virt; + int incr = -1; + int bound = 0; static int last_find = 0; /* last find command */ switch(motion) @@ -1669,9 +1669,9 @@ find_b: * print a string */ -static void pr_string __PARAM__((register const char *sp), (sp)) __OTORP__(register const char *sp;){ +static void pr_string __PARAM__((const char *sp), (sp)) __OTORP__(const char *sp;){ /*** copy string sp ***/ - register char *ptr = editb.e_outptr; + char *ptr = editb.e_outptr; while(*sp) *ptr++ = *sp++; editb.e_outptr = ptr; @@ -1685,7 +1685,7 @@ static void pr_string __PARAM__((register const char *sp), (sp)) __OTORP__(regis * }*/ -static void putstring __PARAM__((register int col, register int nchars), (col, nchars)) __OTORP__(register int col; register int nchars;){ +static void putstring __PARAM__((int col, int nchars), (col, nchars)) __OTORP__(int col; int nchars;){ while( nchars-- ) putchar(physical[col++]); return; @@ -1721,9 +1721,9 @@ static void putstring __PARAM__((register int col, register int nchars), (col, n }*/ static void refresh __PARAM__((int mode), (mode)) __OTORP__(int mode;){ - register int p; - register int regb; - register int first_w = first_wind; + int p; + int regb; + int first_w = first_wind; int p_differ; int new_lw; int ncur_phys; @@ -1890,8 +1890,8 @@ static void refresh __PARAM__((int mode), (mode)) __OTORP__(int mode;){ * }*/ -static void replace __PARAM__((register int c, register int increment), (c, increment)) __OTORP__(register int c; register int increment;){ - register int cur_window; +static void replace __PARAM__((int c, int increment), (c, increment)) __OTORP__(int c; int increment;){ + int cur_window; if( cur_virt == INVALID ) { @@ -1945,7 +1945,7 @@ static void replace __PARAM__((register int c, register int increment), (c, incr }*/ static void restore_v __PARAM__((void), ()){ - register int tmpcol; + int tmpcol; genchar tmpspace[MAXLINE]; if( u_column == INVALID-1 ) @@ -1971,7 +1971,7 @@ static void restore_v __PARAM__((void), ()){ }*/ static void save_last __PARAM__((void), ()){ - register int i; + int i; if( (i = cur_virt - first_virt + 1) > 0 ) { @@ -2015,8 +2015,8 @@ static void save_v __PARAM__((void), ()){ * search for in the current command */ static int curline_search __PARAM__((const char *string), (string)) __OTORP__(const char *string;){ - register int len=strlen(string); - register const char *dp,*cp=string, *dpmax; + int len=strlen(string); + const char *dp,*cp=string, *dpmax; #ifdef SHOPT_MULTIBYTE ed_external(u_space,(char*)u_space); #endif /* SHOPT_MULTIBYTE */ @@ -2031,10 +2031,10 @@ static int curline_search __PARAM__((const char *string), (string)) __OTORP__(co return(-1); } -static int search __PARAM__((register int mode), (mode)) __OTORP__(register int mode;){ - register int new_direction; - register int oldcurhline; - register int i; +static int search __PARAM__((int mode), (mode)) __OTORP__(int mode;){ + int new_direction; + int oldcurhline; + int i; static int direction = -1; Histloc_t location; @@ -2114,9 +2114,9 @@ static int search __PARAM__((register int mode), (mode)) __OTORP__(register int }*/ static void sync_cursor __PARAM__((void), ()){ - register int p; - register int v; - register int c; + int p; + int v; + int c; int new_phys; if( cur_virt == INVALID ) @@ -2199,10 +2199,10 @@ static void sync_cursor __PARAM__((void), ()){ * }*/ -static int textmod __PARAM__((register int c, int mode), (c, mode)) __OTORP__(register int c; int mode;){ - register int i; - register genchar *p = lastline; - register int trepeat = repeat; +static int textmod __PARAM__((int c, int mode), (c, mode)) __OTORP__(int c; int mode;){ + int i; + genchar *p = lastline; + int trepeat = repeat; static int lastmacro; genchar *savep; @@ -2521,19 +2521,19 @@ yankeol: #ifdef SHOPT_MULTIBYTE - static int isalph __PARAM__((register int c), (c)) __OTORP__(register int c;){ - register int v = virtual[c]; + static int isalph __PARAM__((int c), (c)) __OTORP__(int c;){ + int v = virtual[c]; return((v&~STRIP) || isalnum(v) || v=='_'); } - static int kshisblank __PARAM__((register int c), (c)) __OTORP__(register int c;){ - register int v = virtual[c]; + static int kshisblank __PARAM__((int c), (c)) __OTORP__(int c;){ + int v = virtual[c]; return((v&~STRIP)==0 && isspace(v)); } - static int ismetach __PARAM__((register int c), (c)) __OTORP__(register int c;){ - register int v = virtual[c]; + static int ismetach __PARAM__((int c), (c)) __OTORP__(int c;){ + int v = virtual[c]; return((v&~STRIP)==0 && ismeta(v)); } @@ -2544,7 +2544,7 @@ yankeol: */ static int getrchar() { - register int c; + int c; if((c=ed_getchar(1))== usrlnext) c = ed_getchar(2); return(c); diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/mamstate.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/mamstate.c index 82b65507..71f3c92f 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/mamstate.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/mamstate.c @@ -66,10 +66,10 @@ static char id[] = "\n@(#)mamstate (AT&T Bell Laboratories) 06/26/89\0\n"; main(argc, argv) int argc; -register char** argv; +char** argv; { - register char* s; - register int c; + char* s; + int c; long ref; struct stat st; char buf[1024]; diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/args.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/args.c index 42b35c35..e62fa356 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/args.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/args.c @@ -133,9 +133,9 @@ static char flagadr[NUM_OPTS+1]; * The -o option is used to set option by name * This routine returns the number of non-option arguments */ -int sh_argopts __PARAM__((int argc,register char *argv[]), (argc, argv)) __OTORP__(int argc;register char *argv[];){ - register int n; - register Shopt_t newflags=sh.options, opt; +int sh_argopts __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){ + int n; + Shopt_t newflags=sh.options, opt; int setflag=0, action=0, trace=(int)sh_isoption(SH_XTRACE); Namval_t *np = NIL(Namval_t*); const char *cp; @@ -296,8 +296,8 @@ int sh_argopts __PARAM__((int argc,register char *argv[]), (argc, argv)) __OTORP * returns the value of $- */ char *sh_argdolminus __PARAM__((void), ()){ - register const char *cp=sh_optksh; - register char *flagp=flagadr; + const char *cp=sh_optksh; + char *flagp=flagadr; while(cp< &sh_optksh[NUM_OPTS]) { if(sh.options&flagval[cp-sh_optksh]) @@ -329,8 +329,8 @@ void sh_argset __PARAM__((char *argv[]), (argv)) __OTORP__(char *argv[];){ * If flag is set, then the block dolh is not freed */ struct dolnod *sh_argfree __PARAM__((struct dolnod *blk,int flag), (blk, flag)) __OTORP__(struct dolnod *blk;int flag;){ - register struct dolnod* argr=blk; - register struct dolnod* argblk; + struct dolnod* argr=blk; + struct dolnod* argblk; if(argblk=argr) { if((--argblk->dolrefcnt)==0) @@ -364,10 +364,10 @@ struct dolnod *sh_argfree __PARAM__((struct dolnod *blk,int flag), (blk, flag)) * grab space for arglist and copy args * The strings are copied after the argument vector */ -struct dolnod *sh_argcreate __PARAM__((register char *argv[]), (argv)) __OTORP__(register char *argv[];){ - register struct dolnod *dp; - register char **pp=argv, *sp; - register int size=0,n; +struct dolnod *sh_argcreate __PARAM__((char *argv[]), (argv)) __OTORP__(char *argv[];){ + struct dolnod *dp; + char **pp=argv, *sp; + int size=0,n; /* count args and number of bytes of arglist */ while(sp= *pp++) size += strlen(sp); @@ -391,7 +391,7 @@ struct dolnod *sh_argcreate __PARAM__((register char *argv[]), (argv)) __OTORP__ * used to set new arguments for functions */ struct dolnod *sh_argnew __PARAM__((char *argi[], struct dolnod **savargfor), (argi, savargfor)) __OTORP__(char *argi[]; struct dolnod **savargfor;){ - register struct dolnod *olddolh = dolh; + struct dolnod *olddolh = dolh; *savargfor = argfor; dolh = 0; argfor = 0; @@ -416,7 +416,7 @@ void sh_argreset __PARAM__((struct dolnod *blk, struct dolnod *afor), (blk, afor * increase the use count so that an sh_argset will not make it go away */ struct dolnod *sh_arguse __PARAM__((void), ()){ - register struct dolnod *dh; + struct dolnod *dh; if(dh=dolh) dh->dolrefcnt++; return(dh); @@ -426,8 +426,8 @@ struct dolnod *sh_arguse __PARAM__((void), ()){ * Print option settings on standard output * if mode==1 for -o format, otherwise +o format */ -static void print_opts __PARAM__((Shopt_t oflags,register int mode), (oflags, mode)) __OTORP__(Shopt_t oflags;register int mode;){ - register const Shtable_t *tp = shtab_options; +static void print_opts __PARAM__((Shopt_t oflags,int mode), (oflags, mode)) __OTORP__(Shopt_t oflags;int mode;){ + const Shtable_t *tp = shtab_options; Shopt_t value; if(mode) sfputr(sfstdout,ERROR_translate(e_heading,1),'\n'); @@ -459,10 +459,10 @@ static void print_opts __PARAM__((Shopt_t oflags,register int mode), (oflags, mo * build an argument list */ char **sh_argbuild __PARAM__((int *nargs, const struct comnod *comptr), (nargs, comptr)) __OTORP__(int *nargs; const struct comnod *comptr;){ - register struct argnod *argp; + struct argnod *argp; struct argnod *arghead=0; { - register const struct comnod *ac = comptr; + const struct comnod *ac = comptr; /* see if the arguments have already been expanded */ if(!ac->comarg) { @@ -471,7 +471,7 @@ char **sh_argbuild __PARAM__((int *nargs, const struct comnod *comptr), (nargs, } else if(!(ac->comtyp&COMSCAN)) { - register struct dolnod *ap = (struct dolnod*)ac->comarg; + struct dolnod *ap = (struct dolnod*)ac->comarg; *nargs = ap->dolnum; return(ap->dolval+ap->dolbot); } @@ -489,9 +489,9 @@ char **sh_argbuild __PARAM__((int *nargs, const struct comnod *comptr), (nargs, } } { - register char **comargn; - register int argn; - register char **comargm; + char **comargn; + int argn; + char **comargm; argn = *nargs; /* allow room to prepend args */ #ifdef SHOPT_VPIX @@ -528,14 +528,14 @@ char **sh_argbuild __PARAM__((int *nargs, const struct comnod *comptr), (nargs, } /* Argument expansion */ -static int arg_expand __PARAM__((register struct argnod *argp, struct argnod **argchain), (argp, argchain)) __OTORP__(register struct argnod *argp; struct argnod **argchain;){ - register int count = 0; +static int arg_expand __PARAM__((struct argnod *argp, struct argnod **argchain), (argp, argchain)) __OTORP__(struct argnod *argp; struct argnod **argchain;){ + int count = 0; argp->argflag &= ~ARG_MAKE; #ifdef SHOPT_DEVFD if(*argp->argval==0 && (argp->argflag&ARG_EXP)) { /* argument of the form (cmd) */ - register struct argnod *ap; + struct argnod *ap; int monitor, fd, pv[2]; ap = (struct argnod*)stakseek(ARGVAL); ap->argflag |= ARG_MAKE; diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/arith.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/arith.c index ed43cfee..bfc87b65 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/arith.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/arith.c @@ -101,14 +101,14 @@ static int level; static double arith __PARAM__((const char **ptr, struct lval *lvalue, int type, double n), (ptr, lvalue, type, n)) __OTORP__(const char **ptr; struct lval *lvalue; int type; double n;){ - register double r= 0; + double r= 0; char *str = (char*)*ptr; switch(type) { case ASSIGN: { - register Namval_t *np = (Namval_t*)(lvalue->value); - register Namarr_t *ap; + Namval_t *np = (Namval_t*)(lvalue->value); + Namarr_t *ap; if(ap = nv_arrayptr(np)) { if(!array_assoc(ap)) @@ -119,13 +119,13 @@ static double arith __PARAM__((const char **ptr, struct lval *lvalue, int type, } case LOOKUP: { - register int c = *str; + int c = *str; lvalue->value = (char*)0; if(c=='.') c = str[1]; if(isaletter(c)) { - register Namval_t *np; + Namval_t *np; while(c= *++str, isaname(c)||c=='.'); if(c=='(') { @@ -177,7 +177,7 @@ static double arith __PARAM__((const char **ptr, struct lval *lvalue, int type, } case VALUE: { - register Namval_t *np = (Namval_t*)(lvalue->value); + Namval_t *np = (Namval_t*)(lvalue->value); if(sh_isoption(SH_NOEXEC)) return(0); if((level || sh_isoption(SH_NOUNSET)) && nv_isnull(np) && !nv_isattr(np,NV_INTEGER)) @@ -200,13 +200,13 @@ static double arith __PARAM__((const char **ptr, struct lval *lvalue, int type, return(r); } -double sh_strnum __PARAM__((register const char *str, char** ptr), (str, ptr)) __OTORP__(register const char *str; char** ptr;){ +double sh_strnum __PARAM__((const char *str, char** ptr), (str, ptr)) __OTORP__(const char *str; char** ptr;){ return(strval(str,(char**)ptr, arith)); } -double sh_arith __PARAM__((register const char *str), (str)) __OTORP__(register const char *str;){ +double sh_arith __PARAM__((const char *str), (str)) __OTORP__(const char *str;){ const char *ptr = str; - register double d; + double d; if(*str==0) return(0); d = strval(str,(char**)&ptr,arith); diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/array.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/array.c index fc9ca4b6..1dde32de 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/array.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/array.c @@ -114,8 +114,8 @@ struct index_array * but <= ARRAY_MAX) is returned. * */ -static int arsize __PARAM__((register int maxi), (maxi)) __OTORP__(register int maxi;){ - register int i = roundof(maxi,ARRAY_INCR); +static int arsize __PARAM__((int maxi), (maxi)) __OTORP__(int maxi;){ + int i = roundof(maxi,ARRAY_INCR); return (i>ARRAY_MAX?ARRAY_MAX:i); } @@ -126,10 +126,10 @@ static int arsize __PARAM__((register int maxi), (maxi)) __OTORP__(register int * allocated Namarr_t structure is returned. * becomes the current index of the array. */ -static struct index_array *array_grow __PARAM__((register struct index_array *arp,int maxi), (arp, maxi)) __OTORP__(register struct index_array *arp;int maxi;){ - register struct index_array *ap; - register int i=0; - register int newsize = arsize(maxi+1); +static struct index_array *array_grow __PARAM__((struct index_array *arp,int maxi), (arp, maxi)) __OTORP__(struct index_array *arp;int maxi;){ + struct index_array *ap; + int i=0; + int newsize = arsize(maxi+1); if (maxi >= ARRAY_MAX) error(ERROR_exit(1),e_subscript, fmtbase((long)maxi,10,0)); ap = new_of(struct index_array,(newsize-1)*sizeof(union Value*)); @@ -158,7 +158,7 @@ static struct index_array *array_grow __PARAM__((register struct index_array *ar * Check for bounds violation for indexed array */ void array_check __PARAM__((Namval_t *np,int flag), (np, flag)) __OTORP__(Namval_t *np;int flag;){ - register struct index_array *ap = (struct index_array*)nv_arrayptr(np); + struct index_array *ap = (struct index_array*)nv_arrayptr(np); if(ap->header.nelem&ARRAY_UNDEF) { ap->header.nelem &= ~ARRAY_UNDEF; @@ -194,9 +194,9 @@ void array_check __PARAM__((Namval_t *np,int flag), (np, flag)) __OTORP__(Namval * After the lookup is done the last @ or * subscript is incremented */ union Value *array_find __PARAM__((Namval_t *np,int flag), (np, flag)) __OTORP__(Namval_t *np;int flag;){ - register struct index_array *ap = (struct index_array*)nv_arrayptr(np); - register union Value *up; - register unsigned dot=0; + struct index_array *ap = (struct index_array*)nv_arrayptr(np); + union Value *up; + unsigned dot=0; if(is_associative(ap)) up = (union Value*)((*ap->header.fun)(np,NIL(char*),0)); else @@ -241,12 +241,12 @@ union Value *array_find __PARAM__((Namval_t *np,int flag), (np, flag)) __OTORP__ * freeing relevant storage */ static Namarr_t *nv_changearray __PARAM__((Namval_t *np, __V_ *(*fun)(Namval_t*,const char*,int)), (np, fun)) __OTORP__(Namval_t *np; __V_ *(*fun)();){ - register Namarr_t *ap; + Namarr_t *ap; char numbuff[NUMSIZE]; unsigned dot, digit, n; union Value *up; struct index_array *save_ap; - register char *string_index= &numbuff[NUMSIZE]; + char *string_index= &numbuff[NUMSIZE]; numbuff[NUMSIZE]='\0'; if(!fun || !(ap = nv_arrayptr(np)) || is_associative(ap)) @@ -284,7 +284,7 @@ static Namarr_t *nv_changearray __PARAM__((Namval_t *np, __V_ *(*fun)(Namval_t*, * The array pointer is returned if sucessful. */ Namarr_t *nv_setarray __PARAM__((Namval_t *np, __V_ *(*fun)(Namval_t*,const char*,int)), (np, fun)) __OTORP__(Namval_t *np; __V_ *(*fun)();){ - register Namarr_t *ap; + Namarr_t *ap; if(fun && (ap = nv_arrayptr(np)) && !is_associative(ap)) { @@ -321,8 +321,8 @@ Namarr_t *nv_setarray __PARAM__((Namval_t *np, __V_ *(*fun)(Namval_t*,const char * Otherwise, 1 is returned. */ int nv_nextsub __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ - register struct index_array *ap = (struct index_array*)nv_arrayptr(np); - register unsigned dot; + struct index_array *ap = (struct index_array*)nv_arrayptr(np); + unsigned dot; if(!ap || !(ap->header.nelem&ARRAY_SCAN)) return(0); if(is_associative(ap)) @@ -353,9 +353,9 @@ int nv_nextsub __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ * The node pointer is returned which can be NULL if is * not already array and the ARRAY_ADD bit of is not set. */ -Namval_t *nv_putsub __PARAM__((Namval_t *np,register char *sp,register long mode), (np, sp, mode)) __OTORP__(Namval_t *np;register char *sp;register long mode;){ - register struct index_array *ap = (struct index_array*)nv_arrayptr(np); - register int size = (mode&ARRAY_MASK); +Namval_t *nv_putsub __PARAM__((Namval_t *np,char *sp,long mode), (np, sp, mode)) __OTORP__(Namval_t *np;char *sp;long mode;){ + struct index_array *ap = (struct index_array*)nv_arrayptr(np); + int size = (mode&ARRAY_MASK); if(!ap || !ap->header.fun) { if(sp) @@ -367,7 +367,7 @@ Namval_t *nv_putsub __PARAM__((Namval_t *np,register char *sp,register long mode } if(!ap || size>=ap->maxi) { - register struct index_array *apold; + struct index_array *apold; if(size==0) return(NIL(Namval_t*)); ap = array_grow(apold=ap,size); @@ -398,9 +398,9 @@ Namval_t *nv_putsub __PARAM__((Namval_t *np,register char *sp,register long mode * process an array subscript for node given the subscript * returns pointer to character after the subscript */ -char *nv_endsubscript __PARAM__((Namval_t *np, register char *cp, int mode), (np, cp, mode)) __OTORP__(Namval_t *np; register char *cp; int mode;){ - register int count=1, quoted=0, c; - register char *sp = cp+1; +char *nv_endsubscript __PARAM__((Namval_t *np, char *cp, int mode), (np, cp, mode)) __OTORP__(Namval_t *np; char *cp; int mode;){ + int count=1, quoted=0, c; + char *sp = cp+1; /* first find matching ']' */ while(count>0 && (c= *++cp)) { @@ -435,9 +435,9 @@ char *nv_endsubscript __PARAM__((Namval_t *np, register char *cp, int mode), (np char *nv_getsub __PARAM__((Namval_t* np), (np)) __OTORP__(Namval_t* np;){ static char numbuff[NUMSIZE]; - register struct index_array *ap = (struct index_array*)nv_arrayptr(np); - register unsigned dot, n; - register char *cp = &numbuff[NUMSIZE]; + struct index_array *ap = (struct index_array*)nv_arrayptr(np); + unsigned dot, n; + char *cp = &numbuff[NUMSIZE]; if(!ap) return(NIL(char*)); if(is_associative(ap)) @@ -456,7 +456,7 @@ char *nv_getsub __PARAM__((Namval_t* np), (np)) __OTORP__(Namval_t* np;){ * If is an indexed array node, the current subscript index * retuned, otherwise returns -1 */ -int nv_aindex __PARAM__((register Namval_t* np), (np)) __OTORP__(register Namval_t* np;){ +int nv_aindex __PARAM__((Namval_t* np), (np)) __OTORP__(Namval_t* np;){ Namarr_t *ap = nv_arrayptr(np); if(!ap || is_associative(ap)) return(-1); @@ -475,9 +475,9 @@ struct assoc_array /* * This is the default implementation for associate arrays */ -__V_ *nv_associative __PARAM__((register Namval_t *np,const char *sp,int mode), (np, sp, mode)) __OTORP__(register Namval_t *np;const char *sp;int mode;){ - register struct assoc_array *ap = (struct assoc_array*)nv_arrayptr(np); - register int type; +__V_ *nv_associative __PARAM__((Namval_t *np,const char *sp,int mode), (np, sp, mode)) __OTORP__(Namval_t *np;const char *sp;int mode;){ + struct assoc_array *ap = (struct assoc_array*)nv_arrayptr(np); + int type; switch(mode) { case NV_AINIT: @@ -536,7 +536,7 @@ __V_ *nv_associative __PARAM__((register Namval_t *np,const char *sp,int mode), /* * Assign values to an array */ -void nv_setvec __PARAM__((register Namval_t *np,register int argc,register char *argv[]), (np, argc, argv)) __OTORP__(register Namval_t *np;register int argc;register char *argv[];){ +void nv_setvec __PARAM__((Namval_t *np,int argc,char *argv[]), (np, argc, argv)) __OTORP__(Namval_t *np;int argc;char *argv[];){ while(--argc >= 0) { if(argc>0 || nv_isattr(np,NV_ARRAY)) diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/deparse.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/deparse.c index f4da65f2..40241e86 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/deparse.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/deparse.c @@ -136,8 +136,8 @@ void sh_deparse __PARAM__((Sfio_t *out, const union anynode *t,int tflags), (out /* * print script corresponding to shell tree */ -static void p_tree __PARAM__((register const union anynode *t,register int tflags), (t, tflags)) __OTORP__(register const union anynode *t;register int tflags;){ - register char *cp; +static void p_tree __PARAM__((const union anynode *t,int tflags), (t, tflags)) __OTORP__(const union anynode *t;int tflags;){ + char *cp; int save = end_line; int needbrace = (tflags&NEED_BRACE); tflags &= ~NEED_BRACE; @@ -280,7 +280,7 @@ static void p_tree __PARAM__((register const union anynode *t,register int tflag case TARITH: { - register struct argnod *ap = t->ar.arexpr; + struct argnod *ap = t->ar.arexpr; if(begin_line && level) sfnputc(outfile,'\t',level); sfprintf(outfile,"(( %s ))%c",ap->argflag&ARG_RAW?sh_fmtq(ap->argval):ap->argval,end_line); @@ -396,7 +396,7 @@ static void p_tree __PARAM__((register const union anynode *t,register int tflag * decrement indent level for flag==END */ static void p_keyword __PARAM__((const char *word,int flag), (word, flag)) __OTORP__(const char *word;int flag;){ - register int sep; + int sep; if(flag==END) sep = end_line; else if(*word=='[') @@ -416,9 +416,9 @@ static void p_keyword __PARAM__((const char *word,int flag), (word, flag)) __OTO level++; } -static void p_arg __PARAM__((register const struct argnod *arg,register int endchar,int opts), (arg, endchar, opts)) __OTORP__(register const struct argnod *arg;register int endchar;int opts;){ - register const char *cp; - register int flag; +static void p_arg __PARAM__((const struct argnod *arg,int endchar,int opts), (arg, endchar, opts)) __OTORP__(const struct argnod *arg;int endchar;int opts;){ + const char *cp; + int flag; do { if(!arg->argnxt.ap) @@ -454,9 +454,9 @@ static void p_arg __PARAM__((register const struct argnod *arg,register int endc return; } -static void p_redirect __PARAM__((register const struct ionod *iop), (iop)) __OTORP__(register const struct ionod *iop;){ - register int iof; - register char *cp; +static void p_redirect __PARAM__((const struct ionod *iop), (iop)) __OTORP__(const struct ionod *iop;){ + int iof; + char *cp; for(;iop;iop=iop->ionxt) { iof=iop->iofile; @@ -517,8 +517,8 @@ static void p_redirect __PARAM__((register const struct ionod *iop), (iop)) __OT return; } -static void p_comarg __PARAM__((const register struct comnod *com), (com)) __OTORP__(const register struct comnod *com;){ - register int flag = end_line; +static void p_comarg __PARAM__((const struct comnod *com), (com)) __OTORP__(const struct comnod *com;){ + int flag = end_line; if(com->comarg || com->comio) flag = ' '; if(com->comset) @@ -538,8 +538,8 @@ static void p_comarg __PARAM__((const register struct comnod *com), (com)) __OTO } static void p_comlist __PARAM__((const struct dolnod *dol,int endchar), (dol, endchar)) __OTORP__(const struct dolnod *dol;int endchar;){ - register char *cp, *const*argv; - register int flag = ' ', special; + char *cp, *const*argv; + int flag = ' ', special; argv = dol->dolval+ARG_SPARE; cp = *argv; special = (*cp=='[' && cp[1]==0); @@ -562,7 +562,7 @@ static void p_comlist __PARAM__((const struct dolnod *dol,int endchar), (dol, en return; } -static void p_switch __PARAM__((register const struct regnod *reg), (reg)) __OTORP__(register const struct regnod *reg;){ +static void p_switch __PARAM__((const struct regnod *reg), (reg)) __OTORP__(const struct regnod *reg;){ if(level>1) sfnputc(outfile,'\t',level-1); p_arg(reg->regptr,')',PRE); @@ -583,7 +583,7 @@ static void p_switch __PARAM__((register const struct regnod *reg), (reg)) __OTO /* * output here documents */ -static void here_body __PARAM__((register const struct ionod *iop), (iop)) __OTORP__(register const struct ionod *iop;){ +static void here_body __PARAM__((const struct ionod *iop), (iop)) __OTORP__(const struct ionod *iop;){ Sfio_t *infile; #ifdef xxx if(iop->iolink) diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/dlopen.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/dlopen.c index abff09aa..399cac65 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/dlopen.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/dlopen.c @@ -159,7 +159,7 @@ */ static struct ld_info *getinfo __PARAM__((__V_ *module), (module)) __OTORP__(__V_ *module;){ struct ld_info *info=ld_info; - register int n=1; + int n=1; if (!ld_info || module != last_module) { last_module = module; diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/expand.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/expand.c index e3dfa0c3..06f17d29 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/expand.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/expand.c @@ -158,8 +158,8 @@ static void glob_dir __PROTO__((struct argnod*)); #ifdef SHOPT_NOCASE # include - static void utol __PARAM__((register char const *str1,register char *str2), (str1, str2)) __OTORP__(register char const *str1;register char *str2;){ - register int c; + static void utol __PARAM__((char const *str1,char *str2), (str1, str2)) __OTORP__(char const *str1;char *str2;){ + int c; for(; c= *((unsigned char*)str1); str1++,str2++) { if(isupper(c)) @@ -180,9 +180,9 @@ static void glob_dir __PROTO__((struct argnod*)); int path_expand __PARAM__((const char *pattern, struct argnod **arghead), (pattern, arghead)) __OTORP__(const char *pattern; struct argnod **arghead;){ - register struct argnod *ap; - register struct glob *gp; - register char *pat; + struct argnod *ap; + struct glob *gp; + char *pat; #ifdef KSHELL struct glob globdata; membase = &globdata; @@ -223,10 +223,10 @@ int path_expand __PARAM__((const char *pattern, struct argnod **arghead), (patte } static void glob_dir __PARAM__((struct argnod *ap), (ap)) __OTORP__(struct argnod *ap;){ - register char *rescan; - register char *prefix; - register char *pat; - register struct dirent *dirp; + char *rescan; + char *prefix; + char *pat; + struct dirent *dirp; DIR *dirf; char *path=0; char quote = 0; @@ -344,7 +344,7 @@ process: #endif /* SHOPT_NOCASE */ while(dirp = readdir(dirf)) { - register int c; + int c; if(!D_FILENO(dirp)) continue; if(fignore && *fignore && strmatch(dirp->d_name, fignore)) @@ -365,9 +365,9 @@ process: return; } -static void addmatch __PARAM__((const char *dir,const char *pat,const register char *rescan,char *endslash), (dir, pat, rescan, endslash)) __OTORP__(const char *dir;const char *pat;const register char *rescan;char *endslash;){ - register struct argnod *ap = (struct argnod*)stakseek(ARGVAL); - register struct glob *gp = globptr(); +static void addmatch __PARAM__((const char *dir,const char *pat,const char *rescan,char *endslash), (dir, pat, rescan, endslash)) __OTORP__(const char *dir;const char *pat;const char *rescan;char *endslash;){ + struct argnod *ap = (struct argnod*)stakseek(ARGVAL); + struct glob *gp = globptr(); struct stat statb; if(dir) { @@ -429,11 +429,11 @@ static void addmatch __PARAM__((const char *dir,const char *pat,const register * scan tree and add each name that matches the given pattern */ static void scantree __PARAM__((Hashtab_t *tree, const char *pattern), (tree, pattern)) __OTORP__(Hashtab_t *tree; const char *pattern;){ - register Hashpos_t *hp; - register Namval_t *np; - register struct argnod *ap; - register struct glob *gp = globptr(); - register char *cp; + Hashpos_t *hp; + Namval_t *np; + struct argnod *ap; + struct glob *gp = globptr(); + char *cp; if(hp = hashscan(tree,0)) { while((np = (Namval_t*)hashnext(hp)) && !nv_isnull(np)) @@ -461,7 +461,7 @@ static void scantree __PARAM__((Hashtab_t *tree, const char *pattern), (tree, pa * The number of matches is returned */ -int path_complete __PARAM__((const char *name,register const char *suffix, struct argnod **arghead), (name, suffix, arghead)) __OTORP__(const char *name;register const char *suffix; struct argnod **arghead;){ +int path_complete __PARAM__((const char *name,const char *suffix, struct argnod **arghead), (name, suffix, arghead)) __OTORP__(const char *name;const char *suffix; struct argnod **arghead;){ sufstr = suffix; suflen = strlen(suffix); return(path_expand(name,arghead)); @@ -474,10 +474,10 @@ int path_complete __PARAM__((const char *name,register const char *suffix, struc */ static void sh_trim(sp) -register char *sp; +char *sp; { - register char *dp = sp; - register int c; + char *dp = sp; + int c; while(1) { if((c= *sp++) == '\\') @@ -491,9 +491,9 @@ register char *sp; #ifdef SHOPT_BRACEPAT int path_generate __PARAM__((struct argnod *todo, struct argnod **arghead), (todo, arghead)) __OTORP__(struct argnod *todo; struct argnod **arghead;){ - register char *cp; - register int brace; - register struct argnod *ap; + char *cp; + int brace; + struct argnod *ap; struct argnod *top = 0; struct argnod *apin; char *pat, *rescan, *bracep; diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/fault.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/fault.c index ed116de1..4d32f1f2 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/fault.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/fault.c @@ -106,10 +106,10 @@ static char indone; /* * Most signals caught or ignored by the shell come here */ -void sh_fault __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){ - register int flag; - register char *trap; - register struct checkpt *pp = (struct checkpt*)sh.jmplist; +void sh_fault __PARAM__((int sig), (sig)) __OTORP__(int sig;){ + int flag; + char *trap; + struct checkpt *pp = (struct checkpt*)sh.jmplist; /* reset handler */ signal(sig, sh_fault); /* handle ignored signals */ @@ -176,8 +176,8 @@ void sh_fault __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){ * initialize signal handling */ void sh_siginit __PARAM__((void), ()){ - register int sig, n=SIGTERM+1; - register const struct shtable2 *tp = shtab_signals; + int sig, n=SIGTERM+1; + const struct shtable2 *tp = shtab_signals; init_shtab_signals(); sig_begin(); /* find the largest signal number in the table */ @@ -214,8 +214,8 @@ void sh_siginit __PARAM__((void), ()){ /* * Turn on trap handler for signal */ -void sh_sigtrap __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){ - register int flag; +void sh_sigtrap __PARAM__((int sig), (sig)) __OTORP__(int sig;){ + int flag; sh.st.otrapcom = 0; if(sig==0) sh_sigdone(); @@ -238,7 +238,7 @@ void sh_sigtrap __PARAM__((register int sig), (sig)) __OTORP__(register int sig; * set signal handler so sh_done is called for all caught signals */ void sh_sigdone __PARAM__((void), ()){ - register int flag, sig = sh.sigmax; + int flag, sig = sh.sigmax; setdone=1; sh.sigflag[0] |= SH_SIGFAULT; while(--sig>0) @@ -254,9 +254,9 @@ void sh_sigdone __PARAM__((void), ()){ * Free the trap strings if mode is non-zero * If mode>1 then ignored traps cause signal to be ignored */ -void sh_sigreset __PARAM__((register int mode), (mode)) __OTORP__(register int mode;){ - register char *trap; - register int flag, sig=sh.st.trapmax; +void sh_sigreset __PARAM__((int mode), (mode)) __OTORP__(int mode;){ + char *trap; + int flag, sig=sh.st.trapmax; while(sig-- > 0) { if(trap=sh.st.trapcom[sig]) @@ -296,9 +296,9 @@ void sh_sigreset __PARAM__((register int mode), (mode)) __OTORP__(register int m /* * free up trap if set and restore signal handler if modified */ -void sh_sigclear __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){ - register int flag = sh.sigflag[sig]; - register char *trap; +void sh_sigclear __PARAM__((int sig), (sig)) __OTORP__(int sig;){ + int flag = sh.sigflag[sig]; + char *trap; sh.st.otrapcom=0; if(!(flag&SH_SIGFAULT)) return; @@ -316,8 +316,8 @@ void sh_sigclear __PARAM__((register int sig), (sig)) __OTORP__(register int sig */ void sh_chktrap __PARAM__((void), ()){ - register int sig=sh.st.trapmax; - register char *trap; + int sig=sh.st.trapmax; + char *trap; if(!sh.trapnote) sig=0; sh.trapnote &= ~SH_SIGTRAP; @@ -401,9 +401,9 @@ int sh_trap __PARAM__((const char *trap, int mode), (trap, mode)) __OTORP__(cons /* * exit the current scope and jump to an earlier one based on pp->mode */ -void sh_exit __PARAM__((register int xno), (xno)) __OTORP__(register int xno;){ - register struct checkpt *pp = (struct checkpt*)sh.jmplist; - register int sig=0; +void sh_exit __PARAM__((int xno), (xno)) __OTORP__(int xno;){ + struct checkpt *pp = (struct checkpt*)sh.jmplist; + int sig=0; sh.exitval=xno; if(xno==SH_EXITSIG) sh.exitval |= (sig=sh.lastsig); @@ -471,9 +471,9 @@ void sh_exit __PARAM__((register int xno), (xno)) __OTORP__(register int xno;){ * This is the exit routine for the shell */ -void sh_done __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){ - register char *t; - register int savxit = sh.exitval; +void sh_done __PARAM__((int sig), (sig)) __OTORP__(int sig;){ + char *t; + int savxit = sh.exitval; sh.trapnote = 0; indone=1; if(sig==0) diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/fcin.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/fcin.c index 078ce0cb..12061776 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/fcin.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/fcin.c @@ -102,8 +102,8 @@ Fcin_t _Fcin; /* * open stream for fast character input */ -int fcfopen __PARAM__((register Sfio_t* f), (f)) __OTORP__(register Sfio_t* f;){ - register int n; +int fcfopen __PARAM__((Sfio_t* f), (f)) __OTORP__(Sfio_t* f;){ + int n; char *buff; Fcin_t save; errno = 0; @@ -136,9 +136,9 @@ int fcfopen __PARAM__((register Sfio_t* f), (f)) __OTORP__(register Sfio_t* f;){ * the previous character is a 0 byte. */ int fcfill __PARAM__((void), ()){ - register int n; - register Sfio_t *f; - register unsigned char *last=_Fcin.fclast, *ptr=_Fcin.fcptr; + int n; + Sfio_t *f; + unsigned char *last=_Fcin.fclast, *ptr=_Fcin.fcptr; if(!(f=fcfile())) { /* see whether pointer has passed null byte */ @@ -170,7 +170,7 @@ int fcfill __PARAM__((void), ()){ * Synchronize and close the current stream */ int fcclose __PARAM__((void), ()){ - register unsigned char *ptr; + unsigned char *ptr; if(_Fcin.fclast==0) return(0); if((ptr=_Fcin.fcptr)>_Fcin.fcbuff && *(ptr-1)==0) diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/init.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/init.c index 3966167a..34532b46 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/init.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/init.c @@ -170,7 +170,7 @@ static Namval_t *ifsnp; /* * Invalidate all path name bindings */ -static void rehash __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){ +static void rehash __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ nv_onattr(np,NV_NOALIAS); } @@ -187,8 +187,8 @@ static char *nospace __PARAM__((int unused), (unused)) __OTORP__(int unused;){ # include "edit.h" /* Trap for CSWIDTH variable */ static void put_cswidth __PARAM__((Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t* np;const char *val;int flags;Namfun_t *fp;){ - register char *cp; - register char *name = nv_name(np); + char *cp; + char *name = nv_name(np); if(ed_setwidth(val?val:"") && !(flags&NV_IMPORT)) error(ERROR_exit(1),e_format,nv_name(np)); nv_putv(np, val, flags, fp); @@ -196,8 +196,8 @@ static char *nospace __PARAM__((int unused), (unused)) __OTORP__(int unused;){ #endif /* SHOPT_MULTIBYTE */ /* Trap for VISUAL and EDITOR variables */ -static void put_ed __PARAM__((register Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(register Namval_t* np;const char *val;int flags;Namfun_t *fp;){ - register const char *cp, *name=nv_name(np); +static void put_ed __PARAM__((Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t* np;const char *val;int flags;Namfun_t *fp;){ + const char *cp, *name=nv_name(np); if(*name=='E' && nv_getval(nv_scoped(VISINOD))) goto done; sh_offoption(SH_VI|SH_EMACS|SH_GMACS); @@ -225,7 +225,7 @@ static void put_optindex __PARAM__((Namval_t* np,const char *val,int flags,Namfu } /* Trap for restricted variables PATH, SHELL, ENV */ -static void put_restricted __PARAM__((register Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(register Namval_t* np;const char *val;int flags;Namfun_t *fp;){ +static void put_restricted __PARAM__((Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t* np;const char *val;int flags;Namfun_t *fp;){ if(!(flags&NV_RDONLY) && sh_isoption(SH_RESTRICTED)) error(ERROR_exit(1),e_restricted,nv_name(np)); if(nv_name(np)==nv_name(PATHNOD)) @@ -498,7 +498,7 @@ static MsgStr allmsgs[] = { /* * Without this proto, standard C says that _DtGetMessage() returns * an int, even though it really returns a pointer. The compiler is - * then free to use the high 32-bits of the return register for + * then free to use the high 32-bits of the return for * something else (like scratch), and that can garble the pointer. */ char *_DtGetMessage __PROTO__((char *filename, int set, int n, char *s)); @@ -713,7 +713,7 @@ char *savedNlsPath; void charsize_init __PARAM__((void), ()){ static char fc[3] = { 0301, ESS2, ESS3}; char buff[8]; - register int i,n; + int i,n; wchar_t wc; memset(buff,0301,MB_CUR_MAX); for(i=0; i<=2; i++) @@ -762,7 +762,7 @@ char *savedNlsPath; free((__V_*)sh_lexstates[ST_BEGIN]); if(ast.locale.set&LC_SET_CTYPE) { - register int c; + int c; char *state[4]; sh_lexstates[ST_BEGIN] = state[0] = (char*)malloc(4*(1<nvalue.lp; +static double nget_rand __PARAM__((Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(Namval_t* np; Namfun_t *fp;){ + long cur, last= *np->nvalue.lp; NOT_USED(fp); do cur = (rand()>>rand_shift)&RANDMASK; @@ -949,8 +949,8 @@ static double nget_rand __PARAM__((register Namval_t* np, Namfun_t *fp), (np, fp return((double)cur); } -static char* get_rand __PARAM__((register Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(register Namval_t* np; Namfun_t *fp;){ - register long n = nget_rand(np,fp); +static char* get_rand __PARAM__((Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(Namval_t* np; Namfun_t *fp;){ + long n = nget_rand(np,fp); return(fmtbase(n, 10, 0)); } @@ -969,7 +969,7 @@ static double nget_lineno __PARAM__((Namval_t* np, Namfun_t *fp), (np, fp)) __OT } static void put_lineno __PARAM__((Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t* np;const char *val;int flags;Namfun_t *fp;){ - register long n; + long n; NOT_USED(fp); if(!val) { @@ -984,8 +984,8 @@ static void put_lineno __PARAM__((Namval_t* np,const char *val,int flags,Namfun_ sh.st.firstline += nget_lineno(np,fp)+1-n; } -static char* get_lineno __PARAM__((register Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(register Namval_t* np; Namfun_t *fp;){ - register long n = nget_lineno(np,fp); +static char* get_lineno __PARAM__((Namval_t* np, Namfun_t *fp), (np, fp)) __OTORP__(Namval_t* np; Namfun_t *fp;){ + long n = nget_lineno(np,fp); return(fmtbase(n, 10, 0)); } @@ -1014,7 +1014,7 @@ static void put_lastarg __PARAM__((Namval_t* np,const char *val,int flags,Namfun * set or unset the mappings given a colon separated list of directories */ static void vpath_set __PARAM__((char *str, int mode), (str, mode)) __OTORP__(char *str; int mode;){ - register char *lastp, *oldp=str, *newp=strchr(oldp,':'); + char *lastp, *oldp=str, *newp=strchr(oldp,':'); if(!sh.lim.fs3d) return; while(newp) @@ -1030,8 +1030,8 @@ static void put_lastarg __PARAM__((Namval_t* np,const char *val,int flags,Namfun } /* catch vpath assignments */ - static void put_vpath __PARAM__((register Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(register Namval_t* np;const char *val;int flags;Namfun_t *fp;){ - register char *cp; + static void put_vpath __PARAM__((Namval_t* np,const char *val,int flags,Namfun_t *fp), (np, val, flags, fp)) __OTORP__(Namval_t* np;const char *val;int flags;Namfun_t *fp;){ + char *cp; if(cp = nv_getval(np)) vpath_set(cp,0); if(val) @@ -1079,7 +1079,7 @@ static Namfun_t L_ARG_init = { &L_ARG_disc}; * This function will get called whenever a configuration parameter changes */ static int newconf __PARAM__((const char *name, const char *path, const char *value), (name, path, value)) __OTORP__(const char *name; const char *path; const char *value;){ - register char *arg; + char *arg; if(strcmp(name,"UNIVERSE")==0 && strcmp(astconf(name,0,0),value)) { sh.universe = 0; @@ -1098,9 +1098,9 @@ static int newconf __PARAM__((const char *name, const char *path, const char *va /* * initialize the shell */ -int sh_init __PARAM__((register int argc,register char *argv[]), (argc, argv)) __OTORP__(register int argc;register char *argv[];){ - register char *name; - register int n,prof; +int sh_init __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){ + char *name; + int n,prof; #ifdef MTRACE Mt_certify = 1; #endif /* MTRACE */ @@ -1241,8 +1241,8 @@ void sh_reinit __PARAM__((char *argv[]), (argv)) __OTORP__(char *argv[];){ /* * set when creating a local variable of this name */ -Namfun_t *nv_cover __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){ - register Namfun_t *nfp=0; +Namfun_t *nv_cover __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ + Namfun_t *nfp=0; if(np==IFSNOD) nfp = &IFS_init; else if(np==PATHNOD) @@ -1299,10 +1299,10 @@ static void nv_init __PARAM__((void), ()){ */ static Hashtab_t *inittree __PARAM__((const struct shtable2 *name_vals), (name_vals)) __OTORP__(const struct shtable2 *name_vals;){ - register Namval_t *np; - register const struct shtable2 *tp; - register unsigned n = 0; - register Hashtab_t *treep; + Namval_t *np; + const struct shtable2 *tp; + unsigned n = 0; + Hashtab_t *treep; for(tp=name_vals;*tp->sh_name;tp++) n++; np = (Namval_t*)calloc(n,sizeof(Namval_t)); @@ -1348,10 +1348,10 @@ static Hashtab_t *inittree __PARAM__((const struct shtable2 *name_vals), (name_v */ static void env_init __PARAM__((void), ()){ - register char *cp; - register Namval_t *np; - register char **ep=environ; - register char *next=0; + char *cp; + Namval_t *np; + char **ep=environ; + char *next=0; if(ep) { while(cp= *ep++) diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/io.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/io.c index 34fc16bc..b938d330 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/io.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/io.c @@ -153,7 +153,7 @@ static int slowread __PROTO__((Sfio_t*, __V_*, int, Sfdisc_t*)); static int slowexcept __PROTO__((Sfio_t*, int, Sfdisc_t*)); static int pipeexcept __PROTO__((Sfio_t*, int, Sfdisc_t*)); static int io_prompt __PROTO__((int)); -static int io_heredoc __PROTO__((register struct ionod*)); +static int io_heredoc __PROTO__((struct ionod*)); static void sftrack __PROTO__((Sfio_t*,int,int)); static int tee_write __PROTO__((Sfio_t*,const __V_*,int,Sfdisc_t*)); static const Sfdisc_t eval_disc = { NULL, NULL, NULL, eval_exceptf, NULL}; @@ -178,7 +178,7 @@ static short filemapsize; /* ======== input output and file copying ======== */ void sh_ioinit __PARAM__((void), ()){ - register int n; + int n; filemapsize = 8; filemap = (struct fdsave*)malloc(8*sizeof(struct fdsave)); #ifdef SHOPT_FASTPIPE @@ -215,10 +215,10 @@ void sh_ioinit __PARAM__((void), ()){ * For output streams, the buffer is set to sh.output and put into * the sh.outpool synchronization pool */ -Sfio_t *sh_iostream __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){ - register Sfio_t *iop; - register int status = sh_iocheckfd(fd); - register int flags = SF_WRITE; +Sfio_t *sh_iostream __PARAM__((int fd), (fd)) __OTORP__(int fd;){ + Sfio_t *iop; + int status = sh_iocheckfd(fd); + int flags = SF_WRITE; char *bp; int size; #ifdef SHOPT_FASTPIPE @@ -282,8 +282,8 @@ Sfio_t *sh_iostream __PARAM__((register int fd), (fd)) __OTORP__(register int fd /* * preserve the file descriptor or stream by moving it */ -static void io_preserve __PARAM__((register Sfio_t *sp, register int f2), (sp, f2)) __OTORP__(register Sfio_t *sp; register int f2;){ - register int fd; +static void io_preserve __PARAM__((Sfio_t *sp, int f2), (sp, f2)) __OTORP__(Sfio_t *sp; int f2;){ + int fd; if(sp) fd = sfsetfd(sp,10); else @@ -315,8 +315,8 @@ static void io_preserve __PARAM__((register Sfio_t *sp, register int f2), (sp, f * The original stream is closed. * The new file descriptor is returned; */ -int sh_iorenumber __PARAM__((register int f1,register int f2), (f1, f2)) __OTORP__(register int f1;register int f2;){ - register Sfio_t *sp = sh.sftable[f2]; +int sh_iorenumber __PARAM__((int f1,int f2), (f1, f2)) __OTORP__(int f1;int f2;){ + Sfio_t *sp = sh.sftable[f2]; if(f1!=f2) { /* see whether file descriptor is in use */ @@ -330,7 +330,7 @@ int sh_iorenumber __PARAM__((register int f1,register int f2), (f1, f2)) __OTORP sh_close(f2); if(f2<=2 && sp) { - register Sfio_t *spnew = sh_iostream(f1); + Sfio_t *spnew = sh_iostream(f1); sh.fdstatus[f2] = (sh.fdstatus[f1]&~IOCLEX); sfsetfd(spnew,f2); sfswap(spnew,sp); @@ -354,9 +354,9 @@ int sh_iorenumber __PARAM__((register int f1,register int f2), (f1, f2)) __OTORP /* * close a file descriptor and update stream table and attributes */ -int sh_close __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){ - register Sfio_t *sp; - register int r = 0; +int sh_close __PARAM__((int fd), (fd)) __OTORP__(int fd;){ + Sfio_t *sp; + int r = 0; if(fd<0) return(-1); if(fd==sh.coutpipe) @@ -379,9 +379,9 @@ int sh_close __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){ * Open a file for reading * On failure, print message. */ -int sh_open __PARAM__((register const char *path, int flags, ...), (va_alist)) __OTORP__(va_dcl) -{ __OTORP__(register const char *path; int flags; ) - register int fd; +int sh_open __PARAM__((const char *path, int flags, ...), (va_alist)) __OTORP__(va_dcl) +{ __OTORP__(const char *path; int flags; ) + int fd; mode_t mode; #ifdef SOCKET struct sockaddr_in addr; @@ -432,8 +432,8 @@ int sh_open __PARAM__((register const char *path, int flags, ...), (va_alist)) _ return(fd); } -int sh_chkopen __PARAM__((register const char *name), (name)) __OTORP__(register const char *name;){ - register int fd = sh_open(name,O_RDONLY,0); +int sh_chkopen __PARAM__((const char *name), (name)) __OTORP__(const char *name;){ + int fd = sh_open(name,O_RDONLY,0); if(fd < 0) error(ERROR_system(1),e_open,name); return(fd); @@ -442,8 +442,8 @@ int sh_chkopen __PARAM__((register const char *name), (name)) __OTORP__(register /* * move open file descriptor to a number > 2 */ -int sh_iomovefd __PARAM__((register int fdold), (fdold)) __OTORP__(register int fdold;){ - register int fdnew; +int sh_iomovefd __PARAM__((int fdold), (fdold)) __OTORP__(int fdold;){ + int fdnew; if(fdold<0 || fdold>2) return(fdold); fdnew = sh_iomovefd(dup(fdold)); @@ -456,7 +456,7 @@ int sh_iomovefd __PARAM__((register int fdold), (fdold)) __OTORP__(register int /* * create a pipe and print message on failure */ -int sh_pipe __PARAM__((register int pv[]), (pv)) __OTORP__(register int pv[];){ +int sh_pipe __PARAM__((int pv[]), (pv)) __OTORP__(int pv[];){ int fd[2]; if(pipe(fd)<0 || (pv[0]=fd[0])<0 || (pv[1]=fd[1])<0) error(ERROR_system(1),e_pipe); @@ -470,7 +470,7 @@ int sh_pipe __PARAM__((register int pv[]), (pv)) __OTORP__(register int pv[];){ /* * close a pipe */ -void sh_pclose __PARAM__((register int pv[]), (pv)) __OTORP__(register int pv[];){ +void sh_pclose __PARAM__((int pv[]), (pv)) __OTORP__(int pv[];){ if(pv[0]>=2) sh_close(pv[0]); if(pv[1]>=2) @@ -485,9 +485,9 @@ void sh_pclose __PARAM__((register int pv[]), (pv)) __OTORP__(register int pv[]; * flag = 3 when called from $( < ...), just open file and return */ int sh_redirect __PARAM__((struct ionod *iop, int flag), (iop, flag)) __OTORP__(struct ionod *iop; int flag;){ - register char *fname; - register int fd, iof; - register Namval_t *np=0; + char *fname; + int fd, iof; + Namval_t *np=0; const char *message = e_open; int o_mode; /* mode flag for open */ static char io_op[5]; /* used for -x trace info */ @@ -663,9 +663,9 @@ fail: /* * Create a tmp file for the here-document */ -static int io_heredoc __PARAM__((register struct ionod *iop), (iop)) __OTORP__(register struct ionod *iop;){ - register Sfio_t *infile = 0, *outfile; - register char fd; +static int io_heredoc __PARAM__((struct ionod *iop), (iop)) __OTORP__(struct ionod *iop;){ + Sfio_t *infile = 0, *outfile; + char fd; /* create an unnamed temporary file */ if(!(outfile=sftmp(0))) error(ERROR_system(1),e_tmpcreate); @@ -716,12 +716,12 @@ static int tee_write __PARAM__((Sfio_t *iop,const __V_ *buff,int n,Sfdisc_t *unu * if < 0, then -origfd is saved, but not duped so that it * will be closed with sh_iorestore. */ -void sh_iosave __PARAM__((register int origfd, int oldtop), (origfd, oldtop)) __OTORP__(register int origfd; int oldtop;){ +void sh_iosave __PARAM__((int origfd, int oldtop), (origfd, oldtop)) __OTORP__(int origfd; int oldtop;){ /*@ assume oldtop>=0 && oldtop=oldtop; ) { @@ -752,7 +752,7 @@ void sh_iosave __PARAM__((register int origfd, int oldtop), (origfd, oldtop)) __ filemap[sh.topfd++].save_fd = savefd; if(savefd >=0) { - register Sfio_t* sp = sh.sftable[origfd]; + Sfio_t* sp = sh.sftable[origfd]; /* make saved file close-on-exec */ fcntl(savefd,F_SETFD,FD_CLOEXEC); if(origfd==job.fd) @@ -777,7 +777,7 @@ void sh_iosave __PARAM__((register int origfd, int oldtop), (origfd, oldtop)) __ * close all saved file descriptors */ void sh_iounsave __PARAM__((void), ()){ - register int fd, savefd, newfd; + int fd, savefd, newfd; for(newfd=fd=0; fd < sh.topfd; fd++) { if((savefd = filemap[fd].save_fd)< 0) @@ -795,7 +795,7 @@ void sh_iounsave __PARAM__((void), ()){ * restore saved file descriptors from on */ void sh_iorestore __PARAM__((int last), (last)) __OTORP__(int last;){ - register int origfd, savefd, fd; + int origfd, savefd, fd; for (fd = sh.topfd - 1; fd >= last; fd--) { origfd = filemap[fd].orig_fd; @@ -830,8 +830,8 @@ void sh_iorestore __PARAM__((int last), (last)) __OTORP__(int last;){ * returns -1 for failure, 0 for success * is the same as for access() */ -sh_ioaccess __PARAM__((int fd,register int mode), (fd, mode)) __OTORP__(int fd;register int mode;){ - register int flags; +sh_ioaccess __PARAM__((int fd,int mode), (fd, mode)) __OTORP__(int fd;int mode;){ + int flags; if(mode==X_OK) return(-1); if((flags=sh_iocheckfd(fd))!=IOCLOSE) @@ -852,8 +852,8 @@ sh_ioaccess __PARAM__((int fd,register int mode), (fd, mode)) __OTORP__(int fd;r * 0 returned on error */ -static int str2inet __PARAM__((register const char *sp, struct sockaddr_in *addr), (sp, addr)) __OTORP__(register const char *sp; struct sockaddr_in *addr;){ - register int n=0,c,v; +static int str2inet __PARAM__((const char *sp, struct sockaddr_in *addr), (sp, addr)) __OTORP__(const char *sp; struct sockaddr_in *addr;){ + int n=0,c,v; unsigned long a=0; unsigned short p; @@ -883,8 +883,8 @@ static int str2inet __PARAM__((register const char *sp, struct sockaddr_in *addr /* * Handle interrupts for slow streams */ -static int slowexcept __PARAM__((register Sfio_t *iop, int type, Sfdisc_t *handle), (iop, type, handle)) __OTORP__(register Sfio_t *iop; int type; Sfdisc_t *handle;){ - register int n,fno; +static int slowexcept __PARAM__((Sfio_t *iop, int type, Sfdisc_t *handle), (iop, type, handle)) __OTORP__(Sfio_t *iop; int type; Sfdisc_t *handle;){ + int n,fno; NOT_USED(handle); if(type!=SF_READ) return(0); @@ -949,7 +949,7 @@ static void time_grace __PARAM__((__V_ *handle), (handle)) __OTORP__(__V_ *handl sh.trapnote |= SH_SIGTRAP; } -static int piperead __PARAM__((Sfio_t *iop,__V_ *buff,register int size,Sfdisc_t *handle), (iop, buff, size, handle)) __OTORP__(Sfio_t *iop;__V_ *buff;register int size;Sfdisc_t *handle;){ +static int piperead __PARAM__((Sfio_t *iop,__V_ *buff,int size,Sfdisc_t *handle), (iop, buff, size, handle)) __OTORP__(Sfio_t *iop;__V_ *buff;int size;Sfdisc_t *handle;){ NOT_USED(handle); size = ed_read(sffileno(iop), (char*)buff, size); return(size); @@ -958,7 +958,7 @@ static int piperead __PARAM__((Sfio_t *iop,__V_ *buff,register int size,Sfdisc_t * This is the read discipline that is applied to slow devices * This routine takes care of prompting for input */ -static int slowread __PARAM__((Sfio_t *iop,__V_ *buff,register int size,Sfdisc_t *handle), (iop, buff, size, handle)) __OTORP__(Sfio_t *iop;__V_ *buff;register int size;Sfdisc_t *handle;){ +static int slowread __PARAM__((Sfio_t *iop,__V_ *buff,int size,Sfdisc_t *handle), (iop, buff, size, handle)) __OTORP__(Sfio_t *iop;__V_ *buff;int size;Sfdisc_t *handle;){ int (*readf) __PROTO__((int, char*, int)); NOT_USED(handle); if(io_prompt(sh.nextprompt)<0 && errno==EIO) @@ -987,8 +987,8 @@ static int slowread __PARAM__((Sfio_t *iop,__V_ *buff,register int size,Sfdisc_t * check and return the attributes for a file descriptor */ -int sh_iocheckfd __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){ - register int flags, n; +int sh_iocheckfd __PARAM__((int fd), (fd)) __OTORP__(int fd;){ + int flags, n; if((n=sh.fdstatus[fd])&IOCLOSE) return(n); if(!(n&(IOREAD|IOWRITE))) @@ -1051,8 +1051,8 @@ int sh_iocheckfd __PARAM__((register int fd), (fd)) __OTORP__(register int fd;){ * Display prompt PS on standard error */ -static int io_prompt __PARAM__((register int flag), (flag)) __OTORP__(register int flag;){ - register char *cp; +static int io_prompt __PARAM__((int flag), (flag)) __OTORP__(int flag;){ + char *cp; char *endprompt; static short cmdno; int sfflags; @@ -1067,7 +1067,7 @@ static int io_prompt __PARAM__((register int flag), (flag)) __OTORP__(register i { case 1: { - register int c; + int c; #if defined(TIOCLBIC) && defined(LFLUSHO) if(!sh_isoption(SH_VI|SH_EMACS|SH_GMACS)) { @@ -1133,9 +1133,9 @@ static int pipeexcept __PARAM__((Sfio_t* iop, int mode, Sfdisc_t* handle), (iop, * keep track of each stream that is opened and closed */ static void sftrack __PARAM__((Sfio_t* sp,int flag, int newfd), (sp, flag, newfd)) __OTORP__(Sfio_t* sp;int flag; int newfd;){ - register int fd = sffileno(sp); - register struct checkpt *pp; - register int mode; + int fd = sffileno(sp); + struct checkpt *pp; + int mode; if(flag==SF_SETFD && newfd<0) { flag = SF_CLOSE; @@ -1224,9 +1224,9 @@ struct eval * Create a stream consisting of a space separated argv[] list */ -Sfio_t *sh_sfeval __PARAM__((register char *argv[]), (argv)) __OTORP__(register char *argv[];){ - register Sfio_t *iop; - register char *cp; +Sfio_t *sh_sfeval __PARAM__((char *argv[]), (argv)) __OTORP__(char *argv[];){ + Sfio_t *iop; + char *cp; if(argv[1]) cp = ""; else @@ -1234,7 +1234,7 @@ Sfio_t *sh_sfeval __PARAM__((register char *argv[]), (argv)) __OTORP__(register iop = sfopen(NIL(Sfio_t*),(char*)cp,"s"); if(argv[1]) { - register struct eval *ep; + struct eval *ep; if(!(ep = new_of(struct eval,0))) return(NIL(Sfio_t*)); ep->disc = eval_disc; @@ -1251,9 +1251,9 @@ Sfio_t *sh_sfeval __PARAM__((register char *argv[]), (argv)) __OTORP__(register */ static int eval_exceptf __PARAM__((Sfio_t *iop,int type, Sfdisc_t *handle), (iop, type, handle)) __OTORP__(Sfio_t *iop;int type; Sfdisc_t *handle;){ - register struct eval *ep = (struct eval*)handle; - register char *cp; - register int len; + struct eval *ep = (struct eval*)handle; + char *cp; + int len; /* no more to do */ if(type!=SF_READ || !(cp = ep->argv[0])) @@ -1292,8 +1292,8 @@ static int eval_exceptf __PARAM__((Sfio_t *iop,int type, Sfdisc_t *handle), (iop */ static Sfio_t *subopen __PARAM__((Sfio_t* sp, off_t offset, long size), (sp, offset, size)) __OTORP__(Sfio_t* sp; off_t offset; long size;){ - register struct subfile *disp; - register int fd = sffileno(sp); + struct subfile *disp; + int fd = sffileno(sp); if(sfseek(sp,offset,SEEK_SET) <0) return(NIL(Sfio_t*)); if(!(disp = (struct subfile*)malloc(sizeof(struct subfile)+IOBSIZE+1))) @@ -1310,8 +1310,8 @@ static Sfio_t *subopen __PARAM__((Sfio_t* sp, off_t offset, long size), (sp, off /* * read function for subfile discipline */ -static int subread __PARAM__((Sfio_t* sp,__V_* buff,register int size,Sfdisc_t* handle), (sp, buff, size, handle)) __OTORP__(Sfio_t* sp;__V_* buff;register int size;Sfdisc_t* handle;){ - register struct subfile *disp = (struct subfile*)handle; +static int subread __PARAM__((Sfio_t* sp,__V_* buff,int size,Sfdisc_t* handle), (sp, buff, size, handle)) __OTORP__(Sfio_t* sp;__V_* buff;int size;Sfdisc_t* handle;){ + struct subfile *disp = (struct subfile*)handle; NOT_USED(sp); if(disp->left == 0) return(0); @@ -1324,8 +1324,8 @@ static int subread __PARAM__((Sfio_t* sp,__V_* buff,register int size,Sfdisc_t* /* * exception handler for subfile discipline */ -static int subexcept __PARAM__((Sfio_t* sp,register int mode, Sfdisc_t* handle), (sp, mode, handle)) __OTORP__(Sfio_t* sp;register int mode; Sfdisc_t* handle;){ - register struct subfile *disp = (struct subfile*)handle; +static int subexcept __PARAM__((Sfio_t* sp,int mode, Sfdisc_t* handle), (sp, mode, handle)) __OTORP__(Sfio_t* sp;int mode; Sfdisc_t* handle;){ + struct subfile *disp = (struct subfile*)handle; if(mode==SF_CLOSE) { sfdisc(sp,SF_POPDISC); @@ -1342,8 +1342,8 @@ static int subexcept __PARAM__((Sfio_t* sp,register int mode, Sfdisc_t* handle), * print a list of arguments in columns */ void sh_menu __PARAM__((Sfio_t *outfile,int argn,char *argv[]), (outfile, argn, argv)) __OTORP__(Sfio_t *outfile;int argn;char *argv[];){ - register int i,j; - register char **arg; + int i,j; + char **arg; int nrow, ncol=1, ndigits=1; int fldsize, wsize = ed_window(); char *cp = nv_getval(nv_scoped(LINES)); @@ -1397,8 +1397,8 @@ skip: /* * shell version of read() for user added builtins */ -ssize_t sh_read __PARAM__((register int fd, __V_* buff, size_t n), (fd, buff, n)) __OTORP__(register int fd; __V_* buff; size_t n;){ - register Sfio_t *sp; +ssize_t sh_read __PARAM__((int fd, __V_* buff, size_t n), (fd, buff, n)) __OTORP__(int fd; __V_* buff; size_t n;){ + Sfio_t *sp; if(sp=sh.sftable[fd]) return(sfread(sp,buff,n)); else @@ -1409,8 +1409,8 @@ ssize_t sh_read __PARAM__((register int fd, __V_* buff, size_t n), (fd, buff, n) /* * shell version of write() for user added builtins */ -ssize_t sh_write __PARAM__((register int fd, const __V_* buff, size_t n), (fd, buff, n)) __OTORP__(register int fd; const __V_* buff; size_t n;){ - register Sfio_t *sp; +ssize_t sh_write __PARAM__((int fd, const __V_* buff, size_t n), (fd, buff, n)) __OTORP__(int fd; const __V_* buff; size_t n;){ + Sfio_t *sp; if(sp=sh.sftable[fd]) return(sfwrite(sp,buff,n)); else @@ -1421,8 +1421,8 @@ ssize_t sh_write __PARAM__((register int fd, const __V_* buff, size_t n), (fd, b /* * shell version of lseek() for user added builtins */ -off_t sh_seek __PARAM__((register int fd, off_t offset, int whence), (fd, offset, whence)) __OTORP__(register int fd; off_t offset; int whence;){ - register Sfio_t *sp; +off_t sh_seek __PARAM__((int fd, off_t offset, int whence), (fd, offset, whence)) __OTORP__(int fd; off_t offset; int whence;){ + Sfio_t *sp; if(sp=sh.sftable[fd]) return(sfseek(sp,offset,whence)); else @@ -1430,8 +1430,8 @@ off_t sh_seek __PARAM__((register int fd, off_t offset, int whence), (fd, offset } #undef dup -int sh_dup __PARAM__((register int old), (old)) __OTORP__(register int old;){ - register int fd = dup(old); +int sh_dup __PARAM__((int old), (old)) __OTORP__(int old;){ + int fd = dup(old); if(fd>=0) sh.fdstatus[fd] = (sh.fdstatus[old]&~IOCLEX); return(fd); diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/jobs.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/jobs.c index e9c4cc7f..f918475f 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/jobs.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/jobs.c @@ -210,10 +210,10 @@ static Sfio_t *outfile; * This is the SIGCLD interrupt routine * When called with sig==0, it does a blocking wait */ -static void job_waitsafe __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){ - register pid_t pid; - register struct process *pw; - register int flags; +static void job_waitsafe __PARAM__((int sig), (sig)) __OTORP__(int sig;){ + pid_t pid; + struct process *pw; + int flags; struct process dummy; struct jobsave *jp; int wstat; @@ -347,7 +347,7 @@ static void job_waitsafe __PARAM__((register int sig), (sig)) __OTORP__(register * if lflag is set the switching driver message will not print */ void job_init __PARAM__((int lflag), (lflag)) __OTORP__(int lflag;){ - register int ntry=0; + int ntry=0; job.fd = JOBTTY; signal(SIGCHLD,job_waitsafe); @@ -382,8 +382,8 @@ void job_init __PARAM__((int lflag), (lflag)) __OTORP__(int lflag;){ { /* Get a controlling terminal and set process group */ /* This should have already been done by rlogin */ - register int fd; - register char *ttynam; + int fd; + char *ttynam; #ifndef SIGTSTP setpgid(0,sh.pid); #endif /*SIGTSTP */ @@ -482,8 +482,8 @@ void job_init __PARAM__((int lflag), (lflag)) __OTORP__(int lflag;){ * restore tty driver and pgrp */ int job_close __PARAM__((void), ()){ - register struct process *pw = job.pwlist; - register int count = 0, running = 0; + struct process *pw = job.pwlist; + int count = 0, running = 0; if(possible && !job.jobcontrol) return(0); else if(!possible && (!sh_isstate(SH_MONITOR) || sh_isstate(SH_FORKED))) @@ -553,7 +553,7 @@ int job_close __PARAM__((void), ()){ return(0); } -static void job_set __PARAM__((register struct process *pw), (pw)) __OTORP__(register struct process *pw;){ +static void job_set __PARAM__((struct process *pw), (pw)) __OTORP__(struct process *pw;){ /* save current terminal state */ tty_get(job.fd,&my_stty); if(pw->p_flag&P_STTY) @@ -568,7 +568,7 @@ static void job_set __PARAM__((register struct process *pw), (pw)) __OTORP__(reg #endif /* SIGTSTP */ } -static void job_reset __PARAM__((register struct process *pw), (pw)) __OTORP__(register struct process *pw;){ +static void job_reset __PARAM__((struct process *pw), (pw)) __OTORP__(struct process *pw;){ /* save the terminal state for current job */ #ifdef SIGTSTP job_fgrp(pw,tcgetpgrp(job.fd)); @@ -593,9 +593,9 @@ static void job_reset __PARAM__((register struct process *pw), (pw)) __OTORP__(r */ void job_bwait __PARAM__((char **jobs), (jobs)) __OTORP__(char **jobs;){ - register char *job; - register struct process *pw; - register pid_t pid; + char *job; + struct process *pw; + pid_t pid; if(*jobs==0) job_wait((pid_t)-1); else while(job = *jobs++) @@ -621,10 +621,10 @@ void job_bwait __PARAM__((char **jobs), (jobs)) __OTORP__(char **jobs;){ */ int job_walk __PARAM__((Sfio_t *file,int (*fun)(struct process*,int),int arg,char *joblist[]), (file, fun, arg, joblist)) __OTORP__(Sfio_t *file;int (*fun)();int arg;char *joblist[];){ - register struct process *pw = job.pwlist; - register int r = 0; - register char *jobid, **jobs=joblist; - register struct process *px; + struct process *pw = job.pwlist; + int r = 0; + char *jobid, **jobs=joblist; + struct process *px; job_string = 0; outfile = file; by_number = 0; @@ -680,7 +680,7 @@ int job_walk __PARAM__((Sfio_t *file,int (*fun)(struct process*,int),int arg,cha /* * send signal to background process group if not disowned */ -int job_terminate __PARAM__((register struct process *pw,register int sig), (pw, sig)) __OTORP__(register struct process *pw;register int sig;){ +int job_terminate __PARAM__((struct process *pw,int sig), (pw, sig)) __OTORP__(struct process *pw;int sig;){ if(pw->p_pgrp && !(pw->p_flag&P_DISOWN)) job_kill(pw,sig); return(0); @@ -693,11 +693,11 @@ int job_terminate __PARAM__((register struct process *pw,register int sig), (pw, * flag JOB_PFLAG for process id(s) only */ -int job_list __PARAM__((struct process *pw,register int flag), (pw, flag)) __OTORP__(struct process *pw;register int flag;){ - register struct process *px = pw; - register int n; - register const char *msg; - register int msize; +int job_list __PARAM__((struct process *pw,int flag), (pw, flag)) __OTORP__(struct process *pw;int flag;){ + struct process *px = pw; + int n; + const char *msg; + int msize; if(!pw || pw->p_job<=0) return(1); if(pw->p_env != sh.jobenv) @@ -768,9 +768,9 @@ int job_list __PARAM__((struct process *pw,register int flag), (pw, flag)) __OTO * get the process group given the job number * This routine returns the process group number or -1 */ -static struct process *job_bystring __PARAM__((register char *ajob), (ajob)) __OTORP__(register char *ajob;){ - register struct process *pw=job.pwlist; - register int c; +static struct process *job_bystring __PARAM__((char *ajob), (ajob)) __OTORP__(char *ajob;){ + struct process *pw=job.pwlist; + int c; if(*ajob++ != '%' || !pw) return(NIL(struct process*)); c = *ajob; @@ -794,9 +794,9 @@ static struct process *job_bystring __PARAM__((register char *ajob), (ajob)) __O * Kill a job or process */ -int job_kill __PARAM__((register struct process *pw,register int sig), (pw, sig)) __OTORP__(register struct process *pw;register int sig;){ - register pid_t pid; - register int r; +int job_kill __PARAM__((struct process *pw,int sig), (pw, sig)) __OTORP__(struct process *pw;int sig;){ + pid_t pid; + int r; const char *msg; #ifdef SIGTSTP int stopsig = (sig==SIGSTOP||sig==SIGTSTP||sig==SIGTTIN||sig==SIGTTOU); @@ -884,10 +884,10 @@ int job_kill __PARAM__((register struct process *pw,register int sig), (pw, sig) */ static struct process *job_byname __PARAM__((char *name), (name)) __OTORP__(char *name;){ - register struct process *pw = job.pwlist; - register struct process *pz = 0; - register int *flag = 0; - register char *cp = name; + struct process *pw = job.pwlist; + struct process *pz = 0; + int *flag = 0; + char *cp = name; int offset; if(!sh.hist_ptr) return(NIL(struct process*)); @@ -917,10 +917,10 @@ static struct process *job_byname __PARAM__((char *name), (name)) __OTORP__(char */ void job_clear __PARAM__((void), ()){ - register struct process *pw, *px; - register struct process *pwnext; - register int j = BYTE(sh.lim.child_max); - register struct jobsave *jp; + struct process *pw, *px; + struct process *pwnext; + int j = BYTE(sh.lim.child_max); + struct jobsave *jp; for(pw=job.pwlist; pw; pw=pwnext) { pwnext = pw->p_nxtjob; @@ -954,8 +954,8 @@ void job_clear __PARAM__((void), ()){ */ int job_post __PARAM__((pid_t pid, pid_t join), (pid, join)) __OTORP__(pid_t pid; pid_t join;){ - register struct process *pw; - register History_t *hp = sh.hist_ptr; + struct process *pw; + History_t *hp = sh.hist_ptr; sh.jobenv = sh.curenv; if(job.toclear) { @@ -1023,7 +1023,7 @@ int job_post __PARAM__((pid_t pid, pid_t join), (pid, join)) __OTORP__(pid_t pid */ static struct process *job_bypid __PARAM__((pid_t pid), (pid)) __OTORP__(pid_t pid;){ - register struct process *pw, *px; + struct process *pw, *px; for(pw=job.pwlist; pw; pw=pw->p_nxtjob) for(px=pw; px; px=px->p_nxtproc) { @@ -1038,7 +1038,7 @@ static struct process *job_bypid __PARAM__((pid_t pid), (pid)) __OTORP__(pid_t p */ static struct process *job_byjid __PARAM__((int jobid), (jobid)) __OTORP__(int jobid;){ - register struct process *pw; + struct process *pw; for(pw=job.pwlist;pw; pw = pw->p_nxtjob) { if(pw->p_job==jobid) @@ -1050,10 +1050,10 @@ static struct process *job_byjid __PARAM__((int jobid), (jobid)) __OTORP__(int j /* * print a signal message */ -static void job_prmsg __PARAM__((register struct process *pw), (pw)) __OTORP__(register struct process *pw;){ +static void job_prmsg __PARAM__((struct process *pw), (pw)) __OTORP__(struct process *pw;){ if(pw->p_exit!=SIGINT && pw->p_exit!=SIGPIPE) { - register const char *msg, *dump; + const char *msg, *dump; msg = job_sigmsg((int)(pw->p_exit)); msg = ERROR_translate(msg,1); if(pw->p_flag&P_COREDUMP) @@ -1075,9 +1075,9 @@ static void job_prmsg __PARAM__((register struct process *pw), (pw)) __OTORP__(r * pid=-1 to wait for all runing processes */ -void job_wait __PARAM__((register pid_t pid), (pid)) __OTORP__(register pid_t pid;){ - register struct process *pw=0,*px; - register int jobid = 0; +void job_wait __PARAM__((pid_t pid), (pid)) __OTORP__(pid_t pid;){ + struct process *pw=0,*px; + int jobid = 0; char intr = 0; if(pid <= 0) { @@ -1230,8 +1230,8 @@ done: * disown job if bgflag == 'd' */ -job_switch __PARAM__((register struct process *pw,int bgflag), (pw, bgflag)) __OTORP__(register struct process *pw;int bgflag;){ - register const char *msg; +job_switch __PARAM__((struct process *pw,int bgflag), (pw, bgflag)) __OTORP__(struct process *pw;int bgflag;){ + const char *msg; if(!pw || !(pw=job_byjid((int)pw->p_job))) return(1); if(bgflag=='d') @@ -1276,7 +1276,7 @@ job_switch __PARAM__((register struct process *pw,int bgflag), (pw, bgflag)) __O * Set the foreground group associated with a job */ -static void job_fgrp __PARAM__((register struct process *pw, int newgrp), (pw, newgrp)) __OTORP__(register struct process *pw; int newgrp;){ +static void job_fgrp __PARAM__((struct process *pw, int newgrp), (pw, newgrp)) __OTORP__(struct process *pw; int newgrp;){ for(; pw; pw=pw->p_nxtproc) pw->p_fgrp = newgrp; } @@ -1285,9 +1285,9 @@ static void job_fgrp __PARAM__((register struct process *pw, int newgrp), (pw, n * turn off STOP state of a process group and send CONT signals */ -static void job_unstop __PARAM__((register struct process *px), (px)) __OTORP__(register struct process *px;){ - register struct process *pw; - register int num = 0; +static void job_unstop __PARAM__((struct process *px), (px)) __OTORP__(struct process *px;){ + struct process *pw; + int num = 0; for(pw=px ;pw ;pw=pw->p_nxtproc) { if(pw->p_flag&P_STOPPED) @@ -1313,8 +1313,8 @@ static void job_unstop __PARAM__((register struct process *px), (px)) __OTORP__( * if is non-zero, then jobs with pending notifications are unposted */ -static struct process *job_unpost __PARAM__((register struct process *pwtop,int notify), (pwtop, notify)) __OTORP__(register struct process *pwtop;int notify;){ - register struct process *pw; +static struct process *job_unpost __PARAM__((struct process *pwtop,int notify), (pwtop, notify)) __OTORP__(struct process *pwtop;int notify;){ + struct process *pw; /* make sure all processes are done */ #ifdef DEBUG sfprintf(sfstderr,"%ld: unpost pid=%ld\n",(long)getpid(),(long)pwtop->p_pid); @@ -1361,8 +1361,8 @@ static struct process *job_unpost __PARAM__((register struct process *pwtop,int /* * unlink a job form the job list */ -static void job_unlink __PARAM__((register struct process *pw), (pw)) __OTORP__(register struct process *pw;){ - register struct process *px; +static void job_unlink __PARAM__((struct process *pw), (pw)) __OTORP__(struct process *pw;){ + struct process *px; if(pw==job.pwlist) { job.pwlist = pw->p_nxtjob; @@ -1383,15 +1383,15 @@ static void job_unlink __PARAM__((register struct process *pw), (pw)) __OTORP__( */ static int job_alloc __PARAM__((void), ()){ - register int j=0; - register unsigned mask = 1; - register unsigned char *freeword; - register int jmax = BYTE(sh.lim.child_max); + int j=0; + unsigned mask = 1; + unsigned char *freeword; + int jmax = BYTE(sh.lim.child_max); /* skip to first word with a free slot */ for(j=0;job.freejobs[j] == UCHAR_MAX; j++); if(j >= jmax) { - register struct process *pw; + struct process *pw; for(j=1; j < sh.lim.child_max; j++) { if((pw=job_byjid(j))&& !job_unpost(pw,0)) @@ -1412,9 +1412,9 @@ static int job_alloc __PARAM__((void), ()){ * return a job number */ -static void job_free __PARAM__((register int n), (n)) __OTORP__(register int n;){ - register int j = (--n)/CHAR_BIT; - register unsigned mask; +static void job_free __PARAM__((int n), (n)) __OTORP__(int n;){ + int j = (--n)/CHAR_BIT; + unsigned mask; n -= j*CHAR_BIT; mask = 1 << n; job.freejobs[j] &= ~mask; @@ -1442,9 +1442,9 @@ static char *job_sigmsg __PARAM__((int sig), (sig)) __OTORP__(int sig;){ * if pid==0, then oldest saved process is deleted * If pid is not found a -1 is returned. */ -int job_chksave __PARAM__((register pid_t pid), (pid)) __OTORP__(register pid_t pid;){ - register struct jobsave *jp = bck_list, *jpold=0; - register int r= -1; +int job_chksave __PARAM__((pid_t pid), (pid)) __OTORP__(pid_t pid;){ + struct jobsave *jp = bck_list, *jpold=0; + int r= -1; while(jp) { if(jp->pid==pid) diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/lex.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/lex.c index 6e9e21fc..47c281bd 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/lex.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/lex.c @@ -199,7 +199,7 @@ static void refvar __PARAM__((int type), (type)) __OTORP__(int type;){ * This routine gets called when reading across a buffer boundary * If lexd.nocopy is off, then current token is saved on the stack */ -static void lex_advance __PARAM__((Sfio_t *iop, const char *buff, register int size), (iop, buff, size)) __OTORP__(Sfio_t *iop; const char *buff; register int size;){ +static void lex_advance __PARAM__((Sfio_t *iop, const char *buff, int size), (iop, buff, size)) __OTORP__(Sfio_t *iop; const char *buff; int size;){ #ifdef KSHELL /* write to history file and to stderr if necessary */ if(!sfstacked(iop)) @@ -234,7 +234,7 @@ static void lex_advance __PARAM__((Sfio_t *iop, const char *buff, register int s * preserves lexical state */ static int lexfill __PARAM__((void), ()){ - register int c; + int c; struct lexdata savedata; struct lexstate savestate; savedata = lexd; @@ -264,10 +264,10 @@ void sh_lexinit __PARAM__((int mode), (mode)) __OTORP__(int mode;){ #ifdef DBUG int sh_lex __PARAM__((void), ()){ - register int flag; + int flag; extern __MANGLE__ int lextoken __PROTO__((void)); char *quoted, *macro, *split, *expand; - register int tok = lextoken(); + int tok = lextoken(); quoted = macro = split = expand = ""; if(tok==0 && (flag=shlex.arg->argflag)) { @@ -326,8 +326,8 @@ static void mbStateSkip __PARAM__((const char *state, int *c, int *n, int *len), * Returns the token type */ int sh_lex __PARAM__((void), ()){ - register const char *state; - register int n, c, mode=ST_BEGIN, wordflags=0; + const char *state; + int n, c, mode=ST_BEGIN, wordflags=0; int len, inlevel=lexd.level, assignment=0, ingrave=0; Sfio_t *sp; if(lexd.paren) @@ -1283,8 +1283,8 @@ breakloop: * read to end of command substitution */ static int comsub __PARAM__((void), ()){ - register int n,c,count=1; - register int line=sh.inlineno; + int n,c,count=1; + int line=sh.inlineno; char word[5]; int messages=0; struct lexstate save; @@ -1355,8 +1355,8 @@ done: * allocate ionode with delimiter filled in without disturbing stak */ static void nested_here __PARAM__((void), ()){ - register struct ionod *iop; - register int n,offset; + struct ionod *iop; + int n,offset; struct argnod *arg = shlex.arg; char *base; if(offset=staktell()) @@ -1386,8 +1386,8 @@ static void nested_here __PARAM__((void), ()){ * if is non,zero, then the characters are copied to the stack * is the initial lexical state */ -void sh_lexskip __PARAM__((int close, register int copy, int state), (close, copy, state)) __OTORP__(int close; register int copy; int state;){ - register char *cp; +void sh_lexskip __PARAM__((int close, int copy, int state), (close, copy, state)) __OTORP__(int close; int copy; int state;){ + char *cp; lexd.nest = close; lex_state = state; lexd.nocopy += !copy; @@ -1411,11 +1411,11 @@ void sh_lexskip __PARAM__((int close, register int copy, int state), (close, co * returns 1 for complete here-doc, 0 for EOF */ -static int here_copy __PARAM__((register struct ionod *iop), (iop)) __OTORP__(register struct ionod *iop;){ - register const char *state; - register int c,n; - register char *bufp,*cp; - register Sfio_t *sp; +static int here_copy __PARAM__((struct ionod *iop), (iop)) __OTORP__(struct ionod *iop;){ + const char *state; + int c,n; + char *bufp,*cp; + Sfio_t *sp; int stripflg, nsave, special=0; if(iop->iolst) here_copy(iop->iolst); @@ -1593,7 +1593,7 @@ done: /* * generates string for given token */ -static char *fmttoken __PARAM__((register int sym), (sym)) __OTORP__(register int sym;){ +static char *fmttoken __PARAM__((int sym), (sym)) __OTORP__(int sym;){ static char tok[3]; if(sym < 0) return((char*)e_lexzerobyte); @@ -1601,7 +1601,7 @@ static char *fmttoken __PARAM__((register int sym), (sym)) __OTORP__(register in return(shlex.arg?shlex.arg->argval:"?"); if(sym&SYMRES) { - register const Shtable_t *tp=shtab_reserved; + const Shtable_t *tp=shtab_reserved; while(tp->sh_number && tp->sh_number!=sym) tp++; return((char*)tp->sh_name); @@ -1652,9 +1652,9 @@ static char *fmttoken __PARAM__((register int sym), (sym)) __OTORP__(register in */ void sh_syntax __PARAM__((void), ()){ - register const char *cp = e_unexpected; - register int tok = shlex.token; - register char *tokstr; + const char *cp = e_unexpected; + int tok = shlex.token; + char *tokstr; Sfio_t *sp; if((tok==EOFSYM) && shlex.lasttok) { @@ -1667,7 +1667,7 @@ void sh_syntax __PARAM__((void), ()){ if((sp=fcfile()) || (sh.infd>=0 && (sp=sh.sftable[sh.infd]))) { /* clear out any pending input */ - register Sfio_t *top; + Sfio_t *top; while(fcget()>0); fcclose(); while(top=sfstack(sp,SF_POPSTACK)) @@ -1696,10 +1696,10 @@ void sh_syntax __PARAM__((void), ()){ * If mode==2, the each $"" string is printed on standard output */ struct argnod *sh_endword __PARAM__((int mode), (mode)) __OTORP__(int mode;){ - register const char *state = sh_lexstates[ST_NESTED]; - register int n; - register char *sp,*dp; - register int inquote=0, inlit=0; /* set within quoted strings */ + const char *state = sh_lexstates[ST_NESTED]; + int n; + char *sp,*dp; + int inquote=0, inlit=0; /* set within quoted strings */ struct argnod* argp; char *ep=0; int offset = staktell(); @@ -1901,8 +1901,8 @@ struct alias * This code gets called whenever an end of string is found with alias */ static int alias_exceptf __PARAM__((Sfio_t *iop,int type,Sfdisc_t *handle), (iop, type, handle)) __OTORP__(Sfio_t *iop;int type;Sfdisc_t *handle;){ - register struct alias *ap = (struct alias*)handle; - register Namval_t *np; + struct alias *ap = (struct alias*)handle; + Namval_t *np; static char buf[2]; if(type==0 || !ap) return(0); @@ -1911,7 +1911,7 @@ static int alias_exceptf __PARAM__((Sfio_t *iop,int type,Sfdisc_t *handle), (iop { if(type==SF_CLOSE) { - register Sfdisc_t *dp = sfdisc(iop,SF_POPDISC); + Sfdisc_t *dp = sfdisc(iop,SF_POPDISC); if(dp!=handle) sfdisc(iop,dp); else if(ap) @@ -1922,7 +1922,7 @@ static int alias_exceptf __PARAM__((Sfio_t *iop,int type,Sfdisc_t *handle), (iop if(ap->nextc) { /* if last character is a blank, then next work can be alias */ - register int c = fcpeek(-1); + int c = fcpeek(-1); if(isblank(c)) shlex.aliasok = 1; *buf = ap->nextc; @@ -1938,7 +1938,7 @@ done: static void setupalias __PARAM__((const char *string,Namval_t *np), (string, np)) __OTORP__(const char *string;Namval_t *np;){ - register Sfio_t *iop, *base; + Sfio_t *iop, *base; struct alias *ap = (struct alias*)malloc(sizeof(struct alias)); ap->disc = alias_disc; iop = sfopen(NIL(Sfio_t*),(char*)string,"s"); diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/macro.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/macro.c index ac9e04db..3df663dd 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/macro.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/macro.c @@ -161,7 +161,7 @@ static char *mac_getstring __PROTO__((char*)); /* * perform only parameter substitution and catch failures */ -char *sh_mactry __PARAM__((register char *string), (string)) __OTORP__(register char *string;){ +char *sh_mactry __PARAM__((char *string), (string)) __OTORP__(char *string;){ if(string) { int jmp_val; @@ -183,7 +183,7 @@ char *sh_mactry __PARAM__((register char *string), (string)) __OTORP__(register * yields a single pathname. * If negative, than expansion rules for assignment are applied. */ -char *sh_mactrim __PARAM__((char *str, register int mode), (str, mode)) __OTORP__(char *str; register int mode;){ +char *sh_mactrim __PARAM__((char *str, int mode), (str, mode)) __OTORP__(char *str; int mode;){ struct _mac_ savemac; savemac = mac; stakseek(0); @@ -217,9 +217,9 @@ char *sh_mactrim __PARAM__((char *str, register int mode), (str, mode)) __OTORP_ /* * Perform all the expansions on the argument */ -int sh_macexpand __PARAM__((register struct argnod *argp, struct argnod **arghead), (argp, arghead)) __OTORP__(register struct argnod *argp; struct argnod **arghead;){ - register int flags = argp->argflag; - register char *str = argp->argval; +int sh_macexpand __PARAM__((struct argnod *argp, struct argnod **arghead), (argp, arghead)) __OTORP__(struct argnod *argp; struct argnod **arghead;){ + int flags = argp->argflag; + char *str = argp->argval; struct _mac_ savemac; savemac = mac; stakseek(ARGVAL); @@ -248,9 +248,9 @@ int sh_macexpand __PARAM__((register struct argnod *argp, struct argnod **arghea * The result is written to */ void sh_machere __PARAM__((Sfio_t *infile, Sfio_t *outfile, char *string), (infile, outfile, string)) __OTORP__(Sfio_t *infile; Sfio_t *outfile; char *string;){ - register int c,n; - register const char *state = sh_lexstates[ST_QUOTE]; - register char *cp; + int c,n; + const char *state = sh_lexstates[ST_QUOTE]; + char *cp; Fcin_t save; struct _mac_ savemac; savemac = mac; @@ -353,9 +353,9 @@ void sh_machere __PARAM__((Sfio_t *infile, Sfio_t *outfile, char *string), (infi * Process the characters up to or end of input string */ static void copyto __PARAM__((int endch, int newquote), (endch, newquote)) __OTORP__(int endch; int newquote;){ - register int c,n; - register const char *state = sh_lexstates[ST_MACRO]; - register char *cp,*first; + int c,n; + const char *state = sh_lexstates[ST_MACRO]; + char *cp,*first; int tilde = -1; int oldquote = mac.quote; int ansi_c = 0; @@ -566,7 +566,7 @@ done: * This will be in libast some day */ static int strgrpmatch __PARAM__((char *string, char *pattern, int match[], int nmatch,int flags), (string, pattern, match, nmatch, flags)) __OTORP__(char *string; char *pattern; int match[]; int nmatch;int flags;){ - register char *cp=string, *dp; + char *cp=string, *dp; int c=0,anchor = (flags&STR_LEFT); flags &= ~STR_LEFT; /* optimize a little */ @@ -607,9 +607,9 @@ static int strgrpmatch __PARAM__((char *string, char *pattern, int match[], int /* * copy to stack performing sub-expression substitutions */ -static void mac_substitute __PARAM__((register char *cp,char *str,register int subexp[],int subsize), (cp, str, subexp, subsize)) __OTORP__(register char *cp;char *str;register int subexp[];int subsize;){ - register int c,n; - register char *first=cp; +static void mac_substitute __PARAM__((char *cp,char *str,int subexp[],int subsize), (cp, str, subexp, subsize)) __OTORP__(char *cp;char *str;int subexp[];int subsize;){ + int c,n; + char *first=cp; while(1) { while((c= *cp++) && c!=ESCAPE); @@ -644,11 +644,11 @@ static void mac_substitute __PARAM__((register char *cp,char *str,register int s */ static int varsub __PARAM__((void), ()){ static char idbuff[2]; - register int c; - register int type=0; /* M_xxx */ - register char *v,*argp=0; - register Namval_t *np = NIL(Namval_t*); - register int dolg=0, mode=0; + int c; + int type=0; /* M_xxx */ + char *v,*argp=0; + Namval_t *np = NIL(Namval_t*); + int dolg=0, mode=0; Namarr_t *ap=0; int dolmax=0, vsize= -1, offset, nulflg, replen=0, bysub=0; char *id = idbuff, *pattern=0, *repstr; @@ -711,7 +711,7 @@ retry1: c -= '0'; if(type) { - register int d; + int d; while((d=fcget()),isadigit(d)) c = 10*c + (d-'0'); fcseek(-1); @@ -1023,7 +1023,7 @@ retry1: retry2: if(v && (!nulflg || *v ) && c!='+') { - register int d = (mode=='@'?' ':mac.ifs); + int d = (mode=='@'?' ':mac.ifs); int match[20], nmatch; while(1) { @@ -1156,8 +1156,8 @@ nosub: * is 0 for older `...` version */ static void comsubst __PARAM__((int type), (type)) __OTORP__(int type;){ - register int c; - register char *str; + int c; + char *str; Sfio_t *sp; Fcin_t save; struct slnod *saveslp = sh.st.staklist; @@ -1167,7 +1167,7 @@ static void comsubst __PARAM__((int type), (type)) __OTORP__(int type;){ char *savptr = stakfreeze(0); int saveflags = sh_isstate(SH_HISTORY|SH_VERBOSE); int newlines; - register union anynode *t; + union anynode *t; savemac = mac; sh.st.staklist=0; if(type) @@ -1228,7 +1228,7 @@ static void comsubst __PARAM__((int type), (type)) __OTORP__(int type;){ if(t->tre.tretyp==0 && !t->com.comarg) { /* special case $( < file) */ - register int fd; + int fd; struct checkpt buff; sh_pushcontext(&buff,SH_JMPIO); if(t->tre.treio && !(((t->tre.treio)->iofile)&IOUFD) && @@ -1279,10 +1279,10 @@ static void comsubst __PARAM__((int type), (type)) __OTORP__(int type;){ /* * copy onto the stack */ -static void mac_copy __PARAM__((register const char *str, register int size), (str, size)) __OTORP__(register const char *str; register int size;){ - register char *state; - register const char *cp=str; - register int c,n,nopat; +static void mac_copy __PARAM__((const char *str, int size), (str, size)) __OTORP__(const char *str; int size;){ + char *state; + const char *cp=str; + int c,n,nopat; nopat = (mac.quote||mac.assign==1||mac.arith); if(mac.sp) sfwrite(mac.sp,str,size); @@ -1403,7 +1403,7 @@ static void mac_copy __PARAM__((register const char *str, register int size), (s * Do filename expansion of required */ static void endfield __PARAM__((int split), (split)) __OTORP__(int split;){ - register struct argnod *argp; + struct argnod *argp; if(staktell() > ARGVAL || split) { argp = (struct argnod*)stakfreeze(1); @@ -1432,9 +1432,9 @@ static void endfield __PARAM__((int split), (split)) __OTORP__(int split;){ * Finds the right substring of STRING using the expression PAT * the longest substring is found when FLAG is set. */ -static int substring __PARAM__((register const char *string,const char *pat,int match[], int flag), (string, pat, match, flag)) __OTORP__(register const char *string;const char *pat;int match[]; int flag;){ - register const char *sp=string; - register int size,len,nmatch,n; +static int substring __PARAM__((const char *string,const char *pat,int match[], int flag), (string, pat, match, flag)) __OTORP__(const char *string;const char *pat;int match[]; int flag;){ + const char *sp=string; + int size,len,nmatch,n; int smatch[20]; sp += (len=strlen(sp)); size = sp-string; @@ -1467,8 +1467,8 @@ static int substring __PARAM__((register const char *string,const char *pat,int #ifdef SHOPT_MULTIBYTE static char *lastchar __PARAM__((const char *string, const char *endstring), (string, endstring)) __OTORP__(const char *string; const char *endstring;){ - register char *str = (char*)string; - register int c; + char *str = (char*)string; + int c; mblen(NIL(char*),MB_CUR_MAX); while(*str) { @@ -1481,9 +1481,9 @@ static int substring __PARAM__((register const char *string,const char *pat,int return(str); } static int charlen __PARAM__((const char *string), (string)) __OTORP__(const char *string;){ - register const char *str = string; - register int n=0; - register int c; + const char *str = string; + int n=0; + int c; wchar_t w; mblen(NIL(char*),MB_CUR_MAX); while(*str) @@ -1504,8 +1504,8 @@ static int substring __PARAM__((register const char *string,const char *pat,int * is byte offset for beginning of tilde string */ -static void tilde_expand2 __PARAM__((register int offset), (offset)) __OTORP__(register int offset;){ - register char *cp; +static void tilde_expand2 __PARAM__((int offset), (offset)) __OTORP__(int offset;){ + char *cp; int curoff = staktell(); stakputc(0); if(cp = sh_tilde(stakptr(offset))) @@ -1526,11 +1526,11 @@ static void tilde_expand2 __PARAM__((register int offset), (offset)) __OTORP__(r * If string doesn't start with ~ or ~... not found then 0 returned. */ -static char *sh_tilde __PARAM__((register const char *string), (string)) __OTORP__(register const char *string;){ - register char *cp; - register int c; - register struct passwd *pw; - register Namval_t *np; +static char *sh_tilde __PARAM__((const char *string), (string)) __OTORP__(const char *string;){ + char *cp; + int c; + struct passwd *pw; + Namval_t *np; static Hashtab_t *logins_tree; if(*string++!='~') return(NIL(char*)); @@ -1562,8 +1562,8 @@ static char *sh_tilde __PARAM__((register const char *string), (string)) __OTORP /* * return values for special macros */ -static char *special __PARAM__((register int c), (c)) __OTORP__(register int c;){ - register Namval_t *np; +static char *special __PARAM__((int c), (c)) __OTORP__(int c;){ + Namval_t *np; switch(c) { case '@': @@ -1605,8 +1605,8 @@ static void mac_error __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ * \ characters are stripped from string. */ static char *mac_getstring __PARAM__((char *pattern), (pattern)) __OTORP__(char *pattern;){ - register char *cp = pattern; - register int c; + char *cp = pattern; + int c; while(c = *cp++) { if(c==ESCAPE) @@ -1625,8 +1625,8 @@ static char *mac_getstring __PARAM__((char *pattern), (pattern)) __OTORP__(char */ static char *nextname __PARAM__((const char *prefix, int len), (prefix, len)) __OTORP__(const char *prefix; int len;){ static Hashpos_t *hp; - register Namval_t *np; - register char *cp; + Namval_t *np; + char *cp; if(!prefix) hp = hashscan(sh.var_tree,0); else if(hp) diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/main.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/main.c index b9e32e26..1f894e09 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/main.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/main.c @@ -130,7 +130,7 @@ static time_t mailtime; static char beenhere = 0; #ifdef _lib_sigvec - void clearsigmask __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){ + void clearsigmask __PARAM__((int sig), (sig)) __OTORP__(int sig;){ struct sigvec vec; if(sigvec(sig,NIL(struct sigvec*),&vec)>=0 && vec.sv_mask) { @@ -141,10 +141,10 @@ static char beenhere = 0; #endif /* _lib_sigvec */ main __PARAM__((int ac, char *av[]), (ac, av)) __OTORP__(int ac; char *av[];){ - register char *name; - register int fdin; - register Sfio_t *iop; - register int rshflag; /* set for restricted shell */ + char *name; + int fdin; + Sfio_t *iop; + int rshflag; /* set for restricted shell */ struct checkpt buff; int prof; char *command; @@ -322,7 +322,7 @@ main __PARAM__((int ac, char *av[]), (ac, av)) __OTORP__(int ac; char *av[];){ * fdin is the input file descriptor */ -static void exfile __PARAM__((register Sfio_t *iop,register int fno), (iop, fno)) __OTORP__(register Sfio_t *iop;register int fno;){ +static void exfile __PARAM__((Sfio_t *iop,int fno), (iop, fno)) __OTORP__(Sfio_t *iop;int fno;){ time_t curtime; union anynode *t; int maxtry=IOMAXTRY, tdone=0, execflags; @@ -412,7 +412,7 @@ static void exfile __PARAM__((register Sfio_t *iop,register int fno), (iop, fno) sh_offstate(SH_INTERACTIVE|SH_ERREXIT|SH_MONITOR); if(sh_isstate(SH_INTERACTIVE) && !tdone) { - register char *mail; + char *mail; #ifdef JOBS sh_offstate(SH_MONITOR); sh_onstate(sh_isoption(SH_MONITOR)); @@ -529,8 +529,8 @@ done: /* prints out messages if files in list have been modified since last call */ static void chkmail __PARAM__((char *files), (files)) __OTORP__(char *files;){ - register char *cp,*sp,*qp; - register char save; + char *cp,*sp,*qp; + char save; struct argnod *arglist=0; int offset = staktell(); char *savstak=stakptr(0); @@ -626,7 +626,7 @@ static void fixargs __PARAM__((char **argv, int mode), (argv, mode)) __OTORP__(c #else static char *buff; static int command_len; - register char *cp; + char *cp; int offset=0,size; # ifdef PSTAT union pstun un; diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/name.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/name.c index 44ed9724..2c232fce 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/name.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/name.c @@ -230,9 +230,9 @@ void mirror_env __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;) * Perform parameter assignment for a linked list of parameters * contains attributes for the parameters */ -void nv_setlist __PARAM__((register struct argnod *arg,register int flags), (arg, flags)) __OTORP__(register struct argnod *arg;register int flags;){ - register char *cp; - register Namval_t *np; +void nv_setlist __PARAM__((struct argnod *arg,int flags), (arg, flags)) __OTORP__(struct argnod *arg;int flags;){ + char *cp; + Namval_t *np; int traceon = (sh_isoption(SH_XTRACE)!=0); if(sh_isoption(SH_ALLEXPORT)) flags |= NV_EXPORT; @@ -253,7 +253,7 @@ void nv_setlist __PARAM__((register struct argnod *arg,register int flags), (arg { int flag = (NV_VARNAME|NV_ARRAY|NV_ASSIGN); struct fornod *fp=(struct fornod*)arg->argchn.ap; - register union anynode *tp=fp->fortre; + union anynode *tp=fp->fortre; char *prefix = sh.prefix; cp = fp->fornam; error_info.line = fp->fortyp-sh.st.firstline; @@ -303,7 +303,7 @@ void nv_setlist __PARAM__((register struct argnod *arg,register int flags), (arg np->nvsize &= ~NV_PARAM; if(traceon) { - register char *sp=cp; + char *sp=cp; sh_trace(NIL(char**),0); sfputr(sfstderr,nv_name(np),-1); if(nv_isattr(np,NV_ARRAY) && (cp=strchr(sp,'['))) @@ -324,8 +324,8 @@ void nv_setlist __PARAM__((register struct argnod *arg,register int flags), (arg /* * construct a new name from a prefix and base name on the stack */ -static char *newname __PARAM__((register const char *prefix, register const char *name), (prefix, name)) __OTORP__(register const char *prefix; register const char *name;){ - register int offset = staktell(); +static char *newname __PARAM__((const char *prefix, const char *name), (prefix, name)) __OTORP__(const char *prefix; const char *name;){ + int offset = staktell(); stakputs(prefix); if(*name!='[') stakputc('.'); @@ -346,11 +346,11 @@ static char *newname __PARAM__((register const char *prefix, register const char * SH_INIT is only set while initializing the environment */ Namval_t *nv_open __PARAM__((const char *name,Hashtab_t *root,int flags), (name, root, flags)) __OTORP__(const char *name;Hashtab_t *root;int flags;){ - register char *cp = (char*)name; - register Namval_t *np=0; - register int sep = *cp; - register char *lastdot = 0; - register long mode = ((flags&NV_NOADD)?0:NV_ADD); + char *cp = (char*)name; + Namval_t *np=0; + int sep = *cp; + char *lastdot = 0; + long mode = ((flags&NV_NOADD)?0:NV_ADD); if(root==sh.alias_tree) { while((sep= *(unsigned char*)cp) && (sep!='=') && (sep!='/') && @@ -552,12 +552,12 @@ failed: * If contains NV_NOFREE, previous value is freed, and * becomes value of node and becomes attributes */ -void nv_putval __PARAM__((register Namval_t *np, const char *string, int flags), (np, string, flags)) __OTORP__(register Namval_t *np; const char *string; int flags;){ - register const char *sp=string; - register union Value *up; - register char *cp; - register int size = 0; - register int dot; +void nv_putval __PARAM__((Namval_t *np, const char *string, int flags), (np, string, flags)) __OTORP__(Namval_t *np; const char *string; int flags;){ + const char *sp=string; + union Value *up; + char *cp; + int size = 0; + int dot; if(!(flags&NV_RDONLY) && nv_isattr (np, NV_RDONLY)) error(ERROR_exit(1),e_readonly, nv_name(np)); /* The following could cause the shell to fork if assignment @@ -686,7 +686,7 @@ void nv_putval __PARAM__((register Namval_t *np, const char *string, int flags), rightjust(cp,size,' '); else if(nv_isattr(np, NV_LJUST)) { - register char *dp; + char *dp; dp = strlen (cp) + cp; *(cp = (cp + size)) = 0; for (; dp < cp; *dp++ = ' '); @@ -722,8 +722,8 @@ void nv_putval __PARAM__((register Namval_t *np, const char *string, int flags), * will default to a blank. */ static void rightjust __PARAM__((char *str, int size, int fill), (str, size, fill)) __OTORP__(char *str; int size; int fill;){ - register int n; - register char *cp,*sp; + int n; + char *cp,*sp; n = strlen(str); /* ignore trailing blanks */ @@ -765,8 +765,8 @@ static void rightjust __PARAM__((char *str, int size, int fill), (str, size, fil */ static int ja_size __PARAM__((char *str,int size,int type), (str, size, type)) __OTORP__(char *str;int size;int type;){ - register char *cp = str; - register int c, n=size; + char *cp = str; + int c, n=size; int oldn; wchar_t w; while(*cp) @@ -774,7 +774,7 @@ static void rightjust __PARAM__((char *str, int size, int fill), (str, size, fil oldn = n; if((c=mbtowc(&w,cp,MB_CUR_MAX))>0) { - register int outsize = wcwidth(w); + int outsize = wcwidth(w); /* allow room for excess input bytes */ n += (c-outsize); size -= outsize; @@ -813,15 +813,15 @@ static void rightjust __PARAM__((char *str, int size, int fill), (str, size, fil } static void ja_restore __PARAM__((void), ()){ - register char *cp = savechars; + char *cp = savechars; while(*cp) *savep++ = *cp++; savep = 0; } #endif /* SHOPT_MULTIBYTE */ -static char *staknam __PARAM__((register Namval_t *np, char *value), (np, value)) __OTORP__(register Namval_t *np; char *value;){ - register char *p,*q; +static char *staknam __PARAM__((Namval_t *np, char *value), (np, value)) __OTORP__(Namval_t *np; char *value;){ + char *p,*q; q = stakalloc(strlen(nv_name(np))+(value?strlen(value):0)+2); p=strcopy(q,nv_name(np)); if(value) @@ -835,8 +835,8 @@ static char *staknam __PARAM__((register Namval_t *np, char *value), (np, value) /* * put the name and attribute into value of attributes variable */ -static void attstore __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){ - register int flag = np->nvflag; +static void attstore __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ + int flag = np->nvflag; if(!(flag&NV_EXPORT) || (flag&NV_FUNCT)) return; flag &= (NV_RDONLY|NV_UTOL|NV_LTOU|NV_RJUST|NV_LJUST|NV_ZFILL|NV_INTEGER); @@ -850,7 +850,7 @@ static void attstore __PARAM__((register Namval_t *np), (np)) __OTORP__(register } static void pushnam __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ - register char *value; + char *value; if(nv_isattr(np,NV_IMPORT)) { if(np->nvenv) @@ -867,9 +867,9 @@ static void pushnam __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ */ char **sh_envgen __PARAM__((void), ()){ - register char **er; - register int namec; - register char *cp; + char **er; + int namec; + char *cp; /* L_ARGNOD gets generated automatically as full path name of command */ nv_offattr(L_ARGNOD,NV_EXPORT); attsize = 6; @@ -893,8 +893,8 @@ static int scanflags; static int scancount = 0; static int scanfilter __PARAM__((const char *name, char *arg, __V_ *notused), (name, arg, notused)) __OTORP__(const char *name; char *arg; __V_ *notused;){ - register Namval_t *np = (Namval_t*)arg; - register int k=np->nvflag; + Namval_t *np = (Namval_t*)arg; + int k=np->nvflag; NOT_USED(name); NOT_USED(notused); if(scanmask?(k&scanmask)==scanflags:(!scanflags || (k&scanflags))) @@ -935,7 +935,7 @@ int nv_scan __PARAM__((Hashtab_t *root, void (*fn)(Namval_t*), int mask, int fla * create a new environment scope */ void nv_scope __PARAM__((struct argnod *envlist), (envlist)) __OTORP__(struct argnod *envlist;){ - register Hashtab_t *newscope; + Hashtab_t *newscope; newscope = hashalloc(sh.var_tree,HASH_set,HASH_SCOPE|HASH_ALLOCATE,0); sh.var_tree = newscope; nv_setlist(envlist,NV_EXPORT|NV_NOSCOPE|NV_IDENT|NV_ASSIGN); @@ -947,7 +947,7 @@ void nv_scope __PARAM__((struct argnod *envlist), (envlist)) __OTORP__(struct ar * node, as well as its dope vector, if it is an array. */ -void sh_envnolocal __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){ +void sh_envnolocal __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ if(nv_isattr(np,NV_EXPORT|NV_NOFREE)) { if(nv_isattr(np,NV_REF)) @@ -980,9 +980,9 @@ void nv_close __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ * by the value of . If denotes an array member, it * will retain its attributes. */ -void nv_unset __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){ - register union Value *up = &np->nvalue; - register Namarr_t *ap; +void nv_unset __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ + union Value *up = &np->nvalue; + Namarr_t *ap; if(!forced && nv_isattr (np,NV_RDONLY)) error(ERROR_exit(1),e_readonly, nv_name(np)); if(sh.subshell && !nv_isnull(np)) @@ -1032,7 +1032,7 @@ void nv_unset __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval /* * return the node pointer in the highest level scope */ -Namval_t *nv_scoped __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){ +Namval_t *nv_scoped __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ if(hashscope(sh.var_tree)) return(nv_search((char*)np,sh.var_tree,HASH_BUCKET)); else @@ -1050,10 +1050,10 @@ Namval_t *nv_scoped __PARAM__((register Namval_t *np), (np)) __OTORP__(register * If has no value, 0 is returned. */ -char *nv_getval __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){ - register union Value *up= &np->nvalue; - register int numeric; - register Namarr_t *ap; +char *nv_getval __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ + union Value *up= &np->nvalue; + int numeric; + Namarr_t *ap; if(!np->nvfun && !nv_isattr(np,NV_ARRAY|NV_INTEGER|NV_FUNCT|NV_REF)) goto done; if(ap = nv_arrayptr(np)) @@ -1075,7 +1075,7 @@ char *nv_getval __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namv } if(numeric) { - register long l; + long l; if(!up->cp || nv_isattr (np,NV_CPOINTER)) return((char*)up->cp); else if(nv_isattr (np,NV_DOUBLE)) @@ -1105,10 +1105,10 @@ done: return ((char*)up->cp); } -double nv_getnum __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){ - register union Value *up; - register double r=0; - register char *str; +double nv_getnum __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ + union Value *up; + double r=0; + char *str; if(np->nvfun) { if(!local) @@ -1140,10 +1140,10 @@ double nv_getnum __PARAM__((register Namval_t *np), (np)) __OTORP__(register Nam * value to conform to . The of left and right * justified fields may be given. */ -void nv_newattr __PARAM__((register Namval_t *np, unsigned newatts, int size), (np, newatts, size)) __OTORP__(register Namval_t *np; unsigned newatts; int size;){ - register char *sp; - register char *cp = 0; - register unsigned int n; +void nv_newattr __PARAM__((Namval_t *np, unsigned newatts, int size), (np, newatts, size)) __OTORP__(Namval_t *np; unsigned newatts; int size;){ + char *sp; + char *cp = 0; + unsigned int n; Namarr_t *ap = 0; int oldsize,oldatts; @@ -1219,9 +1219,9 @@ void nv_newattr __PARAM__((register Namval_t *np, unsigned newatts, int size), #ifndef _NEXT_SOURCE static char *oldgetenv __PARAM__((const char *string), (string)) __OTORP__(const char *string;){ - register char c0,c1; - register const char *cp, *sp; - register char **av = environ; + char c0,c1; + const char *cp, *sp; + char **av = environ; if(!string || (c0= *string)==0) return(0); if((c1= *++string)==0) @@ -1246,7 +1246,7 @@ static char *oldgetenv __PARAM__((const char *string), (string)) __OTORP__(const * around the problems, others don't. */ char *ksh_getenv __PARAM__((const char *name), (name)) __OTORP__(const char *name;){ - register Namval_t *np; + Namval_t *np; if(!sh.var_tree) return(oldgetenv(name)); if((np = nv_search(name,sh.var_tree,0)) && nv_isattr(np,NV_EXPORT)) @@ -1266,7 +1266,7 @@ char *ksh_getenv __PARAM__((const char *name), (name)) __OTORP__(const char *nam * no calls to this routine. - harry phinney 8/15/1994. */ int ksh_putenv __PARAM__((const char *name), (name)) __OTORP__(const char *name;){ - register Namval_t *np; + Namval_t *np; if(name) { np = nv_open(name,sh.var_tree,NV_EXPORT|NV_IDENT|NV_ARRAY|NV_ASSIGN); @@ -1281,7 +1281,7 @@ int ksh_putenv __PARAM__((const char *name), (name)) __OTORP__(const char *name; * Override libast setenv() */ char* setenviron __PARAM__((const char *name), (name)) __OTORP__(const char *name;){ - register Namval_t *np; + Namval_t *np; if(name) { np = nv_open(name,sh.var_tree,NV_EXPORT|NV_IDENT|NV_ARRAY|NV_ASSIGN); @@ -1298,8 +1298,8 @@ char* setenviron __PARAM__((const char *name), (name)) __OTORP__(const char *nam * and may point to the same place. */ -static void ltou __PARAM__((register char const *str1,register char *str2), (str1, str2)) __OTORP__(register char const *str1;register char *str2;){ - register int c; +static void ltou __PARAM__((char const *str1,char *str2), (str1, str2)) __OTORP__(char const *str1;char *str2;){ + int c; for(; c= *((unsigned char*)str1); str1++,str2++) { if(islower(c)) @@ -1316,8 +1316,8 @@ static void ltou __PARAM__((register char const *str1,register char *str2), (str * and may point to the same place. */ -static void utol __PARAM__((register char const *str1,register char *str2), (str1, str2)) __OTORP__(register char const *str1;register char *str2;){ - register int c; +static void utol __PARAM__((char const *str1,char *str2), (str1, str2)) __OTORP__(char const *str1;char *str2;){ + int c; for(; c= *((unsigned char*)str1); str1++,str2++) { if(isupper(c)) @@ -1333,8 +1333,8 @@ static void utol __PARAM__((register char const *str1,register char *str2), (str * is null to pop, otherwise, is pushed onto stack * The top of the stack is returned */ -Namfun_t *nv_stack __PARAM__((register Namval_t *np, register Namfun_t* fp), (np, fp)) __OTORP__(register Namval_t *np; register Namfun_t* fp;){ - register Namfun_t *lp; +Namfun_t *nv_stack __PARAM__((Namval_t *np, Namfun_t* fp), (np, fp)) __OTORP__(Namval_t *np; Namfun_t* fp;){ + Namfun_t *lp; if(fp) { if((lp=np->nvfun)==fp) @@ -1364,8 +1364,8 @@ Namfun_t *nv_stack __PARAM__((register Namval_t *np, register Namfun_t* fp), (np * Special builtins cannot be replaced and return -1 */ int sh_addbuiltin __PARAM__((const char *path, int (*bltin)(int, char*[],__V_*),__V_ *extra), (path, bltin, extra)) __OTORP__(const char *path; int (*bltin)();__V_ *extra;){ - register const char *cp, *name = path_basename(path); - register Namval_t *np, *nq=0; + const char *cp, *name = path_basename(path); + Namval_t *np, *nq=0; if(name==path && (cp=strchr(name,'.')) && cp!=name) { int offset = staktell(); @@ -1412,8 +1412,8 @@ static char *curbuf; * with places after the decimal point. The string * will be stored within static variable . */ -char *sh_ftos __PARAM__((double val,register int places), (val, places)) __OTORP__(double val;register int places;){ - register char *cp, *sp; +char *sh_ftos __PARAM__((double val,int places), (val, places)) __OTORP__(double val;int places;){ + char *cp, *sp; int decpt,sign; cp = sffcvt(val,places,&decpt,&sign); @@ -1440,8 +1440,8 @@ char *sh_ftos __PARAM__((double val,register int places), (val, places)) __OTORP * convert to a string with significant figures * The result is placed in a local buffer and a pointer returned */ -char *sh_etos __PARAM__((double val,register int places), (val, places)) __OTORP__(double val;register int places;){ - register int bufsize = places+8; +char *sh_etos __PARAM__((double val,int places), (val, places)) __OTORP__(double val;int places;){ + int bufsize = places+8; if(!curbuf) curbuf = (char*)malloc(maxbufsize=bufsize); else if(bufsize > maxbufsize) @@ -1453,9 +1453,9 @@ char *sh_etos __PARAM__((double val,register int places), (val, places)) __OTORP /* * call the next getval function in the chain */ -char *nv_getv __PARAM__((Namval_t *np, register Namfun_t *nfp), (np, nfp)) __OTORP__(Namval_t *np; register Namfun_t *nfp;){ - register Namfun_t *fp; - register char *cp; +char *nv_getv __PARAM__((Namval_t *np, Namfun_t *nfp), (np, nfp)) __OTORP__(Namval_t *np; Namfun_t *nfp;){ + Namfun_t *fp; + char *cp; if((fp = nfp) != NIL(Namfun_t*) && !local) fp = nfp = nfp->next; local=0; @@ -1478,9 +1478,9 @@ char *nv_getv __PARAM__((Namval_t *np, register Namfun_t *nfp), (np, nfp)) __OTO /* * call the next getnum function in the chain */ -double nv_getn __PARAM__((Namval_t *np, register Namfun_t *nfp), (np, nfp)) __OTORP__(Namval_t *np; register Namfun_t *nfp;){ - register Namfun_t *fp; - register double d=0; +double nv_getn __PARAM__((Namval_t *np, Namfun_t *nfp), (np, nfp)) __OTORP__(Namval_t *np; Namfun_t *nfp;){ + Namfun_t *fp; + double d=0; if((fp = nfp) != NIL(Namfun_t*) && !local) fp = nfp = nfp->next; local=0; @@ -1507,8 +1507,8 @@ double nv_getn __PARAM__((Namval_t *np, register Namfun_t *nfp), (np, nfp)) __OT /* * call the next assign function in the chain */ -void nv_putv __PARAM__((Namval_t *np, const char *value, int flags, register Namfun_t *nfp), (np, value, flags, nfp)) __OTORP__(Namval_t *np; const char *value; int flags; register Namfun_t *nfp;){ - register Namfun_t *fp; +void nv_putv __PARAM__((Namval_t *np, const char *value, int flags, Namfun_t *nfp), (np, value, flags, nfp)) __OTORP__(Namval_t *np; const char *value; int flags; Namfun_t *nfp;){ + Namfun_t *fp; if((fp=nfp) != NIL(Namfun_t*) && !local) fp = nfp = nfp->next; local=0; @@ -1542,8 +1542,8 @@ struct vardisc /* * free discipline if no more discipline functions */ -static void chktfree __PARAM__((register Namval_t *np, register struct vardisc *vp), (np, vp)) __OTORP__(register Namval_t *np; register struct vardisc *vp;){ - register int n; +static void chktfree __PARAM__((Namval_t *np, struct vardisc *vp), (np, vp)) __OTORP__(Namval_t *np; struct vardisc *vp;){ + int n; for(n=0; n< sizeof(vp->disc)/sizeof(*vp->disc); n++) { if(vp->disc[n]) @@ -1562,8 +1562,8 @@ static void chktfree __PARAM__((register Namval_t *np, register struct vardisc * * This function performs an assignment disc on the given node */ static void assign __PARAM__((Namval_t *np,const char* val,int flags,Namfun_t *handle), (np, val, flags, handle)) __OTORP__(Namval_t *np;const char* val;int flags;Namfun_t *handle;){ - register struct vardisc *vp = (struct vardisc*)handle; - register Namval_t *nq, **disc; + struct vardisc *vp = (struct vardisc*)handle; + Namval_t *nq, **disc; if(val) { if(!(nq=vp->disc[ASSIGN])) @@ -1585,7 +1585,7 @@ static void assign __PARAM__((Namval_t *np,const char* val,int flags,Namfun_t *h } if(val) { - register char *cp; + char *cp; double d; if(nv_isnull(SH_VALNOD)) cp=0; @@ -1619,9 +1619,9 @@ static void assign __PARAM__((Namval_t *np,const char* val,int flags,Namfun_t *h * the lookup on the given node */ static char* lookup __PARAM__((Namval_t *np, Namfun_t *handle), (np, handle)) __OTORP__(Namval_t *np; Namfun_t *handle;){ - register struct vardisc *vp = (struct vardisc*)handle; - register Namval_t *nq; - register char *cp=0; + struct vardisc *vp = (struct vardisc*)handle; + Namval_t *nq; + char *cp=0; if((nq=vp->disc[LOOKUP]) && nq!=BLOCKED) { nv_unset(SH_VALNOD); @@ -1641,7 +1641,7 @@ static char* lookup __PARAM__((Namval_t *np, Namfun_t *handle), (np, handle)) __ /* * node creation discipline */ -Namval_t *nv_create __PARAM__((register Namval_t* np,const char *name,register Namfun_t *fp), (np, name, fp)) __OTORP__(register Namval_t* np;const char *name;register Namfun_t *fp;){ +Namval_t *nv_create __PARAM__((Namval_t* np,const char *name,Namfun_t *fp), (np, name, fp)) __OTORP__(Namval_t* np;const char *name;Namfun_t *fp;){ if(np == (Namval_t*)fp) fp = np->nvfun; else if(fp) @@ -1668,14 +1668,14 @@ static const Namdisc_t shdisc = * If is NULL, then return the event name after * If is NULL, and is NULL, return the first event */ -char *nv_setdisc __PARAM__((register Namval_t* np,register const char *event,Namval_t *action,register Namfun_t *fp), (np, event, action, fp)) __OTORP__(register Namval_t* np;register const char *event;Namval_t *action;register Namfun_t *fp;){ - register struct vardisc *vp = (struct vardisc*)np->nvfun; - register int type; +char *nv_setdisc __PARAM__((Namval_t* np,const char *event,Namval_t *action,Namfun_t *fp), (np, event, action, fp)) __OTORP__(Namval_t* np;const char *event;Namval_t *action;Namfun_t *fp;){ + struct vardisc *vp = (struct vardisc*)np->nvfun; + int type; if(np == (Namval_t*)fp) { static const char *discnames[] = { "get", "set", "unset", 0 }; - register const char *name; - register int getname=0; + const char *name; + int getname=0; /* top level call, check for get/set */ if(!event) { @@ -1744,10 +1744,10 @@ char *nv_setdisc __PARAM__((register Namval_t* np,register const char *event,Nam /* * Create a reference node from */ -void nv_setref __PARAM__((register Namval_t *np), (np)) __OTORP__(register Namval_t *np;){ - register Namval_t *nq, *nr; - register char *cp; - register int flags = NV_ARRAY|NV_VARNAME|NV_REF; +void nv_setref __PARAM__((Namval_t *np), (np)) __OTORP__(Namval_t *np;){ + Namval_t *nq, *nr; + char *cp; + int flags = NV_ARRAY|NV_VARNAME|NV_REF; Hashtab_t *hp=sh.var_tree; if(nv_isattr(np,NV_REF)) return; diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/parse.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/parse.c index 69de5334..03909f85 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/parse.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/parse.c @@ -151,9 +151,9 @@ static struct argnod *label_last; * type=='V' for variable assignment lists * Otherwise type is determined by the command */ static void writedefs __PARAM__((struct argnod *arglist, int line, int type, struct argnod *cmd), (arglist, line, type, cmd)) __OTORP__(struct argnod *arglist; int line; int type; struct argnod *cmd;){ - register struct argnod *argp = arglist; - register char *cp; - register int n; + struct argnod *argp = arglist; + char *cp; + int n; int width=0; static char atbuff[20]; static char justify[2]; @@ -213,7 +213,7 @@ static void writedefs __PARAM__((struct argnod *arglist, int line, int type, str * Make a parent node for fork() or io-redirection */ static union anynode *makeparent __PARAM__((int flag, union anynode *child), (flag, child)) __OTORP__(int flag; union anynode *child;){ - register union anynode *par = getnode(forknod); + union anynode *par = getnode(forknod); par->fork.forktyp = flag; par->fork.forktre = child; par->fork.forkio = 0; @@ -225,7 +225,7 @@ static union anynode *makeparent __PARAM__((int flag, union anynode *child), (fl * Make a node corresponding to a command list */ static union anynode *makelist __PARAM__((int type, union anynode *l, union anynode *r), (type, l, r)) __OTORP__(int type; union anynode *l; union anynode *r;){ - register union anynode *t; + union anynode *t; if(!l || !r) sh_syntax(); else @@ -247,7 +247,7 @@ static union anynode *makelist __PARAM__((int type, union anynode *l, union anyn */ union anynode *sh_parse __PARAM__((Sfio_t *iop, int flag), (iop, flag)) __OTORP__(Sfio_t *iop; int flag;){ - register union anynode *t; + union anynode *t; Fcin_t sav_input; int sav_prompt = sh.nextprompt; if(sh.binscript && sffileno(iop)==sh.infd) @@ -305,7 +305,7 @@ union anynode *sh_parse __PARAM__((Sfio_t *iop, int flag), (iop, flag)) __OTORP_ * the parse tree */ union anynode *sh_dolparen __PARAM__((void), ()){ - register union anynode *t=0; + union anynode *t=0; Sfio_t *sp = fcfile(); int line = sh.inlineno; sh.inlineno = error_info.line+sh.st.firstline; @@ -329,7 +329,7 @@ union anynode *sh_dolparen __PARAM__((void), ()){ * This code handles the case where string has been converted * to a file by an alias setup */ - register int c; + int c; char *cp; if(fcgetc(c) > 0) fcseek(-1); @@ -358,8 +358,8 @@ void sh_freeup __PARAM__((void), ()){ * stack is freed when reference count is zero */ -void sh_funstaks __PARAM__((register struct slnod *slp,int flag), (slp, flag)) __OTORP__(register struct slnod *slp;int flag;){ - register struct slnod *slpold; +void sh_funstaks __PARAM__((struct slnod *slp,int flag), (slp, flag)) __OTORP__(struct slnod *slp;int flag;){ + struct slnod *slpold; while(slpold=slp) { if(slp->slchild) @@ -379,9 +379,9 @@ void sh_funstaks __PARAM__((register struct slnod *slp,int flag), (slp, flag)) _ * list [ ; cmd ] */ -static union anynode *sh_cmd __PARAM__((register int sym, int flag), (sym, flag)) __OTORP__(register int sym; int flag;){ - register union anynode *left, *right; - register int type = FINT|FAMP; +static union anynode *sh_cmd __PARAM__((int sym, int flag), (sym, flag)) __OTORP__(int sym; int flag;){ + union anynode *left, *right; + int type = FINT|FAMP; if(sym==NL) shlex.lasttok = 0; left = list(flag); @@ -432,9 +432,9 @@ static union anynode *sh_cmd __PARAM__((register int sym, int flag), (sym, flag) * list || term * unfortunately, these are equal precedence */ -static union anynode *list __PARAM__((register int flag), (flag)) __OTORP__(register int flag;){ - register union anynode *t = term(flag); - register int token; +static union anynode *list __PARAM__((int flag), (flag)) __OTORP__(int flag;){ + union anynode *t = term(flag); + int token; while(t && ((token=shlex.token)==ANDFSYM || token==ORFSYM)) t = makelist((token==ANDFSYM?TAND:TORF), t, term(SH_NL)); return(t); @@ -445,9 +445,9 @@ static union anynode *list __PARAM__((register int flag), (flag)) __OTORP__(regi * item * item | term */ -static union anynode *term __PARAM__((register int flag), (flag)) __OTORP__(register int flag;){ - register union anynode *t; - register int token; +static union anynode *term __PARAM__((int flag), (flag)) __OTORP__(int flag;){ + union anynode *t; + int token; if(flag&SH_NL) token = skipnl(); else @@ -463,7 +463,7 @@ static union anynode *term __PARAM__((register int flag), (flag)) __OTORP__(regi } else if((t=item(SH_NL|SH_EMPTY)) && shlex.token=='|') { - register union anynode *tt; + union anynode *tt; t = makeparent(TFORK|FPOU,t); if(tt=term(SH_NL)) { @@ -489,9 +489,9 @@ static union anynode *term __PARAM__((register int flag), (flag)) __OTORP__(regi /* * case statement */ -static struct regnod* syncase __PARAM__((register int esym), (esym)) __OTORP__(register int esym;){ - register int tok = skipnl(); - register struct regnod *r; +static struct regnod* syncase __PARAM__((int esym), (esym)) __OTORP__(int esym;){ + int tok = skipnl(); + struct regnod *r; if(tok==esym) return(NIL(struct regnod*)); r = (struct regnod*)stakalloc(sizeof(struct regnod)); @@ -538,11 +538,11 @@ static struct regnod* syncase __PARAM__((register int esym), (esym)) __OTORP__(r * Otherise a list containing an arithmetic command and a while * is returned. */ -static union anynode *arithfor __PARAM__((register union anynode *tf), (tf)) __OTORP__(register union anynode *tf;){ - register union anynode *t, *tw = tf; - register int offset; - register struct argnod *argp; - register int n; +static union anynode *arithfor __PARAM__((union anynode *tf), (tf)) __OTORP__(union anynode *tf;){ + union anynode *t, *tw = tf; + int offset; + struct argnod *argp; + int n; int argflag = shlex.arg->argflag; /* save current input */ Fcin_t sav_input; @@ -551,7 +551,7 @@ static union anynode *arithfor __PARAM__((register union anynode *tf), (tf)) __O /* split ((...)) into three expressions */ for(n=0; ; n++) { - register int c; + int c; argp = (struct argnod*)stakseek(ARGVAL); argp->argnxt.ap = 0; argp->argflag = argflag; @@ -617,8 +617,8 @@ static union anynode *arithfor __PARAM__((register union anynode *tf), (tf)) __O } static union anynode *funct __PARAM__((void), ()){ - register union anynode *t; - register int flag; + union anynode *t; + int flag; struct slnod *volatile slp=0; Stak_t *savstak; #ifdef SHOPT_KIA @@ -735,10 +735,10 @@ static union anynode *funct __PARAM__((void), ()){ /* * Compound assignment */ -static struct argnod *assign __PARAM__((register struct argnod *ap), (ap)) __OTORP__(register struct argnod *ap;){ - register int n; - register union anynode *t ,**tp; - register struct comnod *ac; +static struct argnod *assign __PARAM__((struct argnod *ap), (ap)) __OTORP__(struct argnod *ap;){ + int n; + union anynode *t ,**tp; + struct comnod *ac; int array=0; Namval_t *np; n = strlen(ap->argval)-1; @@ -808,9 +808,9 @@ static struct argnod *assign __PARAM__((register struct argnod *ap), (ap)) __OTO */ static union anynode *item __PARAM__((int flag), (flag)) __OTORP__(int flag;){ - register union anynode *t; - register struct ionod *io; - register int tok = (shlex.token&0xff); + union anynode *t; + struct ionod *io; + int tok = (shlex.token&0xff); int savwdval = shlex.lasttok; int savline = shlex.lastline; if(!(flag&SH_NOIO) && (tok=='<' || tok=='>')) @@ -862,7 +862,7 @@ static union anynode *item __PARAM__((int flag), (flag)) __OTORP__(int flag;){ /* if statement */ case IFSYM: { - register union anynode *tt; + union anynode *tt; t = getnode(ifnod); t->if_.iftyp=TIF; t->if_.iftre=sh_cmd(THENSYM,SH_NL); @@ -943,7 +943,7 @@ static union anynode *item __PARAM__((int flag), (flag)) __OTORP__(int flag;){ case LABLSYM: { - register struct argnod *argp = label_list; + struct argnod *argp = label_list; while(argp) { if(strcmp(argp->argval,shlex.arg->argval)==0) @@ -1001,9 +1001,9 @@ done: * This is for a simple command, for list, or compound assignment */ static union anynode *simple __PARAM__((int flag, struct ionod *io), (flag, io)) __OTORP__(int flag; struct ionod *io;){ - register struct comnod *t; - register struct argnod *argp; - register int tok; + struct comnod *t; + struct argnod *argp; + int tok; struct argnod **argtail; struct argnod **settail; int keywd=1; @@ -1137,7 +1137,7 @@ static union anynode *simple __PARAM__((int flag, struct ionod *io), (flag, io)) #ifdef SHOPT_KIA if(shlex.kiafile) { - register Namval_t *np=(Namval_t*)t->comnamp; + Namval_t *np=(Namval_t*)t->comnamp; int line = t->comline; argp = t->comarg; if(argp) @@ -1171,7 +1171,7 @@ static union anynode *simple __PARAM__((int flag, struct ionod *io), (flag, io)) Namval_t *np=(Namval_t*)t->comnamp; if((np==SYSBREAK || np==SYSCONT) && (argp->argflag&ARG_RAW) && !isdigit(*argp->argval)) { - register char *cp = argp->argval; + char *cp = argp->argval; /* convert break/continue labels to numbers */ tok = 0; for(argp=label_list;argp!=label_last;argp=argp->argnxt.ap) @@ -1214,7 +1214,7 @@ static union anynode *simple __PARAM__((int flag, struct ionod *io), (flag, io)) * skip past newlines but issue prompt if interactive */ static int skipnl __PARAM__((void), ()){ - register int token; + int token; while((token=sh_lex())==NL); if(token==';') sh_syntax(); @@ -1226,8 +1226,8 @@ static int skipnl __PARAM__((void), ()){ * if flag is set then an alias can be in the next word */ static struct ionod *inout __PARAM__((struct ionod *lastio,int flag), (lastio, flag)) __OTORP__(struct ionod *lastio;int flag;){ - register int iof = shlex.digits, token=shlex.token; - register struct ionod *iop; + int iof = shlex.digits, token=shlex.token; + struct ionod *iop; switch(token&0xff) { case '<': @@ -1299,10 +1299,10 @@ static struct ionod *inout __PARAM__((struct ionod *lastio,int flag), (lastio, f */ static struct argnod *qscan __PARAM__((struct comnod *ac,int argn), (ac, argn)) __OTORP__(struct comnod *ac;int argn;){ - register char **cp; - register struct argnod *ap; - register struct dolnod* dp; - register int special=0; + char **cp; + struct argnod *ap; + struct dolnod* dp; + int special=0; /* special hack for test -t compatibility */ if((Namval_t*)ac->comnamp==SYSTEST) special = 2; @@ -1356,30 +1356,30 @@ static struct argnod *qscan __PARAM__((struct comnod *ac,int argn), (ac, argn)) } static union anynode *test_expr __PARAM__((int sym), (sym)) __OTORP__(int sym;){ - register union anynode *t = test_or(); + union anynode *t = test_or(); if(shlex.token!=sym) sh_syntax(); return(t); } static union anynode *test_or __PARAM__((void), ()){ - register union anynode *t = test_and(); + union anynode *t = test_and(); while(shlex.token==ORFSYM) t = makelist(TORF|TTEST,t,test_and()); return(t); } static union anynode *test_and __PARAM__((void), ()){ - register union anynode *t = test_primary(); + union anynode *t = test_primary(); while(shlex.token==ANDFSYM) t = makelist(TAND|TTEST,t,test_primary()); return(t); } static union anynode *test_primary __PARAM__((void), ()){ - register struct argnod *arg; - register union anynode *t; - register int num,token; + struct argnod *arg; + union anynode *t; + int num,token; token = skipnl(); num = shlex.digits; switch(token) @@ -1462,8 +1462,8 @@ static union anynode *test_primary __PARAM__((void), ()){ #ifdef SHOPT_KIA int kiaclose __PARAM__((void), ()){ - register off_t off1,off2; - register int n; + off_t off1,off2; + int n; if(shlex.kiafile) { sfseek(shlex.kiafile,shlex.kiabegin,SEEK_SET); diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/path.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/path.c index bd915a35..22ddecd9 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/path.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/path.c @@ -130,9 +130,9 @@ static int exec_err; * Sets the PWD variable to this value */ char *path_pwd __PARAM__((int flag), (flag)) __OTORP__(int flag;){ - register char *cp; - register char *dfault = (char*)e_dot; - register int count = 0; + char *cp; + char *dfault = (char*)e_dot; + int count = 0; if(sh.pwd) return((char*)sh.pwd); while(1) @@ -189,8 +189,8 @@ skip: */ char *path_get __PARAM__((const char *name), (name)) __OTORP__(const char *name;){ - register char *path=0; - register char *sp = sh.lastpath; + char *path=0; + char *sp = sh.lastpath; static int bin_is_usrbin = -1; if(strchr(name,'/')) return(""); @@ -220,9 +220,9 @@ char *path_get __PARAM__((const char *name), (name)) __OTORP__(const char *name; * convert each /usr/bin to /bin and eliminate multiple /bin from * The resulting path is placed on the stack */ -static char *path_to_stak __PARAM__((register const char *path), (path)) __OTORP__(register const char *path;){ - register const char *cp=path, *base; - register int n, nbin=0; +static char *path_to_stak __PARAM__((const char *path), (path)) __OTORP__(const char *path;){ + const char *cp=path, *base; + int n, nbin=0; stakseek(0); while(*cp) { @@ -250,7 +250,7 @@ static char *path_to_stak __PARAM__((register const char *path), (path)) __OTORP } int path_open __PARAM__((const char *name,char *path), (name, path)) __OTORP__(const char *name;char *path;){ - register int fd; + int fd; struct stat statb; if(strchr(name,'/')) { @@ -292,9 +292,9 @@ int path_open __PARAM__((const char *name,char *path), (name, path)) __OTORP__(c */ static int path_inpath __PARAM__((const char *path, const char *fpath), (path, fpath)) __OTORP__(const char *path; const char *fpath;){ - register const char *dp = fpath; - register const char *sp = path; - register int c, match=1; + const char *dp = fpath; + const char *sp = path; + int c, match=1; if(!dp || !sp || *sp==0) return(0); if(*sp==':' || (*sp=='.' && ((c=sp[1])==0 || c==':'))) @@ -323,14 +323,14 @@ static int path_inpath __PARAM__((const char *path, const char *fpath), (path, f * set tracked alias node to value */ -void path_alias __PARAM__((register Namval_t *np,register char *sp), (np, sp)) __OTORP__(register Namval_t *np;register char *sp;){ +void path_alias __PARAM__((Namval_t *np,char *sp), (np, sp)) __OTORP__(Namval_t *np;char *sp;){ if(!sp) nv_unset(np); else { - register const char *vp = np->nvalue.cp; - register int n = 1; - register int nofree = nv_isattr(np,NV_NOFREE); + const char *vp = np->nvalue.cp; + int n = 1; + int nofree = nv_isattr(np,NV_NOFREE); nv_offattr(np,NV_NOPRINT); if(!vp || (n=strcmp(sp,vp))!=0) { @@ -350,8 +350,8 @@ void path_alias __PARAM__((register Namval_t *np,register char *sp), (np, sp)) _ * given a pathname return the base name */ -char *path_basename __PARAM__((register const char *name), (name)) __OTORP__(register const char *name;){ - register const char *start = name; +char *path_basename __PARAM__((const char *name), (name)) __OTORP__(const char *name;){ + const char *start = name; while (*name) if ((*name++ == '/') && *name) /* don't trim trailing / */ start = name; @@ -379,9 +379,9 @@ static void funload __PARAM__((int fno, const char *name), (fno, name)) __OTORP_ * If endpath!=NULL, Path search ends when path matches endpath. */ -int path_search __PARAM__((register const char *name,const char *endpath, int flag), (name, endpath, flag)) __OTORP__(register const char *name;const char *endpath; int flag;){ - register Namval_t *np; - register int fno; +int path_search __PARAM__((const char *name,const char *endpath, int flag), (name, endpath, flag)) __OTORP__(const char *name;const char *endpath; int flag;){ + Namval_t *np; + int fno; if(flag) { /* if not found on pruned path, rehash and try again */ @@ -393,7 +393,7 @@ int path_search __PARAM__((register const char *name,const char *endpath, int fl } if(flag==0 || !sh.lastpath) { - register char *path=0; + char *path=0; if(strmatch(name,e_alphanum)) path = nv_getval(nv_scoped(FPATHNOD)); if(path && (fno=path_open(name,path))>=0) @@ -425,11 +425,11 @@ int path_search __PARAM__((register const char *name,const char *endpath, int fl * end search of path matches endpath without checking execute permission */ -char *path_absolute __PARAM__((register const char *name, const char *endpath), (name, endpath)) __OTORP__(register const char *name; const char *endpath;){ - register int f; - register char *path; - register const char *fpath=0; - register int isfun; +char *path_absolute __PARAM__((const char *name, const char *endpath), (name, endpath)) __OTORP__(const char *name; const char *endpath;){ + int f; + char *path; + const char *fpath=0; + int isfun; #ifdef SHOPT_VPIX char **suffix = 0; char *top; @@ -501,9 +501,9 @@ char *path_absolute __PARAM__((register const char *name, const char *endpath), # endif /*S_EXEC */ #endif /* S_IXUSR */ -static int canexecute __PARAM__((register char *path, int isfun), (path, isfun)) __OTORP__(register char *path; int isfun;){ +static int canexecute __PARAM__((char *path, int isfun), (path, isfun)) __OTORP__(char *path; int isfun;){ struct stat statb; - register int fd=0; + int fd=0; path = path_relative(path); if(isfun) { @@ -542,9 +542,9 @@ err: * Return path relative to present working directory */ -char *path_relative __PARAM__((register const char* file), (file)) __OTORP__(register const char* file;){ - register const char *pwd; - register const char *fp = file; +char *path_relative __PARAM__((const char* file), (file)) __OTORP__(const char* file;){ + const char *pwd; + const char *fp = file; /* can't relpath when sh.pwd not set */ if(!(pwd=sh.pwd)) return((char*)fp); @@ -564,10 +564,10 @@ char *path_relative __PARAM__((register const char* file), (file)) __OTORP__(reg return((char*)file); } -char *path_join __PARAM__((register char *path,const char *name), (path, name)) __OTORP__(register char *path;const char *name;){ +char *path_join __PARAM__((char *path,const char *name), (path, name)) __OTORP__(char *path;const char *name;){ /* leaves result on top of stack */ - register char *scanp = path; - register int c; + char *scanp = path; + int c; stakseek(PATH_OFFSET); if(*scanp=='.') { @@ -602,8 +602,8 @@ char *path_join __PARAM__((register char *path,const char *name), (path, name)) } -void path_exec __PARAM__((register const char *arg0,register char *argv[],struct argnod *local), (arg0, argv, local)) __OTORP__(register const char *arg0;register char *argv[];struct argnod *local;){ - register const char *path = ""; +void path_exec __PARAM__((const char *arg0,char *argv[],struct argnod *local), (arg0, argv, local)) __OTORP__(const char *arg0;char *argv[];struct argnod *local;){ + const char *path = ""; nv_setlist(local,NV_EXPORT|NV_IDENT|NV_ASSIGN); xecenv=sh_envgen(); if(strchr(arg0,'/')) @@ -632,9 +632,9 @@ void path_exec __PARAM__((register const char *arg0,register char *argv[],struct * This routine constructs a short path consisting of all * Relative directories up to the directory of fullname */ -static char *prune __PARAM__((register char *path,const char *fullname), (path, fullname)) __OTORP__(register char *path;const char *fullname;){ - register char *p = path; - register char *s; +static char *prune __PARAM__((char *path,const char *fullname), (path, fullname)) __OTORP__(char *path;const char *fullname;){ + char *p = path; + char *s; int n = 1; const char *base; char *inpath = path; @@ -675,8 +675,8 @@ static char *prune __PARAM__((register char *path,const char *fullname), (path, } -static char *execs __PARAM__((const char *ap,const char *arg0,register char **argv), (ap, arg0, argv)) __OTORP__(const char *ap;const char *arg0;register char **argv;){ - register char *path, *prefix; +static char *execs __PARAM__((const char *ap,const char *arg0,char **argv), (ap, arg0, argv)) __OTORP__(const char *ap;const char *arg0;char **argv;){ + char *path, *prefix; sh_sigcheck(); prefix=path_join((char*)ap,arg0); xecenv[0] = stakptr(0); @@ -779,8 +779,8 @@ static char *execs __PARAM__((const char *ap,const char *arg0,register char **ar */ -static void exscript __PARAM__((register char *path,register char *argv[]), (path, argv)) __OTORP__(register char *path;register char *argv[];){ - register Sfio_t *sp; +static void exscript __PARAM__((char *path,char *argv[]), (path, argv)) __OTORP__(char *path;char *argv[];){ + Sfio_t *sp; sh.comdiv=0; sh.bckpid = 0; sh.st.ioset=0; @@ -801,8 +801,8 @@ static void exscript __PARAM__((register char *path,register char *argv[]), (pat /* check if file cannot open for read or script is setuid/setgid */ { static char name[] = "/tmp/euidXXXXXXXXXX"; - register int n; - register uid_t euserid; + int n; + uid_t euserid; char *savet; struct stat statb; if((n=sh_open(path,O_RDONLY,0)) >= 0) @@ -933,8 +933,8 @@ static void exscript __PARAM__((register char *path,register char *argv[]), (pat * Produce a pseudo-floating point representation * with 3 bits base-8 exponent, 13 bits fraction. */ - static int compress __PARAM__((register time_t t), (t)) __OTORP__(register time_t t;){ - register int exp = 0, rund = 0; + static int compress __PARAM__((time_t t), (t)) __OTORP__(time_t t;){ + int exp = 0, rund = 0; while (t >= 8192) { diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/streval.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/streval.c index b14cdb3a..05e6b445 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/streval.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/streval.c @@ -141,7 +141,7 @@ static double seterror __PROTO__((const char[])); /* set error message string * */ double strval __PARAM__((const char *s, char** end, double(*conv)(const char**,struct lval*,int,double)), (s, end, conv)) __OTORP__(const char *s; char** end; double(*conv)();){ - register double n; + double n; pushchr(s); cur.isfloat = 0; @@ -167,9 +167,9 @@ double strval __PARAM__((const char *s, char** end, double(*conv)(const char**,s * evaluate a subexpression with precedence */ -static double expr __PARAM__((register int precedence), (precedence)) __OTORP__(register int precedence;){ - register int c, op; - register double n, x; +static double expr __PARAM__((int precedence), (precedence)) __OTORP__(int precedence;){ + int c, op; + double n, x; int wasop, incr=0; struct lval lvalue, assignop; const char *pos; diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/string.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/string.c index 834ab306..2d620bbb 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/string.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/string.c @@ -106,10 +106,10 @@ * This is only used for small tables and is used to save non-sharable memory */ -int sh_locate __PARAM__((register const char *sp,const Shtable_t *table,int size), (sp, table, size)) __OTORP__(register const char *sp;const Shtable_t *table;int size;){ - register int first; - register const Shtable_t *tp; - register int c; +int sh_locate __PARAM__((const char *sp,const Shtable_t *table,int size), (sp, table, size)) __OTORP__(const char *sp;const Shtable_t *table;int size;){ + int first; + const Shtable_t *tp; + int c; if(sp==0 || (first= *sp)==0) return(0); tp=table; @@ -127,8 +127,8 @@ int sh_locate __PARAM__((register const char *sp,const Shtable_t *table,int size * The new string is put on top of the stack */ char *sh_substitute __PARAM__((const char *string,const char *oldsp,char *newsp), (string, oldsp, newsp)) __OTORP__(const char *string;const char *oldsp;char *newsp;){ - register const char *sp = string; - register const char *cp; + const char *sp = string; + const char *cp; const char *savesp = 0; stakseek(0); if(*sp==0) @@ -182,9 +182,9 @@ found: * Remove escape characters from characters in and eliminate quoted nulls. */ -void sh_trim __PARAM__((register char *sp), (sp)) __OTORP__(register char *sp;){ - register char *dp; - register int c; +void sh_trim __PARAM__((char *sp), (sp)) __OTORP__(char *sp;){ + char *dp; + int c; if(sp) { dp = sp; @@ -204,8 +204,8 @@ void sh_trim __PARAM__((register char *sp), (sp)) __OTORP__(register char *sp;){ * puts null terminated result on stack, but doesn't freeze it */ char *sh_fmtq __PARAM__((const char *string), (string)) __OTORP__(const char *string;){ - register const char *cp = string; - register int c, state; + const char *cp = string; + int c, state; int offset; if(!cp) return((char*)0); @@ -303,10 +303,10 @@ char *sh_fmtq __PARAM__((const char *string), (string)) __OTORP__(const char *st } #ifdef SHOPT_MULTIBYTE - int sh_strchr __PARAM__((const char *string, register const char *dp), (string, dp)) __OTORP__(const char *string; register const char *dp;){ + int sh_strchr __PARAM__((const char *string, const char *dp), (string, dp)) __OTORP__(const char *string; const char *dp;){ wchar_t c,d; - register int m; - register const char *cp=string; + int m; + const char *cp=string; int n = mbtowc(&d,dp,MB_CUR_MAX); while((m=mbtowc(&c,cp,MB_CUR_MAX)) && c) { diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/subshell.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/subshell.c index 649a010d..b34d5c2c 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/subshell.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/subshell.c @@ -132,9 +132,9 @@ static int subenv; void sh_subtmpfile __PARAM__((void), ()){ if(sfset(sfstdout,0,0)&SF_STRING) { - register int fd; - register struct checkpt *pp = (struct checkpt*)sh.jmplist; - register struct subshell *sp = subshell_data->pipe; + int fd; + struct checkpt *pp = (struct checkpt*)sh.jmplist; + struct subshell *sp = subshell_data->pipe; /* save file descriptor 1 if open */ if((sp->tmpfd = fd = fcntl(1,F_DUPFD,10)) >= 0) { @@ -168,7 +168,7 @@ void sh_subtmpfile __PARAM__((void), ()){ * The child continues possibly with its standard output replaced by temp file */ void sh_subfork __PARAM__((void), ()){ - register struct subshell *sp = subshell_data; + struct subshell *sp = subshell_data; pid_t pid; /* see whether inside $(...) */ if(sp->pipe) @@ -197,8 +197,8 @@ void sh_subfork __PARAM__((void), ()){ * layer created by the most recent subshell_fork if the * node hasn't already been copied */ -Namval_t *sh_assignok __PARAM__((register Namval_t *np,int add), (np, add)) __OTORP__(register Namval_t *np;int add;){ - register Namval_t *mp; +Namval_t *sh_assignok __PARAM__((Namval_t *np,int add), (np, add)) __OTORP__(Namval_t *np;int add;){ + Namval_t *mp; if(nv_isnull(np) && !add) /* don't bother with this */ return(np); /* don't bother to save if in newer scope */ @@ -226,8 +226,8 @@ Namval_t *sh_assignok __PARAM__((register Namval_t *np,int add), (np, add)) __OT * restore the variables */ static void nv_restore __PARAM__((struct subshell *sp), (sp)) __OTORP__(struct subshell *sp;){ - register Namval_t *mp, *np; - register Hashpos_t *pos = hashscan(sp->svar,0); + Namval_t *mp, *np; + Hashpos_t *pos = hashscan(sp->svar,0); while(np=(Namval_t*)hashnext(pos)) { if(mp = nv_search((char*)np,sp->var,HASH_BUCKET)) @@ -256,7 +256,7 @@ static void nv_restore __PARAM__((struct subshell *sp), (sp)) __OTORP__(struct s Sfio_t *sh_subshell __PARAM__((union anynode *t, int flags, int comsub), (t, flags, comsub)) __OTORP__(union anynode *t; int flags; int comsub;){ struct subshell sub_data; - register struct subshell *sp = &sub_data; + struct subshell *sp = &sub_data; int jmpval,nsig; int savecurenv = sh.curenv; char *savstak; diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/suid_exec.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/suid_exec.c index 3802fef0..3b74f51e 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/suid_exec.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/suid_exec.c @@ -130,8 +130,8 @@ static gid_t egroupid; static struct stat statb; main __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){ - register int m,n; - register char *p; + int m,n; + char *p; struct stat statx; int mode; uid_t effuid; @@ -283,7 +283,7 @@ exec: * return true of shell ends in sh */ -static int endsh __PARAM__((register const char *shell), (shell)) __OTORP__(register const char *shell;){ +static int endsh __PARAM__((const char *shell), (shell)) __OTORP__(const char *shell;){ while(*shell) shell++; if(*--shell != 'h' || *--shell != 's') @@ -296,7 +296,7 @@ static int endsh __PARAM__((register const char *shell), (shell)) __OTORP__(regi * return true of shell is in directory */ -static int in_dir __PARAM__((register const char *dir,register const char *shell), (dir, shell)) __OTORP__(register const char *dir;register const char *shell;){ +static int in_dir __PARAM__((const char *dir,const char *shell), (dir, shell)) __OTORP__(const char *dir;const char *shell;){ while(*dir) { if(*dir++ != *shell++) @@ -316,7 +316,7 @@ static void error_exit __PARAM__((const char *message), (message)) __OTORP__(con * This version of access checks against effective uid and effective gid */ -eaccess __PARAM__((register const char *name, register int mode), (name, mode)) __OTORP__(register const char *name; register int mode;){ +eaccess __PARAM__((const char *name, int mode), (name, mode)) __OTORP__(const char *name; int mode;){ struct stat statb; if (stat(name, &statb) == 0) { @@ -337,7 +337,7 @@ eaccess __PARAM__((register const char *name, register int mode), (name, mode)) { static int maxgroups = 0; gid_t *groups; - register int n; + int n; if(maxgroups==0) { /* first time */ @@ -387,7 +387,7 @@ setids __PARAM__((int mode,int owner,int group), (mode, owner, group)) __OTORP__ */ setids __PARAM__((int mode,uid_t owner,gid_t group), (mode, owner, group)) __OTORP__(int mode;uid_t owner;gid_t group;){ - register int n,m; + int n,m; int pv[2]; /* @@ -497,8 +497,8 @@ setids __PARAM__((int mode,uid_t owner,gid_t group), (mode, owner, group)) __OTO */ static void maketemp __PARAM__((char *template), (template)) __OTORP__(char *template;){ - register char *cp = template; - register pid_t n = getpid(); + char *cp = template; + pid_t n = getpid(); /* skip to end of string */ while(*++cp); /* convert process id to string */ @@ -516,7 +516,7 @@ static void maketemp __PARAM__((char *template), (template)) __OTORP__(char *tem static int mycopy __PARAM__((int fdi, int fdo), (fdi, fdo)) __OTORP__(int fdi; int fdo;){ char buffer[BLKSIZE]; - register int n; + int n; while((n = read(fdi,buffer,BLKSIZE)) > 0) if(write(fdo,buffer,n) != n) diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/tdump.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/tdump.c index 0268595a..e81bef82 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/tdump.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/tdump.c @@ -114,7 +114,7 @@ int sh_tdump __PARAM__((Sfio_t *out, const union anynode *t), (out, t)) __OTORP_ /* * print script corresponding to shell tree */ -static int p_tree __PARAM__((register const union anynode *t), (t)) __OTORP__(register const union anynode *t;){ +static int p_tree __PARAM__((const union anynode *t), (t)) __OTORP__(const union anynode *t;){ if(!t) return(sfputl(outfile,-1)); if(sfputl(outfile,t->tre.tretyp)<0) @@ -197,8 +197,8 @@ static int p_tree __PARAM__((register const union anynode *t), (t)) __OTORP__(re } } -static int p_arg __PARAM__((register const struct argnod *arg), (arg)) __OTORP__(register const struct argnod *arg;){ - register int n; +static int p_arg __PARAM__((const struct argnod *arg), (arg)) __OTORP__(const struct argnod *arg;){ + int n; struct fornod *fp; while(arg) { @@ -221,7 +221,7 @@ static int p_arg __PARAM__((register const struct argnod *arg), (arg)) __OTORP__ return(sfputu(outfile,0)); } -static int p_redirect __PARAM__((register const struct ionod *iop), (iop)) __OTORP__(register const struct ionod *iop;){ +static int p_redirect __PARAM__((const struct ionod *iop), (iop)) __OTORP__(const struct ionod *iop;){ while(iop) { sfputl(outfile,iop->iofile); @@ -240,7 +240,7 @@ static int p_redirect __PARAM__((register const struct ionod *iop), (iop)) __OTO return(sfputl(outfile,-1)); } -static int p_comarg __PARAM__((const register struct comnod *com), (com)) __OTORP__(const register struct comnod *com;){ +static int p_comarg __PARAM__((const struct comnod *com), (com)) __OTORP__(const struct comnod *com;){ p_redirect(com->comio); p_arg(com->comset); if(!com->comarg) @@ -253,8 +253,8 @@ static int p_comarg __PARAM__((const register struct comnod *com), (com)) __OTOR } static int p_comlist __PARAM__((const struct dolnod *dol), (dol)) __OTORP__(const struct dolnod *dol;){ - register char *cp, *const*argv; - register int n; + char *cp, *const*argv; + int n; argv = dol->dolval+ARG_SPARE; while(cp = *argv) argv++; @@ -266,7 +266,7 @@ static int p_comlist __PARAM__((const struct dolnod *dol), (dol)) __OTORP__(cons return(sfputu(outfile,0)); } -static int p_switch __PARAM__((register const struct regnod *reg), (reg)) __OTORP__(register const struct regnod *reg;){ +static int p_switch __PARAM__((const struct regnod *reg), (reg)) __OTORP__(const struct regnod *reg;){ while(reg) { sfputl(outfile,reg->regflag); @@ -277,8 +277,8 @@ static int p_switch __PARAM__((register const struct regnod *reg), (reg)) __OTOR return(sfputl(outfile,-1)); } -static int p_string __PARAM__((register const char *string), (string)) __OTORP__(register const char *string;){ - register size_t n=strlen(string); +static int p_string __PARAM__((const char *string), (string)) __OTORP__(const char *string;){ + size_t n=strlen(string); if(sfputu(outfile,n+1)<0) return(-1); return(sfwrite(outfile,string,n)); diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/timers.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/timers.c index a686d208..6460f2d7 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/timers.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/timers.c @@ -116,7 +116,7 @@ static Timer_t *tptop, *tpmin; static char time_state; static double getnow __PARAM__((void), ()){ - register double now; + double now; #ifdef _lib_gettimeofday struct timeval tp; gettimeofday(&tp,(void *)0); @@ -131,7 +131,7 @@ static double getnow __PARAM__((void), ()){ /* * set an alarm for seconds */ -static double setalarm __PARAM__((register double t), (t)) __OTORP__(register double t;){ +static double setalarm __PARAM__((double t), (t)) __OTORP__(double t;){ #if defined(_lib_setitimer) && defined(ITIMER_REAL) struct itimerval tnew, told; tnew.it_value.tv_sec = t; @@ -154,7 +154,7 @@ static double setalarm __PARAM__((register double t), (t)) __OTORP__(register do /* signal handler for alarm call */ static void sigalrm __PARAM__((int sig), (sig)) __OTORP__(int sig;){ - register Timer_t *tp, *tplast, *tpold; + Timer_t *tp, *tplast, *tpold; double now; static double left; NOT_USED(sig); @@ -237,7 +237,7 @@ static void oldalrm __PARAM__((__V_ *handle), (handle)) __OTORP__(__V_ *handle;) } __V_ *kshtimeradd __PARAM__((unsigned long msec,int flags,void (*action)(__V_*),__V_ *handle), (msec, flags, action, handle)) __OTORP__(unsigned long msec;int flags;void (*action)();__V_ *handle;){ - register Timer_t *tp; + Timer_t *tp; double t; Handler_t fn; t = ((double)msec)/1000.; @@ -282,7 +282,7 @@ __V_ *kshtimeradd __PARAM__((unsigned long msec,int flags,void (*action)(__V_*), * delete timer . If is NULL, all timers are deleted */ void timerdel __PARAM__((__V_ *handle), (handle)) __OTORP__(__V_ *handle;){ - register Timer_t *tp = (Timer_t*)handle; + Timer_t *tp = (Timer_t*)handle; if(tp) tp->action = 0; else diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/trestore.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/trestore.c index d1438f70..05a343d7 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/trestore.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/trestore.c @@ -121,8 +121,8 @@ union anynode *sh_trestore __PARAM__((Sfio_t *in), (in)) __OTORP__(Sfio_t *in;){ static union anynode *r_tree() { long l = sfgetl(infile); - register int type; - register union anynode *t=0; + int type; + union anynode *t=0; if(l<0) return(t); type = l; @@ -219,8 +219,8 @@ static union anynode *r_tree() } static struct argnod *r_arg __PARAM__((void), ()){ - register struct argnod *ap=0, *apold, *aptop=0; - register long l; + struct argnod *ap=0, *apold, *aptop=0; + long l; while((l=sfgetu(infile))>0) { ap = (struct argnod*)stakseek((unsigned)l+ARGVAL); @@ -263,8 +263,8 @@ static struct argnod *r_arg __PARAM__((void), ()){ } static struct ionod *r_redirect __PARAM__((void), ()){ - register long l; - register struct ionod *iop=0, *iopold, *ioptop=0; + long l; + struct ionod *iop=0, *iopold, *ioptop=0; while((l=sfgetl(infile))>=0) { iop = (struct ionod*)getnode(ionod); @@ -313,9 +313,9 @@ static void r_comarg __PARAM__((struct comnod *com), (com)) __OTORP__(struct com } static struct dolnod *r_comlist __PARAM__((void), ()){ - register struct dolnod *dol=0; - register long l; - register char **argv; + struct dolnod *dol=0; + long l; + char **argv; if((l=sfgetl(infile))>0) { dol = (struct dolnod*)stakalloc(sizeof(struct dolnod) + sizeof(char*)*(l+ARG_SPARE)); @@ -328,7 +328,7 @@ static struct dolnod *r_comlist __PARAM__((void), ()){ } static struct regnod *r_switch __PARAM__((void), ()){ - register long l; + long l; struct regnod *reg=0,*regold,*regtop=0; while((l=sfgetl(infile))>=0) { @@ -348,9 +348,9 @@ static struct regnod *r_switch __PARAM__((void), ()){ } static char *r_string __PARAM__((void), ()){ - register Sfio_t *in = infile; - register unsigned long l = sfgetu(in); - register char *ptr; + Sfio_t *in = infile; + unsigned long l = sfgetu(in); + char *ptr; if(l == 0) return(NIL(char*)); ptr = stakalloc((unsigned)l); diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/vfork.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/vfork.c index a4ac6565..33220ba4 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/vfork.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/vfork.c @@ -130,7 +130,7 @@ static struct f_save *save_fork; /* most recently saved data */ int sh_vforksave __PARAM__((void), ()) #line 35 { - register struct f_save *fp; + struct f_save *fp; if(!(fp = new_of(struct f_save,0))) return(0); fp->f_save_fork = save_fork; @@ -151,7 +151,7 @@ int sh_vforksave __PARAM__((void), ()) void sh_vforkrestore __PARAM__((void), ()) #line 55 { - register struct f_save *fp = save_fork; + struct f_save *fp = save_fork; if(!sh_isstate(SH_VFORKED)) return; diff --git a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/xec.c b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/xec.c index 229a2b41..74d2558e 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/xec.c +++ b/cde/programs/dtksh/ksh93/src/cmd/ksh93/sh/xec.c @@ -132,8 +132,8 @@ static char pipejob; /* * Given stream compile and execute */ -int sh_eval __PARAM__((register Sfio_t *iop, int mode), (iop, mode)) __OTORP__(register Sfio_t *iop; int mode;){ - register union anynode *t; +int sh_eval __PARAM__((Sfio_t *iop, int mode), (iop, mode)) __OTORP__(Sfio_t *iop; int mode;){ + union anynode *t; struct slnod *saveslp = sh.st.staklist; int jmpval; struct checkpt *pp = (struct checkpt*)sh.jmplist; @@ -167,7 +167,7 @@ int sh_eval __PARAM__((register Sfio_t *iop, int mode), (iop, mode)) __OTORP__(r #ifdef SHOPT_FASTPIPE static int pipe_exec __PARAM__((int pv[], union anynode *t, int errorflg), (pv, t, errorflg)) __OTORP__(int pv[]; union anynode *t; int errorflg;){ struct checkpt buff; - register union anynode *tchild = t->fork.forktre; + union anynode *tchild = t->fork.forktre; Namval_t *np; Sfile_t *iop; int jmpval,r; @@ -209,12 +209,12 @@ static int pipe_exec __PARAM__((int pv[], union anynode *t, int errorflg), (pv, } #endif /* SHOPT_FASTPIPE */ -sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OTORP__(register const union anynode *t; int flags;){ +sh_exec __PARAM__((const union anynode *t, int flags), (t, flags)) __OTORP__(const union anynode *t; int flags;){ sh_sigcheck(); if(t && !sh.st.execbrk && !sh_isoption(SH_NOEXEC)) { - register int type = flags; - register char *com0 = 0; + int type = flags; + char *com0 = 0; int errorflg = (type&SH_ERREXIT); int execflg = (type&SH_NOFORK); int mainloop = (type&SH_INTERACTIVE); @@ -242,7 +242,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT { case TCOM: { - register struct argnod *argp; + struct argnod *argp; char *trap; Namval_t *np; struct ionod *io; @@ -258,7 +258,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT com0 = com[0]; if(!(np=(Namval_t*)(t->com.comnamp)) && com0) { - register char *cp; + char *cp; Namval_t *nq=0; /* check for reference to discipline function */ if((cp=strchr(com0,'.')) && cp!=com0) @@ -310,7 +310,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT } while(np==SYSCOMMAND) { - register int n = b_command(0,com,0); + int n = b_command(0,com,0); if(n==0) break; command += n; @@ -333,7 +333,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT { if(argn==0 || (np && !command && nv_isattr(np,BLT_SPC))) { - register int flags=NV_VARNAME|NV_ASSIGN; + int flags=NV_VARNAME|NV_ASSIGN; if(np==SYSTYPESET) { if(sh.fn_depth) @@ -472,7 +472,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT if(!command && np && nv_isattr(np,NV_FUNCTION)) { int indx; - register struct slnod *slp; + struct slnod *slp; if(!np->nvalue.ip) { path_search(com0,NIL(char*),0); @@ -502,7 +502,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT } case TFORK: { - register pid_t parent; + pid_t parent; int no_fork,jobid; int pipes[2]; no_fork = (execflg && !(type&(FAMP|FPOU)) && @@ -794,9 +794,9 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT case TFOR: /* for and select */ { - register char **args; - register int nargs; - register Namval_t *np; + char **args; + int nargs; + Namval_t *np; struct dolnod *argsav=0; struct comnod *tp; char *cp, *nullptr = 0; @@ -822,7 +822,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT { char *val; int save_prompt; - /* reuse register */ + /* reuse */ if(refresh) { sh_menu(sfstderr,nargs,args); @@ -889,7 +889,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT case TWH: /* while and until */ { - register int r=0; + int r=0; sh.st.loopcnt++; while(sh.st.execbrk==0 && (sh_exec(t->wh.whtre,0)==0)==(type==TWH)) { @@ -908,7 +908,7 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT } case TARITH: /* (( expression )) */ { - register char *trap; + char *trap; static char *arg[4]= {"((", 0, "))"}; error_info.line = t->ar.arline-sh.st.firstline; if(trap=sh.st.trap[SH_DEBUGTRAP]) @@ -945,10 +945,10 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT t= (union anynode*)(t->sw.swlst); while(t) { - register struct argnod *rex=(struct argnod*)t->reg.regptr; + struct argnod *rex=(struct argnod*)t->reg.regptr; while(rex) { - register char *s; + char *s; if(rex->argflag&ARG_MAC) { s = sh_mactrim(rex->argval,1); @@ -1037,11 +1037,11 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT } case TFUN: { - register Namval_t *np; - register struct slnod *slp; - register char *fname = ((struct functnod*)t)->functnam; - register char *cp; - register Namval_t *npv=0; + Namval_t *np; + struct slnod *slp; + char *fname = ((struct functnod*)t)->functnam; + char *cp; + Namval_t *npv=0; /* look for discipline functions */ error_info.line = t->funct.functline-sh.st.firstline; if(cp = strrchr(fname,'.')) @@ -1098,8 +1098,8 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT /* new test compound command */ case TTST: { - register int n; - register char *left; + int n; + char *left; if(type&TTEST) skipexitset++; error_info.line = t->tst.tstline-sh.st.firstline; @@ -1110,9 +1110,9 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT } else { - register int traceon=0; - register char *right; - register char *trap; + int traceon=0; + char *right; + char *trap; n = type>>TSHIFT; left = word_trim(&(t->lst.lstlef->arg),0); if(type&TBINARY) @@ -1220,8 +1220,8 @@ sh_exec __PARAM__((register const union anynode *t, int flags), (t, flags)) __OT * returns 1 if r == trim(s) otherwise 0 */ -static trim_eq __PARAM__((register const char *r,register const char *s), (r, s)) __OTORP__(register const char *r;register const char *s;){ - register char c; +static trim_eq __PARAM__((const char *r,const char *s), (r, s)) __OTORP__(const char *r;const char *s;){ + char c; while(c = *s++) { if(c=='\\') @@ -1236,9 +1236,9 @@ static trim_eq __PARAM__((register const char *r,register const char *s), (r, s) * print out the command line if set -x is on */ -int sh_trace __PARAM__((register char *argv[], register int nl), (argv, nl)) __OTORP__(register char *argv[]; register int nl;){ - register char *cp; - register int bracket = 0; +int sh_trace __PARAM__((char *argv[], int nl), (argv, nl)) __OTORP__(char *argv[]; int nl;){ + char *cp; + int bracket = 0; if(sh_isoption(SH_XTRACE)) { /* make this trace atomic */ @@ -1279,8 +1279,8 @@ int sh_trace __PARAM__((register char *argv[], register int nl), (argv, nl)) __O } -static char *word_trim __PARAM__((register struct argnod *arg, int flag), (arg, flag)) __OTORP__(register struct argnod *arg; int flag;){ - register char *sp = arg->argval; +static char *word_trim __PARAM__((struct argnod *arg, int flag), (arg, flag)) __OTORP__(struct argnod *arg; int flag;){ + char *sp = arg->argval; if((arg->argflag&ARG_RAW)) return(sp); return(sh_mactrim(sp,flag)); @@ -1309,8 +1309,8 @@ static void timed_out __PARAM__((__V_ *handle), (handle)) __OTORP__(__V_ *handle /* * called by parent and child after fork by sh_fork() */ -pid_t _sh_fork __PARAM__((register pid_t parent,int flags,int *jobid), (parent, flags, jobid)) __OTORP__(register pid_t parent;int flags;int *jobid;){ - register struct checkpt *pp = (struct checkpt*)sh.jmplist; +pid_t _sh_fork __PARAM__((pid_t parent,int flags,int *jobid), (parent, flags, jobid)) __OTORP__(pid_t parent;int flags;int *jobid;){ + struct checkpt *pp = (struct checkpt*)sh.jmplist; static long forkcnt = 1000L; pid_t curpgid = job.curpgid; pid_t postid = (flags&FAMP)?0:curpgid; @@ -1407,7 +1407,7 @@ pid_t _sh_fork __PARAM__((register pid_t parent,int flags,int *jobid), (parent, } pid_t sh_fork __PARAM__((int flags, int *jobid), (flags, jobid)) __OTORP__(int flags; int *jobid;){ - register pid_t parent; + pid_t parent; #ifdef SHOPT_FASTPIPE if(sffileno(sfstdin)<0) { @@ -1430,8 +1430,8 @@ pid_t sh_fork __PARAM__((int flags, int *jobid), (flags, jobid)) __OTORP__(int f * The environment modification list is ignored for posix functions */ static void sh_funct __PARAM__((Namval_t *np,int argn, char *argv[],int execflg,struct argnod *envlist), (np, argn, argv, execflg, envlist)) __OTORP__(Namval_t *np;int argn; char *argv[];int execflg;struct argnod *envlist;){ - register char *trap; - register int nsig; + char *trap; + int nsig; struct dolnod *argsav=0,*saveargfor; struct sh_scoped savst; Shopt_t savopt; @@ -1526,9 +1526,9 @@ static void sh_funct __PARAM__((Namval_t *np,int argn, char *argv[],int execflg, */ int sh_fun __PARAM__((Namval_t *np, Namval_t *nq), (np, nq)) __OTORP__(Namval_t *np; Namval_t *nq;){ char *argv[2]; - register Namarr_t *ap; - register int offset; - register char *base; + Namarr_t *ap; + int offset; + char *base; Fcin_t save; fcsave(&save); if((offset=staktell())>0) @@ -1575,9 +1575,9 @@ int sh_fun __PARAM__((Namval_t *np, Namval_t *nq), (np, nq)) __OTORP__(Namval_t /* * print a time and a separator */ -static void p_time __PARAM__((Sfio_t *outfile,register clock_t t,int c), (outfile, t, c)) __OTORP__(Sfio_t *outfile;register clock_t t;int c;){ - register int min, sec, frac; - register int hr; +static void p_time __PARAM__((Sfio_t *outfile,clock_t t,int c), (outfile, t, c)) __OTORP__(Sfio_t *outfile;clock_t t;int c;){ + int min, sec, frac; + int hr; frac = t%sh.lim.clk_tck; frac = (frac*100)/sh.lim.clk_tck; t /= sh.lim.clk_tck; @@ -1635,8 +1635,8 @@ static void coproc_init __PARAM__((int pipes[]), (pipes)) __OTORP__(int pipes[]; /* * print out function definition */ -static void print_fun __PARAM__((register Namval_t* np), (np)) __OTORP__(register Namval_t* np;){ - register char *format; +static void print_fun __PARAM__((Namval_t* np), (np)) __OTORP__(Namval_t* np;){ + char *format; if(!is_afunction(np) || !np->nvalue.ip) return; if(nv_isattr(np,NV_FPOSIX)) @@ -1653,7 +1653,7 @@ static void print_fun __PARAM__((register Namval_t* np), (np)) __OTORP__(registe */ static int run_subshell __PARAM__((const union anynode *t,pid_t grp), (t, grp)) __OTORP__(const union anynode *t;pid_t grp;){ static char prolog[] = "set; typeset -p; print .sh.dollar=$$"; - register int i, fd, trace = sh_isoption(SH_XTRACE); + int i, fd, trace = sh_isoption(SH_XTRACE); pid_t pid; char *arglist[3], devfd[12], *cp; Sfio_t *sp = sftmp(0); @@ -1717,7 +1717,7 @@ static pid_t sh_ntfork __PARAM__((const union anynode *t,char *argv[],int *jobid # ifndef _lib_fork if(!argv) { - register union anynode *tchild = t->fork.forktre; + union anynode *tchild = t->fork.forktre; int optimize=0; otype = t->tre.tretyp; savetype = otype; diff --git a/cde/programs/dtksh/ksh93/src/cmd/pax/bio.c b/cde/programs/dtksh/ksh93/src/cmd/pax/bio.c index 3d5443f8..8e3c8abe 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/pax/bio.c +++ b/cde/programs/dtksh/ksh93/src/cmd/pax/bio.c @@ -126,9 +126,9 @@ */ static int -blokread __PARAM__((register Archive_t* ap, char* buf, int n), (ap, buf, n)) __OTORP__(register Archive_t* ap; char* buf; int n;){ - register int i; - register int j; +blokread __PARAM__((Archive_t* ap, char* buf, int n), (ap, buf, n)) __OTORP__(Archive_t* ap; char* buf; int n;){ + int i; + int j; char c; static int eof; @@ -170,10 +170,10 @@ blokread __PARAM__((register Archive_t* ap, char* buf, int n), (ap, buf, n)) __O } static int -blokwrite __PARAM__((register Archive_t* ap, char* buf, int n), (ap, buf, n)) __OTORP__(register Archive_t* ap; char* buf; int n;){ - register char* s; - register int i; - register int j; +blokwrite __PARAM__((Archive_t* ap, char* buf, int n), (ap, buf, n)) __OTORP__(Archive_t* ap; char* buf; int n;){ + char* s; + int i; + int j; char blk[9]; if (ap->io.blok) @@ -225,7 +225,7 @@ blokwrite __PARAM__((register Archive_t* ap, char* buf, int n), (ap, buf, n)) __ */ void -binit __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){ +binit __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ unsigned long n; if (ap->delta) @@ -245,7 +245,7 @@ binit __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap */ int -bskip __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){ +bskip __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ long c; int skip = ap->io.skip; #ifdef MTIOCTOP @@ -315,8 +315,8 @@ bskip __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap */ static int -bfill __PARAM__((register Archive_t* ap, int must), (ap, must)) __OTORP__(register Archive_t* ap; int must;){ - register int c; +bfill __PARAM__((Archive_t* ap, int must), (ap, must)) __OTORP__(Archive_t* ap; int must;){ + int c; if (ap->io.eof) return(-1); if (ap->io.skip) ap->io.skip = bskip(ap); @@ -343,10 +343,10 @@ bfill __PARAM__((register Archive_t* ap, int must), (ap, must)) __OTORP__(regist */ int -bread __PARAM__((register Archive_t* ap, __V_* ab, register long n, long m, int must), (ap, ab, n, m, must)) __OTORP__(register Archive_t* ap; __V_* ab; register long n; long m; int must;){ - register char* b = (char*)ab; - register int c; - register char* ob; +bread __PARAM__((Archive_t* ap, __V_* ab, long n, long m, int must), (ap, ab, n, m, must)) __OTORP__(Archive_t* ap; __V_* ab; long n; long m; int must;){ + char* b = (char*)ab; + int c; + char* ob; if (ap->io.eof) return(-1); if (m <= 0) return(0); @@ -465,8 +465,8 @@ bread __PARAM__((register Archive_t* ap, __V_* ab, register long n, long m, int */ void -bunread __PARAM__((register Archive_t* ap, __V_* ab, register int n), (ap, ab, n)) __OTORP__(register Archive_t* ap; __V_* ab; register int n;){ - register char* b = (char*)ab; +bunread __PARAM__((Archive_t* ap, __V_* ab, int n), (ap, ab, n)) __OTORP__(Archive_t* ap; __V_* ab; int n;){ + char* b = (char*)ab; ap->io.eof = 0; ap->io.count -= n; @@ -484,8 +484,8 @@ bunread __PARAM__((register Archive_t* ap, __V_* ab, register int n), (ap, ab, n */ char* -bget __PARAM__((register Archive_t* ap, register int n), (ap, n)) __OTORP__(register Archive_t* ap; register int n;){ - register char* s; +bget __PARAM__((Archive_t* ap, int n), (ap, n)) __OTORP__(Archive_t* ap; int n;){ + char* s; ap->io.count += n; s = ap->io.next; @@ -494,9 +494,9 @@ bget __PARAM__((register Archive_t* ap, register int n), (ap, n)) __OTORP__(regi { if (ap->io.last > ap->io.buffer + MAXUNREAD + state.buffersize) { - register char* b; - register int k; - register int m; + char* b; + int k; + int m; k = ap->io.last - s; m = roundof(k, IOALIGN) - k; @@ -534,9 +534,9 @@ bget __PARAM__((register Archive_t* ap, register int n), (ap, n)) __OTORP__(regi */ void -backup __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){ - register long n; - register long m; +backup __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ + long n; + long m; #ifdef MTIOCTOP struct mtop mt; #endif @@ -593,7 +593,7 @@ backup __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* a */ void -bflushin __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){ +bflushin __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ ap->io.count += ap->io.last - ap->io.next; ap->io.next = ap->io.last = ap->io.buffer + MAXUNREAD; if (!ap->io.eof) @@ -608,7 +608,7 @@ bflushin __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* */ off_t -bseek __PARAM__((register Archive_t* ap, off_t pos, int op), (ap, pos, op)) __OTORP__(register Archive_t* ap; off_t pos; int op;){ +bseek __PARAM__((Archive_t* ap, off_t pos, int op), (ap, pos, op)) __OTORP__(Archive_t* ap; off_t pos; int op;){ ap->io.next = ap->io.last = ap->io.buffer + MAXUNREAD; if ((pos = lseek(ap->io.fd, pos, op)) >= 0) { @@ -624,9 +624,9 @@ bseek __PARAM__((register Archive_t* ap, off_t pos, int op), (ap, pos, op)) __OT */ void -bflushout __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){ - register int n; - register int c; +bflushout __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ + int n; + int c; if (n = ap->io.next - ap->io.buffer) { @@ -649,9 +649,9 @@ bflushout __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t */ void -bwrite __PARAM__((register Archive_t* ap, __V_* ab, register int n), (ap, ab, n)) __OTORP__(register Archive_t* ap; __V_* ab; register int n;){ - register char* b = (char*)ab; - register int c; +bwrite __PARAM__((Archive_t* ap, __V_* ab, int n), (ap, ab, n)) __OTORP__(Archive_t* ap; __V_* ab; int n;){ + char* b = (char*)ab; + int c; if (ap->sum > 0) ap->memsum = memsum(b, n, ap->memsum); @@ -734,7 +734,7 @@ bwrite __PARAM__((register Archive_t* ap, __V_* ab, register int n), (ap, ab, n) */ void -bput __PARAM__((register Archive_t* ap, register int n), (ap, n)) __OTORP__(register Archive_t* ap; register int n;){ +bput __PARAM__((Archive_t* ap, int n), (ap, n)) __OTORP__(Archive_t* ap; int n;){ ap->io.count += n; message((-7, "bput(%s,%d@%ld): %-.*s%s", ap->name, n, ap->io.count, n > 32 ? 32 : n, ap->io.next, n > 32 ? "..." : "")); if (ap->sum > 0) @@ -766,7 +766,7 @@ static struct */ static int -devpath __PARAM__((register Ftw_t* ftw), (ftw)) __OTORP__(register Ftw_t* ftw;){ +devpath __PARAM__((Ftw_t* ftw), (ftw)) __OTORP__(Ftw_t* ftw;){ if (ftw->info == FTW_F && ftw->statb.st_dev == dev.st->st_dev && ftw->statb.st_ino == dev.st->st_ino) { message((-1, "device name is %s", ftw->path)); @@ -802,9 +802,9 @@ interactive __PARAM__((void), ()){ */ void -newio __PARAM__((register Archive_t* ap, int c, int n), (ap, c, n)) __OTORP__(register Archive_t* ap; int c; int n;){ - register char* s; - register char* rw; +newio __PARAM__((Archive_t* ap, int c, int n), (ap, c, n)) __OTORP__(Archive_t* ap; int c; int n;){ + char* s; + char* rw; char* file; char* io; char* t; diff --git a/cde/programs/dtksh/ksh93/src/cmd/pax/convert.c b/cde/programs/dtksh/ksh93/src/cmd/pax/convert.c index ce452df3..5b25b71b 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/pax/convert.c +++ b/cde/programs/dtksh/ksh93/src/cmd/pax/convert.c @@ -97,9 +97,9 @@ */ char* -strlower __PARAM__((register char* s), (s)) __OTORP__(register char* s;){ - register int c; - register char* t; +strlower __PARAM__((char* s), (s)) __OTORP__(char* s;){ + int c; + char* t; for (t = s; c = *t; t++) if (isupper(c)) @@ -112,9 +112,9 @@ strlower __PARAM__((register char* s), (s)) __OTORP__(register char* s;){ */ char* -strupper __PARAM__((register char* s), (s)) __OTORP__(register char* s;){ - register int c; - register char* t; +strupper __PARAM__((char* s), (s)) __OTORP__(char* s;){ + int c; + char* t; for (t = s; c = *t; t++) if (islower(c)) @@ -127,7 +127,7 @@ strupper __PARAM__((register char* s), (s)) __OTORP__(register char* s;){ */ long -cpio_long __PARAM__((register unsigned short* s), (s)) __OTORP__(register unsigned short* s;){ +cpio_long __PARAM__((unsigned short* s), (s)) __OTORP__(unsigned short* s;){ Integral_t u; u.l = 1; @@ -149,7 +149,7 @@ cpio_long __PARAM__((register unsigned short* s), (s)) __OTORP__(register unsign */ void -cpio_short __PARAM__((register unsigned short* s, long n), (s, n)) __OTORP__(register unsigned short* s; long n;){ +cpio_short __PARAM__((unsigned short* s, long n), (s, n)) __OTORP__(unsigned short* s; long n;){ Integral_t u; u.l = 1; @@ -173,8 +173,8 @@ cpio_short __PARAM__((register unsigned short* s, long n), (s, n)) __OTORP__(reg int tar_checksum __PARAM__((void), ()){ - register char* p; - register int n; + char* p; + int n; p = tar_header.chksum; while (p < &tar_header.chksum[sizeof(tar_header.chksum)]) *p++ = ' '; @@ -189,9 +189,9 @@ tar_checksum __PARAM__((void), ()){ */ long -asc_checksum __PARAM__((char* ab, int n, register unsigned long sum), (ab, n, sum)) __OTORP__(char* ab; int n; register unsigned long sum;){ - register unsigned char* b = (unsigned char*)ab; - register unsigned char* e; +asc_checksum __PARAM__((char* ab, int n, unsigned long sum), (ab, n, sum)) __OTORP__(char* ab; int n; unsigned long sum;){ + unsigned char* b = (unsigned char*)ab; + unsigned char* e; e = b + n; while (b < e) sum += *b++; @@ -203,9 +203,9 @@ asc_checksum __PARAM__((char* ab, int n, register unsigned long sum), (ab, n, su */ long -getlabnum __PARAM__((register char* p, int byte, int width, int base), (p, byte, width, base)) __OTORP__(register char* p; int byte; int width; int base;){ - register char* e; - register int c; +getlabnum __PARAM__((char* p, int byte, int width, int base), (p, byte, width, base)) __OTORP__(char* p; int byte; int width; int base;){ + char* e; + int c; long n; p += byte - 1; @@ -221,9 +221,9 @@ getlabnum __PARAM__((register char* p, int byte, int width, int base), (p, byte, */ char* -getlabstr __PARAM__((register char* p, int byte, int width, register char* s), (p, byte, width, s)) __OTORP__(register char* p; int byte; int width; register char* s;){ +getlabstr __PARAM__((char* p, int byte, int width, char* s), (p, byte, width, s)) __OTORP__(char* p; int byte; int width; char* s;){ - register char* e; + char* e; char* v; v = s; @@ -245,9 +245,9 @@ getlabstr __PARAM__((register char* p, int byte, int width, register char* s), ( #define OHASHLPART(h,c) OHASHPART(31, h, c, 3, 2) unsigned long -omemsum __PARAM__((const __V_* b, int n, register unsigned long c), (b, n, c)) __OTORP__(const __V_* b; int n; register unsigned long c;){ - register unsigned char* p; - register unsigned char* e; +omemsum __PARAM__((const __V_* b, int n, unsigned long c), (b, n, c)) __OTORP__(const __V_* b; int n; unsigned long c;){ + unsigned char* p; + unsigned char* e; p = (unsigned char*)b; e = p + n; diff --git a/cde/programs/dtksh/ksh93/src/cmd/pax/copy.c b/cde/programs/dtksh/ksh93/src/cmd/pax/copy.c index 652f5081..ad9ac81b 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/pax/copy.c +++ b/cde/programs/dtksh/ksh93/src/cmd/pax/copy.c @@ -97,8 +97,8 @@ */ void -copyin __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){ - register File_t* f = &ap->file; +copyin __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ + File_t* f = &ap->file; deltabase(ap); while (getprologue(ap)) @@ -120,9 +120,9 @@ copyin __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* a */ int -copyout __PARAM__((register Ftw_t* ftw), (ftw)) __OTORP__(register Ftw_t* ftw;){ - register Archive_t* ap = state.out; - register File_t* f = &ap->file; +copyout __PARAM__((Ftw_t* ftw), (ftw)) __OTORP__(Ftw_t* ftw;){ + Archive_t* ap = state.out; + File_t* f = &ap->file; if (getfile(ap, f, ftw)) { @@ -142,10 +142,10 @@ copyout __PARAM__((register Ftw_t* ftw), (ftw)) __OTORP__(register Ftw_t* ftw;){ static void recordout __PARAM__((Archive_t* ap, File_t* f, Sfio_t* fp), (ap, f, fp)) __OTORP__(Archive_t* ap; File_t* f; Sfio_t* fp;){ - register int c; - register char* p; - register char* recdat; - register char* blkdat; + int c; + char* p; + char* recdat; + char* blkdat; char* rec; char* blk; int span; @@ -326,9 +326,9 @@ recordout __PARAM__((Archive_t* ap, File_t* f, Sfio_t* fp), (ap, f, fp)) __OTORP */ void -fileout __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register int n; - register long c; +fileout __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + int n; + long c; int err; Buffer_t* bp; Sfio_t* rfp; @@ -458,9 +458,9 @@ fileout __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP */ static void -recordin __PARAM__((register Archive_t* ap, register File_t* f, int wfd), (ap, f, wfd)) __OTORP__(register Archive_t* ap; register File_t* f; int wfd;){ - register long n; - register long size; +recordin __PARAM__((Archive_t* ap, File_t* f, int wfd), (ap, f, wfd)) __OTORP__(Archive_t* ap; File_t* f; int wfd;){ + long n; + long size; int c; int i; int j; @@ -645,8 +645,8 @@ recordin __PARAM__((register Archive_t* ap, register File_t* f, int wfd), (ap, f */ static void -savesetin __PARAM__((register Archive_t* ap, register File_t* f, int wfd), (ap, f, wfd)) __OTORP__(register Archive_t* ap; register File_t* f; int wfd;){ - register long c; +savesetin __PARAM__((Archive_t* ap, File_t* f, int wfd), (ap, f, wfd)) __OTORP__(Archive_t* ap; File_t* f; int wfd;){ + long c; int i; int j; int k; @@ -736,10 +736,10 @@ savesetin __PARAM__((register Archive_t* ap, register File_t* f, int wfd), (ap, */ void -filein __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register long c; - register int n; - register char* s; +filein __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + long c; + int n; + char* s; int dfd; int wfd; long checksum; @@ -845,7 +845,7 @@ filein __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP_ */ void -fileskip __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ +fileskip __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ switch (ap->format) { case ALAR: @@ -871,11 +871,11 @@ fileskip __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTOR int copyinout __PARAM__((Ftw_t* ftw), (ftw)) __OTORP__(Ftw_t* ftw;){ - register long c; - register long n; - register int rfd; - register int wfd; - register File_t* f = &state.out->file; + long c; + long n; + int rfd; + int wfd; + File_t* f = &state.out->file; static char path[PATH_MAX]; @@ -932,9 +932,9 @@ cmpftw __PARAM__((Ftw_t* ft1, Ftw_t* ft2), (ft1, ft2)) __OTORP__(Ftw_t* ft1; Ftw typedef int (*Ftw_cmp_t) __PROTO__((Ftw_t*, Ftw_t*)); void -copy __PARAM__((register Archive_t* ap, register int (*copyfile)(Ftw_t*)), (ap, copyfile)) __OTORP__(register Archive_t* ap; register int (*copyfile)();){ - register char* s; - register int n; +copy __PARAM__((Archive_t* ap, int (*copyfile)(Ftw_t*)), (ap, copyfile)) __OTORP__(Archive_t* ap; int (*copyfile)();){ + char* s; + int n; if (ap) { @@ -966,7 +966,7 @@ copy __PARAM__((register Archive_t* ap, register int (*copyfile)(Ftw_t*)), (ap, */ void -append __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){ +append __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ if (state.update) initdelta(ap); ap->format = IN_DEFAULT; copyin(ap); diff --git a/cde/programs/dtksh/ksh93/src/cmd/pax/delta.c b/cde/programs/dtksh/ksh93/src/cmd/pax/delta.c index 0a087985..5b2b8ad7 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/pax/delta.c +++ b/cde/programs/dtksh/ksh93/src/cmd/pax/delta.c @@ -98,9 +98,9 @@ static void getdeltaops __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ - register char* s; - register char* e; - register int n; + char* s; + char* e; + int n; unsigned long x; char c; @@ -160,8 +160,8 @@ getdeltaops __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* */ void -getdeltaheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register char* s; +getdeltaheader __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + char* s; char c; int n; unsigned long sum; @@ -218,7 +218,7 @@ getdeltaheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) */ void -getdeltatrailer __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ +getdeltatrailer __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ if (ap->delta && ap->delta->trailer) { f->st->st_size += ap->delta->trailer; @@ -232,9 +232,9 @@ getdeltatrailer __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) */ void -setdeltaheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register char* s; - register int n; +setdeltaheader __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + char* s; + int n; if (f->delta.op && ap->delta) { @@ -253,7 +253,7 @@ setdeltaheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) */ void -putdeltaheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ +putdeltaheader __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ int n; if (f->delta.op && ap->delta && (n = ap->delta->hdr - ap->delta->hdrbuf)) @@ -278,9 +278,9 @@ putdeltaheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) */ void -putdeltatrailer __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register char* s; - register int n; +putdeltatrailer __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + char* s; + int n; if (f->delta.op && ap->delta) { @@ -312,8 +312,8 @@ initdelta __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ */ void -deltabase __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){ - register Archive_t* bp; +deltabase __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ + Archive_t* bp; struct stat st; if (!ap->delta) @@ -355,10 +355,10 @@ deltabase __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t void deltaverify __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ - register int wfd; - register Member_t* d; - register long c; - register long n; + int wfd; + Member_t* d; + long c; + long n; Hash_position_t* pos; if (!state.list && ap->delta && (pos = hashscan(ap->delta->tab, 0))) @@ -410,9 +410,9 @@ deltaverify __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ */ static void -deltaprefix __PARAM__((Archive_t* ip, Archive_t* op, register Member_t* d), (ip, op, d)) __OTORP__(Archive_t* ip; Archive_t* op; register Member_t* d;){ - register char* s; - register Member_t* m; +deltaprefix __PARAM__((Archive_t* ip, Archive_t* op, Member_t* d), (ip, op, d)) __OTORP__(Archive_t* ip; Archive_t* op; Member_t* d;){ + char* s; + Member_t* m; d->mark = 1; if (s = strrchr(d->info->path, '/')) @@ -438,8 +438,8 @@ deltaprefix __PARAM__((Archive_t* ip, Archive_t* op, register Member_t* d), (ip, */ void -deltaout __PARAM__((Archive_t* ip, Archive_t* op, register File_t* f), (ip, op, f)) __OTORP__(Archive_t* ip; Archive_t* op; register File_t* f;){ - register Member_t* d; +deltaout __PARAM__((Archive_t* ip, Archive_t* op, File_t* f), (ip, op, f)) __OTORP__(Archive_t* ip; Archive_t* op; File_t* f;){ + Member_t* d; int dfd; if (d = op->delta && op->delta->tab && f->name ? (Member_t*)hashget(op->delta->tab, f->name) : (Member_t*)0) @@ -489,7 +489,7 @@ deltaout __PARAM__((Archive_t* ip, Archive_t* op, register File_t* f), (ip, op, } if (!d || d->mtime != f->st->st_mtime) { - register char* s; + char* s; if (ip && ip->delta && ip->delta->tab && f->name && (s = strrchr(f->name, '/'))) { @@ -512,7 +512,7 @@ deltaout __PARAM__((Archive_t* ip, Archive_t* op, register File_t* f), (ip, op, */ static void -deltacopy __PARAM__((Archive_t* ip, Archive_t* op, register File_t* f), (ip, op, f)) __OTORP__(Archive_t* ip; Archive_t* op; register File_t* f;){ +deltacopy __PARAM__((Archive_t* ip, Archive_t* op, File_t* f), (ip, op, f)) __OTORP__(Archive_t* ip; Archive_t* op; File_t* f;){ f->st->st_size = f->delta.base->size; if (f->delta.base->expand >= 0) { @@ -537,9 +537,9 @@ deltacopy __PARAM__((Archive_t* ip, Archive_t* op, register File_t* f), (ip, op, */ void -deltadelete __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){ - register File_t* f; - register Member_t* d; +deltadelete __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ + File_t* f; + Member_t* d; Hash_position_t* pos; if (!state.ordered && ap->delta && ap->delta->tab) @@ -572,9 +572,9 @@ deltadelete __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive void deltapass __PARAM__((Archive_t* ip, Archive_t* op), (ip, op)) __OTORP__(Archive_t* ip; Archive_t* op;){ - register File_t* f; - register long c; - register long n; + File_t* f; + long c; + long n; Member_t* d; char* p; Hash_position_t* pos; @@ -764,7 +764,7 @@ typedef struct static int delread __PARAM__((__V_* buf, int n, long off, Vddisc_t* vd), (buf, n, off, vd)) __OTORP__(__V_* buf; int n; long off; Vddisc_t* vd;){ - register Vdio_t* dp = (Vdio_t*)vd; + Vdio_t* dp = (Vdio_t*)vd; if (off != dp->offset) { @@ -800,7 +800,7 @@ delread __PARAM__((__V_* buf, int n, long off, Vddisc_t* vd), (buf, n, off, vd)) static int delwrite __PARAM__((__V_* buf, int n, long off, Vddisc_t* vd), (buf, n, off, vd)) __OTORP__(__V_* buf; int n; long off; Vddisc_t* vd;){ - register Vdio_t* dp = (Vdio_t*)vd; + Vdio_t* dp = (Vdio_t*)vd; Buffer_t* bp; if (dp->op & DELTA_BIO) @@ -836,7 +836,7 @@ delwrite __PARAM__((__V_* buf, int n, long off, Vddisc_t* vd), (buf, n, off, vd) int paxdelta __PARAM__((Archive_t* ip, Archive_t* ap, File_t* f, int op, ...), (va_alist)) __OTORP__(va_dcl) { __OTORP__(Archive_t* ip; Archive_t* ap; File_t* f; int op; ) - register Vdio_t* dp; + Vdio_t* dp; va_list vp; long n; int bufferclash = 0; diff --git a/cde/programs/dtksh/ksh93/src/cmd/pax/fgetline.c b/cde/programs/dtksh/ksh93/src/cmd/pax/fgetline.c index 1363812f..df4c0e5f 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/pax/fgetline.c +++ b/cde/programs/dtksh/ksh93/src/cmd/pax/fgetline.c @@ -117,12 +117,12 @@ */ char* -fgetline __PARAM__((register FILE* fp, int op), (fp, op)) __OTORP__(register FILE* fp; int op;) +fgetline __PARAM__((FILE* fp, int op), (fp, op)) __OTORP__(FILE* fp; int op;) #line 29 { - register int c; - register char* s; - register char* end; + int c; + char* s; + char* end; static char* buf; static int siz; diff --git a/cde/programs/dtksh/ksh93/src/cmd/pax/file.c b/cde/programs/dtksh/ksh93/src/cmd/pax/file.c index 03633ed6..855f4fd5 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/pax/file.c +++ b/cde/programs/dtksh/ksh93/src/cmd/pax/file.c @@ -97,8 +97,8 @@ */ int -filter __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register int n; +filter __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + int n; int rfd; int wfd; Proc_t* proc; @@ -150,8 +150,8 @@ filter __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP_ */ int -openin __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register int n; +openin __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + int n; int rfd; if (f->type != X_IFREG) @@ -185,9 +185,9 @@ openin __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP_ */ static int -missdir __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register char* s; - register char* t; +missdir __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + char* s; + char* t; long pp; struct stat* st; struct stat* sp; @@ -257,8 +257,8 @@ missdir __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP */ int -openout __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register int fd; +openout __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + int fd; int exists; struct stat st; @@ -514,8 +514,8 @@ openout __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP */ int -getfile __PARAM__((register Archive_t* ap, register File_t* f, register Ftw_t* ftw), (ap, f, ftw)) __OTORP__(register Archive_t* ap; register File_t* f; register Ftw_t* ftw;){ - register char* name; +getfile __PARAM__((Archive_t* ap, File_t* f, Ftw_t* ftw), (ap, f, ftw)) __OTORP__(Archive_t* ap; File_t* f; Ftw_t* ftw;){ + char* name; static struct stat st; static char pathbuffer[PATH_MAX]; @@ -599,8 +599,8 @@ getfile __PARAM__((register Archive_t* ap, register File_t* f, register Ftw_t* f */ int -validout __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register char* s; +validout __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + char* s; static char linkbuffer[PATH_MAX]; static char idbuffer[ALAR_NAMESIZE + 1]; @@ -697,9 +697,9 @@ validout __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTOR */ int -addlink __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register Link_t* p; - register char* s; +addlink __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + Link_t* p; + char* s; Fileid_t id; unsigned short us; @@ -827,7 +827,7 @@ addlink __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP */ void -getidnames __PARAM__((register File_t* f), (f)) __OTORP__(register File_t* f;){ +getidnames __PARAM__((File_t* f), (f)) __OTORP__(File_t* f;){ if (!f->uidname) f->uidname = fmtuid(f->st->st_uid); if (!f->gidname) f->gidname = fmtgid(f->st->st_gid); } @@ -837,8 +837,8 @@ getidnames __PARAM__((register File_t* f), (f)) __OTORP__(register File_t* f;){ */ void -setidnames __PARAM__((register File_t* f), (f)) __OTORP__(register File_t* f;){ - register int id; +setidnames __PARAM__((File_t* f), (f)) __OTORP__(File_t* f;){ + int id; if (f->uidname) { @@ -898,7 +898,7 @@ getarchive __PARAM__((int op), (op)) __OTORP__(int op;){ */ void -initfile __PARAM__((register Archive_t* ap, register File_t* f, register char* name, int mode), (ap, f, name, mode)) __OTORP__(register Archive_t* ap; register File_t* f; register char* name; int mode;){ +initfile __PARAM__((Archive_t* ap, File_t* f, char* name, int mode), (ap, f, name, mode)) __OTORP__(Archive_t* ap; File_t* f; char* name; int mode;){ static struct stat st; memzero(f, sizeof(*f)); @@ -918,8 +918,8 @@ initfile __PARAM__((register Archive_t* ap, register File_t* f, register char* n */ void -setfile __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register Post_t* p; +setfile __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + Post_t* p; Post_t post; if (!ap->pass) switch (f->type) @@ -967,8 +967,8 @@ settime __PARAM__((const char* name, time_t atime, time_t mtime), (name, atime, */ int -restore __PARAM__((register const char* name, char* ap, __V_* handle), (name, ap, handle)) __OTORP__(register const char* name; char* ap; __V_* handle;){ - register Post_t* p = (Post_t*)ap; +restore __PARAM__((const char* name, char* ap, __V_* handle), (name, ap, handle)) __OTORP__(const char* name; char* ap; __V_* handle;){ + Post_t* p = (Post_t*)ap; int m; struct stat st; @@ -1004,7 +1004,7 @@ restore __PARAM__((register const char* name, char* ap, __V_* handle), (name, ap */ int -prune __PARAM__((register Archive_t* ap, register File_t* f, register struct stat* st), (ap, f, st)) __OTORP__(register Archive_t* ap; register File_t* f; register struct stat* st;){ +prune __PARAM__((Archive_t* ap, File_t* f, struct stat* st), (ap, f, st)) __OTORP__(Archive_t* ap; File_t* f; struct stat* st;){ if (st->st_mode == f->st->st_mode && (ap->delta && f->st->st_mtime == st->st_mtime || state.update && (unsigned long)f->st->st_mtime <= (unsigned long)st->st_mtime)) return(1); return(0); @@ -1017,10 +1017,10 @@ prune __PARAM__((register Archive_t* ap, register File_t* f, register struct sta ssize_t holewrite __PARAM__((int fd, __V_* buf, size_t siz), (fd, buf, siz)) __OTORP__(int fd; __V_* buf; size_t siz;){ - register char* t = (char*)buf; - register char* e = t + siz; - register char* b = 0; - register char* s; + char* t = (char*)buf; + char* e = t + siz; + char* b = 0; + char* s; ssize_t i; ssize_t n = 0; diff --git a/cde/programs/dtksh/ksh93/src/cmd/pax/format.c b/cde/programs/dtksh/ksh93/src/cmd/pax/format.c index 12217458..4ac96eab 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/pax/format.c +++ b/cde/programs/dtksh/ksh93/src/cmd/pax/format.c @@ -123,7 +123,7 @@ delta_hi __PARAM__((long x), (x)) __OTORP__(long x;){ */ static int -isalar __PARAM__((Archive_t* ap, register char* hdr), (ap, hdr)) __OTORP__(Archive_t* ap; register char* hdr;){ +isalar __PARAM__((Archive_t* ap, char* hdr), (ap, hdr)) __OTORP__(Archive_t* ap; char* hdr;){ char buf[4]; if (!strneq(hdr, "VOL1", 4)) @@ -147,7 +147,7 @@ isalar __PARAM__((Archive_t* ap, register char* hdr), (ap, hdr)) __OTORP__(Archi */ int -getprologue __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){ +getprologue __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ int n; long size; @@ -297,7 +297,7 @@ getprologue __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive */ static void -setinfo __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ +setinfo __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ long n; if (ap->delta) @@ -318,8 +318,8 @@ setinfo __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP */ static void -putinfo __PARAM__((register Archive_t* ap, char* file, unsigned long mtime, unsigned long checksum), (ap, file, mtime, checksum)) __OTORP__(register Archive_t* ap; char* file; unsigned long mtime; unsigned long checksum;){ - register File_t* f = &ap->file; +putinfo __PARAM__((Archive_t* ap, char* file, unsigned long mtime, unsigned long checksum), (ap, file, mtime, checksum)) __OTORP__(Archive_t* ap; char* file; unsigned long mtime; unsigned long checksum;){ + File_t* f = &ap->file; Sfio_t* np = 0; if (!file) @@ -350,7 +350,7 @@ putinfo __PARAM__((register Archive_t* ap, char* file, unsigned long mtime, unsi */ void -putprologue __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){ +putprologue __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ if (ap->delta && ap->delta->version == DELTA_88) ap->checksum = ap->old.checksum; switch (ap->format) @@ -413,10 +413,10 @@ putprologue __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive */ void -getepilogue __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){ - register char* s; - register long n; - register long i; +getepilogue __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ + char* s; + long n; + long i; if (ap->delta && ap->delta->epilogue < 0) error(3, "%s: corrupt archive: missing epilogue", ap->name); @@ -491,9 +491,9 @@ getepilogue __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive */ void -putepilogue __PARAM__((register Archive_t* ap), (ap)) __OTORP__(register Archive_t* ap;){ - register long n; - register unsigned long boundary; +putepilogue __PARAM__((Archive_t* ap), (ap)) __OTORP__(Archive_t* ap;){ + long n; + unsigned long boundary; static int selected; @@ -571,10 +571,10 @@ static char* ops = opsbuf; /* opsbuf output pointer */ */ static void -getxops __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register char* p; - register char* s; - register int c; +getxops __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + char* p; + char* s; + int c; long n; if (f->namesize > (n = strlen(f->name) + 1)) for (p = f->name + n; c = *p++;) @@ -613,8 +613,8 @@ getxops __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP */ static void -setxops __PARAM__((Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(Archive_t* ap; register File_t* f;){ - register int n; +setxops __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + int n; NoP(ap); if (n = ops - opsbuf) @@ -630,8 +630,8 @@ setxops __PARAM__((Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(Archiv */ static void -putxops __PARAM__((Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(Archive_t* ap; register File_t* f;){ - register int n; +putxops __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + int n; n = ops - opsbuf; bwrite(ap, f->name, f->namesize -= n); @@ -644,9 +644,9 @@ putxops __PARAM__((Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(Archiv */ static void -addxopstr __PARAM__((Archive_t* ap, int op, register char* s), (ap, op, s)) __OTORP__(Archive_t* ap; int op; register char* s;){ - register char* p = ops; - register char* e = opsbuf + sizeof(opsbuf) - 3; +addxopstr __PARAM__((Archive_t* ap, int op, char* s), (ap, op, s)) __OTORP__(Archive_t* ap; int op; char* s;){ + char* p = ops; + char* e = opsbuf + sizeof(opsbuf) - 3; NoP(ap); if (p < e) @@ -681,7 +681,7 @@ addxopnum __PARAM__((Archive_t* ap, int op, long n), (ap, op, n)) __OTORP__(Arch static void getkeyname __PARAM__((Archive_t* ap, File_t* f, int index, char** nm), (ap, f, index, nm)) __OTORP__(Archive_t* ap; File_t* f; int index; char** nm;){ - register Option_t* op; + Option_t* op; static int uinit; static int ginit; @@ -725,7 +725,7 @@ getkeyname __PARAM__((Archive_t* ap, File_t* f, int index, char** nm), (ap, f, i static void getkeytime __PARAM__((Archive_t* ap, File_t* f, int index, time_t* tm), (ap, f, index, tm)) __OTORP__(Archive_t* ap; File_t* f; int index; time_t* tm;){ - register Option_t* op; + Option_t* op; NoP(f); op = &options[index]; @@ -745,10 +745,10 @@ getkeytime __PARAM__((Archive_t* ap, File_t* f, int index, time_t* tm), (ap, f, */ int -getheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register char* s; - register int i; - register long n; +getheader __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + char* s; + int i; + long n; char* t; long num; int warned; @@ -1587,9 +1587,9 @@ getheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTO static void putkey __PARAM__((Sfio_t* sp, Sfio_t* tp, const char* name, int op, const char* value), (sp, tp, name, op, value)) __OTORP__(Sfio_t* sp; Sfio_t* tp; const char* name; int op; const char* value;){ - register const char* s; - register int c; - register int n; + const char* s; + int c; + int n; sfprintf(tp, " %s", name); if (op) sfputc(tp, op); @@ -1651,9 +1651,9 @@ putkey __PARAM__((Sfio_t* sp, Sfio_t* tp, const char* name, int op, const char* */ void -putheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register char* s; - register int n; +putheader __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + char* s; + int n; int c; setdeltaheader(ap, f); @@ -2059,8 +2059,8 @@ putheader __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTO */ void -gettrailer __PARAM__((register Archive_t* ap, File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; File_t* f;){ - register long n; +gettrailer __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + long n; NoP(f); if (ap->sum-- > 0) @@ -2080,8 +2080,8 @@ gettrailer __PARAM__((register Archive_t* ap, File_t* f), (ap, f)) __OTORP__(reg */ void -puttrailer __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register int n; +puttrailer __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + int n; putdeltatrailer(ap, f); switch (ap->format) @@ -2112,9 +2112,9 @@ puttrailer __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OT */ int -getlabel __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register int c; - register int n; +getlabel __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + int c; + int n; static char last[5]; static int done; @@ -2151,7 +2151,7 @@ getlabel __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTOR */ void -putlabels __PARAM__((register Archive_t* ap, register File_t* f, char* type), (ap, f, type)) __OTORP__(register Archive_t* ap; register File_t* f; char* type;){ +putlabels __PARAM__((Archive_t* ap, File_t* f, char* type), (ap, f, type)) __OTORP__(Archive_t* ap; File_t* f; char* type;){ struct tm* tm; static int section = 1; @@ -2192,9 +2192,9 @@ putlabels __PARAM__((register Archive_t* ap, register File_t* f, char* type), (a */ int -getsaveset __PARAM__((register Archive_t* ap, register File_t* f, int header), (ap, f, header)) __OTORP__(register Archive_t* ap; register File_t* f; int header;){ - register char* p; - register char* s; +getsaveset __PARAM__((Archive_t* ap, File_t* f, int header), (ap, f, header)) __OTORP__(Archive_t* ap; File_t* f; int header;){ + char* p; + char* s; char* t; int i; long n; diff --git a/cde/programs/dtksh/ksh93/src/cmd/pax/misc.c b/cde/programs/dtksh/ksh93/src/cmd/pax/misc.c index 78101914..ac06fc14 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/pax/misc.c +++ b/cde/programs/dtksh/ksh93/src/cmd/pax/misc.c @@ -100,8 +100,8 @@ */ int -getformat __PARAM__((register char* name), (name)) __OTORP__(register char* name;){ - register int i; +getformat __PARAM__((char* name), (name)) __OTORP__(char* name;){ + int i; strlower(name); for (i = 0; format[i].name; i++) @@ -115,9 +115,9 @@ getformat __PARAM__((register char* name), (name)) __OTORP__(register char* name */ static int -pathcmp __PARAM__((register const char* s, register const char* t), (s, t)) __OTORP__(register const char* s; register const char* t;){ - register int sc; - register int tc; +pathcmp __PARAM__((const char* s, const char* t), (s, t)) __OTORP__(const char* s; const char* t;){ + int sc; + int tc; for (;;) { @@ -150,9 +150,9 @@ ordered __PARAM__((Archive_t* ap, const char* prv, const char* cur), (ap, prv, c */ int -selectfile __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(register Archive_t* ap; register File_t* f;){ - register Archive_t* bp; - register Member_t* d; +selectfile __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + Archive_t* bp; + Member_t* d; int linked = 0; if (f->skip || f->namesize <= 1) @@ -200,8 +200,8 @@ selectfile __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OT addlink(ap, f); if (state.ordered && ap->delta && ap->delta->format != COMPRESS && (bp = ap->delta->base)) { - register int n; - register int m; + int n; + int m; for (;;) { @@ -266,9 +266,9 @@ selectfile __PARAM__((register Archive_t* ap, register File_t* f), (ap, f)) __OT */ int -verify __PARAM__((Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(Archive_t* ap; register File_t* f;){ - register char* prompt; - register char* name; +verify __PARAM__((Archive_t* ap, File_t* f), (ap, f)) __OTORP__(Archive_t* ap; File_t* f;){ + char* prompt; + char* name; NoP(ap); if (state.yesno) switch (state.operation) @@ -313,8 +313,8 @@ verify __PARAM__((Archive_t* ap, register File_t* f), (ap, f)) __OTORP__(Archive */ char* -map __PARAM__((register char* name), (name)) __OTORP__(register char* name;){ - register Map_t* mp; +map __PARAM__((char* name), (name)) __OTORP__(char* name;){ + Map_t* mp; char* to; char* from; @@ -347,12 +347,12 @@ typedef struct */ static int -listlookup __PARAM__((__V_* handle, register const char* name, const char* arg, int cc, char** ps, long* pn), (handle, name, arg, cc, ps, pn)) __OTORP__(__V_* handle; register const char* name; const char* arg; int cc; char** ps; long* pn;){ +listlookup __PARAM__((__V_* handle, const char* name, const char* arg, int cc, char** ps, long* pn), (handle, name, arg, cc, ps, pn)) __OTORP__(__V_* handle; const char* name; const char* arg; int cc; char** ps; long* pn;){ List_handle_t* gp = (List_handle_t*)handle; - register File_t* f = gp->file; - register struct stat* st = f->st; - register char* s = 0; - register long n = 0; + File_t* f = gp->file; + struct stat* st = f->st; + char* s = 0; + long n = 0; Option_t* op; static Sfio_t* mp; @@ -573,7 +573,7 @@ listprintf __PARAM__((Sfio_t* sp, Archive_t* ap, File_t* f, const char* format), */ void -listentry __PARAM__((register File_t* f), (f)) __OTORP__(register File_t* f;){ +listentry __PARAM__((File_t* f), (f)) __OTORP__(File_t* f;){ if (!f->extended && !f->skip && (state.drop || state.list || state.verbose)) { if (state.drop) @@ -599,7 +599,7 @@ listentry __PARAM__((register File_t* f), (f)) __OTORP__(register File_t* f;){ char** initmatch __PARAM__((char** p), (p)) __OTORP__(char** p;){ - register char** a; + char** a; a = p; while (*a) @@ -612,9 +612,9 @@ initmatch __PARAM__((char** p), (p)) __OTORP__(char** p;){ */ int -match __PARAM__((register char* s), (s)) __OTORP__(register char* s;){ - register char** p; - register char* t; +match __PARAM__((char* s), (s)) __OTORP__(char* s;){ + char** p; + char* t; int n; if (!(p = state.patterns)) return(state.matchsense); @@ -646,7 +646,7 @@ match __PARAM__((register char* s), (s)) __OTORP__(register char* s;){ */ int -dirprefix __PARAM__((register char* p, register char* s), (p, s)) __OTORP__(register char* p; register char* s;){ +dirprefix __PARAM__((char* p, char* s), (p, s)) __OTORP__(char* p; char* s;){ if (*p == '.' && !*(p + 1) && *s != '/' && (*s != '.' || *(s + 1) != '.' || *(s + 2) && *(s + 2) != '/')) return(1); if (*p == '/' && !*(p + 1)) @@ -663,8 +663,8 @@ dirprefix __PARAM__((register char* p, register char* s), (p, s)) __OTORP__(regi int portable __PARAM__((const char* s), (s)) __OTORP__(const char* s;){ - register unsigned char* u = (unsigned char*)s; - register int c; + unsigned char* u = (unsigned char*)s; + int c; while (c = *s++) if (c > 0177) diff --git a/cde/programs/dtksh/ksh93/src/cmd/pax/nocom.c b/cde/programs/dtksh/ksh93/src/cmd/pax/nocom.c index 923c90f2..0487e864 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/pax/nocom.c +++ b/cde/programs/dtksh/ksh93/src/cmd/pax/nocom.c @@ -117,10 +117,10 @@ static const char id[] = "\n@(#)nocom (AT&T Bell Laboratories) 08/11/94\0\n"; */ static void -nocom __PARAM__((register Sfio_t* sp, char* file), (sp, file)) __OTORP__(register Sfio_t* sp; char* file;){ - register int c = 0; - register int p; - register int data = 0; +nocom __PARAM__((Sfio_t* sp, char* file), (sp, file)) __OTORP__(Sfio_t* sp; char* file;){ + int c = 0; + int p; + int data = 0; int sync = 0; unsigned long line = 0; unsigned long prev = 0; @@ -403,9 +403,9 @@ nocom __PARAM__((register Sfio_t* sp, char* file), (sp, file)) __OTORP__(registe } main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){ - register int c; - register char* s; - register Sfio_t* sp; + int c; + char* s; + Sfio_t* sp; NoP(argc); error_info.id = "nocom"; diff --git a/cde/programs/dtksh/ksh93/src/cmd/pax/pax.c b/cde/programs/dtksh/ksh93/src/cmd/pax/pax.c index e25dd339..6634643a 100644 --- a/cde/programs/dtksh/ksh93/src/cmd/pax/pax.c +++ b/cde/programs/dtksh/ksh93/src/cmd/pax/pax.c @@ -777,9 +777,9 @@ interrupt __PARAM__((int sig), (sig)) __OTORP__(int sig;){ */ static void -substitute __PARAM__((Map_t** lastmap, register char* s), (lastmap, s)) __OTORP__(Map_t** lastmap; register char* s;){ - register Map_t* mp; - register int n; +substitute __PARAM__((Map_t** lastmap, char* s), (lastmap, s)) __OTORP__(Map_t** lastmap; char* s;){ + Map_t* mp; + int n; char* p; for (;;) @@ -845,9 +845,9 @@ substitute __PARAM__((Map_t** lastmap, register char* s), (lastmap, s)) __OTORP_ static void help __PARAM__((void), ()){ - register char* s; - register char* e; - register Sfio_t* sp; + char* s; + char* e; + Sfio_t* sp; int n; sp = sfstropen(); @@ -880,7 +880,7 @@ help __PARAM__((void), ()){ */ int -setoption __PARAM__((__V_* a, const __V_* p, register int n, register const char* v), (a, p, n, v)) __OTORP__(__V_* a; const __V_* p; register int n; register const char* v;){ +setoption __PARAM__((__V_* a, const __V_* p, int n, const char* v), (a, p, n, v)) __OTORP__(__V_* a; const __V_* p; int n; const char* v;){ int c; char* e; char* s; @@ -1358,7 +1358,7 @@ setoption __PARAM__((__V_* a, const __V_* p, register int n, register const char static void ignore __PARAM__((void), ()){ - register Option_t* op; + Option_t* op; Hash_position_t* pos; char* all; char* ext; @@ -1383,9 +1383,9 @@ ignore __PARAM__((void), ()){ int main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){ - register int i; - register char* s; - register Archive_t* ap; + int i; + char* s; + Archive_t* ap; char* p; Hash_position_t* pos; Option_t* op; @@ -1845,10 +1845,10 @@ main __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** void finish __PARAM__((int code), (code)) __OTORP__(int code;){ - register Archive_t* ap; - register char* x1 = &state.tmp.buffer[0]; - register char* x2 = &state.tmp.buffer[state.buffersize / 2]; - register unsigned long n; + Archive_t* ap; + char* x1 = &state.tmp.buffer[0]; + char* x2 = &state.tmp.buffer[state.buffersize / 2]; + unsigned long n; while (state.proc) { diff --git a/cde/programs/dtksh/ksh93/src/lib/lib0ast/hostinfo.sh b/cde/programs/dtksh/ksh93/src/lib/lib0ast/hostinfo.sh index c9892f74..35005abf 100644 --- a/cde/programs/dtksh/ksh93/src/lib/lib0ast/hostinfo.sh +++ b/cde/programs/dtksh/ksh93/src/lib/lib0ast/hostinfo.sh @@ -123,9 +123,9 @@ do case $info in cat > $tmp.c <func = func; @@ -136,7 +136,7 @@ atexit __PARAM__((void (*func)(void)), (func)) __OTORP__(void (*func)();){ void _ast_atexit __PARAM__((void), ()){ - register struct list* p; + struct list* p; while (p = funclist) { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/getgroups.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/getgroups.c index 0a862cdf..b7358d2d 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/getgroups.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/getgroups.c @@ -116,7 +116,7 @@ ast_getgroups __PARAM__((int len, gid_t* set), (len, set)) __OTORP__(int len; gi #undef NGROUPS_MAX #define NGROUPS_MAX 1 #endif - register int i; + int i; int big[NGROUPS_MAX]; #else #undef NGROUPS_MAX diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/memccpy.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/memccpy.c index 41de50e5..6d47d25c 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/memccpy.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/memccpy.c @@ -105,10 +105,10 @@ NoN(memccpy) */ __V_* -memccpy __PARAM__((__V_* as1, const __V_* as2, register int c, size_t n), (as1, as2, c, n)) __OTORP__(__V_* as1; const __V_* as2; register int c; size_t n;){ - register char* s1 = (char*)as1; - register const char* s2 = (char*)as2; - register const char* ep = s2 + n; +memccpy __PARAM__((__V_* as1, const __V_* as2, int c, size_t n), (as1, as2, c, n)) __OTORP__(__V_* as1; const __V_* as2; int c; size_t n;){ + char* s1 = (char*)as1; + const char* s2 = (char*)as2; + const char* ep = s2 + n; while (s2 < ep) if ((*s1++ = *s2++) == c) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/memchr.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/memchr.c index fc1bbe18..e0a580a1 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/memchr.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/memchr.c @@ -104,9 +104,9 @@ NoN(memchr) */ __V_* -memchr __PARAM__((const __V_* asp, register int c, size_t n), (asp, c, n)) __OTORP__(const __V_* asp; register int c; size_t n;){ - register const char* sp = (char*)asp; - register const char* ep = sp + n; +memchr __PARAM__((const __V_* asp, int c, size_t n), (asp, c, n)) __OTORP__(const __V_* asp; int c; size_t n;){ + const char* sp = (char*)asp; + const char* ep = sp + n; while (sp < ep) if (*sp++ == c) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/memcmp.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/memcmp.c index 644b3840..ea15acfe 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/memcmp.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/memcmp.c @@ -100,9 +100,9 @@ NoN(memcmp) int memcmp __PARAM__((const __V_* ab1, const __V_* ab2, size_t n), (ab1, ab2, n)) __OTORP__(const __V_* ab1; const __V_* ab2; size_t n;){ - register const unsigned char* b1 = (const unsigned char*)ab1; - register const unsigned char* b2 = (const unsigned char*)ab2; - register const unsigned char* e = b1 + n; + const unsigned char* b1 = (const unsigned char*)ab1; + const unsigned char* b2 = (const unsigned char*)ab2; + const unsigned char* e = b1 + n; while (b1 < e) if (*b1++ != *b2++) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/memcpy.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/memcpy.c index 078afec7..44b015cf 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/memcpy.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/memcpy.c @@ -113,9 +113,9 @@ memcpy __PARAM__((__V_* s1, __V_* s2, size_t n), (s1, s2, n)) __OTORP__(__V_* s1 #else __V_* -memcpy __PARAM__((__V_* as1, const __V_* as2, register size_t n), (as1, as2, n)) __OTORP__(__V_* as1; const __V_* as2; register size_t n;){ - register char* s1 = (char*)as1; - register const char* s2 = (const char*)as2; +memcpy __PARAM__((__V_* as1, const __V_* as2, size_t n), (as1, as2, n)) __OTORP__(__V_* as1; const __V_* as2; size_t n;){ + char* s1 = (char*)as1; + const char* s2 = (const char*)as2; while (n-- > 0) *s1++ = *s2++; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/memmove.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/memmove.c index bc5cf7a9..9b55cce1 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/memmove.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/memmove.c @@ -99,9 +99,9 @@ NoN(memmove) #else __V_* -memmove __PARAM__((__V_* to, const __V_* from, register size_t n), (to, from, n)) __OTORP__(__V_* to; const __V_* from; register size_t n;){ - register char* out = (char*)to; - register char* in = (char*)from; +memmove __PARAM__((__V_* to, const __V_* from, size_t n), (to, from, n)) __OTORP__(__V_* to; const __V_* from; size_t n;){ + char* out = (char*)to; + char* in = (char*)from; if (n <= 0) /* works if size_t is signed or not */ ; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/memset.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/memset.c index 6fd6e07e..459fd661 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/memset.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/memset.c @@ -99,8 +99,8 @@ NoN(memset) #else __V_* -memset __PARAM__((__V_* asp, register int c, register size_t n), (asp, c, n)) __OTORP__(__V_* asp; register int c; register size_t n;){ - register char* sp = (char*)asp; +memset __PARAM__((__V_* asp, int c, size_t n), (asp, c, n)) __OTORP__(__V_* asp; int c; size_t n;){ + char* sp = (char*)asp; while (n-- > 0) *sp++ = c; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/mkdir.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/mkdir.c index 739e9646..2b319307 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/mkdir.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/mkdir.c @@ -104,7 +104,7 @@ NoN(mkdir) int mkdir __PARAM__((const char* path, mode_t mode), (path, mode)) __OTORP__(const char* path; mode_t mode;){ - register int n; + int n; char* av[3]; static char* cmd[] = { "/bin/mkdir", "/usr/5bin/mkdir", 0 }; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/rmdir.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/rmdir.c index 1243caad..41bd865e 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/rmdir.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/rmdir.c @@ -103,7 +103,7 @@ NoN(rmdir) int rmdir __PARAM__((const char* path), (path)) __OTORP__(const char* path;){ - register int n; + int n; struct stat st; char* av[3]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/setlocale.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/setlocale.c index 16d14096..ff6f1d5d 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/setlocale.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/setlocale.c @@ -104,10 +104,10 @@ typedef struct } Locale_t; char* -_ast_setlocale __PARAM__((register int category, const char* locale), (category, locale)) __OTORP__(register int category; const char* locale;){ +_ast_setlocale __PARAM__((int category, const char* locale), (category, locale)) __OTORP__(int category; const char* locale;){ #if _hdr_locale && _lib_setlocale - register Locale_t* lc; - register char* p; + Locale_t* lc; + char* p; static Locale_t def[] = { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/spawnveg.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/spawnveg.c index c4d6f423..0d364b2f 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/spawnveg.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/spawnveg.c @@ -176,9 +176,9 @@ spawnveg __PARAM__((const char* cmd, char* const argv[], char* const envv[], pid execve(cmd, argv, envv); if (errno == ENOEXEC) { - register char** o; - register char** p; - register char** v; + char** o; + char** p; + char** v; for (p = o = (char**)argv; *p; p++); if (v = newof(0, char*, p - o + 2, 0)) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/statvfs.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/statvfs.c index a6e397c0..5cfa5ff7 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/statvfs.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/statvfs.c @@ -126,7 +126,7 @@ NoN(statvfs) #endif static void -us2v __PARAM__((register struct statfs* ufs, register struct stat* st, register struct statvfs* vfs), (ufs, st, vfs)) __OTORP__(register struct statfs* ufs; register struct stat* st; register struct statvfs* vfs;){ +us2v __PARAM__((struct statfs* ufs, struct stat* st, struct statvfs* vfs), (ufs, st, vfs)) __OTORP__(struct statfs* ufs; struct stat* st; struct statvfs* vfs;){ memset(vfs, 0, sizeof(*vfs)); vfs->f_bsize = vfs->f_frsize = ufs->f_bsize; vfs->f_blocks = ufs->f_blocks; @@ -171,7 +171,7 @@ statvfs __PARAM__((const char* path, struct statvfs* vfs), (path, vfs)) __OTORP_ #else static void -s2v __PARAM__((register struct stat* st, register struct statvfs* vfs), (st, vfs)) __OTORP__(register struct stat* st; register struct statvfs* vfs;){ +s2v __PARAM__((struct stat* st, struct statvfs* vfs), (st, vfs)) __OTORP__(struct stat* st; struct statvfs* vfs;){ memset(vfs, 0, sizeof(*vfs)); vfs->f_bsize = vfs->f_frsize = #if _mem_st_blksize_stat diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/strchr.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/strchr.c index 5ab78129..07e1c739 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/strchr.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/strchr.c @@ -114,7 +114,7 @@ strchr __PARAM__((const char* s, int c), (s, c)) __OTORP__(const char* s; int c; #else char* -strchr __PARAM__((register const char* s, register int c), (s, c)) __OTORP__(register const char* s; register int c;){ +strchr __PARAM__((const char* s, int c), (s, c)) __OTORP__(const char* s; int c;){ do if (*s == c) return((char*)s); while(*s++); return(0); } diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/strrchr.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/strrchr.c index 3660193b..a735992e 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/strrchr.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/strrchr.c @@ -114,8 +114,8 @@ strrchr __PARAM__((const char* s, int c), (s, c)) __OTORP__(const char* s; int c #else char* -strrchr __PARAM__((register const char* s, register int c), (s, c)) __OTORP__(register const char* s; register int c;){ - register const char* r; +strrchr __PARAM__((const char* s, int c), (s, c)) __OTORP__(const char* s; int c;){ + const char* r; r = 0; do if (*s == c) r = s; while(*s++); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/strtod.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/strtod.c index 5713bd2e..b451067e 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/strtod.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/strtod.c @@ -103,7 +103,7 @@ NoN(strtod) extern __MANGLE__ double atof __PROTO__((const char*)); double -strtod __PARAM__((register const char* s, char** e), (s, e)) __OTORP__(register const char* s; char** e;){ +strtod __PARAM__((const char* s, char** e), (s, e)) __OTORP__(const char* s; char** e;){ double n; n = atof(s); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/strtol.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/strtol.c index 8240985a..f26df6c7 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/strtol.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/strtol.c @@ -106,9 +106,9 @@ NoN(strtol) #define MBASE ('z' - 'a' + 1 + 10) long -strtol __PARAM__((register const char* str, char** ptr, register int base), (str, ptr, base)) __OTORP__(register const char* str; char** ptr; register int base;){ - register long val; - register int c; +strtol __PARAM__((const char* str, char** ptr, int base), (str, ptr, base)) __OTORP__(const char* str; char** ptr; int base;){ + long val; + int c; int xx, neg = 0; if (ptr) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/tmpnam.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/tmpnam.c index 853287f7..a259a1ac 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/tmpnam.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/tmpnam.c @@ -112,8 +112,8 @@ static char buf[L_tmpnam]; static char seed[] = { 'a', 'a', 'a', 0 }; char* -tmpnam __PARAM__((register char* p), (p)) __OTORP__(register char* p;){ - register char* q; +tmpnam __PARAM__((char* p), (p)) __OTORP__(char* p;){ + char* q; if (!p) p = buf; strcopy(strcopy(strcopy(p, P_tmpdir), seed), "XXXXXX"); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/comp/waitpid.c b/cde/programs/dtksh/ksh93/src/lib/libast/comp/waitpid.c index b4336688..649a6d83 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/comp/waitpid.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/comp/waitpid.c @@ -157,9 +157,9 @@ struct zombie pid_t waitpid __PARAM__((pid_t pid, int* status, int flags), (pid, status, flags)) __OTORP__(pid_t pid; int* status; int flags;){ - register struct zombie* zp; - register struct zombie* pp; - register int p; + struct zombie* zp; + struct zombie* pp; + int p; int s; #if !_lib_wait2 && !_lib_wait3 #if !defined(SIGCLD) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/dir/getdents.c b/cde/programs/dtksh/ksh93/src/lib/libast/dir/getdents.c index 7cade7c4..627383be 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/dir/getdents.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/dir/getdents.c @@ -144,8 +144,8 @@ getdents __PARAM__((int fd, __V_* buf, size_t siz), (fd, buf, siz)) __OTORP__(in #else #if _lib_dirread { - register char* sp; /* system */ - register struct dirent* up; /* user */ + char* sp; /* system */ + struct dirent* up; /* user */ char* u; int n; int m; @@ -187,10 +187,10 @@ getdents __PARAM__((int fd, __V_* buf, size_t siz), (fd, buf, siz)) __OTORP__(in #define MAXREC roundof(sizeof(*up)-sizeof(up->d_name)+sizeof(sp->d_name)+1,8) - register struct direct* sp; /* system */ - register struct dirent* up; /* user */ - register char* s; - register char* u; + struct direct* sp; /* system */ + struct dirent* up; /* user */ + char* s; + char* u; int n; int m; char tmp[sizeof(sp->d_name) + 1]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/dir/opendir.c b/cde/programs/dtksh/ksh93/src/lib/libast/dir/opendir.c index d9fa8655..37eff2bc 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/dir/opendir.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/dir/opendir.c @@ -103,9 +103,9 @@ static const char id_dir[] = "\n@(#)directory (AT&T Bell Laboratories) 04/01/93\ static DIR* freedirp; /* always keep one dirp */ DIR* -opendir __PARAM__((register const char* path), (path)) __OTORP__(register const char* path;){ - register DIR* dirp = 0; - register int fd; +opendir __PARAM__((const char* path), (path)) __OTORP__(const char* path;){ + DIR* dirp = 0; + int fd; struct stat st; if ((fd = open(path, 0)) < 0) return(0); @@ -138,7 +138,7 @@ opendir __PARAM__((register const char* path), (path)) __OTORP__(register const } void -closedir __PARAM__((register DIR* dirp), (dirp)) __OTORP__(register DIR* dirp;){ +closedir __PARAM__((DIR* dirp), (dirp)) __OTORP__(DIR* dirp;){ if (dirp) { close(dirp->dd_fd); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/dir/readdir.c b/cde/programs/dtksh/ksh93/src/lib/libast/dir/readdir.c index ff2f932f..359cc183 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/dir/readdir.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/dir/readdir.c @@ -99,8 +99,8 @@ NoN(readdir) #else struct dirent* -readdir __PARAM__((register DIR* dirp), (dirp)) __OTORP__(register DIR* dirp;){ - register struct dirent* dp; +readdir __PARAM__((DIR* dirp), (dirp)) __OTORP__(DIR* dirp;){ + struct dirent* dp; for (;;) { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/dir/seekdir.c b/cde/programs/dtksh/ksh93/src/lib/libast/dir/seekdir.c index 187cea1a..8f3c55fb 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/dir/seekdir.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/dir/seekdir.c @@ -99,7 +99,7 @@ NoN(seekdir) #else void -seekdir __PARAM__((register DIR* dirp, long loc), (dirp, loc)) __OTORP__(register DIR* dirp; long loc;){ +seekdir __PARAM__((DIR* dirp, long loc), (dirp, loc)) __OTORP__(DIR* dirp; long loc;){ off_t base; /* file location of block */ off_t offset; /* offset within block */ diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/disc/sfkeyprintf.c b/cde/programs/dtksh/ksh93/src/lib/libast/disc/sfkeyprintf.c index 77d2bccb..78dcf356 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/disc/sfkeyprintf.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/disc/sfkeyprintf.c @@ -134,12 +134,12 @@ typedef union #define initfield(f,s) ((f)->first = (f)->delimiter = *((f)->next = (s))) static char* -getfield __PARAM__((register Field_t* f, int restore), (f, restore)) __OTORP__(register Field_t* f; int restore;){ - register char* s; - register int n; - register int c; - register int lp; - register int rp; +getfield __PARAM__((Field_t* f, int restore), (f, restore)) __OTORP__(Field_t* f; int restore;){ + char* s; + int n; + int c; + int lp; + int rp; char* b; if (!f->delimiter) @@ -414,7 +414,7 @@ int aha = *f.next; int sfkeyprintf __PARAM__((Sfio_t* sp, __V_* handle, const char* format, Sf_key_lookup_t lookup, Sf_key_convert_t convert), (sp, handle, format, lookup, convert)) __OTORP__(Sfio_t* sp; __V_* handle; const char* format; Sf_key_lookup_t lookup; Sf_key_convert_t convert;){ - register int i; + int i; for (i = 0; i < elementsof(state.tmp); i++) if (!state.tmp[i] && !(state.tmp[i] = sfstropen())) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/feature/align.c b/cde/programs/dtksh/ksh93/src/lib/libast/feature/align.c index 1ff542e2..6e73263c 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/feature/align.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/feature/align.c @@ -118,9 +118,9 @@ extern __MANGLE__ int printf __PROTO__((const char*, ...)); main() { - register int i; - register int j; - register int k; + int i; + int j; + int k; int align0; int align1; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/feature/botch.c b/cde/programs/dtksh/ksh93/src/lib/libast/feature/botch.c index 356d8b78..f9d49eff 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/feature/botch.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/feature/botch.c @@ -111,7 +111,7 @@ main() #if _lib_getgroups if (sizeof(gid_t) < sizeof(int)) { - register int n; + int n; gid_t groups[32 * sizeof(int) / sizeof(gid_t)]; for (n = 0; n < sizeof(int) / sizeof(gid_t); n++) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/feature/int.c b/cde/programs/dtksh/ksh93/src/lib/libast/feature/int.c index 1a8ed9bc..b87620e7 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/feature/int.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/feature/int.c @@ -132,9 +132,9 @@ static int size[] = { 1, 2, 4, 8 }; main() { - register int t; - register int s; - register int m = 1; + int t; + int s; + int m = 1; for (s = 0; s < elementsof(size); s++) { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/feature/limits.c b/cde/programs/dtksh/ksh93/src/lib/libast/feature/limits.c index 3fa90eb8..3b8b149a 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/feature/limits.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/feature/limits.c @@ -154,8 +154,8 @@ static char* cmd[] = { "/bin/echo", 0 }; main() { - register int i; - register int n; + int i; + int n; char c; unsigned char uc; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/feature/signal.c b/cde/programs/dtksh/ksh93/src/lib/libast/feature/signal.c index 3daa159c..62dd3900 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/feature/signal.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/feature/signal.c @@ -258,9 +258,9 @@ extern __MANGLE__ int printf __PROTO__((const char*, ...)); main() { - register int i; - register int j; - register int k; + int i; + int j; + int k; k = 0; for (i = 0; map[i].name; i++) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/features/align.c b/cde/programs/dtksh/ksh93/src/lib/libast/features/align.c index 770df7a6..787f62d0 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/features/align.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/features/align.c @@ -110,9 +110,9 @@ extern __MANGLE__ int printf __PROTO__((const char*, ...)); main() { - register int i; - register int j; - register int k; + int i; + int j; + int k; int align0; int align1; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/features/botch.c b/cde/programs/dtksh/ksh93/src/lib/libast/features/botch.c index 00778253..23071861 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/features/botch.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/features/botch.c @@ -103,7 +103,7 @@ main() #if _lib_getgroups if (sizeof(gid_t) < sizeof(int)) { - register int n; + int n; gid_t groups[32 * sizeof(int) / sizeof(gid_t)]; for (n = 0; n < sizeof(int) / sizeof(gid_t); n++) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/features/int.c b/cde/programs/dtksh/ksh93/src/lib/libast/features/int.c index fecbd96e..df24d74c 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/features/int.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/features/int.c @@ -124,9 +124,9 @@ static int size[] = { 1, 2, 4, 8 }; main() { - register int t; - register int s; - register int m = 1; + int t; + int s; + int m = 1; for (s = 0; s < elementsof(size); s++) { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/features/limits.c b/cde/programs/dtksh/ksh93/src/lib/libast/features/limits.c index afb20d6c..9794c4c0 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/features/limits.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/features/limits.c @@ -121,8 +121,8 @@ extern __MANGLE__ int printf __PROTO__((const char*, ...)); main() { - register int i; - register int n; + int i; + int n; char c; unsigned char uc; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/features/signal.c b/cde/programs/dtksh/ksh93/src/lib/libast/features/signal.c index a014fc89..2906bfed 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/features/signal.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/features/signal.c @@ -280,9 +280,9 @@ extern __MANGLE__ int printf __PROTO__((const char*, ...)); main() { - register int i; - register int j; - register int k; + int i; + int j; + int k; int n; k = 0; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashalloc.c b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashalloc.c index 0253673f..3f5e0ae8 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashalloc.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashalloc.c @@ -110,9 +110,9 @@ Hash_info_t hash_info = { 0 }; Hash_table_t* hashalloc __PARAM__((Hash_table_t* ref, ...), (va_alist)) __OTORP__(va_dcl) { __OTORP__(Hash_table_t* ref; ) - register Hash_table_t* tab; - register Hash_table_t* ret = 0; - register int internal; + Hash_table_t* tab; + Hash_table_t* ret = 0; + int internal; int n; va_list ap; va_list va[4]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashdump.c b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashdump.c index 68635a91..acece655 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashdump.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashdump.c @@ -97,7 +97,7 @@ */ static void -dumpflags __PARAM__((register int flags), (flags)) __OTORP__(register int flags;){ +dumpflags __PARAM__((int flags), (flags)) __OTORP__(int flags;){ if (flags & HASH_ALLOCATE) sfprintf(sfstderr, "allocate "); if (flags & HASH_BUCKET) sfprintf(sfstderr, "bucket "); if (flags & HASH_FIXED) sfprintf(sfstderr, "fixed "); @@ -113,9 +113,9 @@ dumpflags __PARAM__((register int flags), (flags)) __OTORP__(register int flags; */ static void -dumpbucket __PARAM__((register Hash_table_t* tab, int flags), (tab, flags)) __OTORP__(register Hash_table_t* tab; int flags;){ - register Hash_bucket_t** sp; - register Hash_bucket_t* b; +dumpbucket __PARAM__((Hash_table_t* tab, int flags), (tab, flags)) __OTORP__(Hash_table_t* tab; int flags;){ + Hash_bucket_t** sp; + Hash_bucket_t* b; Hash_bucket_t** sx; int n; unsigned char* s; @@ -163,7 +163,7 @@ dumpbucket __PARAM__((register Hash_table_t* tab, int flags), (tab, flags)) __OT */ static void -dumptable __PARAM__((register Hash_table_t* tab, register int flags), (tab, flags)) __OTORP__(register Hash_table_t* tab; register int flags;){ +dumptable __PARAM__((Hash_table_t* tab, int flags), (tab, flags)) __OTORP__(Hash_table_t* tab; int flags;){ Hash_table_t* scope; int level; @@ -192,8 +192,8 @@ dumptable __PARAM__((register Hash_table_t* tab, register int flags), (tab, flag */ static void -dumproot __PARAM__((register Hash_root_t* root, register int flags), (root, flags)) __OTORP__(register Hash_root_t* root; register int flags;){ - register Hash_table_t* tab; +dumproot __PARAM__((Hash_root_t* root, int flags), (root, flags)) __OTORP__(Hash_root_t* root; int flags;){ + Hash_table_t* tab; sfprintf(sfstderr, " root\n"); sfprintf(sfstderr, " address: 0x%08lx\n", (unsigned long)root); @@ -221,8 +221,8 @@ dumproot __PARAM__((register Hash_root_t* root, register int flags), (root, flag */ void -hashdump __PARAM__((register Hash_table_t* tab, int flags), (tab, flags)) __OTORP__(register Hash_table_t* tab; int flags;){ - register Hash_root_t* root; +hashdump __PARAM__((Hash_table_t* tab, int flags), (tab, flags)) __OTORP__(Hash_table_t* tab; int flags;){ + Hash_root_t* root; sfprintf(sfstderr, "\nhash table information:\n\n"); if (tab) dumproot(tab->root, flags); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashfree.c b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashfree.c index 9f5471de..1df5d35f 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashfree.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashfree.c @@ -100,10 +100,10 @@ */ Hash_table_t* -hashfree __PARAM__((register Hash_table_t* tab), (tab)) __OTORP__(register Hash_table_t* tab;){ - register Hash_bucket_t** sp; - register Hash_bucket_t* b; - register Hash_bucket_t* p; +hashfree __PARAM__((Hash_table_t* tab), (tab)) __OTORP__(Hash_table_t* tab;){ + Hash_bucket_t** sp; + Hash_bucket_t* b; + Hash_bucket_t* p; Hash_bucket_t** sx; Hash_root_t* rp; Hash_table_t* tp; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashlib.h b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashlib.h index d4ae2a5a..7a8cb718 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashlib.h +++ b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashlib.h @@ -162,11 +162,11 @@ typedef struct /* root local pointers */ #define HASH(r,n,h) if (r->local->hash) h = r->namesize ? (*r->local->hash)(n, r->namesize) : (*r->local->hash)(n);\ else\ {\ - register const char* _hash_s1 = n;\ + const char* _hash_s1 = n;\ h = 0;\ if (r->namesize)\ {\ - register const char* _hash_s2 = _hash_s1 + r->namesize;\ + const char* _hash_s2 = _hash_s1 + r->namesize;\ while (_hash_s1 < _hash_s2) HASHPART(h, *_hash_s1++);\ }\ else while (*_hash_s1) HASHPART(h, *_hash_s1++);\ diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashlook.c b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashlook.c index 11952d33..96b6ad83 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashlook.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashlook.c @@ -97,19 +97,19 @@ */ char* -hashlook __PARAM__((register Hash_table_t* tab, const char* name, long flags, const char* value), (tab, name, flags, value)) __OTORP__(register Hash_table_t* tab; const char* name; long flags; const char* value;){ - register Hash_bucket_t* b; - register unsigned int n; - register Hash_last_t* last; +hashlook __PARAM__((Hash_table_t* tab, const char* name, long flags, const char* value), (tab, name, flags, value)) __OTORP__(Hash_table_t* tab; const char* name; long flags; const char* value;){ + Hash_bucket_t* b; + unsigned int n; + Hash_last_t* last; Hash_table_t* top; Hash_bucket_t* prev; unsigned int i; if ((flags & (HASH_LOOKUP|HASH_INTERNAL)) == (HASH_LOOKUP|HASH_INTERNAL)) { - register char* s1; - register const char* s2; - register int c; + char* s1; + const char* s2; + int c; if (flags & HASH_HASHED) n = *((unsigned int*)value); else @@ -166,12 +166,12 @@ hashlook __PARAM__((register Hash_table_t* tab, const char* name, long flags, co { if (!tab->root->local->compare) { - register char* s1 = hashname(b); - register const char* s2 = name; + char* s1 = hashname(b); + const char* s2 = name; if (tab->root->namesize) { - register char* s3 = s1 + tab->root->namesize; + char* s3 = s1 + tab->root->namesize; while (*s1++ == *s2++) if (s1 >= s3) goto found; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashscan.c b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashscan.c index 53b438f8..8c3a1d50 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashscan.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashscan.c @@ -107,8 +107,8 @@ */ Hash_position_t* -hashscan __PARAM__((register Hash_table_t* tab, register int flags), (tab, flags)) __OTORP__(register Hash_table_t* tab; register int flags;){ - register Hash_position_t* pos; +hashscan __PARAM__((Hash_table_t* tab, int flags), (tab, flags)) __OTORP__(Hash_table_t* tab; int flags;){ + Hash_position_t* pos; static Hash_bucket_t empty; @@ -122,12 +122,12 @@ hashscan __PARAM__((register Hash_table_t* tab, register int flags), (tab, flags pos->flags = HASH_SCOPE; do { - register Hash_bucket_t* b; + Hash_bucket_t* b; if (tab->flags & HASH_SCANNING) { - register Hash_bucket_t** sp = tab->table; - register Hash_bucket_t** sx = tab->table + tab->size; + Hash_bucket_t** sp = tab->table; + Hash_bucket_t** sx = tab->table + tab->size; while (sp < sx) for (b = *sp++; b; b = b->next) @@ -147,8 +147,8 @@ hashscan __PARAM__((register Hash_table_t* tab, register int flags), (tab, flags */ Hash_bucket_t* -hashnext __PARAM__((register Hash_position_t* pos), (pos)) __OTORP__(register Hash_position_t* pos;){ - register Hash_bucket_t* b; +hashnext __PARAM__((Hash_position_t* pos), (pos)) __OTORP__(Hash_position_t* pos;){ + Hash_bucket_t* b; if (!pos) return(hash_info.last = pos->tab->root->last.bucket = 0); b = pos->bucket; @@ -173,7 +173,7 @@ hashnext __PARAM__((register Hash_position_t* pos), (pos)) __OTORP__(register Ha if (!(b->hash & HASH_DELETED) && (!(pos->tab->flags & HASH_VALUE) || b->value) && (!pos->flags || !(b->hash & (HASH_HIDDEN|HASH_HIDES)))) break; if (b->hash & HASH_HIDES) { - register Hash_bucket_t* h = (Hash_bucket_t*)b->name; + Hash_bucket_t* h = (Hash_bucket_t*)b->name; if (!(h->hash & HASH_HIDDEN)) { @@ -191,7 +191,7 @@ hashnext __PARAM__((register Hash_position_t* pos), (pos)) __OTORP__(register Ha */ void -hashdone __PARAM__((register Hash_position_t* pos), (pos)) __OTORP__(register Hash_position_t* pos;){ +hashdone __PARAM__((Hash_position_t* pos), (pos)) __OTORP__(Hash_position_t* pos;){ if (pos) { if (pos->tab->flags & HASH_SCANNING) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashsize.c b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashsize.c index 951cc6d0..de1d48d6 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashsize.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashsize.c @@ -98,11 +98,11 @@ */ void -hashsize __PARAM__((register Hash_table_t* tab, int size), (tab, size)) __OTORP__(register Hash_table_t* tab; int size;){ - register Hash_bucket_t** old_s; - register Hash_bucket_t** new_s; - register Hash_bucket_t* old_b; - register Hash_bucket_t* new_b; +hashsize __PARAM__((Hash_table_t* tab, int size), (tab, size)) __OTORP__(Hash_table_t* tab; int size;){ + Hash_bucket_t** old_s; + Hash_bucket_t** new_s; + Hash_bucket_t* old_b; + Hash_bucket_t* new_b; Hash_bucket_t** old_sx; unsigned int index; HASHregion region; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashwalk.c b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashwalk.c index aad0e51a..d6e2751a 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashwalk.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/hash/hashwalk.c @@ -98,8 +98,8 @@ int hashwalk __PARAM__((Hash_table_t* tab, int flags, register(*walker)(const char*, char*, __V_*), __V_* handle), (tab, flags, walker, handle)) __OTORP__(Hash_table_t* tab; int flags; register(*walker)(); __V_* handle;){ - register Hash_bucket_t* b; - register int v; + Hash_bucket_t* b; + int v; Hash_position_t* pos; if (!(pos = hashscan(tab, flags))) return(-1); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/hash/memhash.c b/cde/programs/dtksh/ksh93/src/lib/libast/hash/memhash.c index cbac67f3..c2785eaa 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/hash/memhash.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/hash/memhash.c @@ -98,9 +98,9 @@ unsigned int memhash __PARAM__((const __V_* as, int n), (as, n)) __OTORP__(const __V_* as; int n;){ - register const unsigned char* s = (const unsigned char*)as; - register const unsigned char* e = s + n; - register unsigned int c = 0; + const unsigned char* s = (const unsigned char*)as; + const unsigned char* e = s + n; + unsigned int c = 0; while (s < e) HASHPART(c, *s++); return(c); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/hash/memsum.c b/cde/programs/dtksh/ksh93/src/lib/libast/hash/memsum.c index e674456c..d964f20f 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/hash/memsum.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/hash/memsum.c @@ -102,9 +102,9 @@ */ unsigned long -memsum __PARAM__((const __V_* ap, int n, register unsigned long c), (ap, n, c)) __OTORP__(const __V_* ap; int n; register unsigned long c;){ - register const unsigned char* p = (const unsigned char*)ap; - register const unsigned char* e = p + n; +memsum __PARAM__((const __V_* ap, int n, unsigned long c), (ap, n, c)) __OTORP__(const __V_* ap; int n; unsigned long c;){ + const unsigned char* p = (const unsigned char*)ap; + const unsigned char* e = p + n; while (p < e) HASHPART(c, *p++); #if LONG_MAX > 2147483647 diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/hash/strhash.c b/cde/programs/dtksh/ksh93/src/lib/libast/hash/strhash.c index fe65a10f..1eb1ca03 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/hash/strhash.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/hash/strhash.c @@ -98,9 +98,9 @@ unsigned int strhash __PARAM__((const char* as), (as)) __OTORP__(const char* as;){ - register const unsigned char* s = (const unsigned char*)as; - register unsigned int i = 0; - register unsigned int c; + const unsigned char* s = (const unsigned char*)as; + unsigned int i = 0; + unsigned int c; while (c = *s++) HASHPART(i, c); return(i); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/hash/strsum.c b/cde/programs/dtksh/ksh93/src/lib/libast/hash/strsum.c index 2652e54a..b76c1b1d 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/hash/strsum.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/hash/strsum.c @@ -102,9 +102,9 @@ */ unsigned long -strsum __PARAM__((const char* as, register unsigned long c), (as, c)) __OTORP__(const char* as; register unsigned long c;){ - register const unsigned char* s = (const unsigned char*)as; - register int n; +strsum __PARAM__((const char* as, unsigned long c), (as, c)) __OTORP__(const char* as; unsigned long c;){ + const unsigned char* s = (const unsigned char*)as; + int n; while (n = *s++) HASHPART(c, n); #if LONG_MAX > 2147483647 diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/calloc.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/calloc.c index 9e63ba24..32197c92 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/calloc.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/calloc.c @@ -103,10 +103,10 @@ #undef calloc __V_* -calloc __PARAM__((register size_t count, register size_t size), (count, size)) __OTORP__(register size_t count; register size_t size;) +calloc __PARAM__((size_t count, size_t size), (count, size)) __OTORP__(size_t count; size_t size;) #line 15 { - register __V_* ptr; + __V_* ptr; if (ptr = malloc(size *= count)) memzero(ptr, size); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdclose.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdclose.c index 70d19d5c..4518a1f4 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdclose.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdclose.c @@ -104,10 +104,10 @@ #include int -cmdclose __PARAM__((register int fd), (fd)) __OTORP__(register int fd;) +cmdclose __PARAM__((int fd), (fd)) __OTORP__(int fd;) #line 17 { - register struct cmdinfo* cmd; + struct cmdinfo* cmd; int status = -1; for (cmd = cmds; cmd; cmd = cmd->next) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdkill.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdkill.c index 2efa2895..65ef2e50 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdkill.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdkill.c @@ -102,10 +102,10 @@ #include "cmdlib.h" int -cmdkill __PARAM__((register int fd, int sig), (fd, sig)) __OTORP__(register int fd; int sig;) +cmdkill __PARAM__((int fd, int sig), (fd, sig)) __OTORP__(int fd; int sig;) #line 13 { - register struct cmdinfo* cmd; + struct cmdinfo* cmd; for (cmd = cmds; cmd; cmd = cmd->next) if (cmd->fd == fd) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdopen.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdopen.c index bca3015d..6cd9006b 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdopen.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/cmdopen.c @@ -150,7 +150,7 @@ static const Namval_t options[] = */ static int -setopt __PARAM__((register __V_* a, register const __V_* p, register int n, const char* v), (a, p, n, v)) __OTORP__(register __V_* a; register const __V_* p; register int n; const char* v;) +setopt __PARAM__((__V_* a, const __V_* p, int n, const char* v), (a, p, n, v)) __OTORP__(__V_* a; const __V_* p; int n; const char* v;) #line 66 { NoP(v); @@ -208,9 +208,9 @@ int cmdopen __PARAM__((const char* cmd, char** argv, char** envv, int* redv, const char* mode), (cmd, argv, envv, redv, mode)) __OTORP__(const char* cmd; char** argv; char** envv; int* redv; const char* mode;) #line 119 { - register struct cmdinfo* proc; - register int cmdfd = -1; - register char** p; + struct cmdinfo* proc; + int cmdfd = -1; + char** p; char** v; int* r; int flags = 0; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/error.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/error.c index 53b2c1c3..b388bc84 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/error.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/error.c @@ -136,7 +136,7 @@ static const Namval_t options[] = */ static int -setopt __PARAM__((__V_* a, const __V_* p, register int n, register const char* v), (a, p, n, v)) __OTORP__(__V_* a; const __V_* p; register int n; register const char* v;){ +setopt __PARAM__((__V_* a, const __V_* p, int n, const char* v), (a, p, n, v)) __OTORP__(__V_* a; const __V_* p; int n; const char* v;){ NoP(a); if (p) switch (((Namval_t*)p)->value) { @@ -192,8 +192,8 @@ setopt __PARAM__((__V_* a, const __V_* p, register int n, register const char* v */ static void -print __PARAM__((register Sfio_t* sp, register char* name, char* delim), (sp, name, delim)) __OTORP__(register Sfio_t* sp; register char* name; char* delim;){ - register int c; +print __PARAM__((Sfio_t* sp, char* name, char* delim), (sp, name, delim)) __OTORP__(Sfio_t* sp; char* name; char* delim;){ + int c; while (c = *name++) { @@ -217,7 +217,7 @@ print __PARAM__((register Sfio_t* sp, register char* name, char* delim), (sp, na */ static void -context __PARAM__((register Sfio_t* sp, register Error_context_t* cp), (sp, cp)) __OTORP__(register Sfio_t* sp; register Error_context_t* cp;){ +context __PARAM__((Sfio_t* sp, Error_context_t* cp), (sp, cp)) __OTORP__(Sfio_t* sp; Error_context_t* cp;){ if (cp->context) context(sp, cp->context); if (!(cp->flags & ERROR_SILENT)) { @@ -243,7 +243,7 @@ error __PARAM__((int level, ...), (va_alist)) __OTORP__(va_dcl) void errorv __PARAM__((const char* lib, int level, va_list ap), (lib, level, ap)) __OTORP__(const char* lib; int level; va_list ap;){ - register int n; + int n; int fd; int flags; char* s; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/fastfind.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/fastfind.c index 6d7357dc..6be2feeb 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/fastfind.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/fastfind.c @@ -115,11 +115,11 @@ typedef struct __V_* findopen __PARAM__((const char* pattern), (pattern)) __OTORP__(const char* pattern;){ - register Find_t* fp; - register char* p; - register char* s; - register char* b; - register int i; + Find_t* fp; + char* p; + char* s; + char* b; + int i; int brace = 0; int paren = 0; @@ -216,7 +216,7 @@ findopen __PARAM__((const char* pattern), (pattern)) __OTORP__(const char* patte void findclose __PARAM__((__V_* handle), (handle)) __OTORP__(__V_* handle;){ - register Find_t* fp = (Find_t*)handle; + Find_t* fp = (Find_t*)handle; sfclose(fp->fp); free(fp); @@ -229,12 +229,12 @@ findclose __PARAM__((__V_* handle), (handle)) __OTORP__(__V_* handle;){ char* findnext __PARAM__((__V_* handle), (handle)) __OTORP__(__V_* handle;){ - register Find_t* fp = (Find_t*)handle; - register char* p; - register char* q; - register char* s; - register char* b; - register int c; + Find_t* fp = (Find_t*)handle; + char* p; + char* q; + char* s; + char* b; + int c; int n; for (c = fp->peek; c != EOF;) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/fs3d.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/fs3d.c index 87037e16..7a81b700 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/fs3d.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/fs3d.c @@ -94,9 +94,9 @@ #include int -fs3d __PARAM__((register int op), (op)) __OTORP__(register int op;){ - register int cur; - register char* v; +fs3d __PARAM__((int op), (op)) __OTORP__(int op;){ + int cur; + char* v; char val[sizeof(FS3D_off) + 8]; static int fsview; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/ftwalk.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/ftwalk.c index d4ff5cb9..0de74d62 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/ftwalk.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/ftwalk.c @@ -122,9 +122,9 @@ static Ftw_t *Free; #define freeFtw(f) ((f)->link = Free, Free = (f)) -static Ftw_t *newFtw __PARAM__((register char* name, register int namelen), (name, namelen)) __OTORP__(register char* name; register int namelen;){ - register Ftw_t *f; - register int amount; +static Ftw_t *newFtw __PARAM__((char* name, int namelen), (name, namelen)) __OTORP__(char* name; int namelen;){ + Ftw_t *f; + int amount; if(Free && namelen < MINNAME) f = Free, Free = f->link; @@ -144,9 +144,9 @@ static Ftw_t *newFtw __PARAM__((register char* name, register int namelen), (nam return f; } -static int freeAll __PARAM__((register Ftw_t* f, register int rv), (f, rv)) __OTORP__(register Ftw_t* f; register int rv;){ - register Ftw_t *next; - register int freeing; +static int freeAll __PARAM__((Ftw_t* f, int rv), (f, rv)) __OTORP__(Ftw_t* f; int rv;){ + Ftw_t *next; + int freeing; for(freeing = 0; freeing < 2; ++freeing) { @@ -165,8 +165,8 @@ static int freeAll __PARAM__((register Ftw_t* f, register int rv), (f, rv)) __OT /* To compare directories by device/inode. */ -static int statcmp __PARAM__((register Ftw_t* f1, register Ftw_t* f2), (f1, f2)) __OTORP__(register Ftw_t* f1; register Ftw_t* f2;){ - register int d; +static int statcmp __PARAM__((Ftw_t* f1, Ftw_t* f2), (f1, f2)) __OTORP__(Ftw_t* f1; Ftw_t* f2;){ + int d; if((d = f1->statb.st_ino - f2->statb.st_ino) != 0) return d; if((d = f1->statb.st_dev - f2->statb.st_dev) != 0) @@ -182,9 +182,9 @@ static int statcmp __PARAM__((register Ftw_t* f1, register Ftw_t* f2), (f1, f2)) #define RROTATE(r) (t = r->left, r->left = t->right, t->right = r, r = t) #define LROTATE(r) (t = r->right, r->right = t->left, t->left = r, r = t) -static Ftw_t *search __PARAM__((register Ftw_t* e, register Ftw_t* root, int(*comparf)(Ftw_t*, Ftw_t*), int insert), (e, root, comparf, insert)) __OTORP__(register Ftw_t* e; register Ftw_t* root; int(*comparf)(); int insert;){ - register int cmp; - register Ftw_t *t, *left, *right, *lroot, *rroot; +static Ftw_t *search __PARAM__((Ftw_t* e, Ftw_t* root, int(*comparf)(Ftw_t*, Ftw_t*), int insert), (e, root, comparf, insert)) __OTORP__(Ftw_t* e; Ftw_t* root; int(*comparf)(); int insert;){ + int cmp; + Ftw_t *t, *left, *right, *lroot, *rroot; left = right = lroot = rroot = 0; while(root) @@ -247,8 +247,8 @@ static Ftw_t *search __PARAM__((register Ftw_t* e, register Ftw_t* root, int(*co /* ** Delete the root element from the tree */ -static Ftw_t *deleteroot __PARAM__((register Ftw_t* root), (root)) __OTORP__(register Ftw_t* root;){ - register Ftw_t *t, *left, *right; +static Ftw_t *deleteroot __PARAM__((Ftw_t* root), (root)) __OTORP__(Ftw_t* root;){ + Ftw_t *t, *left, *right; left = root->left; right = root->right; @@ -267,7 +267,7 @@ static Ftw_t *deleteroot __PARAM__((register Ftw_t* root), (root)) __OTORP__(reg /* Convert a binary search tree into a sorted todo (link) list */ -static void getlist __PARAM__((register Ftw_t** top, register Ftw_t** bot, register Ftw_t* root), (top, bot, root)) __OTORP__(register Ftw_t** top; register Ftw_t** bot; register Ftw_t* root;){ +static void getlist __PARAM__((Ftw_t** top, Ftw_t** bot, Ftw_t* root), (top, bot, root)) __OTORP__(Ftw_t** top; Ftw_t** bot; Ftw_t* root;){ if(root->left) getlist(top,bot,root->left); if (*top) (*bot)->link = root, *bot = root; @@ -279,8 +279,8 @@ static void getlist __PARAM__((register Ftw_t** top, register Ftw_t** bot, regis /* Set directory when curdir is lost in space */ -static int setdir __PARAM__((register char* home, register char* path), (home, path)) __OTORP__(register char* home; register char* path;){ - register int cdrv; +static int setdir __PARAM__((char* home, char* path), (home, path)) __OTORP__(char* home; char* path;){ + int cdrv; if(path[0] == '/') cdrv = pathcd(path,NiL); @@ -298,8 +298,8 @@ static int setdir __PARAM__((register char* home, register char* path), (home, p /* Set to parent dir */ -static int setpdir __PARAM__((register char* home, register char* path, register char* base), (home, path, base)) __OTORP__(register char* home; register char* path; register char* base;){ - register int cdrv, c; +static int setpdir __PARAM__((char* home, char* path, char* base), (home, path, base)) __OTORP__(char* home; char* path; char* base;){ + int cdrv, c; if(base > path) { @@ -315,9 +315,9 @@ static int setpdir __PARAM__((register char* home, register char* path, register /* Pop a set of directories */ -static int popdirs __PARAM__((register int n_dir, register Ftw_t* ftw), (n_dir, ftw)) __OTORP__(register int n_dir; register Ftw_t* ftw;){ +static int popdirs __PARAM__((int n_dir, Ftw_t* ftw), (n_dir, ftw)) __OTORP__(int n_dir; Ftw_t* ftw;){ struct stat sb; - register char *s, *endbuf; + char *s, *endbuf; char buf[PATH_MAX]; if(!ftw || ftw->level < 0) @@ -340,11 +340,11 @@ static int popdirs __PARAM__((register int n_dir, register Ftw_t* ftw), (n_dir, /* Get top list of elt to process */ -static Ftw_t *toplist __PARAM__((register char** paths, int(*statf)(const char*, struct stat*),int(*comparf)(Ftw_t*, Ftw_t*), int metaphysical), (paths, statf, comparf, metaphysical)) __OTORP__(register char** paths; int(*statf)();int(*comparf)(); int metaphysical;){ - register char *path; - register Ftw_t *f, *root; +static Ftw_t *toplist __PARAM__((char** paths, int(*statf)(const char*, struct stat*),int(*comparf)(Ftw_t*, Ftw_t*), int metaphysical), (paths, statf, comparf, metaphysical)) __OTORP__(char** paths; int(*statf)();int(*comparf)(); int metaphysical;){ + char *path; + Ftw_t *f, *root; Ftw_t *top, *bot; - register struct stat *sb; + struct stat *sb; struct stat st; top = bot = root = 0; @@ -389,9 +389,9 @@ static Ftw_t *toplist __PARAM__((register char** paths, int(*statf)(const char*, Note that free() is not used because we may need to chdir(home) if there isn't enough space to continue */ -static int resize __PARAM__((register char** home, register char** endbuf, register char** path, register char** base, int n_buf, int incre), (home, endbuf, path, base, n_buf, incre)) __OTORP__(register char** home; register char** endbuf; register char** path; register char** base; int n_buf; int incre;){ - register char *old, *newp; - register int n_old; +static int resize __PARAM__((char** home, char** endbuf, char** path, char** base, int n_buf, int incre), (home, endbuf, path, base, n_buf, incre)) __OTORP__(char** home; char** endbuf; char** path; char** base; int n_buf; int incre;){ + char *old, *newp; + int n_old; /* add space for "/." used in testing FTW_DNX */ n_old = n_buf; @@ -418,7 +418,7 @@ static int resize __PARAM__((register char** home, register char** endbuf, regis */ ftwalk __PARAM__((const char *cpath, int (*userf)(Ftw_t*), int flags, int (*comparf)(Ftw_t*, Ftw_t*)), (cpath, userf, flags, comparf)) __OTORP__(const char *cpath; int (*userf)(); int flags; int (*comparf)();){ char *path = (char*)cpath; - register int cdrv; /* chdir value */ + int cdrv; /* chdir value */ int fnrv; /* return value from user function */ Ftw_t topf, /* the parent of top elt */ *todo, *top, *bot; @@ -478,14 +478,14 @@ ftwalk __PARAM__((const char *cpath, int (*userf)(Ftw_t*), int flags, int (*comp dirfp = 0; while(todo) { - register int i, nd; - register Ftw_t *ftw, *f; - register struct stat *sb; - register char *name, *endbase; + int i, nd; + Ftw_t *ftw, *f; + struct stat *sb; + char *name, *endbase; Ftw_t *link, *root, *curdir, *diroot, *dotdot; struct dirent *dir; char *base; - register int level, n_base, nostat, cpname; + int level, n_base, nostat, cpname; /* process the top object on the stack */ ftw = todo; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/ftwflags.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/ftwflags.c index 0941d873..b9b5fd1c 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/ftwflags.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/ftwflags.c @@ -95,7 +95,7 @@ int ftwflags __PARAM__((void), ()){ - register char* s; + char* s; s = astconf("PATH_RESOLVE", NiL, NiL); if (streq(s, "physical")) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/getcwd.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/getcwd.c index 3d277c07..fab40aba 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/getcwd.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/getcwd.c @@ -111,8 +111,8 @@ struct dirlist /* long path chdir(2) component */ */ static int -popdir __PARAM__((register struct dirlist* d, register char* end), (d, end)) __OTORP__(register struct dirlist* d; register char* end;){ - register struct dirlist* dp; +popdir __PARAM__((struct dirlist* d, char* end), (d, end)) __OTORP__(struct dirlist* d; char* end;){ + struct dirlist* dp; int v; v = 0; @@ -135,8 +135,8 @@ popdir __PARAM__((register struct dirlist* d, register char* end), (d, end)) __O */ static struct dirlist* -pushdir __PARAM__((register struct dirlist* d, char* dots, char* path, char* end), (d, dots, path, end)) __OTORP__(register struct dirlist* d; char* dots; char* path; char* end;){ - register struct dirlist* p; +pushdir __PARAM__((struct dirlist* d, char* dots, char* path, char* end), (d, dots, path, end)) __OTORP__(struct dirlist* d; char* dots; char* path; char* end;){ + struct dirlist* p; if (!(p = newof(0, struct dirlist, 1, 0)) || chdir(dots)) { @@ -162,9 +162,9 @@ pushdir __PARAM__((register struct dirlist* d, char* dots, char* path, char* end char* getcwd __PARAM__((char* buf, size_t len), (buf, len)) __OTORP__(char* buf; size_t len;){ - register char* d; - register char* p; - register char* s; + char* d; + char* p; + char* s; DIR* dirp = 0; int n; int x; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/getpath.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/getpath.c index 2b705e05..42f1d92f 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/getpath.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/getpath.c @@ -104,7 +104,7 @@ char* getpath __PARAM__((void), ()) #line 13 { - register char* s; + char* s; if (!(s = getenv("PATH")) || !*s) s = ":/bin:/usr/bin:/usr/ucb"; return(s); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/getshell.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/getshell.c index bfb628fc..bc02c4c6 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/getshell.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/getshell.c @@ -118,9 +118,9 @@ char* getshell __PARAM__((void), ()) #line 28 { - register char* s; - register char* sh; - register int i; + char* s; + char* sh; + int i; if ((sh = getenv("SHELL")) && *sh == '/' && strmatch(sh, "*/(sh|*[!cC]sh)")) { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/getsymlink.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/getsymlink.c index 00e6dd70..17c3eacc 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/getsymlink.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/getsymlink.c @@ -127,10 +127,10 @@ getsymlink __PARAM__((const char* name, char* buf, int siz), (name, buf, siz)) _ #ifdef UNIV_MAX if (isspace(*buf)) { - register char* s; - register char* t; - register char* u; - register char* v; + char* s; + char* t; + char* u; + char* v; int match = 0; char tmp[PATH_MAX]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/getuniv.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/getuniv.c index f04477b5..228a5b7b 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/getuniv.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/getuniv.c @@ -112,16 +112,16 @@ getuniv __PARAM__((void), ()) return(getuniverse(buf) < 0 ? 0 : buf); #else #ifndef UNIV_MAX - register char* u; - register char* p; + char* u; + char* p; if (!(u = getenv(univ_env)) || !*u) { u = _UNIV_DEFAULT; if (p = getenv("PATH")) { - register int r = 1; - register char* d = p; + int r = 1; + char* d = p; int offset = staktell(); for (;;) @@ -180,7 +180,7 @@ getuniv __PARAM__((void), ()) return(buf); #else #if defined(ATT_UNIV) || defined(U_GET) - register int n; + int n; #if defined(ATT_UNIV) if ((n = setuniverse(ATT_UNIV)) < 0) return(0); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/hsort.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/hsort.c index 46599db3..161531d7 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/hsort.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/hsort.c @@ -102,10 +102,10 @@ void hsort __PARAM__((char** argv, int n, int(*fn)(const char*, const char*)), (argv, n, fn)) __OTORP__(char** argv; int n; int(*fn)();) #line 15 { - register int i; - register int j; - register int m; - register char** ap; + int i; + int j; + int m; + char** ap; char* s; int k; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/magic.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/magic.c index 52e74d3f..3c02c406 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/magic.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/magic.c @@ -151,9 +151,9 @@ _vmopen __PARAM__((void), ()){ } static void -vmclose __PARAM__((register Vmalloc_t* vp), (vp)) __OTORP__(register Vmalloc_t* vp;){ - register Vmchunk_t* cp; - register Vmchunk_t* np; +vmclose __PARAM__((Vmalloc_t* vp), (vp)) __OTORP__(Vmalloc_t* vp;){ + Vmchunk_t* cp; + Vmchunk_t* np; if (vp) { @@ -168,7 +168,7 @@ vmclose __PARAM__((register Vmalloc_t* vp), (vp)) __OTORP__(register Vmalloc_t* } static __V_* -vmalloc __PARAM__((register Vmalloc_t* vp, size_t size), (vp, size)) __OTORP__(register Vmalloc_t* vp; size_t size;){ +vmalloc __PARAM__((Vmalloc_t* vp, size_t size), (vp, size)) __OTORP__(Vmalloc_t* vp; size_t size;){ char* p; size_t n; @@ -385,8 +385,8 @@ static Dict_t info[] = */ static char* -getdata __PARAM__((register Magic_t* mp, register long off, register int siz), (mp, off, siz)) __OTORP__(register Magic_t* mp; register long off; register int siz;){ - register long n; +getdata __PARAM__((Magic_t* mp, long off, int siz), (mp, off, siz)) __OTORP__(Magic_t* mp; long off; int siz;){ + long n; if (off + siz <= mp->fbsz) return(mp->fbuf + off); if (off < mp->xoff || off + siz > mp->xoff + mp->xbsz) @@ -413,10 +413,10 @@ getdata __PARAM__((register Magic_t* mp, register long off, register int siz), ( static long indirect __PARAM__((const char* cs, char** e, __V_* handle), (cs, e, handle)) __OTORP__(const char* cs; char** e; __V_* handle;){ - register char* s = (char*)cs; - register Magic_t* mp = (Magic_t*)handle; - register long n = 0; - register char* p; + char* s = (char*)cs; + Magic_t* mp = (Magic_t*)handle; + long n = 0; + char* p; if (!s) liberror(lib, 2, "%s in indirect expression", *e); else @@ -461,11 +461,11 @@ indirect __PARAM__((const char* cs, char** e, __V_* handle), (cs, e, handle)) __ */ static char* -ckmagic __PARAM__((register Magic_t* mp, const char* file, char* buf, struct stat* st, unsigned long off), (mp, file, buf, st, off)) __OTORP__(register Magic_t* mp; const char* file; char* buf; struct stat* st; unsigned long off;){ - register Entry_t* ep; - register char* p; - register char* b; - register int level = 0; +ckmagic __PARAM__((Magic_t* mp, const char* file, char* buf, struct stat* st, unsigned long off), (mp, file, buf, st, off)) __OTORP__(Magic_t* mp; const char* file; char* buf; struct stat* st; unsigned long off;){ + Entry_t* ep; + char* p; + char* b; + int level = 0; int call = -1; int c; char* t; @@ -769,11 +769,11 @@ ckmagic __PARAM__((register Magic_t* mp, const char* file, char* buf, struct sta */ static int -ckenglish __PARAM__((register Magic_t* mp, int pun, int badpun), (mp, pun, badpun)) __OTORP__(register Magic_t* mp; int pun; int badpun;){ - register char* s; - register int vowl = 0; - register int freq = 0; - register int rare = 0; +ckenglish __PARAM__((Magic_t* mp, int pun, int badpun), (mp, pun, badpun)) __OTORP__(Magic_t* mp; int pun; int badpun;){ + char* s; + int vowl = 0; + int freq = 0; + int rare = 0; if (5 * badpun > pun) return(0); @@ -799,12 +799,12 @@ ckenglish __PARAM__((register Magic_t* mp, int pun, int badpun), (mp, pun, badpu #define F_eascii (1<<2) static char* -cklang __PARAM__((register Magic_t* mp, const char* file, char* buf, struct stat* st), (mp, file, buf, st)) __OTORP__(register Magic_t* mp; const char* file; char* buf; struct stat* st;){ - register int c; - register unsigned char* b; - register unsigned char* e; - register int q; - register char* s; +cklang __PARAM__((Magic_t* mp, const char* file, char* buf, struct stat* st), (mp, file, buf, st)) __OTORP__(Magic_t* mp; const char* file; char* buf; struct stat* st;){ + int c; + unsigned char* b; + unsigned char* e; + int q; + char* s; char* t; char* base; char* suff; @@ -1099,7 +1099,7 @@ cklang __PARAM__((register Magic_t* mp, const char* file, char* buf, struct stat */ static char* -type __PARAM__((register Magic_t* mp, const char* file, struct stat* st, char* buf, int size), (mp, file, st, buf, size)) __OTORP__(register Magic_t* mp; const char* file; struct stat* st; char* buf; int size;){ +type __PARAM__((Magic_t* mp, const char* file, struct stat* st, char* buf, int size), (mp, file, st, buf, size)) __OTORP__(Magic_t* mp; const char* file; struct stat* st; char* buf; int size;){ char* s; if (!S_ISREG(st->st_mode)) @@ -1160,10 +1160,10 @@ type __PARAM__((register Magic_t* mp, const char* file, struct stat* st, char* b */ int -magicload __PARAM__((register Magic_t* mp, const char* file, unsigned long flags), (mp, file, flags)) __OTORP__(register Magic_t* mp; const char* file; unsigned long flags;){ - register Entry_t* ep; - register Sfio_t* fp; - register char* p; +magicload __PARAM__((Magic_t* mp, const char* file, unsigned long flags), (mp, file, flags)) __OTORP__(Magic_t* mp; const char* file; unsigned long flags;){ + Entry_t* ep; + Sfio_t* fp; + char* p; int n; int lge; int lev; @@ -1195,7 +1195,7 @@ magicload __PARAM__((register Magic_t* mp, const char* file, unsigned long flags first = ep = vmnewof(mp->region, 0, Entry_t, 1, 0); while (p = sfgetr(fp, '\n', 1)) { - register char* p2; + char* p2; char* next; error_info.line++; @@ -1685,9 +1685,9 @@ magicload __PARAM__((register Magic_t* mp, const char* file, unsigned long flags Magic_t* magicopen __PARAM__((unsigned long flags), (flags)) __OTORP__(unsigned long flags;){ - register Magic_t* mp; - register int n; - register Vmalloc_t* vp; + Magic_t* mp; + int n; + Vmalloc_t* vp; if (!(vp = vmopen(Vmdcheap, Vmbest, 0))) return(0); @@ -1715,7 +1715,7 @@ magicopen __PARAM__((unsigned long flags), (flags)) __OTORP__(unsigned long flag */ void -magicclose __PARAM__((register Magic_t* mp), (mp)) __OTORP__(register Magic_t* mp;){ +magicclose __PARAM__((Magic_t* mp), (mp)) __OTORP__(Magic_t* mp;){ #if USE_VMALLOC if (mp) vmclose(mp->region); #else @@ -1735,7 +1735,7 @@ magicclose __PARAM__((register Magic_t* mp), (mp)) __OTORP__(register Magic_t* m */ char* -magictype __PARAM__((register Magic_t* mp, const char* file, struct stat* st), (mp, file, st)) __OTORP__(register Magic_t* mp; const char* file; struct stat* st;){ +magictype __PARAM__((Magic_t* mp, const char* file, struct stat* st), (mp, file, st)) __OTORP__(Magic_t* mp; const char* file; struct stat* st;){ char* s; struct stat statb; @@ -1761,9 +1761,9 @@ magictype __PARAM__((register Magic_t* mp, const char* file, struct stat* st), ( */ int -magiclist __PARAM__((register Magic_t* mp, register Sfio_t* sp), (mp, sp)) __OTORP__(register Magic_t* mp; register Sfio_t* sp;){ - register Entry_t* ep = mp->magic; - register Entry_t* rp = 0; +magiclist __PARAM__((Magic_t* mp, Sfio_t* sp), (mp, sp)) __OTORP__(Magic_t* mp; Sfio_t* sp;){ + Entry_t* ep = mp->magic; + Entry_t* rp = 0; sfprintf(sp, "cont\toffset\ttype\top\tmask\tvalue\tdesc\n"); while (ep) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/malloc.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/malloc.c index 0220a2cd..6ba54d46 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/malloc.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/malloc.c @@ -375,10 +375,10 @@ int Mt_certify; /* automatically certify the arena */ int Mt_trace = -1; /* print trace of mallocs and frees */ /* Convert an int to a string */ -static itoa __PARAM__((register size_t i, register char* buf), (i, buf)) __OTORP__(register size_t i; register char* buf;) +static itoa __PARAM__((size_t i, char* buf), (i, buf)) __OTORP__(size_t i; char* buf;) #line 281 { - register int k, c; + int k, c; k = 0; do @@ -396,10 +396,10 @@ static itoa __PARAM__((register size_t i, register char* buf), (i, buf)) __OTORP } /* Convert an int to a hex string */ -static xtoa __PARAM__((register size_t i, register char* buf), (i, buf)) __OTORP__(register size_t i; register char* buf;) +static xtoa __PARAM__((size_t i, char* buf), (i, buf)) __OTORP__(size_t i; char* buf;) #line 301 { - register int k; + int k; static char dig[] = "0123456789ABCDEF"; @@ -412,7 +412,7 @@ static xtoa __PARAM__((register size_t i, register char* buf), (i, buf)) __OTORP } /* internal function for warning on corruption */ -static int mt_corrupt __PARAM__((register VOID* addr, register size_t usize, register VOID* stamp), (addr, usize, stamp)) __OTORP__(register VOID* addr; register size_t usize; register VOID* stamp;) +static int mt_corrupt __PARAM__((VOID* addr, size_t usize, VOID* stamp), (addr, usize, stamp)) __OTORP__(VOID* addr; size_t usize; VOID* stamp;) #line 316 { char buf[64], *mesg; @@ -436,7 +436,7 @@ static int mt_corrupt __PARAM__((register VOID* addr, register size_t usize, reg } /* Print trace information */ -static mt_trace __PARAM__((register VOID* addr, register int type), (addr, type)) __OTORP__(register VOID* addr; register int type;) +static mt_trace __PARAM__((VOID* addr, int type), (addr, type)) __OTORP__(VOID* addr; int type;) #line 339 { char *mesg, buf[64]; @@ -458,7 +458,7 @@ static mt_trace __PARAM__((register VOID* addr, register int type), (addr, type) } /* Print a warning */ -static mt_didfree __PARAM__((register VOID* addr, register int type), (addr, type)) __OTORP__(register VOID* addr; register int type;) +static mt_didfree __PARAM__((VOID* addr, int type), (addr, type)) __OTORP__(VOID* addr; int type;) #line 360 { char *mesg, buf[64]; @@ -472,10 +472,10 @@ static mt_didfree __PARAM__((register VOID* addr, register int type), (addr, typ } /* Set trace info for a block */ -static mt_setinfo __PARAM__((register TREE* bp, register size_t usize, int type), (bp, usize, type)) __OTORP__(register TREE* bp; register size_t usize; int type;) +static mt_setinfo __PARAM__((TREE* bp, size_t usize, int type), (bp, usize, type)) __OTORP__(TREE* bp; size_t usize; int type;) #line 373 { - register uchar *magic, *emagic; + uchar *magic, *emagic; USIZE(bp) = usize; USTAMP(bp) = NIL(VOID*); @@ -487,7 +487,7 @@ static mt_setinfo __PARAM__((register TREE* bp, register size_t usize, int type) } /* Set a stamp */ -mt_stamp __PARAM__((register VOID* addr, register VOID* stamp), (addr, stamp)) __OTORP__(register VOID* addr; register VOID* stamp;) +mt_stamp __PARAM__((VOID* addr, VOID* stamp), (addr, stamp)) __OTORP__(VOID* addr; VOID* stamp;) #line 387 { USTAMP(BLOCK(addr)) = stamp; @@ -497,8 +497,8 @@ mt_stamp __PARAM__((register VOID* addr, register VOID* stamp), (addr, stamp)) _ mt_certify __PARAM__((void), ()) #line 393 { - register TREE *bp, *endb; - register uchar *magic, *endm; + TREE *bp, *endb; + uchar *magic, *endm; if(!Mt_corrupt) Mt_corrupt = mt_corrupt; @@ -522,8 +522,8 @@ mt_certify __PARAM__((void), ()) mt_stat __PARAM__((int fd), (fd)) __OTORP__(int fd;) #line 417 { - register TREE *bp, *endb; - register size_t nbusy, sfree, sbusy, mbusy; + TREE *bp, *endb; + size_t nbusy, sfree, sbusy, mbusy; char buf[64], *mesg; nbusy = sfree = sbusy = mbusy = 0; @@ -566,11 +566,11 @@ mt_stat __PARAM__((int fd), (fd)) __OTORP__(int fd;) /* ** Get more core. Gaps in memory are noted as busy blocks. */ -static TREE *morecore __PARAM__((register size_t size), (size)) __OTORP__(register size_t size;) +static TREE *morecore __PARAM__((size_t size), (size)) __OTORP__(size_t size;) #line 463 { - register TREE *tp, *bp; - register VOID *addr; + TREE *tp, *bp; + VOID *addr; /* space for queue of delayed free blocks */ if(!Qfree) @@ -607,7 +607,7 @@ static TREE *morecore __PARAM__((register size_t size), (size)) __OTORP__(regist #ifndef SEGMENT if((((size_t)addr)%ALIGN) != 0) { /* make sure alignment is correct */ - register size_t n = ALIGN - ((size_t)addr)%ALIGN; + size_t n = ALIGN - ((size_t)addr)%ALIGN; if((VOID*)GETCORE(n) == ERRCORE) { Bottom = bp; @@ -663,11 +663,11 @@ static TREE *morecore __PARAM__((register size_t size), (size)) __OTORP__(regist ** the tree and return its address. ** This uses the top-down splay strategy. */ -static TREE *t_search __PARAM__((register int size), (size)) __OTORP__(register int size;) +static TREE *t_search __PARAM__((int size), (size)) __OTORP__(int size;) #line 559 { - register int cmp; - register TREE *t, *del, *left, *right, *lroot, *rroot; + int cmp; + TREE *t, *del, *left, *right, *lroot, *rroot; /* find the right one to delete */ del = Root; @@ -786,14 +786,14 @@ static TREE *t_search __PARAM__((register int size), (size)) __OTORP__(register /* ** malloc(). */ -__V_* malloc __PARAM__((register size_t size), (size)) __OTORP__(register size_t size;) +__V_* malloc __PARAM__((size_t size), (size)) __OTORP__(size_t size;) #line 681 { - register TREE *tp, *np, *fp; - register int n, i; + TREE *tp, *np, *fp; + int n, i; #ifdef MTRACE /* save true size and make size large enough to hold our data */ - register size_t mtsize = size; + size_t mtsize = size; size = size <= (MINSIZE-MTSPACE) ? MINSIZE : size + MTSPACE; if(Mt_certify) mt_certify(); @@ -896,14 +896,14 @@ __V_* malloc __PARAM__((register size_t size), (size)) __OTORP__(register size_t /* ** realloc(). */ -__V_* realloc __PARAM__((__V_* old, register size_t size), (old, size)) __OTORP__(__V_* old; register size_t size;) +__V_* realloc __PARAM__((__V_* old, size_t size), (old, size)) __OTORP__(__V_* old; size_t size;) #line 790 { - register TREE *tp, *np; - register int n, ts; - register VOID *newp; + TREE *tp, *np; + int n, ts; + VOID *newp; #ifdef MTRACE - register size_t mtsize = size; + size_t mtsize = size; if(old) { size = size < (MINSIZE-MTSPACE) ? MINSIZE : size + MTSPACE; @@ -989,10 +989,10 @@ __V_* realloc __PARAM__((__V_* old, register size_t size), (old, size)) __OTORP_ void free __PARAM__((__V_* aold), (aold)) __OTORP__(__V_* aold;) #line 879 { - register VOID* old = (VOID*)aold; - register int size; - register TREE *tp, *np, *sp; - register VOID *dequeue; + VOID* old = (VOID*)aold; + int size; + TREE *tp, *np, *sp; + VOID *dequeue; #ifdef MTRACE if(Lfree != old) { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/optget.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/optget.c index 899b7be5..f1f17a63 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/optget.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/optget.c @@ -165,9 +165,9 @@ optget __PARAM__((char** argv, const char* oopts), (argv, oopts)) __OTORP__(char */ static int -error __PARAM__((register char* p), (p)) __OTORP__(register char* p;){ - register char* s; - register char* t; +error __PARAM__((char* p), (p)) __OTORP__(char* p;){ + char* s; + char* t; int n; if (!opt_info.msg && !(opt_info.msg = newof(0, char, OPT_MSG, 0))) opt_info.arg = "[* out of space *]"; @@ -215,7 +215,7 @@ error __PARAM__((register char* p), (p)) __OTORP__(register char* p;){ static void optadd __PARAM__((const char* opts), (opts)) __OTORP__(const char* opts;){ - register int n; + int n; if ((!opt_info.nopt || opt_info.opts[opt_info.nopt - 1] != (char*)opts) && opt_info.nopt < elementsof(opt_info.opts) - 1) { @@ -260,9 +260,9 @@ optadd __PARAM__((const char* opts), (opts)) __OTORP__(const char* opts;){ */ int -optget __PARAM__((register char** argv, const char* oopts), (argv, oopts)) __OTORP__(register char** argv; const char* oopts;){ - register int c; - register char* s; +optget __PARAM__((char** argv, const char* oopts), (argv, oopts)) __OTORP__(char** argv; const char* oopts;){ + int c; + char* s; char* e; char* opts; int n; @@ -435,9 +435,9 @@ optget __PARAM__((register char** argv, const char* oopts), (argv, oopts)) __OTO char* optusage __PARAM__((const char* oopts), (oopts)) __OTORP__(const char* oopts;){ char* opts = (char*)oopts; - register Sfio_t* sp; - register int c; - register char* p; + Sfio_t* sp; + int c; + char* p; char* t; char* x; char** o; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/optjoin.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/optjoin.c index 2fdc43a2..2543d575 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/optjoin.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/optjoin.c @@ -99,8 +99,8 @@ int optjoin __PARAM__((char** argv, ...), (va_alist)) __OTORP__(va_dcl) { __OTORP__(char** argv; ) va_list ap; - register OPTFUN fun; - register OPTFUN rep; + OPTFUN fun; + OPTFUN rep; OPTFUN err; int more; int user; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathaccess.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathaccess.c index aea1dc4e..b6bbbaf6 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathaccess.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathaccess.c @@ -102,7 +102,7 @@ #include char* -pathaccess __PARAM__((register char* path, register const char* dirs, const char* a, const char* b, register int mode), (path, dirs, a, b, mode)) __OTORP__(register char* path; register const char* dirs; const char* a; const char* b; register int mode;) +pathaccess __PARAM__((char* path, const char* dirs, const char* a, const char* b, int mode), (path, dirs, a, b, mode)) __OTORP__(char* path; const char* dirs; const char* a; const char* b; int mode;) #line 18 { int sep = ':'; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathcanon.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathcanon.c index ccad2cbd..7e250806 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathcanon.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathcanon.c @@ -111,11 +111,11 @@ char* pathcanon __PARAM__((char* path, int flags), (path, flags)) __OTORP__(char* path; int flags;) #line 33 { - register char* p; - register char* r; - register char* s; - register char* t; - register int dots; + char* p; + char* r; + char* s; + char* t; + int dots; int loop; int oerrno; #if defined(FS_3D) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathcat.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathcat.c index 8e6a914f..80ba4077 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathcat.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathcat.c @@ -101,10 +101,10 @@ #include char* -pathcat __PARAM__((char* path, register const char* dirs, int sep, const char* a, register const char* b), (path, dirs, sep, a, b)) __OTORP__(char* path; register const char* dirs; int sep; const char* a; register const char* b;) +pathcat __PARAM__((char* path, const char* dirs, int sep, const char* a, const char* b), (path, dirs, sep, a, b)) __OTORP__(char* path; const char* dirs; int sep; const char* a; const char* b;) #line 13 { - register char* s; + char* s; s = path; while (*dirs && *dirs != sep) *s++ = *dirs++; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathkey.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathkey.c index e8ff0b8c..c774a67d 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathkey.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathkey.c @@ -110,9 +110,9 @@ char* pathkey __PARAM__((char* key, char* attr, const char* lang, const char* apath), (key, attr, lang, apath)) __OTORP__(char* key; char* attr; const char* lang; const char* apath;) #line 24 { - register char* path = (char*)apath; - register char* s; - register char* k; + char* path = (char*)apath; + char* s; + char* k; char* t; char* flags; char** p; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathpath.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathpath.c index 436c1a12..aae52f1f 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathpath.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathpath.c @@ -104,10 +104,10 @@ extern __MANGLE__ char** environ; char* -pathpath __PARAM__((register char* path, const char* p, const char* a, int mode), (path, p, a, mode)) __OTORP__(register char* path; const char* p; const char* a; int mode;) +pathpath __PARAM__((char* path, const char* p, const char* a, int mode), (path, p, a, mode)) __OTORP__(char* path; const char* p; const char* a; int mode;) #line 20 { - register char* s; + char* s; char* x; static char* cmd; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathprobe.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathprobe.c index 7ffb0478..3494656c 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathprobe.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathprobe.c @@ -112,9 +112,9 @@ pathprobe __PARAM__((char* path, char* attr, const char* lang, const char* tool, #line 32 { char* proc = (char*)aproc; - register char* p; - register char* k; - register char** ap; + char* p; + char* k; + char** ap; int n; char* e; char* probe; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathrepl.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathrepl.c index 0cb6a551..db683e0c 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathrepl.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathrepl.c @@ -101,11 +101,11 @@ #include char* -pathrepl __PARAM__((register char* path, const char* match, register const char* replace), (path, match, replace)) __OTORP__(register char* path; const char* match; register const char* replace;) +pathrepl __PARAM__((char* path, const char* match, const char* replace), (path, match, replace)) __OTORP__(char* path; const char* match; const char* replace;) #line 14 { - register const char* m = match; - register const char* r; + const char* m = match; + const char* r; char* t; if (!match) match = ""; @@ -122,7 +122,7 @@ pathrepl __PARAM__((register char* path, const char* match, register const char* while (*m && *m++ == *path) path++; if (!*m && *path == '/') { - register char* p; + char* p; p = t; r = replace; @@ -130,7 +130,7 @@ pathrepl __PARAM__((register char* path, const char* match, register const char* if (p < path) while (*p++ = *path++); else if (*r && p >= path) { - register char* u; + char* u; t = path + strlen(path); u = t + strlen(r); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathtemp.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathtemp.c index e889b0a6..2003ba0e 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathtemp.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/pathtemp.c @@ -115,10 +115,10 @@ char* pathtemp __PARAM__((char* buf, const char* adir, const char* apfx), (buf, adir, apfx)) __OTORP__(char* buf; const char* adir; const char* apfx;) #line 39 { - register char* dir = (char*)adir; + char* dir = (char*)adir; char* pfx = (char*)apfx; - register char* p; - register char* s; + char* p; + char* s; int pid; static char* tmpdir; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/procclose.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/procclose.c index ea70fe68..0c000fb0 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/procclose.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/procclose.c @@ -95,7 +95,7 @@ #include int -procclose __PARAM__((register Proc_t* p), (p)) __OTORP__(register Proc_t* p;){ +procclose __PARAM__((Proc_t* p), (p)) __OTORP__(Proc_t* p;){ int status = -1; if (p) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/procfree.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/procfree.c index 259dbaa2..7ac79630 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/procfree.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/procfree.c @@ -93,7 +93,7 @@ #include "proclib.h" int -procfree __PARAM__((register Proc_t* p), (p)) __OTORP__(register Proc_t* p;){ +procfree __PARAM__((Proc_t* p), (p)) __OTORP__(Proc_t* p;){ if (!p) return(-1); if (p == &proc_default) p->pid = -1; else free(p); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/procopen.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/procopen.c index 96e7fc76..215b132d 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/procopen.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/procopen.c @@ -151,7 +151,7 @@ static const Namval_t options[] = */ static int -setopt __PARAM__((register __V_* a, register const __V_* p, register int n, const char* v), (a, p, n, v)) __OTORP__(register __V_* a; register const __V_* p; register int n; const char* v;){ +setopt __PARAM__((__V_* a, const __V_* p, int n, const char* v), (a, p, n, v)) __OTORP__(__V_* a; const __V_* p; int n; const char* v;){ NoP(v); if (p) { @@ -253,7 +253,7 @@ modify __PARAM__((Proc_t* proc, int forked, int op, long arg1, long arg2), (proc #endif #if USE_SPAWN { - register Modify_t* m; + Modify_t* m; if (!(m = newof(NiL, Modify_t, 1, 0))) return(-1); m->next = mods; @@ -327,8 +327,8 @@ modify __PARAM__((Proc_t* proc, int forked, int op, long arg1, long arg2), (proc static void restore __PARAM__((Proc_t* proc), (proc)) __OTORP__(Proc_t* proc;){ - register Modify_t* m; - register Modify_t* p; + Modify_t* m; + Modify_t* p; int oerrno; NoP(proc); @@ -399,9 +399,9 @@ restore __PARAM__((Proc_t* proc), (proc)) __OTORP__(Proc_t* proc;){ Proc_t* procopen __PARAM__((const char* cmd, char** argv, char** envv, long* modv, long flags), (cmd, argv, envv, modv, flags)) __OTORP__(const char* cmd; char** argv; char** envv; long* modv; long flags;){ - register Proc_t* proc = 0; - register int procfd; - register char** p; + Proc_t* proc = 0; + int procfd; + char** p; char** v; int i; int forked = 0; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/putenv.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/putenv.c index d019e57f..e9d26782 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/putenv.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/putenv.c @@ -115,10 +115,10 @@ putenv __PARAM__((const char* akey), (akey)) __OTORP__(const char* akey;) static char** last; /* last free slot (0) */ char* key = (char*)akey; - register char** v = environ; - register char** p = envv; - register char* s; - register char* t; + char** v = environ; + char** p = envv; + char* s; + char* t; int n; if (p && !v) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/putsymlink.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/putsymlink.c index ddbedf7d..1a608e7f 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/putsymlink.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/putsymlink.c @@ -109,10 +109,10 @@ int putsymlink __PARAM__((const char* buf, const char* name), (buf, name)) __OTORP__(const char* buf; const char* name;) #line 16 { - register char* t = (char*)buf; + char* t = (char*)buf; #ifdef UNIV_MAX - register char* s = (char*)buf; - register char* v; + char* s = (char*)buf; + char* v; int n; char tmp[PATH_MAX]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/query.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/query.c index c6b1a9b5..fccc98b3 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/query.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/query.c @@ -111,8 +111,8 @@ query __PARAM__((int quit, const char* format, ...), (va_alist)) __OTORP__(va_dc #line 26 va_list ap; - register int n; - register int c; + int n; + int c; static Sfio_t* rfp; static Sfio_t* wfp; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/setcwd.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/setcwd.c index 00496df6..f998be93 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/setcwd.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/setcwd.c @@ -138,11 +138,11 @@ vchdir __PARAM__((const char* path), (path)) __OTORP__(const char* path;) */ int -setcwd __PARAM__((register char* path, char* home), (path, home)) __OTORP__(register char* path; char* home;) +setcwd __PARAM__((char* path, char* home), (path, home)) __OTORP__(char* path; char* home;) #line 48 { - register char* s; - register int n; + char* s; + int n; int r; r = 0; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/setenv.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/setenv.c index 3b9bff3e..66a62a49 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/setenv.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/setenv.c @@ -114,10 +114,10 @@ setenv __PARAM__((const char* akey), (akey)) __OTORP__(const char* akey;) static char** last; /* last free slot (0) */ char* key = (char*)akey; - register char** v = environ; - register char** p = envv; - register char* s; - register char* t; + char** v = environ; + char** p = envv; + char* s; + char* t; int n; if (p && !v) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/setenviron.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/setenviron.c index 4281e97d..731b18bf 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/setenviron.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/setenviron.c @@ -103,10 +103,10 @@ setenviron __PARAM__((const char* akey), (akey)) __OTORP__(const char* akey;){ static char ok[] = ""; /* delete/optimization ok return*/ char* key = (char*)akey; - register char** v = environ; - register char** p = envv; - register char* s; - register char* t; + char** v = environ; + char** p = envv; + char* s; + char* t; int n; if (p && !v) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/setuniv.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/setuniv.c index 30bdfdc0..26762ea2 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/setuniv.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/setuniv.c @@ -117,7 +117,7 @@ setuniv __PARAM__((const char* buf), (buf)) __OTORP__(const char* buf;) return(-1); #else #if defined(ATT_UNIV) || defined(U_GET) - register int n; + int n; for (n = 0; n < UNIV_MAX; n++) if (streq(buf, univ_name[n])) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/sigcrit.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/sigcrit.c index efa9490d..4934b87b 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/sigcrit.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/sigcrit.c @@ -136,7 +136,7 @@ interrupt __PARAM__((int sig), (sig)) __OTORP__(int sig;){ int sigcritical __PARAM__((int op), (op)) __OTORP__(int op;){ - register int i; + int i; static int level; #if _lib_sigprocmask static sigset_t mask; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/stack.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/stack.c index 870cc180..75629633 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/stack.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/stack.c @@ -100,9 +100,9 @@ static const char id_stack[] = "\n@(#)stack (AT&T Bell Laboratories) 05/01/84\0\ */ STACK -stackalloc __PARAM__((register int size, __V_* error), (size, error)) __OTORP__(register int size; __V_* error;){ - register STACK stack; - register struct stackblock *b; +stackalloc __PARAM__((int size, __V_* error), (size, error)) __OTORP__(int size; __V_* error;){ + STACK stack; + struct stackblock *b; if (size <= 0) size = 100; if (!(stack = newof(0, struct stacktable, 1, 0))) return(0); @@ -132,9 +132,9 @@ stackalloc __PARAM__((register int size, __V_* error), (size, error)) __OTORP__( */ void -stackfree __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK stack;){ - register struct stackblock* b; - register struct stackblock* p; +stackfree __PARAM__((STACK stack), (stack)) __OTORP__(STACK stack;){ + struct stackblock* b; + struct stackblock* p; b = stack->blocks; while (p = b) @@ -151,7 +151,7 @@ stackfree __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK st */ void -stackclear __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK stack;){ +stackclear __PARAM__((STACK stack), (stack)) __OTORP__(STACK stack;){ stack->position.block = stack->blocks; stack->position.index = -1; } @@ -161,7 +161,7 @@ stackclear __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK s */ __V_* -stackget __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK stack;){ +stackget __PARAM__((STACK stack), (stack)) __OTORP__(STACK stack;){ if (stack->position.index < 0) return(stack->error); else return(stack->position.block->stack[stack->position.index]); } @@ -171,8 +171,8 @@ stackget __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK sta */ int -stackpush __PARAM__((register STACK stack, __V_* value), (stack, value)) __OTORP__(register STACK stack; __V_* value;){ - register struct stackblock *b; +stackpush __PARAM__((STACK stack, __V_* value), (stack, value)) __OTORP__(STACK stack; __V_* value;){ + struct stackblock *b; if (++stack->position.index >= stack->size) { @@ -200,7 +200,7 @@ stackpush __PARAM__((register STACK stack, __V_* value), (stack, value)) __OTORP */ int -stackpop __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK stack;){ +stackpop __PARAM__((STACK stack), (stack)) __OTORP__(STACK stack;){ /* * return: * @@ -225,7 +225,7 @@ stackpop __PARAM__((register STACK stack), (stack)) __OTORP__(register STACK sta */ void -stacktell __PARAM__((register STACK stack, int set, STACKPOS* position), (stack, set, position)) __OTORP__(register STACK stack; int set; STACKPOS* position;){ +stacktell __PARAM__((STACK stack, int set, STACKPOS* position), (stack, set, position)) __OTORP__(STACK stack; int set; STACKPOS* position;){ if (set) stack->position = *position; else *position = stack->position; } diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/stak.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/stak.c index bcbf0eb4..49098efa 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/stak.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/stak.c @@ -189,7 +189,7 @@ static char *overflow __PARAM__((int n), (n)) __OTORP__(int n;) static void stakinit __PARAM__((int size), (size)) __OTORP__(int size;) #line 109 { - register Sfile_t *sp; + Sfile_t *sp; init = size; sp = stakcreate(0); init = 1; @@ -230,12 +230,12 @@ static int stakexcept __PARAM__((Sfile_t* sp, int type, Sfdisc_t* dp), (sp, type Sfile_t *stakcreate __PARAM__((int flags), (flags)) __OTORP__(int flags;) #line 148 { - register int bsize; - register Sfile_t *stream; - register struct stak *sp; - register struct frame *fp; - register Sfdisc_t *dp; - register char *cp; + int bsize; + Sfile_t *stream; + struct stak *sp; + struct frame *fp; + Sfdisc_t *dp; + char *cp; if(!(stream=newof((char*)0,Sfile_t, 1, sizeof(*dp)+sizeof(*sp)))) return(0); increment(create); @@ -279,7 +279,7 @@ Sfile_t *stakinstall __PARAM__((Sfile_t *stream, _stak_overflow_ oflow), (stream #line 195 { Sfile_t *old; - register struct stak *sp; + struct stak *sp; if(!init) { stakinit(1); @@ -310,10 +310,10 @@ Sfile_t *stakinstall __PARAM__((Sfile_t *stream, _stak_overflow_ oflow), (stream /* * increase the reference count on the given */ -int staklink __PARAM__((register Sfile_t* stream), (stream)) __OTORP__(register Sfile_t* stream;) +int staklink __PARAM__((Sfile_t* stream), (stream)) __OTORP__(Sfile_t* stream;) #line 229 { - register struct stak *sp = stream2stak(stream); + struct stak *sp = stream2stak(stream); return(sp->stakref++); } @@ -323,9 +323,9 @@ int staklink __PARAM__((register Sfile_t* stream), (stream)) __OTORP__(register int stakdelete __PARAM__((Sfile_t* stream), (stream)) __OTORP__(Sfile_t* stream;) #line 238 { - register struct stak *sp = stream2stak(stream); - register char *cp = sp->stakbase; - register struct frame *fp; + struct stak *sp = stream2stak(stream); + char *cp = sp->stakbase; + struct frame *fp; if(--sp->stakref>0) return(1); increment(delete); @@ -354,13 +354,13 @@ int stakdelete __PARAM__((Sfile_t* stream), (stream)) __OTORP__(Sfile_t* stream; * otherwise, the top of the stack is set to stakbot+ * */ -char *stakset __PARAM__((register char* loc, unsigned offset), (loc, offset)) __OTORP__(register char* loc; unsigned offset;) +char *stakset __PARAM__((char* loc, unsigned offset), (loc, offset)) __OTORP__(char* loc; unsigned offset;) #line 271 { - register struct stak *sp=stakcur; - register char *cp; - register struct frame *fp; - register int frames = 0; + struct stak *sp=stakcur; + char *cp; + struct frame *fp; + int frames = 0; if(!init) stakinit(offset+1); increment(set); @@ -400,10 +400,10 @@ found: /* * allocate bytes on the current stack */ -char *stakalloc __PARAM__((register unsigned int n), (n)) __OTORP__(register unsigned int n;) +char *stakalloc __PARAM__((unsigned int n), (n)) __OTORP__(unsigned int n;) #line 316 { - register unsigned char *old; + unsigned char *old; if(!init) stakinit(n); increment(alloc); @@ -418,7 +418,7 @@ char *stakalloc __PARAM__((register unsigned int n), (n)) __OTORP__(register uns /* * begin a new stack word of at least bytes */ -char *_stakseek __PARAM__((register unsigned n), (n)) __OTORP__(register unsigned n;) +char *_stakseek __PARAM__((unsigned n), (n)) __OTORP__(unsigned n;) #line 333 { if(!init) @@ -434,10 +434,10 @@ char *_stakseek __PARAM__((register unsigned n), (n)) __OTORP__(register unsigne * advance the stack to the current top * if extra is non-zero, first add a extra bytes and zero the first */ -char *stakfreeze __PARAM__((register unsigned extra), (extra)) __OTORP__(register unsigned extra;) +char *stakfreeze __PARAM__((unsigned extra), (extra)) __OTORP__(unsigned extra;) #line 348 { - register unsigned char *old, *top; + unsigned char *old, *top; if(!init) stakinit(extra); old = staksp->data; @@ -462,8 +462,8 @@ char *stakfreeze __PARAM__((register unsigned extra), (extra)) __OTORP__(registe char *stakcopy __PARAM__((const char* str), (str)) __OTORP__(const char* str;) #line 372 { - register unsigned char *cp = (unsigned char*)str; - register int n; + unsigned char *cp = (unsigned char*)str; + int n; while(*cp++); n = roundof(cp-(unsigned char*)str,sizeof(char*)); if(!init) @@ -486,12 +486,12 @@ char *stakcopy __PARAM__((const char* str), (str)) __OTORP__(const char* str;) static char *stakgrow __PARAM__((unsigned size), (size)) __OTORP__(unsigned size;) #line 395 { - register int n = size; - register struct stak *sp = stakcur; - register struct frame *fp; - register char *cp; - register unsigned m = staktell(); - register int reused = 0; + int n = size; + struct stak *sp = stakcur; + struct frame *fp; + char *cp; + unsigned m = staktell(); + int reused = 0; n += (m + sizeof(struct frame)+1); if(sp->stakflags&STAK_SMALL) #ifndef USE_REALLOC diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/stk.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/stk.c index 2e0503b1..3618c57d 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/stk.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/stk.c @@ -189,14 +189,14 @@ static char *overflow __PARAM__((int n), (n)) __OTORP__(int n;){ * initialize stkstd, sfio operations may have already occcured */ static void stkinit __PARAM__((int size), (size)) __OTORP__(int size;){ - register Sfio_t *sp; + Sfio_t *sp; init = size; sp = stkopen(0); init = 1; stkinstall(sp,overflow); } -static int stkexcept __PARAM__((register Sfio_t *stream, int type, Sfdisc_t* dp), (stream, type, dp)) __OTORP__(register Sfio_t *stream; int type; Sfdisc_t* dp;){ +static int stkexcept __PARAM__((Sfio_t *stream, int type, Sfdisc_t* dp), (stream, type, dp)) __OTORP__(Sfio_t *stream; int type; Sfdisc_t* dp;){ NoP(dp); switch(type) { @@ -226,12 +226,12 @@ static int stkexcept __PARAM__((register Sfio_t *stream, int type, Sfdisc_t* dp) * create a stack */ Sfio_t *stkopen __PARAM__((int flags), (flags)) __OTORP__(int flags;){ - register int bsize; - register Sfio_t *stream; - register struct stk *sp; - register struct frame *fp; - register Sfdisc_t *dp; - register char *cp; + int bsize; + Sfio_t *stream; + struct stk *sp; + struct frame *fp; + Sfdisc_t *dp; + char *cp; if(!(stream=newof((char*)0,Sfio_t, 1, sizeof(*dp)+sizeof(*sp)))) return(0); increment(create); @@ -273,7 +273,7 @@ Sfio_t *stkopen __PARAM__((int flags), (flags)) __OTORP__(int flags;){ */ Sfio_t *stkinstall __PARAM__((Sfio_t *stream, _stk_overflow_ oflow), (stream, oflow)) __OTORP__(Sfio_t *stream; _stk_overflow_ oflow;){ Sfio_t *old; - register struct stk *sp; + struct stk *sp; if(!init) { stkinit(1); @@ -304,8 +304,8 @@ Sfio_t *stkinstall __PARAM__((Sfio_t *stream, _stk_overflow_ oflow), (stream, of /* * increase the reference count on the given */ -int stklink __PARAM__((register Sfio_t* stream), (stream)) __OTORP__(register Sfio_t* stream;){ - register struct stk *sp = stream2stk(stream); +int stklink __PARAM__((Sfio_t* stream), (stream)) __OTORP__(Sfio_t* stream;){ + struct stk *sp = stream2stk(stream); return(sp->stkref++); } @@ -313,9 +313,9 @@ int stklink __PARAM__((register Sfio_t* stream), (stream)) __OTORP__(register Sf * terminate a stack and free up the space */ int stkclose __PARAM__((Sfio_t* stream), (stream)) __OTORP__(Sfio_t* stream;){ - register struct stk *sp = stream2stk(stream); - register char *cp = sp->stkbase; - register struct frame *fp; + struct stk *sp = stream2stk(stream); + char *cp = sp->stkbase; + struct frame *fp; if(--sp->stkref>0) return(1); increment(delete); @@ -344,11 +344,11 @@ int stkclose __PARAM__((Sfio_t* stream), (stream)) __OTORP__(Sfio_t* stream;){ * otherwise, the top of the stack is set to stkbot+ * */ -char *stkset __PARAM__((register Sfio_t * stream, register char* loc, unsigned offset), (stream, loc, offset)) __OTORP__(register Sfio_t * stream; register char* loc; unsigned offset;){ - register struct stk *sp = stream2stk(stream); - register char *cp; - register struct frame *fp; - register int frames = 0; +char *stkset __PARAM__((Sfio_t * stream, char* loc, unsigned offset), (stream, loc, offset)) __OTORP__(Sfio_t * stream; char* loc; unsigned offset;){ + struct stk *sp = stream2stk(stream); + char *cp; + struct frame *fp; + int frames = 0; if(!init) stkinit(offset+1); increment(set); @@ -388,8 +388,8 @@ found: /* * allocate bytes on the current stack */ -char *stkalloc __PARAM__((register Sfio_t *stream, register unsigned int n), (stream, n)) __OTORP__(register Sfio_t *stream; register unsigned int n;){ - register unsigned char *old; +char *stkalloc __PARAM__((Sfio_t *stream, unsigned int n), (stream, n)) __OTORP__(Sfio_t *stream; unsigned int n;){ + unsigned char *old; if(!init) stkinit(n); increment(alloc); @@ -404,7 +404,7 @@ char *stkalloc __PARAM__((register Sfio_t *stream, register unsigned int n), (st /* * begin a new stack word of at least bytes */ -char *_stkseek __PARAM__((register Sfio_t *stream, register unsigned n), (stream, n)) __OTORP__(register Sfio_t *stream; register unsigned n;){ +char *_stkseek __PARAM__((Sfio_t *stream, unsigned n), (stream, n)) __OTORP__(Sfio_t *stream; unsigned n;){ if(!init) stkinit(n); increment(seek); @@ -418,8 +418,8 @@ char *_stkseek __PARAM__((register Sfio_t *stream, register unsigned n), (stream * advance the stack to the current top * if extra is non-zero, first add a extra bytes and zero the first */ -char *stkfreeze __PARAM__((register Sfio_t *stream, register unsigned extra), (stream, extra)) __OTORP__(register Sfio_t *stream; register unsigned extra;){ - register unsigned char *old, *top; +char *stkfreeze __PARAM__((Sfio_t *stream, unsigned extra), (stream, extra)) __OTORP__(Sfio_t *stream; unsigned extra;){ + unsigned char *old, *top; if(!init) stkinit(extra); old = stream->data; @@ -442,8 +442,8 @@ char *stkfreeze __PARAM__((register Sfio_t *stream, register unsigned extra), (s * copy string onto the stack as a new stack word */ char *stkcopy __PARAM__((Sfio_t *stream, const char* str), (stream, str)) __OTORP__(Sfio_t *stream; const char* str;){ - register unsigned char *cp = (unsigned char*)str; - register int n; + unsigned char *cp = (unsigned char*)str; + int n; while(*cp++); n = roundof(cp-(unsigned char*)str,sizeof(char*)); if(!init) @@ -463,13 +463,13 @@ char *stkcopy __PARAM__((Sfio_t *stream, const char* str), (stream, str)) __OTOR * to the end is copied into the new stack frame */ -static char *stkgrow __PARAM__((register Sfio_t *stream, unsigned size), (stream, size)) __OTORP__(register Sfio_t *stream; unsigned size;){ - register int n = size; - register struct stk *sp = stream2stk(stream); - register struct frame *fp; - register char *cp; - register unsigned m = stktell(stream); - register int reused = 0; +static char *stkgrow __PARAM__((Sfio_t *stream, unsigned size), (stream, size)) __OTORP__(Sfio_t *stream; unsigned size;){ + int n = size; + struct stk *sp = stream2stk(stream); + struct frame *fp; + char *cp; + unsigned m = stktell(stream); + int reused = 0; n += (m + sizeof(struct frame)+1); if(sp->stkflags&STK_SMALL) #ifndef USE_REALLOC diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/misc/systrace.c b/cde/programs/dtksh/ksh93/src/lib/libast/misc/systrace.c index 92ea0d06..03a9c188 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/misc/systrace.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/misc/systrace.c @@ -96,8 +96,8 @@ void systrace __PARAM__((const char* id), (id)) __OTORP__(const char* id;){ - register int n; - register char* out; + int n; + char* out; char* s; char buf[PATH_MAX]; char* av[7]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/fgetline.c b/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/fgetline.c index de771c3f..76cf88ff 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/fgetline.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/fgetline.c @@ -117,12 +117,12 @@ */ char* -fgetline __PARAM__((register FILE* fp, int op), (fp, op)) __OTORP__(register FILE* fp; int op;) +fgetline __PARAM__((FILE* fp, int op), (fp, op)) __OTORP__(FILE* fp; int op;) #line 29 { - register int c; - register char* s; - register char* end; + int c; + char* s; + char* end; static char* buf; static int siz; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/getwinsize.c b/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/getwinsize.c index 20e19151..165cc159 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/getwinsize.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/getwinsize.c @@ -93,6 +93,6 @@ #include void -getwinsize __PARAM__((int fd, register int* rows, register int* cols), (fd, rows, cols)) __OTORP__(int fd; register int* rows; register int* cols;){ +getwinsize __PARAM__((int fd, int* rows, int* cols), (fd, rows, cols)) __OTORP__(int fd; int* rows; int* cols;){ astwinsize(fd, rows, cols); } diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/query.c b/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/query.c index 39a0e3fa..15ae2c93 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/query.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/query.c @@ -97,8 +97,8 @@ int query __PARAM__((int quit, const char* format, ...), (va_alist)) __OTORP__(va_dcl) { __OTORP__(int quit; const char* format; ) va_list ap; - register int n; - register int c; + int n; + int c; static Sfio_t* rfp; static Sfio_t* wfp; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/tablook.c b/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/tablook.c index 1b58a9b8..9facdc15 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/tablook.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/obsolete/tablook.c @@ -93,6 +93,6 @@ #include __V_* -tablook __PARAM__((const __V_* tab, int siz, register const char* name), (tab, siz, name)) __OTORP__(const __V_* tab; int siz; register const char* name;){ +tablook __PARAM__((const __V_* tab, int siz, const char* name), (tab, siz, name)) __OTORP__(const __V_* tab; int siz; const char* name;){ return(strlook(tab, siz, name)); } diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathaccess.c b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathaccess.c index cc8c8291..ee0b1f6f 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathaccess.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathaccess.c @@ -94,8 +94,8 @@ #include char* -pathaccess __PARAM__((register char* path, register const char* dirs, const char* a, const char* b, register int mode), (path, dirs, a, b, mode)) __OTORP__(register char* path; register const char* dirs; const char* a; const char* b; register int mode;){ - register int m = 0; +pathaccess __PARAM__((char* path, const char* dirs, const char* a, const char* b, int mode), (path, dirs, a, b, mode)) __OTORP__(char* path; const char* dirs; const char* a; const char* b; int mode;){ + int m = 0; int sep = ':'; char cwd[PATH_MAX]; struct stat st; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathbin.c b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathbin.c index 1a448f97..9c99d94e 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathbin.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathbin.c @@ -94,7 +94,7 @@ char* pathbin __PARAM__((void), ()){ - register char* bin; + char* bin; static char* val; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcanon.c b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcanon.c index 17fff137..911a1caa 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcanon.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcanon.c @@ -97,11 +97,11 @@ char* pathcanon __PARAM__((char* path, int flags), (path, flags)) __OTORP__(char* path; int flags;){ - register char* p; - register char* r; - register char* s; - register char* t; - register int dots; + char* p; + char* r; + char* s; + char* t; + int dots; int loop; int oerrno; #if defined(FS_3D) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcat.c b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcat.c index 3c00060e..bd7abbf8 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcat.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcat.c @@ -93,8 +93,8 @@ #include char* -pathcat __PARAM__((char* path, register const char* dirs, int sep, const char* a, register const char* b), (path, dirs, sep, a, b)) __OTORP__(char* path; register const char* dirs; int sep; const char* a; register const char* b;){ - register char* s; +pathcat __PARAM__((char* path, const char* dirs, int sep, const char* a, const char* b), (path, dirs, sep, a, b)) __OTORP__(char* path; const char* dirs; int sep; const char* a; const char* b;){ + char* s; s = path; while (*dirs && *dirs != sep) *s++ = *dirs++; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcd.c b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcd.c index 70616d0c..fd21e7e4 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcd.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcd.c @@ -126,9 +126,9 @@ vchdir __PARAM__((const char* path), (path)) __OTORP__(const char* path;){ int pathcd __PARAM__((const char* path, const char* home), (path, home)) __OTORP__(const char* path; const char* home;){ - register char* p = (char*)path; - register char* s; - register int n; + char* p = (char*)path; + char* s; + int n; int i; int r; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcheck.c b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcheck.c index 5c2665a2..7e2c1fcf 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcheck.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathcheck.c @@ -99,7 +99,7 @@ int pathcheck __PARAM__((const char* package, const char* tool, Pathcheck_t* pc), (package, tool, pc)) __OTORP__(const char* package; const char* tool; Pathcheck_t* pc;){ #ifdef PARANOID - register char* s; + char* s; struct stat st; if (strmatch(tool, PARANOID) && environ && (s = *environ) && *s++ == '_' && *s++ == '=' && !stat(s, &st)) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathgetlink.c b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathgetlink.c index dcfc35a2..ea281938 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathgetlink.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathgetlink.c @@ -117,10 +117,10 @@ pathgetlink __PARAM__((const char* name, char* buf, int siz), (name, buf, siz)) #ifdef UNIV_MAX if (isspace(*buf)) { - register char* s; - register char* t; - register char* u; - register char* v; + char* s; + char* t; + char* u; + char* v; int match = 0; char tmp[PATH_MAX]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathkey.c b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathkey.c index 7aff229d..8f95551e 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathkey.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathkey.c @@ -98,9 +98,9 @@ char* pathkey __PARAM__((char* key, char* attr, const char* lang, const char* apath), (key, attr, lang, apath)) __OTORP__(char* key; char* attr; const char* lang; const char* apath;){ - register char* path = (char*)apath; - register char* s; - register char* k; + char* path = (char*)apath; + char* s; + char* k; char* t; char* flags; char** p; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathpath.c b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathpath.c index 1fbca079..49d20da5 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathpath.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathpath.c @@ -94,8 +94,8 @@ #include char* -pathpath __PARAM__((register char* path, const char* p, const char* a, int mode), (path, p, a, mode)) __OTORP__(register char* path; const char* p; const char* a; int mode;){ - register char* s; +pathpath __PARAM__((char* path, const char* p, const char* a, int mode), (path, p, a, mode)) __OTORP__(char* path; const char* p; const char* a; int mode;){ + char* s; char* x; static char* cmd; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathprobe.c b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathprobe.c index 79cc2c74..ea25fd62 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathprobe.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathprobe.c @@ -102,9 +102,9 @@ char* pathprobe __PARAM__((char* path, char* attr, const char* lang, const char* tool, const char* aproc, int op), (path, attr, lang, tool, aproc, op)) __OTORP__(char* path; char* attr; const char* lang; const char* tool; const char* aproc; int op;){ char* proc = (char*)aproc; - register char* p; - register char* k; - register char** ap; + char* p; + char* k; + char** ap; int n; char* e; char* probe; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathrepl.c b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathrepl.c index b43ea652..96e1aa6a 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathrepl.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathrepl.c @@ -93,9 +93,9 @@ #include char* -pathrepl __PARAM__((register char* path, const char* match, register const char* replace), (path, match, replace)) __OTORP__(register char* path; const char* match; register const char* replace;){ - register const char* m = match; - register const char* r; +pathrepl __PARAM__((char* path, const char* match, const char* replace), (path, match, replace)) __OTORP__(char* path; const char* match; const char* replace;){ + const char* m = match; + const char* r; char* t; if (!match) match = ""; @@ -112,7 +112,7 @@ pathrepl __PARAM__((register char* path, const char* match, register const char* while (*m && *m++ == *path) path++; if (!*m && *path == '/') { - register char* p; + char* p; p = t; r = replace; @@ -120,7 +120,7 @@ pathrepl __PARAM__((register char* path, const char* match, register const char* if (p < path) while (*p++ = *path++); else if (*r && p >= path) { - register char* u; + char* u; t = path + strlen(path); u = t + strlen(r); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathsetlink.c b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathsetlink.c index f8dd2099..a09efefc 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathsetlink.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathsetlink.c @@ -99,10 +99,10 @@ int pathsetlink __PARAM__((const char* buf, const char* name), (buf, name)) __OTORP__(const char* buf; const char* name;){ - register char* t = (char*)buf; + char* t = (char*)buf; #ifdef UNIV_MAX - register char* s = (char*)buf; - register char* v; + char* s = (char*)buf; + char* v; int n; char tmp[PATH_MAX]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathshell.c b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathshell.c index 008a4011..a7b6ff23 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathshell.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathshell.c @@ -108,9 +108,9 @@ char* pathshell __PARAM__((void), ()){ - register char* s; - register char* sh; - register int i; + char* s; + char* sh; + int i; static char* val; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathtemp.c b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathtemp.c index 7fa869cf..27c02ccf 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/path/pathtemp.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/path/pathtemp.c @@ -100,10 +100,10 @@ char* pathtemp __PARAM__((char* buf, const char* dir, const char* pfx), (buf, dir, pfx)) __OTORP__(char* buf; const char* dir; const char* pfx;){ - register char* d = (char*)dir; + char* d = (char*)dir; char* p = (char*)pfx; - register char* b; - register char* s; + char* b; + char* s; unsigned long loop; static char* tmpdir; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/port/astconf.c b/cde/programs/dtksh/ksh93/src/lib/libast/port/astconf.c index a9aaa309..79f98cd2 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/port/astconf.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/port/astconf.c @@ -158,11 +158,11 @@ static Ast_confdisc_t notify; */ static char* -synthesize __PARAM__((register Feature_t* fp, const char* path, const char* value), (fp, path, value)) __OTORP__(register Feature_t* fp; const char* path; const char* value;){ - register char* s; - register char* d; - register char* v; - register int n; +synthesize __PARAM__((Feature_t* fp, const char* path, const char* value), (fp, path, value)) __OTORP__(Feature_t* fp; const char* path; const char* value;){ + char* s; + char* d; + char* v; + int n; static char* data; static char* last; @@ -279,16 +279,16 @@ synthesize __PARAM__((register Feature_t* fp, const char* path, const char* valu */ static void -initialize __PARAM__((register Feature_t* fp, const char* path, const char* command, const char* succeed, const char* fail), (fp, path, command, succeed, fail)) __OTORP__(register Feature_t* fp; const char* path; const char* command; const char* succeed; const char* fail;){ - register char* p; - register int ok = 1; +initialize __PARAM__((Feature_t* fp, const char* path, const char* command, const char* succeed, const char* fail), (fp, path, command, succeed, fail)) __OTORP__(Feature_t* fp; const char* path; const char* command; const char* succeed; const char* fail;){ + char* p; + int ok = 1; if (fp->op != OP_path_resolve || !fs3d(FS3D_TEST)) { if (p = getenv("PATH")) { - register int r = 1; - register char* d = p; + int r = 1; + char* d = p; int offset = stktell(stkstd); for (;;) @@ -363,8 +363,8 @@ initialize __PARAM__((register Feature_t* fp, const char* path, const char* comm static char* feature __PARAM__((const char* name, const char* path, const char* value), (name, path, value)) __OTORP__(const char* name; const char* path; const char* value;){ - register Feature_t* fp; - register int n; + Feature_t* fp; + int n; if (value) { @@ -432,12 +432,12 @@ feature __PARAM__((const char* name, const char* path, const char* value), (name */ static int -lookup __PARAM__((register Lookup_t* look, const char* name), (look, name)) __OTORP__(register Lookup_t* look; const char* name;){ - register Conf_t* mid = (Conf_t*)conf; - register Conf_t* lo = mid; - register Conf_t* hi = mid + conf_elements; - register int v; - register int c; +lookup __PARAM__((Lookup_t* look, const char* name), (look, name)) __OTORP__(Lookup_t* look; const char* name;){ + Conf_t* mid = (Conf_t*)conf; + Conf_t* lo = mid; + Conf_t* hi = mid + conf_elements; + int v; + int c; const char* oldname = name; const Prefix_t* p; @@ -530,9 +530,9 @@ lookup __PARAM__((register Lookup_t* look, const char* name), (look, name)) __OT */ static char* -print __PARAM__((Sfio_t* sp, register Lookup_t* look, const char* name, const char* path), (sp, look, name, path)) __OTORP__(Sfio_t* sp; register Lookup_t* look; const char* name; const char* path;){ - register Conf_t* p = look->conf; - register int flags = look->flags|CONF_DEFINED; +print __PARAM__((Sfio_t* sp, Lookup_t* look, const char* name, const char* path), (sp, look, name, path)) __OTORP__(Sfio_t* sp; Lookup_t* look; const char* name; const char* path;){ + Conf_t* p = look->conf; + int flags = look->flags|CONF_DEFINED; char* call; int offset; long v; @@ -669,7 +669,7 @@ print __PARAM__((Sfio_t* sp, register Lookup_t* look, const char* name, const ch char* astconf __PARAM__((const char* name, const char* path, const char* value), (name, path, value)) __OTORP__(const char* name; const char* path; const char* value;){ - register char* s; + char* s; Lookup_t look; if (!path) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/port/astcopy.c b/cde/programs/dtksh/ksh93/src/lib/libast/port/astcopy.c index 8be7597e..ec2698fc 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/port/astcopy.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/port/astcopy.c @@ -136,7 +136,7 @@ extern __MANGLE__ caddr_t mmap __PROTO__((caddr_t, size_t, int, int, int, off_t off_t astcopy __PARAM__((int rfd, int wfd, off_t n), (rfd, wfd, n)) __OTORP__(int rfd; int wfd; off_t n;){ - register off_t c; + off_t c; #ifdef MAPSIZE off_t pos; off_t mapsize; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/port/astquery.c b/cde/programs/dtksh/ksh93/src/lib/libast/port/astquery.c index 0a3ad4c6..688aa113 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/port/astquery.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/port/astquery.c @@ -97,8 +97,8 @@ int astquery __PARAM__((int quit, const char* format, ...), (va_alist)) __OTORP__(va_dcl) { __OTORP__(int quit; const char* format; ) va_list ap; - register int n; - register int c; + int n; + int c; static Sfio_t* rfp; static Sfio_t* wfp; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/port/astwinsize.c b/cde/programs/dtksh/ksh93/src/lib/libast/port/astwinsize.c index bf58fd18..d73b43a8 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/port/astwinsize.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/port/astwinsize.c @@ -129,7 +129,7 @@ __STDPP__directive pragma pp:nohide ioctl sleep static int ttctl __PROTO__((int, int, __V_*)); void -astwinsize __PARAM__((int fd, register int* rows, register int* cols), (fd, rows, cols)) __OTORP__(int fd; register int* rows; register int* cols;){ +astwinsize __PARAM__((int fd, int* rows, int* cols), (fd, rows, cols)) __OTORP__(int fd; int* rows; int* cols;){ #ifdef TIOCGWINSZ #define NEED_ttctl struct winsize ws; @@ -180,8 +180,8 @@ astwinsize __PARAM__((int fd, register int* rows, register int* cols), (fd, rows */ static int -ttctl __PARAM__((register int fd, int op, __V_* tt), (fd, op, tt)) __OTORP__(register int fd; int op; __V_* tt;){ - register int v; +ttctl __PARAM__((int fd, int op, __V_* tt), (fd, op, tt)) __OTORP__(int fd; int op; __V_* tt;){ + int v; if (fd < 0) { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/port/fdcopy.c b/cde/programs/dtksh/ksh93/src/lib/libast/port/fdcopy.c index 267bf6db..f52ab097 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/port/fdcopy.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/port/fdcopy.c @@ -146,7 +146,7 @@ off_t fdcopy __PARAM__((int rfd, int wfd, off_t n), (rfd, wfd, n)) __OTORP__(int rfd; int wfd; off_t n;) #line 55 { - register off_t c; + off_t c; #ifdef MAPSIZE off_t pos; off_t mapsize; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/port/getwinsize.c b/cde/programs/dtksh/ksh93/src/lib/libast/port/getwinsize.c index bdb1d04b..f14cb868 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/port/getwinsize.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/port/getwinsize.c @@ -137,7 +137,7 @@ __STDPP__directive pragma pp:nohide ioctl sleep static int ttctl __PROTO__((int, int, __V_*)); void -getwinsize __PARAM__((int fd, register int* rows, register int* cols), (fd, rows, cols)) __OTORP__(int fd; register int* rows; register int* cols;) +getwinsize __PARAM__((int fd, int* rows, int* cols), (fd, rows, cols)) __OTORP__(int fd; int* rows; int* cols;) #line 48 { #ifdef TIOCGSIZE @@ -190,10 +190,10 @@ getwinsize __PARAM__((int fd, register int* rows, register int* cols), (fd, rows */ static int -ttctl __PARAM__((register int fd, int op, __V_* tt), (fd, op, tt)) __OTORP__(register int fd; int op; __V_* tt;) +ttctl __PARAM__((int fd, int op, __V_* tt), (fd, op, tt)) __OTORP__(int fd; int op; __V_* tt;) #line 100 { - register int v; + int v; if (fd < 0) { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/preroot/getpreroot.c b/cde/programs/dtksh/ksh93/src/lib/libast/preroot/getpreroot.c index 1ad3a944..408cb0d4 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/preroot/getpreroot.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/preroot/getpreroot.c @@ -108,9 +108,9 @@ char* getpreroot __PARAM__((char* path, const char* cmd), (path, cmd)) __OTORP__(char* path; const char* cmd;){ - register int c; - register FILE* fp; - register char* p; + int c; + FILE* fp; + char* p; char buf[PATH_MAX]; if (!path) path = buf; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/preroot/setpreroot.c b/cde/programs/dtksh/ksh93/src/lib/libast/preroot/setpreroot.c index f5c4b82a..ebe9c98c 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/preroot/setpreroot.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/preroot/setpreroot.c @@ -98,9 +98,9 @@ #include void -setpreroot __PARAM__((register char** argv, const char* dir), (argv, dir)) __OTORP__(register char** argv; const char* dir;){ - register char* s; - register char** ap; +setpreroot __PARAM__((char** argv, const char* dir), (argv, dir)) __OTORP__(char** argv; const char* dir;){ + char* s; + char** ap; int argc; char* cmd; char** av; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/re/recomp.c b/cde/programs/dtksh/ksh93/src/lib/libast/re/recomp.c index d305fb53..cac36034 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/re/recomp.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/re/recomp.c @@ -129,7 +129,7 @@ rcerror __PARAM__((char* s), (s)) __OTORP__(char* s;){ } static void -reerr2 __PARAM__((register char* s, int c), (s, c)) __OTORP__(register char* s; int c;){ +reerr2 __PARAM__((char* s, int c), (s, c)) __OTORP__(char* s; int c;){ char buf[100]; s = strcopy(buf, s); @@ -164,7 +164,7 @@ pushand __PARAM__((Inst_t* f, Inst_t* l), (f, l)) __OTORP__(Inst_t* f; Inst_t* l static Node_t* popand __PARAM__((int op), (op)) __OTORP__(int op;){ - register Inst_t* inst; + Inst_t* inst; if (re->andp <= &re->andstack[0]) { @@ -190,11 +190,11 @@ popator __PARAM__((void), ()){ } static void -evaluntil __PARAM__((register int pri), (pri)) __OTORP__(register int pri;){ - register Node_t* op1; - register Node_t* op2; - register Inst_t* inst1; - register Inst_t* inst2; +evaluntil __PARAM__((int pri), (pri)) __OTORP__(int pri;){ + Node_t* op1; + Node_t* op2; + Inst_t* inst1; + Inst_t* inst2; while (pri == RBRA || re->atorp[-1] >= pri) { @@ -262,8 +262,8 @@ evaluntil __PARAM__((register int pri), (pri)) __OTORP__(register int pri;){ } static void -operation __PARAM__((register int t), (t)) __OTORP__(register int t;){ - register int thisisand = 0; +operation __PARAM__((int t), (t)) __OTORP__(int t;){ + int thisisand = 0; switch (t) { @@ -294,7 +294,7 @@ operation __PARAM__((register int t), (t)) __OTORP__(register int t;){ static void operand __PARAM__((int t), (t)) __OTORP__(int t;){ - register Inst_t* i; + Inst_t* i; /* * catenate is implicit @@ -317,8 +317,8 @@ operand __PARAM__((int t), (t)) __OTORP__(int t;){ static void optimize __PARAM__((Re_program_t* pp), (pp)) __OTORP__(Re_program_t* pp;){ - register Inst_t* inst; - register Inst_t* target; + Inst_t* inst; + Inst_t* target; for (inst = pp->firstinst; inst->type != END; inst++) { @@ -358,7 +358,7 @@ dump __PARAM__((Re_program_t* pp), (pp)) __OTORP__(Re_program_t* pp;){ static int nextc __PARAM__((void), ()){ - register int c; + int c; switch (c = *re->exprp++) { @@ -378,10 +378,10 @@ nextc __PARAM__((void), ()){ static void bldcclass __PARAM__((void), ()){ - register int c1; - register int c2; - register char* map; - register int negate; + int c1; + int c2; + char* map; + int negate; if (re->nclass >= NCLASS) reerr2("too many character classes -- limit ", NCLASS + '0'); map = re->classp[re->nclass++].map; @@ -429,7 +429,7 @@ bldcclass __PARAM__((void), ()){ static int lex __PARAM__((void), ()){ - register int c; + int c; switch(c = *re->exprp++) { @@ -523,7 +523,7 @@ lex __PARAM__((void), ()){ reprogram* recomp __PARAM__((const char* s, int reflags), (s, reflags)) __OTORP__(const char* s; int reflags;){ - register int token; + int token; Re_program_t* pp; State_t restate; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/re/reexec.c b/cde/programs/dtksh/ksh93/src/lib/libast/re/reexec.c index 2b625065..5752f30e 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/re/reexec.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/re/reexec.c @@ -109,7 +109,7 @@ typedef struct */ static List_t* -newthread __PARAM__((register List_t* p, register Inst_t* ip, register Subexp_t* sep), (p, ip, sep)) __OTORP__(register List_t* p; register Inst_t* ip; register Subexp_t* sep;){ +newthread __PARAM__((List_t* p, Inst_t* ip, Subexp_t* sep), (p, ip, sep)) __OTORP__(List_t* p; Inst_t* ip; Subexp_t* sep;){ for (; p->inst; p++) if (p->inst == ip) { @@ -123,7 +123,7 @@ newthread __PARAM__((register List_t* p, register Inst_t* ip, register Subexp_t* } static void -newmatch __PARAM__((register Subexp_t* mp, register Subexp_t* np), (mp, np)) __OTORP__(register Subexp_t* mp; register Subexp_t* np;){ +newmatch __PARAM__((Subexp_t* mp, Subexp_t* np), (mp, np)) __OTORP__(Subexp_t* mp; Subexp_t* np;){ if (!mp->m[0].sp || np->m[0].sp < mp->m[0].sp || np->m[0].sp == mp->m[0].sp && np->m[0].ep > mp->m[0].ep) *mp = *np; } @@ -131,10 +131,10 @@ newmatch __PARAM__((register Subexp_t* mp, register Subexp_t* np), (mp, np)) __O int reexec __PARAM__((Re_program_t* aprogp, const char* starts), (aprogp, starts)) __OTORP__(Re_program_t* aprogp; const char* starts;){ Re_program_t* progp = (Re_program_t*)aprogp; - register int flag = 0; - register Inst_t* inst; - register List_t* tlp; - register const char* s; + int flag = 0; + Inst_t* inst; + List_t* tlp; + const char* s; Subexp_t* mp; int checkstart; int startchar; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/re/ressub.c b/cde/programs/dtksh/ksh93/src/lib/libast/re/ressub.c index 9a152e63..6a9f88ca 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/re/ressub.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/re/ressub.c @@ -101,8 +101,8 @@ */ static void -sub __PARAM__((register Sfio_t* dp, register const char* sp, register Match_t* mp, register int flags), (dp, sp, mp, flags)) __OTORP__(register Sfio_t* dp; register const char* sp; register Match_t* mp; register int flags;){ - register int c; +sub __PARAM__((Sfio_t* dp, const char* sp, Match_t* mp, int flags), (dp, sp, mp, flags)) __OTORP__(Sfio_t* dp; const char* sp; Match_t* mp; int flags;){ + int c; char* s; char* e; @@ -169,8 +169,8 @@ sub __PARAM__((register Sfio_t* dp, register const char* sp, register Match_t* m */ void -ressub __PARAM__((Re_program_t* re, Sfio_t* dp, register const char* op, const char* sp, int flags), (re, dp, op, sp, flags)) __OTORP__(Re_program_t* re; Sfio_t* dp; register const char* op; const char* sp; int flags;){ - register Match_t* mp; +ressub __PARAM__((Re_program_t* re, Sfio_t* dp, const char* op, const char* sp, int flags), (re, dp, op, sp, flags)) __OTORP__(Re_program_t* re; Sfio_t* dp; const char* op; const char* sp; int flags;){ + Match_t* mp; mp = re->subexp.m; do diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/re/resub.c b/cde/programs/dtksh/ksh93/src/lib/libast/re/resub.c index e95d8ba7..8c52fe40 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/re/resub.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/re/resub.c @@ -99,8 +99,8 @@ */ static char* -sub __PARAM__((register const char* sp, register char* dp, register Match_t* mp, int flags), (sp, dp, mp, flags)) __OTORP__(register const char* sp; register char* dp; register Match_t* mp; int flags;){ - register int i; +sub __PARAM__((const char* sp, char* dp, Match_t* mp, int flags), (sp, dp, mp, flags)) __OTORP__(const char* sp; char* dp; Match_t* mp; int flags;){ + int i; char* s; NoP(flags); @@ -147,8 +147,8 @@ sub __PARAM__((register const char* sp, register char* dp, register Match_t* mp, */ char* -resub __PARAM__((Re_program_t* re, register const char* op, const char* sp, register char* dp, int flags), (re, op, sp, dp, flags)) __OTORP__(Re_program_t* re; register const char* op; const char* sp; register char* dp; int flags;){ - register Match_t* mp; +resub __PARAM__((Re_program_t* re, const char* op, const char* sp, char* dp, int flags), (re, op, sp, dp, flags)) __OTORP__(Re_program_t* re; const char* op; const char* sp; char* dp; int flags;){ + Match_t* mp; mp = re->subexp.m; do diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfclose.c b/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfclose.c index adf65239..aff78692 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfclose.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfclose.c @@ -154,7 +154,7 @@ reg Sfio_t* f; f->disc = NIL(Sfdisc_t*); } - /* tell the register function */ + /* tell the function */ if(_Sfnotify) (*_Sfnotify)(f,SF_CLOSE,f->file); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfhdr.h b/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfhdr.h index beff9cbb..7e1e2952 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfhdr.h +++ b/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfhdr.h @@ -196,8 +196,8 @@ _END_EXTERNS_ #define uchar unsigned char #define ulong unsigned long #define uint unsigned int -#define reg register -#define REG register +#define reg /*NO register keyword*/ +#define REG reg #define SECOND 1000 /* millisecond units */ diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/stdio/stdvsprnt.c b/cde/programs/dtksh/ksh93/src/lib/libast/stdio/stdvsprnt.c index 7d9cb73e..c3028078 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/stdio/stdvsprnt.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/stdio/stdvsprnt.c @@ -49,8 +49,8 @@ _stdvsprintf(char *s, const char *form, va_list args) #else _stdvsprintf(s,form,args) -register char *s; -register char *form; +char *s; +char *form; va_list args; #endif { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/stdio/stdvsscn.c b/cde/programs/dtksh/ksh93/src/lib/libast/stdio/stdvsscn.c index b79927d6..e81b3d51 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/stdio/stdvsscn.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/stdio/stdvsscn.c @@ -49,8 +49,8 @@ _stdvsscanf(char *s, const char *form, va_list args) #else _stdvsscanf(s,form,args) -register char *s; -register char *form; +char *s; +char *form; va_list args; #endif { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/chresc.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/chresc.c index 686d9d33..605a91b7 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/chresc.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/chresc.c @@ -93,9 +93,9 @@ #include int -chresc __PARAM__((register const char* s, char** p), (s, p)) __OTORP__(register const char* s; char** p;){ - register const char* q; - register int c; +chresc __PARAM__((const char* s, char** p), (s, p)) __OTORP__(const char* s; char** p;){ + const char* q; + int c; switch (c = *s++) { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/chrtoi.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/chrtoi.c index e51b3d15..a2173fd2 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/chrtoi.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/chrtoi.c @@ -93,10 +93,10 @@ #include int -chrtoi __PARAM__((register const char* s), (s)) __OTORP__(register const char* s;){ - register int c; - register int n; - register int x; +chrtoi __PARAM__((const char* s), (s)) __OTORP__(const char* s;){ + int c; + int n; + int x; char* p; c = 0; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtbase.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtbase.c index 9beea11f..87f216de 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtbase.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtbase.c @@ -93,7 +93,7 @@ #include char* -fmtbase __PARAM__((register long n, register int b, int p), (n, b, p)) __OTORP__(register long n; register int b; int p;){ +fmtbase __PARAM__((long n, int b, int p), (n, b, p)) __OTORP__(long n; int b; int p;){ static char buf[36]; if (n == 0 || b == 0) sfsprintf(buf, sizeof(buf), "%ld", n); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtelapsed.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtelapsed.c index 761a4d82..959c570f 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtelapsed.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtelapsed.c @@ -93,8 +93,8 @@ #include char* -fmtelapsed __PARAM__((register unsigned long t, register int n), (t, n)) __OTORP__(register unsigned long t; register int n;){ - register unsigned long s; +fmtelapsed __PARAM__((unsigned long t, int n), (t, n)) __OTORP__(unsigned long t; int n;){ + unsigned long s; static int amt[] = { 1, 60, 60, 24, 7, 4, 12, 20 }; static char chr[] = "smhdwMYS"; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtesc.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtesc.c index 2dad5cf6..3e6453a3 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtesc.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtesc.c @@ -96,9 +96,9 @@ char* fmtesc __PARAM__((const char* as), (as)) __OTORP__(const char* as;){ - register unsigned char* s = (unsigned char*)as; - register char* b; - register int c; + unsigned char* s = (unsigned char*)as; + char* b; + int c; static char* buf; static int bufsiz; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtfs.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtfs.c index b0721d14..21cf21bd 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtfs.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtfs.c @@ -162,10 +162,10 @@ struct mntent static struct mntent* getmntent __PARAM__((FILE* mp), (mp)) __OTORP__(FILE* mp;){ - register int c; - register char* s; - register char* m; - register int q; + int c; + char* s; + char* m; + int q; static struct mntent e; q = 0; @@ -225,9 +225,9 @@ endmntent __PARAM__((FILE* mp), (mp)) __OTORP__(FILE* mp;){ char* fmtfs __PARAM__((struct stat* st), (st)) __OTORP__(struct stat* st;){ - register FILE* mp; - register struct mntent* mnt; - register char* s; + FILE* mp; + struct mntent* mnt; + char* s; struct stat rt; static Hash_table_t* tab; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtgid.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtgid.c index e5f51ffc..b3f510f1 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtgid.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtgid.c @@ -120,8 +120,8 @@ extern __MANGLE__ struct group* getgrgid __PROTO__((gid_t)); char* fmtgid __PARAM__((int gid), (gid)) __OTORP__(int gid;){ - register char* name; - register struct group* gr; + char* name; + struct group* gr; static Hash_table_t* gidtab; static char buf[sizeof(int) * 3 + 1]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtls.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtls.c index 2dfa8ad5..480905a1 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtls.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtls.c @@ -112,8 +112,8 @@ */ char* -fmtls __PARAM__((char* buf, const char* name, register struct stat* st, const char* info, const char* link, register int flags), (buf, name, st, info, link, flags)) __OTORP__(char* buf; const char* name; register struct stat* st; const char* info; const char* link; register int flags;){ - register char* s; +fmtls __PARAM__((char* buf, const char* name, struct stat* st, const char* info, const char* link, int flags), (buf, name, st, info, link, flags)) __OTORP__(char* buf; const char* name; struct stat* st; const char* info; const char* link; int flags;){ + char* s; time_t tm; s = buf; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtmatch.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtmatch.c index 1906ada2..473e74c6 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtmatch.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtmatch.c @@ -96,11 +96,11 @@ char* fmtmatch __PARAM__((const char* as), (as)) __OTORP__(const char* as;){ - register char* s = (char*)as; - register int c; - register char* t; - register char** p; - register char* b; + char* s = (char*)as; + int c; + char* t; + char** p; + char* b; char* x; char* y; int a; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtmode.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtmode.c index c0eeb1e6..1aa769f0 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtmode.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtmode.c @@ -93,9 +93,9 @@ #include "modelib.h" char* -fmtmode __PARAM__((register int mode, int external), (mode, external)) __OTORP__(register int mode; int external;){ - register char* s; - register struct modeop* p; +fmtmode __PARAM__((int mode, int external), (mode, external)) __OTORP__(int mode; int external;){ + char* s; + struct modeop* p; static char buf[MODELEN + 1]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtperm.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtperm.c index 85a47a6d..b2c0e7ce 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtperm.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtperm.c @@ -94,9 +94,9 @@ #include char* -fmtperm __PARAM__((register int perm), (perm)) __OTORP__(register int perm;){ - register char* s; - register char* p; +fmtperm __PARAM__((int perm), (perm)) __OTORP__(int perm;){ + char* s; + char* p; char* o; int c; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtre.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtre.c index 15ff817b..51a79616 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtre.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtre.c @@ -96,10 +96,10 @@ char* fmtre __PARAM__((const char* as), (as)) __OTORP__(const char* as;){ - register char* s = (char*)as; - register int c; - register char* t; - register char* p; + char* s = (char*)as; + int c; + char* t; + char* p; int n; char stack[32]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtsignal.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtsignal.c index dcf9f69a..df84f94b 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtsignal.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtsignal.c @@ -94,7 +94,7 @@ #include char* -fmtsignal __PARAM__((register int sig), (sig)) __OTORP__(register int sig;){ +fmtsignal __PARAM__((int sig), (sig)) __OTORP__(int sig;){ static char buf[20]; if (sig >= 0) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtuid.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtuid.c index b985a858..f0811563 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtuid.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmtuid.c @@ -120,8 +120,8 @@ extern __MANGLE__ struct passwd* getpwuid __PROTO__((uid_t)); char* fmtuid __PARAM__((int uid), (uid)) __OTORP__(int uid;){ - register char* name; - register struct passwd* pw; + char* name; + struct passwd* pw; static Hash_table_t* uidtab; static char buf[sizeof(int) * 3 + 1]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/mematoe.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/mematoe.c index b516b9d5..cc425018 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/mematoe.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/mematoe.c @@ -139,9 +139,9 @@ static unsigned char atoe[] = */ void -mematoe __PARAM__((__V_* aop, const __V_* aip, register size_t n), (aop, aip, n)) __OTORP__(__V_* aop; const __V_* aip; register size_t n;){ - register unsigned char* op = (unsigned char*)aop; - register const unsigned char* ip = (const unsigned char*)aip; +mematoe __PARAM__((__V_* aop, const __V_* aip, size_t n), (aop, aip, n)) __OTORP__(__V_* aop; const __V_* aip; size_t n;){ + unsigned char* op = (unsigned char*)aop; + const unsigned char* ip = (const unsigned char*)aip; while (n-- > 0) *op++ = atoe[*ip++]; } diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/memdup.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/memdup.c index 7ba8afbd..4de75e9e 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/memdup.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/memdup.c @@ -103,8 +103,8 @@ NoN(memdup) */ __V_* -memdup __PARAM__((register const __V_* s, register size_t n), (s, n)) __OTORP__(register const __V_* s; register size_t n;){ - register __V_* t; +memdup __PARAM__((const __V_* s, size_t n), (s, n)) __OTORP__(const __V_* s; size_t n;){ + __V_* t; return((t = (__V_*)newof(0, char, n, 0)) ? memcpy(t, s, n) : 0); } diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/memetoa.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/memetoa.c index d08ef142..5a49d21a 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/memetoa.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/memetoa.c @@ -139,9 +139,9 @@ static unsigned char etoa[] = */ void -memetoa __PARAM__((__V_* aop, const __V_* aip, register size_t n), (aop, aip, n)) __OTORP__(__V_* aop; const __V_* aip; register size_t n;){ - register unsigned char* op = (unsigned char*)aop; - register const unsigned char* ip = (const unsigned char*)aip; +memetoa __PARAM__((__V_* aop, const __V_* aip, size_t n), (aop, aip, n)) __OTORP__(__V_* aop; const __V_* aip; size_t n;){ + unsigned char* op = (unsigned char*)aop; + const unsigned char* ip = (const unsigned char*)aip; while (n-- > 0) *op++ = etoa[*ip++]; } diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/modei.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/modei.c index d6a0488b..970f73e8 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/modei.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/modei.c @@ -101,12 +101,12 @@ #undef modei int -modei __PARAM__((register int x), (x)) __OTORP__(register int x;){ +modei __PARAM__((int x), (x)) __OTORP__(int x;){ #if _S_IDPERM return(x & X_IPERM); #else - register int i; - register int c; + int i; + int c; i = 0; for (c = 0; c < PERMLEN; c += 2) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/modex.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/modex.c index 1250eff5..3597c9db 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/modex.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/modex.c @@ -99,12 +99,12 @@ #undef modex int -modex __PARAM__((register int i), (i)) __OTORP__(register int i;){ +modex __PARAM__((int i), (i)) __OTORP__(int i;){ #if _S_IDPERM && _S_IDTYPE return(i); #else - register int x; - register int c; + int x; + int c; x = 0; #if _S_IDPERM diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strcopy.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strcopy.c index 7f531741..c5deba64 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strcopy.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strcopy.c @@ -97,7 +97,7 @@ */ char* -strcopy __PARAM__((register char* s, register const char* t), (s, t)) __OTORP__(register char* s; register const char* t;){ +strcopy __PARAM__((char* s, const char* t), (s, t)) __OTORP__(char* s; const char* t;){ if (!t) return(s); while (*s++ = *t++); return(--s); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strdup.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strdup.c index 83f56193..3add1429 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strdup.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strdup.c @@ -97,9 +97,9 @@ */ char* -strdup __PARAM__((register const char* s), (s)) __OTORP__(register const char* s;){ - register char* t; - register int n; +strdup __PARAM__((const char* s), (s)) __OTORP__(const char* s;){ + char* t; + int n; return((t = newof(0, char, n = strlen(s) + 1, 0)) ? (char*)memcpy(t, s, n) : 0); } diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strelapsed.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strelapsed.c index 46c6f74d..431c2755 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strelapsed.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strelapsed.c @@ -94,9 +94,9 @@ #include unsigned long -strelapsed __PARAM__((register const char* s, char** e, int n), (s, e, n)) __OTORP__(register const char* s; char** e; int n;){ - register int c; - register unsigned long v; +strelapsed __PARAM__((const char* s, char** e, int n), (s, e, n)) __OTORP__(const char* s; char** e; int n;){ + int c; + unsigned long v; unsigned long t = 0; int f = 0; int m; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/stresc.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/stresc.c index f1d7f906..3efff565 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/stresc.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/stresc.c @@ -93,9 +93,9 @@ #include int -stresc __PARAM__((register char* s), (s)) __OTORP__(register char* s;){ - register char* t; - register int c; +stresc __PARAM__((char* s), (s)) __OTORP__(char* s;){ + char* t; + int c; char* b; char* p; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strexpr.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strexpr.c index 23802712..b29b5e01 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strexpr.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strexpr.c @@ -113,7 +113,7 @@ typedef struct /* expression handle */ */ static long -seterror __PARAM__((register Expr_t* ex, char* msg), (ex, msg)) __OTORP__(register Expr_t* ex; char* msg;){ +seterror __PARAM__((Expr_t* ex, char* msg), (ex, msg)) __OTORP__(Expr_t* ex; char* msg;){ if (!ex->errmsg) ex->errmsg = msg; ex->errchr = ex->nextchr; ex->nextchr = ""; @@ -125,10 +125,10 @@ seterror __PARAM__((register Expr_t* ex, char* msg), (ex, msg)) __OTORP__(regist */ static long -expr __PARAM__((register Expr_t* ex, register int precedence), (ex, precedence)) __OTORP__(register Expr_t* ex; register int precedence;){ - register int c; - register long n; - register long x; +expr __PARAM__((Expr_t* ex, int precedence), (ex, precedence)) __OTORP__(Expr_t* ex; int precedence;){ + int c; + long n; + long x; char* pos; int operand = 1; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strgid.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strgid.c index a017ab4b..c2095472 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strgid.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strgid.c @@ -136,9 +136,9 @@ typedef struct int strgid __PARAM__((const char* name), (name)) __OTORP__(const char* name;){ - register struct group* gr; - register struct passwd* pw; - register bucket* b; + struct group* gr; + struct passwd* pw; + bucket* b; char* e; static Hash_table_t* gidtab; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strlook.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strlook.c index 21e80aa1..a52da940 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strlook.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strlook.c @@ -100,9 +100,9 @@ */ __V_* -strlook __PARAM__((const __V_* tab, int siz, register const char* name), (tab, siz, name)) __OTORP__(const __V_* tab; int siz; register const char* name;){ - register char* t = (char*)tab; - register char* s; +strlook __PARAM__((const __V_* tab, int siz, const char* name), (tab, siz, name)) __OTORP__(const __V_* tab; int siz; const char* name;){ + char* t = (char*)tab; + char* s; for (; s = *((char**)t); t += siz) if (streq(s, name)) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strmatch.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strmatch.c index 195f4a12..886646e3 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strmatch.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strmatch.c @@ -212,9 +212,9 @@ extern __MANGLE__ int fnmatch __PROTO__((const char*, const char*, int)); */ static char* -gobble __PARAM__((Match_t* mp, register char* s, register int sub, int* g, int clear), (mp, s, sub, g, clear)) __OTORP__(Match_t* mp; register char* s; register int sub; int* g; int clear;){ - register int p = 0; - register char* b = 0; +gobble __PARAM__((Match_t* mp, char* s, int sub, int* g, int clear), (mp, s, sub, g, clear)) __OTORP__(Match_t* mp; char* s; int sub; int* g; int clear;){ + int p = 0; + char* b = 0; int c = 0; int n; @@ -262,7 +262,7 @@ gobble __PARAM__((Match_t* mp, register char* s, register int sub, int* g, int c } } -static int grpmatch __PROTO__((Match_t*, int, char*, register char*, char*, int)); +static int grpmatch __PROTO__((Match_t*, int, char*, char*, char*, int)); #if _DEBUG_MATCH static long test; @@ -278,9 +278,9 @@ static long test; static int onematch __PARAM__((Match_t* mp, int g, char* s, char* p, char* e, char* r, int flags), (mp, g, s, p, e, r, flags)) __OTORP__(Match_t* mp; int g; char* s; char* p; char* e; char* r; int flags;){ - register int pc; - register int sc; - register int n; + int pc; + int sc; + int n; char* olds; char* oldp; @@ -687,8 +687,8 @@ onematch __PARAM__((Match_t* mp, int g, char* s, char* p, char* e, char* r, int */ static int -grpmatch __PARAM__((Match_t* mp, int g, char* s, register char* p, char* e, int flags), (mp, g, s, p, e, flags)) __OTORP__(Match_t* mp; int g; char* s; register char* p; char* e; int flags;){ - register char* a; +grpmatch __PARAM__((Match_t* mp, int g, char* s, char* p, char* e, int flags), (mp, g, s, p, e, flags)) __OTORP__(Match_t* mp; int g; char* s; char* p; char* e; int flags;){ + char* a; #if _DEBUG_MATCH error_info.indent++; @@ -719,8 +719,8 @@ grpmatch __PARAM__((Match_t* mp, int g, char* s, register char* p, char* e, int int strgrpmatch __PARAM__((const char* b, const char* p, int* sub, int n, int flags), (b, p, sub, n, flags)) __OTORP__(const char* b; const char* p; int* sub; int n; int flags;){ - register int i; - register char* s; + int i; + char* s; char* e; Match_t match; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strmode.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strmode.c index 54c3caba..7841eb69 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strmode.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strmode.c @@ -93,10 +93,10 @@ #include "modelib.h" int -strmode __PARAM__((register const char* s), (s)) __OTORP__(register const char* s;){ - register int c; - register char* t; - register struct modeop* p; +strmode __PARAM__((const char* s), (s)) __OTORP__(const char* s;){ + int c; + char* t; + struct modeop* p; int mode; mode = 0; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/stropt.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/stropt.c index df0264f7..5f089f06 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/stropt.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/stropt.c @@ -120,10 +120,10 @@ int stropt __PARAM__((const char* as, const __V_* tab, int siz, int(*f)(__V_*, const __V_*, int, const char*), __V_* a), (as, tab, siz, f, a)) __OTORP__(const char* as; const __V_* tab; int siz; int(*f)(); __V_* a;){ - register int c; - register char* s; - register char* v; - register char* t; + int c; + char* s; + char* v; + char* t; char** p; char* u; char* x; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strperm.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strperm.c index c2a81b3b..9276d1b5 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strperm.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strperm.c @@ -95,11 +95,11 @@ #include int -strperm __PARAM__((const char* aexpr, char** e, register int perm), (aexpr, e, perm)) __OTORP__(const char* aexpr; char** e; register int perm;){ - register char* expr = (char*)aexpr; - register int c; - register int typ; - register int who; +strperm __PARAM__((const char* aexpr, char** e, int perm), (aexpr, e, perm)) __OTORP__(const char* aexpr; char** e; int perm;){ + char* expr = (char*)aexpr; + int c; + int typ; + int who; int num; int op; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strsignal.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strsignal.c index 2be505b2..cbf71601 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strsignal.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strsignal.c @@ -102,7 +102,7 @@ #include char* -strsignal __PARAM__((register int sig), (sig)) __OTORP__(register int sig;) +strsignal __PARAM__((int sig), (sig)) __OTORP__(int sig;) #line 17 { static char buf[20]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strsort.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strsort.c index 65e8508f..3f938a72 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strsort.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strsort.c @@ -92,10 +92,10 @@ #endif void strsort __PARAM__((char** argv, int n, int(*fn)(const char*, const char*)), (argv, n, fn)) __OTORP__(char** argv; int n; int(*fn)();){ - register int i; - register int j; - register int m; - register char** ap; + int i; + int j; + int m; + char** ap; char* s; int k; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strtape.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strtape.c index ce14bf1b..36c3f705 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strtape.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strtape.c @@ -93,7 +93,7 @@ #include char* -strtape __PARAM__((register const char* s, register char** e), (s, e)) __OTORP__(register const char* s; register char** e;){ +strtape __PARAM__((const char* s, char** e), (s, e)) __OTORP__(const char* s; char** e;){ int mtunit = '0'; int mtdensity = 0; char mtrewind[2]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strton.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strton.c index 78c0108a..7d13118a 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strton.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strton.c @@ -94,11 +94,11 @@ #include long -strton __PARAM__((register const char* s, char** e, char* b, int m), (s, e, b, m)) __OTORP__(register const char* s; char** e; char* b; int m;){ - register long n; - register int c; - register int r; - register const char* p; +strton __PARAM__((const char* s, char** e, char* b, int m), (s, e, b, m)) __OTORP__(const char* s; char** e; char* b; int m;){ + long n; + int c; + int r; + const char* p; int z; if (!b || (r = *b) < 0 || r > 64) r = 0; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/struid.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/struid.c index fbf44913..dbd1ea15 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/struid.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/struid.c @@ -131,8 +131,8 @@ typedef struct int struid __PARAM__((const char* name), (name)) __OTORP__(const char* name;){ - register struct passwd* pw; - register bucket* b; + struct passwd* pw; + bucket* b; char* e; static Hash_table_t* uidtab; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/swapget.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/swapget.c index f1d810e5..05bd5c46 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/swapget.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/swapget.c @@ -99,8 +99,8 @@ int_max swapget __PARAM__((int op, const __V_* b, int n), (op, b, n)) __OTORP__(int op; const __V_* b; int n;){ - register unsigned char* p; - register unsigned char* d; + unsigned char* p; + unsigned char* d; int_max v; unsigned char tmp[sizeof(int_max)]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/swapmem.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/swapmem.c index c88cec82..0b7d3880 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/swapmem.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/swapmem.c @@ -99,10 +99,10 @@ */ __V_* -swapmem __PARAM__((int op, const __V_* from, __V_* to, register size_t n), (op, from, to, n)) __OTORP__(int op; const __V_* from; __V_* to; register size_t n;){ - register char* f = (char*)from; - register char* t = (char*)to; - register int c; +swapmem __PARAM__((int op, const __V_* from, __V_* to, size_t n), (op, from, to, n)) __OTORP__(int op; const __V_* from; __V_* to; size_t n;){ + char* f = (char*)from; + char* t = (char*)to; + int c; switch ((op ^ int_swap) & (n - 1)) { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/swapop.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/swapop.c index 62ea88c7..51f83fbf 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/swapop.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/swapop.c @@ -99,7 +99,7 @@ int swapop __PARAM__((const __V_* internal, const __V_* external, int size), (internal, external, size)) __OTORP__(const __V_* internal; const __V_* external; int size;){ - register int op; + int op; char tmp[sizeof(int_max)]; if (size <= 1) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/swapput.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/swapput.c index ebc46601..b26bd350 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/swapput.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/swapput.c @@ -99,7 +99,7 @@ __V_* swapput __PARAM__((int op, __V_* b, int n, int_max v), (op, b, n, v)) __OTORP__(int op; __V_* b; int n; int_max v;){ - register char* p = (char*)b + n; + char* p = (char*)b + n; while (p > (char*)b) { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/tabindex.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/tabindex.c index 799ac88d..6eb8f707 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/tabindex.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/tabindex.c @@ -108,11 +108,11 @@ */ int -tabindex __PARAM__((char* tab, int siz, register char* name), (tab, siz, name)) __OTORP__(char* tab; int siz; register char* name;) +tabindex __PARAM__((char* tab, int siz, char* name), (tab, siz, name)) __OTORP__(char* tab; int siz; char* name;) #line 18 { - register char* p; - register char* s; + char* p; + char* s; for (p = tab; s = *((char**)p); p += siz) if (streq(s, name)) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/tablook.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/tablook.c index 489977b3..1fb9a629 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/tablook.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/tablook.c @@ -108,10 +108,10 @@ */ char* -tablook __PARAM__((register char* tab, int siz, register char* name), (tab, siz, name)) __OTORP__(register char* tab; int siz; register char* name;) +tablook __PARAM__((char* tab, int siz, char* name), (tab, siz, name)) __OTORP__(char* tab; int siz; char* name;) #line 18 { - register char* s; + char* s; for (; s = *((char**)tab); tab += siz) if (streq(s, name)) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/tok.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/tok.c index 77cf61bf..4ffdce4e 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/tok.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/tok.c @@ -113,8 +113,8 @@ static struct tok* freelist; */ char* -tokopen __PARAM__((register char* s, int f), (s, f)) __OTORP__(register char* s; int f;){ - register TOK* p; +tokopen __PARAM__((char* s, int f), (s, f)) __OTORP__(char* s; int f;){ + TOK* p; if (p = freelist) freelist = freelist->ptr.nxt; else if (!(p = newof(0, TOK, 1, 0))) return(0); @@ -130,7 +130,7 @@ tokopen __PARAM__((register char* s, int f), (s, f)) __OTORP__(register char* s; void tokclose __PARAM__((char* u), (u)) __OTORP__(char* u;){ - register TOK* p = (TOK*)u; + TOK* p = (TOK*)u; if (p->flg) *p->ptr.end = p->chr; p->ptr.nxt = freelist; @@ -146,11 +146,11 @@ tokclose __PARAM__((char* u), (u)) __OTORP__(char* u;){ char* tokread __PARAM__((char* u), (u)) __OTORP__(char* u;){ - register TOK* p = (TOK*)u; - register char* s; - register char* r; - register int q; - register int c; + TOK* p = (TOK*)u; + char* s; + char* r; + int q; + int c; /* * restore string on each call diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/tokline.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/tokline.c index 31799b37..cf0655be 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/tokline.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/tokline.c @@ -107,11 +107,11 @@ typedef struct static int splice __PARAM__((Sfio_t* s, int op, Sfdisc_t* ad), (s, op, ad)) __OTORP__(Sfio_t* s; int op; Sfdisc_t* ad;){ SPLICE* d = (SPLICE*)ad; - register char* b; - register int c; - register int n; - register int q; - register char* e; + char* b; + int c; + int n; + int q; + char* e; char* buf; switch (op) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/tokscan.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/tokscan.c index 87850ee5..e669121e 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/tokscan.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/tokscan.c @@ -101,9 +101,9 @@ static char empty[1]; */ static char* -lextok __PARAM__((register char* s, register int c, char** p, int* n), (s, c, p, n)) __OTORP__(register char* s; register int c; char** p; int* n;){ - register char* t; - register int q; +lextok __PARAM__((char* s, int c, char** p, int* n), (s, c, p, n)) __OTORP__(char* s; int c; char** p; int* n;){ + char* t; + int q; char* b; char* u; @@ -198,10 +198,10 @@ lextok __PARAM__((register char* s, register int c, char** p, int* n), (s, c, p, */ int -tokscan __PARAM__((register char* s, char** nxt, const char* fmt, ...), (va_alist)) __OTORP__(va_dcl) -{ __OTORP__(register char* s; char** nxt; const char* fmt; ) - register int c; - register char* f; +tokscan __PARAM__((char* s, char** nxt, const char* fmt, ...), (va_alist)) __OTORP__(va_dcl) +{ __OTORP__(char* s; char** nxt; const char* fmt; ) + int c; + char* f; int num = 0; char* skip = 0; int q; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmdate.c b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmdate.c index 021f7d08..12d85144 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmdate.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmdate.c @@ -119,9 +119,9 @@ */ time_t -tmdate __PARAM__((register const char* s, char** e, time_t* clock), (s, e, clock)) __OTORP__(register const char* s; char** e; time_t* clock;){ - register Tm_t* tm; - register int n; +tmdate __PARAM__((const char* s, char** e, time_t* clock), (s, e, clock)) __OTORP__(const char* s; char** e; time_t* clock;){ + Tm_t* tm; + int n; int state; time_t now; char* t; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmfix.c b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmfix.c index 44ecc3d2..a55440ea 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmfix.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmfix.c @@ -103,8 +103,8 @@ */ Tm_t* -tmfix __PARAM__((register Tm_t* tp), (tp)) __OTORP__(register Tm_t* tp;){ - register int n; +tmfix __PARAM__((Tm_t* tp), (tp)) __OTORP__(Tm_t* tp;){ + int n; if ((n = tp->tm_sec) < 0) { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmfmt.c b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmfmt.c index 22ac523f..dd7a7134 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmfmt.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmfmt.c @@ -105,7 +105,7 @@ */ static char* -number __PARAM__((register char* s, register char* e, register long n, register int p), (s, e, n, p)) __OTORP__(register char* s; register char* e; register long n; register int p;){ +number __PARAM__((char* s, char* e, long n, int p), (s, e, n, p)) __OTORP__(char* s; char* e; long n; int p;){ if (p > 0) s += sfsprintf(s, 64, "%0*lu", p, n); else if (p < 0) s += sfsprintf(s, 64, "%*lu", -p, n); else s += sfsprintf(s, e - s, "%lu", n); @@ -119,10 +119,10 @@ number __PARAM__((register char* s, register char* e, register long n, register char* tmfmt __PARAM__((char* buf, size_t len, const char* format, time_t* clock), (buf, len, format, clock)) __OTORP__(char* buf; size_t len; const char* format; time_t* clock;){ - register char* cp; - register char* ep; - register char* p; - register int n; + char* cp; + char* ep; + char* p; + int n; int c; int i; int flags; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmgoff.c b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmgoff.c index f4968580..ad210c93 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmgoff.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmgoff.c @@ -102,8 +102,8 @@ */ int -tmgoff __PARAM__((register const char* s, char** e, int d), (s, e, d)) __OTORP__(register const char* s; char** e; int d;){ - register int n; +tmgoff __PARAM__((const char* s, char** e, int d), (s, e, d)) __OTORP__(const char* s; char** e; int d;){ + int n; char* t; if (isdigit(n = *s) || n == '-' || n == '+') diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tminit.c b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tminit.c index 4aceda96..1c2679ca 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tminit.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tminit.c @@ -139,9 +139,9 @@ Tm_info_t tm_info; static int tzwest __PARAM__((time_t* clock, int* isdst), (clock, isdst)) __OTORP__(time_t* clock; int* isdst;){ - register Tm_t* tp; - register int n; - register int m; + Tm_t* tp; + int n; + int m; int h; /* @@ -198,9 +198,9 @@ tmopt __PARAM__((__V_* a, const __V_* p, int n, const char* v), (a, p, n, v)) __ static void tmlocal __PARAM__((void), ()){ - register Tm_zone_t* zp; - register int n; - register char* s; + Tm_zone_t* zp; + int n; + char* s; int i; int m; int isdst; @@ -390,13 +390,13 @@ tmlocal __PARAM__((void), ()){ */ void -tminit __PARAM__((register Tm_zone_t* zp), (zp)) __OTORP__(register Tm_zone_t* zp;){ +tminit __PARAM__((Tm_zone_t* zp), (zp)) __OTORP__(Tm_zone_t* zp;){ if (!tm_info.local) tmlocal(); if (!zp) zp = tm_info.local; #if HUH950804 /* it only worked on systems that ignored TZ=...! */ if (zp != tm_info.zone) { - register char* s; + char* s; time_t clock; char buf[128]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmleap.c b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmleap.c index 118cba67..4e1527a4 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmleap.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmleap.c @@ -99,8 +99,8 @@ */ time_t -tmleap __PARAM__((register time_t* clock), (clock)) __OTORP__(register time_t* clock;){ - register Tm_leap_t* lp; +tmleap __PARAM__((time_t* clock), (clock)) __OTORP__(time_t* clock;){ + Tm_leap_t* lp; time_t now; tmset(tm_info.zone); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmlex.c b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmlex.c index e0a6b9b7..0eec9914 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmlex.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmlex.c @@ -107,8 +107,8 @@ */ int -tmlex __PARAM__((register const char* s, char** e, char** tab, register int ntab, char** suf, int nsuf), (s, e, tab, ntab, suf, nsuf)) __OTORP__(register const char* s; char** e; char** tab; register int ntab; char** suf; int nsuf;){ - register char** p; +tmlex __PARAM__((const char* s, char** e, char** tab, int ntab, char** suf, int nsuf), (s, e, tab, ntab, suf, nsuf)) __OTORP__(const char* s; char** e; char** tab; int ntab; char** suf; int nsuf;){ + char** p; for (p = tab; ntab-- && *p; p++) if (tmword(s, e, *p, suf, nsuf)) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmmake.c b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmmake.c index 41495e90..41e77d59 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmmake.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmmake.c @@ -100,8 +100,8 @@ Tm_t* tmmake __PARAM__((time_t* clock), (clock)) __OTORP__(time_t* clock;){ - register Tm_t* tp; - register Tm_leap_t* lp; + Tm_t* tp; + Tm_leap_t* lp; int leapsec; time_t now; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmpoff.c b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmpoff.c index 55b2f264..ad9e2556 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmpoff.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmpoff.c @@ -101,7 +101,7 @@ */ char* -tmpoff __PARAM__((register char* s, register const char* p, register int n, int d), (s, p, n, d)) __OTORP__(register char* s; register const char* p; register int n; int d;){ +tmpoff __PARAM__((char* s, const char* p, int n, int d), (s, p, n, d)) __OTORP__(char* s; const char* p; int n; int d;){ while (*s = *p++) s++; if (n != d) { diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmtime.c b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmtime.c index 7a7275f1..14800321 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmtime.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmtime.c @@ -102,9 +102,9 @@ */ time_t -tmtime __PARAM__((register Tm_t* tp, int west), (tp, west)) __OTORP__(register Tm_t* tp; int west;){ - register time_t clock; - register Tm_leap_t* lp; +tmtime __PARAM__((Tm_t* tp, int west), (tp, west)) __OTORP__(Tm_t* tp; int west;){ + time_t clock; + Tm_leap_t* lp; int n; int sec; time_t now; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmtype.c b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmtype.c index 705ed64d..6cebf8b4 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmtype.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmtype.c @@ -103,9 +103,9 @@ */ Tm_zone_t* -tmtype __PARAM__((register const char* s, char** e), (s, e)) __OTORP__(register const char* s; char** e;){ - register Tm_zone_t* zp; - register char* t; +tmtype __PARAM__((const char* s, char** e), (s, e)) __OTORP__(const char* s; char** e;){ + Tm_zone_t* zp; + char* t; tmset(tm_info.zone); zp = tm_info.local; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmword.c b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmword.c index 6853c2ac..1bd9d23a 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmword.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmword.c @@ -104,8 +104,8 @@ */ int -tmword __PARAM__((register const char* s, char** e, register const char* t, char** suf, int n), (s, e, t, suf, n)) __OTORP__(register const char* s; char** e; register const char* t; char** suf; int n;){ - register int c; +tmword __PARAM__((const char* s, char** e, const char* t, char** suf, int n), (s, e, t, suf, n)) __OTORP__(const char* s; char** e; const char* t; char** suf; int n;){ + int c; const char* b; if (*s && *t) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmzone.c b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmzone.c index dcbbbf7d..643f91e2 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmzone.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/tm/tmzone.c @@ -109,9 +109,9 @@ */ Tm_zone_t* -tmzone __PARAM__((register const char* name, char** end, const char* type, int* dst), (name, end, type, dst)) __OTORP__(register const char* name; char** end; const char* type; int* dst;){ - register Tm_zone_t* zp; - register char* prev; +tmzone __PARAM__((const char* name, char** end, const char* type, int* dst), (name, end, type, dst)) __OTORP__(const char* name; char** end; const char* type; int* dst;){ + Tm_zone_t* zp; + char* prev; tmset(tm_info.zone); zp = tm_info.local; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecargs.c b/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecargs.c index 2d3b2104..5c127c9e 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecargs.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecargs.c @@ -105,9 +105,9 @@ */ int -vecargs __PARAM__((register char** vec, int* argcp, char*** argvp), (vec, argcp, argvp)) __OTORP__(register char** vec; int* argcp; char*** argvp;){ - register char** argv; - register char** oargv; +vecargs __PARAM__((char** vec, int* argcp, char*** argvp), (vec, argcp, argvp)) __OTORP__(char** vec; int* argcp; char*** argvp;){ + char** argv; + char** oargv; char** ovec; char* s; int num; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecfile.c b/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecfile.c index 7123986c..99babacd 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecfile.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecfile.c @@ -100,9 +100,9 @@ char** vecfile __PARAM__((const char* file), (file)) __OTORP__(const char* file;){ - register int n; - register char* buf; - register char** vec; + int n; + char* buf; + char** vec; int fd; struct stat st; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecfree.c b/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecfree.c index 70c16355..aa9276a8 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecfree.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecfree.c @@ -101,7 +101,7 @@ */ void -vecfree __PARAM__((register char** vec, int retain), (vec, retain)) __OTORP__(register char** vec; int retain;){ +vecfree __PARAM__((char** vec, int retain), (vec, retain)) __OTORP__(char** vec; int retain;){ if (vec) { if (*(vec -= 2) && !retain) free(*vec); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecload.c b/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecload.c index 5162dd74..76cfa929 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecload.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecload.c @@ -108,9 +108,9 @@ char** vecload __PARAM__((char* buf), (buf)) __OTORP__(char* buf;){ - register char* s; - register int n; - register char** p; + char* s; + int n; + char** p; char** vec; vec = 0; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecstring.c b/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecstring.c index e9be2a5a..2523324f 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecstring.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/vec/vecstring.c @@ -99,8 +99,8 @@ char** vecstring __PARAM__((const char* str), (str)) __OTORP__(const char* str;){ - register char* buf; - register char** vec; + char* buf; + char** vec; if (!str || !*str || !(buf = strdup(str))) vec = 0; else if (!(vec = vecload(buf))) free(buf); diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmhdr.h b/cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmhdr.h index c69fdbd5..33de3c16 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmhdr.h +++ b/cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmhdr.h @@ -80,7 +80,7 @@ typedef struct _block_ Block_t; typedef struct _seg_ Seg_t; typedef struct _pfobj_ Pfobj_t; -#define reg register +#define reg /*no register keywords*/ #define NOTUSED(x) (&x,1) /* convert an address to an integral value */ diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmstrdup.c b/cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmstrdup.c index 4d75b600..f2e0627a 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmstrdup.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/vmalloc/vmstrdup.c @@ -98,9 +98,9 @@ */ char* -vmstrdup __PARAM__((Vmalloc_t* v, register const char* s), (v, s)) __OTORP__(Vmalloc_t* v; register const char* s;){ - register char* t; - register int n; +vmstrdup __PARAM__((Vmalloc_t* v, const char* s), (v, s)) __OTORP__(Vmalloc_t* v; const char* s;){ + char* t; + int n; return((t = vmalloc(v, n = strlen(s) + 1)) ? (char*)memcpy(t, s, n) : (char*)0); } diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/basename.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/basename.c index 8b451fe2..dcf16eb9 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/basename.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/basename.c @@ -94,9 +94,9 @@ static const char id[] = "\n@(#)basename (AT&T Bell Laboratories) 03/01/94\0\n"; #include -static void namebase __PARAM__((Sfio_t *outfile, register char *pathname, char *suffix), (outfile, pathname, suffix)) __OTORP__(Sfio_t *outfile; register char *pathname; char *suffix;){ - register char *first, *last; - register int n=0; +static void namebase __PARAM__((Sfio_t *outfile, char *pathname, char *suffix), (outfile, pathname, suffix)) __OTORP__(Sfio_t *outfile; char *pathname; char *suffix;){ + char *first, *last; + int n=0; for(first=last=pathname; *last; last++); /* back over trailing '/' */ if(last>first) @@ -126,8 +126,8 @@ static void namebase __PARAM__((Sfio_t *outfile, register char *pathname, char * } int -b_basename __PARAM__((int argc,register char *argv[]), (argc, argv)) __OTORP__(int argc;register char *argv[];){ - register int n; +b_basename __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){ + int n; NoP(id[0]); cmdinit(argv); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/cat.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/cat.c index 2f652340..ac9b81ca 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/cat.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/cat.c @@ -123,11 +123,11 @@ static char states[UCHAR_MAX+1]; static int vcat __PARAM__((Sfio_t *fdin, Sfio_t *fdout, int flags), (fdin, fdout, flags)) __OTORP__(Sfio_t *fdin; Sfio_t *fdout; int flags;){ - register unsigned char* cp; - register unsigned char* cpold; - register int n; - register int line = 1; - register unsigned char* endbuff; + unsigned char* cp; + unsigned char* cpold; + int n; + int line = 1; + unsigned char* endbuff; unsigned char* inbuff; int printdefer = (flags&(B_FLAG|N_FLAG)); int lastchar; @@ -240,10 +240,10 @@ vcat __PARAM__((Sfio_t *fdin, Sfio_t *fdout, int flags), (fdin, fdout, flags)) _ int b_cat __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){ - register int n; - register int flags = 0; - register char* cp; - register Sfio_t* fp; + int n; + int flags = 0; + char* cp; + Sfio_t* fp; int att; NoP(id[0]); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/chgrp.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/chgrp.c index bc1e335a..7efa793d 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/chgrp.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/chgrp.c @@ -135,9 +135,9 @@ extern __MANGLE__ int lchown __PROTO__((const char*, uid_t, gid_t)); */ static void -getids __PARAM__((register char* s, char** e, int* uid, int* gid, int flags), (s, e, uid, gid, flags)) __OTORP__(register char* s; char** e; int* uid; int* gid; int flags;){ - register char* t; - register int n; +getids __PARAM__((char* s, char** e, int* uid, int* gid, int flags), (s, e, uid, gid, flags)) __OTORP__(char* s; char** e; int* uid; int* gid; int flags;){ + char* t; + int n; char* z; char buf[64]; @@ -185,10 +185,10 @@ getids __PARAM__((register char* s, char** e, int* uid, int* gid, int flags), (s int b_chgrp __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){ - register int flags = 0; - register char* file; - register char* s; - register Map_t* m; + int flags = 0; + char* file; + char* s; + Map_t* m; Hash_table_t* map = 0; int resolve; int n; diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/chmod.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/chmod.c index ef5a1f2d..4f98e4ff 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/chmod.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/chmod.c @@ -114,12 +114,12 @@ extern __MANGLE__ int lchmod __PROTO__((const char*, mode_t)); int b_chmod __PARAM__((int argc, char* argv[]), (argc, argv)) __OTORP__(int argc; char* argv[];){ - register int mode; - register int force = 0; - register int recurse = 0; - register int resolve; - register char* amode; - register char* file; + int mode; + int force = 0; + int recurse = 0; + int resolve; + char* amode; + char* file; char* last; struct stat st; int (*chmodf) __PROTO__((const char*, mode_t)); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/cmd.h b/cde/programs/dtksh/ksh93/src/lib/libcmd/cmd.h index 32fac130..1ec6c49c 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/cmd.h +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/cmd.h @@ -111,8 +111,8 @@ */ static void -cmdinit __PARAM__((register char** argv), (argv)) __OTORP__(register char** argv;){ - register char* cp; +cmdinit __PARAM__((char** argv), (argv)) __OTORP__(char** argv;){ + char* cp; if (cp = strrchr(argv[0], '/')) cp++; else cp = argv[0]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/cmdinit.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/cmdinit.c index b956ebe0..52c4104e 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/cmdinit.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/cmdinit.c @@ -93,8 +93,8 @@ #include void -cmdinit __PARAM__((register char** argv), (argv)) __OTORP__(register char** argv;){ - register char* cp; +cmdinit __PARAM__((char** argv), (argv)) __OTORP__(char** argv;){ + char* cp; if (cp = strrchr(argv[0], '/')) cp++; else cp = argv[0]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/cmdrecurse.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/cmdrecurse.c index 238012a5..cd9ddfcb 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/cmdrecurse.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/cmdrecurse.c @@ -96,8 +96,8 @@ int cmdrecurse __PARAM__((int argc, char** argv, int pfxc, char** pfxv), (argc, argv, pfxc, pfxv)) __OTORP__(int argc; char** argv; int pfxc; char** pfxv;){ - register char** v; - register char** a; + char** v; + char** a; int resolve = 'L'; char arg[16]; diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/cmp.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/cmp.c index fa1b17c9..adc41136 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/cmp.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/cmp.c @@ -104,13 +104,13 @@ static const char id[] = "\n@(#)cmp (AT&T Bell Laboratories) 07/17/94\0\n"; static int cmp __PARAM__((const char* file1, Sfio_t* f1, const char* file2, Sfio_t* f2, int flags), (file1, f1, file2, f2, flags)) __OTORP__(const char* file1; Sfio_t* f1; const char* file2; Sfio_t* f2; int flags;){ - register int c1; - register int c2; - register unsigned char* p1 = 0; - register unsigned char* p2 = 0; - register int lines = 1; - register unsigned char* e1 = 0; - register unsigned char* e2 = 0; + int c1; + int c2; + unsigned char* p1 = 0; + unsigned char* p2 = 0; + int lines = 1; + unsigned char* e1 = 0; + unsigned char* e2 = 0; unsigned long pos = 0; int ret = 0; unsigned char* last; @@ -177,7 +177,7 @@ cmp __PARAM__((const char* file1, Sfio_t* f1, const char* file2, Sfio_t* f2, int } int -b_cmp __PARAM__((int argc, register char** argv), (argc, argv)) __OTORP__(int argc; register char** argv;){ +b_cmp __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){ char* s; char* e; Sfio_t* f1 = 0; diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/comm.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/comm.c index 1614ac31..0cf6f5b9 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/comm.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/comm.c @@ -99,9 +99,9 @@ static const char id[] = "\n@(#)comm (AT&T Bell Laboratories) 04/01/92\0\n"; #define C_COMMON 4 #define C_ALL (C_FILE1|C_FILE2|C_COMMON) -static int comm __PARAM__((Sfio_t *in1, Sfio_t *in2, register Sfio_t *out,register int mode), (in1, in2, out, mode)) __OTORP__(Sfio_t *in1; Sfio_t *in2; register Sfio_t *out;register int mode;){ - register char *cp1, *cp2; - register int n1, n2, n, comp; +static int comm __PARAM__((Sfio_t *in1, Sfio_t *in2, Sfio_t *out,int mode), (in1, in2, out, mode)) __OTORP__(Sfio_t *in1; Sfio_t *in2; Sfio_t *out;int mode;){ + char *cp1, *cp2; + int n1, n2, n, comp; if(cp1 = sfgetr(in1,'\n',0)) n1 = sfslen(); if(cp2 = sfgetr(in2,'\n',0)) @@ -181,9 +181,9 @@ static int comm __PARAM__((Sfio_t *in1, Sfio_t *in2, register Sfio_t *out,regist int b_comm __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){ - register int n; - register int mode = C_FILE1|C_FILE2|C_COMMON; - register char *cp; + int n; + int mode = C_FILE1|C_FILE2|C_COMMON; + char *cp; Sfio_t *f1, *f2; NoP(id[0]); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/cut.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/cut.c index a749ba68..f3c2d7f1 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/cut.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/cut.c @@ -119,14 +119,14 @@ static int seqno; * compare the first of an array of integers */ -static int mycomp __PARAM__((register const __V_ *a,register const __V_ *b), (a, b)) __OTORP__(register const __V_ *a;register const __V_ *b;){ +static int mycomp __PARAM__((const __V_ *a,const __V_ *b), (a, b)) __OTORP__(const __V_ *a;const __V_ *b;){ return(*((int*)a) - *((int*)b)); } static Cut_t *cutinit __PARAM__((int mode,char *str,int wdelim,int ldelim), (mode, str, wdelim, ldelim)) __OTORP__(int mode;char *str;int wdelim;int ldelim;){ - register int *lp, c, n=0; - register int range = 0; - register char *cp = str; + int *lp, c, n=0; + int range = 0; + char *cp = str; Cut_t *cuthdr; cuthdr = (Cut_t*)stakalloc(sizeof(Cut_t)+strlen(cp)*sizeof(int)); cuthdr->cflag = ((mode&C_CHARS)!=0); @@ -158,7 +158,7 @@ static Cut_t *cutinit __PARAM__((int mode,char *str,int wdelim,int ldelim), (mod } if(c==0) { - register int *dp; + int *dp; *lp = HUGE; n = 1 + (lp-cuthdr->list)/2; qsort(lp=cuthdr->list,n,2*sizeof(*lp),mycomp); @@ -227,10 +227,10 @@ static Cut_t *cutinit __PARAM__((int mode,char *str,int wdelim,int ldelim), (mod */ static int cutcols __PARAM__((const Cut_t *cuthdr,Sfio_t *fdin,Sfio_t *fdout), (cuthdr, fdin, fdout)) __OTORP__(const Cut_t *cuthdr;Sfio_t *fdin;Sfio_t *fdout;){ - register int c, ncol=0; - register const int *lp = cuthdr->list; - register char *inp, *inend; - register int skip; /* non-zero for don't copy */ + int c, ncol=0; + const int *lp = cuthdr->list; + char *inp, *inend; + int skip; /* non-zero for don't copy */ int inword = 0; while(inp = sfgetr(fdin,'\n', 0)) { @@ -267,12 +267,12 @@ static int cutcols __PARAM__((const Cut_t *cuthdr,Sfio_t *fdin,Sfio_t *fdout), ( static int cutfields __PARAM__((const Cut_t *cuthdr,Sfio_t *fdin,Sfio_t *fdout), (cuthdr, fdin, fdout)) __OTORP__(const Cut_t *cuthdr;Sfio_t *fdin;Sfio_t *fdout;){ static signed char space[1<list; - register unsigned char *copy; - register int nodelim, empty, inword=0; - register unsigned char *endbuff; + unsigned char *cp; + int c, nfields; + const int *lp = cuthdr->list; + unsigned char *copy; + int nodelim, empty, inword=0; + unsigned char *endbuff; unsigned char *inbuff, *first; int lastchar; Sfio_t *fdtmp = 0; @@ -384,8 +384,8 @@ failed: int b_cut __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){ - register char *cp; - register Sfio_t *fp; + char *cp; + Sfio_t *fp; int n; Cut_t *cuthdr; int mode = 0; diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/dirname.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/dirname.c index f42247cf..7357ff60 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/dirname.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/dirname.c @@ -94,8 +94,8 @@ static const char id[] = "\n@(#)dirname (AT&T Bell Laboratories) 07/17/92\0\n"; #include -static void dirname __PARAM__((register Sfio_t *outfile, register const char *pathname), (outfile, pathname)) __OTORP__(register Sfio_t *outfile; register const char *pathname;){ - register const char *last; +static void dirname __PARAM__((Sfio_t *outfile, const char *pathname), (outfile, pathname)) __OTORP__(Sfio_t *outfile; const char *pathname;){ + const char *last; /* go to end of path */ for(last=pathname; *last; last++); /* back over trailing '/' */ @@ -124,8 +124,8 @@ static void dirname __PARAM__((register Sfio_t *outfile, register const char *pa } int -b_dirname __PARAM__((int argc,register char *argv[]), (argc, argv)) __OTORP__(int argc;register char *argv[];){ - register int n; +b_dirname __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){ + int n; NoP(id[0]); cmdinit(argv); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/fold.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/fold.c index 4f75b57f..418a0167 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/fold.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/fold.c @@ -106,10 +106,10 @@ static const char id[] = "\n@(#)fold (AT&T Bell Laboratories) 04/01/92\0\n"; static char cols[1< int -b_head __PARAM__((int argc, register char *argv[]), (argc, argv)) __OTORP__(int argc; register char *argv[];){ +b_head __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){ static char header_fmt[] = "\n==> %s <==\n"; - register Sfio_t *fp; - register char *cp; - register long number = 10; - register off_t skip = 0; - register int n; - register int delim = '\n'; + Sfio_t *fp; + char *cp; + long number = 10; + off_t skip = 0; + int n; + int delim = '\n'; char *format = header_fmt+1; NoP(id[0]); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/id.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/id.c index d3e74b17..4f9d431b 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/id.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/id.c @@ -139,10 +139,10 @@ static const char id[] = "\n@(#)id (AT&T Bell Laboratories) 07/17/94\0\n"; #if _lib_fsid static void -getfsids __PARAM__((Sfio_t* sp, const char* name, int flags, register int lastchar), (sp, name, flags, lastchar)) __OTORP__(Sfio_t* sp; const char* name; int flags; register int lastchar;){ - register struct fsg* fs; - register char* s; - register char** p; +getfsids __PARAM__((Sfio_t* sp, const char* name, int flags, int lastchar), (sp, name, flags, lastchar)) __OTORP__(Sfio_t* sp; const char* name; int flags; int lastchar;){ + struct fsg* fs; + char* s; + char** p; char** x; if (lastchar) @@ -161,9 +161,9 @@ getfsids __PARAM__((Sfio_t* sp, const char* name, int flags, register int lastch if (flags > 0) x = 0; else { - register char** q; - register char* t; - register int n; + char** q; + char* t; + int n; n = 0; q = p; @@ -228,14 +228,14 @@ putid __PARAM__((Sfio_t* sp, int flags, const char* label, const char* name, lon } static int -getids __PARAM__((Sfio_t* sp, const char* name, register int flags), (sp, name, flags)) __OTORP__(Sfio_t* sp; const char* name; register int flags;){ - register struct passwd* pw; - register struct group* grp; - register int i; - register int j; - register int k; +getids __PARAM__((Sfio_t* sp, const char* name, int flags), (sp, name, flags)) __OTORP__(Sfio_t* sp; const char* name; int flags;){ + struct passwd* pw; + struct group* grp; + int i; + int j; + int k; #if _lib_fsid - register struct fsg* fs; + struct fsg* fs; const char* fs_name; int fs_id; #endif @@ -452,8 +452,8 @@ getids __PARAM__((Sfio_t* sp, const char* name, register int flags), (sp, name, int b_id __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){ - register int flags = 0; - register int n; + int flags = 0; + int n; NoP(id[0]); cmdinit(argv); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/join.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/join.c index d9e49a2c..9e9d8b62 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/join.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/join.c @@ -129,7 +129,7 @@ typedef struct #define S_SPACE 2 #define S_NL 3 -static void join_free __PARAM__((register Join_t *jp), (jp)) __OTORP__(register Join_t *jp;){ +static void join_free __PARAM__((Join_t *jp), (jp)) __OTORP__(Join_t *jp;){ if(jp->outlist) free(jp->outlist); free(jp->file[0].fieldlist); @@ -137,9 +137,9 @@ static void join_free __PARAM__((register Join_t *jp), (jp)) __OTORP__(register } static int getolist __PARAM__((Join_t* jp, const char *first, char** arglist), (jp, first, arglist)) __OTORP__(Join_t* jp; const char *first; char** arglist;){ - register const char *cp = first; + const char *cp = first; char **argv = arglist; - register int c; + int c; int *outptr, *outmax; int nfield = NFIELD; char *str; @@ -214,11 +214,11 @@ static int getolist __PARAM__((Join_t* jp, const char *first, char** arglist), ( * reads in a record from file and splits into fields */ static char *getrec __PARAM__((Join_t* jp, int index), (jp, index)) __OTORP__(Join_t* jp; int index;){ - register unsigned char *state = jp->state; - register struct jfile *fp = &jp->file[index]; - register char *cp, **ptr = fp->fieldlist; - register int n=0; - register char **ptrmax = ptr + fp->maxfields; + unsigned char *state = jp->state; + struct jfile *fp = &jp->file[index]; + char *cp, **ptr = fp->fieldlist; + int n=0; + char **ptrmax = ptr + fp->maxfields; fp->spaces = 0; if(!(cp = sfgetr(fp->iop, '\n', 0))) return(0); @@ -269,11 +269,11 @@ static char *getrec __PARAM__((Join_t* jp, int index), (jp, index)) __OTORP__(Jo /* * print field from file */ -static int outfield __PARAM__((Join_t* jp, int index, register int n, int last), (jp, index, n, last)) __OTORP__(Join_t* jp; int index; register int n; int last;){ - register struct jfile *fp = &jp->file[index]; - register char *cp, *cpmax; - register int size; - register Sfio_t *iop = jp->outfile; +static int outfield __PARAM__((Join_t* jp, int index, int n, int last), (jp, index, n, last)) __OTORP__(Join_t* jp; int index; int n; int last;){ + struct jfile *fp = &jp->file[index]; + char *cp, *cpmax; + int size; + Sfio_t *iop = jp->outfile; { if(n < fp->nfields) { @@ -315,9 +315,9 @@ static int outfield __PARAM__((Join_t* jp, int index, register int n, int last), return(0); } -static int joinout __PARAM__((register Join_t *jp, int mode), (jp, mode)) __OTORP__(register Join_t *jp; int mode;){ - register struct jfile *fp; - register int i,j,n; +static int joinout __PARAM__((Join_t *jp, int mode), (jp, mode)) __OTORP__(Join_t *jp; int mode;){ + struct jfile *fp; + int i,j,n; int last,*out; if(out= jp->outlist) { @@ -377,7 +377,7 @@ static int joinout __PARAM__((register Join_t *jp, int mode), (jp, mode)) __OTOR } static Join_t *join_init __PARAM__((void), ()){ - register Join_t *jp; + Join_t *jp; static Join_t Join; jp = &Join; memzero(jp->state, sizeof(jp->state)); @@ -393,8 +393,8 @@ static Join_t *join_init __PARAM__((void), ()){ } static int join __PARAM__((Join_t *jp), (jp)) __OTORP__(Join_t *jp;){ - register char *cp1, *cp2; - register int n1, n2, n, comp; + char *cp1, *cp2; + int n1, n2, n, comp; off_t offset = -1; int ndup=0; cp1 = getrec(jp,0); @@ -485,9 +485,9 @@ static int join __PARAM__((Join_t *jp), (jp)) __OTORP__(Join_t *jp;){ int b_join __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){ - register int n; - register char *cp; - register Join_t *jp = join_init(); + int n; + char *cp; + Join_t *jp = join_init(); NoP(id[0]); cmdinit(argv); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/logname.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/logname.c index fcd398af..5f7daefb 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/logname.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/logname.c @@ -102,8 +102,8 @@ extern __MANGLE__ char* getlogin __PROTO__((void)); int b_logname __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){ - register int n; - register char* logname; + int n; + char* logname; NoP(argc); NoP(id[0]); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/mkdir.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/mkdir.c index ee0398d3..89b34946 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/mkdir.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/mkdir.c @@ -99,9 +99,9 @@ static const char id[] = "\n@(#)mkdir (AT&T Bell Laboratories) 02/14/95\0\n"; int b_mkdir __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){ - register char *arg; - register mode_t mode=DIRMODE, mask; - register int n, mflag=0, pflag=0; + char *arg; + mode_t mode=DIRMODE, mask; + int n, mflag=0, pflag=0; mode_t dmode; NoP(argc); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/mkfifo.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/mkfifo.c index 794a6a44..8f6173ff 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/mkfifo.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/mkfifo.c @@ -99,9 +99,9 @@ static const char id[] = "\n@(#)mkfifo (AT&T Bell Laboratories) 04/01/92\0\n"; int b_mkfifo __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){ - register char *arg; - register mode_t mode=RWALL, mask=0; - register int n, mflag=0; + char *arg; + mode_t mode=RWALL, mask=0; + int n, mflag=0; NoP(argc); NoP(id[0]); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/paste.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/paste.c index a0baba7f..1ec829b1 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/paste.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/paste.c @@ -99,10 +99,10 @@ static const char id[] = "\n@(#)paste (AT&T Bell Laboratories) 04/01/92\0\n"; * to */ -static int paste __PARAM__((int nstream,Sfio_t* streams[],Sfio_t *out, register const char *delim,int dlen), (nstream, streams, out, delim, dlen)) __OTORP__(int nstream;Sfio_t* streams[];Sfio_t *out; register const char *delim;int dlen;){ - register const char *cp; - register int d, n, more=1; - register Sfio_t *fp; +static int paste __PARAM__((int nstream,Sfio_t* streams[],Sfio_t *out, const char *delim,int dlen), (nstream, streams, out, delim, dlen)) __OTORP__(int nstream;Sfio_t* streams[];Sfio_t *out; const char *delim;int dlen;){ + const char *cp; + int d, n, more=1; + Sfio_t *fp; do { d = (dlen>0?0:-1); @@ -135,7 +135,7 @@ static int paste __PARAM__((int nstream,Sfio_t* streams[],Sfio_t *out, register } if(++n=0) { - register int c; + int c; if(d >= dlen) d = 0; if(c=delim[d++]) @@ -150,9 +150,9 @@ static int paste __PARAM__((int nstream,Sfio_t* streams[],Sfio_t *out, register /* * Handles paste -s, for file to file using delimiters */ -static int spaste __PARAM__((Sfio_t *in,register Sfio_t* out,register const char *delim,int dlen), (in, out, delim, dlen)) __OTORP__(Sfio_t *in;register Sfio_t* out;register const char *delim;int dlen;){ - register const char *cp; - register int d=0; +static int spaste __PARAM__((Sfio_t *in,Sfio_t* out,const char *delim,int dlen), (in, out, delim, dlen)) __OTORP__(Sfio_t *in;Sfio_t* out;const char *delim;int dlen;){ + const char *cp; + int d=0; if(cp = sfgetr(in,'\n',0)) { if(sfwrite(out,cp,sfslen()-1) < 0) @@ -162,7 +162,7 @@ static int spaste __PARAM__((Sfio_t *in,register Sfio_t* out,register const char { if(dlen) { - register int c; + int c; if(d >= dlen) d = 0; if(c=delim[d++]) @@ -176,10 +176,10 @@ static int spaste __PARAM__((Sfio_t *in,register Sfio_t* out,register const char } int -b_paste __PARAM__((int argc,register char *argv[]), (argc, argv)) __OTORP__(int argc;register char *argv[];){ - register int n, sflag=0; - register Sfio_t *fp, **streams; - register char *cp, *delim = "\t"; /* default delimiter */ +b_paste __PARAM__((int argc,char *argv[]), (argc, argv)) __OTORP__(int argc;char *argv[];){ + int n, sflag=0; + Sfio_t *fp, **streams; + char *cp, *delim = "\t"; /* default delimiter */ int dlen; NoP(id[0]); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/pathchk.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/pathchk.c index 0bb56e90..995fc91b 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/pathchk.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/pathchk.c @@ -101,7 +101,7 @@ static const char id[] = "\n@(#)pathchk (AT&T Bell Laboratories) 11/04/92\0\n"; * call pathconf and handle unlimited sizes */ static long mypathconf __PARAM__((const char *path, int op), (path, op)) __OTORP__(const char *path; int op;){ - register long r; + long r; errno=0; if((r=pathconf(path, op))<0 && errno==0) return(LONG_MAX); @@ -112,9 +112,9 @@ static long mypathconf __PARAM__((const char *path, int op), (path, op)) __OTORP * returns 1 if passes test */ static int pathchk __PARAM__((char* path, int mode), (path, mode)) __OTORP__(char* path; int mode;){ - register char *cp=path, *cpold; - register int c; - register long r,name_max,path_max; + char *cp=path, *cpold; + int c; + long r,name_max,path_max; if(mode) { name_max = _POSIX_NAME_MAX; @@ -217,8 +217,8 @@ err: int b_pathchk __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){ - register int n, mode=0; - register char *cp; + int n, mode=0; + char *cp; NoP(argc); cmdinit(argv); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/rev.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/rev.c index 84b52c5c..5ed1e27c 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/rev.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/rev.c @@ -98,9 +98,9 @@ static const char id[] = "\n@(#)rev (AT&T Bell Laboratories) 11/11/92\0\n"; * reverse the characters within a line */ static int rev_char __PARAM__((Sfio_t *in, Sfio_t *out), (in, out)) __OTORP__(Sfio_t *in; Sfio_t *out;){ - register int c; - register char *ep, *bp, *cp; - register int n; + int c; + char *ep, *bp, *cp; + int n; while(cp = bp = sfgetr(in,'\n',0)) { ep = bp + (n=sfslen()) -1; @@ -117,10 +117,10 @@ static int rev_char __PARAM__((Sfio_t *in, Sfio_t *out), (in, out)) __OTORP__(Sf } int -b_rev __PARAM__((int argc, register char** argv), (argc, argv)) __OTORP__(int argc; register char** argv;){ - register Sfio_t *fp; - register char *cp; - register int n, line=0; +b_rev __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){ + Sfio_t *fp; + char *cp; + int n, line=0; NOT_USED(argc); NoP(id[0]); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/revlib.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/revlib.c index 9a2517a8..d152ac4c 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/revlib.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/revlib.c @@ -100,8 +100,8 @@ * in reverse order */ int rev_line __PARAM__((Sfio_t *in, Sfio_t *out, off_t start), (in, out, start)) __OTORP__(Sfio_t *in; Sfio_t *out; off_t start;){ - register char *cp, *cpold; - register int n, nleft=0; + char *cp, *cpold; + int n, nleft=0; char buff[BUFSIZE]; off_t offset; if(sfseek(in,(off_t)0,SEEK_CUR) < 0) diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/rmdir.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/rmdir.c index 402f0854..fecaca7b 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/rmdir.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/rmdir.c @@ -96,8 +96,8 @@ static const char id[] = "\n@(#)rmdir (AT&T Bell Laboratories) 05/09/95\0\n"; int b_rmdir __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){ - register char* dir; - register int n; + char* dir; + int n; NoP(argc); NoP(id[0]); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/tail.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/tail.c index 0b5d20b3..6318180a 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/tail.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/tail.c @@ -104,9 +104,9 @@ static const char id[] = "\n@(#)tail (AT&T Bell Laboratories) 05/03/94\0\n"; * If file is seekable, position file to tail location and return offset * Otherwise, return -1 */ -static off_t tailpos __PARAM__((register Sfio_t *fp, register long nitems, int delim), (fp, nitems, delim)) __OTORP__(register Sfio_t *fp; register long nitems; int delim;){ - register int nleft,n; - register off_t offset, first, last; +static off_t tailpos __PARAM__((Sfio_t *fp, long nitems, int delim), (fp, nitems, delim)) __OTORP__(Sfio_t *fp; long nitems; int delim;){ + int nleft,n; + off_t offset, first, last; if((first=sfseek(fp,(off_t)0,SEEK_CUR))<0) return((off_t)-1); last = sfsize(fp); @@ -145,8 +145,8 @@ static off_t tailpos __PARAM__((register Sfio_t *fp, register long nitems, int d * This code handles tail from a pipe without any size limits */ static void pipetail __PARAM__((Sfio_t *infile, Sfio_t *outfile, int nitems, int delim), (infile, outfile, nitems, delim)) __OTORP__(Sfio_t *infile; Sfio_t *outfile; int nitems; int delim;){ - register Sfio_t *out; - register int n=(2*SF_BUFSIZE), nleft=nitems, fno=0; + Sfio_t *out; + int n=(2*SF_BUFSIZE), nleft=nitems, fno=0; off_t offset[2]; Sfio_t *tmp[2]; if(delim<0 && nitems < n) @@ -188,8 +188,8 @@ static void pipetail __PARAM__((Sfio_t *infile, Sfio_t *outfile, int nitems, int int b_tail __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){ - register Sfio_t *fp; - register int n, delim='\n', flags=0; + Sfio_t *fp; + int n, delim='\n', flags=0; char *cp; off_t offset; long number = 10; @@ -332,7 +332,7 @@ b_tail __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char } if(flags&F_FLAG) { - register char *bufp; + char *bufp; while(1) { sfsync(sfstdout); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/tee.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/tee.c index aba297e8..63af358c 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/tee.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/tee.c @@ -108,11 +108,11 @@ struct tee */ static int tee_write __PARAM__((Sfio_t* fp, const __V_* buf, int n, Sfdisc_t* handle), (fp, buf, n, handle)) __OTORP__(Sfio_t* fp; const __V_* buf; int n; Sfdisc_t* handle;){ - register const char* bp; - register const char* ep; - register int* hp = ((struct tee*)handle)->fd; - register int fd = sffileno(fp); - register int r; + const char* bp; + const char* ep; + int* hp = ((struct tee*)handle)->fd; + int fd = sffileno(fp); + int r; do { @@ -131,12 +131,12 @@ static int tee_write __PARAM__((Sfio_t* fp, const __V_* buf, int n, Sfdisc_t* ha static Sfdisc_t tee_disc = { 0, tee_write, 0, 0, 0 }; int -b_tee __PARAM__((int argc, register char** argv), (argc, argv)) __OTORP__(int argc; register char** argv;){ - register struct tee* tp = 0; - register int oflag = O_WRONLY|O_TRUNC|O_CREAT; - register int n; - register int* hp; - register char* cp; +b_tee __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){ + struct tee* tp = 0; + int oflag = O_WRONLY|O_TRUNC|O_CREAT; + int n; + int* hp; + char* cp; NoP(id[0]); cmdinit(argv); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/tty.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/tty.c index 258fec5a..46b8b18d 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/tty.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/tty.c @@ -96,8 +96,8 @@ static const char id[] = "\n@(#)tty (AT&T Bell Laboratories) 04/01/92\0\n"; int b_tty __PARAM__((int argc, char *argv[]), (argc, argv)) __OTORP__(int argc; char *argv[];){ - register int n,sflag=0; - register char *tty; + int n,sflag=0; + char *tty; NoP(argc); NoP(id[0]); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/uname.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/uname.c index d8387a1a..75023b09 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/uname.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/uname.c @@ -178,7 +178,7 @@ struct utsname }; int -uname __PARAM__((register struct utsname* ut), (ut)) __OTORP__(register struct utsname* ut;){ +uname __PARAM__((struct utsname* ut), (ut)) __OTORP__(struct utsname* ut;){ #ifdef HOSTTYPE char* sys = 0; char* arch = 0; @@ -252,9 +252,9 @@ static int all = ((M_FLAG<<1)-1); int b_uname __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){ - register int n; - register int flags = 0; - register char* s; + int n; + int flags = 0; + char* s; char* sethost = 0; struct utsname ut; char* last = (char*)&ut.machine + sizeof(ut.machine); diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/uniq.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/uniq.c index e20c5b70..48dd8264 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/uniq.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/uniq.c @@ -106,7 +106,7 @@ static const char id[] = "\n@(#)uniq (AT&T Bell Laboratories) 04/01/93\0\n"; static char *sidebuff __PARAM__((int size), (size)) __OTORP__(int size;){ static int maxbuff; static char *buff; - register char *cp=0; + char *cp=0; if(size) { if(size <= maxbuff) @@ -123,8 +123,8 @@ static char *sidebuff __PARAM__((int size), (size)) __OTORP__(int size;){ } static int uniq __PARAM__((Sfio_t *fdin, Sfio_t *fdout, int fields, int chars, int mode), (fdin, fdout, fields, chars, mode)) __OTORP__(Sfio_t *fdin; Sfio_t *fdout; int fields; int chars; int mode;){ - register int n, outsize=0; - register char *cp, *bufp, *outp; + int n, outsize=0; + char *cp, *bufp, *outp; char *orecp, *sbufp=0, *outbuff; int reclen,oreclen= -1,count=0, cwidth=0; if(mode&C_FLAG) @@ -225,8 +225,8 @@ static int uniq __PARAM__((Sfio_t *fdin, Sfio_t *fdout, int fields, int chars, i int b_uniq __PARAM__((int argc, char** argv), (argc, argv)) __OTORP__(int argc; char** argv;){ - register int n, mode=0; - register char *cp; + int n, mode=0; + char *cp; int fields=0, chars=0; Sfio_t *fpin, *fpout; diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/wc.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/wc.c index 415bcddc..b6b434c5 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/wc.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/wc.c @@ -98,7 +98,7 @@ static const char id[] = "\n@(#)wc (AT&T Bell Laboratories) 08/11/94\0\n"; #define ERRORMAX 125 -static void printout __PARAM__((register Wc_t *wp, register char *name,register int mode), (wp, name, mode)) __OTORP__(register Wc_t *wp; register char *name;register int mode;){ +static void printout __PARAM__((Wc_t *wp, char *name,int mode), (wp, name, mode)) __OTORP__(Wc_t *wp; char *name;int mode;){ if(mode&WC_LINES) sfprintf(sfstdout," %7lu",wp->lines); if(mode&WC_WORDS) @@ -109,10 +109,10 @@ static void printout __PARAM__((register Wc_t *wp, register char *name,register } int -b_wc __PARAM__((int argc,register char **argv), (argc, argv)) __OTORP__(int argc;register char **argv;){ - register char *cp; - register int mode=0, n; - register Wc_t *wp; +b_wc __PARAM__((int argc,char **argv), (argc, argv)) __OTORP__(int argc;char **argv;){ + char *cp; + int mode=0, n; + Wc_t *wp; Sfio_t *fp; long tlines=0, twords=0, tchars=0; struct stat statb; diff --git a/cde/programs/dtksh/ksh93/src/lib/libcmd/wclib.c b/cde/programs/dtksh/ksh93/src/lib/libcmd/wclib.c index c60f67bf..44c35c34 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libcmd/wclib.c +++ b/cde/programs/dtksh/ksh93/src/lib/libcmd/wclib.c @@ -97,7 +97,7 @@ #define endline(c) (((signed char)-1)<0?(c)<0:(c)==((char)-1)) Wc_t *wc_init __PARAM__((char *space), (space)) __OTORP__(char *space;){ - register int n; + int n; Wc_t *wp; if(!(wp = (Wc_t*)stakalloc(sizeof(Wc_t)))) @@ -117,12 +117,12 @@ Wc_t *wc_init __PARAM__((char *space), (space)) __OTORP__(char *space;){ * compute the line, word, and character count for file */ wc_count __PARAM__((Wc_t *wp, Sfio_t *fd), (wp, fd)) __OTORP__(Wc_t *wp; Sfio_t *fd;){ - register signed char *space = wp->space; - register unsigned char *cp; - register long nwords; - register int c; - register unsigned char *endbuff; - register int lasttype = 1; + signed char *space = wp->space; + unsigned char *cp; + long nwords; + int c; + unsigned char *endbuff; + int lasttype = 1; unsigned int lastchar; unsigned char *buff; wp->lines = nwords = wp->chars = 0; diff --git a/cde/programs/dtksh/ksh93/src/lib/libodelta/delta.c b/cde/programs/dtksh/ksh93/src/lib/libodelta/delta.c index c4bf48f6..53a9dd8f 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libodelta/delta.c +++ b/cde/programs/dtksh/ksh93/src/lib/libodelta/delta.c @@ -137,8 +137,8 @@ static int delputc __PARAM__((int byte), (byte)) __OTORP__(int byte;){ return 0; } -static int delputl __PARAM__((register int n, register long v), (n, v)) __OTORP__(register int n; register long v;){ - register int i; +static int delputl __PARAM__((int n, long v), (n, v)) __OTORP__(int n; long v;){ + int i; unsigned char c[4]; for(i = 0; i < n; ++i) @@ -152,7 +152,7 @@ static int delputl __PARAM__((register int n, register long v), (n, v)) __OTORP_ return 0; } -static int delputs __PARAM__((register long n, register long addr), (n, addr)) __OTORP__(register long n; register long addr;){ +static int delputs __PARAM__((long n, long addr), (n, addr)) __OTORP__(long n; long addr;){ if(n < (Dend-Dnext)) { memcpy(Dnext,Btar+addr,n); @@ -170,7 +170,7 @@ static int delputs __PARAM__((register long n, register long addr), (n, addr)) _ /* write an instruction */ static int putMove __PARAM__((Move* ip), (ip)) __OTORP__(Move* ip;){ - register char inst; + char inst; inst = ip->type; inst |= (NBYTE(ip->size)&07) << 3; @@ -194,7 +194,7 @@ static int putMove __PARAM__((Move* ip), (ip)) __OTORP__(Move* ip;){ /* constructor for Move */ static Move *newMove __PARAM__((int type, long size, long addr, Move* last), (type, size, addr, last)) __OTORP__(int type; long size; long addr; Move* last;){ - register Move *ip = (Move*) malloc(sizeof(Move)); + Move *ip = (Move*) malloc(sizeof(Move)); if(!ip) return 0; ip->type = type; ip->size = size; @@ -211,8 +211,8 @@ static Move *newMove __PARAM__((int type, long size, long addr, Move* last), (ty /* destructor for Move, return the elt after move */ static Move *delMove __PARAM__((Move* ip), (ip)) __OTORP__(Move* ip;){ - register Move *next = ip->next; - register Move *last = ip->last; + Move *next = ip->next; + Move *last = ip->last; if(last) last->next = next; if(next) @@ -223,7 +223,7 @@ static Move *delMove __PARAM__((Move* ip), (ip)) __OTORP__(Move* ip;){ /* make a new add command */ static Move *makeAdd __PARAM__((char* beg, char* end, Move* last), (beg, end, last)) __OTORP__(char* beg; char* end; Move* last;){ - register Move *ip; + Move *ip; ip = newMove(DELTA_ADD,(long)(end-beg),(long)(beg-Btar),NiL); if(!ip) @@ -232,7 +232,7 @@ static Move *makeAdd __PARAM__((char* beg, char* end, Move* last), (beg, end, la /* remove small previous adjacent moves */ while(last) { - register int a_size, cost_m, cost_a; + int a_size, cost_m, cost_a; if(last->type == DELTA_ADD) break; @@ -267,7 +267,7 @@ static Move *makeAdd __PARAM__((char* beg, char* end, Move* last), (beg, end, la /* check to see if a move is appropriate */ static int chkMove __PARAM__((long m_size, long m_addr, long a_size), (m_size, m_addr, a_size)) __OTORP__(long m_size; long m_addr; long a_size;){ - register int cost_m, cost_a; + int cost_m, cost_a; cost_m = NBYTE(m_size) + NBYTE(m_addr); cost_a = NBYTE(m_size) + m_size; @@ -277,7 +277,7 @@ static int chkMove __PARAM__((long m_size, long m_addr, long a_size), (m_size, m /* it's good but it may be better to merge it to an add */ if(a_size > 0) { - register int m_cost, a_cost; + int m_cost, a_cost; m_cost = cost_m + NBYTE(a_size) + a_size; a_size += m_size; @@ -292,9 +292,9 @@ static int chkMove __PARAM__((long m_size, long m_addr, long a_size), (m_size, m } /* optimize a sequence of moves */ -static Move *optMove __PARAM__((register Move* s), (s)) __OTORP__(register Move* s;){ - register long add, m_cost, a_cost; - register Move *ip, *last; +static Move *optMove __PARAM__((Move* s), (s)) __OTORP__(Move* s;){ + long add, m_cost, a_cost; + Move *ip, *last; add = (s->last && s->last->type == DELTA_ADD) ? s->last->size : 0; @@ -302,7 +302,7 @@ static Move *optMove __PARAM__((register Move* s), (s)) __OTORP__(register Move* a_cost = 0; for(ip = s; ip; ip = ip->next) { - register long cost_m, cost_a; + long cost_m, cost_a; if(ip->type == DELTA_ADD || ip->size > (M_MAX+A_MAX)) break; @@ -360,8 +360,8 @@ static Move *optMove __PARAM__((register Move* s), (s)) __OTORP__(register Move* /* the real thing */ int delta __PARAM__((char* src, long n_src, char* tar, long n_tar, int delfd), (src, n_src, tar, n_tar, delfd)) __OTORP__(char* src; long n_src; char* tar; long n_tar; int delfd;){ - register char *sp, *tp, *esrc, *etar; - register long size, addr; + char *sp, *tp, *esrc, *etar; + long size, addr; Suftree *tree; Move *moves, *last; char inst, buf[BUFSIZE]; @@ -395,7 +395,7 @@ delta __PARAM__((char* src, long n_src, char* tar, long n_tar, int delfd), (src, break; if((size = src-Bsrc) > 0) { - register int cost_m, cost_a; + int cost_m, cost_a; cost_m = NBYTE(size) + NBYTE(0); cost_a = NBYTE(size) + size; @@ -501,7 +501,7 @@ delta __PARAM__((char* src, long n_src, char* tar, long n_tar, int delfd), (src, /* optimize move instructions */ if(moves) { - register Move *ip; + Move *ip; ip = moves; while(ip->last) diff --git a/cde/programs/dtksh/ksh93/src/lib/libodelta/mtchstring.c b/cde/programs/dtksh/ksh93/src/lib/libodelta/mtchstring.c index 9a732a43..50bb63d2 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libodelta/mtchstring.c +++ b/cde/programs/dtksh/ksh93/src/lib/libodelta/mtchstring.c @@ -100,7 +100,7 @@ #define ALPHA (256) /* alphabet size */ static void freemem __PARAM__((long* n_index, char*** index), (n_index, index)) __OTORP__(long* n_index; char*** index;){ - register int i; + int i; if(n_index && index) { for(i = 0; i < ALPHA; ++i) @@ -113,7 +113,7 @@ static void freemem __PARAM__((long* n_index, char*** index), (n_index, index)) /* initial assumptions: src[0] == tar[0] && src+n_match <= endsrc */ static long domatch __PARAM__((char* src, char* endsrc, char* tar, char* endtar, long n_match), (src, endsrc, tar, endtar, n_match)) __OTORP__(char* src; char* endsrc; char* tar; char* endtar; long n_match;){ - register char *sp, *tp; + char *sp, *tp; /* see if this really improves on the current match */ for(sp = src+n_match, tp = tar+n_match; sp > src; --sp, --tp) @@ -136,9 +136,9 @@ static long domatch __PARAM__((char* src, char* endsrc, char* tar, char* endtar, long mtchstring __PARAM__((char* src, long n_src, char* tar, long n_tar, char** match), (src, n_src, tar, n_tar, match)) __OTORP__(char* src; long n_src; char* tar; long n_tar; char** match;){ char *endsrc, *endtar; long n_match; - register int i; - register long n_ind; - register char **ind; + int i; + long n_ind; + char **ind; static long *N_index = 0; static char *Cursrc = 0, ***Index = 0; static int Alloced = 0; @@ -166,7 +166,7 @@ long mtchstring __PARAM__((char* src, long n_src, char* tar, long n_tar, char** Alloced = 1; if(N_index = (long*) malloc(ALPHA*sizeof(long))) { - register char *sp; + char *sp; memzero(N_index,ALPHA*sizeof(long)); if(!(Index = (char ***) malloc(ALPHA*sizeof(char**)))) @@ -213,7 +213,7 @@ long mtchstring __PARAM__((char* src, long n_src, char* tar, long n_tar, char** n_match = 0; while(1) { - register long m; + long m; if(ind) { diff --git a/cde/programs/dtksh/ksh93/src/lib/libodelta/suftree.c b/cde/programs/dtksh/ksh93/src/lib/libodelta/suftree.c index 23c224a6..8fd413ac 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libodelta/suftree.c +++ b/cde/programs/dtksh/ksh93/src/lib/libodelta/suftree.c @@ -122,7 +122,7 @@ void delsuftree __PARAM__((Suftree* root), (root)) __OTORP__(Suftree* root;){ root -= 1; while(root) { - register Suftree *next; + Suftree *next; next = NEXT(root); free(root); root = next; @@ -131,7 +131,7 @@ void delsuftree __PARAM__((Suftree* root), (root)) __OTORP__(Suftree* root;){ /* Find a child whose label string starts with a given character */ static Suftree *child_find __PARAM__((Suftree* node, Element c), (node, c)) __OTORP__(Suftree* node; Element c;){ - register Suftree *np, *last; + Suftree *np, *last; last = 0; for(np = CHILD(node); np; np = SIBLING(np)) @@ -186,10 +186,10 @@ static Suftree *getmem __PARAM__((Suftree* root, int n), (root, n)) __OTORP__(Su ** of the previously inserted suffix. */ Suftree *bldsuftree __PARAM__((Element* src, long len), (src, len)) __OTORP__(Element* src; long len;){ - register Element *sp, *mp, *rescan, *endmatch, *endsrc; - register Suftree *match, *clocus, *locus, *link; - register long mtlen, relen; - register int n; + Element *sp, *mp, *rescan, *endmatch, *endsrc; + Suftree *match, *clocus, *locus, *link; + long mtlen, relen; + int n; Suftree *root, *list, *endlist; if(len == 0) @@ -383,9 +383,9 @@ Suftree *bldsuftree __PARAM__((Element* src, long len), (src, len)) __OTORP__(El string represented by the tree. */ long mtchsuftree __PARAM__((Suftree* tree, Element* str, long len, Element** mtchp), (tree, str, len, mtchp)) __OTORP__(Suftree* tree; Element* str; long len; Element** mtchp;){ - register Suftree *match; - register Element *sp, *mp, *endmp, *endstr; - register long mlen; + Suftree *match; + Element *sp, *mp, *endmp, *endstr; + long mlen; mlen = 0; endstr = str + len; diff --git a/cde/programs/dtksh/ksh93/src/lib/libodelta/update.c b/cde/programs/dtksh/ksh93/src/lib/libodelta/update.c index 449ccfc7..85621c3e 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libodelta/update.c +++ b/cde/programs/dtksh/ksh93/src/lib/libodelta/update.c @@ -112,7 +112,7 @@ static int Dfd, Tfd; static int delgetc __PARAM__((void), ()){ if(Dnext >= Dend) { - register int n; + int n; if((n = read(Dfd,(char*)Ddata,BUFSIZE)) <= 0) return -1; Dnext = Ddata, Dend = Ddata+n; @@ -121,13 +121,13 @@ static int delgetc __PARAM__((void), ()){ } /* read a long value from delta file */ -static long delgetl __PARAM__((register int n), (n)) __OTORP__(register int n;){ - register long lv; +static long delgetl __PARAM__((int n), (n)) __OTORP__(int n;){ + long lv; lv = 0; for(; n > 0; --n) { - register int v; + int v; if((v = delgetc()) < 0) return -1; lv = lv*256 + v; @@ -139,7 +139,7 @@ static long delgetl __PARAM__((register int n), (n)) __OTORP__(register int n;){ static int filetransfer __PARAM__((int fd, long n), (fd, n)) __OTORP__(int fd; long n;){ while(n > 0) { - register int r; + int r; if(Tnext >= Tend) if(tarflush() < 0) @@ -154,10 +154,10 @@ static int filetransfer __PARAM__((int fd, long n), (fd, n)) __OTORP__(int fd; l } /* transfer a number of bytes from a memory area to the target file */ -static int memtransfer __PARAM__((unsigned char* addr, register long n), (addr, n)) __OTORP__(unsigned char* addr; register long n;){ +static int memtransfer __PARAM__((unsigned char* addr, long n), (addr, n)) __OTORP__(unsigned char* addr; long n;){ while(n > 0) { - register int r; + int r; if(Tnext >= Tend) if(tarflush() < 0) @@ -173,12 +173,12 @@ static int memtransfer __PARAM__((unsigned char* addr, register long n), (addr, /* transfer a number of bytes from delta to target */ static int deltransfer __PARAM__((long n), (n)) __OTORP__(long n;){ - register int d; + int d; /* transfer what's already in core */ if((d = Dend-Dnext) > 0) { - register int w = n <= d ? n : d; + int w = n <= d ? n : d; if(w > (Tend-Tnext)) if(tarflush() < 0) @@ -196,8 +196,8 @@ static int deltransfer __PARAM__((long n), (n)) __OTORP__(long n;){ int update __PARAM__((int srcfd, long offset, int delfd, int tarfd), (srcfd, offset, delfd, tarfd)) __OTORP__(int srcfd; long offset; int delfd; int tarfd;){ - register int i; - register long n_src, n_tar; + int i; + long n_src, n_tar; unsigned char delbuf[BUFSIZE], tarbuf[BUFSIZE]; unsigned char *src, *tar; @@ -225,7 +225,7 @@ update __PARAM__((int srcfd, long offset, int delfd, int tarfd), (srcfd, offset, while((i = delgetc()) >= 0) { - register long size, addr; + long size, addr; if((size = delgetl((i>>3)&07)) < 0) return -1; diff --git a/cde/programs/dtksh/ksh93/src/lib/libvdelta/vdelhdr.h b/cde/programs/dtksh/ksh93/src/lib/libvdelta/vdelhdr.h index 950c2dd9..d248d757 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libvdelta/vdelhdr.h +++ b/cde/programs/dtksh/ksh93/src/lib/libvdelta/vdelhdr.h @@ -72,7 +72,7 @@ _END_EXTERNS_ #endif /* short-hand notations */ -#define reg register +#define reg /*no register keywords*/ #define uchar unsigned char #define uint unsigned int #define ulong unsigned long diff --git a/cde/programs/dtksh/msgs.h b/cde/programs/dtksh/msgs.h index f28c2b4a..7d674467 100644 --- a/cde/programs/dtksh/msgs.h +++ b/cde/programs/dtksh/msgs.h @@ -63,7 +63,7 @@ char * GetSharedMsg( /* * Without this proto, standard C says that _DtGetMessage() returns * an int, even though it really returns a pointer. The compiler is - * then free to use the high 32-bits of the return register for + * then free to use the high 32-bits of the return for * something else (like scratch), and that can garble the pointer. */ # ifdef _NO_PROTO diff --git a/cde/programs/dtksh/struct.c b/cde/programs/dtksh/struct.c index 23a44ef9..8617ae0d 100644 --- a/cde/programs/dtksh/struct.c +++ b/cde/programs/dtksh/struct.c @@ -638,7 +638,7 @@ all_tbl_search( char *name, int flag ) { - register int i; + int i; void *found; if (!structInited) @@ -647,8 +647,8 @@ all_tbl_search( if (found = (void *) xkhash_find(Hashnams, name)) return((memtbl_t *) found); else { - register int j; - register memtbl_t **subtbl; + int j; + memtbl_t **subtbl; for (i = 0; i < Nstructlist; i++) { if (subtbl = Structlist[i].mem) diff --git a/cde/programs/dtksh/widget.c b/cde/programs/dtksh/widget.c index 22479423..8ef221e8 100644 --- a/cde/programs/dtksh/widget.c +++ b/cde/programs/dtksh/widget.c @@ -113,7 +113,7 @@ static void pr_widheader( void ) ; void init_widgets( void ) { - register int i, n = 0; + int i, n = 0; char *nam; wtab_t *wentries; char * errmsg; @@ -163,7 +163,7 @@ str_to_class( char *arg0, char *s ) { - register int i, j, n; + int i, j, n; Widget w; char *nam; classtab_t *ret; @@ -429,7 +429,7 @@ wtab_t * widget_to_wtab( Widget w ) { - register int i; + int i; char * errmsg; if (w == NULL) @@ -495,7 +495,7 @@ get_new_wtab( char *name ) { - register int i; + int i; /* * If there has been a destroywidget call, then one or more @@ -518,7 +518,7 @@ get_new_wtab( if (NumW < MaxW) { i = NumW++; } else { - register int j; + int j; int oldmax = MaxW; wtab_t *wentries; @@ -545,7 +545,7 @@ fixupresources( resfixup_t *fixups ) { XtResource *resource; - register int i; + int i; char *nam; if (fixups == NULL) @@ -658,7 +658,7 @@ _pr_resource_list( static void sort_and_print_res( void ) { - register int i; + int i; qsort(Res, Nres, sizeof(XtResource *), (int (*)())rescompare); for (i = 0; i < Nres; i++) { _pr_resource_list(Res[i]); @@ -826,7 +826,7 @@ do_DtWidgetInfo( int argc, char *argv[] ) { - register int i, j; + int i, j; char buf[1024]; wtab_t *w; classtab_t *c; diff --git a/cde/programs/dtksh/xmcmds.c b/cde/programs/dtksh/xmcmds.c index 0bb9d869..07429896 100644 --- a/cde/programs/dtksh/xmcmds.c +++ b/cde/programs/dtksh/xmcmds.c @@ -652,7 +652,7 @@ _xmcreatefunc( wtab_t *w, *pw, *wtab, *parenttab; char *wname, *parentid, *var; Arg args[MAXARGS]; - register int i; + int i; int n; char * errmsg; int pargc; @@ -2336,7 +2336,7 @@ do_XmMainWindowSetAreas( { char *arg0 = argv[0]; wtab_t *w[6]; - register int i; + int i; char * errmsg; if (argc != 7) @@ -4992,7 +4992,7 @@ _CreatePDMJobSetup( char *arg0 = argv[0]; wtab_t *w, *pw, *wtab, *parenttab; char *parentid, *var; - register int i; + int i; int n; char * errmsg; WidgetClass wclass; diff --git a/cde/programs/dtksh/xmcvt.c b/cde/programs/dtksh/xmcvt.c index daf743b0..09955a73 100644 --- a/cde/programs/dtksh/xmcvt.c +++ b/cde/programs/dtksh/xmcvt.c @@ -264,7 +264,7 @@ DtkshCvtNamedValueToString( struct named_integer *table; int numtable; long value; - register int i; + int i; char * errmsg; switch(fval->size) @@ -335,7 +335,7 @@ DtkshCvtStringToNamedValue( struct named_integer *table; int numtable; char *value; - register int i; + int i; char * errbuf; char * errmsg; diff --git a/cde/programs/dtksh/xmwidgets.c b/cde/programs/dtksh/xmwidgets.c index e31ce440..a3833442 100644 --- a/cde/programs/dtksh/xmwidgets.c +++ b/cde/programs/dtksh/xmwidgets.c @@ -291,7 +291,7 @@ classtab_t C[] = { void toolkit_init_widgets( void ) { - register int i, n = 0; + int i, n = 0; struct namnod *nam; if (C[0].class != NULL)