]> diplodocus.org Git - nmh/commitdiff
Replace advise(NULL, fmt, ...) with inform(fmt, ...).
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 17 Apr 2017 09:42:09 +0000 (10:42 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 17 Apr 2017 09:42:09 +0000 (10:42 +0100)
53 files changed:
mts/smtp/smtp.c
sbr/addrsbr.c
sbr/ambigsw.c
sbr/base64.c
sbr/context_foil.c
sbr/datetime.c
sbr/encode_rfc2047.c
sbr/ext_hook.c
sbr/fmt_compile.c
sbr/folder_addmsg.c
sbr/folder_pack.c
sbr/icalendar.l
sbr/lock_file.c
sbr/m_convert.c
sbr/m_getfld.c
sbr/mime_type.c
sbr/oauth.c
sbr/push.c
sbr/ruserpass.c
sbr/seq_add.c
sbr/seq_del.c
sbr/seq_nameok.c
sbr/utils.c
uip/comp.c
uip/dist.c
uip/distsbr.c
uip/forw.c
uip/inc.c
uip/mhcachesbr.c
uip/mhfixmsg.c
uip/mhlogin.c
uip/mhlsbr.c
uip/mhmisc.c
uip/mhoutsbr.c
uip/mhparam.c
uip/mhparse.c
uip/mhshowsbr.c
uip/mhstoresbr.c
uip/mkstemp.c
uip/msgchk.c
uip/picksbr.c
uip/post.c
uip/rcvstore.c
uip/rcvtty.c
uip/repl.c
uip/rmf.c
uip/scan.c
uip/send.c
uip/sendsbr.c
uip/slocal.c
uip/sortm.c
uip/whatnowsbr.c
uip/whom.c

index 78f8355..c8bea5b 100644 (file)
@@ -457,7 +457,7 @@ sm_winit (char *from, int smtputf8, int eightbit)
         if (EHLOset ("8BITMIME")  &&  EHLOset ("SMTPUTF8")) {
             mail_parameters = " BODY=8BITMIME SMTPUTF8";
         } else {
         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);
                     "Rebuild message with 7-bit headers, WITHOUT -headerencoding utf-8.",
                     EHLOset ("SMTPUTF8") ? "8BITMIME" : "SMTPUTF8");
             sm_end (NOTOK);
@@ -469,7 +469,7 @@ sm_winit (char *from, int smtputf8, int eightbit)
         if (EHLOset ("8BITMIME")) {
             mail_parameters = " BODY=8BITMIME";
         } else {
         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);
                     "Suggest encoding message for 7-bit transport by setting your\n"
                     "locale to C, and/or specifying *b64 in mhbuild directives.");
             sm_end (NOTOK);
index 49953f6..86b18a1 100644 (file)
@@ -352,7 +352,7 @@ ismymbox (struct mailname *np)
                }
            }
            if (oops)
                }
            }
            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);
        }
 
                        "alternate-mailboxes", mh_profile);
        }
 
index 15ff34c..ba6485f 100644 (file)
@@ -13,6 +13,6 @@
 void
 ambigsw (const char *arg, const struct swit *swp)
 {
 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);
 }
     print_sw (arg, swp, "-", stderr);
 }
index a1e54c9..8591384 100644 (file)
@@ -260,7 +260,7 @@ decodeBase64 (const char *encoded, unsigned char **decoded, size_t *len,
                 }
                 if (skip  ||  (((unsigned char) *cp) & 0x80)  ||
                     (value = b642nib[((unsigned char) *cp) & 0x7f]) > 0x3f) {
                 }
                 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;
 
                     charstring_free (decoded_c);
                     *decoded = NULL;
 
@@ -315,7 +315,7 @@ test_end:
 
         /* Show some context for the error. */
         for (i = 0; i < 20  &&  cp > encoded; ++i, --cp) {}
 
         /* 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;
                 cp ? cp : encoded);
         charstring_free (decoded_c);
         *decoded = NULL;
@@ -355,7 +355,7 @@ hexify (const unsigned char *input, size_t len, char **output) {
             const int num = snprintf(s, sizeof s, "[0x%02x]", *cp);
 
             if (num <= 0  ||  (unsigned int) num >= sizeof s) {
             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);
             }
             } else {
                 charstring_append_cstring (tmp, s);
             }
index e840706..9aa02db 100644 (file)
@@ -47,11 +47,11 @@ context_foil (char *path)
        NEW(np);
        m_defs = np;
        if (!(np->n_name = strdup ("Path"))) {
        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))) {
            return -1;
        }
        if (!(np->n_field = strdup (path))) {
-           advise (NULL, "strdup failed");
+           inform("strdup failed");
            return -1;
        }
        np->n_context = 0;
            return -1;
        }
        np->n_context = 0;
@@ -59,7 +59,7 @@ context_foil (char *path)
 
        if (mypath == NULL && (mypath = getenv ("HOME")) != NULL)
            if (!(mypath = strdup (mypath))) {
 
        if (mypath == NULL && (mypath = getenv ("HOME")) != NULL)
            if (!(mypath = strdup (mypath))) {
-               advise (NULL, "strdup failed");
+               inform("strdup failed");
                return -1;
            }
     }
                return -1;
            }
     }
index fb7f7c2..ba64e4d 100644 (file)
@@ -75,7 +75,7 @@ parse_datetime (const char *datetime, const char *zone, int dst,
     if (items_matched == 7) {
         /* The 'Z' must be capital according to RFC 5545 Sec. 3.3.5. */
         if (utc_indicator != 'Z') {
     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;
         }
                     datetime, utc_indicator);
             return NOTOK;
         }
@@ -177,7 +177,7 @@ load_timezones (const contentline *clines) {
                         params->start_dt = tws.tw_clock;
                     }
                 } else {
                         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;
                             params->dtstart,
                             in_standard ? "standard" : "daylight");
                     return NULL;
@@ -360,7 +360,7 @@ format_datetime (tzdesc_t timezones, const contentline *node) {
         if (parse_datetime (node->value, NULL, 0, &tws[0]) == OK) {
             return strdup (dasctime (&tws[0], 0));
         }
         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;
     }
 
         return NULL;
     }
 
@@ -382,7 +382,7 @@ format_datetime (tzdesc_t timezones, const contentline *node) {
     if (tz) {
         free(dt_timezone);
     } else {
     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;
     }
         free(dt_timezone);
         return NULL;
     }
@@ -424,7 +424,7 @@ format_datetime (tzdesc_t timezones, const contentline *node) {
         }
 
         if (transition[0] < transition[1]) {
         }
 
         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;
                     "saving time transition precede standard time "
                     "transition");
             return NULL;
@@ -434,7 +434,7 @@ format_datetime (tzdesc_t timezones, const contentline *node) {
                             0, &tws[0]) == OK) {
             dt[0] = tws[0].tw_clock;
         } else {
                             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;
         }
 
             return NULL;
         }
 
@@ -447,7 +447,7 @@ format_datetime (tzdesc_t timezones, const contentline *node) {
                                     &tws[1]) == OK) {
                     dt[1] = tws[1].tw_clock;
                 } else {
                                     &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;
                 }
                             node->value);
                     return NULL;
                 }
@@ -459,7 +459,7 @@ format_datetime (tzdesc_t timezones, const contentline *node) {
         if (dst) {
             if (tz->daylight_params.start_dt > 0  &&
                 dt[dst] < tz->daylight_params.start_dt) {
         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;
                         "of %s", node->value,
                         tz->daylight_params.dtstart);
                 return NULL;
@@ -467,7 +467,7 @@ format_datetime (tzdesc_t timezones, const contentline *node) {
         } else {
             if (tz->standard_params.start_dt > 0  &&
                 dt[dst] < tz->standard_params.start_dt) {
         } 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;
                         "of %s", node->value,
                         tz->standard_params.dtstart);
                 return NULL;
@@ -475,12 +475,12 @@ format_datetime (tzdesc_t timezones, const contentline *node) {
         }
     } else {
         if (! tp_std) {
         }
     } 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) {
                     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;
         }
     }
             return NULL;
         }
     }
index d1ccd2e..d964cbd 100644 (file)
@@ -107,7 +107,7 @@ encode_rfc2047(const char *name, char **value, int encoding,
        charset = write_charset_8bit();
 
     if (strcasecmp(charset, "US-ASCII") == 0) {
        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;
     }
 
        return 1;
     }
 
@@ -146,7 +146,7 @@ encode_rfc2047(const char *name, char **value, int encoding,
                                   eightbitcount + qpspecialcount, 0);
 
     default:
                                   eightbitcount + qpspecialcount, 0);
 
     default:
-       advise(NULL, "Internal error: unknown RFC-2047 encoding type");
+       inform("Internal error: unknown RFC-2047 encoding type");
        return 1;
     }
 }
        return 1;
     }
 }
@@ -381,7 +381,7 @@ field_encode_base64(const char *name, char **value, const char *charset)
        numencode = strbase64(ENCODELINELIMIT - (q - linestart) - 2);
 
        if (numencode <= 0) {
        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;
        }
                   "in base64", numencode);
            return 1;
        }
@@ -405,7 +405,7 @@ field_encode_base64(const char *name, char **value, const char *charset)
                numencode--;
 
            if (numencode == 0) {
                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;
            }
                       "UTF-8 character when base64 encoding header");
                return 1;
            }
