static char *
getcpy(char *s)
{
- register char *p;
+ char *p;
if (!s) {
/*
for(;;)
pause();
}
- p = mh_xmalloc((size_t) (strlen(s) + 2));
+ p = mh_xcalloc(strlen(s) + 2, sizeof(char));
strcpy(p, s);
return p;
}
** is neither complete nor correct. It does however recognize nearly all
** of the 822 address syntax.
** Historically, it handled the majority (and still handles parts) of the
-** 733 syntax as well. Most problems arise from trying to accomodate both.
+** 733 syntax as well. Most problems arise from trying to accommodate both.
**
** In terms of 822, the route-specification in
**
struct adrx *
getadrx(char *addrs)
{
- register char *bp;
- register struct adrx *adrxp = &adrxs2;
+ char *bp;
+ struct adrx *adrxp = &adrxs2;
if (pers)
- free(pers);
+ mh_free0(&pers);
if (mbox)
- free(mbox);
+ mh_free0(&mbox);
if (host)
- free(host);
+ mh_free0(&host);
if (path)
- free(path);
+ mh_free0(&path);
if (grp)
- free(grp);
+ mh_free0(&grp);
if (note)
- free(note);
- pers = mbox = host = path = grp = note = NULL;
+ mh_free0(¬e);
err[0] = 0;
if (dp == NULL) {
dp = cp = getcpy(addrs ? addrs : "");
glevel = 0;
} else if (cp == NULL) {
- free(dp);
- dp = NULL;
+ mh_free0(&dp);
return NULL;
}
switch (parse_address()) {
case DONE:
- free(dp);
- dp = cp = NULL;
+ mh_free0(&dp);
+ cp = NULL;
return NULL;
case OK:
}
case LX_COMA:
if (note) {
- free(note);
- note = NULL;
+ mh_free0(¬e);
}
goto again;
static int
route_addr(char *buffer)
{
- register char *pp = cp;
+ char *pp = cp;
if (my_lex(buffer) == LX_AT) {
if (route(buffer) == NOTOK)
case LX_AT: /* sigh (0) */
mbox = add(host, add("%", mbox));
- free(host);
- host = NULL;
+ mh_free0(&host);
continue;
default:
{
/* 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 == '"')