]> 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 d2d394fad6651e7a08e9700147244836a28b154b..ee2800a834ac65d92f47998ce4e70fb05fdb7ed7 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:
            return list_content (ct, toplevel, realsize, verbose, debug, dispo);
 
        case CT_APPLICATION:
+       default:
            return list_application (ct, toplevel, realsize, verbose, debug,
                                     dispo);
            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 */
     }
 
     return 0;  /* NOT REACHED */
index ce82d70cbb97e1d3fbe549feb4332e024595314f..042ca7cb6ddbe7be11c60f853ba14e89774cf943 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:
        case CT_IMAGE:
        case CT_VIDEO:
        case CT_APPLICATION:
-           return show_content (ct, alternate, textonly, inlineonly, fmt);
-
        default:
        default:
-           adios (NULL, "unknown content type %d", ct->c_type);
+           return show_content (ct, alternate, textonly, inlineonly, fmt);
     }
 
     return 0;  /* NOT REACHED */
     }
 
     return 0;  /* NOT REACHED */
index fc2655425e7ad0a854410600d3047ef5e97cfa88..78ceef52c2844a0103c77413370258882c8dfef3 100644 (file)
@@ -184,6 +184,7 @@ store_switch (CT ct, mhstoreinfo_t info)
            }
 
        case CT_APPLICATION:
            }
 
        case CT_APPLICATION:
+       default:
            return store_application (ct, info);
 
        case CT_TEXT:
            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);
        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 */
     }
 
     return OK; /* NOT REACHED */