void content_error (char *, CT, char *, ...);
void flush_errors (void);
-/* mhlistsbr.c */
-int list_switch (CT, int, int, int, int);
-int list_content (CT, int, int, int, int);
-
/*
* prototypes
*/
switch (ct->c_type) {
case CT_MULTIPART:
return show_multi (ct, serial, alternate);
- break;
case CT_MESSAGE:
switch (ct->c_subtype) {
case MESSAGE_PARTIAL:
return show_partial (ct, serial, alternate);
- break;
case MESSAGE_EXTERNAL:
return show_external (ct, serial, alternate);
- break;
case MESSAGE_RFC822:
default:
return show_message_rfc822 (ct, serial, alternate);
- break;
}
- break;
case CT_TEXT:
return show_text (ct, serial, alternate);
- break;
case CT_AUDIO:
case CT_IMAGE:
case CT_VIDEO:
case CT_APPLICATION:
return show_content (ct, serial, alternate);
- break;
default:
adios (NULL, "unknown content type %d", ct->c_type);
- break;
}
return 0; /* NOT REACHED */
case 'a':
/* insert parameters from Content-Type field */
{
- char **ap, **ep;
+ PM pm;
char *s = "";
- for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ap++, ep++) {
- snprintf (bp, buflen, "%s%s=\"%s\"", s, *ap, *ep);
+ for (pm = ci->ci_first_pm; pm; pm = pm->pm_next) {
+ snprintf (bp, buflen, "%s%s=\"%s\"", s, pm->pm_name,
+ get_param_value(pm, '?'));
len = strlen (bp);
bp += len;
buflen -= len;
char prompt[BUFSIZ];
if (ct->c_type == CT_MULTIPART)
- list_content (ct, -1, 1, 0, 0);
+ list_content (ct, -1, 1, 0, 0, 0);
else
- list_switch (ct, -1, 1, 0, 0);
+ list_switch (ct, -1, 1, 0, 0, 0);
if (xpause && isatty (fileno (stdout))) {
int intr;
*/
if (!alternate || ct->c_subtype == TEXT_PLAIN) {
snprintf (buffer, sizeof(buffer), "%%p%s '%%F'", progsw ? progsw :
- moreproc && *moreproc ? moreproc : "more");
+ moreproc && *moreproc ? moreproc : DEFAULT_PAGER);
cp = (ct->c_showproc = add (buffer, NULL));
return show_content_aux (ct, serial, alternate, cp, NULL);
}
case 'a':
/* insert parameters from Content-Type field */
{
- char **ap, **ep;
+ PM pm;
char *s = "";
- for (ap = ci->ci_attrs, ep = ci->ci_values; *ap; ap++, ep++) {
- snprintf (bp, buflen, "%s%s=\"%s\"", s, *ap, *ep);
+ for (pm = ci->ci_first_pm; pm; pm = pm->pm_next) {
+ snprintf (bp, buflen, "%s%s=\"%s\"", s, pm->pm_name,
+ get_param_value(pm, '?'));
len = strlen (bp);
bp += len;
buflen -= len;