]> diplodocus.org Git - nmh/commitdiff
Treat unknown top-level content types as "application" types, instead
authorKen Hornstein <kenh@pobox.com>
Thu, 8 May 2014 16:37:50 +0000 (12:37 -0400)
committerKen Hornstein <kenh@pobox.com>
Thu, 8 May 2014 16:40:06 +0000 (12:40 -0400)
of generating an "unknown content type 0" error.

uip/mhlistsbr.c
uip/mhshowsbr.c
uip/mhstoresbr.c

index d2d394f..ee2800a 100644 (file)
@@ -125,12 +125,9 @@ list_switch (CT ct, int toplevel, int realsize, int verbose, int debug,
            return list_content (ct, toplevel, realsize, verbose, debug, dispo);
 
        case CT_APPLICATION:
+       default:
            return list_application (ct, toplevel, realsize, verbose, debug,
                                     dispo);
-
-       default:
-           /* list_debug (ct); */
-           adios (NULL, "unknown content type %d", ct->c_type);
     }
 
     return 0;  /* NOT REACHED */
index ce82d70..042ca7c 100644 (file)
@@ -274,10 +274,8 @@ show_switch (CT ct, int alternate, int concatsw, int textonly, int inlineonly,
        case CT_IMAGE:
        case CT_VIDEO:
        case CT_APPLICATION:
-           return show_content (ct, alternate, textonly, inlineonly, fmt);
-
        default:
-           adios (NULL, "unknown content type %d", ct->c_type);
+           return show_content (ct, alternate, textonly, inlineonly, fmt);
     }
 
     return 0;  /* NOT REACHED */
index fc26554..78ceef5 100644 (file)
@@ -184,6 +184,7 @@ store_switch (CT ct, mhstoreinfo_t info)
            }
 
        case CT_APPLICATION:
+       default:
            return store_application (ct, info);
 
        case CT_TEXT:
@@ -191,9 +192,6 @@ store_switch (CT ct, mhstoreinfo_t info)
        case CT_IMAGE:
        case CT_VIDEO:
            return store_generic (ct, info);
-
-       default:
-           adios (NULL, "unknown content type %d", ct->c_type);
     }
 
     return OK; /* NOT REACHED */