@@ -413,7 +413,7 @@ field_encode_base64(const char *name, char **value, const char *charset)
 
        if (writeBase64raw((unsigned char *) p, numencode,
                           (unsigned char *) q) != OK) {
 
        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;
        }
 
            return 1;
        }
 
@@ -460,7 +460,7 @@ field_encode_base64(const char *name, char **value, const char *charset)
 
     if (writeBase64raw((unsigned char *) p, strlen(p),
                       (unsigned char *) q) != OK) {
 
     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;
     }
 
        return 1;
     }
 
@@ -574,7 +574,7 @@ field_encode_address(const char *name, char **value, int encoding,
 
     for (groupflag = 0; (mp = getname(*value)); ) {
        if ((mn = getm(mp, NULL, 0, errbuf, sizeof(errbuf))) == NULL) {
 
     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;
        }
            errflag++;
            continue;
        }
@@ -632,7 +632,7 @@ field_encode_address(const char *name, char **value, int encoding,
                break;
 
            default:
                break;
 
            default:
-               advise(NULL, "Internal error: unknown RFC-2047 encoding type");
+               inform("Internal error: unknown RFC-2047 encoding type");
                errflag++;
                goto out;
            }
                errflag++;
                goto out;
            }
@@ -658,7 +658,7 @@ field_encode_address(const char *name, char **value, int encoding,
        }
 
        if (mn->m_note[0] != '(' || mn->m_note[len - 1] != ')') {
        }
 
        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;
                   mn->m_note);
            errflag++;
            goto out;
@@ -695,7 +695,7 @@ field_encode_address(const char *name, char **value, int encoding,
                break;
 
            default:
                break;
 
            default:
-               advise(NULL, "Internal error: unknown RFC-2047 encoding type");
+               inform("Internal error: unknown RFC-2047 encoding type");
                errflag++;
                goto out;
            }
                errflag++;
                goto out;
            }
index 186f77c..d29c046 100644 (file)
@@ -28,7 +28,7 @@ ext_hook(char *hook_name, char *message_file_name_1, char *message_file_name_2)
     switch (pid = fork()) {
     case -1:
        status = NOTOK;
     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:
        break;
 
     case 0:
@@ -50,7 +50,7 @@ ext_hook(char *hook_name, char *message_file_name_1, char *message_file_name_2)
        if (did_message == 0) {
            char *msghook;
            if ((msghook = context_find("msg-hook")) != NULL)
        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);
            else {
                char errbuf[BUFSIZ];
                snprintf(errbuf, sizeof(errbuf), "external hook \"%s\"", hook);
index f7fcff2..dbd0964 100644 (file)
@@ -375,7 +375,7 @@ compile_error(char *str, char *cp)
            usr_fstring[i] = '_';
     }
 
            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, "^");
 }
           &usr_fstring[errpos-errctx], str);
     adios (NULL, "%*s", errctx+1, "^");
 }
index 806cf92..eeeaace 100644 (file)
@@ -52,13 +52,13 @@ folder_addmsg (struct msgs **mpp, char *msgfile, int selected,
          */
        if (msgnum > mp->hghoff) {
            if (!(mp = folder_realloc (mp, mp->lowoff, msgnum + 100))) {
          */
        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))) {
                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;
                return -1;
             }
             *mpp = mp;
@@ -165,7 +165,7 @@ folder_addmsg (struct msgs **mpp, char *msgfile, int selected,
          */
         if (linkerr == EXDEV  ||  linkerr == EPERM) {
             if (stat (newmsg, &st1) == 0) {
          */
         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;
             }
 
                 return -1;
             }
 
index b0bc67b..b2f7953 100644 (file)
@@ -38,7 +38,7 @@ folder_pack (struct msgs **mpp, int verbose)
        if ((mp = folder_realloc (mp, 1, mp->hghmsg)))
            *mpp = mp;
        else {
        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;
        }
     }
            return -1;
        }
     }
index 016c6eb..2250f4e 100644 (file)
@@ -258,7 +258,7 @@ folded-value         {VALUE-CHAR}*({fold}{VALUE-CHAR}*)+
 
 . {
     /* By default, flex will just pass unmatched text.  Catch it instead. */
 
 . {
     /* 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>> {
 }
 
 <<EOF>> {
index 9fbcbd7..cac80c1 100644 (file)
@@ -560,7 +560,7 @@ lockit (struct lockinfo *li)
     curlock = li->curlock;
 
     if ((tmpfile = m_mktemp(li->tmplock, &fd, NULL)) == NULL) {
     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;
     }
 
        return -1;
     }
 
index 82ab07e..3e9433b 100644 (file)
@@ -77,7 +77,7 @@ m_convert (struct msgs *mp, char *name)
     cp = delimp;
     if (*cp != '\0' && *cp != '-' && *cp != ':' && *cp != '=') {
 badelim:
     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;
     }
 
        return 0;
     }
 
@@ -87,28 +87,28 @@ badelim:
 badmsg:
            switch (err) {
            case BADMSG: 
 badmsg:
            switch (err) {
            case BADMSG: 
-               advise (NULL, "no %s message", cp);
+               inform("no %s message", cp);
                break;
 
            case BADNUM: 
                break;
 
            case BADNUM: 
-               advise (NULL, "message %s doesn't exist", cp);
+               inform("message %s doesn't exist", cp);
                break;
 
            case BADRNG: 
                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:
                break;
 
            case BADLST: 
 badlist:
-               advise (NULL, "bad message list %s", name);
+               inform("bad message list %s", name);
                break;
 
            case BADNEW:
                break;
 
            case BADNEW:
-               advise (NULL, "folder full, no %s message", name);
+               inform("folder full, no %s message", name);
                break;
 
            default: 
                break;
 
            default: 
-               advise (NULL, "no messages match specification");
+               inform("no messages match specification");
            }
            return 0;
        }
            }
            return 0;
        }
@@ -119,7 +119,7 @@ badlist:
            goto badelim;
        if (first > mp->hghmsg || last < mp->lowmsg) {
 rangerr:
            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;
        }
 
            return 0;
        }
 
@@ -179,7 +179,7 @@ rangerr:
            }
        } else { /* looking for the nth message.  if not enough, fail. */
            if (last < mp->lowmsg || last > mp->hghmsg) {
            }
        } 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;
                return 0;
            }
            first = last;
@@ -213,9 +213,9 @@ single:
                || first < mp->lowmsg
                || !(does_exist (mp, first))) {
                if (!strcmp (name, "cur") || !strcmp (name, "."))
                || 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
                else
-                   advise (NULL, "message %d doesn't exist", first);
+                   inform("message %d doesn't exist", first);
                return 0;
            }
        }
                return 0;
            }
        }
@@ -505,6 +505,6 @@ attr (struct msgs *mp, char *cp)
 
     if (first || just_one)
        return BADMSG;
 
     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;
 }
     return -1;
 }
index 4976b1c..f17ad41 100644 (file)
@@ -548,7 +548,7 @@ m_getfld (m_getfld_state_t *gstate, char name[NAMESZ], char *buf, int *bufsz,
                int next_char;
                if (c == EOF  ||  (next_char = Peek (s)) == EOF) {
                    *bufsz = *cp = *buf = 0;
                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;
                }
                    leave_getfld (s);
                    return s->state = FMTERR;
                }
@@ -574,7 +574,7 @@ m_getfld (m_getfld_state_t *gstate, char name[NAMESZ], char *buf, int *bufsz,
                if (*bufsz < n + 1) {
                    /* No, it can't.  Oh well, guess we'll blow up. */
                    *bufsz = *cp = *buf = 0;
                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;
                }
                    s->state = FMTERR;
                    break;
                }
@@ -596,7 +596,7 @@ m_getfld (m_getfld_state_t *gstate, char name[NAMESZ], char *buf, int *bufsz,
                    it had read.  It's in c, use it. */
                *cp++ = c;
                *bufsz = *cp = *buf = 0;
                    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;
                        NAMESZ - 2);
                s->state = LENERR;
                break;
index e4f3e5b..b235bc7 100644 (file)
@@ -87,7 +87,7 @@ mime_type(const char *file_name) {
            int binary = 0, c;
 
            if (!(fp = fopen(file_name, "r"))) {
            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;
            }
 
                return NULL;
            }
 
@@ -121,7 +121,7 @@ get_file_info(const char *proc, const char *file_name) {
     if ((cp = strchr(file_name, '\''))) {
         /* file_name contains a single quote. */
         if (strchr(file_name, '"')) {
     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;
         }
                    "are unsupported for attachment");
             return NULL;
         }
@@ -162,12 +162,12 @@ get_file_info(const char *proc, const char *file_name) {
 
             (void) pclose(fp);
         } else {
 
             (void) pclose(fp);
         } else {
-            advise(NULL, "no output from %s", cmd);
+            inform("no output from %s", cmd);
         }
 
         free(cmd);
     } else {
         }
 
         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;
     }
 
     return cp  ?  strdup(cp)  :  NULL;
