if (EHLOset ("8BITMIME") && EHLOset ("SMTPUTF8")) {
mail_parameters = " BODY=8BITMIME SMTPUTF8";
} else {
- advise (NULL, "SMTP server does not support %s, not sending.\n"
+ inform("SMTP server does not support %s, not sending.\n"
"Rebuild message with 7-bit headers, WITHOUT -headerencoding utf-8.",
EHLOset ("SMTPUTF8") ? "8BITMIME" : "SMTPUTF8");
sm_end (NOTOK);
if (EHLOset ("8BITMIME")) {
mail_parameters = " BODY=8BITMIME";
} else {
- advise (NULL, "SMTP server does not support 8BITMIME, not sending.\n"
+ inform("SMTP server does not support 8BITMIME, not sending.\n"
"Suggest encoding message for 7-bit transport by setting your\n"
"locale to C, and/or specifying *b64 in mhbuild directives.");
sm_end (NOTOK);
}
}
if (oops)
- advise (NULL, "please fix the %s: entry in your %s file",
+ inform("please fix the %s: entry in your %s file",
"alternate-mailboxes", mh_profile);
}
void
ambigsw (const char *arg, const struct swit *swp)
{
- advise (NULL, "-%s ambiguous. It matches", arg);
+ inform("-%s ambiguous. It matches", arg);
print_sw (arg, swp, "-", stderr);
}
}
if (skip || (((unsigned char) *cp) & 0x80) ||
(value = b642nib[((unsigned char) *cp) & 0x7f]) > 0x3f) {
- advise (NULL, "invalid BASE64 encoding in %s", cp);
+ inform("invalid BASE64 encoding in %s", cp);
charstring_free (decoded_c);
*decoded = NULL;
/* Show some context for the error. */
for (i = 0; i < 20 && cp > encoded; ++i, --cp) {}
- advise (NULL, "premature ending (bitno %d) near %s", bitno,
+ inform("premature ending (bitno %d) near %s", bitno,
cp ? cp : encoded);
charstring_free (decoded_c);
*decoded = NULL;
const int num = snprintf(s, sizeof s, "[0x%02x]", *cp);
if (num <= 0 || (unsigned int) num >= sizeof s) {
- advise (NULL, "hexify failed to write nonprintable character, needed %d bytes", num + 1);
+ inform("hexify failed to write nonprintable character, needed %d bytes", num + 1);
} else {
charstring_append_cstring (tmp, s);
}
NEW(np);
m_defs = np;
if (!(np->n_name = strdup ("Path"))) {
- advise (NULL, "strdup failed");
+ inform("strdup failed");
return -1;
}
if (!(np->n_field = strdup (path))) {
- advise (NULL, "strdup failed");
+ inform("strdup failed");
return -1;
}
np->n_context = 0;
if (mypath == NULL && (mypath = getenv ("HOME")) != NULL)
if (!(mypath = strdup (mypath))) {
- advise (NULL, "strdup failed");
+ inform("strdup failed");
return -1;
}
}
if (items_matched == 7) {
/* The 'Z' must be capital according to RFC 5545 Sec. 3.3.5. */
if (utc_indicator != 'Z') {
- advise (NULL, "%s has invalid timezone indicator of 0x%x",
+ inform("%s has invalid timezone indicator of 0x%x",
datetime, utc_indicator);
return NOTOK;
}
params->start_dt = tws.tw_clock;
}
} else {
- advise (NULL, "failed to parse start time %s for %s",
+ inform("failed to parse start time %s for %s",
params->dtstart,
in_standard ? "standard" : "daylight");
return NULL;
if (parse_datetime (node->value, NULL, 0, &tws[0]) == OK) {
return strdup (dasctime (&tws[0], 0));
}
- advise (NULL, "unable to parse datetime %s", node->value);
+ inform("unable to parse datetime %s", node->value);
return NULL;
}
if (tz) {
free(dt_timezone);
} else {
- advise (NULL, "did not find VTIMEZONE section for %s", dt_timezone);
+ inform("did not find VTIMEZONE section for %s", dt_timezone);
free(dt_timezone);
return NULL;
}
}
if (transition[0] < transition[1]) {
- advise (NULL, "format_datetime() requires that daylight "
+ inform("format_datetime() requires that daylight "
"saving time transition precede standard time "
"transition");
return NULL;
0, &tws[0]) == OK) {
dt[0] = tws[0].tw_clock;
} else {
- advise (NULL, "unable to parse datetime %s", node->value);
+ inform("unable to parse datetime %s", node->value);
return NULL;
}
&tws[1]) == OK) {
dt[1] = tws[1].tw_clock;
} else {
- advise (NULL, "unable to parse datetime %s",
+ inform("unable to parse datetime %s",
node->value);
return NULL;
}
if (dst) {
if (tz->daylight_params.start_dt > 0 &&
dt[dst] < tz->daylight_params.start_dt) {
- advise (NULL, "date-time of %s is before VTIMEZONE start "
+ inform("date-time of %s is before VTIMEZONE start "
"of %s", node->value,
tz->daylight_params.dtstart);
return NULL;
} else {
if (tz->standard_params.start_dt > 0 &&
dt[dst] < tz->standard_params.start_dt) {
- advise (NULL, "date-time of %s is before VTIMEZONE start "
+ inform("date-time of %s is before VTIMEZONE start "
"of %s", node->value,
tz->standard_params.dtstart);
return NULL;
}
} else {
if (! tp_std) {
- advise (NULL, "unsupported date-time format: %s",
+ inform("unsupported date-time format: %s",
tz->standard_params.dtstart);
return NULL;
}
if (! tp_dt) {
- advise (NULL, "unsupported date-time format: %s", node->value);
+ inform("unsupported date-time format: %s", node->value);
return NULL;
}
}
charset = write_charset_8bit();
if (strcasecmp(charset, "US-ASCII") == 0) {
- advise(NULL, "Cannot use US-ASCII with 8 bit characters in header");
+ inform("Cannot use US-ASCII with 8 bit characters in header");
return 1;
}
eightbitcount + qpspecialcount, 0);
default:
- advise(NULL, "Internal error: unknown RFC-2047 encoding type");
+ inform("Internal error: unknown RFC-2047 encoding type");
return 1;
}
}
numencode = strbase64(ENCODELINELIMIT - (q - linestart) - 2);
if (numencode <= 0) {
- advise(NULL, "Internal error: tried to encode %d characters "
+ inform("Internal error: tried to encode %d characters "
"in base64", numencode);
return 1;
}
numencode--;
if (numencode == 0) {
- advise(NULL, "Internal error: could not find start of "
+ inform("Internal error: could not find start of "
"UTF-8 character when base64 encoding header");
return 1;
}
if (writeBase64raw((unsigned char *) p, numencode,
(unsigned char *) q) != OK) {
- advise(NULL, "Internal error: base64 encoding of header failed");
+ inform("Internal error: base64 encoding of header failed");
return 1;
}
if (writeBase64raw((unsigned char *) p, strlen(p),
(unsigned char *) q) != OK) {
- advise(NULL, "Internal error: base64 encoding of header failed");
+ inform("Internal error: base64 encoding of header failed");
return 1;
}
for (groupflag = 0; (mp = getname(*value)); ) {
if ((mn = getm(mp, NULL, 0, errbuf, sizeof(errbuf))) == NULL) {
- advise(NULL, "%s: %s", errbuf, mp);
+ inform("%s: %s", errbuf, mp);
errflag++;
continue;
}
break;
default:
- advise(NULL, "Internal error: unknown RFC-2047 encoding type");
+ inform("Internal error: unknown RFC-2047 encoding type");
errflag++;
goto out;
}
}
if (mn->m_note[0] != '(' || mn->m_note[len - 1] != ')') {
- advise(NULL, "Internal error: Invalid note field \"%s\"",
+ inform("Internal error: Invalid note field \"%s\"",
mn->m_note);
errflag++;
goto out;
break;
default:
- advise(NULL, "Internal error: unknown RFC-2047 encoding type");
+ inform("Internal error: unknown RFC-2047 encoding type");
errflag++;
goto out;
}
switch (pid = fork()) {
case -1:
status = NOTOK;
- advise(NULL, "external database may be out-of-date.");
+ inform("external database may be out-of-date.");
break;
case 0:
if (did_message == 0) {
char *msghook;
if ((msghook = context_find("msg-hook")) != NULL)
- advise(NULL, msghook);
+ inform(msghook);
else {
char errbuf[BUFSIZ];
snprintf(errbuf, sizeof(errbuf), "external hook \"%s\"", hook);
usr_fstring[i] = '_';
}
- advise(NULL, "\"%s\": format compile error - %s",
+ inform("\"%s\": format compile error - %s",
&usr_fstring[errpos-errctx], str);
adios (NULL, "%*s", errctx+1, "^");
}
*/
if (msgnum > mp->hghoff) {
if (!(mp = folder_realloc (mp, mp->lowoff, msgnum + 100))) {
- advise (NULL, "unable to allocate folder storage");
+ inform("unable to allocate folder storage");
return -1;
}
*mpp = mp;
} else if (msgnum < mp->lowoff) {
if (!(mp = folder_realloc (mp, msgnum, mp->hghoff))) {
- advise (NULL, "unable to allocate folder storage");
+ inform("unable to allocate folder storage");
return -1;
}
*mpp = mp;
*/
if (linkerr == EXDEV || linkerr == EPERM) {
if (stat (newmsg, &st1) == 0) {
- advise (NULL, "message %s:%s already exists", mp->foldpath, newmsg);
+ inform("message %s:%s already exists", mp->foldpath, newmsg);
return -1;
}
if ((mp = folder_realloc (mp, 1, mp->hghmsg)))
*mpp = mp;
else {
- advise (NULL, "unable to allocate folder storage");
+ inform("unable to allocate folder storage");
return -1;
}
}
. {
/* By default, flex will just pass unmatched text. Catch it instead. */
- advise (NULL, "unexpected input: |%s|\n", icaltext);
+ inform("unexpected input: |%s|\n", icaltext);
}
<<EOF>> {
curlock = li->curlock;
if ((tmpfile = m_mktemp(li->tmplock, &fd, NULL)) == NULL) {
- advise(NULL, "unable to create temporary file in %s", li->tmplock);
+ inform("unable to create temporary file in %s", li->tmplock);
return -1;
}
cp = delimp;
if (*cp != '\0' && *cp != '-' && *cp != ':' && *cp != '=') {
badelim:
- advise (NULL, "illegal argument delimiter: `%c'(0%o)", *delimp, *delimp);
+ inform("illegal argument delimiter: `%c'(0%o)", *delimp, *delimp);
return 0;
}
badmsg:
switch (err) {
case BADMSG:
- advise (NULL, "no %s message", cp);
+ inform("no %s message", cp);
break;
case BADNUM:
- advise (NULL, "message %s doesn't exist", cp);
+ inform("message %s doesn't exist", cp);
break;
case BADRNG:
- advise (NULL, "message %s out of range 1-%d", cp, mp->hghmsg);
+ inform("message %s out of range 1-%d", cp, mp->hghmsg);
break;
case BADLST:
badlist:
- advise (NULL, "bad message list %s", name);
+ inform("bad message list %s", name);
break;
case BADNEW:
- advise (NULL, "folder full, no %s message", name);
+ inform("folder full, no %s message", name);
break;
default:
- advise (NULL, "no messages match specification");
+ inform("no messages match specification");
}
return 0;
}
goto badelim;
if (first > mp->hghmsg || last < mp->lowmsg) {
rangerr:
- advise (NULL, "no messages in range %s", name);
+ inform("no messages in range %s", name);
return 0;
}
}
} else { /* looking for the nth message. if not enough, fail. */
if (last < mp->lowmsg || last > mp->hghmsg) {
- advise (NULL, "no such message");
+ inform("no such message");
return 0;
}
first = last;
|| first < mp->lowmsg
|| !(does_exist (mp, first))) {
if (!strcmp (name, "cur") || !strcmp (name, "."))
- advise (NULL, "no %s message", name);
+ inform("no %s message", name);
else
- advise (NULL, "message %d doesn't exist", first);
+ inform("message %d doesn't exist", first);
return 0;
}
}
if (first || just_one)
return BADMSG;
- advise (NULL, "sequence %s %s", cp, inverted ? "full" : "empty");
+ inform("sequence %s %s", cp, inverted ? "full" : "empty");
return -1;
}
int next_char;
if (c == EOF || (next_char = Peek (s)) == EOF) {
*bufsz = *cp = *buf = 0;
- advise (NULL, "eof encountered in field \"%s\"", name);
+ inform("eof encountered in field \"%s\"", name);
leave_getfld (s);
return s->state = FMTERR;
}
if (*bufsz < n + 1) {
/* No, it can't. Oh well, guess we'll blow up. */
*bufsz = *cp = *buf = 0;
- advise (NULL, "eol encountered in field \"%s\"", name);
+ inform("eol encountered in field \"%s\"", name);
s->state = FMTERR;
break;
}
it had read. It's in c, use it. */
*cp++ = c;
*bufsz = *cp = *buf = 0;
- advise (NULL, "field name \"%s\" exceeds %d bytes", name,
+ inform("field name \"%s\" exceeds %d bytes", name,
NAMESZ - 2);
s->state = LENERR;
break;
int binary = 0, c;
if (!(fp = fopen(file_name, "r"))) {
- advise (NULL, "unable to access file \"%s\"", file_name);
+ inform("unable to access file \"%s\"", file_name);
return NULL;
}
if ((cp = strchr(file_name, '\''))) {
/* file_name contains a single quote. */
if (strchr(file_name, '"')) {
- advise(NULL, "filenames containing both single and double quotes "
+ inform("filenames containing both single and double quotes "
"are unsupported for attachment");
return NULL;
}
(void) pclose(fp);
} else {
- advise(NULL, "no output from %s", cmd);
+ inform("no output from %s", cmd);
}
free(cmd);
} else {
- advise(NULL, "concat with \"%s\" failed, out of memory?", proc);
+ inform("concat with \"%s\" failed, out of memory?", proc);
}
return cp ? strdup(cp) : NULL;
if (mh_oauth_get_err_code(ctx) == MH_OAUTH_BAD_GRANT) {
adios(NULL, "credentials rejected -- run mhlogin -saslmech xoauth2 -authservice %s", svc);
}
- advise(NULL, "error refreshing OAuth2 token");
+ inform("error refreshing OAuth2 token");
adios(NULL, mh_oauth_get_err_string(ctx));
}
switch (pid) {
case -1:
/* fork error */
- advise (NULL, "unable to fork, so can't push...");
+ inform("unable to fork, so can't push...");
break;
case 0:
(stb.st_mode & 077) != 0) {
/* We make this a fatal error to force the
user to correct it. */
- advise(NULL, "group or other permissions, %#o, "
+ inform("group or other permissions, %#o, "
"forbidden: %s", stb.st_mode, credentials_file);
adios(NULL, "Remove password or correct file "
"permissions.");
*/
if (new_seq) {
if (!(svector_push_back (mp->msgattrs, strdup (cp)))) {
- advise (NULL, "strdup failed");
+ inform("strdup failed");
return 0;
}
}
*/
if (new_seq) {
if (!(svector_push_back (mp->msgattrs, strdup (cp)))) {
- advise (NULL, "strdup failed");
+ inform("strdup failed");
return 0;
}
}
*/
if (new_seq) {
if (!(svector_push_back (mp->msgattrs, strdup (cp)))) {
- advise (NULL, "strdup failed");
+ inform("strdup failed");
return 0;
}
}
}
} else {
if (new_seq) {
- advise (NULL, "no such sequence as %s", cp);
+ inform("no such sequence as %s", cp);
return 0;
}
}
}
}
- advise (NULL, "no such sequence as %s", cp);
+ inform("no such sequence as %s", cp);
return 0;
}
char *pp;
if (s == NULL || *s == '\0') {
- advise (NULL, "empty sequence name");
+ inform("empty sequence name");
return 0;
}
strcmp (s, "last") &&
strcmp (s, "prev") &&
strcmp (s, "next"))) {
- advise (NULL, "illegal sequence name: %s", s);
+ inform("illegal sequence name: %s", s);
return 0;
}
* an alphabetic character ...
*/
if (!isalpha ((unsigned char) *s)) {
- advise (NULL, "illegal sequence name: %s", s);
+ inform("illegal sequence name: %s", s);
return 0;
}
*/
for (pp = s + 1; *pp; pp++)
if (!isalnum ((unsigned char) *pp)) {
- advise (NULL, "illegal sequence name: %s", s);
+ inform("illegal sequence name: %s", s);
return 0;
}
void trunccpy(char *dst, const char *src, size_t size)
{
if (!size) {
- advise(NULL, "trunccpy: zero-length destination: \"%.20s\"",
+ inform("trunccpy: zero-length destination: \"%.20s\"",
src ? src : "null");
abort();
}
i = YESW;
break;
default:
- advise (NULL, "say what?");
+ inform("say what?");
break;
}
}
i = YESW;
break;
default:
- advise (NULL, "say what?");
+ inform("say what?");
break;
}
}
if (uprf (name, "distribution-"))
snprintf (name, sizeof(name), "%s%s", "Resent", &name[12]);
if (!uprf (name, "resent")) {
- advise (NULL, BADHDR, "draft", name);
+ inform(BADHDR, "draft", name);
goto leave_bad;
}
if (state == FLD)
case BODY:
for (dp = buffer; *dp; dp++)
if (!isspace ((unsigned char) *dp)) {
- advise (NULL, BADTXT, "draft");
+ inform(BADTXT, "draft");
goto leave_bad;
}
case LENERR:
case FMTERR:
- advise (NULL, BADRFT, "draft");
+ inform(BADRFT, "draft");
leave_bad: ;
fclose (ifp);
fclose (ofp);
fflush (ofp);
if (!resent) {
- advise (NULL, BADMSG, "draft");
+ inform(BADMSG, "draft");
fclose (ofp);
(void) m_unlink (drft);
if (rename (backup, drft) == NOTOK)
i = YESW;
break;
default:
- advise (NULL, "say what?");
+ inform("say what?");
break;
}
}
if (audfile) {
int i;
if ((i = stat (audfile, &st)) == NOTOK)
- advise (NULL, "Creating Receive-Audit: %s", audfile);
+ inform("Creating Receive-Audit: %s", audfile);
if ((aud = fopen (audfile, "a")) == NULL)
adios (audfile, "unable to append to");
else if (i == NOTOK)
case SCNERR:
if (aud)
fputs ("inc aborted!\n", aud);
- advise (NULL, "aborted!"); /* doesn't clean up locks! */
+ inform("aborted!"); /* doesn't clean up locks! */
break;
case SCNNUM:
- advise (NULL, "BUG in %s, number out of range", invo_name);
+ inform("BUG in %s, number out of range", invo_name);
break;
default:
- advise (NULL, "BUG in %s, scan() botch (%d)", invo_name, incerr);
+ inform("BUG in %s, scan() botch (%d)", invo_name, incerr);
break;
case SCNMSG:
if (inc_type == INC_FILE && Maildir == NULL) {
if (trnflag) {
if (stat (newmail, &st) != NOTOK && s1.st_mtime != st.st_mtime)
- advise (NULL, "new messages have arrived!\007");
+ inform("new messages have arrived!\007");
else {
int newfd;
if ((newfd = creat (newmail, 0600)) != NOTOK)
if (msgnum >= mp2->hghoff
&& !(mp2 = folder_realloc (mp2, mp2->lowoff, msgnum + 1))) {
- advise (NULL, "unable to reallocate folder storage");
+ inform("unable to reallocate folder storage");
goto skip;
}
CE ce = &ct->c_cefile;
if (!ct->c_id) {
- advise (NULL, "no %s: field in %s", ID_FIELD, ct->c_file);
+ inform("no %s: field in %s", ID_FIELD, ct->c_file);
return;
}
if (!ce) {
- advise (NULL, "unable to decode %s", ct->c_file);
+ inform("unable to decode %s", ct->c_file);
return;
}
if (find_cache (NULL, wcachesw != CACHE_NEVER ? wcachesw : CACHE_ASK,
&cachetype, ct->c_id, cachefile, sizeof(cachefile))
== NOTOK) {
- advise (NULL, "unable to cache %s's contents", ct->c_file);
+ inform("unable to cache %s's contents", ct->c_file);
return;
}
if (wcachesw != CACHE_NEVER && wcachesw != CACHE_ASK) {
set_text_ctparams(ct, fx.decodetypes, fx.lf_line_endings);
*ctp++ = ct;
} else {
- advise (NULL, "unable to parse message from file %s", file);
+ inform("unable to parse message from file %s", file);
status = NOTOK;
/* If there's an outfile, pass the input message unchanged, so the
}
if (copy_input_to_output (file, infp, outfile, outfp) != OK) {
- advise (NULL, "unable to copy message to %s, "
+ inform("unable to copy message to %s, "
"it might be lost\n", outfile);
}
set_text_ctparams(ct, fx.decodetypes, fx.lf_line_endings);
*ctp++ = ct;
} else {
- advise (NULL, "unable to parse message %s", msgnam);
+ inform("unable to parse message %s", msgnam);
status = NOTOK;
/* If there's an outfile, pass the input message
if (copy_input_to_output (input_filename, infp,
outfile, outfp) != OK) {
- 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);
}
fclose (infp);
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",
outfile);
}
}
}
} else {
*ct = NULL;
- advise (NULL, "unable to parse fixed part");
+ inform("unable to parse fixed part");
status = NOTOK;
}
free (filename);
} else {
- advise (NULL, "unable to replace broken boundary");
+ inform("unable to replace broken boundary");
status = NOTOK;
}
} else {
- advise (NULL, "unable to create temporary file in %s",
+ inform("unable to create temporary file in %s",
get_temp_dir());
status = NOTOK;
}
int status = OK;
if (ct->c_file == NULL) {
- advise (NULL, "missing input filename");
+ inform("missing input filename");
return NOTOK;
}
case LENERR:
case FMTERR:
- advise (NULL, "message format error in component #%d", compnum);
+ inform("message format error in component #%d", compnum);
status = NOTOK;
break;
default:
- advise (NULL, "getfld() returned %d", state);
+ inform("getfld() returned %d", state);
status = NOTOK;
break;
}
*cp = '\0';
ct_subtype = mh_xstrdup(++cp);
} else {
- advise (NULL, "missing / in MIME type of %s %s",
+ inform("missing / in MIME type of %s %s",
ct->c_file, ct->c_partno);
free (ct_type);
return NOTOK;
ct->c_ctinfo.ci_subtype = ct_subtype;
if (! replace_substring (&ct->c_ctline, type,
ct_type_subtype)) {
- advise (NULL, "did not find %s in %s",
+ inform("did not find %s in %s",
type, ct->c_ctline);
}
}
break;
} else {
- advise (NULL, "did not find %s in %s",
+ inform("did not find %s in %s",
type, hf->value);
}
}
parent->c_ctinfo.ci_subtype = mh_xstrdup("alternative");
if (! replace_substring (&parent->c_ctline, "/related",
"/alternative")) {
- advise (NULL,
- "did not find multipart/related in %s",
- parent->c_ctline);
+ inform("did not find multipart/related in %s",
+ parent->c_ctline);
}
/* Update Content-Type header field. */
remove_parameter (hf->value, "type");
break;
} else {
- advise (NULL, "did not find multipart/"
+ inform("did not find multipart/"
"related in header %s",
hf->value);
}
/* This m_mktemp2() call closes the temp file. */
if ((tempfile = m_mktemp2 (NULL, invo_name, NULL, NULL)) == NULL) {
- advise (NULL, "unable to create temporary file in %s",
+ inform("unable to create temporary file in %s",
get_temp_dir());
} else {
tmp_plain_file = mh_xstrdup (tempfile);
/* Check for invo_name-format-type/subtype. */
if ((cf = context_find_by_type ("format", type, subtype)) == NULL) {
if (verbosw) {
- advise (NULL, "Don't know how to convert %s, there is no "
+ inform("Don't know how to convert %s, there is no "
"%s-format-%s/%s profile entry",
ct->c_file, invo_name, type, subtype);
}
return NOTOK;
}
if (strchr (cf, '>')) {
- advise (NULL, "'>' prohibited in \"%s\",\nplease fix your "
+ inform("'>' prohibited in \"%s\",\nplease fix your "
"%s-format-%s/%s profile entry", cf, invo_name, type,
subtype ? subtype : "");
}
if (found_boundary) {
- advise (NULL, "giving up trying to find a unique boundary");
+ inform("giving up trying to find a unique boundary");
free_content (ct);
return NULL;
}
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);
}
}
free((void *)new_params); /* Cast away const. Sigh. */
free((void *)params);
} else {
- advise (NULL, "did not find semicolon in %s:%s\n",
+ inform("did not find semicolon in %s:%s\n",
hf->name, hf->value);
}
}
code = geta();
}
if (cred == NULL) {
- advise(NULL, "error exchanging code for OAuth2 token");
+ inform("error exchanging code for OAuth2 token");
adios(NULL, mh_oauth_get_err_string(ctx));
}
return 1;
if (! c1->c_name || strcasecmp (c1->c_name, "body")) {
- advise (NULL, "format filters are currently only supported on "
+ inform("format filters are currently only supported on "
"the \"body\" component");
return 1;
}
char *cp;
if (*parptr++ != '=' || !*(cp = parse ())) {
- advise (NULL, "missing argument to variable %s", name);
+ inform("missing argument to variable %s", name);
return 1;
}
char c, *cp;
if (*parptr++ != '=') {
- advise (NULL, "missing argument to variable %s", name);
+ inform("missing argument to variable %s", name);
return 1;
}
case LENERR:
case FMTERR:
- advise (NULL, "format error in message %s", mname);
+ inform("format error in message %s", mname);
exitstat++;
m_getfld_state_destroy (&gstate);
return;
if (!answer)
goto losing_directory;
if (!makedir (file)) {
- advise (NULL, "unable to create directory %s", file);
+ inform("unable to create directory %s", file);
goto losing_directory;
}
}
errs = add (buffer, errs);
} else {
- advise (NULL, "%s", buffer);
+ inform("%s", buffer);
}
}
putc ('\n', out);
result = write8Bit (ct, out);
} else {
- advise (NULL, "can't handle binary transfer encoding in content");
+ inform("can't handle binary transfer encoding in content");
result = NOTOK;
}
break;
default:
- advise (NULL, "unknown transfer encoding in content");
+ inform("unknown transfer encoding in content");
result = NOTOK;
break;
}
struct node *np;
if (compp)
- advise(NULL, "profile-components ignored with -all");
+ inform("profile-components ignored with -all");
if (components >= 0)
- advise(NULL, "-%scomponents ignored with -all",
+ inform("-%scomponents ignored with -all",
components ? "" : "no");
/* Print all entries in context/profile list. That does not
return NULL;
} else if (S_ISDIR(statbuf.st_mode)) {
/* Don't try to parse a directory. */
- advise (NULL, "%s is a directory", file);
+ inform("%s is a directory", file);
return NULL;
} else if ((fp = fopen (file, "r")) == NULL) {
advise (file, "unable to read");
if (!(ct = get_content (fp, file, 1))) {
if (is_stdin)
(void) m_unlink (file);
- advise (NULL, "unable to decode %s", file);
+ inform("unable to decode %s", file);
return NULL;
}
ct->c_vrsn = vrsn;
} else {
if (! suppress_multiple_mime_version_warning)
- advise (NULL, "message %s has multiple %s: fields",
+ inform("message %s has multiple %s: fields",
ct->c_file, VRSN_FIELD);
free(vrsn);
}
/* Check if we've already seen a Content-Type header */
if (ct->c_ctline) {
- advise (NULL, "message %s has multiple %s: fields",
+ inform("message %s has multiple %s: fields",
ct->c_file, TYPE_FIELD);
goto next_header;
}
* Content-Transfer-Encoding field
*/
if (ct->c_celine) {
- advise (NULL, "message %s has multiple %s: fields",
+ inform("message %s has multiple %s: fields",
ct->c_file, ENCODING_FIELD);
goto next_header;
}
goto next_header;
if (ct->c_digested) {
- advise (NULL, "message %s has multiple %s: fields",
+ inform("message %s has multiple %s: fields",
ct->c_file, MD5_FIELD);
goto next_header;
}
*dp = c, cp = dp;
if (!*ci->ci_type) {
- advise (NULL, "invalid %s: field in message %s (empty type)",
+ inform("invalid %s: field in message %s (empty type)",
TYPE_FIELD, ct->c_file);
return NOTOK;
}
*dp = c, cp = dp;
if (!*ci->ci_subtype) {
- advise (NULL,
- "invalid %s: field in message %s (empty subtype for \"%s\")",
- TYPE_FIELD, ct->c_file, ci->ci_type);
+ inform("invalid %s: field in message %s (empty subtype for \"%s\")",
+ TYPE_FIELD, ct->c_file, ci->ci_type);
return NOTOK;
}
to_lower(ci->ci_subtype);
mh_xfree(ct->c_id);
ct->c_id = NULL;
if (!(dp = strchr(ct->c_id = ++cp, '>'))) {
- advise (NULL, "invalid ID in message %s", ct->c_file);
+ inform("invalid ID in message %s", ct->c_file);
return NOTOK;
}
c = *dp;
if (*dp == ']')
break;
if (dp < cp) {
- advise (NULL, "invalid description in message %s", ct->c_file);
+ inform("invalid description in message %s", ct->c_file);
ct->c_descr = NULL;
return NOTOK;
}
if (*dp == '}')
break;
if (dp < cp) {
- advise (NULL, "invalid disposition in message %s", ct->c_file);
+ inform("invalid disposition in message %s", ct->c_file);
ct->c_dispo = NULL;
return NOTOK;
}
cp++;
if (dp == cp) {
- advise (NULL, "invalid null transfer encoding specification");
+ inform("invalid null transfer encoding specification");
return NOTOK;
}
}
if (ct->c_reqencoding == CE_UNKNOWN) {
- advise (NULL, "invalid CTE specification: \"%s\"", dp);
+ inform("invalid CTE specification: \"%s\"", dp);
return NOTOK;
}
}
}
else
- advise (NULL,
- "extraneous information in message %s's %s: field\n%*s(%s)",
- ct->c_file, TYPE_FIELD, strlen(invo_name) + 2, "", cp);
+ inform("extraneous information in message %s's %s: field\n%*s(%s)",
+ ct->c_file, TYPE_FIELD, strlen(invo_name) + 2, "", cp);
}
return OK;
return NOTOK;
}
} else if (*cp) {
- advise (NULL,
- "extraneous information in message %s's %s: field\n%*s(%s)",
- ct->c_file, DISPO_FIELD, strlen(invo_name) + 2, "", cp);
+ inform("extraneous information in message %s's %s: field\n%*s(%s)",
+ ct->c_file, DISPO_FIELD, strlen(invo_name) + 2, "", cp);
}
if (buildflag)
switch (c = *cp++) {
case '\0':
invalid:
- advise (NULL, "invalid comment in message %s's %s: field",
+ inform("invalid comment in message %s's %s: field",
filename, fieldname);
return NOTOK;
/* complain if boundary parameter is missing */
if (!pm) {
- advise (NULL,
- "a \"boundary\" parameter is mandatory for \"%s/%s\" type in message %s's %s: field",
- ci->ci_type, ci->ci_subtype, ct->c_file, TYPE_FIELD);
+ inform("a \"boundary\" parameter is mandatory for \"%s/%s\" type in message %s's %s: field",
+ ci->ci_type, ci->ci_subtype, ct->c_file, TYPE_FIELD);
return NOTOK;
}
for (cp = bp; isspace ((unsigned char) *cp); cp++)
continue;
if (!*cp) {
- advise (NULL, "invalid \"boundary\" parameter for \"%s/%s\" type in message %s's %s: field",
+ inform("invalid \"boundary\" parameter for \"%s/%s\" type in message %s's %s: field",
ci->ci_type, ci->ci_subtype, ct->c_file, TYPE_FIELD);
return NOTOK;
}
}
if (! suppress_bogus_mp_content_warning) {
- advise (NULL, "bogus multipart content in message %s", ct->c_file);
+ inform("bogus multipart content in message %s", ct->c_file);
}
bogus_mp_content = 1;
if (sscanf (pm->pm_value, "%d", &p->pm_partno) != 1
|| p->pm_partno < 1) {
invalid_param:
- advise (NULL,
- "invalid %s parameter for \"%s/%s\" type in message %s's %s field",
- pm->pm_name, ci->ci_type, ci->ci_subtype,
- ct->c_file, TYPE_FIELD);
+ inform("invalid %s parameter for \"%s/%s\" type in message %s's %s field",
+ pm->pm_name, ci->ci_type, ci->ci_subtype,
+ ct->c_file, TYPE_FIELD);
return NOTOK;
}
continue;
if (!p->pm_partid
|| !p->pm_partno
|| (p->pm_maxno && p->pm_partno > p->pm_maxno)) {
- advise (NULL,
- "invalid parameters for \"%s/%s\" type in message %s's %s field",
- ci->ci_type, ci->ci_subtype,
- ct->c_file, TYPE_FIELD);
+ inform("invalid parameters for \"%s/%s\" type in message %s's %s field",
+ ci->ci_type, ci->ci_subtype, ct->c_file, TYPE_FIELD);
return NOTOK;
}
}
}
if (!e->eb_access) {
- advise (NULL,
- "invalid parameters for \"%s/%s\" type in message %s's %s field",
- ci->ci_type, ci->ci_subtype, ct->c_file, TYPE_FIELD);
+ inform("invalid parameters for \"%s/%s\" type in message %s's %s field",
+ ci->ci_type, ci->ci_subtype, ct->c_file, TYPE_FIELD);
return NOTOK;
}
default:
if (pidXwait (child_id, NULL) == OK)
- advise (NULL, "request sent");
+ inform("request sent");
break;
}
if (*cp == 0) {
if (! suppress_extraneous_trailing_semicolon_warning) {
- advise (NULL,
- "extraneous trailing ';' in message %s's %s: "
- "parameter list",
- filename, fieldname);
+ inform("extraneous trailing ';' in message %s's %s: "
+ "parameter list", filename, fieldname);
}
return DONE;
}
for (up = dp; isspace ((unsigned char) *dp);)
dp++;
if (dp == cp || *dp != '=') {
- advise (NULL,
- "invalid parameter in message %s's %s: "
- "field\n%*sparameter %s (error detected at offset %d)",
- filename, fieldname, strlen(invo_name) + 2, "",cp, dp - cp);
+ inform("invalid parameter in message %s's %s: "
+ "field\n%*sparameter %s (error detected at offset %d)",
+ filename, fieldname, strlen(invo_name) + 2, "",cp, dp - cp);
return NOTOK;
}
if (isdigit((unsigned char) *vp))
index = *vp - '0' + index * 10;
else {
- advise (NULL, "invalid parameter index in message %s's "
+ inform("invalid parameter index in message %s's "
"%s: field\n%*s(parameter %s)", filename,
fieldname, strlen(invo_name) + 2, "", cp);
return NOTOK;
}
vp++;
} else {
- advise(NULL, "missing charset in message %s's %s: "
+ inform("missing charset in message %s's %s: "
"field\n%*s(parameter %s)", filename, fieldname,
strlen(invo_name) + 2, "", nameptr);
free(nameptr);
}
vp++;
} else {
- advise(NULL, "missing language tag in message %s's %s: "
+ inform("missing language tag in message %s's %s: "
"field\n%*s(parameter %s)", filename, fieldname,
strlen(invo_name) + 2, "", nameptr);
free(nameptr);
!isxdigit((unsigned char) *(vp + 1)) ||
*(vp + 2) == '\0' ||
!isxdigit((unsigned char) *(vp + 2))) {
- advise(NULL, "invalid encoded sequence in message "
+ inform("invalid encoded sequence in message "
"%s's %s: field\n%*s(parameter %s)",
filename, fieldname, strlen(invo_name) + 2,
"", nameptr);
switch (*cp++) {
case '\0':
bad_quote:
- advise (NULL,
- "invalid quoted-string in message %s's %s: "
- "field\n%*s(parameter %s)",
- filename, fieldname, strlen(invo_name) + 2, "",
- nameptr);
+ inform("invalid quoted-string in message %s's %s: "
+ "field\n%*s(parameter %s)", filename,
+ fieldname, strlen(invo_name) + 2, "", nameptr);
free(nameptr);
mh_xfree(charset);
mh_xfree(lang);
} else {
for (sp2 = pp->sechead; sp2 != NULL; sp2 = sp2->next) {
if (sp2->index == sp->index) {
- advise (NULL, "duplicate index (%d) in message "
+ inform("duplicate index (%d) in message "
"%s's %s: field\n%*s(parameter %s)", sp->index,
filename, fieldname, strlen(invo_name) + 2, "",
nameptr);
}
if (sp2 == NULL) {
- advise(NULL, "Internal error: cannot insert partial "
+ inform("Internal error: cannot insert partial "
"param in message %s's %s: field\n%*s(parameter %s)",
filename, fieldname, strlen(invo_name) + 2, "",
nameptr);
int pindex = 0;
for (sp = pp->sechead; sp != NULL; sp = sp->next) {
if (sp->index != pindex++) {
- advise(NULL, "missing section %d for parameter in "
+ inform("missing section %d for parameter in "
"message %s's %s: field\n%*s(parameter %s)", pindex - 1,
filename, fieldname, strlen(invo_name) + 2, "",
pp->name);
continue;
if (strlen(params->pm_name) > CPERLIN) {
- advise(NULL, "Parameter name \"%s\" is too long", params->pm_name);
+ inform("Parameter name \"%s\" is too long", params->pm_name);
mh_xfree(paramout);
return NULL;
}
output += n;
outlen += n;
if (output > endptr) {
- advise(NULL, "Internal error: parameter buffer overflow");
+ inform("Internal error: parameter buffer overflow");
return 0;
}
}
outlen++;
}
if (output > endptr) {
- advise(NULL, "Internal error: parameter buffer overflow");
+ inform("Internal error: parameter buffer overflow");
return 0;
}
}
outlen++;
}
if (output > endptr) {
- advise(NULL, "Internal error: parameter buffer overflow");
+ inform("Internal error: parameter buffer overflow");
return 0;
}
}
if (output - 2 > endptr) {
- advise(NULL, "Internal error: parameter buffer overflow");
+ inform("Internal error: parameter buffer overflow");
return 0;
}
char lastchar = '\n';
if (fd == NOTOK) {
- advise(NULL, "Cannot use NULL command to display content-type "
+ inform("Cannot use NULL command to display content-type "
"%s/%s", ct->c_ctinfo.ci_type, ct->c_ctinfo.ci_subtype);
return NOTOK;
}
if ((conv_desc = iconv_open (dest_charset, src_charset)) ==
(iconv_t) -1) {
- advise (NULL, "Can't convert %s to %s", src_charset, dest_charset);
+ inform("Can't convert %s to %s", src_charset, dest_charset);
free (src_charset);
return NOTOK;
}
}
fseeko (*fp, -inbytes, SEEK_CUR);
if (end > 0) bytes_to_read += inbytes;
- /* advise(NULL, "convert_charset: EINVAL"); */
+ /* inform("convert_charset: EINVAL"); */
continue;
}
if (errno == EILSEQ) {
ib++; inbytes--; /* skip it */
}
(*ob++) = '?'; outbytes --;
- /* advise(NULL, "convert_charset: EILSEQ"); */
+ /* inform("convert_charset: EILSEQ"); */
goto iconv_start;
}
- advise (NULL, "convert_charset: errno = %d", errno);
+ inform("convert_charset: errno = %d", errno);
status = NOTOK;
break;
} else {
#else /* ! HAVE_ICONV */
NMH_UNUSED (message_mods);
- advise (NULL, "Can't convert %s to %s without iconv", src_charset,
+ inform("Can't convert %s to %s without iconv", src_charset,
dest_charset);
errno = ENOSYS;
status = NOTOK;
}
if (hi == 0) {
- advise (NULL, "missing (at least) last part of multipart message");
+ inform("missing (at least) last part of multipart message");
return NOTOK;
}
}
missing_part:
- advise (NULL,
- "missing %spart %d of %d part multipart message",
- cur != hi ? "(at least) " : "", cur, hi);
+ inform("missing %spart %d of %d part multipart message",
+ cur != hi ? "(at least) " : "", cur, hi);
goto losing;
}
else
int cc, fd;
if (!ct->c_ceopenfnx) {
- advise (NULL, "don't know how to decode part %s of message %s",
+ inform("don't know how to decode part %s of message %s",
ct->c_partno, ct->c_file);
return NOTOK;
}
/* Link file into folder */
msgnum = folder_addmsg (&mp, filename, 0, 0, 0, 0, NULL);
} else {
- advise (NULL, "unable to read folder %s", folder);
+ inform("unable to read folder %s", folder);
return NOTOK;
}
default:
/* Should never get here. */
- advise (NULL, "will not overwrite %s, invalid clobber policy", buffer);
+ inform("will not overwrite %s, invalid clobber policy", buffer);
free (buffer);
return NULL;
}
free (file);
if (version >= max_versions) {
- advise (NULL, "will not overwrite %s, too many versions", buffer);
+ inform("will not overwrite %s, too many versions", buffer);
free (buffer);
buffer = NULL;
}
free (prompt);
} else {
/* Overwrite, that's what nmh used to do. And warn. */
- advise (NULL, "-clobber ask but no tty, so overwrite %s", file);
+ inform("-clobber ask but no tty, so overwrite %s", file);
break;
}
if (stat (file, &st) == OK) {
/* Keep count of files that would have been clobbered,
and return that as process exit status. */
- advise (NULL, "will not overwrite %s with -clobber never", file);
+ inform("will not overwrite %s with -clobber never", file);
free (file);
file = NULL;
++info->files_not_clobbered;
ambigsw(cp, switches);
done(NOTOK);
case UNKWNSW:
- advise (NULL, "-%s unknown", cp);
+ inform("-%s unknown", cp);
(void) snprintf(buf, sizeof buf, "%s [switches]", invo_name);
print_help(buf, switches, 1);
done(NOTOK);
if ((pw = getpwnam (vec[vecp])))
status += checkmail (pw->pw_name, pw->pw_dir, datesw, notifysw, 0);
else
- advise (NULL, "no such user as %s", vec[vecp]);
+ inform("no such user as %s", vec[vecp]);
}
}
} /* host == NULL */
auth_svc) == NOTOK
|| pop_stat (&nmsgs, &nbytes) == NOTOK /* check for messages */
|| pop_quit () == NOTOK) { /* quit POP connection */
- advise (NULL, "%s", response);
+ inform("%s", response);
return 1;
}
#define nxtarg() (*argp ? *argp++ : NULL)
#define prvarg() argp--
-#define padvise if (!talked++) advise
+#define pinform if (!talked++) inform
struct nexus {
int (*n_action)();
return (talked ? 0 : 1);
if (*argp) {
- padvise (NULL, "%s unexpected", *argp);
+ inform("%s unexpected", *argp);
return 0;
}
return n;
if (*cp != '-') {
- padvise (NULL, "%s unexpected", cp);
+ pinform("%s unexpected", cp);
return NULL;
}
o->n_L_child = n;
if ((o->n_R_child = parse ()))
return o;
- padvise (NULL, "missing disjunctive");
+ pinform("missing disjunctive");
free (o);
return NULL;
return n;
if (*cp != '-') {
- padvise (NULL, "%s unexpected", cp);
+ pinform("%s unexpected", cp);
free (n);
return NULL;
}
o->n_L_child = n;
if ((o->n_R_child = nexp1 ()))
return o;
- padvise (NULL, "missing conjunctive");
+ pinform("missing conjunctive");
free (o);
return NULL;
n = newnexus (NOTaction);
if ((n->n_L_child = nexp3 ()))
return n;
- padvise (NULL, "missing negation");
+ pinform("missing negation");
free (n);
return NULL;
return NULL;
if (*cp != '-') {
- padvise (NULL, "%s unexpected", cp);
+ pinform("%s unexpected", cp);
return NULL;
}
case PRLBR:
if ((n = parse ()) == NULL) {
- padvise (NULL, "missing group");
+ pinform("missing group");
return NULL;
}
if ((cp = nxtarg ()) == NULL) {
- padvise (NULL, "missing -rbrace");
+ pinform("missing -rbrace");
return NULL;
}
if (*cp++ == '-' && smatch (cp, parswit) == PRRBR)
return n;
- padvise (NULL, "%s unexpected", --cp);
+ pinform("%s unexpected", --cp);
return NULL;
default:
dp = *brkstring (temp, " ", NULL);
header: ;
if (!(cp = nxtarg ())) {/* allow -xyz arguments */
- padvise (NULL, "missing argument to %s", argp[-2]);
+ pinform("missing argument to %s", argp[-2]);
return NULL;
}
n = newnexus (GREPaction);
n = newnexus (GREPaction);
n->n_header = 0;
if (!(cp = nxtarg ())) {/* allow -xyz arguments */
- padvise (NULL, "missing argument to %s", argp[-2]);
+ pinform("missing argument to %s", argp[-2]);
free (n);
return NULL;
}
dp = cp;
pattern: ;
if (!gcompile (n, dp)) {
- padvise (NULL, "pattern error in %s %s", argp[-2], cp);
+ pinform("pattern error in %s %s", argp[-2], cp);
free (n);
return NULL;
}
return n;
case PROTHR:
- padvise (NULL, "internal error!");
+ pinform("internal error!");
return NULL;
case PRDATF:
if (!(datesw = nxtarg ()) || *datesw == '-') {
- padvise (NULL, "missing argument to %s", argp[-2]);
+ pinform("missing argument to %s", argp[-2]);
return NULL;
}
return nexp3 ();
case PRAFTR:
case PRBEFR:
if (!(cp = nxtarg ())) {/* allow -xyz arguments */
- padvise (NULL, "missing argument to %s", argp[-2]);
+ pinform("missing argument to %s", argp[-2]);
return NULL;
}
n = newnexus (TWSaction);
n->n_datef = datesw;
if (!tcompile (cp, &n->n_tws, n->n_after = i == PRAFTR)) {
- padvise (NULL, "unable to parse %s %s", argp[-2], cp);
+ pinform("unable to parse %s %s", argp[-2], cp);
free (n);
return NULL;
}
case LENERR:
case FMTERR:
if (state == LENERR || state == FMTERR)
- advise (NULL, "format error in message %d", msgnum);
+ inform("format error in message %d", msgnum);
mh_xfree(bp);
return 0;
m_getfld_state_destroy (&gstate);
if ((tw = dparsetime (bp)) == NULL)
- advise (NULL, "unable to parse %s field in message %d, matching...",
+ inform("unable to parse %s field in message %d, matching...",
n->n_datef, msgnum), state = 1;
else
state = n->n_after ? (twsort (tw, &n->n_tws) > 0)
str++;
if (msgstate == NORMAL && uprf (name, "resent")) {
- advise (NULL, "illegal header line -- %s:", name);
+ inform("illegal header line -- %s:", name);
badmsg++;
return;
}
if (strcmp (str, "\n")) {
trim_suffix_c(str, '\n');
if (! whomsw) {
- advise (NULL, "ignoring header line -- %s: %s", name, str);
+ inform("ignoring header line -- %s: %s", name, str);
}
}
}
return;
}
if (hdr->flags & HBAD) {
- advise (NULL, "illegal header line -- %s:", name);
+ inform("illegal header line -- %s:", name);
badmsg++;
return;
}
*/
if ((msgstate == RESENT) ? (hdr->set & MRSN)
: (hdr->set & MSND)) {
- advise (NULL, "%s: field requires one address", name);
+ inform("%s: field requires one address", name);
badmsg++;
}
#ifdef notdef
- advise (NULL, "%s: field requires at least one address", name);
+ inform("%s: field requires at least one address", name);
badmsg++;
#endif /* notdef */
}
}
if (count > 1 && (hdr->flags & HONE)) {
- advise (NULL, "%s: field only permits one address", name);
+ inform("%s: field only permits one address", name);
badmsg++;
return;
}
}
if (grp > 0 && (hdr->flags & HNGR)) {
- advise (NULL, "%s: field does not allow groups", name);
+ inform("%s: field does not allow groups", name);
badmsg++;
}
if (linepos) {
/*
* A From: header is now required in the draft.
*/
- advise (NULL, "message has no From: header");
- advise (NULL, "See default components files for examples");
+ inform("message has no From: header");
+ inform("See default components files for examples");
badmsg++;
break;
}
if (fromcount > 1 && (seensender == 0 && !(msgflags & MEFM))) {
- advise (NULL, "A Sender: or Envelope-From: header is required "
+ inform("A Sender: or Envelope-From: header is required "
"with multiple\nFrom: addresses");
badmsg++;
break;
if (fromcount > 1 && seensender == 0) {
if (efrom[0] == '\0') {
- advise (NULL, "Envelope-From cannot be blank when there "
+ inform("Envelope-From cannot be blank when there "
"is multiple From: addresses\nand no Sender: "
"header");
badmsg++;
case RESENT:
if (!(msgflags & MDAT)) {
- advise (NULL, "message has no Date: header");
+ inform("message has no Date: header");
badmsg++;
}
if (!(msgflags & MFRM)) {
- advise (NULL, "message has no From: header");
+ inform("message has no From: header");
badmsg++;
}
if (!(msgflags & MRFM)) {
- advise (NULL, "message has no Resent-From: header");
- advise (NULL, "See default components files for examples");
+ inform("message has no Resent-From: header");
+ inform("See default components files for examples");
badmsg++;
break;
}
if (fromcount > 1 && (seensender == 0 && !(msgflags & MEFM))) {
- advise (NULL, "A Resent-Sender: or Envelope-From: header is "
+ inform("A Resent-Sender: or Envelope-From: header is "
"required with multiple\nResent-From: addresses");
badmsg++;
break;
if (fromcount > 1 && seensender == 0) {
if (efrom[0] == '\0') {
- advise (NULL, "Envelope-From cannot be blank when there "
+ inform("Envelope-From cannot be blank when there "
"is multiple Resent-From: addresses and no "
"Resent-Sender: header");
badmsg++;
/* don't add file if it is empty */
if (st.st_size == 0) {
(void) m_unlink (tmpfilenam);
- advise (NULL, "empty file");
+ inform("empty file");
done (0);
}
struct stat st;
if ((tfile = m_mktemp2(NULL, invo_name, &fd, NULL)) == NULL) {
- advise(NULL, "unable to create temporary file in %s", get_temp_dir());
+ inform("unable to create temporary file in %s", get_temp_dir());
return NOTOK;
}
(void) m_unlink(tfile); /* Use fd, no longer need the file name. */
charstring_t scanl = NULL;
if ((tfile = m_mktemp2(NULL, invo_name, &fd, NULL)) == NULL) {
- advise(NULL, "unable to create temporary file in %s", get_temp_dir());
+ inform("unable to create temporary file in %s", get_temp_dir());
return NOTOK;
}
(void) m_unlink(tfile); /* Use fd, no longer need the file name. */
i = YESW;
break;
default:
- advise (NULL, "say what?");
+ inform("say what?");
break;
}
}
printf ("[+%s de-referenced]\n", folder);
return OK;
}
- advise (NULL, "you have no profile entry for the %s folder +%s",
+ inform("you have no profile entry for the %s folder +%s",
i == NOTOK ? "unreadable" : "read-only", folder);
return NOTOK;
}
if (others == 0 && remdir (maildir))
return OK;
- advise (NULL, "folder +%s not removed", folder);
+ inform("folder +%s not removed", folder);
return NOTOK;
}
adios (NULL, "scan() botch (%d)", state);
case SCNEOF:
- advise (NULL, "message %d: empty", msgnum);
+ inform("message %d: empty", msgnum);
break;
}
charstring_free (scanl);
continue;
case ATTACHSW:
- advise(NULL, "The -attach switch is deprecated");
+ inform("The -attach switch is deprecated");
continue;
case NOATTACHSW:
- advise(NULL, "The -noattach switch is deprecated");
+ inform("The -noattach switch is deprecated");
continue;
case ATTACHFORMATSW:
- advise(NULL, "The -attachformat switch is deprecated");
+ inform("The -attachformat switch is deprecated");
continue;
}
} else {
showfile (++argp, msgs[0]);
break;
default:
- advise (NULL, "say what?");
+ inform("say what?");
break;
}
}
alert (drft, fd);
close (fd);
} else {
- advise (NULL, "message not delivered to anyone");
+ inform("message not delivered to anyone");
}
if (annotext && fd2 != NOTOK)
close (fd2);
if ((tfile = m_mktemp2(NULL, invo_name, &fd, NULL)) == NULL) return NOTOK;
if (debugsw)
- advise (NULL, "temporary file %s selected", tfile);
+ inform("temporary file %s selected", tfile);
else
if (m_unlink (tfile) == NOTOK)
advise (tfile, "unable to remove");
switch (child_id) {
case NOTOK: /* oops */
if (!debugsw)
- advise (NULL,
- "unable to fork, so doing annotations by hand...");
+ inform("unable to fork, so doing annotations by hand...");
if (cwd == NULL)
cwd = mh_xstrdup(pwd ());
/* FALLTHRU */
fclose (fp);
if (debugsw)
- advise (NULL, "annotate%s with %s: \"%s\"",
+ inform("annotate%s with %s: \"%s\"",
inplace ? " inplace" : "", annotext, cp);
for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
if (is_selected(mp, msgnum)) {
if (debugsw)
- advise (NULL, "annotate message %d", msgnum);
+ inform("annotate message %d", msgnum);
annotate (m_name (msgnum), annotext, cp, inplace, 1, -2, 0);
}
}
case LENERR:
case FMTERR:
- advise (NULL, "format error in message");
+ inform("format error in message");
break;
default:
- advise (NULL, "internal error in m_getfld");
+ inform("internal error in m_getfld");
fclose (in);
return -1;
}
if (!datecomp || (tw = dparsetime (datecomp)) == NULL) {
struct stat st;
- advise (NULL,
- "can't parse %s field in message %d, "
- "will use file modification time",
- datesw, msg);
+ inform("can't parse %s field in message %d, "
+ "will use file modification time", datesw, msg);
fstat (fileno (in), &st);
smsg->s_clock = st.st_mtime;
check_failed = 1;
continue;
case ATTACHSW:
- advise(NULL, "The -attach switch is deprecated");
+ inform("The -attach switch is deprecated");
continue;
case NOATTACHSW:
- advise(NULL, "The -noattach switch is deprecated");
+ inform("The -noattach switch is deprecated");
continue;
}
}
if (msgnam)
showfile (++argp, msgnam);
else
- advise (NULL, "no alternate message to display");
+ inform("no alternate message to display");
break;
case BUILDMIMESW:
removefile (drft);
} else {
if (stat (drft, &st) != NOTOK)
- advise (NULL, "draft left on %s", drft);
+ inform("draft left on %s", drft);
}
done (1);
}
if (n == -1)
- advise(NULL, "usage is alist [-ln].");
+ inform("usage is alist [-ln].");
else
annolist(drft, ATTACH_FIELD, l, n);
}
if (*(argp+1) == NULL) {
- advise(NULL, "attach command requires file argument(s).");
+ inform("attach command requires file argument(s).");
break;
}
default:
/* Unknown command */
- advise (NULL, "say what?");
+ inform("say what?");
break;
}
}
&& (!reedit || (status & 0x00ff))) {
if (!use && (status & 0xff00) &&
(rename (file, cp = m_backup (file)) != NOTOK)) {
- advise (NULL, "problems with edit--draft left in %s", cp);
+ inform("problems with edit--draft left in %s", cp);
} else {
- advise (NULL, "problems with edit--%s preserved", file);
+ inform("problems with edit--%s preserved", file);
}
}
status = -2; /* maybe "reedit ? -2 : -1"? */
sleep (5);
switch (child_id) {
case NOTOK:
- advise (NULL, "unable to fork, so sending directly...");
+ inform("unable to fork, so sending directly...");
/* FALLTHRU */
case OK:
vec = argsplit(sendproc, &program, &vecp);
ambigsw (cp, sendswitches);
return;
case UNKWNSW:
- advise (NULL, "-%s unknown\n", cp);
+ inform("-%s unknown\n", cp);
return;
case SHELPSW:
case SPLITSW:
if (!(cp = *argp++) || sscanf (cp, "%d", &splitsw) != 1) {
- advise (NULL, "missing argument to %s", argp[-2]);
+ inform("missing argument to %s", argp[-2]);
return;
}
continue;
case MESSAGEIDSW:
vec[vecp++] = --cp;
if (!(cp = *argp++) || *cp == '-') {
- advise (NULL, "missing argument to %s", argp[-2]);
+ inform("missing argument to %s", argp[-2]);
return;
}
vec[vecp++] = cp;
case SDRFSW:
case SDRMSW:
if (!(cp = *argp++) || *cp == '-') {
- advise (NULL, "missing argument to %s", argp[-2]);
+ inform("missing argument to %s", argp[-2]);
return;
}
/* FALLTHRU */
continue;
case SNDATTACHSW:
- advise(NULL, "The -attach switch is deprecated");
+ inform("The -attach switch is deprecated");
continue;
case SNDNOATTACHSW:
- advise(NULL, "The -noattach switch is deprecated");
+ inform("The -noattach switch is deprecated");
continue;
case SNDATTACHFORMAT:
- advise(NULL, "The -attachformat switch is deprecated");
+ inform("The -attachformat switch is deprecated");
continue;
}
}
- advise (NULL, "usage: %s [switches]", sp);
+ inform("usage: %s [switches]", sp);
return;
}
case FLD:
case FLDPLUS:
if (strcasecmp(name, VRSN_FIELD) == 0) {
- advise(NULL, "Cannot use attach commands with already-"
+ inform("Cannot use attach commands with already-"
"formatted MIME message \"%s\"", drft);
retval = 1;
break;
switch (distsw ? child_id : OK) {
case NOTOK:
- advise (NULL, "unable to fork, so checking directly...");
+ inform("unable to fork, so checking directly...");
/* FALLTHRU */
case OK:
execvp (postproc, vec);