X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/d1cb0cfb62b6106108566a503969d401299c0cf2..b04d3a5bfe54b5e828a998f3e56bd97d6f82df1d:/uip/mhshow.c diff --git a/uip/mhshow.c b/uip/mhshow.c index b3d3218c..40beb1ca 100644 --- a/uip/mhshow.c +++ b/uip/mhshow.c @@ -17,8 +17,8 @@ #include #include #include "mhmisc.h" -#include "../sbr/m_maildir.h" -#include "../sbr/m_popen.h" +#include "sbr/m_maildir.h" +#include "sbr/m_popen.h" #include "mhfree.h" #include "mhshowsbr.h" @@ -42,6 +42,7 @@ X("part number", 0, PARTSW) \ X("type content", 0, TYPESW) \ X("prefer content", 0, PREFERSW) \ + X("noprefer", 0, NPREFERSW) \ X("rcache policy", 0, RCACHESW) \ X("wcache policy", 0, WCACHESW) \ X("version", 0, VERSIONSW) \ @@ -67,19 +68,11 @@ DEFINE_SWITCH_ARRAY(MHSHOW, switches); #undef X -/* mhparse.c */ -extern char *preferred_types[]; -extern char *preferred_subtypes[]; -extern int npreferred; - int debugsw = 0; int verbosw = 0; #define quitser pipeser -/* mhparse.c */ -CT parse_mime (char *); - /* * static prototypes */ @@ -195,10 +188,14 @@ do_cache: if (npreferred >= NPREFS) adios (NULL, "too many preferred types (starting with %s), %d max", cp, NPREFS); - preferred_types[npreferred] = cp; + mime_preference[npreferred].type = cp; cp = strchr(cp, '/'); if (cp) *cp++ = '\0'; - preferred_subtypes[npreferred++] = cp; + mime_preference[npreferred++].subtype = cp; + continue; + + case NPREFERSW: + npreferred = 0; continue; case FILESW: @@ -288,7 +285,7 @@ do_cache: */ if ((cp = getenv ("MHSHOW"))) { if ((fp = fopen (cp, "r"))) { - readconfig ((struct node **) 0, fp, cp, 0); + readconfig(NULL, fp, cp, 0); fclose (fp); } else { admonish ("", "unable to read $MHSHOW profile (%s)", cp); @@ -299,7 +296,7 @@ do_cache: * Read the standard profile setup */ if ((fp = fopen (cp = etcpath ("mhn.defaults"), "r"))) { - readconfig ((struct node **) 0, fp, cp, 0); + readconfig(NULL, fp, cp, 0); fclose (fp); }