From: Ken Hornstein Date: Thu, 8 May 2014 16:37:50 +0000 (-0400) Subject: Treat unknown top-level content types as "application" types, instead X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/f3a97f2ee12563029514d15464b201397d1569df?hp=497a047e3e84f46f21847f0983be35083066e21e Treat unknown top-level content types as "application" types, instead of generating an "unknown content type 0" error. --- diff --git a/uip/mhlistsbr.c b/uip/mhlistsbr.c index d2d394fa..ee2800a8 100644 --- a/uip/mhlistsbr.c +++ b/uip/mhlistsbr.c @@ -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 */ diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index ce82d70c..042ca7cb 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -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 */ diff --git a/uip/mhstoresbr.c b/uip/mhstoresbr.c index fc265542..78ceef52 100644 --- a/uip/mhstoresbr.c +++ b/uip/mhstoresbr.c @@ -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 */