X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/2d5d9e243c91784909b11948894e3ba0989107c0..07dbafdaf673d7f20d7f93ab4e8e42c6c7f00a2d:/uip/fmttest.c?ds=sidebyside diff --git a/uip/fmttest.c b/uip/fmttest.c index d6026b95..0b32a041 100644 --- a/uip/fmttest.c +++ b/uip/fmttest.c @@ -354,7 +354,7 @@ main (int argc, char **argv) NEW(ctx); ctx->num = -1; ctx->str = dummy; - ctx->outbuf = getcpy(NULL); + ctx->outbuf = mh_xstrdup(""); cb.trace_func = test_trace; cb.trace_context = ctx; @@ -422,8 +422,8 @@ process_addresses(struct format *fmt, struct msgs_array *addrs, while ((cp = getname(addrs->msgs[i]))) { NEW0(p); if ((mp = getm(cp, NULL, 0, error, sizeof(error))) == NULL) { - p->pq_text = getcpy(cp); - p->pq_error = getcpy(error); + p->pq_text = mh_xstrdup(cp); + p->pq_error = mh_xstrdup(error); } else { p->pq_text = getcpy(mp->m_text); mnfree(mp); @@ -529,7 +529,7 @@ process_messages(struct format *fmt, struct msgs_array *comps, if ((cp = context_find(usequence)) && *cp) { char **ap, *dp; - dp = getcpy(cp); + dp = mh_xstrdup(cp); ap = brkstring(dp, " ", "\n"); for (i = 0; ap && *ap; i++, ap++) ivector_push_back (seqnum, seq_getnum(mp, *ap)); @@ -741,21 +741,21 @@ test_trace(void *context, struct format *fmt, int num, char *str, if (str != ctx->str) { if (changed++) - printf(" "); + putchar(' '); printf("str="); litputs(str); ctx->str = str; } if (changed) - printf("\n"); + putchar('\n'); if (strcmp(outbuf, ctx->outbuf) != 0) { printf("outbuf="); litputs(outbuf); putchar('\n'); free(ctx->outbuf); - ctx->outbuf = getcpy(outbuf); + ctx->outbuf = mh_xstrdup(outbuf); } } @@ -777,7 +777,7 @@ fmt_dump (char *nfs, struct format *fmth) static void dumpone(struct format *fmt) { - register int i; + int i; if ((i = findlabel(fmt)) >= 0) printf("L%d:", i); @@ -989,7 +989,7 @@ initlabels(struct format *fmth) static int findlabel(struct format *addr) { - register int i; + int i; for (i = 0; i < lused; ++i) if (addr == lvec[i]) @@ -1223,13 +1223,13 @@ static unsigned int bufsiz=0; /* current size of buf */ static char * test_formataddr (char *orig, char *str) { - register int len; + int len; char 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) {