X("outfile outfile", 0, OUTFILESW) \
X("part number", 0, PARTSW) \
X("type content", 0, TYPESW) \
+ X("prefer content", 0, PREFERSW) \
X("rcache policy", 0, RCACHESW) \
X("wcache policy", 0, WCACHESW) \
X("version", 0, VERSIONSW) \
extern char *types[NTYPES + 1];
extern int userrs;
+/* mhparse.c */
+extern char *preferred_types[];
+extern char *preferred_subtypes[];
+extern int npreferred;
+
#define quitser pipeser
/* mhparse.c */
CT parse_mime (char *);
/* mhmisc.c */
-int part_ok (CT, int);
+int part_ok (CT);
int type_ok (CT, int);
void flush_errors (void);
types[ntype++] = cp;
continue;
+ case PREFERSW:
+ if (!(cp = *argp++) || *cp == '-')
+ adios (NULL, "missing argument to %s", argp[-2]);
+ if (npreferred >= NPREFS)
+ adios (NULL, "too many preferred types (starting with %s), %d max",
+ cp, NPREFS);
+ preferred_types[npreferred] = cp;
+ cp = strchr(cp, '/');
+ if (cp) *cp++ = '\0';
+ preferred_subtypes[npreferred++] = cp;
+ continue;
+
case FILESW:
if (!(cp = *argp++) || (*cp == '-' && cp[1]))
adios (NULL, "missing argument to %s", argp[-2]);