index 2180be8..21035ac 100755 (executable)
@@ -166,7 +166,7 @@ mh_oauth_do_xoauth(const char *user, const char *svc, unsigned char **oauth_res,
             if (mh_oauth_get_err_code(ctx) == MH_OAUTH_BAD_GRANT) {
                 adios(NULL, "credentials rejected -- run mhlogin -saslmech xoauth2 -authservice %s", svc);
             }
             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));
         }
 
             adios(NULL, mh_oauth_get_err_string(ctx));
         }
 
index c4d0e40..03e8a45 100644 (file)
@@ -23,7 +23,7 @@ push(void)
     switch (pid) {
        case -1:
            /* fork error */
     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:
            break;
 
        case 0:
index 2bd8d63..ab47f13 100644 (file)
@@ -107,7 +107,7 @@ ruserpass(const char *host, char **aname, char **apass, int flags)
                            (stb.st_mode & 077) != 0) {
                            /* We make this a fatal error to force the
                               user to correct it. */
                            (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.");
                                 "forbidden: %s", stb.st_mode, credentials_file);
                            adios(NULL, "Remove password or correct file "
                                  "permissions.");
index 47085f8..3dc7450 100644 (file)
@@ -53,7 +53,7 @@ seq_addsel (struct msgs *mp, char *cp, int public, int zero)
      */
     if (new_seq) {
        if (!(svector_push_back (mp->msgattrs, strdup (cp)))) {
      */
     if (new_seq) {
        if (!(svector_push_back (mp->msgattrs, strdup (cp)))) {
-           advise (NULL, "strdup failed");
+           inform("strdup failed");
            return 0;
        }
     }
            return 0;
        }
     }
@@ -140,7 +140,7 @@ seq_addmsg (struct msgs *mp, char *cp, int msgnum, int public, int zero)
      */
     if (new_seq) {
        if (!(svector_push_back (mp->msgattrs, strdup (cp)))) {
      */
     if (new_seq) {
        if (!(svector_push_back (mp->msgattrs, strdup (cp)))) {
-           advise (NULL, "strdup failed");
+           inform("strdup failed");
            return 0;
        }
     }
            return 0;
        }
     }
index 670872e..57c1fa7 100644 (file)
@@ -51,7 +51,7 @@ seq_delsel (struct msgs *mp, char *cp, int public, int zero)
         */
        if (new_seq) {
            if (!(svector_push_back (mp->msgattrs, strdup (cp)))) {
         */
        if (new_seq) {
            if (!(svector_push_back (mp->msgattrs, strdup (cp)))) {
-               advise (NULL, "strdup failed");
+               inform("strdup failed");
                return 0;
            }
        }
                return 0;
            }
        }
@@ -66,7 +66,7 @@ seq_delsel (struct msgs *mp, char *cp, int public, int zero)
        }
     } else {
        if (new_seq) {
        }
     } else {
        if (new_seq) {
-           advise (NULL, "no such sequence as %s", cp);
+           inform("no such sequence as %s", cp);
            return 0;
        }
     }
            return 0;
        }
     }
@@ -129,6 +129,6 @@ seq_delmsg (struct msgs *mp, char *cp, int msgnum)
        }
     }
 
        }
     }
 
-    advise (NULL, "no such sequence as %s", cp);
+    inform("no such sequence as %s", cp);
     return 0;
 }
     return 0;
 }
index 328bd5c..3942b0e 100644 (file)
@@ -16,7 +16,7 @@ seq_nameok (char *s)
     char *pp;
 
     if (s == NULL || *s == '\0') {
     char *pp;
 
     if (s == NULL || *s == '\0') {
-       advise (NULL, "empty sequence name");
+       inform("empty sequence name");
        return 0;
     }
 
        return 0;
     }
 
@@ -30,7 +30,7 @@ seq_nameok (char *s)
          strcmp (s, "last") &&
          strcmp (s, "prev") &&
          strcmp (s, "next"))) {
          strcmp (s, "last") &&
          strcmp (s, "prev") &&
          strcmp (s, "next"))) {
-       advise (NULL, "illegal sequence name: %s", s);
+       inform("illegal sequence name: %s", s);
        return 0;
     }
 
        return 0;
     }
 
@@ -39,7 +39,7 @@ seq_nameok (char *s)
      * an alphabetic character ...
      */
     if (!isalpha ((unsigned char) *s)) {
      * an alphabetic character ...
      */
     if (!isalpha ((unsigned char) *s)) {
-       advise (NULL, "illegal sequence name: %s", s);
+       inform("illegal sequence name: %s", s);
        return 0;
     }
 
        return 0;
     }
 
@@ -48,7 +48,7 @@ seq_nameok (char *s)
      */
     for (pp = s + 1; *pp; pp++)
        if (!isalnum ((unsigned char) *pp)) {
      */
     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;
        }
 
            return 0;
        }
 
index d27fa81..7e4dd3c 100644 (file)
@@ -357,7 +357,7 @@ nmh_strcasestr (const char *s1, const char *s2) {
 void trunccpy(char *dst, const char *src, size_t size)
 {
     if (!size) {
 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();
     }
             src ? src : "null");
         abort();
     }
index 7ca48db..6f685c7 100644 (file)
@@ -359,7 +359,7 @@ try_it_again:
                        i = YESW;
                    break;
                default: 
                        i = YESW;
                    break;
                default: 
-                   advise (NULL, "say what?");
+                   inform("say what?");
                    break;
            }
        }
                    break;
            }
        }
index f846b74..e2504d4 100644 (file)
@@ -251,7 +251,7 @@ try_it_again:
                        i = YESW;
                    break;
                default: 
                        i = YESW;
                    break;
                default: 
-                   advise (NULL, "say what?");
+                   inform("say what?");
                    break;
            }
        }
                    break;
            }
        }
index 3052377..bdea4b1 100644 (file)
@@ -56,7 +56,7 @@ distout (char *drft, char *msgnam, char *backup)
                if (uprf (name, "distribution-"))
                    snprintf (name, sizeof(name), "%s%s", "Resent", &name[12]);
                if (!uprf (name, "resent")) {
                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)
                    goto leave_bad;
                }
                if (state == FLD)
@@ -74,7 +74,7 @@ distout (char *drft, char *msgnam, char *backup)
            case BODY: 
                for (dp = buffer; *dp; dp++)
                    if (!isspace ((unsigned char) *dp)) {
            case BODY: 
                for (dp = buffer; *dp; dp++)
                    if (!isspace ((unsigned char) *dp)) {
-                       advise (NULL, BADTXT, "draft");
+                       inform(BADTXT, "draft");
                        goto leave_bad;
                    }
 
                        goto leave_bad;
                    }
 
@@ -83,7 +83,7 @@ distout (char *drft, char *msgnam, char *backup)
 
            case LENERR: 
            case FMTERR: 
 
            case LENERR: 
            case FMTERR: 
-               advise (NULL, BADRFT, "draft");
+               inform(BADRFT, "draft");
        leave_bad: ;
                fclose (ifp);
                fclose (ofp);
        leave_bad: ;
                fclose (ifp);
                fclose (ofp);
@@ -102,7 +102,7 @@ process: ;
     fflush (ofp);
 
     if (!resent) {
     fflush (ofp);
 
     if (!resent) {
-       advise (NULL, BADMSG, "draft");
+       inform(BADMSG, "draft");
        fclose (ofp);
        (void) m_unlink (drft);
        if (rename (backup, drft) == NOTOK)
        fclose (ofp);
        (void) m_unlink (drft);
        if (rename (backup, drft) == NOTOK)
index c03c7b4..50e14bb 100644 (file)
@@ -333,7 +333,7 @@ try_it_again:
                        i = YESW;
                    break;
                default: 
                        i = YESW;
                    break;
                default: 
-                   advise (NULL, "say what?");
+                   inform("say what?");
                    break;
            }
        }
                    break;
            }
        }
index 0f7c4a0..b6d8e36 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -587,7 +587,7 @@ go_to_it:
     if (audfile) {
        int i;
        if ((i = stat (audfile, &st)) == NOTOK)
     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)
        if ((aud = fopen (audfile, "a")) == NULL)
            adios (audfile, "unable to append to");
        else if (i == NOTOK)
@@ -762,15 +762,15 @@ go_to_it:
            case SCNERR:
                if (aud)
                    fputs ("inc aborted!\n", aud);
            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:
                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:
                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:
                break;
 
            case SCNMSG:
