*/
#include <h/mh.h>
+#include <h/fmt_scan.h>
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/utils.h>
#include <h/signals.h>
+#include "../sbr/m_maildir.h"
+#include "../sbr/m_mktemp.h"
+#include "../sbr/mime_type.h"
+#include "mhfree.h"
+#include "mhoutsbr.h"
+#include "mhshowsbr.h"
#include <fcntl.h>
#define MHFIXMSG_SWITCHES \
/* flags to/from parse_header_attrs */
extern int suppress_extraneous_trailing_semicolon_warning;
-/* mhoutsbr.c */
-int output_message_fp (CT, FILE *, char *);
-
/* mhmisc.c */
void flush_errors (void);
-/* mhfree.c */
-extern CT *cts;
-
/*
* static prototypes
*/
strlen(new_ctline) + 1,
ct->c_ctinfo.ci_first_pm, NULL, 0);
fprintf (fpout, "%s:%s%s\n", np, new_ctline,
- new_params ? new_params : "");
+ FENDNULL(new_params));
free(new_ctline);
mh_xfree(new_params);
}
if (strchr (cf, '>')) {
inform("'>' prohibited in \"%s\",\nplease fix your "
"%s-format-%s/%s profile entry", cf, invo_name, type,
- subtype ? subtype : "");
+ FENDNULL(subtype));
return NOTOK;
}
snprintf (buffer2, sizeof buffer2, "%d", serial);
boundary =
concat (boundary_prefix,
- first_alt->c_partno ? first_alt->c_partno : "",
+ FENDNULL(first_alt->c_partno),
"-", buffer2, NULL);
}
}
report (NULL, ct->c_partno, ct->c_file,
"will not decode%s because it is binary (%s)",
ct->c_partno ? ""
- : ct->c_ctline ? ct->c_ctline
- : "",
+ : (FENDNULL(ct->c_ctline)),
reason);
}
(void) m_unlink (ct->c_cefile.ce_file);
report (NULL, ct->c_partno, ct->c_file,
"will not decode%s because it is 8bit",
ct->c_partno ? ""
- : ct->c_ctline ? ct->c_ctline
- : "");
+ : (FENDNULL(ct->c_ctline)));
}
(void) m_unlink (ct->c_cefile.ce_file);
free (ct->c_cefile.ce_file);
++*message_mods;
if (verbosw) {
report (NULL, ct->c_partno, ct->c_file, "decode%s",
- ct->c_ctline ? ct->c_ctline : "");
+ FENDNULL(ct->c_ctline));
}
if (lf_line_endings) {
strip_crs (ct, message_mods);
if (verbosw) {
va_start (args, message);
fmt = concat (filename, partno ? " part " : ", ",
- partno ? partno : "", partno ? ", " : "", message, NULL);
+ FENDNULL(partno), partno ? ", " : "", message, NULL);
advertise (what, NULL, fmt, args);