X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/23f2b007ecac94848616420b27f0819ea559507e..c347c3bb:/uip/forw.c?ds=inline diff --git a/uip/forw.c b/uip/forw.c index c4e1dde5..8746d45d 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -1,6 +1,4 @@ - -/* - * forw.c -- forward a message, or group of messages. +/* forw.c -- forward a message, or group of messages. * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for @@ -163,7 +161,8 @@ main (int argc, char **argv) nwhat = 0; continue; case BILDSW: - buildsw++; /* fall... */ + buildsw++; + /* FALLTHRU */ case NWHATSW: nwhat++; continue; @@ -211,7 +210,7 @@ main (int argc, char **argv) case DGSTSW: if (!(cp = *argp++) || *cp == '-') adios (NULL, "missing argument to %s", argp[-2]); - digest = getcpy(cp); + digest = mh_xstrdup(cp); mime = 0; continue; case ISSUESW: @@ -247,10 +246,10 @@ main (int argc, char **argv) continue; case BITSTUFFSW: - dashstuff = 1; /* trinary logic */ + dashstuff = 1; /* ternary logic */ continue; case NBITSTUFFSW: - dashstuff = -1; /* trinary logic */ + dashstuff = -1; /* ternary logic */ continue; case FROMSW: @@ -276,7 +275,7 @@ main (int argc, char **argv) case SUBJECTSW: if (!(cp = *argp++) || *cp == '-') adios (NULL, "missing argument to %s", argp[-2]); - subject = getcpy(cp); + subject = mh_xstrdup(cp); continue; case WIDTHSW: @@ -297,7 +296,7 @@ main (int argc, char **argv) } } - cwd = getcpy (pwd ()); + cwd = mh_xstrdup(pwd ()); if (!context_find ("path")) free (path ("./", TFOLDER)); @@ -332,7 +331,7 @@ try_it_again: i = YESW; break; default: - advise (NULL, "say what?"); + inform("say what?"); break; } } @@ -378,7 +377,7 @@ try_it_again: for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) if (is_selected (mp, msgnum)) { - fwdmsg = strdup(m_name(msgnum)); + fwdmsg = mh_xstrdup(m_name(msgnum)); break; } @@ -455,10 +454,10 @@ try_it_again: if (digest) { snprintf (buf, sizeof(buf), IFORMAT, digest); snprintf (value, sizeof(value), "%d", issue); - context_replace (buf, getcpy (value)); + context_replace (buf, mh_xstrdup(value)); snprintf (buf, sizeof(buf), VFORMAT, digest); snprintf (value, sizeof(value), "%d", volume); - context_replace (buf, getcpy (value)); + context_replace (buf, mh_xstrdup(value)); } context_replace (pfolder, folder); /* update current folder */ @@ -537,7 +536,7 @@ mhl_draft (int out, char *digest, int volume, int issue, for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) { if (is_selected (mp, msgnum)) - app_msgarg(&vec, getcpy (m_name (msgnum))); + app_msgarg(&vec, mh_xstrdup(m_name (msgnum))); } app_msgarg(&vec, NULL); @@ -568,7 +567,7 @@ copy_draft (int out, char *digest, char *file, int volume, int issue, int dashst { int fd,i, msgcnt, msgnum; int len, buflen; - register char *bp, *msgnam; + char *bp, *msgnam; char buffer[BUFSIZ]; msgcnt = 1;