@@ -917,7 +917,7 @@ go_to_it:
     if (inc_type == INC_FILE && Maildir == NULL) {
        if (trnflag) {
            if (stat (newmail, &st) != NOTOK && s1.st_mtime != st.st_mtime)
     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)
            else {
                int newfd;
                if ((newfd = creat (newmail, 0600)) != NOTOK)
@@ -956,7 +956,7 @@ go_to_it:
 
        if (msgnum >= mp2->hghoff
                && !(mp2 = folder_realloc (mp2, mp2->lowoff, msgnum + 1))) {
 
        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;
        }
 
            goto skip;
        }
 
index 7ac0a0d..a2fad2c 100644 (file)
@@ -94,19 +94,19 @@ cache_content (CT ct)
     CE ce = &ct->c_cefile;
 
     if (!ct->c_id) {
     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) {
        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) {
        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) {
        return;
     }
     if (wcachesw != CACHE_NEVER && wcachesw != CACHE_ASK) {
index a0c6efd..5a77701 100644 (file)
@@ -372,7 +372,7 @@ main (int argc, char **argv) {
             set_text_ctparams(ct, fx.decodetypes, fx.lf_line_endings);
             *ctp++ = ct;
         } else {
             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
             status = NOTOK;
 
             /* If there's an outfile, pass the input message unchanged, so the
@@ -386,7 +386,7 @@ main (int argc, char **argv) {
                 }
 
                 if (copy_input_to_output (file, infp, outfile, outfp) != OK) {
                 }
 
                 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);
                 }
 
                             "it might be lost\n", outfile);
                 }
 
@@ -442,7 +442,7 @@ main (int argc, char **argv) {
                     set_text_ctparams(ct, fx.decodetypes, fx.lf_line_endings);
                     *ctp++ = ct;
                 } else {
                     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
                     status = NOTOK;
 
                     /* If there's an outfile, pass the input message
@@ -465,10 +465,8 @@ main (int argc, char **argv) {
 
                         if (copy_input_to_output (input_filename, infp,
                                                   outfile, outfp) != OK) {
 
                         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);
                         }
 
                         fclose (infp);
@@ -608,7 +606,7 @@ mhfixmsgsbr (CT *ctp, char *maildir, const fix_transformations *fx,
            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",
                     outfile);
         }
     }
                     outfile);
         }
     }
@@ -692,16 +690,16 @@ fix_boundary (CT *ct, int *message_mods) {
                             }
                         } else {
                             *ct = NULL;
                             }
                         } else {
                             *ct = NULL;
-                            advise (NULL, "unable to parse fixed part");
+                            inform("unable to parse fixed part");
                             status = NOTOK;
                         }
                         free (filename);
                     } else {
                             status = NOTOK;
                         }
                         free (filename);
                     } else {
-                        advise (NULL, "unable to replace broken boundary");
+                        inform("unable to replace broken boundary");
                         status = NOTOK;
                     }
                 } else {
                         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;
                 }
                             get_temp_dir());
                     status = NOTOK;
                 }
@@ -826,7 +824,7 @@ replace_boundary (CT ct, char *file, char *boundary) {
     int status = OK;
 
     if (ct->c_file == NULL) {
     int status = OK;
 
     if (ct->c_file == NULL) {
-        advise (NULL, "missing input filename");
+        inform("missing input filename");
         return NOTOK;
     }
 
         return NOTOK;
     }
 
@@ -898,12 +896,12 @@ replace_boundary (CT ct, char *file, char *boundary) {
 
         case LENERR:
         case FMTERR:
 
         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:
             status = NOTOK;
             break;
 
         default:
-            advise (NULL, "getfld() returned %d", state);
+            inform("getfld() returned %d", state);
             status = NOTOK;
             break;
         }
             status = NOTOK;
             break;
         }
@@ -985,7 +983,7 @@ fix_types (CT ct, svector_t fixtypes, int *message_mods) {
                             *cp = '\0';
                             ct_subtype = mh_xstrdup(++cp);
                         } else {
                             *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_file, ct->c_partno);
                             free (ct_type);
                             return NOTOK;
@@ -1000,7 +998,7 @@ fix_types (CT ct, svector_t fixtypes, int *message_mods) {
                         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)) {
-                            advise (NULL, "did not find %s in %s",
+                            inform("did not find %s in %s",
                                     type, ct->c_ctline);
                         }
 
                                     type, ct->c_ctline);
                         }
 
@@ -1018,7 +1016,7 @@ fix_types (CT ct, svector_t fixtypes, int *message_mods) {
                                     }
                                     break;
                                 } else {
                                     }
                                     break;
                                 } else {
-                                    advise (NULL, "did not find %s in %s",
+                                    inform("did not find %s in %s",
                                             type, hf->value);
                                 }
                             }
                                             type, hf->value);
                                 }
                             }
@@ -1337,9 +1335,8 @@ ensure_text_plain (CT *ct, CT parent, int *message_mods, int replacetextplain) {
                         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")) {
-                            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. */
                         }
 
                         /* Update Content-Type header field. */
@@ -1359,7 +1356,7 @@ ensure_text_plain (CT *ct, CT parent, int *message_mods, int replacetextplain) {
                                     remove_parameter (hf->value, "type");
                                     break;
                                 } else {
                                     remove_parameter (hf->value, "type");
                                     break;
                                 } else {
-                                    advise (NULL, "did not find multipart/"
+                                    inform("did not find multipart/"
                                                   "related in header %s",
                                             hf->value);
                                 }
                                                   "related in header %s",
                                             hf->value);
                                 }
@@ -1493,7 +1490,7 @@ build_text_plain_part (CT encoded_part) {
 
         /* 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) {
-            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);
                     get_temp_dir());
         } else {
             tmp_plain_file = mh_xstrdup (tempfile);
@@ -1658,14 +1655,14 @@ reformat_part (CT ct, char *file, char *type, char *subtype, int c_type) {
     /* 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) {
-            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, '>')) {
                     "%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 : "");
 
                 "%s-format-%s/%s profile entry", cf, invo_name, type,
                 subtype ? subtype : "");
 
@@ -1790,7 +1787,7 @@ build_multipart_alt (CT first_alt, CT new_part, int type, int subtype) {
         }
 
         if (found_boundary) {
         }
 
         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;
         }
             free_content (ct);
             return NULL;
         }
@@ -2599,7 +2596,7 @@ fix_filename_param (char *name, char *value, PM *first_pm, PM *last_pm) {
             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);
         }
     }
 
         }
     }
 
@@ -2664,7 +2661,7 @@ fix_filename_encoding (CT ct) {
                 free((void *)new_params); /* Cast away const.  Sigh. */
                 free((void *)params);
             } else {
                 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);
             }
         }
                         hf->name, hf->value);
             }
         }
index 4a42aea..6c17134 100644 (file)
@@ -109,7 +109,7 @@ do_login(const char *svc, const char *user, const char *browser, int snoop)
       code = geta();
     }
     if (cred == NULL) {
       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));
     }
 
       adios(NULL, mh_oauth_get_err_string(ctx));
     }
 
index f07d786..d5d32b1 100644 (file)
@@ -771,7 +771,7 @@ evalvar (struct mcomp *c1)
            return 1;
 
        if (! c1->c_name  ||  strcasecmp (c1->c_name, "body")) {
            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;
        }
                    "the \"body\" component");
            return 1;
        }
@@ -802,7 +802,7 @@ ptoi (char *name, int *i)
     char *cp;
 
     if (*parptr++ != '=' || !*(cp = parse ())) {
     char *cp;
 
     if (*parptr++ != '=' || !*(cp = parse ())) {
-       advise (NULL, "missing argument to variable %s", name);
+       inform("missing argument to variable %s", name);
        return 1;
     }
 
        return 1;
     }
 
@@ -817,7 +817,7 @@ ptos (char *name, char **s)
     char c, *cp;
 
     if (*parptr++ != '=') {
     char c, *cp;
 
     if (*parptr++ != '=') {
-       advise (NULL, "missing argument to variable %s", name);
+       inform("missing argument to variable %s", name);
        return 1;
     }
 
        return 1;
     }
 
@@ -1100,7 +1100,7 @@ mhlfile (FILE *fp, char *mname, int ofilen, int ofilec)
 
            case LENERR: 
            case FMTERR: 
 
            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;
                exitstat++;
                m_getfld_state_destroy (&gstate);
                return;
index 0f466c4..63ea15a 100644 (file)
@@ -151,7 +151,7 @@ losing_directory:
            if (!answer)
                goto losing_directory;
            if (!makedir (file)) {
            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;
            }
        }
                goto losing_directory;
            }
        }
@@ -250,7 +250,7 @@ content_error (char *what, CT ct, char *fmt, ...)
 
        errs = add (buffer, errs);
     } else {
 
        errs = add (buffer, errs);
     } else {
-       advise (NULL, "%s", buffer);
+       inform("%s", buffer);
     }
 }
 
     }
 }
 
index 638cf97..f3d560d 100644 (file)
@@ -175,13 +175,13 @@ output_content (CT ct, FILE *out)
                putc ('\n', out);
                result = write8Bit (ct, out);
            } else {
                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:
                result = NOTOK;
            }
            break;
 
        default:
-           advise (NULL, "unknown transfer encoding in content");
+           inform("unknown transfer encoding in content");
            result = NOTOK;
            break;
        }
            result = NOTOK;
            break;
        }
index edbefd7..fb45784 100644 (file)
@@ -196,10 +196,10 @@ main(int argc, char **argv)
         struct node *np;
 
        if (compp)
         struct node *np;
 
        if (compp)
-           advise(NULL, "profile-components ignored with -all");
+           inform("profile-components ignored with -all");
 
        if (components >= 0)
 
        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
                   components ? "" : "no");
 
        /* Print all entries in context/profile list.  That does not
index a2dcb88..2be9760 100644 (file)
@@ -250,7 +250,7 @@ parse_mime (char *file)
        return NULL;
     } else if (S_ISDIR(statbuf.st_mode)) {
        /* Don't try to parse a directory. */
        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");
        return NULL;
     } else if ((fp = fopen (file, "r")) == NULL) {
        advise (file, "unable to read");
@@ -260,7 +260,7 @@ parse_mime (char *file)
     if (!(ct = get_content (fp, file, 1))) {
        if (is_stdin)
            (void) m_unlink (file);
     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;
     }
 
        return NULL;
     }
 
