X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fshow.c;h=b5b48c50e87d8125f912e37efb22d4e030ea42bc;hp=b068d4952be836ec1f98423b4453b43bd9f96bc9;hb=f6aa95b724fd8c791164abe7ee5468bf5c34f226;hpb=9a33ff618b5901a3af815650d4b84d39ee96e529 diff --git a/uip/show.c b/uip/show.c index b068d49..b5b48c5 100644 --- a/uip/show.c +++ b/uip/show.c @@ -2,8 +2,6 @@ /* * show.c -- show/list messages * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -71,7 +69,7 @@ main (int argc, char **argv) char *cp, *maildir, *file = NULL, *folder = NULL, *proc; char buf[BUFSIZ], **argp, **arguments; char *msgs[MAXARGS], *vec[MAXARGS]; - struct msgs *mp; + struct msgs *mp = NULL; #ifdef LOCALE setlocale(LC_ALL, ""); @@ -81,9 +79,9 @@ main (int argc, char **argv) /* read user profile/context */ context_read(); - if (!strcasecmp (invo_name, "next")) { + if (!mh_strcasecmp (invo_name, "next")) { mode = NEXT; - } else if (!strcasecmp (invo_name, "prev")) { + } else if (!mh_strcasecmp (invo_name, "prev")) { mode = PREV; } arguments = getarguments (invo_name, argc, argv, 1); @@ -179,7 +177,7 @@ usage: if (folder) adios (NULL, "only one folder at a time!"); else - folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF); + folder = pluspath (cp); } else { if (mode != SHOW) goto usage; @@ -365,27 +363,14 @@ go_to_it: ; } /* - * Cheat: we are loaded with adrparse, which wants a routine called - * OfficialName(). We call adrparse:getm() with the correct arguments - * to prevent OfficialName() from being called. Hence, the following - * is to keep the loader happy. - */ - -char * -OfficialName (char *name) -{ - return name; -} - - -/* * Check if a message or file contains any non-text parts */ static int is_nontext (char *msgnam) { int result, state; - char *bp, *cp, *dp; + unsigned char *bp, *dp; + char *cp; char buf[BUFSIZ], name[NAMESZ]; FILE *fp; @@ -400,7 +385,7 @@ is_nontext (char *msgnam) /* * Check Content-Type field */ - if (!strcasecmp (name, TYPE_FIELD)) { + if (!mh_strcasecmp (name, TYPE_FIELD)) { int passno; char c; @@ -455,7 +440,7 @@ invalid: if (!*bp) goto invalid; if (passno > 1) { - if ((result = (strcasecmp (bp, "plain") != 0))) + if ((result = (mh_strcasecmp (bp, "plain") != 0))) goto out; *dp = c; for (dp++; isspace (*dp); dp++) @@ -487,7 +472,7 @@ invalid: /* Check the character set */ result = !check_charset (dp, strlen (dp)); } else { - if (!(result = (strcasecmp (bp, "text") != 0))) { + if (!(result = (mh_strcasecmp (bp, "text") != 0))) { *dp = c; bp = dp; passno = 2; @@ -506,7 +491,7 @@ out: /* * Check Content-Transfer-Encoding field */ - if (!strcasecmp (name, ENCODING_FIELD)) { + if (!mh_strcasecmp (name, ENCODING_FIELD)) { cp = add (buf, NULL); while (state == FLDPLUS) { state = m_getfld (state, name, buf, sizeof(buf), fp); @@ -517,9 +502,9 @@ out: for (dp = bp; istoken (*dp); dp++) continue; *dp = '\0'; - result = (strcasecmp (bp, "7bit") - && strcasecmp (bp, "8bit") - && strcasecmp (bp, "binary")); + result = (mh_strcasecmp (bp, "7bit") + && mh_strcasecmp (bp, "8bit") + && mh_strcasecmp (bp, "binary")); free (cp); if (result) {