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;
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)) {
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
void
context_replace(char *key, char *value)
{
- register struct node *np;
+ struct node *np;
/*
** If list is emtpy, allocate head of profile/context list.
void
context_save(void)
{
- register struct node *np;
+ struct node *np;
FILE *out;
sigset_t set, oset;
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;
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) {
static void
zonehack (struct tws *tw)
{
- register struct tm *tm;
+ struct tm *tm;
if (dmktime (tw) == (time_t) -1)
return;
*/
YY_BUFFER_STATE lexhandle;
- register unsigned char *cp;
+ unsigned char *cp;
static struct tws tw;
memset(&tw,0,sizeof(struct tws));
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) {
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)
int
fmt_compile(char *fstring, struct format **fmt)
{
- register char *cp;
+ char *cp;
size_t i;
if (format_string)
static char *
compile(char *sp)
{
- register char *cp = sp;
- register int c;
+ char *cp = sp;
+ int c;
for (;;) {
sp = cp;
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 == '-') {
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 == '_')
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++;
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);
static char *
do_loop(char *sp)
{
- register char *cp = sp;
+ char *cp = sp;
struct format *floop;
floop = next_fp;
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 */
new_fs(char *form, char *def_form)
{
struct stat st;
- register FILE *fp;
+ FILE *fp;
if (formats) {
free(formats);
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 (;;) {
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;
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 */
char *
m_draft(char *which)
{
- register struct msgs *mp;
+ struct msgs *mp;
static char buffer[BUFSIZ];
char *folder;
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;
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)) {
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);
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++)
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);
static char *
getcpy(char *s)
{
- register char *p;
+ char *p;
if (!s) {
/*
struct adrx *
getadrx(char *addrs)
{
- register char *bp;
- register struct adrx *adrxp = &adrxs2;
+ char *bp;
+ struct adrx *adrxp = &adrxs2;
if (pers)
free(pers);
static int
route_addr(char *buffer)
{
- register char *pp = cp;
+ char *pp = cp;
if (my_lex(buffer) == LX_AT) {
if (route(buffer) == NOTOK)
{
/* 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
legal_person(char *p)
{
int i;
- register char *cp;
+ char *cp;
static char buffer[BUFSIZ];
if (*p == '"')
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);
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));
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");
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);
char *
pwd(void)
{
- register char *cp;
+ char *cp;
static char curwd[PATH_MAX];
if (!getcwd(curwd, PATH_MAX)) {
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);
char *
akvalue(char *s)
{
- register char *v;
+ char *v;
akvis = -1;
v = akval(akahead, s);
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)
static int
aleq(char *string, char *aliasent)
{
- register char c;
+ char c;
while ((c = *string++))
if (*aliasent == '*')
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;
static char *
getp(char *p)
{
- register unsigned char *cp = scanp(p);
+ unsigned char *cp = scanp(p);
p = cp;
while (!isspace(*cp) && *cp)
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 != ';')
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;
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));
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;
static char *
getalias(char *addrs)
{
- register unsigned char *pp, *qp;
+ unsigned char *pp, *qp;
static char *cp = NULL;
if (cp == NULL)
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)
void
init_pw(void)
{
- register struct passwd *pw;
+ struct passwd *pw;
static int init = 0;
if (!init) {
static struct aka *
akalloc(char *id)
{
- register struct aka *p;
+ struct aka *p;
p = (struct aka *) mh_xmalloc(sizeof(*p));
static struct home *
hmalloc(struct passwd *pw)
{
- register struct home *p;
+ struct home *p;
p = (struct home *) mh_xmalloc(sizeof(*p));
struct home *
seek_home(char *name)
{
- register struct home *hp;
+ struct home *hp;
struct passwd *pw;
char lname[32];
unsigned char *c;
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))) {
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) {
{
int state, out;
char name[NAMESZ], buffer[BUFSIZ], tmpfil[BUFSIZ];
- register FILE *ifp, *ofp;
+ FILE *ifp, *ofp;
char *cp = NULL;
if (hdrfd != NOTOK) {
{
int status = 0;
char buffer[BUFSIZ + 1];
- register struct comp *cptr;
+ struct comp *cptr;
FINDCOMP(cptr, "text");
if (cptr)
{
int atrlen;
char atrcur[BUFSIZ];
- register struct node *np;
+ struct node *np;
snprintf(atrcur, sizeof(atrcur), "atr-%s-", seq_cur);
atrlen = strlen(atrcur);
fmt_dump(struct format *fmth)
{
int i;
- register struct format *fmt, *addr;
+ struct format *fmt, *addr;
/* Assign labels */
for (fmt = fmth; fmt; ++fmt) {
static void
dumpone(struct format *fmt)
{
- register int i;
+ int i;
if ((i = findlabel(fmt)) >= 0)
printf("L%d:", i);
static int
findlabel(struct format *addr)
{
- register int i;
+ int i;
for (i = 0; i < lused; ++i)
if (addr == lvec[i])
static char *
c_typestr(int t)
{
- register int i;
+ int i;
static char buf[64];
buf[0] = '\0';
static char *
c_flagsstr(int t)
{
- register int i;
+ int i;
static char buf[64];
buf[0] = '\0';
{
int atrlen;
char atrcur[BUFSIZ];
- register struct node *np;
+ struct node *np;
snprintf(atrcur, sizeof(atrcur), "atr-%s-", seq_cur);
atrlen = strlen(atrcur);
{
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;
components = compp > 1;
for (i = 0; i < compp; i++) {
- register char *value;
+ char *value;
value = context_find(comps[i]);
if (!value)
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");
static int
pcompile(char **vec, char *date)
{
- register char *cp;
+ char *cp;
if ((cp = getenv("MHPDEBUG")) && *cp)
pdebug++;
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;
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;
static struct nexus *
nexp2(void)
{
- register char *cp;
- register struct nexus *n;
+ char *cp;
+ struct nexus *n;
if ((cp = nxtarg()) == NULL)
return NULL;
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;
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");
#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;
static void
PRaction(struct nexus *n, int level)
{
- register int i;
+ int i;
for (i = 0; i < level; i++)
fprintf(stderr, "| ");
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;
{
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);
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;
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)
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;
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;
{
int i;
time_t clock;
- register struct tws *tw;
+ struct tws *tw;
time(&clock);
if (!mh_strcasecmp(ap, "today"))
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;;) {
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"))) {
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("+"));
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;
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;
*/
FINDCOMP(cptr, "subject")
if (cptr && (cp = cptr->c_text)) {
- register char *sp = cp;
+ char *sp = cp;
for (;;) {
while (isspace(*cp))
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) {
insert(struct mailname *np)
{
char buffer[BUFSIZ];
- register struct mailname *mp;
+ struct mailname *mp;
if (np->m_mbox == NULL)
return 0;
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:
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;
*/
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));
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)
{
int msgnum;
struct tws tb;
- register struct smsg *s;
+ struct smsg *s;
twscopy(&tb, dlocaltimenow());
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");
** 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;
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);
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);
{
int found, k, msgnum, vecp;
int len, buflen;
- register char *bp;
+ char *bp;
char buffer[BUFSIZ], *vec[MAXARGS];
vecp = 0;