@@ -420,7 +420,7 @@ get_content (FILE *in, char *file, int toplevel)
                ct->c_vrsn = vrsn;
            } else {
                if (! suppress_multiple_mime_version_warning)
                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);
            }
                            ct->c_file, VRSN_FIELD);
                free(vrsn);
            }
@@ -432,7 +432,7 @@ get_content (FILE *in, char *file, int toplevel)
 
            /* Check if we've already seen a Content-Type header */
            if (ct->c_ctline) {
 
            /* 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;
            }
                        ct->c_file, TYPE_FIELD);
                goto next_header;
            }
@@ -463,7 +463,7 @@ get_content (FILE *in, char *file, int toplevel)
             * Content-Transfer-Encoding field
             */
            if (ct->c_celine) {
             * 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;
            }
                        ct->c_file, ENCODING_FIELD);
                goto next_header;
            }
@@ -502,7 +502,7 @@ get_content (FILE *in, char *file, int toplevel)
                goto next_header;
 
            if (ct->c_digested) {
                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;
            }
                        ct->c_file, MD5_FIELD);
                goto next_header;
            }
@@ -666,7 +666,7 @@ get_ctinfo (char *cp, CT ct, int magic)
     *dp = c, cp = dp;
 
     if (!*ci->ci_type) {
     *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;
     }
                TYPE_FIELD, ct->c_file);
        return NOTOK;
     }
@@ -700,9 +700,8 @@ get_ctinfo (char *cp, CT ct, int magic)
     *dp = c, cp = dp;
 
     if (!*ci->ci_subtype) {
     *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);
        return NOTOK;
     }
     to_lower(ci->ci_subtype);
@@ -728,7 +727,7 @@ magic_skip:
         mh_xfree(ct->c_id);
         ct->c_id = NULL;
        if (!(dp = strchr(ct->c_id = ++cp, '>'))) {
         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;
            return NOTOK;
        }
        c = *dp;
@@ -753,7 +752,7 @@ magic_skip:
            if (*dp == ']')
                break;
        if (dp < cp) {
            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;
        }
            ct->c_descr = NULL;
            return NOTOK;
        }
@@ -780,7 +779,7 @@ magic_skip:
            if (*dp == '}')
                break;
        if (dp < cp) {
            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;
        }
            ct->c_dispo = NULL;
            return NOTOK;
        }
@@ -814,7 +813,7 @@ magic_skip:
            cp++;
 
        if (dp == cp) {
            cp++;
 
        if (dp == cp) {
-           advise (NULL, "invalid null transfer encoding specification");
+           inform("invalid null transfer encoding specification");
            return NOTOK;
        }
 
            return NOTOK;
        }
 
@@ -831,7 +830,7 @@ magic_skip:
        }
 
        if (ct->c_reqencoding == CE_UNKNOWN) {
        }
 
        if (ct->c_reqencoding == CE_UNKNOWN) {
-           advise (NULL, "invalid CTE specification: \"%s\"", dp);
+           inform("invalid CTE specification: \"%s\"", dp);
            return NOTOK;
        }
 
            return NOTOK;
        }
 
@@ -857,9 +856,8 @@ magic_skip:
            }
         }
        else
            }
         }
        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 OK;
@@ -925,9 +923,8 @@ get_dispo (char *cp, CT ct, int buildflag)
            return NOTOK;
        }
     } else if (*cp) {
            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)
     }
 
     if (buildflag)
@@ -955,7 +952,7 @@ get_comment (const char *filename, const char *fieldname, char **ap,
        switch (c = *cp++) {
        case '\0':
 invalid:
        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;
 
                filename, fieldname);
        return NOTOK;
 
@@ -1135,9 +1132,8 @@ InitMultiPart (CT ct)
 
     /* complain if boundary parameter is missing */
     if (!pm) {
 
     /* 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;
     }
 
        return NOTOK;
     }
 
@@ -1149,7 +1145,7 @@ InitMultiPart (CT ct)
     for (cp = bp; isspace ((unsigned char) *cp); cp++)
        continue;
     if (!*cp) {
     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;
     }
                ci->ci_type, ci->ci_subtype, ct->c_file, TYPE_FIELD);
        return NOTOK;
     }
@@ -1219,7 +1215,7 @@ end_part:
     }
 
     if (! suppress_bogus_mp_content_warning) {
     }
 
     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;
 
     }
     bogus_mp_content = 1;
 
@@ -1437,10 +1433,9 @@ InitMessage (CT ct)
                        if (sscanf (pm->pm_value, "%d", &p->pm_partno) != 1
                                || p->pm_partno < 1) {
 invalid_param:
                        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;
                            return NOTOK;
                        }
                        continue;
@@ -1456,10 +1451,8 @@ invalid_param:
                if (!p->pm_partid
                        || !p->pm_partno
                        || (p->pm_maxno && p->pm_partno > p->pm_maxno)) {
                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;
                }
            }
                    return NOTOK;
                }
            }
@@ -1644,9 +1637,8 @@ params_external (CT ct, int composing)
     }
 
     if (!e->eb_access) {
     }
 
     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;
     }
 
        return NOTOK;
     }
 
@@ -2729,7 +2721,7 @@ openMail (CT ct, char **file)
 
        default:
            if (pidXwait (child_id, NULL) == OK)
 
        default:
            if (pidXwait (child_id, NULL) == OK)
-               advise (NULL, "request sent");
+               inform("request sent");
            break;
     }
 
            break;
     }
 
@@ -3290,10 +3282,8 @@ parse_header_attrs (const char *filename, const char *fieldname,
 
        if (*cp == 0) {
            if (! suppress_extraneous_trailing_semicolon_warning) {
 
        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;
        }
            }
            return DONE;
        }
@@ -3305,10 +3295,9 @@ parse_header_attrs (const char *filename, const char *fieldname,
        for (up = dp; isspace ((unsigned char) *dp);)
            dp++;
        if (dp == cp || *dp != '=') {
        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;
        }
 
            return NOTOK;
        }
 
@@ -3338,7 +3327,7 @@ parse_header_attrs (const char *filename, const char *fieldname,
                if (isdigit((unsigned char) *vp))
                    index = *vp - '0' + index * 10;
                else {
                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;
                            "%s: field\n%*s(parameter %s)", filename,
                            fieldname, strlen(invo_name) + 2, "", cp);
                    return NOTOK;
@@ -3382,7 +3371,7 @@ parse_header_attrs (const char *filename, const char *fieldname,
                    }
                    vp++;
                } else {
                    }
                    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);
                           "field\n%*s(parameter %s)", filename, fieldname,
                           strlen(invo_name) + 2, "", nameptr);
                    free(nameptr);
@@ -3405,7 +3394,7 @@ parse_header_attrs (const char *filename, const char *fieldname,
                    }
                    vp++;
                } else {
                    }
                    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);
                           "field\n%*s(parameter %s)", filename, fieldname,
                           strlen(invo_name) + 2, "", nameptr);
                    free(nameptr);
@@ -3429,7 +3418,7 @@ parse_header_attrs (const char *filename, const char *fieldname,
                                !isxdigit((unsigned char) *(vp + 1)) ||
                                *(vp + 2) == '\0' ||
                                !isxdigit((unsigned char) *(vp + 2))) {
                                !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);
                               "%s's %s: field\n%*s(parameter %s)",
                               filename, fieldname, strlen(invo_name) + 2,
                               "", nameptr);
@@ -3472,11 +3461,9 @@ parse_header_attrs (const char *filename, const char *fieldname,
                    switch (*cp++) {
                    case '\0':
 bad_quote:
                    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);
                        free(nameptr);
                         mh_xfree(charset);
                         mh_xfree(lang);
@@ -3560,7 +3547,7 @@ bad_quote:
            } else {
                for (sp2 = pp->sechead; sp2 != NULL; sp2 = sp2->next) {
                    if (sp2->index == sp->index) {
            } 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);
                                "%s's %s: field\n%*s(parameter %s)", sp->index,
                                filename, fieldname, strlen(invo_name) + 2, "",
                                nameptr);
@@ -3575,7 +3562,7 @@ bad_quote:
                }
 
                if (sp2 == NULL) {
                }
 
                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);
                           "param in message %s's %s: field\n%*s(parameter %s)",
                           filename, fieldname, strlen(invo_name) + 2, "",
                           nameptr);
@@ -3618,7 +3605,7 @@ bad_quote:
        int pindex = 0;
        for (sp = pp->sechead; sp != NULL; sp = sp->next) {
            if (sp->index != pindex++) {
        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);
                       "message %s's %s: field\n%*s(parameter %s)", pindex - 1,
                       filename, fieldname, strlen(invo_name) + 2, "",
                       pp->name);
@@ -3689,7 +3676,7 @@ output_params(size_t initialwidth, PM params, int *offsetout, int external)
            continue;
 
        if (strlen(params->pm_name) > CPERLIN) {
            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;
        }
             mh_xfree(paramout);
            return NULL;
        }
@@ -3993,7 +3980,7 @@ encode_param(PM pm, char *output, size_t len, size_t valuelen,
        output += n;
        outlen += n;
        if (output > endptr) {
        output += n;
        outlen += n;
        if (output > endptr) {
-           advise(NULL, "Internal error: parameter buffer overflow");
+           inform("Internal error: parameter buffer overflow");
            return 0;
        }
     }
            return 0;
        }
     }
@@ -4013,7 +4000,7 @@ encode_param(PM pm, char *output, size_t len, size_t valuelen,
            outlen++;
        }
        if (output > endptr) {
            outlen++;
        }
        if (output > endptr) {
-           advise(NULL, "Internal error: parameter buffer overflow");
+           inform("Internal error: parameter buffer overflow");
            return 0;
        }
     }
            return 0;
        }
     }
@@ -4053,13 +4040,13 @@ normal_param(PM pm, char *output, size_t len, size_t valuelen,
            outlen++;
        }
        if (output > endptr) {
            outlen++;
        }
        if (output > endptr) {
-           advise(NULL, "Internal error: parameter buffer overflow");
+           inform("Internal error: parameter buffer overflow");
            return 0;
        }
     }
 
     if (output - 2 > endptr) {
            return 0;
        }
     }
 
     if (output - 2 > endptr) {
-       advise(NULL, "Internal error: parameter buffer overflow");
+       inform("Internal error: parameter buffer overflow");
        return 0;
     }
 
        return 0;
     }
 
index 6b2efa8..3db2348 100644 (file)
@@ -435,7 +435,7 @@ show_content_aux2 (CT ct, int alternate, char *cracked, char *buffer,
        char lastchar = '\n';
 
        if (fd == NOTOK) {
        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;
        }
                   "%s/%s", ct->c_ctinfo.ci_type, ct->c_ctinfo.ci_subtype);
            return NOTOK;
        }
@@ -1085,7 +1085,7 @@ convert_charset (CT ct, char *dest_charset, int *message_mods) {
 
         if ((conv_desc = iconv_open (dest_charset, src_charset)) ==
             (iconv_t) -1) {
 
         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;
         }
             free (src_charset);
             return NOTOK;
         }
@@ -1158,7 +1158,7 @@ iconv_start:
                        }
                        fseeko (*fp, -inbytes, SEEK_CUR);
                        if (end > 0) bytes_to_read += inbytes;
                        }
                        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) {
                        continue;
                    }
                    if (errno == EILSEQ) {
@@ -1173,10 +1173,10 @@ iconv_start:
                            ib++; inbytes--; /* skip it */
                        }
                        (*ob++) = '?'; outbytes --;
                            ib++; inbytes--; /* skip it */
                        }
                        (*ob++) = '?'; outbytes --;
