]> diplodocus.org Git - nmh/commitdiff
Add -noprefer switch to mhshow, mhstore, and mhlist
authorPaul Fox <pgf@foxharp.boston.ma.us>
Sat, 2 Sep 2017 15:24:01 +0000 (11:24 -0400)
committerPaul Fox <pgf@foxharp.boston.ma.us>
Mon, 4 Sep 2017 21:13:39 +0000 (17:13 -0400)
Allow profile-specified -prefer switches to be cancelled from the
command line.

man/mhlist.man
man/mhshow.man
man/mhstore.man
uip/mhlist.c
uip/mhshow.c
uip/mhstore.c

index 89aeeb86d5a781d26bf46c0cb1976e156e99eae0..da1ce8008953b6c8e2da864d081433363714f49c 100644 (file)
@@ -23,6 +23,7 @@ mhlist \- list information about nmh MIME messages
 .RB [ \-prefer
 .IR content ]
 \&...
 .RB [ \-prefer
 .IR content ]
 \&...
+.RB [ \-noprefer ]
 .RB [ \-headers " | " \-noheaders ]
 .RB [ \-realsize " | " \-norealsize ]
 .RB [ \-rcache
 .RB [ \-headers " | " \-noheaders ]
 .RB [ \-realsize " | " \-norealsize ]
 .RB [ \-rcache
@@ -184,10 +185,17 @@ invoked with or without various
 .B \-prefer
 switches.
 The
 .B \-prefer
 switches.
 The
+.B \-noprefer
+switch will cancel any previous
 .B \-prefer
 .B \-prefer
-switch is functionally most important for
-.IR mhshow ,
-but is also implemented in
+switches.
+The
+.B \-prefer
+and
+.B \-noprefer
+switches are functionally most important for
+.BR mhshow ,
+but are also implemented in
 .B mhlist
 and
 .B mhstore
 .B mhlist
 and
 .B mhstore
index 922c5bf7de35340c74c10878daeafae822fe024e..48173e0c57787a5f1a1a6d69a857102941de204d 100644 (file)
@@ -23,6 +23,7 @@ mhshow \- display nmh MIME messages
 .RB [ \-prefer
 .IR content ]
 \&...
 .RB [ \-prefer
 .IR content ]
 \&...
+.RB [ \-noprefer ]
 .RB [ \-concat " | " \-noconcat ]
 .RB [ \-textonly " | " \-notextonly ]
 .RB [ \-inlineonly " | " \-noinlineonly ]
 .RB [ \-concat " | " \-noconcat ]
 .RB [ \-textonly " | " \-notextonly ]
 .RB [ \-inlineonly " | " \-noinlineonly ]
@@ -235,6 +236,12 @@ switches.  Since the last of multiple
 options "wins", a
 .B \-prefer
 on the command line will override any in a profile entry.
 options "wins", a
 .B \-prefer
 on the command line will override any in a profile entry.
+.PP
+The
+.B \-noprefer
+switch will cancel any previous
+.B \-prefer
+switches.
 .SS "Unseen Sequence"
 If the profile entry \*(lqUnseen\-Sequence\*(rq is present and
 non-empty, then
 .SS "Unseen Sequence"
 If the profile entry \*(lqUnseen\-Sequence\*(rq is present and
 non-empty, then
index a5087077568ff19a2ba1a941d4be87c6d4b71f46..2015a17010ba8d8e2888dbd7d3636ebd29bbbeb9 100644 (file)
@@ -25,6 +25,7 @@ mhstore \- store contents of nmh MIME messages into files
 .RB [ \-prefer
 .IR content ]
 \&...
 .RB [ \-prefer
 .IR content ]
 \&...
+.RB [ \-noprefer ]
 .RB [ \-auto " | " \-noauto ]
 .RB [ \-clobber
 .IR always " | " auto " | " suffix " | " ask " | " never ]
 .RB [ \-auto " | " \-noauto ]
 .RB [ \-clobber
 .IR always " | " auto " | " suffix " | " ask " | " never ]
@@ -168,6 +169,12 @@ and
 .IR mhshow (1)
 for more information on
 .BR \-prefer.
 .IR mhshow (1)
 for more information on
 .BR \-prefer.
+.PP
+The
+.B \-noprefer
+switch will cancel any previous
+.B \-prefer
+switches.
 .SS "Checking the Contents"
 The
 .B \-check
 .SS "Checking the Contents"
 The
 .B \-check
index a9be19e1ca65add659a8b9e3a66949d85e693f49..bc8e2a25eafca04d17bf197156189f808ed5f9fa 100644 (file)
@@ -34,6 +34,7 @@
     X("part number", 0, PARTSW) \
     X("type content", 0, TYPESW) \
     X("prefer content", 0, PREFERSW) \
     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) \
     X("rcache policy", 0, RCACHESW) \
     X("wcache policy", 0, WCACHESW) \
     X("changecur", 0, CHGSW) \
@@ -174,6 +175,10 @@ do_cache:
                preferred_subtypes[npreferred++] = cp;
                continue;
 
                preferred_subtypes[npreferred++] = cp;
                continue;
 
+           case NPREFERSW:
+               npreferred = 0;
+               continue;
+
            case FILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
                    adios (NULL, "missing argument to %s", argp[-2]);
            case FILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
                    adios (NULL, "missing argument to %s", argp[-2]);
index 8c604ad8689dc774903e821fe7a6f9bd8fe1e262..786c0b6cccfb03e6c6707494ab0e61a90248a036 100644 (file)
@@ -42,6 +42,7 @@
     X("part number", 0, PARTSW) \
     X("type content", 0, TYPESW) \
     X("prefer content", 0, PREFERSW) \
     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) \
     X("rcache policy", 0, RCACHESW) \
     X("wcache policy", 0, WCACHESW) \
     X("version", 0, VERSIONSW) \
@@ -193,6 +194,10 @@ do_cache:
                preferred_subtypes[npreferred++] = cp;
                continue;
 
                preferred_subtypes[npreferred++] = cp;
                continue;
 
+           case NPREFERSW:
+               npreferred = 0;
+               continue;
+
            case FILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
                    adios (NULL, "missing argument to %s", argp[-2]);
            case FILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
                    adios (NULL, "missing argument to %s", argp[-2]);
index 2b08a6ba3b80ce0d7f487d297a6b1f9073eba728..b8feba96ecdf0ccf5eeed27635533aaf1613960f 100644 (file)
@@ -31,6 +31,7 @@
     X("part number", 0, PARTSW) \
     X("type content", 0, TYPESW) \
     X("prefer content", 0, PREFERSW) \
     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) \
     X("rcache policy", 0, RCACHESW) \
     X("wcache policy", 0, WCACHESW) \
     X("version", 0, VERSIONSW) \
@@ -166,6 +167,10 @@ do_cache:
                preferred_subtypes[npreferred++] = cp;
                continue;
 
                preferred_subtypes[npreferred++] = cp;
                continue;
 
+           case NPREFERSW:
+               npreferred = 0;
+               continue;
+
            case FILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
                    adios (NULL, "missing argument to %s", argp[-2]);
            case FILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
                    adios (NULL, "missing argument to %s", argp[-2]);