#include <h/mh.h>
#include <fcntl.h>
-#include <h/signals.h>
#include <errno.h>
-#include <signal.h>
#include <h/tws.h>
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/utils.h>
+#include <sys/stat.h>
+#include <sysexits.h>
/* mhmisc.c */
int part_ok(CT, int);
/*
** prototypes
*/
-void list_all_messages(CT *, int, int, int);
+void list_all_messages(CT *, int, int);
int list_switch(CT, int, int, int);
int list_content(CT, int, int, int);
** Top level entry point to list group of messages
*/
void
-list_all_messages(CT *cts, int headers, int verbose, int debug)
+list_all_messages(CT *cts, int verbose, int debug)
{
CT ct, *ctp;
- if (headers)
- printf(LSTFMT1, "msg", "part", "type/subtype", "size",
- "description");
-
+ printf(LSTFMT1, "msg", "part", "type/subtype", "size", "description");
for (ctp = cts; *ctp; ctp++) {
ct = *ctp;
list_single_message(ct, verbose, debug);
}
-
flush_errors();
}
default:
/* list_debug (ct); */
- adios(NULL, "unknown content type %d", ct->c_type);
+ adios(EX_DATAERR, NULL, "unknown content type %d", ct->c_type);
break;
}
/* print Content-Description */
if (ct->c_descr) {
char *dp;
-
- dp = trimcpy(cp = getcpy(ct->c_descr));
- free(cp);
+ dp = trimcpy(cp = mh_xstrdup(ct->c_descr));
+ mh_free0(&cp);
printf(LSTFMT2d1, dp);
- free(dp);
+ mh_free0(&dp);
}
printf("\n");
dp = trimcpy(cp = add(ci->ci_comment, NULL));
free (cp);
snprintf(buffer, sizeof(buffer), "(%s)", dp);
- free(dp);
+ mh_free0(&dp);
printf(LSTFMT2d2, buffer);
}
}