X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/dbbbe1b73d4eba1f4d0d55ccab54f2f7130f395d..4974d09cc659e2859fcf916ad020628c9695e2f8:/uip/scan.c diff --git a/uip/scan.c b/uip/scan.c index d0534f48..2b337087 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -1,6 +1,4 @@ - -/* - * scan.c -- display a one-line "scan" listing of folder or messages +/* scan.c -- display a one-line "scan" listing of folder or 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 @@ -13,6 +11,7 @@ #include #include #include +#include "../sbr/m_maildir.h" #define SCAN_SWITCHES \ X("clear", 0, CLRSW) \ @@ -216,14 +215,13 @@ main (int argc, char **argv) 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)); num_unseen_seq = i; - if (dp) - free(dp); + mh_xfree(dp); } ontty = isatty (fileno (stdout)); @@ -267,7 +265,7 @@ main (int argc, char **argv) adios (NULL, "scan() botch (%d)", state); case SCNEOF: - advise (NULL, "message %d: empty", msgnum); + inform("message %d: empty", msgnum); break; } charstring_free (scanl);