X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/8a5a1a5303ddc67f06350a57a515853724a16e31..63621a81d16ab743de6b57d47578a9a2c670ad22:/uip/mhlist.c diff --git a/uip/mhlist.c b/uip/mhlist.c index 0f9a51ee..93e2ea0e 100644 --- a/uip/mhlist.c +++ b/uip/mhlist.c @@ -15,7 +15,8 @@ #include #include #include -#include "../sbr/m_maildir.h" +#include "mhmisc.h" +#include "sbr/m_maildir.h" #include "mhfree.h" #define MHLIST_SWITCHES \ @@ -33,6 +34,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("changecur", 0, CHGSW) \ @@ -49,19 +51,6 @@ DEFINE_SWITCH_ENUM(MHLIST); DEFINE_SWITCH_ARRAY(MHLIST, switches); #undef X - -/* mhmisc.c */ -extern int npart; -extern int ntype; -extern char *parts[NPARTS + 1]; -extern char *types[NTYPES + 1]; -extern int userrs; - -/* mhparse.c */ -extern char *preferred_types[]; -extern char *preferred_subtypes[]; -extern int npreferred; - /* * This is currently needed to keep mhparse happy. * This needs to be changed. @@ -70,14 +59,6 @@ int debugsw = 0; #define quitser pipeser -/* mhparse.c */ -CT parse_mime (char *); - -/* mhmisc.c */ -int part_ok (CT); -int type_ok (CT, int); -void flush_errors (void); - /* * static prototypes */ @@ -188,10 +169,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: