From 5ba9c2f13fedf1d8d6ed907ef1f505616290efaa Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Wed, 29 Apr 2015 07:09:43 +0200 Subject: [PATCH] Drop register storage class --- sbr/addrsbr.c | 6 +++--- sbr/context_del.c | 2 +- sbr/context_read.c | 4 ++-- sbr/context_replace.c | 2 +- sbr/context_save.c | 2 +- sbr/cpydgst.c | 6 +++--- sbr/crawl_folders.c | 2 +- sbr/dtimep.lex | 4 ++-- sbr/fmt_addr.c | 12 ++++++------ sbr/fmt_compile.c | 48 +++++++++++++++++++++++------------------------ sbr/fmt_new.c | 2 +- sbr/gans.c | 6 +++--- sbr/m_convert.c | 8 ++++---- sbr/m_draft.c | 2 +- sbr/m_getfld.c | 24 ++++++++++++------------ sbr/makedir.c | 2 +- sbr/mf.c | 14 +++++++------- sbr/print_sw.c | 4 ++-- sbr/putenv.c | 4 ++-- sbr/readconfig.c | 8 ++++---- sbr/snprintb.c | 4 ++-- sbr/utils.c | 2 +- uip/ali.c | 6 +++--- uip/aliasbr.c | 44 +++++++++++++++++++++---------------------- uip/ap.c | 8 ++++---- uip/distsbr.c | 8 ++++---- uip/dp.c | 2 +- uip/flist.c | 2 +- uip/fmtdump.c | 10 +++++----- uip/folder.c | 2 +- uip/forw.c | 4 ++-- uip/mhparam.c | 2 +- uip/pick.c | 50 ++++++++++++++++++++++++------------------------- uip/rcvdist.c | 6 +++--- uip/refile.c | 8 ++++---- uip/repl.c | 28 +++++++++++++-------------- uip/rmf.c | 12 ++++++------ uip/sortm.c | 22 +++++++++++----------- uip/whatnowproc.c | 2 +- 39 files changed, 192 insertions(+), 192 deletions(-) diff --git a/sbr/addrsbr.c b/sbr/addrsbr.c index d7894c5..53e9be4 100644 --- a/sbr/addrsbr.c +++ b/sbr/addrsbr.c @@ -236,9 +236,9 @@ int ismymbox(struct mailname *np) { int oops; - register int len, i; - register char *cp; - register char *pp; + int len, i; + char *cp; + char *pp; char buffer[BUFSIZ]; struct mailname *mp; static char *am = NULL; diff --git a/sbr/context_del.c b/sbr/context_del.c index 6eebd7e..7d068b5 100644 --- a/sbr/context_del.c +++ b/sbr/context_del.c @@ -16,7 +16,7 @@ int context_del(char *key) { - register struct node *np, *pp; + struct node *np, *pp; for (np = m_defs, pp = NULL; np; pp = np, np = np->n_next) { if (!mh_strcasecmp(np->n_name, key)) { diff --git a/sbr/context_read.c b/sbr/context_read.c index 5886c5e..5b7c777 100644 --- a/sbr/context_read.c +++ b/sbr/context_read.c @@ -38,8 +38,8 @@ context_read(void) char *cp; /* miscellaneous pointer */ char *nd; /* nmh directory pointer */ struct stat st; /* stat() results */ - register struct passwd *pw; /* getpwuid() results */ - register FILE *ib; /* profile and context file pointer */ + struct passwd *pw; /* getpwuid() results */ + FILE *ib; /* profile and context file pointer */ /* ** If this routine _is_ called again (despite the wanings in the diff --git a/sbr/context_replace.c b/sbr/context_replace.c index 4d81356..dd6e631 100644 --- a/sbr/context_replace.c +++ b/sbr/context_replace.c @@ -13,7 +13,7 @@ void context_replace(char *key, char *value) { - register struct node *np; + struct node *np; /* ** If list is emtpy, allocate head of profile/context list. diff --git a/sbr/context_save.c b/sbr/context_save.c index 10d4d42..0f7061a 100644 --- a/sbr/context_save.c +++ b/sbr/context_save.c @@ -19,7 +19,7 @@ void context_save(void) { - register struct node *np; + struct node *np; FILE *out; sigset_t set, oset; diff --git a/sbr/cpydgst.c b/sbr/cpydgst.c index 090cd71..5e5ef87 100644 --- a/sbr/cpydgst.c +++ b/sbr/cpydgst.c @@ -36,9 +36,9 @@ void cpydgst(int in, int out, char *ifile, char *ofile) { - register int i, j, state; - register char *cp, *ep; - register char *bp, *dp; + int i, j, state; + char *cp, *ep; + char *bp, *dp; char buffer[BUFSIZ], outbuf[BUFSIZ]; dp = (bp = outbuf) + sizeof outbuf; diff --git a/sbr/crawl_folders.c b/sbr/crawl_folders.c index b59a8e7..47327ed 100644 --- a/sbr/crawl_folders.c +++ b/sbr/crawl_folders.c @@ -31,7 +31,7 @@ struct crawl_context { static void add_folder(char *fold, struct crawl_context *crawl) { - register int i, j; + int i, j; /* if necessary, reallocate the space for folder names */ if (crawl->foldp >= crawl->max) { diff --git a/sbr/dtimep.lex b/sbr/dtimep.lex index 42b3572..db2b193 100644 --- a/sbr/dtimep.lex +++ b/sbr/dtimep.lex @@ -158,7 +158,7 @@ static int day_map[] = { static void zonehack (struct tws *tw) { - register struct tm *tm; + struct tm *tm; if (dmktime (tw) == (time_t) -1) return; @@ -222,7 +222,7 @@ nl [ \t\n()] */ YY_BUFFER_STATE lexhandle; - register unsigned char *cp; + unsigned char *cp; static struct tws tw; memset(&tw,0,sizeof(struct tws)); diff --git a/sbr/fmt_addr.c b/sbr/fmt_addr.c index d6218b5..c7379b1 100644 --- a/sbr/fmt_addr.c +++ b/sbr/fmt_addr.c @@ -51,12 +51,12 @@ static unsigned int bufsiz; /* current size of buf */ char * formataddr(char *orig, char *str) { - register int len; - register int isgroup; - register char *dst; - register char *cp; - register char *sp; - register struct mailname *mp = NULL; + int len; + int isgroup; + char *dst; + char *cp; + char *sp; + struct mailname *mp = NULL; /* if we don't have a buffer yet, get one */ if (bufsiz == 0) { diff --git a/sbr/fmt_compile.c b/sbr/fmt_compile.c index ce35de9..9e08ab4 100644 --- a/sbr/fmt_compile.c +++ b/sbr/fmt_compile.c @@ -262,9 +262,9 @@ static char *do_if(char *); static struct ftable * lookup(char *name) { - register struct ftable *t = functable; - register char *nm; - register char c = *name; + struct ftable *t = functable; + char *nm; + char c = *name; while ((nm = t->name)) { if (*nm == c && strcmp(nm, name) == 0) @@ -303,7 +303,7 @@ compile_error(char *str, char *cp) int fmt_compile(char *fstring, struct format **fmt) { - register char *cp; + char *cp; size_t i; if (format_string) @@ -348,8 +348,8 @@ fmt_compile(char *fstring, struct format **fmt) static char * compile(char *sp) { - register char *cp = sp; - register int c; + char *cp = sp; + int c; for (;;) { sp = cp; @@ -409,11 +409,11 @@ compile(char *sp) static char * do_spec(char *sp) { - register char *cp = sp; - register int c; - register int ljust = 0; - register int wid = 0; - register char fill = ' '; + char *cp = sp; + int c; + int ljust = 0; + int wid = 0; + char fill = ' '; c = *cp++; if (c == '-') { @@ -461,9 +461,9 @@ do_spec(char *sp) static char * do_name(char *sp, int preprocess) { - register char *cp = sp; - register int c; - register int i; + char *cp = sp; + int c; + int i; static int primed = 0; while (isalnum(c = *cp++) || c == '-' || c == '_') @@ -520,10 +520,10 @@ do_name(char *sp, int preprocess) static char * do_func(char *sp) { - register char *cp = sp; - register int c; - register struct ftable *t; - register int n; + char *cp = sp; + int c; + struct ftable *t; + int n; int mflag; /* minus sign in NUM */ infunction++; @@ -617,8 +617,8 @@ do_func(char *sp) static char * do_expr(char *sp, int preprocess) { - register char *cp = sp; - register int c; + char *cp = sp; + int c; if ((c = *cp++) == '{') { cp = do_name(cp, preprocess); @@ -648,7 +648,7 @@ do_expr(char *sp, int preprocess) static char * do_loop(char *sp) { - register char *cp = sp; + char *cp = sp; struct format *floop; floop = next_fp; @@ -673,9 +673,9 @@ do_loop(char *sp) static char * do_if(char *sp) { - register char *cp = sp; - register struct format *fexpr, *fif = (struct format *)NULL; - register int c = '<'; + char *cp = sp; + struct format *fexpr, *fif = (struct format *)NULL; + int c = '<'; for (;;) { if (c == '<') { /* doing an IF */ diff --git a/sbr/fmt_new.c b/sbr/fmt_new.c index 8ddd3c1..9a7988e 100644 --- a/sbr/fmt_new.c +++ b/sbr/fmt_new.c @@ -27,7 +27,7 @@ char * new_fs(char *form, char *def_form) { struct stat st; - register FILE *fp; + FILE *fp; if (formats) { free(formats); diff --git a/sbr/gans.c b/sbr/gans.c index c62eb77..1f9e497 100644 --- a/sbr/gans.c +++ b/sbr/gans.c @@ -13,9 +13,9 @@ int gans(char *prompt, struct swit *ansp) { - register int i; - register char *cp; - register struct swit *ap; + int i; + char *cp; + struct swit *ap; char ansbuf[BUFSIZ]; for (;;) { diff --git a/sbr/m_convert.c b/sbr/m_convert.c index 7f2a7a8..f113366 100644 --- a/sbr/m_convert.c +++ b/sbr/m_convert.c @@ -249,8 +249,8 @@ badelim: static int m_conv(struct msgs *mp, char *str, int call) { - register int i; - register unsigned char *cp, *bp; + int i; + unsigned char *cp, *bp; unsigned char buf[16]; /* for reserved sequence name */ convdir = 1; @@ -334,9 +334,9 @@ m_conv(struct msgs *mp, char *str, int call) static int attr(struct msgs *mp, char *cp) { - register unsigned char *dp; + unsigned char *dp; char *bp = NULL; - register int i, j; + int i, j; int found; int inverted = 0; int range = 0; /* no range */ diff --git a/sbr/m_draft.c b/sbr/m_draft.c index b3659f9..549e89b 100644 --- a/sbr/m_draft.c +++ b/sbr/m_draft.c @@ -19,7 +19,7 @@ char * m_draft(char *which) { - register struct msgs *mp; + struct msgs *mp; static char buffer[BUFSIZ]; char *folder; diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index 12d05b9..e7663cd 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -165,8 +165,8 @@ int m_getfld(int state, unsigned char *name, unsigned char *buf, int bufsz, FILE *iob) { - register unsigned char *bp, *cp, *ep, *sp; - register int cnt, c, i, j; + unsigned char *bp, *cp, *ep, *sp; + int cnt, c, i, j; if ((c = getc(iob)) < 0) { msg_count = 0; @@ -576,10 +576,10 @@ finish: void thisisanmbox(FILE *iob) { - register int c; + int c; char text[10]; - register char *cp; - register char *delimstr; + char *cp; + char *delimstr; c = getc(iob); if (feof(iob)) { @@ -642,8 +642,8 @@ thisisanmbox(FILE *iob) static int m_Eom(int c, FILE *iob) { - register long pos = 0L; - register int i; + long pos = 0L; + int i; char text[10]; pos = ftell(iob); @@ -674,11 +674,11 @@ m_Eom(int c, FILE *iob) static unsigned char * matchc(int patln, char *pat, int strln, char *str) { - register char *es = str + strln - patln; - register char *sp; - register char *pp; - register char *ep = pat + patln; - register char pc = *pat++; + char *es = str + strln - patln; + char *sp; + char *pp; + char *ep = pat + patln; + char pc = *pat++; for(;;) { while (pc != *str++) diff --git a/sbr/makedir.c b/sbr/makedir.c index c4870dd..e87ae57 100644 --- a/sbr/makedir.c +++ b/sbr/makedir.c @@ -23,7 +23,7 @@ makedir(char *dir) char *cp; int had_an_error = 0; mode_t folder_perms, saved_umask; - register char* c; + char* c; context_save(); /* save the context file */ fflush(stdout); diff --git a/sbr/mf.c b/sbr/mf.c index 1780997..633522b 100644 --- a/sbr/mf.c +++ b/sbr/mf.c @@ -30,7 +30,7 @@ static int my_lex(char *); static char * getcpy(char *s) { - register char *p; + char *p; if (!s) { /* @@ -164,8 +164,8 @@ static struct adrx adrxs2; struct adrx * getadrx(char *addrs) { - register char *bp; - register struct adrx *adrxp = &adrxs2; + char *bp; + struct adrx *adrxp = &adrxs2; if (pers) free(pers); @@ -421,7 +421,7 @@ phrase(char *buffer) static int route_addr(char *buffer) { - register char *pp = cp; + char *pp = cp; if (my_lex(buffer) == LX_AT) { if (route(buffer) == NOTOK) @@ -570,8 +570,8 @@ my_lex(char *buffer) { /* buffer should be at least BUFSIZ bytes long */ int i; - register unsigned char c; - register char *bp; + unsigned char c; + char *bp; /* ** Add C to the buffer bp. After use of this macro *bp is guaranteed @@ -711,7 +711,7 @@ char * legal_person(char *p) { int i; - register char *cp; + char *cp; static char buffer[BUFSIZ]; if (*p == '"') diff --git a/sbr/print_sw.c b/sbr/print_sw.c index 3a70c54..02d00bc 100644 --- a/sbr/print_sw.c +++ b/sbr/print_sw.c @@ -13,8 +13,8 @@ void print_sw(char *substr, struct swit *swp, char *prefix, FILE *fp) { int len, optno; - register int i; - register char *cp, *cp1, *sp; + int i; + char *cp, *cp1, *sp; char buf[128]; len = strlen(substr); diff --git a/sbr/putenv.c b/sbr/putenv.c index 5c7279b..a2ec7d3 100644 --- a/sbr/putenv.c +++ b/sbr/putenv.c @@ -22,8 +22,8 @@ static int nvmatch(char *, char *); int m_putenv(char *name, char *value) { - register int i; - register char **ep, **nep, *cp; + int i; + char **ep, **nep, *cp; cp = mh_xmalloc((size_t) (strlen(name) + strlen(value) + 2)); diff --git a/sbr/readconfig.c b/sbr/readconfig.c index 171ecf8..cbeb481 100644 --- a/sbr/readconfig.c +++ b/sbr/readconfig.c @@ -36,11 +36,11 @@ static struct node **opp = NULL; void readconfig(struct node **npp, FILE *ib, char *file, int ctx) { - register int state; - register char *cp; + int state; + char *cp; char name[NAMESZ], field[BUFSIZ]; - register struct node *np; - register struct procstr *ps; + struct node *np; + struct procstr *ps; if (npp == NULL && (npp = opp) == NULL) { admonish(NULL, "bug: readconfig called but pump not primed"); diff --git a/sbr/snprintb.c b/sbr/snprintb.c index ce7bf8a..376d4b0 100644 --- a/sbr/snprintb.c +++ b/sbr/snprintb.c @@ -12,8 +12,8 @@ char * snprintb(char *buffer, size_t n, unsigned v, char *bits) { - register int i, j; - register char c, *bp; + int i, j; + char c, *bp; snprintf(buffer, n, bits && *bits == 010 ? "0%o" : "0x%x", v); bp = buffer + strlen(buffer); diff --git a/sbr/utils.c b/sbr/utils.c index f23e1d0..515c9a0 100644 --- a/sbr/utils.c +++ b/sbr/utils.c @@ -69,7 +69,7 @@ mh_xrealloc(void *ptr, size_t size) char * pwd(void) { - register char *cp; + char *cp; static char curwd[PATH_MAX]; if (!getcwd(curwd, PATH_MAX)) { diff --git a/uip/ali.c b/uip/ali.c index c6b028c..dc2a341 100644 --- a/uip/ali.c +++ b/uip/ali.c @@ -210,9 +210,9 @@ print_aka(char *p, int list, int margin) static void print_usr(char *s, int list, int norm) { - register char *cp, *pp, *vp; - register struct aka *ak; - register struct mailname *mp, *np; + char *cp, *pp, *vp; + struct aka *ak; + struct mailname *mp, *np; if ((pp = getname(s)) == NULL) adios(EX_DATAERR, NULL, "no address in \"%s\"", s); diff --git a/uip/aliasbr.c b/uip/aliasbr.c index 97f0c34..bda7326 100644 --- a/uip/aliasbr.c +++ b/uip/aliasbr.c @@ -51,7 +51,7 @@ struct home *seek_home(char *); char * akvalue(char *s) { - register char *v; + char *v; akvis = -1; v = akval(akahead, s); @@ -71,8 +71,8 @@ akvisible(void) char * akresult(struct aka *ak) { - register char *cp = NULL, *dp, *pp; - register struct adr *ad; + char *cp = NULL, *dp, *pp; + struct adr *ad; for (ad = ak->ak_addr; ad; ad = ad->ad_next) { pp = ad->ad_local ? akval(ak->ak_next, ad->ad_text) @@ -110,7 +110,7 @@ akval(struct aka *ak, char *s) static int aleq(char *string, char *aliasent) { - register char c; + char c; while ((c = *string++)) if (*aliasent == '*') @@ -131,10 +131,10 @@ int alias(char *file) { int i; - register char *bp, *cp, *pp; + char *bp, *cp, *pp; char lc, *ap; - register struct aka *ak = NULL; - register FILE *fp; + struct aka *ak = NULL; + FILE *fp; if ((fp = fopen(file, "r")) == NULL) { akerrst = file; @@ -282,7 +282,7 @@ scanp(unsigned char *p) static char * getp(char *p) { - register unsigned char *cp = scanp(p); + unsigned char *cp = scanp(p); p = cp; while (!isspace(*cp) && *cp) @@ -296,7 +296,7 @@ getp(char *p) static char * seekp(char *p, char *c, char **a) { - register unsigned char *cp; + unsigned char *cp; p = cp = scanp(p); while (!isspace(*cp) && *cp && *cp != ':' && *cp != ';') @@ -312,9 +312,9 @@ seekp(char *p, char *c, char **a) static int addfile(struct aka *ak, char *file) { - register char *cp; + char *cp; char buffer[BUFSIZ]; - register FILE *fp; + FILE *fp; if (!(fp = fopen(etcpath(file), "r"))) { akerrst = file; @@ -333,9 +333,9 @@ addfile(struct aka *ak, char *file) static int addgroup(struct aka *ak, char *grp) { - register char *gp; - register struct group *gr = getgrnam(grp); - register struct home *hm = NULL; + char *gp; + struct group *gr = getgrnam(grp); + struct home *hm = NULL; if (!gr) gr = getgrgid(atoi(grp)); @@ -366,8 +366,8 @@ static int addmember(struct aka *ak, char *grp) { gid_t gid; - register struct group *gr = getgrnam(grp); - register struct home *hm = NULL; + struct group *gr = getgrnam(grp); + struct home *hm = NULL; if (gr) gid = gr->gr_gid; @@ -393,7 +393,7 @@ addmember(struct aka *ak, char *grp) static char * getalias(char *addrs) { - register unsigned char *pp, *qp; + unsigned char *pp, *qp; static char *cp = NULL; if (cp == NULL) @@ -425,7 +425,7 @@ getalias(char *addrs) static void add_aka(struct aka *ak, char *pp) { - register struct adr *ad, *ld; + struct adr *ad, *ld; for (ad = ak->ak_addr, ld = NULL; ad; ld = ad, ad = ad->ad_next) if (strcmp(pp, ad->ad_text)==0) @@ -445,7 +445,7 @@ add_aka(struct aka *ak, char *pp) void init_pw(void) { - register struct passwd *pw; + struct passwd *pw; static int init = 0; if (!init) { @@ -466,7 +466,7 @@ init_pw(void) static struct aka * akalloc(char *id) { - register struct aka *p; + struct aka *p; p = (struct aka *) mh_xmalloc(sizeof(*p)); @@ -487,7 +487,7 @@ akalloc(char *id) static struct home * hmalloc(struct passwd *pw) { - register struct home *p; + struct home *p; p = (struct home *) mh_xmalloc(sizeof(*p)); @@ -512,7 +512,7 @@ hmalloc(struct passwd *pw) struct home * seek_home(char *name) { - register struct home *hp; + struct home *hp; struct passwd *pw; char lname[32]; unsigned char *c; diff --git a/uip/ap.c b/uip/ap.c index af97e9e..acf3cac 100644 --- a/uip/ap.c +++ b/uip/ap.c @@ -128,12 +128,12 @@ static int process(char *arg, int norm) { int status = 0; - register char *cp; + char *cp; char buffer[BUFSIZ + 1], error[BUFSIZ]; - register struct comp *cptr; - register struct pqpair *p, *q; + struct comp *cptr; + struct pqpair *p, *q; struct pqpair pq; - register struct mailname *mp; + struct mailname *mp; (q = &pq)->pq_next = NULL; while ((cp = getname(arg))) { diff --git a/uip/distsbr.c b/uip/distsbr.c index cf668ad..a856dc7 100644 --- a/uip/distsbr.c +++ b/uip/distsbr.c @@ -25,10 +25,10 @@ int distout(char *drft, char *msgnam, char *backup) { int state; - register unsigned char *dp; - register char *resent; + unsigned char *dp; + char *resent; char name[NAMESZ], buffer[BUFSIZ]; - register FILE *ifp, *ofp; + FILE *ifp, *ofp; strcpy(backup, m_mktemp(toabsdir(invo_name), NULL, NULL)); if (rename(drft, backup) == NOTOK) { @@ -141,7 +141,7 @@ ready_msg(char *msgnam) { int state, out; char name[NAMESZ], buffer[BUFSIZ], tmpfil[BUFSIZ]; - register FILE *ifp, *ofp; + FILE *ifp, *ofp; char *cp = NULL; if (hdrfd != NOTOK) { diff --git a/uip/dp.c b/uip/dp.c index 1cbb7ed..3a01995 100644 --- a/uip/dp.c +++ b/uip/dp.c @@ -112,7 +112,7 @@ process(char *date) { int status = 0; char buffer[BUFSIZ + 1]; - register struct comp *cptr; + struct comp *cptr; FINDCOMP(cptr, "text"); if (cptr) diff --git a/uip/flist.c b/uip/flist.c index 091def7..68acabb 100644 --- a/uip/flist.c +++ b/uip/flist.c @@ -677,7 +677,7 @@ do_readonly_folders(void) { int atrlen; char atrcur[BUFSIZ]; - register struct node *np; + struct node *np; snprintf(atrcur, sizeof(atrcur), "atr-%s-", seq_cur); atrlen = strlen(atrcur); diff --git a/uip/fmtdump.c b/uip/fmtdump.c index c9b28cf..5266235 100644 --- a/uip/fmtdump.c +++ b/uip/fmtdump.c @@ -103,7 +103,7 @@ static void fmt_dump(struct format *fmth) { int i; - register struct format *fmt, *addr; + struct format *fmt, *addr; /* Assign labels */ for (fmt = fmth; fmt; ++fmt) { @@ -131,7 +131,7 @@ fmt_dump(struct format *fmth) static void dumpone(struct format *fmt) { - register int i; + int i; if ((i = findlabel(fmt)) >= 0) printf("L%d:", i); @@ -312,7 +312,7 @@ dumpone(struct format *fmt) static int findlabel(struct format *addr) { - register int i; + int i; for (i = 0; i < lused; ++i) if (addr == lvec[i]) @@ -436,7 +436,7 @@ f_typestr(int t) static char * c_typestr(int t) { - register int i; + int i; static char buf[64]; buf[0] = '\0'; @@ -453,7 +453,7 @@ c_typestr(int t) static char * c_flagsstr(int t) { - register int i; + int i; static char buf[64]; buf[0] = '\0'; diff --git a/uip/folder.c b/uip/folder.c index 77029dc..3ca0e7d 100644 --- a/uip/folder.c +++ b/uip/folder.c @@ -630,7 +630,7 @@ readonly_folders(void) { int atrlen; char atrcur[BUFSIZ]; - register struct node *np; + struct node *np; snprintf(atrcur, sizeof(atrcur), "atr-%s-", seq_cur); atrlen = strlen(atrcur); diff --git a/uip/forw.c b/uip/forw.c index c754b27..52d4179 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -297,10 +297,10 @@ build_form(char *form, char *digest, int volume, int issue) { int in; int fmtsize; - register char *fmtstr; + char *fmtstr; char *line, tmpfil[BUFSIZ]; FILE *tmp; - register struct comp *cptr; + struct comp *cptr; struct format *fmt; int dat[5]; char *cp = NULL; diff --git a/uip/mhparam.c b/uip/mhparam.c index 6ac0a22..76fe427 100644 --- a/uip/mhparam.c +++ b/uip/mhparam.c @@ -204,7 +204,7 @@ main(int argc, char **argv) components = compp > 1; for (i = 0; i < compp; i++) { - register char *value; + char *value; value = context_find(comps[i]); if (!value) diff --git a/uip/pick.c b/uip/pick.c index a487adc..b3bac28 100644 --- a/uip/pick.c +++ b/uip/pick.c @@ -92,7 +92,7 @@ main(int argc, char **argv) char *seqs[NUMATTRS + 1], *vec[MAXARGS]; struct msgs_array msgs = { 0, 0, NULL }; struct msgs *mp; - register FILE *fp; + FILE *fp; if (atexit(putzero_done) != 0) { adios(EX_OSERR, NULL, "atexit failed"); @@ -506,7 +506,7 @@ static int TWSaction(); static int pcompile(char **vec, char *date) { - register char *cp; + char *cp; if ((cp = getenv("MHPDEBUG")) && *cp) pdebug++; @@ -531,8 +531,8 @@ pcompile(char **vec, char *date) static struct nexus * parse(void) { - register char *cp; - register struct nexus *n, *o; + char *cp; + struct nexus *n, *o; if ((n = nexp1()) == NULL || (cp = nxtarg()) == NULL) return n; @@ -572,8 +572,8 @@ header: ; static struct nexus * nexp1(void) { - register char *cp; - register struct nexus *n, *o; + char *cp; + struct nexus *n, *o; if ((n = nexp2()) == NULL || (cp = nxtarg()) == NULL) return n; @@ -614,8 +614,8 @@ header: ; static struct nexus * nexp2(void) { - register char *cp; - register struct nexus *n; + char *cp; + struct nexus *n; if ((cp = nxtarg()) == NULL) return NULL; @@ -655,9 +655,9 @@ static struct nexus * nexp3(void) { int i; - register char *cp, *dp; + char *cp, *dp; char buffer[BUFSIZ], temp[64]; - register struct nexus *n; + struct nexus *n; if ((cp = nxtarg()) == NULL) return NULL; @@ -766,7 +766,7 @@ pattern: ; static struct nexus * newnexus(int (*action)()) { - register struct nexus *p; + struct nexus *p; if ((p = (struct nexus *) calloc((size_t) 1, sizeof *p)) == NULL) adios(EX_OSERR, NULL, "unable to allocate component storage"); @@ -779,8 +779,8 @@ newnexus(int (*action)()) #define args(a) a, fp, msgnum, start, stop #define params args(n) #define plist \ - register struct nexus *n; \ - register FILE *fp; \ + struct nexus *n; \ + FILE *fp; \ int msgnum; \ long start, \ stop; @@ -801,7 +801,7 @@ pmatches(FILE *fp, int msgnum, long start, long stop) static void PRaction(struct nexus *n, int level) { - register int i; + int i; for (i = 0; i < level; i++) fprintf(stderr, "| "); @@ -870,9 +870,9 @@ plist static int gcompile(struct nexus *n, char *astr) { - register int c; + int c; int cclcnt; - register unsigned char *ep, *dp, *sp, *lastep = 0; + unsigned char *ep, *dp, *sp, *lastep = 0; dp = (ep = n->n_expbuf) + sizeof n->n_expbuf; sp = astr; @@ -962,7 +962,7 @@ plist { int c, body, lf; long pos = start; - register char *p1, *p2, *ebp, *cbp; + char *p1, *p2, *ebp, *cbp; char ibuf[BUFSIZ]; fseek(fp, start, SEEK_SET); @@ -1043,7 +1043,7 @@ plist static int advance(char *alp, char *aep) { - register unsigned char *lp, *ep, *curlp; + unsigned char *lp, *ep, *curlp; lp = (unsigned char *)alp; ep = (unsigned char *)aep; @@ -1120,8 +1120,8 @@ star: static int cclass(unsigned char *aset, int ac, int af) { - register unsigned int n; - register unsigned char c, *set; + unsigned int n; + unsigned char c, *set; set = aset; if ((c = ac) == 0) @@ -1139,7 +1139,7 @@ cclass(unsigned char *aset, int ac, int af) static int tcompile(char *ap, struct tws *tb, int isafter) { - register struct tws *tw; + struct tws *tw; if ((tw = tws_parse(ap, isafter)) == NULL) return 0; @@ -1153,7 +1153,7 @@ static struct tws * tws_parse(char *ap, int isafter) { char buffer[BUFSIZ]; - register struct tws *tw, *ts; + struct tws *tw, *ts; if ((tw = tws_special(ap)) != NULL) { tw->tw_sec = tw->tw_min = isafter ? 59 : 0; @@ -1195,7 +1195,7 @@ tws_special(char *ap) { int i; time_t clock; - register struct tws *tw; + struct tws *tw; time(&clock); if (!mh_strcasecmp(ap, "today")) @@ -1234,9 +1234,9 @@ TWSaction(params) plist { int state; - register char *bp; + char *bp; char buf[BUFSIZ], name[NAMESZ]; - register struct tws *tw; + struct tws *tw; fseek(fp, start, SEEK_SET); for (state = FLD, bp = NULL;;) { diff --git a/uip/rcvdist.c b/uip/rcvdist.c index 4027ea2..89bb1dc 100644 --- a/uip/rcvdist.c +++ b/uip/rcvdist.c @@ -156,10 +156,10 @@ static char *addrcomps[] = { static void rcvdistout(FILE *inb, char *form, char *addrs) { - register int char_read = 0, format_len, i, state; - register char *tmpbuf, **nxtbuf, **ap; + int char_read = 0, format_len, i, state; + char *tmpbuf, **nxtbuf, **ap; char *cp, *scanl, name[NAMESZ]; - register struct comp *cptr, **savecomp; + struct comp *cptr, **savecomp; FILE *out; if (!(out = fopen(drft, "w"))) { diff --git a/uip/refile.c b/uip/refile.c index 01f205b..a67b150 100644 --- a/uip/refile.c +++ b/uip/refile.c @@ -223,8 +223,8 @@ static void opnfolds(struct st_fold *folders, int nfolders) { char nmaildir[BUFSIZ]; - register struct st_fold *fp, *ep; - register struct msgs *mp; + struct st_fold *fp, *ep; + struct msgs *mp; for (fp = folders, ep = folders + nfolders; fp < ep; fp++) { chdir(toabsdir("+")); @@ -252,8 +252,8 @@ opnfolds(struct st_fold *folders, int nfolders) static void clsfolds(struct st_fold *folders, int nfolders) { - register struct st_fold *fp, *ep; - register struct msgs *mp; + struct st_fold *fp, *ep; + struct msgs *mp; for (fp = folders, ep = folders + nfolders; fp < ep; fp++) { mp = fp->f_mp; diff --git a/uip/repl.c b/uip/repl.c index 0ff86b8..33d4bf5 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -388,12 +388,12 @@ static void replout(FILE *inb, char *drft, struct msgs *mp, int mime, char *form, char *filter) { - register int state, i; - register struct comp *cptr; - register char *tmpbuf; - register char **nxtbuf; - register char **ap; - register struct comp **savecomp; + int state, i; + struct comp *cptr; + char *tmpbuf; + char **nxtbuf; + char **ap; + struct comp **savecomp; int char_read = 0, format_len, mask; char name[NAMESZ], *scanl; unsigned char *cp; @@ -527,7 +527,7 @@ finished: */ FINDCOMP(cptr, "subject") if (cptr && (cp = cptr->c_text)) { - register char *sp = cp; + char *sp = cp; for (;;) { while (isspace(*cp)) @@ -638,13 +638,13 @@ static unsigned int bufsiz=0; /* current size of buf */ char * formataddr(char *orig, char *str) { - register int len; + int len; char baddr[BUFSIZ], error[BUFSIZ]; - register int isgroup; - register char *dst; - register char *cp; - register char *sp; - register struct mailname *mp = NULL; + int isgroup; + char *dst; + char *cp; + char *sp; + struct mailname *mp = NULL; /* if we don't have a buffer yet, get one */ if (bufsiz == 0) { @@ -710,7 +710,7 @@ static int insert(struct mailname *np) { char buffer[BUFSIZ]; - register struct mailname *mp; + struct mailname *mp; if (np->m_mbox == NULL) return 0; diff --git a/uip/rmf.c b/uip/rmf.c index f246004..230360b 100644 --- a/uip/rmf.c +++ b/uip/rmf.c @@ -129,10 +129,10 @@ static int rmf(char *folder) { int i, others; - register char *maildir; + char *maildir; char cur[BUFSIZ]; - register struct dirent *dp; - register DIR *dd; + struct dirent *dp; + DIR *dd; switch (i = chdir(maildir = toabsdir(folder))) { case OK: @@ -218,9 +218,9 @@ rmf(char *folder) static void rma(char *folder) { - register int alen, j, plen; - register char *cp; - register struct node *np, *pp; + int alen, j, plen; + char *cp; + struct node *np, *pp; alen = strlen("atr-"); plen = strlen(cp = getcpy(toabsdir(folder))) + 1; diff --git a/uip/sortm.c b/uip/sortm.c index 802e010..0d02af9 100644 --- a/uip/sortm.c +++ b/uip/sortm.c @@ -222,7 +222,7 @@ main(int argc, char **argv) */ if (!submajor && subjsort) { /* already date sorted */ struct smsg **slist, **flist; - register struct smsg ***il, **fp, **dp; + struct smsg ***il, **fp, **dp; slist = (struct smsg **) mh_xmalloc((nmsgs+1) * sizeof(*slist)); @@ -248,7 +248,7 @@ main(int argc, char **argv) mh_xmalloc((nmsgs+1) * sizeof(*flist)); fp = flist; for (dp = dlist; *dp;) { - register struct smsg **s = il[(*dp++)->s_msg]; + struct smsg **s = il[(*dp++)->s_msg]; /* see if we already did this guy */ if (! s) @@ -291,7 +291,7 @@ read_hdrs(struct msgs *mp, char *datesw) { int msgnum; struct tws tb; - register struct smsg *s; + struct smsg *s; twscopy(&tb, dlocaltimenow()); @@ -322,12 +322,12 @@ read_hdrs(struct msgs *mp, char *datesw) static int get_fields(char *datesw, int msg, struct smsg *smsg) { - register int state; + int state; int compnum; char *msgnam, buf[BUFSIZ], nam[NAMESZ]; - register struct tws *tw; - register char *datecomp = NULL, *subjcomp = NULL; - register FILE *in; + struct tws *tw; + char *datecomp = NULL, *subjcomp = NULL; + FILE *in; if ((in = fopen(msgnam = m_name(msg), "r")) == NULL) { admonish(msgnam, "unable to read message"); @@ -409,8 +409,8 @@ get_fields(char *datesw, int msg, struct smsg *smsg) ** leading "re:", everything but letters & smash ** letters to lower case. */ - register char *cp, *cp2; - register unsigned char c; + char *cp, *cp2; + unsigned char c; cp = subjcomp; cp2 = subjcomp; @@ -466,7 +466,7 @@ dsort(struct smsg **a, struct smsg **b) static int subsort(struct smsg **a, struct smsg **b) { - register int i; + int i; if ((i = strcmp((*a)->s_subj, (*b)->s_subj))) return (i); @@ -477,7 +477,7 @@ subsort(struct smsg **a, struct smsg **b) static int txtsort(struct smsg **a, struct smsg **b) { - register int i; + int i; if ((i = strcmp((*a)->s_subj, (*b)->s_subj))) return (i); diff --git a/uip/whatnowproc.c b/uip/whatnowproc.c index 1ccd209..765ed8a 100644 --- a/uip/whatnowproc.c +++ b/uip/whatnowproc.c @@ -22,7 +22,7 @@ what_now(char *ed, int use, char *file, char *altmsg, int dist, { int found, k, msgnum, vecp; int len, buflen; - register char *bp; + char *bp; char buffer[BUFSIZ], *vec[MAXARGS]; vecp = 0; -- 1.7.10.4