X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/28c3595a77a8c942bee1057085776dad0b3d53f4..92128dac:/uip/mhstoresbr.c diff --git a/uip/mhstoresbr.c b/uip/mhstoresbr.c index fc265542..dc7a0f0f 100644 --- a/uip/mhstoresbr.c +++ b/uip/mhstoresbr.c @@ -82,9 +82,6 @@ int part_ok (CT, int); int type_ok (CT, int); void flush_errors (void); -/* mhshowsbr.c */ -int show_content_aux (CT, int, int, char *, char *); - /* * prototypes */ @@ -184,6 +181,7 @@ store_switch (CT ct, mhstoreinfo_t info) } case CT_APPLICATION: + default: return store_application (ct, info); case CT_TEXT: @@ -191,9 +189,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 */ @@ -571,13 +566,9 @@ store_content (CT ct, CT p, mhstoreinfo_t info) if ((cp = ct->c_storeproc) == NULL || *cp == '\0') { CI ci = &ct->c_ctinfo; - snprintf (buffer, sizeof(buffer), "%s-store-%s/%s", - invo_name, ci->ci_type, ci->ci_subtype); - if ((cp = context_find (buffer)) == NULL || *cp == '\0') { - snprintf (buffer, sizeof(buffer), "%s-store-%s", invo_name, ci->ci_type); - if ((cp = context_find (buffer)) == NULL || *cp == '\0') { - cp = ct->c_type == CT_MESSAGE ? "+" : "%m%P.%s"; - } + cp = context_find_by_type ("store", ci->ci_type, ci->ci_subtype); + if (cp == NULL) { + cp = ct->c_type == CT_MESSAGE ? "+" : "%m%P.%s"; } } @@ -625,7 +616,7 @@ store_content (CT ct, CT p, mhstoreinfo_t info) * content to standard input of a command and return. */ if (buffer[0] == '|' || buffer[0] == '!') - return show_content_aux (ct, 1, 0, buffer + 1, info->dir); + return show_content_aux (ct, 0, buffer + 1, info->dir, NULL); /* record the filename */ if ((ct->c_storage = clobber_check (add (buffer, NULL), info)) ==