-                       /* advise(NULL, "convert_charset: EILSEQ"); */
+                       /* inform("convert_charset: EILSEQ"); */
                        goto iconv_start;
                    }
                        goto iconv_start;
                    }
-                   advise (NULL, "convert_charset: errno = %d", errno);
+                   inform("convert_charset: errno = %d", errno);
                     status = NOTOK;
                     break;
                 } else {
                     status = NOTOK;
                     break;
                 } else {
@@ -1246,7 +1246,7 @@ iconv_start:
 #else  /* ! HAVE_ICONV */
         NMH_UNUSED (message_mods);
 
 #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;
                 dest_charset);
         errno = ENOSYS;
         status = NOTOK;
index 7604c21..ab8ab2e 100644 (file)
@@ -343,7 +343,7 @@ store_partial (CT ct, mhstoreinfo_t info)
     }
 
     if (hi == 0) {
     }
 
     if (hi == 0) {
-       advise (NULL, "missing (at least) last part of multipart message");
+       inform("missing (at least) last part of multipart message");
        return NOTOK;
     }
 
        return NOTOK;
     }
 
@@ -375,9 +375,8 @@ store_partial (CT ct, mhstoreinfo_t info)
            }
 
 missing_part:
            }
 
 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
            goto losing;
        }
         else
@@ -706,7 +705,7 @@ output_content_file (CT ct, int appending)
        int cc, fd;
 
        if (!ct->c_ceopenfnx) {
        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;
        }
                    ct->c_partno, ct->c_file);
            return NOTOK;
        }
@@ -905,7 +904,7 @@ output_content_folder (char *folder, char *filename)
        /* Link file into folder */
        msgnum = folder_addmsg (&mp, filename, 0, 0, 0, 0, NULL);
     } else {
        /* 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;
     }
 
        return NOTOK;
     }
 
@@ -1175,7 +1174,7 @@ next_version (char *file, enum clobber_policy_t clobber_policy) {
 
       default:
         /* Should never get here. */
 
       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 (buffer);
         return NULL;
     }
@@ -1196,7 +1195,7 @@ next_version (char *file, enum clobber_policy_t clobber_policy) {
   free (file);
 
   if (version >= max_versions) {
   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 (buffer);
     buffer = NULL;
   }
@@ -1278,7 +1277,7 @@ clobber_check (char *original_file, mhstoreinfo_t info) {
             free (prompt);
           } else {
             /* Overwrite, that's what nmh used to do.  And warn. */
             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;
           }
 
             break;
           }
 
@@ -1322,7 +1321,7 @@ clobber_check (char *original_file, mhstoreinfo_t info) {
         if (stat (file, &st) == OK) {
           /* Keep count of files that would have been clobbered,
              and return that as process exit status. */
         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;
           free (file);
           file = NULL;
           ++info->files_not_clobbered;
index f4215c0..6933a3f 100644 (file)
@@ -164,7 +164,7 @@ process_args(int argc, char **argv, const char **directory,
                 ambigsw(cp, switches);
                 done(NOTOK);
             case UNKWNSW:
                 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);
                 (void) snprintf(buf, sizeof buf, "%s [switches]", invo_name);
                 print_help(buf, switches, 1);
                 done(NOTOK);
index eed61cd..af25b1e 100644 (file)
@@ -265,7 +265,7 @@ main (int argc, char **argv)
                if ((pw = getpwnam (vec[vecp])))
                    status += checkmail (pw->pw_name, pw->pw_dir, datesw, notifysw, 0);
                else
                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 */
            }
        }
     }          /* host == NULL */
@@ -389,7 +389,7 @@ remotemail (char *host, char *port, char *user, char *proxy, int notifysw,
                  auth_svc) == NOTOK
            || pop_stat (&nmsgs, &nbytes) == NOTOK     /* check for messages  */
            || pop_quit () == NOTOK) {                 /* quit POP connection */
                  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;
     }
 
        return 1;
     }
 
index 6faa108..c8444e0 100644 (file)
@@ -115,7 +115,7 @@ static unsigned char cc[] = {
 #define        nxtarg()        (*argp ? *argp++ : NULL)
 #define        prvarg()        argp--
 
 #define        nxtarg()        (*argp ? *argp++ : NULL)
 #define        prvarg()        argp--
 
-#define        padvise         if (!talked++) advise
+#define        pinform         if (!talked++) inform
 
 struct nexus {
     int (*n_action)();
 
 struct nexus {
     int (*n_action)();
@@ -203,7 +203,7 @@ pcompile (char **vec, char *date)
        return (talked ? 0 : 1);
 
     if (*argp) {
        return (talked ? 0 : 1);
 
     if (*argp) {
-       padvise (NULL, "%s unexpected", *argp);
+       inform("%s unexpected", *argp);
        return 0;
     }
 
        return 0;
     }
 
@@ -221,7 +221,7 @@ parse (void)
        return n;
 
     if (*cp != '-') {
        return n;
 
     if (*cp != '-') {
-       padvise (NULL, "%s unexpected", cp);
+       pinform("%s unexpected", cp);
        return NULL;
     }
 
        return NULL;
     }
 
@@ -242,7 +242,7 @@ parse (void)
            o->n_L_child = n;
            if ((o->n_R_child = parse ()))
                return o;
            o->n_L_child = n;
            if ((o->n_R_child = parse ()))
                return o;
-           padvise (NULL, "missing disjunctive");
+           pinform("missing disjunctive");
            free (o);
            return NULL;
 
            free (o);
            return NULL;
 
@@ -263,7 +263,7 @@ nexp1 (void)
        return n;
 
     if (*cp != '-') {
        return n;
 
     if (*cp != '-') {
-       padvise (NULL, "%s unexpected", cp);
+       pinform("%s unexpected", cp);
        free (n);
        return NULL;
     }
        free (n);
        return NULL;
     }
@@ -287,7 +287,7 @@ nexp1 (void)
            o->n_L_child = n;
            if ((o->n_R_child = nexp1 ()))
                return o;
            o->n_L_child = n;
            if ((o->n_R_child = nexp1 ()))
                return o;
-           padvise (NULL, "missing conjunctive");
+           pinform("missing conjunctive");
            free (o);
            return NULL;
 
            free (o);
            return NULL;
 
@@ -329,7 +329,7 @@ nexp2 (void)
            n = newnexus (NOTaction);
            if ((n->n_L_child = nexp3 ()))
                return n;
            n = newnexus (NOTaction);
            if ((n->n_L_child = nexp3 ()))
                return n;
-           padvise (NULL, "missing negation");
+           pinform("missing negation");
            free (n);
            return NULL;
 
            free (n);
            return NULL;
 
@@ -352,7 +352,7 @@ nexp3 (void)
        return NULL;
 
     if (*cp != '-') {
        return NULL;
 
     if (*cp != '-') {
-       padvise (NULL, "%s unexpected", cp);
+       pinform("%s unexpected", cp);
        return NULL;
     }
 
        return NULL;
     }
 
@@ -372,16 +372,16 @@ nexp3 (void)
 
        case PRLBR: 
            if ((n = parse ()) == NULL) {
 
        case PRLBR: 
            if ((n = parse ()) == NULL) {
-               padvise (NULL, "missing group");
+               pinform("missing group");
                return NULL;
            }
            if ((cp = nxtarg ()) == NULL) {
                return NULL;
            }
            if ((cp = nxtarg ()) == NULL) {
-               padvise (NULL, "missing -rbrace");
+               pinform("missing -rbrace");
                return NULL;
            }
            if (*cp++ == '-' && smatch (cp, parswit) == PRRBR)
                return n;
                return NULL;
            }
            if (*cp++ == '-' && smatch (cp, parswit) == PRRBR)
                return n;
-           padvise (NULL, "%s unexpected", --cp);
+           pinform("%s unexpected", --cp);
            return NULL;
 
        default: 
            return NULL;
 
        default: 
@@ -398,7 +398,7 @@ nexp3 (void)
            dp = *brkstring (temp, " ", NULL);
     header: ;
            if (!(cp = nxtarg ())) {/* allow -xyz arguments */
            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);
                return NULL;
            }
            n = newnexus (GREPaction);
@@ -411,14 +411,14 @@ nexp3 (void)
            n = newnexus (GREPaction);
            n->n_header = 0;
            if (!(cp = nxtarg ())) {/* allow -xyz arguments */
            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)) {
                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;
            }
                free (n);
                return NULL;
            }
