*
* This code is Copyright (c) 2002 and 2013, by the authors of nmh.
* See the COPYRIGHT file in the root directory of the nmh
*
* This code is Copyright (c) 2002 and 2013, by the authors of nmh.
* See the COPYRIGHT file in the root directory of the nmh
}
if (copy_input_to_output (file, infp, outfile, outfp) != OK) {
}
if (copy_input_to_output (file, infp, outfile, outfp) != OK) {
/* chdir so that error messages, esp. from MIME parser, just
refer to the message and not its path. */
/* chdir so that error messages, esp. from MIME parser, just
refer to the message and not its path. */
- advise (NULL,
- "unable to copy message to %s, "
- "it might be lost\n",
- outfile);
+ inform("unable to copy message to %s, "
+ "it might be lost\n", outfile);
to the output. */
if (copy_input_to_output (input_filename, *infp, outfile,
*outfp) != OK) {
to the output. */
if (copy_input_to_output (input_filename, *infp, outfile,
*outfp) != OK) {
- advise (NULL, "unable to copy message to %s, it might be lost\n",
+ inform("unable to copy message to %s, it might be lost\n",
strlen(new_ctline) + 1,
ct->c_ctinfo.ci_first_pm, NULL, 0);
fprintf (fpout, "%s:%s%s\n", np, new_ctline,
strlen(new_ctline) + 1,
ct->c_ctinfo.ci_first_pm, NULL, 0);
fprintf (fpout, "%s:%s%s\n", np, new_ctline,
ct->c_ctinfo.ci_subtype = ct_subtype;
if (! replace_substring (&ct->c_ctline, type,
ct_type_subtype)) {
ct->c_ctinfo.ci_subtype = ct_subtype;
if (! replace_substring (&ct->c_ctline, type,
ct_type_subtype)) {
char *
remove_parameter (char *str, const char *name) {
/* It looks to me, based on the BNF in RFC 2045, than there can't
char *
remove_parameter (char *str, const char *name) {
/* It looks to me, based on the BNF in RFC 2045, than there can't
between the "=" and the parameter value. */
char *param_name = concat (name, "=", NULL);
char *cp;
between the "=" and the parameter value. */
char *param_name = concat (name, "=", NULL);
char *cp;
parent->c_ctinfo.ci_subtype = mh_xstrdup("alternative");
if (! replace_substring (&parent->c_ctline, "/related",
"/alternative")) {
parent->c_ctinfo.ci_subtype = mh_xstrdup("alternative");
if (! replace_substring (&parent->c_ctline, "/related",
"/alternative")) {
multipart/alternative. */
remove_parameter (hf->value, "type");
break;
multipart/alternative. */
remove_parameter (hf->value, "type");
break;
/* This m_mktemp2() call closes the temp file. */
if ((tempfile = m_mktemp2 (NULL, invo_name, NULL, NULL)) == NULL) {
/* This m_mktemp2() call closes the temp file. */
if ((tempfile = m_mktemp2 (NULL, invo_name, NULL, NULL)) == NULL) {
/* Check for invo_name-format-type/subtype. */
if ((cf = context_find_by_type ("format", type, subtype)) == NULL) {
if (verbosw) {
/* Check for invo_name-format-type/subtype. */
if ((cf = context_find_by_type ("format", type, subtype)) == NULL) {
if (verbosw) {
"%s-format-%s/%s profile entry",
ct->c_file, invo_name, type, subtype);
}
return NOTOK;
}
if (strchr (cf, '>')) {
"%s-format-%s/%s profile entry",
ct->c_file, invo_name, type, subtype);
}
return NOTOK;
}
if (strchr (cf, '>')) {
"%s-format-%s/%s profile entry", cf, invo_name, type,
"%s-format-%s/%s profile entry", cf, invo_name, type,
snprintf (buffer2, sizeof buffer2, "%d", serial);
boundary =
concat (boundary_prefix,
snprintf (buffer2, sizeof buffer2, "%d", serial);
boundary =
concat (boundary_prefix,
report (NULL, ct->c_partno, ct->c_file,
"will not decode%s because it is binary (%s)",
ct->c_partno ? ""
report (NULL, ct->c_partno, ct->c_file,
"will not decode%s because it is binary (%s)",
ct->c_partno ? ""
report (NULL, ct->c_partno, ct->c_file,
"will not decode%s because it is 8bit",
ct->c_partno ? ""
report (NULL, ct->c_partno, ct->c_file,
"will not decode%s because it is 8bit",
ct->c_partno ? ""
++*message_mods;
if (verbosw) {
report (NULL, ct->c_partno, ct->c_file, "decode%s",
++*message_mods;
if (verbosw) {
report (NULL, ct->c_partno, ct->c_file, "decode%s",
fix_filename_param (char *name, char *value, PM *first_pm, PM *last_pm) {
int fixed = 0;
fix_filename_param (char *name, char *value, PM *first_pm, PM *last_pm) {
int fixed = 0;
replace_param (first_pm, last_pm, name, decoded, 0);
fixed = 1;
} else {
replace_param (first_pm, last_pm, name, decoded, 0);
fixed = 1;
} else {
- advise (NULL, "failed to decode %s parameter %s", name, value);
+ inform("failed to decode %s parameter %s", name, value);
- admonish (NULL, "unable to remove input file %s, "
- "not modifying it", infile);
+ inform("unable to remove input file %s, "
+ "not modifying it, continuing...", infile);
if (verbosw) {
va_start (args, message);
fmt = concat (filename, partno ? " part " : ", ",
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);
advertise (what, NULL, fmt, args);