@@ -426,12 +426,12 @@ nexp3 (void)
            return n;
 
        case PROTHR: 
            return n;
 
        case PROTHR: 
-           padvise (NULL, "internal error!");
+           pinform("internal error!");
            return NULL;
 
        case PRDATF: 
            if (!(datesw = nxtarg ()) || *datesw == '-') {
            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 ();
                return NULL;
            }
            return nexp3 ();
@@ -439,13 +439,13 @@ nexp3 (void)
        case PRAFTR: 
        case PRBEFR: 
            if (!(cp = nxtarg ())) {/* allow -xyz arguments */
        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)) {
                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;
            }
                free (n);
                return NULL;
            }
@@ -962,7 +962,7 @@ plist
            case LENERR: 
            case FMTERR: 
                if (state == LENERR || state == FMTERR)
            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;
 
                 mh_xfree(bp);
                return 0;
 
@@ -974,7 +974,7 @@ plist
     m_getfld_state_destroy (&gstate);
 
     if ((tw = dparsetime (bp)) == NULL)
     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)
                n->n_datef, msgnum), state = 1;
     else
        state = n->n_after ? (twsort (tw, &n->n_tws) > 0)
index 9973beb..7cc111e 100644 (file)
@@ -796,7 +796,7 @@ putfmt (char *name, char *str, int *eai, FILE *out)
        str++;
 
     if (msgstate == NORMAL && uprf (name, "resent")) {
        str++;
 
     if (msgstate == NORMAL && uprf (name, "resent")) {
-       advise (NULL, "illegal header line -- %s:", name);
+       inform("illegal header line -- %s:", name);
        badmsg++;
        return;
     }
        badmsg++;
        return;
     }
@@ -827,7 +827,7 @@ putfmt (char *name, char *str, int *eai, FILE *out)
            if (strcmp (str, "\n")) {
                 trim_suffix_c(str, '\n');
                if (! whomsw) {
            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);
                }
            }
        }
                }
            }
        }
@@ -840,7 +840,7 @@ putfmt (char *name, char *str, int *eai, FILE *out)
        return;
     }
     if (hdr->flags & HBAD) {
        return;
     }
     if (hdr->flags & HBAD) {
-       advise (NULL, "illegal header line -- %s:", name);
+       inform("illegal header line -- %s:", name);
        badmsg++;
        return;
     }
        badmsg++;
        return;
     }
@@ -900,11 +900,11 @@ putfmt (char *name, char *str, int *eai, FILE *out)
             */
            if ((msgstate == RESENT) ? (hdr->set & MRSN)
                                        : (hdr->set & MSND)) {
             */
            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
                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 */
        }
            badmsg++;
 #endif /* notdef */
        }
@@ -912,7 +912,7 @@ putfmt (char *name, char *str, int *eai, FILE *out)
     }
 
     if (count > 1 && (hdr->flags & HONE)) {
     }
 
     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;
     }
        badmsg++;
        return;
     }
@@ -1068,7 +1068,7 @@ putfmt (char *name, char *str, int *eai, FILE *out)
     }
 
     if (grp > 0 && (hdr->flags & HNGR)) {
     }
 
     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) {
        badmsg++;
     }
     if (linepos) {
@@ -1108,14 +1108,14 @@ finish_headers (FILE *out)
                /*
                 * A From: header is now required in the draft.
                 */
                /*
                 * 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))) {
                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;
                        "with multiple\nFrom: addresses");
                badmsg++;
                break;
@@ -1135,7 +1135,7 @@ finish_headers (FILE *out)
 
            if (fromcount > 1 && seensender == 0) {
                if (efrom[0] == '\0') {
 
            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++;
                            "is multiple From: addresses\nand no Sender: "
                            "header");
                    badmsg++;
@@ -1150,21 +1150,21 @@ finish_headers (FILE *out)
 
        case RESENT: 
            if (!(msgflags & MDAT)) {
 
        case RESENT: 
            if (!(msgflags & MDAT)) {
-               advise (NULL, "message has no Date: header");
+               inform("message has no Date: header");
                badmsg++;
            }
            if (!(msgflags & MFRM)) {
                badmsg++;
            }
            if (!(msgflags & MFRM)) {
-               advise (NULL, "message has no From: header");
+               inform("message has no From: header");
                badmsg++;
            }
            if (!(msgflags & MRFM)) {
                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))) {
                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;
                        "required with multiple\nResent-From: addresses");
                badmsg++;
                break;
@@ -1185,7 +1185,7 @@ finish_headers (FILE *out)
 
            if (fromcount > 1 && seensender == 0) {
                if (efrom[0] == '\0') {
 
            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++;
                            "is multiple Resent-From: addresses and no "
                            "Resent-Sender: header");
                    badmsg++;
index 25bb878..f3ee787 100644 (file)
@@ -175,7 +175,7 @@ main (int argc, char **argv)
     /* don't add file if it is empty */
     if (st.st_size == 0) {
        (void) m_unlink (tmpfilenam);
     /* 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);
     }
 
        done (0);
     }
 
index 291cb69..c38dd06 100644 (file)
@@ -189,7 +189,7 @@ message_fd (char **vec)
     struct stat st;
 
     if ((tfile = m_mktemp2(NULL, invo_name, &fd, NULL)) == NULL) {
     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. */
        return NOTOK;
     }
     (void) m_unlink(tfile);  /* Use fd, no longer need the file name. */
@@ -255,7 +255,7 @@ header_fd (void)
     charstring_t scanl = NULL;
 
     if ((tfile = m_mktemp2(NULL, invo_name, &fd, NULL)) == NULL) {
     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. */
         return NOTOK;
     }
     (void) m_unlink(tfile);  /* Use fd, no longer need the file name. */
index 15aa0a3..430e2cc 100644 (file)
@@ -389,7 +389,7 @@ try_it_again:
                        i = YESW;
                    break;
                default: 
                        i = YESW;
                    break;
                default: 
-                   advise (NULL, "say what?");
+                   inform("say what?");
                    break;
            }
        }
                    break;
            }
        }
index 6a86fe6..ebe88fe 100644 (file)
--- a/uip/rmf.c
+++ b/uip/rmf.c
@@ -143,7 +143,7 @@ rmf (char *folder)
                printf ("[+%s de-referenced]\n", folder);
                return OK;
            }
                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;
     }
                    i == NOTOK ? "unreadable" : "read-only", folder);
            return NOTOK;
     }
@@ -201,7 +201,7 @@ rmf (char *folder)
     if (others == 0 && remdir (maildir))
        return OK;
 
     if (others == 0 && remdir (maildir))
        return OK;
 
-    advise (NULL, "folder +%s not removed", folder);
+    inform("folder +%s not removed", folder);
     return NOTOK;
 }
 
     return NOTOK;
 }
 
index e971f55..eb9e8fc 100644 (file)
@@ -266,7 +266,7 @@ main (int argc, char **argv)
                    adios (NULL, "scan() botch (%d)", state);
 
                case SCNEOF: 
                    adios (NULL, "scan() botch (%d)", state);
 
                case SCNEOF: 
-                   advise (NULL, "message %d: empty", msgnum);
+                   inform("message %d: empty", msgnum);
                    break;
            }
            charstring_free (scanl);
                    break;
            }
            charstring_free (scanl);
index da7532a..de94af2 100644 (file)
@@ -302,14 +302,14 @@ main (int argc, char **argv)
                    continue;
                
                case ATTACHSW:
                    continue;
                
                case ATTACHSW:
-                   advise(NULL, "The -attach switch is deprecated");
+                   inform("The -attach switch is deprecated");
                    continue;
                case NOATTACHSW:
                    continue;
                case NOATTACHSW:
-                   advise(NULL, "The -noattach switch is deprecated");
+                   inform("The -noattach switch is deprecated");
                    continue;
 
                case ATTACHFORMATSW:
                    continue;
 
                case ATTACHFORMATSW:
-                   advise(NULL, "The -attachformat switch is deprecated");
+                   inform("The -attachformat switch is deprecated");
                    continue;
            }
        } else {
                    continue;
            }
        } else {
@@ -347,7 +347,7 @@ main (int argc, char **argv)
                        showfile (++argp, msgs[0]);
                        break;
                    default:
                        showfile (++argp, msgs[0]);
                        break;
                    default:
-                       advise (NULL, "say what?");
+                       inform("say what?");
                        break;
                }
            }
                        break;
                }
            }
index 6409aec..1acb7dc 100644 (file)
@@ -484,7 +484,7 @@ sendaux (char **vec, int vecp, char *program, char *drft, struct stat *st)
                alert (drft, fd);
                close (fd);
            } else {
                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 (annotext && fd2 != NOTOK)
                close (fd2);
@@ -587,7 +587,7 @@ tmp_fd (void)
     if ((tfile = m_mktemp2(NULL, invo_name, &fd, NULL)) == NULL) return NOTOK;
 
     if (debugsw)
     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");
     else
        if (m_unlink (tfile) == NOTOK)
            advise (tfile, "unable to remove");
@@ -618,8 +618,7 @@ anno (int fd, struct stat *st)
     switch (child_id) {
        case NOTOK:             /* oops */
            if (!debugsw)
     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 */
            if (cwd == NULL)
                cwd = mh_xstrdup(pwd ());
            /* FALLTHRU */
@@ -724,12 +723,12 @@ annoaux (int fd)
     fclose (fp);
 
     if (debugsw)
     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)
                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);
        }
     }
             annotate (m_name (msgnum), annotext, cp, inplace, 1, -2, 0);
        }
     }
index f41b6ad..1751add 100644 (file)
@@ -782,11 +782,11 @@ parse (int fd)
 
            case LENERR: 
            case FMTERR: 
 
            case LENERR: 
            case FMTERR: 
-               advise (NULL, "format error in message");
+               inform("format error in message");
                break;
 
            default: 
                break;
 
            default: 
-               advise (NULL, "internal error in m_getfld");
+               inform("internal error in m_getfld");
                fclose (in);
                return -1;
        }
                fclose (in);
                return -1;
        }
index 97d42e5..bd223bc 100644 (file)
@@ -413,10 +413,8 @@ get_fields (char *datesw, int msg, struct smsg *smsg)
     if (!datecomp || (tw = dparsetime (datecomp)) == NULL) {
        struct stat st;
 
     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;
        fstat (fileno (in), &st);
        smsg->s_clock = st.st_mtime;
        check_failed = 1;
index 61cf45d..e2e0ceb 100644 (file)
@@ -199,11 +199,11 @@ WhatNow (int argc, char **argv)
                continue;
 
            case ATTACHSW:
                continue;
 
            case ATTACHSW:
-               advise(NULL, "The -attach switch is deprecated");
+               inform("The -attach switch is deprecated");
                continue;
 
            case NOATTACHSW:
                continue;
 
            case NOATTACHSW:
-               advise(NULL, "The -noattach switch is deprecated");
+               inform("The -noattach switch is deprecated");
                continue;
            }
        }
                continue;
            }
        }
@@ -250,7 +250,7 @@ WhatNow (int argc, char **argv)
            if (msgnam)
                showfile (++argp, msgnam);
            else
            if (msgnam)
                showfile (++argp, msgnam);
            else
-               advise (NULL, "no alternate message to display");
+               inform("no alternate message to display");
            break;
 
        case BUILDMIMESW:
            break;
 
        case BUILDMIMESW:
@@ -284,7 +284,7 @@ WhatNow (int argc, char **argv)
                removefile (drft);
            } else {
                if (stat (drft, &st) != NOTOK)
                removefile (drft);
            } else {
                if (stat (drft, &st) != NOTOK)
-                   advise (NULL, "draft left on %s", drft);
+                   inform("draft left on %s", drft);
            }
            done (1);
 
            }
            done (1);
 
@@ -385,7 +385,7 @@ WhatNow (int argc, char **argv)
            }
 
            if (n == -1)
            }
 
            if (n == -1)
-               advise(NULL, "usage is alist [-ln].");
+               inform("usage is alist [-ln].");
 
            else
                annolist(drft, ATTACH_FIELD, l, n);
 
            else
                annolist(drft, ATTACH_FIELD, l, n);
@@ -413,7 +413,7 @@ WhatNow (int argc, char **argv)
            }
 
            if (*(argp+1) == NULL) {
            }
 
            if (*(argp+1) == NULL) {
-               advise(NULL, "attach command requires file argument(s).");
+               inform("attach command requires file argument(s).");
                break;
            }
 
                break;
            }
 
@@ -532,7 +532,7 @@ WhatNow (int argc, char **argv)
 
        default:
            /* Unknown command */
 
        default:
            /* Unknown command */
-           advise (NULL, "say what?");
+           inform("say what?");
            break;
        }
     }
            break;
        }
     }
@@ -741,9 +741,9 @@ editfile (char **ed, char **arg, char *file, int use, struct msgs *mp,
                    && (!reedit || (status & 0x00ff))) {
                    if (!use && (status & 0xff00) &&
                            (rename (file, cp = m_backup (file)) != NOTOK)) {
                    && (!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 {
                    } else {
-                       advise (NULL, "problems with edit--%s preserved", file);
+                       inform("problems with edit--%s preserved", file);
                    }
                }
                status = -2;    /* maybe "reedit ? -2 : -1"? */
                    }
                }
                status = -2;    /* maybe "reedit ? -2 : -1"? */
@@ -833,7 +833,7 @@ sendfile (char **arg, char *file, int pushsw)
        sleep (5);
     switch (child_id) {
        case NOTOK:
        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);
            /* FALLTHRU */
        case OK:
            vec = argsplit(sendproc, &program, &vecp);
@@ -1072,7 +1072,7 @@ sendit (char *sp, char **arg, char *file, int pushed)
                    ambigsw (cp, sendswitches);
                    return;
                case UNKWNSW:
                    ambigsw (cp, sendswitches);
                    return;
                case UNKWNSW:
-                   advise (NULL, "-%s unknown\n", cp);
+                   inform("-%s unknown\n", cp);
                    return;
 
                case SHELPSW:
                    return;
 
                case SHELPSW:
@@ -1092,7 +1092,7 @@ sendit (char *sp, char **arg, char *file, int pushed)
 
                case SPLITSW:
                    if (!(cp = *argp++) || sscanf (cp, "%d", &splitsw) != 1) {
 
                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;
                        return;
                    }
                    continue;
@@ -1174,7 +1174,7 @@ sendit (char *sp, char **arg, char *file, int pushed)
                case MESSAGEIDSW:
                    vec[vecp++] = --cp;
                    if (!(cp = *argp++) || *cp == '-') {
                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;
                        return;
                    }
                    vec[vecp++] = cp;
@@ -1184,7 +1184,7 @@ sendit (char *sp, char **arg, char *file, int pushed)
                case SDRFSW:
                case SDRMSW:
                    if (!(cp = *argp++) || *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 */
                        return;
                    }
                    /* FALLTHRU */
@@ -1192,18 +1192,18 @@ sendit (char *sp, char **arg, char *file, int pushed)
                    continue;
 
                case SNDATTACHSW:
                    continue;
 
                case SNDATTACHSW:
-                   advise(NULL, "The -attach switch is deprecated");
+                   inform("The -attach switch is deprecated");
                    continue;
                case SNDNOATTACHSW:
                    continue;
                case SNDNOATTACHSW:
-                   advise(NULL, "The -noattach switch is deprecated");
+                   inform("The -noattach switch is deprecated");
                    continue;
 
                case SNDATTACHFORMAT:
                    continue;
 
                case SNDATTACHFORMAT:
-                   advise(NULL, "The -attachformat switch is deprecated");
+                   inform("The -attachformat switch is deprecated");
                    continue;
            }
        }
                    continue;
            }
        }
-       advise (NULL, "usage: %s [switches]", sp);
+       inform("usage: %s [switches]", sp);
        return;
     }
 
        return;
     }
 
@@ -1351,7 +1351,7 @@ checkmimeheader (char *drft)
        case FLD:
        case FLDPLUS:
            if (strcasecmp(name, VRSN_FIELD) == 0) {
        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;
                       "formatted MIME message \"%s\"", drft);
                retval = 1;
                break;
index 4a3f81d..d1feb9f 100644 (file)
@@ -182,7 +182,7 @@ main (int argc, char **argv)
 
     switch (distsw ? child_id : OK) {
        case NOTOK:
 
     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);
            /* FALLTHRU */
        case OK:
            execvp (postproc, vec);