]> diplodocus.org Git - nmh/commitdiff
Replace adios(NULL, ...) with die(...).
authorRalph Corderoy <ralph@inputplus.co.uk>
Mon, 30 Oct 2017 20:29:29 +0000 (20:29 +0000)
committerRalph Corderoy <ralph@inputplus.co.uk>
Mon, 30 Oct 2017 20:29:29 +0000 (20:29 +0000)
It's the common case, and saves having to skip over the NULL when
reading, and avoids the risk of the format string being passed as the
first parameter by mistake.

78 files changed:
sbr/arglist.c
sbr/context_read.c
sbr/fmt_compile.c
sbr/fmt_scan.c
sbr/folder_delmsgs.c
sbr/folder_read.c
sbr/folder_realloc.c
sbr/lock_file.c
sbr/m_draft.c
sbr/m_getfld.c
sbr/mts.c
sbr/oauth.c
sbr/readconfig.c
sbr/ruserpass.c
sbr/seq_read.c
sbr/utils.c
sbr/vfgets.c
uip/ali.c
uip/anno.c
uip/annosbr.c
uip/ap.c
uip/burst.c
uip/comp.c
uip/dist.c
uip/distsbr.c
uip/dp.c
uip/flist.c
uip/fmtdump.c
uip/fmttest.c
uip/folder.c
uip/forw.c
uip/forwsbr.c
uip/imaptest.c
uip/inc.c
uip/install-mh.c
uip/mark.c
uip/mhbuild.c
uip/mhbuildsbr.c
uip/mhfixmsg.c
uip/mhical.c
uip/mhlist.c
uip/mhlogin.c
uip/mhlsbr.c
uip/mhn.c
uip/mhparam.c
uip/mhparse.c
uip/mhpath.c
uip/mhshow.c
uip/mhshowsbr.c
uip/mhstore.c
uip/mhstoresbr.c
uip/mkstemp.c
uip/msgchk.c
uip/new.c
uip/packf.c
uip/pick.c
uip/picksbr.c
uip/post.c
uip/prompter.c
uip/rcvdist.c
uip/rcvpack.c
uip/rcvstore.c
uip/rcvtty.c
uip/refile.c
uip/repl.c
uip/replsbr.c
uip/rmf.c
uip/rmm.c
uip/scan.c
uip/scansbr.c
uip/send.c
uip/sendsbr.c
uip/show.c
uip/slocal.c
uip/sortm.c
uip/viamail.c
uip/whatnowsbr.c
uip/whom.c

index 026da19..5ede1fa 100644 (file)
@@ -75,12 +75,12 @@ argsplit(char *command, char **file, int *argp)
        p = mh_xstrdup(command);
        split = brkstring(p, " \t", NULL);
        if (split[0] == NULL) {
        p = mh_xstrdup(command);
        split = brkstring(p, " \t", NULL);
        if (split[0] == NULL) {
-           adios(NULL, "Invalid blank command found");
+           die("Invalid blank command found");
        }
        argvarray[0] = mh_xstrdup(r1bindex(split[0], '/'));
        for (i = 1; split[i] != NULL; i++) {
            if (i > MAXARGS) {
        }
        argvarray[0] = mh_xstrdup(r1bindex(split[0], '/'));
        for (i = 1; split[i] != NULL; i++) {
            if (i > MAXARGS) {
-               adios(NULL, "Command exceeded argument limit");
+               die("Command exceeded argument limit");
            }
            argvarray[i] = mh_xstrdup(split[i]);
        }
            }
            argvarray[i] = mh_xstrdup(split[i]);
        }
index f899624..def5096 100644 (file)
@@ -53,7 +53,7 @@ context_read (void)
 
     if ((mypath = getenv("HOME")) == NULL) {
        if ((pw = getpwuid(getuid())) == NULL || *pw->pw_dir == '\0')
 
     if ((mypath = getenv("HOME")) == NULL) {
        if ((pw = getpwuid(getuid())) == NULL || *pw->pw_dir == '\0')
-           adios(NULL, "cannot determine your home directory");
+           die("cannot determine your home directory");
         mypath = pw->pw_dir;
     }
 
         mypath = pw->pw_dir;
     }
 
@@ -70,16 +70,16 @@ context_read (void)
         /* defpath is an absolute path; make sure that always MH is, too. */
        setenv("MH", defpath, 1);
        if (stat(defpath, &st) != -1 && (st.st_mode & S_IFREG) == 0)
         /* defpath is an absolute path; make sure that always MH is, too. */
        setenv("MH", defpath, 1);
        if (stat(defpath, &st) != -1 && (st.st_mode & S_IFREG) == 0)
-               adios(NULL, "`%s' specified by your MH environment variable is not a normal file", cp);
+               die("`%s' specified by your MH environment variable is not a normal file", cp);
 
        if ((ib = fopen(defpath, "r")) == NULL)
 
        if ((ib = fopen(defpath, "r")) == NULL)
-           adios(NULL, "unable to read the `%s' profile specified by your MH environment variable", defpath);
+           die("unable to read the `%s' profile specified by your MH environment variable", defpath);
     }
     else {
        defpath = concat(mypath, "/", mh_profile, NULL);
 
        if ((ib = fopen(defpath, "r")) == NULL)
     }
     else {
        defpath = concat(mypath, "/", mh_profile, NULL);
 
        if ((ib = fopen(defpath, "r")) == NULL)
-           adios(NULL, "Doesn't look like nmh is installed.  Run install-mh to do so.");
+           die("Doesn't look like nmh is installed.  Run install-mh to do so.");
 
        cp = mh_profile;
     }
 
        cp = mh_profile;
     }
@@ -93,10 +93,10 @@ context_read (void)
      */
 
     if ((cp = context_find ("path")) == NULL)
      */
 
     if ((cp = context_find ("path")) == NULL)
-       adios(NULL, "Your %s file does not contain a path entry.", defpath);
+       die("Your %s file does not contain a path entry.", defpath);
 
     if (*cp == '\0')
 
     if (*cp == '\0')
-       adios(NULL, "Your `%s' profile file does not contain a valid path entry.", defpath);
+       die("Your `%s' profile file does not contain a valid path entry.", defpath);
 
     if (*cp != '/')
        (void)snprintf (nd = buf, sizeof(buf), "%s/%s", mypath, cp);
 
     if (*cp != '/')
        (void)snprintf (nd = buf, sizeof(buf), "%s/%s", mypath, cp);
@@ -110,16 +110,16 @@ context_read (void)
        cp = concat ("Your MH-directory \"", nd, "\" doesn't exist; Create it? ", NULL);
 
        if (!read_yes_or_no_if_tty(cp))
        cp = concat ("Your MH-directory \"", nd, "\" doesn't exist; Create it? ", NULL);
 
        if (!read_yes_or_no_if_tty(cp))
-           adios (NULL, "unable to access MH-directory \"%s\"", nd);
+           die("unable to access MH-directory \"%s\"", nd);
 
        free (cp);
 
        if (!makedir (nd))
 
        free (cp);
 
        if (!makedir (nd))
-           adios (NULL, "unable to create %s", nd);
+           die("unable to create %s", nd);
     }
 
     else if ((st.st_mode & S_IFDIR) == 0)
     }
 
     else if ((st.st_mode & S_IFDIR) == 0)
-       adios (NULL, "`%s' is not a directory", nd);
+       die("`%s' is not a directory", nd);
 
     /*
      * Open and read user's context file.  The name of the context file comes from the
 
     /*
      * Open and read user's context file.  The name of the context file comes from the
index 2ad46cf..bea76e6 100644 (file)
@@ -376,7 +376,7 @@ compile_error(char *str, char *cp)
 
     inform("\"%s\": format compile error - %s",
           &usr_fstring[errpos-errctx], str);
 
     inform("\"%s\": format compile error - %s",
           &usr_fstring[errpos-errctx], str);
-    adios (NULL, "%*s", errctx+1, "^");
+    die("%*s", errctx+1, "^");
 }
 
 /*
 }
 
 /*
index 791146a..61269b3 100644 (file)
@@ -497,7 +497,7 @@ fmt_scan (struct format *format, charstring_t scanlp, int width, int *dat,
            if (str) charstring_push_back_chars (scanlp, str, strlen (str), 0);
            break;
        case FT_STRFW:
            if (str) charstring_push_back_chars (scanlp, str, strlen (str), 0);
            break;
        case FT_STRFW:
-           adios (NULL, "internal error (FT_STRFW)");
+           die("internal error (FT_STRFW)");
 
        case FT_NUM: {
            int num = value;
 
        case FT_NUM: {
            int num = value;
@@ -1029,7 +1029,7 @@ fmt_scan (struct format *format, charstring_t scanlp, int width, int *dat,
            indent = strlen (sp);
            wid -= indent;
            if (wid <= 0) {
            indent = strlen (sp);
            wid -= indent;
            if (wid <= 0) {
-               adios(NULL, "putaddr -- num register (%d) must be greater "
+               die("putaddr -- num register (%d) must be greater "
                            "than label width (%d)", value, indent);
            }
            while ((c = *sp++) && charstring_chars (scanlp) < max) {
                            "than label width (%d)", value, indent);
            }
            while ((c = *sp++) && charstring_chars (scanlp) < max) {
index 9addf7c..43eb0ad 100644 (file)
@@ -60,7 +60,7 @@ folder_delmsgs (struct msgs *mp, int unlink_msgs, int nohook)
        for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
            if (is_selected (mp, msgnum) &&
                !(vec[vecp++] = strdup (m_name (msgnum))))
        for (msgnum = mp->lowsel; msgnum <= mp->hghsel; msgnum++) {
            if (is_selected (mp, msgnum) &&
                !(vec[vecp++] = strdup (m_name (msgnum))))
-               adios (NULL, "strdup failed");
+               die("strdup failed");
        }
        vec[vecp] = NULL;
 
        }
        vec[vecp] = NULL;
 
@@ -132,7 +132,7 @@ folder_delmsgs (struct msgs *mp, int unlink_msgs, int nohook)
 
     /* Sanity check */
     if (mp->numsel != 0)
 
     /* Sanity check */
     if (mp->numsel != 0)
-       adios (NULL, "oops, mp->numsel should be 0");
+       die("oops, mp->numsel should be 0");
 
     /* Mark that the sequence information has changed */
     mp->msgflags |= SEQMOD;
 
     /* Mark that the sequence information has changed */
     mp->msgflags |= SEQMOD;
index 1129bab..3b1c63b 100644 (file)
@@ -127,7 +127,7 @@ folder_read (char *name, int lockflag)
      */
 
     if (mp->hghoff < mp->lowoff) {
      */
 
     if (mp->hghoff < mp->lowoff) {
-       adios(NULL, "Internal failure: high message limit < low message "
+       die("Internal failure: high message limit < low message "
              "limit; possible overflow?");
     }
 
              "limit; possible overflow?");
     }
 
index 8ed95e2..8eb2fcc 100644 (file)
@@ -25,14 +25,14 @@ folder_realloc (struct msgs *mp, int lo, int hi)
 
     /* sanity checks */
     if (lo < 1)
 
     /* sanity checks */
     if (lo < 1)
-       adios (NULL, "BUG: called folder_realloc with lo (%d) < 1", lo);
+       die("BUG: called folder_realloc with lo (%d) < 1", lo);
     if (hi < 1)
     if (hi < 1)
-       adios (NULL, "BUG: called folder_realloc with hi (%d) < 1", hi);
+       die("BUG: called folder_realloc with hi (%d) < 1", hi);
     if (mp->nummsg > 0 && lo > mp->lowmsg)
     if (mp->nummsg > 0 && lo > mp->lowmsg)
-       adios (NULL, "BUG: called folder_realloc with lo (%d) > mp->lowmsg (%d)",
+       die("BUG: called folder_realloc with lo (%d) > mp->lowmsg (%d)",
               lo, mp->lowmsg);
     if (mp->nummsg > 0 && hi < mp->hghmsg)
               lo, mp->lowmsg);
     if (mp->nummsg > 0 && hi < mp->hghmsg)
-       adios (NULL, "BUG: called folder_realloc with hi (%d) < mp->hghmsg (%d)",
+       die("BUG: called folder_realloc with hi (%d) < mp->hghmsg (%d)",
               hi, mp->hghmsg);
 
     /* Check if we really need to reallocate anything */
               hi, mp->hghmsg);
 
     /* Check if we really need to reallocate anything */
index 2c8b1c7..b1f31b6 100644 (file)
@@ -314,7 +314,7 @@ lkopen (const char *file, int access, mode_t mode, enum locktype ltype,
 #endif /* HAVE_FLOCK */
 
     default:
 #endif /* HAVE_FLOCK */
 
     default:
-       adios(NULL, "Internal locking error: unsupported lock type used!");
+       die("Internal locking error: unsupported lock type used!");
     }
 
     return -1;
     }
 
     return -1;
@@ -750,20 +750,20 @@ init_locktype(const char *lockname)
 #ifdef HAVE_LOCKF
        return LOCKF_LOCKING;
 #else /* ! HAVE_LOCKF */
 #ifdef HAVE_LOCKF
        return LOCKF_LOCKING;
 #else /* ! HAVE_LOCKF */
-       adios(NULL, "lockf not supported on this system");
+       die("lockf not supported on this system");
 #endif /* HAVE_LOCKF */
     }
     if (strcasecmp(lockname, "flock") == 0) {
 #ifdef HAVE_FLOCK
        return FLOCK_LOCKING;
 #else /* ! HAVE_FLOCK */
 #endif /* HAVE_LOCKF */
     }
     if (strcasecmp(lockname, "flock") == 0) {
 #ifdef HAVE_FLOCK
        return FLOCK_LOCKING;
 #else /* ! HAVE_FLOCK */
-       adios(NULL, "flock not supported on this system");
+       die("flock not supported on this system");
 #endif /* HAVE_FLOCK */
     }
     if (strcasecmp(lockname, "dot") == 0) {
        return DOT_LOCKING;
     }
 #endif /* HAVE_FLOCK */
     }
     if (strcasecmp(lockname, "dot") == 0) {
        return DOT_LOCKING;
     }
-    adios(NULL, "Unknown lock type: \"%s\"", lockname);
+    die("Unknown lock type: \"%s\"", lockname);
     /* NOTREACHED */
     return 0;
 }
     /* NOTREACHED */
     return 0;
 }
index ebf7ef7..8bfb839 100644 (file)
@@ -41,7 +41,7 @@ m_draft (char *folder, char *msg, int use, int *isdf)
        adios (buffer, "unable to change directory to");
 
     if (!(mp = folder_read (folder, 1)))
        adios (buffer, "unable to change directory to");
 
     if (!(mp = folder_read (folder, 1)))
-       adios (NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     /*
      * Make sure we have enough message status space for all
 
     /*
      * Make sure we have enough message status space for all
@@ -51,10 +51,10 @@ m_draft (char *folder, char *msg, int use, int *isdf)
      */
     if (mp->hghmsg >= mp->hghoff) {
        if (!(mp = folder_realloc (mp, 1, mp->hghmsg + 10)))
      */
     if (mp->hghmsg >= mp->hghoff) {
        if (!(mp = folder_realloc (mp, 1, mp->hghmsg + 10)))
-           adios (NULL, "unable to allocate folder storage");
+           die("unable to allocate folder storage");
     } else if (mp->lowoff > 1) {
        if (!(mp = folder_realloc (mp, 1, mp->hghoff)))
     } else if (mp->lowoff > 1) {
        if (!(mp = folder_realloc (mp, 1, mp->hghoff)))
-           adios (NULL, "unable to allocate folder storage");
+           die("unable to allocate folder storage");
     }
 
     mp->msgflags |= ALLOW_NEW; /* allow the "new" sequence */
     }
 
     mp->msgflags |= ALLOW_NEW; /* allow the "new" sequence */
@@ -69,7 +69,7 @@ m_draft (char *folder, char *msg, int use, int *isdf)
     seq_setprev (mp);
 
     if (mp->numsel > 1)
     seq_setprev (mp);
 
     if (mp->numsel > 1)
-       adios (NULL, "only one message draft at a time!");
+       die("only one message draft at a time!");
 
     snprintf (buffer, sizeof(buffer), "%s/%s", mp->foldpath, m_name (mp->lowsel));
     cp = buffer;
 
     snprintf (buffer, sizeof(buffer), "%s/%s", mp->foldpath, m_name (mp->lowsel));
     cp = buffer;
index a8377bf..bebcf1b 100644 (file)
@@ -353,7 +353,7 @@ m_getfld_track_filepos (m_getfld_state_t *gstate, FILE *iob) {
 void m_getfld_track_filepos2(m_getfld_state_t *gstate)
 {
     if (!*gstate)
 void m_getfld_track_filepos2(m_getfld_state_t *gstate)
 {
     if (!*gstate)
-       adios(NULL, "m_getfld_track_filepos2 without gstate");
+       die("m_getfld_track_filepos2 without gstate");
 
     m_getfld_track_filepos(gstate, (*gstate)->iob);
 }
 
     m_getfld_track_filepos(gstate, (*gstate)->iob);
 }
@@ -547,7 +547,7 @@ static void
 Ungetc(m_getfld_state_t s)
 {
     if (s->readpos == s->msg_buf)
 Ungetc(m_getfld_state_t s)
 {
     if (s->readpos == s->msg_buf)
-        adios(NULL, "Ungetc() at start of message buffer.");
+        die("Ungetc() at start of message buffer.");
 
     s->readpos--;
     s->bytes_read--;
 
     s->readpos--;
     s->bytes_read--;
@@ -833,7 +833,7 @@ m_getfld (m_getfld_state_t *gstate, char name[NAMESZ], char *buf, int *bufsz,
         }
 
        default:
         }
 
        default:
-           adios (NULL, "m_getfld() called with bogus state of %d", s->state);
+           die("m_getfld() called with bogus state of %d", s->state);
     }
 
     *cp = 0;
     }
 
     *cp = 0;
@@ -847,7 +847,7 @@ m_getfld (m_getfld_state_t *gstate, char name[NAMESZ], char *buf, int *bufsz,
 int m_getfld2(m_getfld_state_t *gstate, char name[NAMESZ], char *buf, int *bufsz)
 {
     if (!*gstate)
 int m_getfld2(m_getfld_state_t *gstate, char name[NAMESZ], char *buf, int *bufsz)
 {
     if (!*gstate)
-       adios(NULL, "m_getfld2 without gstate");
+       die("m_getfld2 without gstate");
 
     return m_getfld(gstate, name, buf, bufsz, (*gstate)->iob);
 }
 
     return m_getfld(gstate, name, buf, bufsz, (*gstate)->iob);
 }
@@ -918,7 +918,7 @@ m_unknown(m_getfld_state_t *gstate, FILE *iob)
     s->edelimlen = c - 1;
     s->delimend = s->msg_delim + s->edelimlen;
     if (s->edelimlen <= 1)
     s->edelimlen = c - 1;
     s->delimend = s->msg_delim + s->edelimlen;
     if (s->edelimlen <= 1)
-       adios (NULL, "maildrop delimiter must be at least 2 bytes");
+       die("maildrop delimiter must be at least 2 bytes");
 
     /*
      * build a Boyer-Moore end-position map for the matcher in m_getfld.
 
     /*
      * build a Boyer-Moore end-position map for the matcher in m_getfld.
@@ -947,7 +947,7 @@ m_unknown(m_getfld_state_t *gstate, FILE *iob)
 void m_unknown2(m_getfld_state_t *gstate)
 {
     if (!*gstate)
 void m_unknown2(m_getfld_state_t *gstate)
 {
     if (!*gstate)
-       adios(NULL, "m_unknown2 without gstate");
+       die("m_unknown2 without gstate");
 
     m_unknown(gstate, (*gstate)->iob);
 }
 
     m_unknown(gstate, (*gstate)->iob);
 }
index f6180b0..4a05675 100644 (file)
--- a/sbr/mts.c
+++ b/sbr/mts.c
@@ -117,7 +117,7 @@ save_mts_method (const char *value) {
         mts_method = "sendmail/pipe";
         sm_mts = MTS_SENDMAIL_PIPE;
     } else {
         mts_method = "sendmail/pipe";
         sm_mts = MTS_SENDMAIL_PIPE;
     } else {
-        adios (NULL, "unsupported mts selection \"%s\"", value);
+        die("unsupported mts selection \"%s\"", value);
     }
 }
 
     }
 }
 
index aac6b43..d2abf2f 100755 (executable)
@@ -141,7 +141,7 @@ mh_oauth_do_xoauth(const char *user, const char *svc, unsigned char **oauth_res,
     char *client_res;
 
     if (!mh_oauth_new (&ctx, svc))
     char *client_res;
 
     if (!mh_oauth_new (&ctx, svc))
-        adios(NULL, "%s", mh_oauth_get_err_string(ctx));
+        die("%s", mh_oauth_get_err_string(ctx));
 
     if (log != NULL) mh_oauth_log_to(stderr, ctx);
 
 
     if (log != NULL) mh_oauth_log_to(stderr, ctx);
 
@@ -149,7 +149,7 @@ mh_oauth_do_xoauth(const char *user, const char *svc, unsigned char **oauth_res,
     fp = lkfopendata(fn, "r+", &failed_to_lock);
     if (fp == NULL) {
         if (errno == ENOENT) {
     fp = lkfopendata(fn, "r+", &failed_to_lock);
     if (fp == NULL) {
         if (errno == ENOENT) {
-            adios(NULL, "no credentials -- run mhlogin -saslmech xoauth2 -authservice %s", svc);
+            die("no credentials -- run mhlogin -saslmech xoauth2 -authservice %s", svc);
         }
         adios(fn, "failed to open");
     }
         }
         adios(fn, "failed to open");
     }
@@ -158,24 +158,24 @@ mh_oauth_do_xoauth(const char *user, const char *svc, unsigned char **oauth_res,
     }
 
     if ((cred = mh_oauth_cred_load(fp, ctx, user)) == NULL) {
     }
 
     if ((cred = mh_oauth_cred_load(fp, ctx, user)) == NULL) {
-        adios(NULL, "%s", mh_oauth_get_err_string(ctx));
+        die("%s", mh_oauth_get_err_string(ctx));
     }
 
     if (!mh_oauth_access_token_valid(time(NULL), cred)) {
         if (!mh_oauth_refresh(cred)) {
             if (mh_oauth_get_err_code(ctx) == MH_OAUTH_NO_REFRESH) {
     }
 
     if (!mh_oauth_access_token_valid(time(NULL), cred)) {
         if (!mh_oauth_refresh(cred)) {
             if (mh_oauth_get_err_code(ctx) == MH_OAUTH_NO_REFRESH) {
-                adios(NULL, "no valid credentials -- run mhlogin -saslmech xoauth2 -authservice %s", svc);
+                die("no valid credentials -- run mhlogin -saslmech xoauth2 -authservice %s", svc);
             }
             if (mh_oauth_get_err_code(ctx) == MH_OAUTH_BAD_GRANT) {
             }
             if (mh_oauth_get_err_code(ctx) == MH_OAUTH_BAD_GRANT) {
-                adios(NULL, "credentials rejected -- run mhlogin -saslmech xoauth2 -authservice %s", svc);
+                die("credentials rejected -- run mhlogin -saslmech xoauth2 -authservice %s", svc);
             }
             inform("error refreshing OAuth2 token");
             }
             inform("error refreshing OAuth2 token");
-            adios(NULL, "%s", mh_oauth_get_err_string(ctx));
+            die("%s", mh_oauth_get_err_string(ctx));
         }
 
         fseek(fp, 0, SEEK_SET);
         if (!mh_oauth_cred_save(fp, cred, user)) {
         }
 
         fseek(fp, 0, SEEK_SET);
         if (!mh_oauth_cred_save(fp, cred, user)) {
-            adios(NULL, "%s", mh_oauth_get_err_string(ctx));
+            die("%s", mh_oauth_get_err_string(ctx));
         }
     }
 
         }
     }
 
index 5b51a61..1bbc069 100644 (file)
@@ -90,13 +90,13 @@ readconfig (struct node **npp, FILE *ib, const char *file, int ctx)
                continue;
 
            case BODY:
                continue;
 
            case BODY:
-               adios (NULL, "no blank lines are permitted in %s", file);
+               die("no blank lines are permitted in %s", file);
 
            case FILEEOF:
                break;
 
            default:
 
            case FILEEOF:
                break;
 
            default:
-               adios (NULL, "%s is poorly formatted", file);
+               die("%s is poorly formatted", file);
        }
        break;
     }
        }
        break;
     }
index 5c47aa1..513fb11 100644 (file)
@@ -110,7 +110,7 @@ ruserpass(const char *host, char **aname, char **apass, int flags)
                               user to correct it. */
                             inform("group or other permissions, %#o, "
                                 "forbidden: %s", stb.st_mode, credentials_file);
                               user to correct it. */
                             inform("group or other permissions, %#o, "
                                 "forbidden: %s", stb.st_mode, credentials_file);
-                           adios(NULL, "Remove password or correct file "
+                           die("Remove password or correct file "
                                  "permissions.");
                        }
                        if (token(tokval) && *apass == 0)
                                  "permissions.");
                        }
                        if (token(tokval) && *apass == 0)
@@ -210,7 +210,7 @@ token(char *tokval)
 
         *cp++ = c;
         if (cp - tokval > MAX_TOKVAL_SIZE-1) {
 
         *cp++ = c;
         if (cp - tokval > MAX_TOKVAL_SIZE-1) {
-            adios(NULL, "credential tokens restricted to length %d",
+            die("credential tokens restricted to length %d",
                   MAX_TOKVAL_SIZE - 1);
         }
     }
                   MAX_TOKVAL_SIZE - 1);
         }
     }
index 3919260..9a4b913 100644 (file)
@@ -103,7 +103,7 @@ seq_public (struct msgs *mp, int lockflag, int *failed_to_lock)
 
            case BODY:
                lkfclosedata (fp, seqfile);
 
            case BODY:
                lkfclosedata (fp, seqfile);
-               adios (NULL, "no blank lines are permitted in %s", seqfile);
+               die("no blank lines are permitted in %s", seqfile);
                break;
 
            case FILEEOF:
                break;
 
            case FILEEOF:
@@ -111,7 +111,7 @@ seq_public (struct msgs *mp, int lockflag, int *failed_to_lock)
 
            default: 
                lkfclosedata (fp, seqfile);
 
            default: 
                lkfclosedata (fp, seqfile);
-               adios (NULL, "%s is poorly formatted", seqfile);
+               die("%s is poorly formatted", seqfile);
        }
        break;  /* break from for loop */
     }
        }
        break;  /* break from for loop */
     }
index dd87532..839670b 100644 (file)
@@ -36,7 +36,7 @@ void *mh_xmalloc(size_t size)
         size = 1; /* Some mallocs don't like 0. */
     p = malloc(size);
     if (!p)
         size = 1; /* Some mallocs don't like 0. */
     p = malloc(size);
     if (!p)
-        adios(NULL, "malloc failed, size wanted: %zu", size);
+        die("malloc failed, size wanted: %zu", size);
 
     return p;
 }
 
     return p;
 }
@@ -56,7 +56,7 @@ void *mh_xrealloc(void *ptr, size_t size)
 
     new = realloc(ptr, size);
     if (!new)
 
     new = realloc(ptr, size);
     if (!new)
-        adios(NULL, "realloc failed, size wanted: %zu", size);
+        die("realloc failed, size wanted: %zu", size);
 
     return new;
 }
 
     return new;
 }
@@ -71,7 +71,7 @@ void *mh_xcalloc(size_t nelem, size_t elsize)
 
     p = calloc(nelem, elsize);
     if (!p)
 
     p = calloc(nelem, elsize);
     if (!p)
-        adios(NULL, "calloc failed, size wanted: %zu * %zu", nelem, elsize);
+        die("calloc failed, size wanted: %zu * %zu", nelem, elsize);
 
     return p;
 }
 
     return p;
 }
@@ -205,7 +205,7 @@ void create_folder(char *folder, int autocreate, void (*done_callback)(int))
             done_callback (1);
         }
         if (!makedir (folder))
             done_callback (1);
         }
         if (!makedir (folder))
-            adios (NULL, "unable to create folder %s", folder);
+            die("unable to create folder %s", folder);
     }
 }
 
     }
 }
 
@@ -220,7 +220,7 @@ num_digits (int n)
 
     /* Sanity check */
     if (n < 0)
 
     /* Sanity check */
     if (n < 0)
-        adios (NULL, "oops, num_digits called with negative value");
+        die("oops, num_digits called with negative value");
 
     if (n == 0)
         return 1;
 
     if (n == 0)
         return 1;
index d3946bc..d21c797 100644 (file)
@@ -34,7 +34,7 @@ vfgets (FILE *in, char **bp)
        if ((dp = cp + strlen (cp) - 2) < cp || *dp != QUOTE) {
 wrong_guess:
            if (cp > ++dp)
        if ((dp = cp + strlen (cp) - 2) < cp || *dp != QUOTE) {
 wrong_guess:
            if (cp > ++dp)
-               adios (NULL, "vfgets() botch -- you lose big");
+               die("vfgets() botch -- you lose big");
            if (*dp == '\n') {
                *bp = pp;
                return 0;
            if (*dp == '\n') {
                *bp = pp;
                return 0;
index f4e4664..760a26f 100644 (file)
--- a/uip/ali.c
+++ b/uip/ali.c
@@ -66,7 +66,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches] aliases ...",
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches] aliases ...",
@@ -79,9 +79,9 @@ main (int argc, char **argv)
 
                case ALIASW: 
                    if (!(cp = *argp++) || *cp == '-')
 
                case ALIASW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    if ((i = alias (cp)) != AK_OK)
                    if ((i = alias (cp)) != AK_OK)
-                       adios (NULL, "aliasing error in %s - %s", cp, akerror (i));
+                       die("aliasing error in %s - %s", cp, akerror (i));
                    continue;
                case NALIASW: 
                    noalias = true;
                    continue;
                case NALIASW: 
                    noalias = true;
@@ -108,7 +108,7 @@ main (int argc, char **argv)
        } else {
            /* Should never happen, but try to protect against code changes
               that could allow it. */
        } else {
            /* Should never happen, but try to protect against code changes
               that could allow it. */
-           adios (NULL, "too many arguments");
+           die("too many arguments");
        }
     }
 
        }
     }
 
@@ -119,7 +119,7 @@ main (int argc, char **argv)
 
            for (ap = brkstring(dp = mh_xstrdup(cp), " ", "\n"); ap && *ap; ap++)
                if ((i = alias (*ap)) != AK_OK)
 
            for (ap = brkstring(dp = mh_xstrdup(cp), " ", "\n"); ap && *ap; ap++)
                if ((i = alias (*ap)) != AK_OK)
-                   adios (NULL, "aliasing error in %s - %s", *ap, akerror (i));
+                   die("aliasing error in %s - %s", *ap, akerror (i));
             free(dp);
        }
        alias (AliasFile);
             free(dp);
        }
        alias (AliasFile);
@@ -130,7 +130,7 @@ main (int argc, char **argv)
      */
     if (inverted) {
        if (vecp == 0)
      */
     if (inverted) {
        if (vecp == 0)
-           adios (NULL, "usage: %s -user addresses ...  (you forgot the addresses)",
+           die("usage: %s -user addresses ...  (you forgot the addresses)",
                   invo_name);
 
        for (i = 0; i < vecp; i++)
                   invo_name);
 
        for (i = 0; i < vecp; i++)
@@ -207,9 +207,9 @@ print_usr (char *s, bool list)
     struct mailname *mp, *np;
 
     if ((pp = getname (s)) == NULL)
     struct mailname *mp, *np;
 
     if ((pp = getname (s)) == NULL)
-       adios (NULL, "no address in \"%s\"", s);
+       die("no address in \"%s\"", s);
     if ((mp = getm (pp, NULL, 0, NULL, 0)) == NULL)
     if ((mp = getm (pp, NULL, 0, NULL, 0)) == NULL)
-       adios (NULL, "bad address \"%s\"", s);
+       die("bad address \"%s\"", s);
     while (getname (""))
        continue;
 
     while (getname (""))
        continue;
 
index 2335ada..56935c2 100644 (file)
@@ -108,7 +108,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW:
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW:
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW:
                    snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
 
                case HELPSW:
                    snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
@@ -121,9 +121,9 @@ main (int argc, char **argv)
 
                case COMPSW:
                    if (comp)
 
                case COMPSW:
                    if (comp)
-                       adios (NULL, "only one component at a time!");
+                       die("only one component at a time!");
                    if (!(comp = *argp++) || *comp == '-')
                    if (!(comp = *argp++) || *comp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case DATESW:
                    continue;
 
                case DATESW:
@@ -142,9 +142,9 @@ main (int argc, char **argv)
 
                case TEXTSW:
                    if (text)
 
                case TEXTSW:
                    if (text)
-                       adios (NULL, "only one body at a time!");
+                       die("only one body at a time!");
                    if (!(text = *argp++) || *text == '-')
                    if (!(text = *argp++) || *text == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case DELETESW:          /* delete annotations */
                    continue;
 
                case DELETESW:          /* delete annotations */
@@ -161,7 +161,7 @@ main (int argc, char **argv)
 
                case NUMBERSW:          /* number listing or delete by number */
                    if (number != 0)
 
                case NUMBERSW:          /* number listing or delete by number */
                    if (number != 0)
-                       adios (NULL, "only one number at a time!");
+                       die("only one number at a time!");
 
                    if (argp - arguments == argc - 1 || **argp == '-')
                        number = 1;
 
                    if (argp - arguments == argc - 1 || **argp == '-')
                        number = 1;
@@ -171,7 +171,7 @@ main (int argc, char **argv)
                            number = -1;
 
                        else if (!(number = atoi(*argp)))
                            number = -1;
 
                        else if (!(number = atoi(*argp)))
-                           adios (NULL, "missing argument to %s", argp[-1]);
+                           die("missing argument to %s", argp[-1]);
 
                        argp++;
                    }
 
                        argp++;
                    }
@@ -194,7 +194,7 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
             folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
@@ -208,7 +208,7 @@ main (int argc, char **argv)
 
     if (draft != NULL) {
        if (msgs.size != 0)
 
     if (draft != NULL) {
        if (msgs.size != 0)
-           adios(NULL, "can only have message numbers or -draft.");
+           die("can only have message numbers or -draft.");
 
        draft = mh_xstrdup(m_draft(folder, NULL, 1, &isdf));
 
 
        draft = mh_xstrdup(m_draft(folder, NULL, 1, &isdf));
 
@@ -236,11 +236,11 @@ main (int argc, char **argv)
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
-       adios (NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     /* check for empty folder */
     if (mp->nummsg == 0)
 
     /* check for empty folder */
     if (mp->nummsg == 0)
-       adios (NULL, "no messages in %s", folder);
+       die("no messages in %s", folder);
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
@@ -285,13 +285,13 @@ make_comp (char **ap)
     if ((cp = *ap + strlen (*ap) - 1) > *ap && *cp == ':')
        *cp = 0;
     if (!**ap)
     if ((cp = *ap + strlen (*ap) - 1) > *ap && *cp == ':')
        *cp = 0;
     if (!**ap)
-       adios (NULL, "null component name");
+       die("null component name");
     if (**ap == '-')
     if (**ap == '-')
-       adios (NULL, "invalid component name %s", *ap);
+       die("invalid component name %s", *ap);
     if (strlen (*ap) >= NAMESZ)
     if (strlen (*ap) >= NAMESZ)
-       adios (NULL, "too large component name %s", *ap);
+       die("too large component name %s", *ap);
 
     for (cp = *ap; *cp; cp++)
        if (!isalnum ((unsigned char) *cp) && *cp != '-')
 
     for (cp = *ap; *cp; cp++)
        if (!isalnum ((unsigned char) *cp) && *cp != '-')
-           adios (NULL, "invalid component name %s", *ap);
+           die("invalid component name %s", *ap);
 }
 }
index cadfa63..c5ca38b 100644 (file)
@@ -186,7 +186,7 @@ annosbr (int fd, char *file, char *comp, char *text, bool inplace, bool datesw,
     mode = fstat (fd, &st) != NOTOK ? (int) (st.st_mode & 0777) : m_gmprot ();
 
     if ((cp = m_mktemp2(file, "annotate", NULL, &tmp)) == NULL) {
     mode = fstat (fd, &st) != NOTOK ? (int) (st.st_mode & 0777) : m_gmprot ();
 
     if ((cp = m_mktemp2(file, "annotate", NULL, &tmp)) == NULL) {
-       adios(NULL, "unable to create temporary file");
+       die("unable to create temporary file");
     }
     strncpy (tmpfil, cp, sizeof(tmpfil));
     chmod (tmpfil, mode);
     }
     strncpy (tmpfil, cp, sizeof(tmpfil));
     chmod (tmpfil, mode);
@@ -201,7 +201,7 @@ annosbr (int fd, char *file, char *comp, char *text, bool inplace, bool datesw,
 
     if (delete >= -1 || append) {
        if ((fp = fdopen(fd, "r")) == NULL)
 
     if (delete >= -1 || append) {
        if ((fp = fdopen(fd, "r")) == NULL)
-           adios(NULL, "unable to fdopen file.");
+           die("unable to fdopen file.");
 
        field = mh_xmalloc(field_size = 256);
     }
 
        field = mh_xmalloc(field_size = 256);
     }
@@ -324,7 +324,7 @@ annosbr (int fd, char *file, char *comp, char *text, bool inplace, bool datesw,
             */
 
            if ((n = fputs(field, tmp)) == EOF || (c == '\n' && fputc('\n', tmp) == EOF))
             */
 
            if ((n = fputs(field, tmp)) == EOF || (c == '\n' && fputc('\n', tmp) == EOF))
-               adios(NULL, "unable to write temporary file.");
+               die("unable to write temporary file.");
 
        } while (*field != '\0' && *field != '-');
 
 
        } while (*field != '\0' && *field != '-');
 
@@ -393,7 +393,7 @@ annosbr (int fd, char *file, char *comp, char *text, bool inplace, bool datesw,
      */
 
     if (fp && lseek(fd, (off_t)ftell(fp), SEEK_SET) == (off_t)-1)
      */
 
     if (fp && lseek(fd, (off_t)ftell(fp), SEEK_SET) == (off_t)-1)
-        adios(NULL, "can't seek.");
+        die("can't seek.");
 
     cpydata (fd, fileno (tmp), file, tmpfil);
     fclose (tmp);
 
     cpydata (fd, fileno (tmp), file, tmpfil);
     fclose (tmp);
index 0e3e8b5..fbcf62b 100644 (file)
--- a/uip/ap.c
+++ b/uip/ap.c
@@ -66,7 +66,7 @@ main (int argc, char **argv)
                    done (1);
 
                case UNKWNSW: 
                    done (1);
 
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches] addrs ...",
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches] addrs ...",
@@ -79,30 +79,30 @@ main (int argc, char **argv)
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    format = NULL;
                    continue;
                case FMTSW: 
                    if (!(format = *argp++) || *format == '-')
                    format = NULL;
                    continue;
                case FMTSW: 
                    if (!(format = *argp++) || *format == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    form = NULL;
                    continue;
 
                case WIDTHSW: 
                    if (!(cp = *argp++) || *cp == '-')
                    form = NULL;
                    continue;
 
                case WIDTHSW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    width = atoi (cp);
                    continue;
            }
        }
        if (addrp == NADDRS)
                    width = atoi (cp);
                    continue;
            }
        }
        if (addrp == NADDRS)
-           adios (NULL, "more than %d addresses", NADDRS);
+           die("more than %d addresses", NADDRS);
         addrs[addrp++] = cp;
     }
     addrs[addrp] = NULL;
 
     if (addrp == 0)
         addrs[addrp++] = cp;
     }
     addrs[addrp] = NULL;
 
     if (addrp == 0)
-       adios (NULL, "usage: %s [switches] addrs ...", invo_name);
+       die("usage: %s [switches] addrs ...", invo_name);
 
     /* get new format string */
     nfs = new_fs (form, format, FORMAT);
 
     /* get new format string */
     nfs = new_fs (form, format, FORMAT);
index 5e5d86b..6bd96ea 100644 (file)
@@ -88,7 +88,7 @@ main (int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW: 
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW: 
-               adios (NULL, "-%s unknown\n", cp);
+               die("-%s unknown\n", cp);
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
@@ -133,7 +133,7 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else {
            app_msgarg(&msgs, cp);
             folder = pluspath (cp);
        } else {
            app_msgarg(&msgs, cp);
@@ -153,11 +153,11 @@ main (int argc, char **argv)
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
-       adios (NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     /* check for empty folder */
     if (mp->nummsg == 0)
 
     /* check for empty folder */
     if (mp->nummsg == 0)
-       adios (NULL, "no messages in %s", folder);
+       die("no messages in %s", folder);
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
@@ -185,7 +185,7 @@ main (int argc, char **argv)
                                  msgnum);
                }  /* this pair of braces was missing before 1999-07-15 */
                else
                                  msgnum);
                }  /* this pair of braces was missing before 1999-07-15 */
                else
-                   adios (NULL, "burst() botch -- you lose big");
+                   die("burst() botch -- you lose big");
            }
        }
     }
            }
        }
     }
@@ -384,7 +384,7 @@ burst (struct msgs **mpp, int msgnum, struct smsg *smsgs, int numburst,
      */
     if ((mp->hghmsg + numburst > mp->hghoff) &&
        !(mp = folder_realloc (mp, mp->lowoff, mp->hghmsg + numburst)))
      */
     if ((mp->hghmsg + numburst > mp->hghoff) &&
        !(mp = folder_realloc (mp, mp->lowoff, mp->hghmsg + numburst)))
-       adios (NULL, "unable to allocate folder storage");
+       die("unable to allocate folder storage");
     *mpp = mp;
 
     j = mp->hghmsg;            /* old value */
     *mpp = mp;
 
     j = mp->hghmsg;            /* old value */
@@ -455,7 +455,7 @@ burst (struct msgs **mpp, int msgnum, struct smsg *smsgs, int numburst,
         char *tempfile;
 
        if ((tempfile = m_mktemp2(NULL, invo_name, NULL, &out)) == NULL) {
         char *tempfile;
 
        if ((tempfile = m_mktemp2(NULL, invo_name, NULL, &out)) == NULL) {
-           adios(NULL, "unable to create temporary file in %s",
+           die("unable to create temporary file in %s",
                  get_temp_dir());
        }
        strncpy (f2, tempfile, sizeof(f2));
                  get_temp_dir());
        }
        strncpy (f2, tempfile, sizeof(f2));
index 2805d56..3667f2e 100644 (file)
@@ -95,7 +95,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [msg] [switches]",
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [msg] [switches]",
@@ -108,7 +108,7 @@ main (int argc, char **argv)
 
                case EDITRSW: 
                    if (!(ed = *argp++) || *ed == '-')
 
                case EDITRSW: 
                    if (!(ed = *argp++) || *ed == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    nedit = 0;
                    continue;
                case NEDITSW: 
                    nedit = 0;
                    continue;
                case NEDITSW: 
@@ -117,7 +117,7 @@ main (int argc, char **argv)
 
                case WHATSW: 
                    if (!(whatnowproc = *argp++) || *whatnowproc == '-')
 
                case WHATSW: 
                    if (!(whatnowproc = *argp++) || *whatnowproc == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    nwhat = 0;
                    continue;
 
                    nwhat = 0;
                    continue;
 
@@ -130,7 +130,7 @@ main (int argc, char **argv)
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case USESW: 
                    continue;
 
                case USESW: 
@@ -142,25 +142,25 @@ main (int argc, char **argv)
 
                case FILESW:    /* compatibility */
                    if (file)
 
                case FILESW:    /* compatibility */
                    if (file)
-                       adios (NULL, "only one file at a time!");
+                       die("only one file at a time!");
                    if (!(file = *argp++) || *file == '-')
                    if (!(file = *argp++) || *file == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    isdf = NOTOK;
                    continue;
 
                case DFOLDSW: 
                    if (dfolder)
                    isdf = NOTOK;
                    continue;
 
                case DFOLDSW: 
                    if (dfolder)
-                       adios (NULL, "only one draft folder at a time!");
+                       die("only one draft folder at a time!");
                    if (!(cp = *argp++) || *cp == '-')
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                            *cp != '@' ? TFOLDER : TSUBCWF);
                    continue;
                case DMSGSW: 
                    if (file)
                    dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                            *cp != '@' ? TFOLDER : TSUBCWF);
                    continue;
                case DMSGSW: 
                    if (file)
-                       adios (NULL, "only one draft message at a time!");
+                       die("only one draft message at a time!");
                    if (!(file = *argp++) || *file == '-')
                    if (!(file = *argp++) || *file == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
                case NDFLDSW: 
                    dfolder = NULL;
                    continue;
                case NDFLDSW: 
                    dfolder = NULL;
@@ -169,25 +169,25 @@ main (int argc, char **argv)
 
                case TOSW:
                    if (!(cp = *argp++) || *cp == '-')
 
                case TOSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    to = addlist(to, cp);
                    continue;
 
                case CCSW:
                    if (!(cp = *argp++) || *cp == '-')
                    to = addlist(to, cp);
                    continue;
 
                case CCSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    cc = addlist(cc, cp);
                    continue;
 
                case FROMSW:
                    if (!(cp = *argp++) || *cp == '-')
                    cc = addlist(cc, cp);
                    continue;
 
                case FROMSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    from = addlist(from, cp);
                    continue;
 
                case FCCSW:
                    if (!(cp = *argp++) || *cp == '-')
                    from = addlist(from, cp);
                    continue;
 
                case FCCSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    dp = NULL;
                    if (*cp == '@')
                        cp = dp = path(cp + 1, TSUBCWF);
                    dp = NULL;
                    if (*cp == '@')
                        cp = dp = path(cp + 1, TSUBCWF);
@@ -197,25 +197,25 @@ main (int argc, char **argv)
 
                case WIDTHSW:
                    if (!(cp = *argp++) || *cp == '-')
 
                case WIDTHSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    if ((outputlinelen = atoi(cp)) < 10)
                    if ((outputlinelen = atoi(cp)) < 10)
-                       adios (NULL, "impossible width %d", outputlinelen);
+                       die("impossible width %d", outputlinelen);
                    continue;
 
                case SUBJECTSW:
                    if (!(cp = *argp++) || *cp == '-')
                    continue;
 
                case SUBJECTSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    subject = cp;
                    continue;
            }
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
                    subject = cp;
                    continue;
            }
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else {
            if (msg)
             folder = pluspath (cp);
        } else {
            if (msg)
-               adios (NULL, "only one message at a time!");
+               die("only one message at a time!");
             msg = cp;
        }
     }
             msg = cp;
        }
     }
@@ -234,7 +234,7 @@ main (int argc, char **argv)
        msg = NULL;
     }
     if (form && (folder || msg))
        msg = NULL;
     }
     if (form && (folder || msg))
-           adios (NULL, "can't mix forms and folders/msgs");
+           die("can't mix forms and folders/msgs");
 
     cp = NULL;
 
 
     cp = NULL;
 
@@ -253,11 +253,11 @@ main (int argc, char **argv)
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 1)))
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 1)))
-           adios (NULL, "unable to read folder %s", folder);
+           die("unable to read folder %s", folder);
 
        /* check for empty folder */
        if (mp->nummsg == 0)
 
        /* check for empty folder */
        if (mp->nummsg == 0)
-           adios (NULL, "no messages in %s", folder);
+           die("no messages in %s", folder);
 
        /* parse the message range/sequence/name and set SELECTED */
        if (!m_convert (mp, msg))
 
        /* parse the message range/sequence/name and set SELECTED */
        if (!m_convert (mp, msg))
@@ -266,7 +266,7 @@ main (int argc, char **argv)
        seq_save (mp);
 
        if (mp->numsel > 1)
        seq_save (mp);
 
        if (mp->numsel > 1)
-           adios (NULL, "only one message at a time!");
+           die("only one message at a time!");
 
        if ((in = open (form = mh_xstrdup(m_name (mp->lowsel)), O_RDONLY)) == NOTOK)
            adios (form, "unable to open message");
 
        if ((in = open (form = mh_xstrdup(m_name (mp->lowsel)), O_RDONLY)) == NOTOK)
            adios (form, "unable to open message");
index 7eea4fc..ad42e1f 100644 (file)
@@ -95,7 +95,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [msg] [switches]",
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [msg] [switches]",
@@ -115,7 +115,7 @@ main (int argc, char **argv)
 
                case EDITRSW: 
                    if (!(ed = *argp++) || *ed == '-')
 
                case EDITRSW: 
                    if (!(ed = *argp++) || *ed == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    nedit = 0;
                    continue;
                case NEDITSW:
                    nedit = 0;
                    continue;
                case NEDITSW:
@@ -124,7 +124,7 @@ main (int argc, char **argv)
                    
                case WHATSW: 
                    if (!(whatnowproc = *argp++) || *whatnowproc == '-')
                    
                case WHATSW: 
                    if (!(whatnowproc = *argp++) || *whatnowproc == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    nwhat = 0;
                    continue;
                case NWHATSW: 
                    nwhat = 0;
                    continue;
                case NWHATSW: 
@@ -133,14 +133,14 @@ main (int argc, char **argv)
 
                case FILESW: 
                    if (file)
 
                case FILESW: 
                    if (file)
-                       adios (NULL, "only one file at a time!");
+                       die("only one file at a time!");
                    if (!(cp = *argp++) || *cp == '-')
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    file = path (cp, TFILE);
                    continue;
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
                    file = path (cp, TFILE);
                    continue;
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case INPLSW: 
                    continue;
 
                case INPLSW: 
@@ -152,17 +152,17 @@ main (int argc, char **argv)
 
                case DFOLDSW: 
                    if (dfolder)
 
                case DFOLDSW: 
                    if (dfolder)
-                       adios (NULL, "only one draft folder at a time!");
+                       die("only one draft folder at a time!");
                    if (!(cp = *argp++) || *cp == '-')
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                            *cp != '@' ? TFOLDER : TSUBCWF);
                    continue;
                case DMSGSW: 
                    if (dmsg)
                    dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                            *cp != '@' ? TFOLDER : TSUBCWF);
                    continue;
                case DMSGSW: 
                    if (dmsg)
-                       adios (NULL, "only one draft message at a time!");
+                       die("only one draft message at a time!");
                    if (!(dmsg = *argp++) || *dmsg == '-')
                    if (!(dmsg = *argp++) || *dmsg == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
                case NDFLDSW: 
                    dfolder = NULL;
                    continue;
                case NDFLDSW: 
                    dfolder = NULL;
@@ -171,30 +171,30 @@ main (int argc, char **argv)
 
                case FROMSW:
                    if (!(cp = *argp++) || *cp == '-')
 
                case FROMSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    from = addlist(from, cp);
                    continue;
                case TOSW:
                    if (!(cp = *argp++) || *cp == '-')
                    from = addlist(from, cp);
                    continue;
                case TOSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    to = addlist(to, cp);
                    continue;
                case CCSW:
                    if (!(cp = *argp++) || *cp == '-')
                    to = addlist(to, cp);
                    continue;
                case CCSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    cc = addlist(cc, cp);
                    continue;
                case FCCSW:
                    if (!(cp = *argp++) || *cp == '-')
                    cc = addlist(cc, cp);
                    continue;
                case FCCSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    fcc = addlist(fcc, cp);
                    continue;
 
                case WIDTHSW:
                    if (!(cp = *argp++) || *cp == '-')
                    fcc = addlist(fcc, cp);
                    continue;
 
                case WIDTHSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    if ((outputlinelen = atoi(cp)) < 10)
                    if ((outputlinelen = atoi(cp)) < 10)
-                       adios (NULL, "impossible width %d", outputlinelen);
+                       die("impossible width %d", outputlinelen);
                    continue;
 
                case ATFILESW:
                    continue;
 
                case ATFILESW:
@@ -207,11 +207,11 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else {
            if (msg)
             folder = pluspath (cp);
        } else {
            if (msg)
-               adios (NULL, "only one message at a time!");
+               die("only one message at a time!");
             msg = cp;
        }
     }
             msg = cp;
        }
     }
@@ -221,7 +221,7 @@ main (int argc, char **argv)
     if (!context_find ("path"))
        free (path ("./", TFOLDER));
     if (file && (msg || folder))
     if (!context_find ("path"))
        free (path ("./", TFOLDER));
     if (file && (msg || folder))
-       adios (NULL, "can't mix files and folders/msgs");
+       die("can't mix files and folders/msgs");
 
 try_it_again:
     strncpy (drft, m_draft (dfolder, dmsg, NOUSE, &isdf), sizeof(drft));
 
 try_it_again:
     strncpy (drft, m_draft (dfolder, dmsg, NOUSE, &isdf), sizeof(drft));
@@ -275,11 +275,11 @@ try_it_again:
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 1)))
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 1)))
-           adios (NULL, "unable to read folder %s", folder);
+           die("unable to read folder %s", folder);
 
        /* check for empty folder */
        if (mp->nummsg == 0)
 
        /* check for empty folder */
        if (mp->nummsg == 0)
-           adios (NULL, "no messages in %s", folder);
+           die("no messages in %s", folder);
 
        /* parse the message range/sequence/name and set SELECTED */
        if (!m_convert (mp, msg))
 
        /* parse the message range/sequence/name and set SELECTED */
        if (!m_convert (mp, msg))
@@ -287,7 +287,7 @@ try_it_again:
        seq_setprev (mp);       /* set the previous-sequence */
 
        if (mp->numsel > 1)
        seq_setprev (mp);       /* set the previous-sequence */
 
        if (mp->numsel > 1)
-           adios (NULL, "only one message at a time!");
+           die("only one message at a time!");
     }
 
     msgnam = file ? file : mh_xstrdup(m_name (mp->lowsel));
     }
 
     msgnam = file ? file : mh_xstrdup(m_name (mp->lowsel));
index bf469c3..64b8ae1 100644 (file)
@@ -93,7 +93,7 @@ distout (char *drft, char *msgnam, char *backup)
                return NOTOK;
 
            default: 
                return NOTOK;
 
            default: 
-               adios (NULL, "getfld() returned %d", state);
+               die("getfld() returned %d", state);
        }
     }
 process: ;
        }
     }
 process: ;
@@ -145,12 +145,12 @@ ready_msg (char *msgnam)
 
     cp = m_mktemp2(NULL, "dist", &hdrfd, NULL);
     if (cp == NULL) {
 
     cp = m_mktemp2(NULL, "dist", &hdrfd, NULL);
     if (cp == NULL) {
-       adios(NULL, "unable to create temporary file in %s", get_temp_dir());
+       die("unable to create temporary file in %s", get_temp_dir());
     }
     strncpy(tmpfil, cp, sizeof(tmpfil));
     if ((out = dup (hdrfd)) == NOTOK
            || (ofp = fdopen (out, "w")) == NULL)
     }
     strncpy(tmpfil, cp, sizeof(tmpfil));
     if ((out = dup (hdrfd)) == NOTOK
            || (ofp = fdopen (out, "w")) == NULL)
-       adios (NULL, "no file descriptors -- you lose big");
+       die("no file descriptors -- you lose big");
     (void) m_unlink (tmpfil);
 
     gstate = m_getfld_state_init(ifp);
     (void) m_unlink (tmpfil);
 
     gstate = m_getfld_state_init(ifp);
@@ -174,14 +174,14 @@ ready_msg (char *msgnam)
 
                 cp = m_mktemp2(NULL, "dist", &txtfd, NULL);
                 if (cp == NULL) {
 
                 cp = m_mktemp2(NULL, "dist", &txtfd, NULL);
                 if (cp == NULL) {
-                   adios(NULL, "unable to create temporary file in %s",
+                   die("unable to create temporary file in %s",
                          get_temp_dir());
                 }
                 fchmod(txtfd, 0600);
                strncpy (tmpfil, cp, sizeof(tmpfil));
                if ((out = dup (txtfd)) == NOTOK
                        || (ofp = fdopen (out, "w")) == NULL)
                          get_temp_dir());
                 }
                 fchmod(txtfd, 0600);
                strncpy (tmpfil, cp, sizeof(tmpfil));
                if ((out = dup (txtfd)) == NOTOK
                        || (ofp = fdopen (out, "w")) == NULL)
-                   adios (NULL, "no file descriptors -- you lose big");
+                   die("no file descriptors -- you lose big");
                (void) m_unlink (tmpfil);
                fprintf (ofp, "\n%s", buffer);
                while (state == BODY) {
                (void) m_unlink (tmpfil);
                fprintf (ofp, "\n%s", buffer);
                while (state == BODY) {
@@ -194,10 +194,10 @@ ready_msg (char *msgnam)
 
            case LENERR: 
            case FMTERR: 
 
            case LENERR: 
            case FMTERR: 
-               adios (NULL, "format error in message %s", msgnam);
+               die("format error in message %s", msgnam);
 
            default: 
 
            default: 
-               adios (NULL, "getfld() returned %d", state);
+               die("getfld() returned %d", state);
        }
     }
 process: ;
        }
     }
 process: ;
index dc79991..c2bed42 100644 (file)
--- a/uip/dp.c
+++ b/uip/dp.c
@@ -61,7 +61,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches] dates ...",
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches] dates ...",
@@ -74,30 +74,30 @@ main (int argc, char **argv)
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    format = NULL;
                    continue;
                case FMTSW: 
                    if (!(format = *argp++) || *format == '-')
                    format = NULL;
                    continue;
                case FMTSW: 
                    if (!(format = *argp++) || *format == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    form = NULL;
                    continue;
 
                case WIDTHSW: 
                    if (!(cp = *argp++) || *cp == '-')
                    form = NULL;
                    continue;
 
                case WIDTHSW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    width = atoi (cp);
                    continue;
            }
        }
        if (datep == NDATES)
                    width = atoi (cp);
                    continue;
            }
        }
        if (datep == NDATES)
-           adios (NULL, "more than %d dates", NDATES);
+           die("more than %d dates", NDATES);
         dates[datep++] = cp;
     }
     dates[datep] = NULL;
 
     if (datep == 0)
         dates[datep++] = cp;
     }
     dates[datep] = NULL;
 
     if (datep == 0)
-       adios (NULL, "usage: %s [switches] dates ...", invo_name);
+       die("usage: %s [switches] dates ...", invo_name);
 
     /* get new format string */
     nfs = new_fs (form, format, FORMAT);
 
     /* get new format string */
     nfs = new_fs (form, format, FORMAT);
index e3c84a4..99009ca 100644 (file)
@@ -140,7 +140,7 @@ main(int argc, char **argv)
                ambigsw(cp, switches);
                done(1);
            case UNKWNSW:
                ambigsw(cp, switches);
                done(1);
            case UNKWNSW:
-               adios(NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW:
                snprintf(buf, sizeof(buf), "%s [+folder1 [+folder2 ...]][switches]",
 
            case HELPSW:
                snprintf(buf, sizeof(buf), "%s [+folder1 [+folder2 ...]][switches]",
@@ -153,7 +153,7 @@ main(int argc, char **argv)
 
            case SEQSW:
                if (!(cp = *argp++) || *cp == '-')
 
            case SEQSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
 
                svector_push_back (sequencesToDo, cp);
                break;
 
                svector_push_back (sequencesToDo, cp);
                break;
@@ -237,7 +237,7 @@ main(int argc, char **argv)
            for (; ap && *ap; ap++)
                svector_push_back (sequencesToDo, *ap);
        } else {
            for (; ap && *ap; ap++)
                svector_push_back (sequencesToDo, *ap);
        } else {
-           adios (NULL, "no sequence specified or %s profile entry found", usequence);
+           die("no sequence specified or %s profile entry found", usequence);
        }
     }
 
        }
     }
 
index 3fa0876..abcffef 100644 (file)
@@ -63,7 +63,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches]", invo_name);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches]", invo_name);
@@ -75,19 +75,19 @@ main (int argc, char **argv)
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    format = NULL;
                    continue;
                case FMTSW: 
                    if (!(format = *argp++) || *format == '-')
                    format = NULL;
                    continue;
                case FMTSW: 
                    if (!(format = *argp++) || *format == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    form = NULL;
                    continue;
 
            }
        }
        if (form)
                    form = NULL;
                    continue;
 
            }
        }
        if (form)
-           adios (NULL, "only one form at a time!");
+           die("only one form at a time!");
         form = cp;
     }
 
         form = cp;
     }
 
index d458bb6..c5e9079 100644 (file)
@@ -136,11 +136,11 @@ main (int argc, char **argv)
             */
            if (*++cp == '-') {
                if (*++cp == '\0')
             */
            if (*++cp == '-') {
                if (*++cp == '\0')
-                   adios(NULL, "missing component name after --");
+                   die("missing component name after --");
                app_msgarg(&compargs, cp);
                /* Grab next argument for component text */
                if (!(cp = *argp++))
                app_msgarg(&compargs, cp);
                /* Grab next argument for component text */
                if (!(cp = *argp++))
-                   adios(NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                app_msgarg(&compargs, cp);
                continue;
            }
                app_msgarg(&compargs, cp);
                continue;
            }
@@ -149,7 +149,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches]", invo_name);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches]", invo_name);
@@ -159,12 +159,12 @@ main (int argc, char **argv)
                    print_version(invo_name);
                    done (0);
                case OTHERSW:
                    print_version(invo_name);
                    done (0);
                case OTHERSW:
-                   adios(NULL, "internal argument error!");
+                   die("internal argument error!");
                    continue;
 
                case OUTSIZESW:
                    if (!(cp = *argp++) || *cp == '-')
                    continue;
 
                case OUTSIZESW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios(NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    if (strcmp(cp, "max") == 0)
                        outputsize = INT_MAX;
                    else if (strcmp(cp, "width") == 0)
                    if (strcmp(cp, "max") == 0)
                        outputsize = INT_MAX;
                    else if (strcmp(cp, "width") == 0)
@@ -175,12 +175,12 @@ main (int argc, char **argv)
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    format = NULL;
                    continue;
                case FMTSW: 
                    if (!(format = *argp++) || *format == '-')
                    format = NULL;
                    continue;
                case FMTSW: 
                    if (!(format = *argp++) || *format == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    form = NULL;
                    continue;
 
                    form = NULL;
                    continue;
 
@@ -231,27 +231,27 @@ main (int argc, char **argv)
 
                case WIDTHSW:
                    if (!(cp = *argp++) || *cp == '-')
 
                case WIDTHSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios(NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    colwidth = atoi(cp);
                    continue;
                case MSGNUMSW:
                    if (!(cp = *argp++) || *cp == '-')
                    colwidth = atoi(cp);
                    continue;
                case MSGNUMSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios(NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    msgnum = atoi(cp);
                    continue;
                case MSGCURSW:
                    if (!(cp = *argp++) || *cp == '-')
                    msgnum = atoi(cp);
                    continue;
                case MSGCURSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios(NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    msgcur = atoi(cp);
                    continue;
                case MSGSIZESW:
                    if (!(cp = *argp++) || *cp == '-')
                    msgcur = atoi(cp);
                    continue;
                case MSGSIZESW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios(NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    msgsize = atoi(cp);
                    continue;
                case UNSEENSW:
                    if (!(cp = *argp++) || *cp == '-')
                    msgsize = atoi(cp);
                    continue;
                case UNSEENSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios(NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    msgunseen = atoi(cp);
                    continue;
 
                    msgunseen = atoi(cp);
                    continue;
 
@@ -271,7 +271,7 @@ main (int argc, char **argv)
 
        if (mode == MESSAGE && !files && (*cp == '+' || *cp == '@')) {
            if (folder)
 
        if (mode == MESSAGE && !files && (*cp == '+' || *cp == '@')) {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else
            app_msgarg(&msgs, cp);
             folder = pluspath (cp);
        } else
            app_msgarg(&msgs, cp);
@@ -288,7 +288,7 @@ main (int argc, char **argv)
      */
 
    if (!dump && compargs.size == 0 && msgs.size == 0) {
      */
 
    if (!dump && compargs.size == 0 && msgs.size == 0) {
-        adios(NULL, "usage: [switches] [+folder] msgs | strings...");
+        die("usage: [switches] [+folder] msgs | strings...");
    }
 
    /*
    }
 
    /*
@@ -297,7 +297,7 @@ main (int argc, char **argv)
     */
 
    if (mode == RAW && form == NULL && format == NULL) {
     */
 
    if (mode == RAW && form == NULL && format == NULL) {
-       adios (NULL, "You must specify a format with -form or -format when "
+       die("You must specify a format with -form or -format when "
               "using -raw");
    }
 
               "using -raw");
    }
 
@@ -501,10 +501,10 @@ process_messages(struct format *fmt, struct msgs_array *comps,
        adios(maildir, "unable to change directory to");
 
     if (!(mp = folder_read(folder, 1)))
        adios(maildir, "unable to change directory to");
 
     if (!(mp = folder_read(folder, 1)))
-       adios(NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     if (mp->nummsg == 0)
 
     if (mp->nummsg == 0)
-       adios(NULL, "no messages in %s", folder);
+       die("no messages in %s", folder);
 
     for (i = 0; i < msgs->size; i++)
        if (!m_convert(mp, msgs->msgs[i]))
 
     for (i = 0; i < msgs->size; i++)
        if (!m_convert(mp, msgs->msgs[i]))
index 3989a42..2be4426 100644 (file)
@@ -100,7 +100,7 @@ static
 void
 nonexistent_folder (int status) {
     NMH_UNUSED (status);
 void
 nonexistent_folder (int status) {
     NMH_UNUSED (status);
-    adios (NULL, "folder %s does not exist", folder);
+    die("folder %s does not exist", folder);
 }
 
 
 }
 
 
@@ -130,7 +130,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [msg] [switches]",
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [msg] [switches]",
@@ -226,11 +226,11 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (argfolder)
        }
        if (*cp == '+' || *cp == '@') {
            if (argfolder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             argfolder = pluspath (cp);
        } else {
            if (msg)
             argfolder = pluspath (cp);
        } else {
            if (msg)
-               adios (NULL, "only one (current) message at a time!");
+               die("only one (current) message at a time!");
             msg = cp;
        }
     }
             msg = cp;
        }
     }
@@ -256,7 +256,7 @@ main (int argc, char **argv)
                ap = brkstring (dp, " ", "\n");
                argfolder = getcpy(*ap++);
            } else {
                ap = brkstring (dp, " ", "\n");
                argfolder = getcpy(*ap++);
            } else {
-               adios (NULL, "no other folder");
+               die("no other folder");
            }
            for (cp = mh_xstrdup(getfolder(1)); *ap; ap++)
                cp = add (*ap, add (" ", cp));
            }
            for (cp = mh_xstrdup(getfolder(1)); *ap; ap++)
                cp = add (*ap, add (" ", cp));
@@ -274,13 +274,13 @@ main (int argc, char **argv)
     /* Popping a folder off of the folder stack */
     if (popsw) {
        if (argfolder)
     /* Popping a folder off of the folder stack */
     if (popsw) {
        if (argfolder)
-           adios (NULL, "sorry, no folders allowed with -pop");
+           die("sorry, no folders allowed with -pop");
        if ((cp = context_find (stack))) {
            dp = mh_xstrdup(cp);
            ap = brkstring (dp, " ", "\n");
            argfolder = getcpy(*ap++);
        } else {
        if ((cp = context_find (stack))) {
            dp = mh_xstrdup(cp);
            ap = brkstring (dp, " ", "\n");
            argfolder = getcpy(*ap++);
        } else {
-           adios (NULL, "folder stack empty");
+           die("folder stack empty");
        }
        if (*ap) {
            /* if there's anything left in the stack */
        }
        if (*ap) {
            /* if there's anything left in the stack */
index 6ec53be..ac2f765 100644 (file)
@@ -130,7 +130,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
@@ -150,7 +150,7 @@ main (int argc, char **argv)
 
                case EDITRSW: 
                    if (!(ed = *argp++) || *ed == '-')
 
                case EDITRSW: 
                    if (!(ed = *argp++) || *ed == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    nedit = 0;
                    continue;
                case NEDITSW:
                    nedit = 0;
                    continue;
                case NEDITSW:
@@ -159,7 +159,7 @@ main (int argc, char **argv)
 
                case WHATSW: 
                    if (!(whatnowproc = *argp++) || *whatnowproc == '-')
 
                case WHATSW: 
                    if (!(whatnowproc = *argp++) || *whatnowproc == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    nwhat = 0;
                    continue;
                case BILDSW:
                    nwhat = 0;
                    continue;
                case BILDSW:
@@ -171,20 +171,20 @@ main (int argc, char **argv)
 
                case FILESW: 
                    if (file)
 
                case FILESW: 
                    if (file)
-                       adios (NULL, "only one file at a time!");
+                       die("only one file at a time!");
                    if (!(cp = *argp++) || *cp == '-')
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    file = path (cp, TFILE);
                    continue;
                case FILTSW:
                    if (!(cp = *argp++) || *cp == '-')
                    file = path (cp, TFILE);
                    continue;
                case FILTSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    filter = mh_xstrdup(etcpath(cp));
                    mime = 0;
                    continue;
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
                    filter = mh_xstrdup(etcpath(cp));
                    mime = 0;
                    continue;
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case FRMTSW:
                    continue;
 
                case FRMTSW:
@@ -211,36 +211,36 @@ main (int argc, char **argv)
 
                case DGSTSW: 
                    if (!(cp = *argp++) || *cp == '-')
 
                case DGSTSW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    digest = mh_xstrdup(cp);
                    mime = 0;
                    continue;
                case ISSUESW:
                    if (!(cp = *argp++) || *cp == '-')
                    digest = mh_xstrdup(cp);
                    mime = 0;
                    continue;
                case ISSUESW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    if ((issue = atoi (cp)) < 1)
                    if ((issue = atoi (cp)) < 1)
-                       adios (NULL, "bad argument %s %s", argp[-2], cp);
+                       die("bad argument %s %s", argp[-2], cp);
                    continue;
                case VOLUMSW:
                    if (!(cp = *argp++) || *cp == '-')
                    continue;
                case VOLUMSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    if ((volume = atoi (cp)) < 1)
                    if ((volume = atoi (cp)) < 1)
-                       adios (NULL, "bad argument %s %s", argp[-2], cp);
+                       die("bad argument %s %s", argp[-2], cp);
                    continue;
 
                case DFOLDSW: 
                    if (dfolder)
                    continue;
 
                case DFOLDSW: 
                    if (dfolder)
-                       adios (NULL, "only one draft folder at a time!");
+                       die("only one draft folder at a time!");
                    if (!(cp = *argp++) || *cp == '-')
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                                    *cp != '@' ? TFOLDER : TSUBCWF);
                    continue;
                case DMSGSW:
                    if (dmsg)
                    dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                                    *cp != '@' ? TFOLDER : TSUBCWF);
                    continue;
                case DMSGSW:
                    if (dmsg)
-                       adios (NULL, "only one draft message at a time!");
+                       die("only one draft message at a time!");
                    if (!(dmsg = *argp++) || *dmsg == '-')
                    if (!(dmsg = *argp++) || *dmsg == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
                case NDFLDSW: 
                    dfolder = NULL;
                    continue;
                case NDFLDSW: 
                    dfolder = NULL;
@@ -256,41 +256,41 @@ main (int argc, char **argv)
 
                case FROMSW:
                    if (!(cp = *argp++) || *cp == '-')
 
                case FROMSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    from = addlist(from, cp);
                    continue;
                case TOSW:
                    if (!(cp = *argp++) || *cp == '-')
                    from = addlist(from, cp);
                    continue;
                case TOSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    to = addlist(to, cp);
                    continue;
                case CCSW:
                    if (!(cp = *argp++) || *cp == '-')
                    to = addlist(to, cp);
                    continue;
                case CCSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    cc = addlist(cc, cp);
                    continue;
                case FCCSW:
                    if (!(cp = *argp++) || *cp == '-')
                    cc = addlist(cc, cp);
                    continue;
                case FCCSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    fcc = addlist(fcc, cp);
                    continue;
                case SUBJECTSW:
                    if (!(cp = *argp++) || *cp == '-')
                    fcc = addlist(fcc, cp);
                    continue;
                case SUBJECTSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    subject = mh_xstrdup(cp);
                    continue;
 
                case WIDTHSW:
                    if (!(cp = *argp++) || *cp == '-')
                    subject = mh_xstrdup(cp);
                    continue;
 
                case WIDTHSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    if ((outputlinelen = atoi(cp)) < 10)
                    if ((outputlinelen = atoi(cp)) < 10)
-                       adios (NULL, "impossible width %d", outputlinelen);
+                       die("impossible width %d", outputlinelen);
                    continue;
            }
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
                    continue;
            }
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else {
            app_msgarg(&msgs, cp);
             folder = pluspath (cp);
        } else {
            app_msgarg(&msgs, cp);
@@ -302,7 +302,7 @@ main (int argc, char **argv)
     if (!context_find ("path"))
        free (path ("./", TFOLDER));
     if (file && (msgs.size || folder))
     if (!context_find ("path"))
        free (path ("./", TFOLDER));
     if (file && (msgs.size || folder))
-       adios (NULL, "can't mix files and folders/msgs");
+       die("can't mix files and folders/msgs");
 
 try_it_again:
 
 
 try_it_again:
 
@@ -358,11 +358,11 @@ try_it_again:
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 1)))
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 1)))
-           adios (NULL, "unable to read folder %s", folder);
+           die("unable to read folder %s", folder);
 
        /* check for empty folder */
        if (mp->nummsg == 0)
 
        /* check for empty folder */
        if (mp->nummsg == 0)
-           adios (NULL, "no messages in %s", folder);
+           die("no messages in %s", folder);
 
        /* parse all the message ranges/sequences and set SELECTED */
        for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
        /* parse all the message ranges/sequences and set SELECTED */
        for (msgnum = 0; msgnum < msgs.size; msgnum++)
@@ -383,7 +383,7 @@ try_it_again:
            }
 
        if (! fwdmsg)
            }
 
        if (! fwdmsg)
-           adios (NULL, "Unable to find input message");
+           die("Unable to find input message");
     }
 
     if (filter && access (filter, R_OK) == NOTOK)
     }
 
     if (filter && access (filter, R_OK) == NOTOK)
index 1ae630d..b33b990 100644 (file)
@@ -121,7 +121,7 @@ build_form (char *form, char *digest, int *dat, char *from, char *to,
                goto finished;
 
            default:
                goto finished;
 
            default:
-               adios(NULL, "m_getfld2() returned %d", state);
+               die("m_getfld2() returned %d", state);
        }
     }
 
        }
     }
 
@@ -176,7 +176,7 @@ finished:
 
     cp = m_mktemp2(NULL, invo_name, NULL, &tmp);
     if (cp == NULL) {
 
     cp = m_mktemp2(NULL, invo_name, NULL, &tmp);
     if (cp == NULL) {
-       adios(NULL, "unable to create temporary file in %s", get_temp_dir());
+       die("unable to create temporary file in %s", get_temp_dir());
     }
     strncpy (tmpfil, cp, sizeof(tmpfil));
     (void) m_unlink (tmpfil);
     }
     strncpy (tmpfil, cp, sizeof(tmpfil));
     (void) m_unlink (tmpfil);
index 2032e67..c250c21 100644 (file)
@@ -109,7 +109,7 @@ main (int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
-               adios (NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW:
                snprintf (buf, sizeof(buf), "%s [switches] +folder command "
 
            case HELPSW:
                snprintf (buf, sizeof(buf), "%s [switches] +folder command "
@@ -122,15 +122,15 @@ main (int argc, char **argv)
 
            case HOSTSW:
                if (!(host = *argp++) || *host == '-')
 
            case HOSTSW:
                if (!(host = *argp++) || *host == '-')
-                   adios(NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            case PORTSW:
                if (!(port = *argp++) || *port == '-')
                continue;
            case PORTSW:
                if (!(port = *argp++) || *port == '-')
-                   adios(NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            case USERSW:
                if (!(user = *argp++) || *user == '-')
                continue;
            case USERSW:
                if (!(user = *argp++) || *user == '-')
-                   adios(NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
 
            case SNOOPSW:
                continue;
 
            case SNOOPSW:
@@ -147,11 +147,11 @@ main (int argc, char **argv)
                continue;
            case SASLMECHSW:
                if (!(saslmech = *argp++) || *saslmech == '-')
                continue;
            case SASLMECHSW:
                if (!(saslmech = *argp++) || *saslmech == '-')
-                   adios(NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            case AUTHSERVICESW:
                if (!(oauth_svc = *argp++) || *oauth_svc == '-')
                continue;
            case AUTHSERVICESW:
                if (!(oauth_svc = *argp++) || *oauth_svc == '-')
-                   adios(NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            case TLSSW:
                tls = true;
                continue;
            case TLSSW:
                tls = true;
@@ -174,7 +174,7 @@ main (int argc, char **argv)
            }
        } else if (*cp == '+') {
            if (*(cp + 1) == '\0')
            }
        } else if (*cp == '+') {
            if (*(cp + 1) == '\0')
-               adios(NULL, "Invalid null folder name");
+               die("Invalid null folder name");
            add_msg(0, "SELECT \"%s\"", cp + 1);
        } else {
            add_msg(0, "%s", cp);
            add_msg(0, "SELECT \"%s\"", cp + 1);
        } else {
            add_msg(0, "%s", cp);
@@ -182,7 +182,7 @@ main (int argc, char **argv)
     }
 
     if (! host)
     }
 
     if (! host)
-       adios(NULL, "A hostname must be given with -host");
+       die("A hostname must be given with -host");
 
     nsc = netsec_init();
 
 
     nsc = netsec_init();
 
@@ -196,7 +196,7 @@ main (int argc, char **argv)
 
     if (oauth_svc) {
        if (netsec_set_oauth_service(nsc, oauth_svc) != OK) {
 
     if (oauth_svc) {
        if (netsec_set_oauth_service(nsc, oauth_svc) != OK) {
-           adios(NULL, "OAuth2 not supported");
+           die("OAuth2 not supported");
        }
     }
 
        }
     }
 
@@ -204,7 +204,7 @@ main (int argc, char **argv)
        gettimeofday(&tv_start, NULL);
 
     if ((fd = client(host, port, buf, sizeof(buf), snoop)) == NOTOK)
        gettimeofday(&tv_start, NULL);
 
     if ((fd = client(host, port, buf, sizeof(buf), snoop)) == NOTOK)
-       adios(NULL, "Connect failed: %s", buf);
+       die("Connect failed: %s", buf);
 
     if (timestamp) {
        ts_report("Connect time", &tv_start);
 
     if (timestamp) {
        ts_report("Connect time", &tv_start);
@@ -216,20 +216,20 @@ main (int argc, char **argv)
 
     if (initialtls || tls) {
        if (netsec_set_tls(nsc, 1, 0, &errstr) != OK)
 
     if (initialtls || tls) {
        if (netsec_set_tls(nsc, 1, 0, &errstr) != OK)
-           adios(NULL, "%s", errstr);
+           die("%s", errstr);
 
        if (initialtls && netsec_negotiate_tls(nsc, &errstr) != OK)
 
        if (initialtls && netsec_negotiate_tls(nsc, &errstr) != OK)
-           adios(NULL, "%s", errstr);
+           die("%s", errstr);
     }
 
     if (sasl) {
        if (netsec_set_sasl_params(nsc, "imap", saslmech, imap_sasl_callback,
                                   nsc, &errstr) != OK)
     }
 
     if (sasl) {
        if (netsec_set_sasl_params(nsc, "imap", saslmech, imap_sasl_callback,
                                   nsc, &errstr) != OK)
-           adios(NULL, "%s", errstr);
+           die("%s", errstr);
     }
 
     if ((cp = netsec_readline(nsc, &len, &errstr)) == NULL) {
     }
 
     if ((cp = netsec_readline(nsc, &len, &errstr)) == NULL) {
-       adios(NULL, "%s", errstr);
+       die("%s", errstr);
     }
 
     if (has_prefix(cp, "* BYE")) {
     }
 
     if (has_prefix(cp, "* BYE")) {
@@ -295,7 +295,7 @@ main (int argc, char **argv)
            goto finish;
        }
        if (netsec_negotiate_tls(nsc, &errstr) != OK) {
            goto finish;
        }
        if (netsec_negotiate_tls(nsc, &errstr) != OK) {
-           adios(NULL, "%s", errstr);
+           die("%s", errstr);
        }
     }
 
        }
     }
 
index 552d793..6c49b3d 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -236,7 +236,7 @@ main (int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
-               adios (NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW:
                snprintf (buf, sizeof(buf), "%s [+folder] [switches]", invo_name);
 
            case HELPSW:
                snprintf (buf, sizeof(buf), "%s [+folder] [switches]", invo_name);
@@ -248,7 +248,7 @@ main (int argc, char **argv)
 
            case AUDSW:
                if (!(cp = *argp++) || *cp == '-')
 
            case AUDSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                audfile = mh_xstrdup(m_maildir(cp));
                continue;
            case NAUDSW:
                audfile = mh_xstrdup(m_maildir(cp));
                continue;
            case NAUDSW:
@@ -278,7 +278,7 @@ main (int argc, char **argv)
 
            case FILESW:
                if (!(cp = *argp++) || *cp == '-')
 
            case FILESW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                from = path (cp, TFILE);
 
                /*
                from = path (cp, TFILE);
 
                /*
@@ -298,34 +298,34 @@ main (int argc, char **argv)
 
            case FORMSW:
                if (!(form = *argp++) || *form == '-')
 
            case FORMSW:
                if (!(form = *argp++) || *form == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                format = NULL;
                continue;
            case FMTSW:
                if (!(format = *argp++) || *format == '-')
                format = NULL;
                continue;
            case FMTSW:
                if (!(format = *argp++) || *format == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                form = NULL;
                continue;
 
            case WIDTHSW:
                if (!(cp = *argp++) || *cp == '-')
                form = NULL;
                continue;
 
            case WIDTHSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                width = atoi (cp);
                continue;
 
            case HOSTSW:
                if (!(host = *argp++) || *host == '-')
                width = atoi (cp);
                continue;
 
            case HOSTSW:
                if (!(host = *argp++) || *host == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
 
            case PORTSW:
                if (!(port = *argp++) || *port == '-')
                continue;
 
            case PORTSW:
                if (!(port = *argp++) || *port == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
 
            case USERSW:
                if (!(user = *argp++) || *user == '-')
                continue;
 
            case USERSW:
                if (!(user = *argp++) || *user == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
 
            case SNOOPSW:
                continue;
 
            case SNOOPSW:
@@ -341,7 +341,7 @@ main (int argc, char **argv)
        
            case SASLMECHSW:
                if (!(saslmech = *argp++) || *saslmech == '-')
        
            case SASLMECHSW:
                if (!(saslmech = *argp++) || *saslmech == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
 
            case INITTLSSW:
                continue;
 
            case INITTLSSW:
@@ -363,24 +363,24 @@ main (int argc, char **argv)
            case AUTHSERVICESW:
 #ifdef OAUTH_SUPPORT
                 if (!(auth_svc = *argp++) || *auth_svc == '-')
            case AUTHSERVICESW:
 #ifdef OAUTH_SUPPORT
                 if (!(auth_svc = *argp++) || *auth_svc == '-')
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
 #else
 #else
-                adios (NULL, "not built with OAuth support");
+                die("not built with OAuth support");
 #endif
                 continue;
 
            case PROXYSW:
                if (!(proxy = *argp++) || *proxy == '-')
 #endif
                 continue;
 
            case PROXYSW:
                if (!(proxy = *argp++) || *proxy == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            }
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
                continue;
            }
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else {
             folder = pluspath (cp);
        } else {
-           adios (NULL, "usage: %s [+folder] [switches]", invo_name);
+           die("usage: %s [+folder] [switches]", invo_name);
        }
     }
 
        }
     }
 
@@ -402,11 +402,11 @@ main (int argc, char **argv)
 
        if (auth_svc == NULL) {
            if (saslmech  &&  ! strcasecmp(saslmech, "xoauth2")) {
 
        if (auth_svc == NULL) {
            if (saslmech  &&  ! strcasecmp(saslmech, "xoauth2")) {
-               adios (NULL, "must specify -authservice with -saslmech xoauth2");
+               die("must specify -authservice with -saslmech xoauth2");
            }
        } else {
            if (user == NULL) {
            }
        } else {
            if (user == NULL) {
-               adios (NULL, "must specify -user with -saslmech xoauth2");
+               die("must specify -user with -saslmech xoauth2");
            }
        }
 
            }
        }
 
@@ -421,15 +421,15 @@ main (int argc, char **argv)
         */
        if (pop_init (host, port, user, proxy, snoop, sasl, saslmech,
                      tlsflag, auth_svc) == NOTOK)
         */
        if (pop_init (host, port, user, proxy, snoop, sasl, saslmech,
                      tlsflag, auth_svc) == NOTOK)
-           adios (NULL, "%s", response);
+           die("%s", response);
 
        /* Check if there are any messages */
        if (pop_stat (&nmsgs, &nbytes) == NOTOK)
 
        /* Check if there are any messages */
        if (pop_stat (&nmsgs, &nbytes) == NOTOK)
-           adios (NULL, "%s", response);
+           die("%s", response);
 
        if (nmsgs == 0) {
            pop_quit();
 
        if (nmsgs == 0) {
            pop_quit();
-           adios (NULL, "no mail to incorporate");
+           die("no mail to incorporate");
        }
 
     } else if (inc_type == INC_FILE) {
        }
 
     } else if (inc_type == INC_FILE) {
@@ -444,7 +444,7 @@ main (int argc, char **argv)
            newmail = concat (MAILDIR, "/", MAILFIL, NULL);
        }
        if (stat (newmail, &s1) == NOTOK || s1.st_size == 0)
            newmail = concat (MAILDIR, "/", MAILFIL, NULL);
        }
        if (stat (newmail, &s1) == NOTOK || s1.st_size == 0)
-           adios (NULL, "no mail to incorporate");
+           die("no mail to incorporate");
        if (s1.st_mode & S_IFDIR) {
            DIR *md;
            struct dirent *de;
        if (s1.st_mode & S_IFDIR) {
            DIR *md;
            struct dirent *de;
@@ -453,13 +453,13 @@ main (int argc, char **argv)
            i = 0;
            cp = concat (newmail, "/new", NULL);
            if ((md = opendir(cp)) == NULL)
            i = 0;
            cp = concat (newmail, "/new", NULL);
            if ((md = opendir(cp)) == NULL)
-               adios (NULL, "unable to open %s", cp);
+               die("unable to open %s", cp);
            while ((de = readdir (md)) != NULL) {
                if (de->d_name[0] == '.')
                    continue;
                if (i >= num_maildir_entries) {
                    if ((Maildir = realloc(Maildir, sizeof(*Maildir) * (2*i+16))) == NULL)
            while ((de = readdir (md)) != NULL) {
                if (de->d_name[0] == '.')
                    continue;
                if (i >= num_maildir_entries) {
                    if ((Maildir = realloc(Maildir, sizeof(*Maildir) * (2*i+16))) == NULL)
-                       adios(NULL, "not enough memory for %d messages", 2*i+16);
+                       die("not enough memory for %d messages", 2*i+16);
                    num_maildir_entries = 2*i+16;
                }
                Maildir[i].filename = concat (cp, "/", de->d_name, NULL);
                    num_maildir_entries = 2*i+16;
                }
                Maildir[i].filename = concat (cp, "/", de->d_name, NULL);
@@ -472,13 +472,13 @@ main (int argc, char **argv)
            closedir (md);
            cp = concat (newmail, "/cur", NULL);
            if ((md = opendir(cp)) == NULL)
            closedir (md);
            cp = concat (newmail, "/cur", NULL);
            if ((md = opendir(cp)) == NULL)
-               adios (NULL, "unable to open %s", cp);
+               die("unable to open %s", cp);
            while ((de = readdir (md)) != NULL) {
                if (de->d_name[0] == '.')
                    continue;
                if (i >= num_maildir_entries) {
                    if ((Maildir = realloc(Maildir, sizeof(*Maildir) * (2*i+16))) == NULL)
            while ((de = readdir (md)) != NULL) {
                if (de->d_name[0] == '.')
                    continue;
                if (i >= num_maildir_entries) {
                    if ((Maildir = realloc(Maildir, sizeof(*Maildir) * (2*i+16))) == NULL)
-                       adios(NULL, "not enough memory for %d messages", 2*i+16);
+                       die("not enough memory for %d messages", 2*i+16);
                    num_maildir_entries = 2*i+16;
                }
                Maildir[i].filename = concat (cp, "/", de->d_name, NULL);
                    num_maildir_entries = 2*i+16;
                }
                Maildir[i].filename = concat (cp, "/", de->d_name, NULL);
@@ -490,7 +490,7 @@ main (int argc, char **argv)
            free (cp);
            closedir (md);
            if (i == 0)
            free (cp);
            closedir (md);
            if (i == 0)
-               adios (NULL, "no mail to incorporate");
+               die("no mail to incorporate");
            num_maildir_entries = i;
            qsort (Maildir, num_maildir_entries, sizeof(*Maildir), maildir_srt);
        }
            num_maildir_entries = i;
            qsort (Maildir, num_maildir_entries, sizeof(*Maildir), maildir_srt);
        }
@@ -521,7 +521,7 @@ main (int argc, char **argv)
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 0)))
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 0)))
-       adios (NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     if (inc_type == INC_FILE && Maildir == NULL) {
         /* Mail from a spool file. */
 
     if (inc_type == INC_FILE && Maildir == NULL) {
         /* Mail from a spool file. */
@@ -539,7 +539,7 @@ main (int argc, char **argv)
             in = lkfopenspool (newmail, "r");
             DROPGROUPPRIVS();
             if (in == NULL)
             in = lkfopenspool (newmail, "r");
             DROPGROUPPRIVS();
             if (in == NULL)
-               adios (NULL, "unable to lock and fopen %s", newmail);
+               die("unable to lock and fopen %s", newmail);
            fstat (fileno(in), &s1);
        } else {
            trnflag = 0;
            fstat (fileno(in), &s1);
        } else {
            trnflag = 0;
@@ -601,7 +601,7 @@ main (int argc, char **argv)
             pc.written = 0;
             pc.mailout = pf;
             if (pop_retr(i, pop_action, &pc) == NOTOK)
             pc.written = 0;
             pc.mailout = pf;
             if (pop_retr(i, pop_action, &pc) == NOTOK)
-                adios (NULL, "%s", response);
+                die("%s", response);
 
             if (fflush (pf))
                 adios (cp, "write error on");
 
             if (fflush (pf))
                 adios (cp, "write error on");
@@ -644,13 +644,13 @@ main (int argc, char **argv)
             free (cp);
 
            if (trnflag && pop_dele (i) == NOTOK)
             free (cp);
 
            if (trnflag && pop_dele (i) == NOTOK)
-               adios (NULL, "%s", response);
+               die("%s", response);
 
            scan_finished();
        }
 
        if (pop_quit () == NOTOK)
 
            scan_finished();
        }
 
        if (pop_quit () == NOTOK)
-           adios (NULL, "%s", response);
+           die("%s", response);
 
     } else if (inc_type == INC_FILE && Maildir == NULL) {
         /* Mail from a spool file. */
 
     } else if (inc_type == INC_FILE && Maildir == NULL) {
         /* Mail from a spool file. */
@@ -810,7 +810,7 @@ main (int argc, char **argv)
        } else {
            fclose (in); in = NULL;
        }
        } else {
            fclose (in); in = NULL;
        }
-       adios (NULL, "failed");
+       die("failed");
     }
 
     if (aud)
     }
 
     if (aud)
index 3a1fa2a..fb01e8d 100644 (file)
@@ -55,7 +55,7 @@ main (int argc, char **argv)
                    ambigsw (dp, switches);
                    done (1);
                case UNKWNSW:
                    ambigsw (dp, switches);
                    done (1);
                case UNKWNSW:
-                   adios (NULL, "-%s unknown\n", dp);
+                   die("-%s unknown\n", dp);
 
                case HELPSW:
                    snprintf (buf, sizeof(buf), "%s [switches]", invo_name);
 
                case HELPSW:
                    snprintf (buf, sizeof(buf), "%s [switches]", invo_name);
@@ -74,7 +74,7 @@ main (int argc, char **argv)
                    continue;
            }
        } else {
                    continue;
            }
        } else {
-           adios (NULL, "%s is invalid argument", dp);
+           die("%s is invalid argument", dp);
        }
     }
 
        }
     }
 
@@ -85,7 +85,7 @@ main (int argc, char **argv)
 
     if ((mypath = getenv("HOME")) == NULL) {
        if ((pw = getpwuid(getuid())) == NULL || *pw->pw_dir == '\0')
 
     if ((mypath = getenv("HOME")) == NULL) {
        if ((pw = getpwuid(getuid())) == NULL || *pw->pw_dir == '\0')
-           adios(NULL, "cannot determine your home directory");
+           die("cannot determine your home directory");
         mypath = pw->pw_dir;
     }
 
         mypath = pw->pw_dir;
     }
 
@@ -111,8 +111,8 @@ main (int argc, char **argv)
        if (check)
            done(0);
        if (autof)
        if (check)
            done(0);
        if (autof)
-           adios (NULL, "invocation error");
-        adios (NULL, "You already have an nmh profile, use an editor to modify it");
+           die("invocation error");
+        die("You already have an nmh profile, use an editor to modify it");
     }
     if (check)
        done(1);
     }
     if (check)
        done(1);
@@ -168,7 +168,7 @@ query:
        cp = concat ("\"", pathname, "\" doesn't exist; Create it? ", NULL);
        if (autof || read_switch (cp, anoyes))
            if (makedir (pathname) == 0)
        cp = concat ("\"", pathname, "\" doesn't exist; Create it? ", NULL);
        if (autof || read_switch (cp, anoyes))
            if (makedir (pathname) == 0)
-               adios (NULL, "unable to create %s", pathname);
+               die("unable to create %s", pathname);
     } else {
        puts("[Using existing directory]");
     }
     } else {
        puts("[Using existing directory]");
     }
index 1c92caf..00cc2fb 100644 (file)
@@ -67,7 +67,7 @@ main (int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW: 
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW: 
-               adios (NULL, "-%s unknown\n", cp);
+               die("-%s unknown\n", cp);
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
@@ -93,7 +93,7 @@ main (int argc, char **argv)
 
            case SEQSW: 
                if (!(cp = *argp++) || *cp == '-')
 
            case SEQSW: 
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
 
                svector_push_back (seqs, cp);
                seqp++;
 
                svector_push_back (seqs, cp);
                seqp++;
@@ -120,7 +120,7 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else
             app_msgarg(&msgs, cp);
             folder = pluspath (cp);
        } else
             app_msgarg(&msgs, cp);
@@ -151,7 +151,7 @@ main (int argc, char **argv)
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
-       adios (NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     /* print some general debugging info */
     if (debugsw)
 
     /* print some general debugging info */
     if (debugsw)
@@ -159,7 +159,7 @@ main (int argc, char **argv)
 
     /* check for empty folder */
     if (mp->nummsg == 0)
 
     /* check for empty folder */
     if (mp->nummsg == 0)
-       adios (NULL, "no messages in %s", folder);
+       die("no messages in %s", folder);
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
@@ -167,14 +167,14 @@ main (int argc, char **argv)
            done (1);
 
     if (publicsw == 1 && is_readonly(mp))
            done (1);
 
     if (publicsw == 1 && is_readonly(mp))
-       adios (NULL, "folder %s is read-only, so -public not allowed", folder);
+       die("folder %s is read-only, so -public not allowed", folder);
 
     /*
      * Make sure at least one sequence has been
      * specified if we are adding or deleting.
      */
     if (seqp == 0 && (addsw || deletesw))
 
     /*
      * Make sure at least one sequence has been
      * specified if we are adding or deleting.
      */
     if (seqp == 0 && (addsw || deletesw))
-       adios (NULL, "-%s requires at least one -sequence argument",
+       die("-%s requires at least one -sequence argument",
               addsw ? "add" : "delete");
 
     /* Adding messages to sequences */
               addsw ? "add" : "delete");
 
     /* Adding messages to sequences */
index 07074d7..c506432 100644 (file)
@@ -110,7 +110,7 @@ main (int argc, char **argv)
     while ((cp = *argp++)) {
        if (cp[0] == '-' && cp[1] == '\0') {
            if (compfile)
     while ((cp = *argp++)) {
        if (cp[0] == '-' && cp[1] == '\0') {
            if (compfile)
-               adios (NULL, "cannot specify both standard input and a file");
+               die("cannot specify both standard input and a file");
             compfile = cp;
            listsw = 0;         /* turn off -list if using standard in/out */
            verbosw = 0;        /* turn off -verbose listings */
             compfile = cp;
            listsw = 0;         /* turn off -list if using standard in/out */
            verbosw = 0;        /* turn off -verbose listings */
@@ -122,7 +122,7 @@ main (int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW: 
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW: 
-               adios (NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [switches] file", invo_name);
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [switches] file", invo_name);
@@ -153,13 +153,13 @@ main (int argc, char **argv)
                icachesw = &wcachesw;
            do_cache: ;
                if (!(cp = *argp++) || *cp == '-')
                icachesw = &wcachesw;
            do_cache: ;
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                switch (*icachesw = smatch (cp, cache_policy)) {
                case AMBIGSW:
                    ambigsw (cp, cache_policy);
                    done (1);
                case UNKWNSW:
                switch (*icachesw = smatch (cp, cache_policy)) {
                case AMBIGSW:
                    ambigsw (cp, cache_policy);
                    done (1);
                case UNKWNSW:
-                   adios (NULL, "%s unknown", cp);
+                   die("%s unknown", cp);
                default:
                    break;
                }
                default:
                    break;
                }
@@ -218,13 +218,13 @@ main (int argc, char **argv)
                int encoding;
 
                if (!(cp = *argp++) || *cp == '-')
                int encoding;
 
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                switch (encoding = smatch (cp, encodingswitches)) {
                case AMBIGSW:
                    ambigsw (cp, encodingswitches);
                    done (1);
                case UNKWNSW:
                switch (encoding = smatch (cp, encodingswitches)) {
                case AMBIGSW:
                    ambigsw (cp, encodingswitches);
                    done (1);
                case UNKWNSW:
-                   adios (NULL, "%s unknown encoding algorithm", cp);
+                   die("%s unknown encoding algorithm", cp);
                case BASE64SW:
                    header_encoding = CE_BASE64;
                    break;
                case BASE64SW:
                    header_encoding = CE_BASE64;
                    break;
@@ -235,7 +235,7 @@ main (int argc, char **argv)
                    header_encoding = CE_8BIT;
                    break;
                default:
                    header_encoding = CE_8BIT;
                    break;
                default:
-                   adios (NULL, "Internal error: algorithm %s", cp);
+                   die("Internal error: algorithm %s", cp);
                }
                continue;
            }
                }
                continue;
            }
@@ -246,11 +246,11 @@ main (int argc, char **argv)
 
            case MAXUNENCSW:
                if (!(cp = *argp++) || *cp == '-')
 
            case MAXUNENCSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                if ((maxunencoded = atoi(cp)) < 1)
                if ((maxunencoded = atoi(cp)) < 1)
-                   adios (NULL, "Invalid argument for %s: %s", argp[-2], cp);
+                   die("Invalid argument for %s: %s", argp[-2], cp);
                if (maxunencoded > 998)
                if (maxunencoded > 998)
-                   adios (NULL, "limit of -maxunencoded is 998");
+                   die("limit of -maxunencoded is 998");
                continue;
 
            case VERBSW: 
                continue;
 
            case VERBSW: 
@@ -274,7 +274,7 @@ main (int argc, char **argv)
            }
        }
        if (compfile)
            }
        }
        if (compfile)
-           adios (NULL, "only one composition file allowed");
+           die("only one composition file allowed");
         compfile = cp;
     }
 
         compfile = cp;
     }
 
@@ -312,14 +312,14 @@ main (int argc, char **argv)
 
     /* Check if we have a file to process */
     if (!compfile)
 
     /* Check if we have a file to process */
     if (!compfile)
-       adios (NULL, "need to specify a %s composition file", invo_name);
+       die("need to specify a %s composition file", invo_name);
 
     /*
      * Process the composition file from standard input.
      */
     if (compfile[0] == '-' && compfile[1] == '\0') {
        if ((cp = m_mktemp2(NULL, invo_name, NULL, &fp)) == NULL) {
 
     /*
      * Process the composition file from standard input.
      */
     if (compfile[0] == '-' && compfile[1] == '\0') {
        if ((cp = m_mktemp2(NULL, invo_name, NULL, &fp)) == NULL) {
-           adios(NULL, "unable to create temporary file in %s",
+           die("unable to create temporary file in %s",
                  get_temp_dir());
        }
        strncpy (infile, cp, sizeof(infile));
                  get_temp_dir());
        }
        strncpy (infile, cp, sizeof(infile));
@@ -327,7 +327,7 @@ main (int argc, char **argv)
        /* copy standard input to temporary file */
        while ((n = fread(buffer, 1, sizeof(buffer), stdin)) > 0) {
            if (fwrite(buffer, 1, n, fp) != n) {
        /* copy standard input to temporary file */
        while ((n = fread(buffer, 1, sizeof(buffer), stdin)) > 0) {
            if (fwrite(buffer, 1, n, fp) != n) {
-               adios (NULL, "error copying to temporary file");
+               die("error copying to temporary file");
            }
        }
        fclose (fp);
            }
        }
        fclose (fp);
@@ -343,11 +343,11 @@ main (int argc, char **argv)
 
        if (!ct) {
            if (! (fp = fopen(infile, "r"))) {
 
        if (!ct) {
            if (! (fp = fopen(infile, "r"))) {
-               adios(NULL, "Unable to open %s for reading", infile);
+               die("Unable to open %s for reading", infile);
            }
            while ((n = fread(buffer, 1, sizeof(buffer), fp)) > 0) {
                if (fwrite(buffer, 1, n, stdout) != n) {
            }
            while ((n = fread(buffer, 1, sizeof(buffer), fp)) > 0) {
                if (fwrite(buffer, 1, n, stdout) != n) {
-                   adios(NULL, "error copying %s to stdout", infile);
+                   die("error copying %s to stdout", infile);
                }
            }
        } else {
                }
            }
        } else {
@@ -380,7 +380,7 @@ main (int argc, char **argv)
 
     /* output MIME message to this temporary file */
     if ((cp = m_mktemp2(compfile, invo_name, NULL, &fp_out)) == NULL) {
 
     /* output MIME message to this temporary file */
     if ((cp = m_mktemp2(compfile, invo_name, NULL, &fp_out)) == NULL) {
-       adios(NULL, "unable to create temporary file");
+       die("unable to create temporary file");
     }
     strncpy(outfile, cp, sizeof(outfile));
 
     }
     strncpy(outfile, cp, sizeof(outfile));
 
index ba96ac4..6ab9564 100644 (file)
@@ -177,7 +177,7 @@ build_mime (char *infile, int autobuild, int dist, int directives,
                    free (ct);
                    return NULL;
                }
                    free (ct);
                    return NULL;
                }
-                adios (NULL, "draft shouldn't contain %s: field", name);
+                die("draft shouldn't contain %s: field", name);
            }
 
            /* ignore any Content-Type fields in the header */
            }
 
            /* ignore any Content-Type fields in the header */
@@ -259,7 +259,7 @@ build_mime (char *infile, int autobuild, int dist, int directives,
                 if (convert) {
                     if (convert->filename  &&
                         strcasecmp (convert->filename, filename)) {
                 if (convert) {
                     if (convert->filename  &&
                         strcasecmp (convert->filename, filename)) {
-                        adios (NULL, "Multiple %s headers with different files"
+                        die("Multiple %s headers with different files"
                                " not allowed", type);
                     } else {
                         convert->filename = mh_xstrdup(filename);
                                " not allowed", type);
                     } else {
                         convert->filename = mh_xstrdup(filename);
@@ -299,7 +299,7 @@ build_mime (char *infile, int autobuild, int dist, int directives,
                 if (convert) {
                     if (convert->argstring  &&
                         strcasecmp (convert->argstring, argstring)) {
                 if (convert) {
                     if (convert->argstring  &&
                         strcasecmp (convert->argstring, argstring)) {
-                        adios (NULL, "Multiple %s headers with different "
+                        die("Multiple %s headers with different "
                                "argstrings not allowed", type);
                     } else {
                         convert->argstring = mh_xstrdup(argstring);
                                "argstrings not allowed", type);
                     } else {
                         convert->argstring = mh_xstrdup(argstring);
@@ -335,10 +335,10 @@ finish_field:
 
        case LENERR:
        case FMTERR:
 
        case LENERR:
        case FMTERR:
-           adios (NULL, "message format error in component #%d", compnum);
+           die("message format error in component #%d", compnum);
 
        default:
 
        default:
-           adios (NULL, "getfld() returned %d", state);
+           die("getfld() returned %d", state);
        }
        break;
     }
        }
        break;
     }
@@ -352,7 +352,7 @@ finish_field:
 
         for (hp = ct->c_first_hf; hp != NULL; hp = hp->next) {
             if (encode_rfc2047(hp->name, &hp->value, header_encoding, NULL)) {
 
         for (hp = ct->c_first_hf; hp != NULL; hp = hp->next) {
             if (encode_rfc2047(hp->name, &hp->value, header_encoding, NULL)) {
-                adios(NULL, "Unable to encode header \"%s\"", hp->name);
+                die("Unable to encode header \"%s\"", hp->name);
             }
         }
     }
             }
         }
     }
@@ -455,7 +455,7 @@ finish_field:
         /* Extract the type part (as a CT) from filename. */
         cts = mh_xcalloc(2, sizeof *cts);
         if (! (cts[0] = parse_mime (convert_head->filename))) {
         /* Extract the type part (as a CT) from filename. */
         cts = mh_xcalloc(2, sizeof *cts);
         if (! (cts[0] = parse_mime (convert_head->filename))) {
-            adios (NULL, "failed to parse %s", convert_head->filename);
+            die("failed to parse %s", convert_head->filename);
         }
 
         expand_pseudoheaders (cts[0], m, infile, convert_head);
         }
 
         expand_pseudoheaders (cts[0], m, infile, convert_head);
@@ -543,7 +543,7 @@ finish_field:
     compose_content (ct, verbose);
 
     if ((cp = strchr(prefix, 'a')) == NULL)
     compose_content (ct, verbose);
 
     if ((cp = strchr(prefix, 'a')) == NULL)
-       adios (NULL, "internal error(4)");
+       die("internal error(4)");
 
     /*
      * If using EAI, force 8-bit charset.
 
     /*
      * If using EAI, force 8-bit charset.
@@ -562,7 +562,7 @@ finish_field:
            (*cp)++;
         } else {
            if (*++cp == 0)
            (*cp)++;
         } else {
            if (*++cp == 0)
-               adios (NULL, "giving up trying to find a unique delimiter string");
+               die("giving up trying to find a unique delimiter string");
             (*cp)++;
        }
     }
             (*cp)++;
        }
     }
@@ -713,7 +713,7 @@ user_content (FILE *in, char *buf, CT *ctp, const char *infilename)
 again_descr:
                ct->c_descr = add (buffer + i + 1, ct->c_descr);
                if (!fgetstr (buffer, sizeof(buffer) - 1, in))
 again_descr:
                ct->c_descr = add (buffer + i + 1, ct->c_descr);
                if (!fgetstr (buffer, sizeof(buffer) - 1, in))
-                   adios (NULL, "end-of-file after %s: field in plaintext", DESCR_FIELD);
+                   die("end-of-file after %s: field in plaintext", DESCR_FIELD);
                switch (buffer[0]) {
                case ' ':
                case '\t':
                switch (buffer[0]) {
                case ' ':
                case '\t':
@@ -721,7 +721,7 @@ again_descr:
                    goto again_descr;
 
                case '#':
                    goto again_descr;
 
                case '#':
-                   adios (NULL, "#-directive after %s: field in plaintext", DESCR_FIELD);
+                   die("#-directive after %s: field in plaintext", DESCR_FIELD);
                    /* NOTREACHED */
 
                default:
                    /* NOTREACHED */
 
                default:
@@ -736,7 +736,7 @@ again_descr:
 again_dispo:
                ct->c_dispo = add (buffer + i + 1, ct->c_dispo);
                if (!fgetstr (buffer, sizeof(buffer) - 1, in))
 again_dispo:
                ct->c_dispo = add (buffer + i + 1, ct->c_dispo);
                if (!fgetstr (buffer, sizeof(buffer) - 1, in))
-                   adios (NULL, "end-of-file after %s: field in plaintext", DISPO_FIELD);
+                   die("end-of-file after %s: field in plaintext", DISPO_FIELD);
                switch (buffer[0]) {
                case ' ':
                case '\t':
                switch (buffer[0]) {
                case ' ':
                case '\t':
@@ -744,7 +744,7 @@ again_dispo:
                    goto again_dispo;
 
                case '#':
                    goto again_dispo;
 
                case '#':
-                   adios (NULL, "#-directive after %s: field in plaintext", DISPO_FIELD);
+                   die("#-directive after %s: field in plaintext", DISPO_FIELD);
                    /* NOTREACHED */
 
                default:
                    /* NOTREACHED */
 
                default:
@@ -796,7 +796,7 @@ rock_and_roll:
            }
            /* FALLTHRU */
        case CT_MULTIPART:
            }
            /* FALLTHRU */
        case CT_MULTIPART:
-           adios (NULL, "it doesn't make sense to define an in-line %s content",
+           die("it doesn't make sense to define an in-line %s content",
                   ct->c_type == CT_MESSAGE ? "message" : "multipart");
            /* NOTREACHED */
 
                   ct->c_type == CT_MESSAGE ? "message" : "multipart");
            /* NOTREACHED */
 
@@ -838,24 +838,23 @@ call_init:
      */
     if (s2i->si_key) {
        if (!ci->ci_subtype)
      */
     if (s2i->si_key) {
        if (!ci->ci_subtype)
-           adios (NULL, "missing subtype in \"#%s\"", ci->ci_type);
+           die("missing subtype in \"#%s\"", ci->ci_type);
 
        switch (ct->c_type = s2i->si_val) {
        case CT_MULTIPART:
 
        switch (ct->c_type = s2i->si_val) {
        case CT_MULTIPART:
-           adios (NULL, "use \"#begin ... #end\" instead of \"#%s/%s\"",
+           die("use \"#begin ... #end\" instead of \"#%s/%s\"",
                   ci->ci_type, ci->ci_subtype);
            /* NOTREACHED */
 
        case CT_MESSAGE:
            if (!strcasecmp (ci->ci_subtype, "partial"))
                   ci->ci_type, ci->ci_subtype);
            /* NOTREACHED */
 
        case CT_MESSAGE:
            if (!strcasecmp (ci->ci_subtype, "partial"))
-               adios (NULL, "sorry, \"#%s/%s\" isn't supported",
+               die("sorry, \"#%s/%s\" isn't supported",
                       ci->ci_type, ci->ci_subtype);
            if (!strcasecmp (ci->ci_subtype, "external-body"))
                       ci->ci_type, ci->ci_subtype);
            if (!strcasecmp (ci->ci_subtype, "external-body"))
-               adios (NULL, "use \"#@type/subtype ... [] ...\" instead of \"#%s/%s\"",
+               die("use \"#@type/subtype ... [] ...\" instead of \"#%s/%s\"",
                       ci->ci_type, ci->ci_subtype);
 use_forw:
                       ci->ci_type, ci->ci_subtype);
 use_forw:
-           adios (NULL,
-                  "use \"#forw [+folder] [msgs]\" instead of \"#%s/%s\"",
+           die(                   "use \"#forw [+folder] [msgs]\" instead of \"#%s/%s\"",
                   ci->ci_type, ci->ci_subtype);
            /* NOTREACHED */
 
                   ci->ci_type, ci->ci_subtype);
            /* NOTREACHED */
 
@@ -873,7 +872,7 @@ use_forw:
            CT p;
 
            if (!ci->ci_magic)
            CT p;
 
            if (!ci->ci_magic)
-               adios (NULL, "need external information for \"#@%s/%s\"",
+               die("need external information for \"#@%s/%s\"",
                       ci->ci_type, ci->ci_subtype);
            p = ct;
 
                       ci->ci_type, ci->ci_subtype);
            p = ct;
 
@@ -915,7 +914,7 @@ use_forw:
                for (cp = ci->ci_magic + 1; isspace ((unsigned char) *cp); cp++)
                    continue;
                if (!*cp)
                for (cp = ci->ci_magic + 1; isspace ((unsigned char) *cp); cp++)
                    continue;
                if (!*cp)
-                   adios (NULL, "empty pipe command for #%s directive", ci->ci_type);
+                   die("empty pipe command for #%s directive", ci->ci_type);
                cp = mh_xstrdup(cp);
                free (ci->ci_magic);
                ci->ci_magic = cp;
                cp = mh_xstrdup(cp);
                free (ci->ci_magic);
                ci->ci_magic = cp;
@@ -945,7 +944,7 @@ use_forw:
     }
 
     if (extrnal)
     }
 
     if (extrnal)
-       adios (NULL, "external definition not allowed for \"#%s\"", ci->ci_type);
+       die("external definition not allowed for \"#%s\"", ci->ci_type);
 
     /*
      * Message directive
 
     /*
      * Message directive
@@ -970,7 +969,7 @@ use_forw:
            cp = *ap;
            if (*cp == '+' || *cp == '@') {
                if (folder)
            cp = *ap;
            if (*cp == '+' || *cp == '@') {
                if (folder)
-                   adios (NULL, "only one folder per #forw directive");
+                   die("only one folder per #forw directive");
                 folder = pluspath (cp);
            }
        }
                 folder = pluspath (cp);
            }
        }
@@ -980,7 +979,7 @@ use_forw:
            folder = mh_xstrdup(getfolder(1));
 
        if (!(mp = folder_read (folder, 0)))
            folder = mh_xstrdup(getfolder(1));
 
        if (!(mp = folder_read (folder, 0)))
-           adios (NULL, "unable to read folder %s", folder);
+           die("unable to read folder %s", folder);
        for (ap = arguments; *ap; ap++) {
            cp = *ap;
            if (*cp != '+' && *cp != '@')
        for (ap = arguments; *ap; ap++) {
            cp = *ap;
            if (*cp != '+' && *cp != '@')
@@ -1096,7 +1095,7 @@ use_forw:
 
            if (user_content (in, buffer, &p, infilename) == DONE) {
                if (!m->mp_parts)
 
            if (user_content (in, buffer, &p, infilename) == DONE) {
                if (!m->mp_parts)
-                   adios (NULL, "empty \"#begin ... #end\" sequence");
+                   die("empty \"#begin ... #end\" sequence");
                return OK;
            }
            if (!p)
                return OK;
            }
            if (!p)
@@ -1114,7 +1113,7 @@ use_forw:
     /*
      * Unknown directive
      */
     /*
      * Unknown directive
      */
-    adios (NULL, "unknown directive \"#%s\"", ci->ci_type);
+    die("unknown directive \"#%s\"", ci->ci_type);
     return NOTOK;      /* NOT REACHED */
 }
 
     return NOTOK;      /* NOT REACHED */
 }
 
@@ -1230,7 +1229,7 @@ compose_content (CT ct, int verbose)
             char *tfile = NULL;
 
            if (!(cp = ci->ci_magic))
             char *tfile = NULL;
 
            if (!(cp = ci->ci_magic))
-               adios (NULL, "internal error(5)");
+               die("internal error(5)");
 
            if ((tfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
                adios("mhbuildsbr", "unable to create temporary file in %s",
 
            if ((tfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
                adios("mhbuildsbr", "unable to create temporary file in %s",
@@ -1537,7 +1536,7 @@ scan_content (CT ct, size_t maxunencoded)
 
            if (checkllinelen && !linelen &&
                                        (gotlen > MAXLONGLINE + 1)) {
 
            if (checkllinelen && !linelen &&
                                        (gotlen > MAXLONGLINE + 1)) {
-               adios(NULL, "Line in content exceeds maximum line limit (%d)",
+               die("Line in content exceeds maximum line limit (%d)",
                      MAXLONGLINE);
            }
 
                      MAXLONGLINE);
            }
 
@@ -1681,7 +1680,7 @@ build_headers (CT ct, int header_encoding)
        char *s = output_params(len, ci->ci_first_pm, &len, mailbody);
 
        if (!s)
        char *s = output_params(len, ci->ci_first_pm, &len, mailbody);
 
        if (!s)
-           adios(NULL, "Internal error: failed outputting Content-Type "
+           die("Internal error: failed outputting Content-Type "
                "parameters");
 
        vp = add (s, vp);
                "parameters");
 
        vp = add (s, vp);
@@ -1725,7 +1724,7 @@ build_headers (CT ct, int header_encoding)
        vp = concat (" ", ct->c_descr, NULL);
        if (header_encoding != CE_8BIT) {
            if (encode_rfc2047(DESCR_FIELD, &vp, header_encoding, NULL)) {
        vp = concat (" ", ct->c_descr, NULL);
        if (header_encoding != CE_8BIT) {
            if (encode_rfc2047(DESCR_FIELD, &vp, header_encoding, NULL)) {
-               adios(NULL, "Unable to encode %s header", DESCR_FIELD);
+               die("Unable to encode %s header", DESCR_FIELD);
            }
        }
        add_header (ct, np, vp);
            }
        }
        add_header (ct, np, vp);
@@ -1788,7 +1787,7 @@ skip_headers:
 
     case CE_QUOTED:
        if (ct->c_type == CT_MESSAGE || ct->c_type == CT_MULTIPART)
 
     case CE_QUOTED:
        if (ct->c_type == CT_MESSAGE || ct->c_type == CT_MULTIPART)
-           adios (NULL, "internal error, invalid encoding");
+           die("internal error, invalid encoding");
 
        np = mh_xstrdup(ENCODING_FIELD);
        vp = concat (" ", "quoted-printable", "\n", NULL);
 
        np = mh_xstrdup(ENCODING_FIELD);
        vp = concat (" ", "quoted-printable", "\n", NULL);
@@ -1797,7 +1796,7 @@ skip_headers:
 
     case CE_BASE64:
        if (ct->c_type == CT_MESSAGE || ct->c_type == CT_MULTIPART)
 
     case CE_BASE64:
        if (ct->c_type == CT_MESSAGE || ct->c_type == CT_MULTIPART)
-           adios (NULL, "internal error, invalid encoding");
+           die("internal error, invalid encoding");
 
        np = mh_xstrdup(ENCODING_FIELD);
        vp = concat (" ", "base64", "\n", NULL);
 
        np = mh_xstrdup(ENCODING_FIELD);
        vp = concat (" ", "base64", "\n", NULL);
@@ -1806,7 +1805,7 @@ skip_headers:
 
     case CE_BINARY:
        if (ct->c_type == CT_MESSAGE)
 
     case CE_BINARY:
        if (ct->c_type == CT_MESSAGE)
-           adios (NULL, "internal error, invalid encoding");
+           die("internal error, invalid encoding");
 
        np = mh_xstrdup(ENCODING_FIELD);
        vp = concat (" ", "binary", "\n", NULL);
 
        np = mh_xstrdup(ENCODING_FIELD);
        vp = concat (" ", "binary", "\n", NULL);
@@ -1814,7 +1813,7 @@ skip_headers:
        break;
 
     default:
        break;
 
     default:
-       adios (NULL, "unknown transfer encoding in content");
+       die("unknown transfer encoding in content");
        break;
     }
 
        break;
     }
 
@@ -1963,7 +1962,7 @@ setup_attach_content(CT ct, char *filename)
     PM pm;
 
     if (! (type = mime_type(filename))) {
     PM pm;
 
     if (! (type = mime_type(filename))) {
-       adios(NULL, "Unable to determine MIME type of \"%s\"", filename);
+       die("Unable to determine MIME type of \"%s\"", filename);
     }
 
     /*
     }
 
     /*
@@ -1990,15 +1989,15 @@ setup_attach_content(CT ct, char *filename)
 
     switch (ct->c_type = s2i->si_val) {
     case CT_MULTIPART:
 
     switch (ct->c_type = s2i->si_val) {
     case CT_MULTIPART:
-       adios (NULL, "multipart types must be specified by mhbuild directives");
+       die("multipart types must be specified by mhbuild directives");
        /* NOTREACHED */
 
     case CT_MESSAGE:
        if (strcasecmp(ct->c_ctinfo.ci_subtype, "partial") == 0)
        /* NOTREACHED */
 
     case CT_MESSAGE:
        if (strcasecmp(ct->c_ctinfo.ci_subtype, "partial") == 0)
-           adios(NULL, "Sorry, %s/%s isn't supported", ct->c_ctinfo.ci_type,
+           die("Sorry, %s/%s isn't supported", ct->c_ctinfo.ci_type,
                ct->c_ctinfo.ci_subtype);
        if (strcasecmp(ct->c_ctinfo.ci_subtype, "external-body") == 0)
                ct->c_ctinfo.ci_subtype);
        if (strcasecmp(ct->c_ctinfo.ci_subtype, "external-body") == 0)
-           adios(NULL, "external-body messages must be specified "
+           die("external-body messages must be specified "
                "by mhbuild directives");
        /* FALLTHRU */
 
                "by mhbuild directives");
        /* FALLTHRU */
 
@@ -2094,7 +2093,7 @@ set_charset (CT ct, int contains8bit) {
 
             if (contains8bit == 1  &&
                 strcasecmp (eightbitcharset, "US-ASCII") == 0) {
 
             if (contains8bit == 1  &&
                 strcasecmp (eightbitcharset, "US-ASCII") == 0) {
-                adios (NULL, "Text content contains 8 bit characters, but "
+                die("Text content contains 8 bit characters, but "
                        "character set is US-ASCII");
             }
 
                        "character set is US-ASCII");
             }
 
@@ -2430,7 +2429,7 @@ extract_headers (CT ct, char *reply_file, FILE **reply_fp) {
         ct->c_subtype = TEXT_PLAIN;
         if (get_ctinfo ("text/plain", ct, 0) == NOTOK) {
             /* This never should fail, but just in case. */
         ct->c_subtype = TEXT_PLAIN;
         if (get_ctinfo ("text/plain", ct, 0) == NOTOK) {
             /* This never should fail, but just in case. */
-            adios (NULL, "unable to get content info for reply");
+            die("unable to get content info for reply");
         }
     }
 
         }
     }
 
index 486c7cc..cbfc08c 100644 (file)
@@ -159,7 +159,7 @@ main (int argc, char **argv) {
                 ambigsw (cp, switches);
                 done (1);
             case UNKWNSW:
                 ambigsw (cp, switches);
                 done (1);
             case UNKWNSW:
-                adios (NULL, "-%s unknown", cp);
+                die("-%s unknown", cp);
 
             case HELPSW:
                 snprintf (buf, sizeof buf, "%s [+folder] [msgs] [switches]",
 
             case HELPSW:
                 snprintf (buf, sizeof buf, "%s [+folder] [msgs] [switches]",
@@ -172,7 +172,7 @@ main (int argc, char **argv) {
 
             case DECODETEXTSW:
                 if (! (cp = *argp++)  ||  *cp == '-') {
 
             case DECODETEXTSW:
                 if (! (cp = *argp++)  ||  *cp == '-') {
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 }
                 if (! strcasecmp (cp, "8bit")) {
                     fx.decodetext = CE_8BIT;
                 }
                 if (! strcasecmp (cp, "8bit")) {
                     fx.decodetext = CE_8BIT;
@@ -181,7 +181,7 @@ main (int argc, char **argv) {
                 } else if (! strcasecmp (cp, "binary")) {
                     fx.decodetext = CE_BINARY;
                 } else {
                 } else if (! strcasecmp (cp, "binary")) {
                     fx.decodetext = CE_BINARY;
                 } else {
-                    adios (NULL, "invalid argument to %s", argp[-2]);
+                    die("invalid argument to %s", argp[-2]);
                 }
                 continue;
             case NDECODETEXTSW:
                 }
                 continue;
             case NDECODETEXTSW:
@@ -189,7 +189,7 @@ main (int argc, char **argv) {
                 continue;
             case DECODETYPESW:
                 if (! (cp = *argp++)  ||  *cp == '-') {
                 continue;
             case DECODETYPESW:
                 if (! (cp = *argp++)  ||  *cp == '-') {
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 }
                 fx.decodetypes = cp;
                 continue;
                 }
                 fx.decodetypes = cp;
                 continue;
@@ -201,7 +201,7 @@ main (int argc, char **argv) {
                 continue;
             case TEXTCHARSETSW:
                 if (! (cp = *argp++) || (*cp == '-' && cp[1])) {
                 continue;
             case TEXTCHARSETSW:
                 if (! (cp = *argp++) || (*cp == '-' && cp[1])) {
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 }
                 fx.textcharset = cp;
                 continue;
                 }
                 fx.textcharset = cp;
                 continue;
@@ -222,13 +222,13 @@ main (int argc, char **argv) {
                 continue;
             case FIXTYPESW:
                 if (! (cp = *argp++) || (*cp == '-' && cp[1])) {
                 continue;
             case FIXTYPESW:
                 if (! (cp = *argp++) || (*cp == '-' && cp[1])) {
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 }
                 if (! strncasecmp (cp, "multipart/", 10)  ||
                     ! strncasecmp (cp, "message/", 8))
                 }
                 if (! strncasecmp (cp, "multipart/", 10)  ||
                     ! strncasecmp (cp, "message/", 8))
-                    adios (NULL, "-fixtype %s not allowed", cp);
+                    die("-fixtype %s not allowed", cp);
                 if (! strchr (cp, '/'))
                 if (! strchr (cp, '/'))
-                    adios (NULL, "-fixtype requires type/subtype");
+                    die("-fixtype requires type/subtype");
                 if (fx.fixtypes == NULL) { fx.fixtypes = svector_create (10); }
                 svector_push_back (fx.fixtypes, cp);
                 continue;
                 if (fx.fixtypes == NULL) { fx.fixtypes = svector_create (10); }
                 svector_push_back (fx.fixtypes, cp);
                 continue;
@@ -246,19 +246,19 @@ main (int argc, char **argv) {
                 continue;
             case FILESW:
                 if (! (cp = *argp++) || (*cp == '-' && cp[1])) {
                 continue;
             case FILESW:
                 if (! (cp = *argp++) || (*cp == '-' && cp[1])) {
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 }
                 file = *cp == '-'  ?  mh_xstrdup (cp)  :  path (cp, TFILE);
                 continue;
             case OUTFILESW:
                 if (! (cp = *argp++) || (*cp == '-' && cp[1])) {
                 }
                 file = *cp == '-'  ?  mh_xstrdup (cp)  :  path (cp, TFILE);
                 continue;
             case OUTFILESW:
                 if (! (cp = *argp++) || (*cp == '-' && cp[1])) {
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 }
                 outfile = *cp == '-'  ?  mh_xstrdup (cp)  :  path (cp, TFILE);
                 continue;
             case RPROCSW:
                 if (!(rmmproc = *argp++) || *rmmproc == '-') {
                 }
                 outfile = *cp == '-'  ?  mh_xstrdup (cp)  :  path (cp, TFILE);
                 continue;
             case RPROCSW:
                 if (!(rmmproc = *argp++) || *rmmproc == '-') {
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 }
                 continue;
             case NRPRCSW:
                 }
                 continue;
             case NRPRCSW:
@@ -280,7 +280,7 @@ main (int argc, char **argv) {
         }
         if (*cp == '+' || *cp == '@') {
             if (folder)
         }
         if (*cp == '+' || *cp == '@') {
             if (folder)
-                adios (NULL, "only one folder at a time!");
+                die("only one folder at a time!");
             folder = pluspath (cp);
         } else {
             if (*cp == '/') {
             folder = pluspath (cp);
         } else {
             if (*cp == '/') {
@@ -311,7 +311,7 @@ main (int argc, char **argv) {
     }
 
     if (file && msgs.size) {
     }
 
     if (file && msgs.size) {
-        adios (NULL, "cannot specify msg and file at same time!");
+        die("cannot specify msg and file at same time!");
     }
 
     if (outfile) {
     }
 
     if (outfile) {
@@ -341,7 +341,7 @@ main (int argc, char **argv) {
             using_stdin = 1;
 
             if ((cp = m_mktemp2 (NULL, invo_name, &fd, NULL)) == NULL) {
             using_stdin = 1;
 
             if ((cp = m_mktemp2 (NULL, invo_name, &fd, NULL)) == NULL) {
-                adios (NULL, "unable to create temporary file in %s",
+                die("unable to create temporary file in %s",
                        get_temp_dir());
             } else {
                 free (file);
                        get_temp_dir());
             } else {
                 free (file);
@@ -351,7 +351,7 @@ main (int argc, char **argv) {
 
             if (close (fd)) {
                 (void) m_unlink (file);
 
             if (close (fd)) {
                 (void) m_unlink (file);
-                adios (NULL, "failed to write temporary file");
+                die("failed to write temporary file");
             }
         }
 
             }
         }
 
@@ -406,12 +406,12 @@ main (int argc, char **argv) {
 
         /* read folder and create message structure */
         if (! (mp = folder_read (folder, 1))) {
 
         /* read folder and create message structure */
         if (! (mp = folder_read (folder, 1))) {
-            adios (NULL, "unable to read folder %s", folder);
+            die("unable to read folder %s", folder);
         }
 
         /* check for empty folder */
         if (mp->nummsg == 0) {
         }
 
         /* check for empty folder */
         if (mp->nummsg == 0) {
-            adios (NULL, "no messages in %s", folder);
+            die("no messages in %s", folder);
         }
 
         /* parse all the message ranges/sequences and set SELECTED */
         }
 
         /* parse all the message ranges/sequences and set SELECTED */
@@ -542,12 +542,12 @@ mhfixmsgsbr (CT *ctp, char *maildir, const fix_transformations *fx,
             /* outfp will be closed by the caller */
             if ((tempfile = m_mktemp2 (NULL, invo_name, NULL, outfp)) ==
                 NULL) {
             /* outfp will be closed by the caller */
             if ((tempfile = m_mktemp2 (NULL, invo_name, NULL, outfp)) ==
                 NULL) {
-                adios (NULL, "unable to create temporary file in %s",
+                die("unable to create temporary file in %s",
                        get_temp_dir());
             }
             outfile = mh_xstrdup (tempfile);
         } else {
                        get_temp_dir());
             }
             outfile = mh_xstrdup (tempfile);
         } else {
-            adios (NULL, "missing both input and output filenames\n");
+            die("missing both input and output filenames\n");
         }
     } /* else *outfp was defined by caller */
 
         }
     } /* else *outfp was defined by caller */
 
@@ -1606,7 +1606,7 @@ decode_part (CT ct) {
     char *tempfile;
 
     if ((tempfile = m_mktemp2 (NULL, invo_name, NULL, &file)) == NULL) {
     char *tempfile;
 
     if ((tempfile = m_mktemp2 (NULL, invo_name, NULL, &file)) == NULL) {
-        adios (NULL, "unable to create temporary file in %s", get_temp_dir());
+        die("unable to create temporary file in %s", get_temp_dir());
     }
     tmp_decoded = mh_xstrdup (tempfile);
     /* The following call will load ct->c_cefile.ce_file with the tmp
     }
     tmp_decoded = mh_xstrdup (tempfile);
     /* The following call will load ct->c_cefile.ce_file with the tmp
@@ -2254,7 +2254,7 @@ strip_crs (CT ct, int *message_mods) {
                 char *tempfile = m_mktemp2 (NULL, invo_name, &fd, NULL);
 
                 if (tempfile == NULL) {
                 char *tempfile = m_mktemp2 (NULL, invo_name, &fd, NULL);
 
                 if (tempfile == NULL) {
-                    adios (NULL, "unable to create temporary file in %s",
+                    die("unable to create temporary file in %s",
                            get_temp_dir());
                 }
                 stripped_content_file = mh_xstrdup (tempfile);
                            get_temp_dir());
                 }
                 stripped_content_file = mh_xstrdup (tempfile);
index b29be15..9cae3c3 100644 (file)
@@ -92,7 +92,7 @@ main (int argc, char *argv[]) {
                 ambigsw (cp, switches);
                 done (1);
             case UNKWNSW:
                 ambigsw (cp, switches);
                 done (1);
             case UNKWNSW:
-                adios (NULL, "-%s unknown", cp);
+                die("-%s unknown", cp);
 
             case HELPSW: {
                 char buf[128];
 
             case HELPSW: {
                 char buf[128];
@@ -109,7 +109,7 @@ main (int argc, char *argv[]) {
 
             case REPLYSW:
                 if (! (cp = *argp++) || (*cp == '-' && cp[1]))
 
             case REPLYSW:
                 if (! (cp = *argp++) || (*cp == '-' && cp[1]))
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 if (! strcasecmp (cp, "accept")) {
                     action = ACT_ACCEPT;
                 } else if (! strcasecmp (cp, "decline")) {
                 if (! strcasecmp (cp, "accept")) {
                     action = ACT_ACCEPT;
                 } else if (! strcasecmp (cp, "decline")) {
@@ -119,7 +119,7 @@ main (int argc, char *argv[]) {
                 } else if (! strcasecmp (cp, "delegate")) {
                     action = ACT_DELEGATE;
                 } else {
                 } else if (! strcasecmp (cp, "delegate")) {
                     action = ACT_DELEGATE;
                 } else {
-                    adios (NULL, "Unknown action: %s", cp);
+                    die("Unknown action: %s", cp);
                 }
                 continue;
 
                 }
                 continue;
 
@@ -129,23 +129,23 @@ main (int argc, char *argv[]) {
 
             case FORMSW:
                 if (! (form = *argp++) || *form == '-')
 
             case FORMSW:
                 if (! (form = *argp++) || *form == '-')
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 format = NULL;
                 continue;
             case FMTSW:
                 if (! (format = *argp++) || *format == '-')
                 format = NULL;
                 continue;
             case FMTSW:
                 if (! (format = *argp++) || *format == '-')
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 form = NULL;
                 continue;
 
             case INFILESW:
                 if (! (cp = *argp++) || (*cp == '-' && cp[1]))
                 form = NULL;
                 continue;
 
             case INFILESW:
                 if (! (cp = *argp++) || (*cp == '-' && cp[1]))
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 infile = *cp == '-'  ?  mh_xstrdup(cp)  :  path (cp, TFILE);
                 continue;
             case OUTFILESW:
                 if (! (cp = *argp++) || (*cp == '-' && cp[1]))
                 infile = *cp == '-'  ?  mh_xstrdup(cp)  :  path (cp, TFILE);
                 continue;
             case OUTFILESW:
                 if (! (cp = *argp++) || (*cp == '-' && cp[1]))
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 outfile = *cp == '-'  ?  mh_xstrdup(cp)  :  path (cp, TFILE);
                 continue;
 
                 outfile = *cp == '-'  ?  mh_xstrdup(cp)  :  path (cp, TFILE);
                 continue;
 
@@ -426,7 +426,7 @@ convert_common (contentline *clines, act action) {
             insert = "Tentative: ";
             break;
         case ACT_DELEGATE:
             insert = "Tentative: ";
             break;
         case ACT_DELEGATE:
-            adios (NULL, "Delegate replies are not supported");
+            die("Delegate replies are not supported");
             break;
         case ACT_CANCEL:
             insert = "Cancelled:";
             break;
         case ACT_CANCEL:
             insert = "Cancelled:";
@@ -445,7 +445,7 @@ convert_common (contentline *clines, act action) {
             node->value = tmp;
         } else {
             /* Should never get here. */
             node->value = tmp;
         } else {
             /* Should never get here. */
-            adios (NULL, "Unknown action: %d", action);
+            die("Unknown action: %d", action);
         }
     }
 
         }
     }
 
index 9e4b957..77e2227 100644 (file)
@@ -95,7 +95,7 @@ main (int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW: 
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW: 
-               adios (NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
@@ -113,13 +113,13 @@ main (int argc, char **argv)
                icachesw = &wcachesw;
 do_cache:
                if (!(cp = *argp++) || *cp == '-')
                icachesw = &wcachesw;
 do_cache:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                switch (*icachesw = smatch (cp, cache_policy)) {
                case AMBIGSW:
                    ambigsw (cp, cache_policy);
                    done (1);
                case UNKWNSW:
                switch (*icachesw = smatch (cp, cache_policy)) {
                case AMBIGSW:
                    ambigsw (cp, cache_policy);
                    done (1);
                case UNKWNSW:
-                   adios (NULL, "%s unknown", cp);
+                   die("%s unknown", cp);
                default:
                    break;
                }
                default:
                    break;
                }
@@ -148,27 +148,27 @@ do_cache:
 
            case PARTSW:
                if (!(cp = *argp++) || *cp == '-')
 
            case PARTSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                if (npart >= NPARTS)
                if (npart >= NPARTS)
-                   adios (NULL, "too many parts (starting with %s), %d max",
+                   die("too many parts (starting with %s), %d max",
                           cp, NPARTS);
                parts[npart++] = cp;
                continue;
 
            case TYPESW:
                if (!(cp = *argp++) || *cp == '-')
                           cp, NPARTS);
                parts[npart++] = cp;
                continue;
 
            case TYPESW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                if (ntype >= NTYPES)
                if (ntype >= NTYPES)
-                   adios (NULL, "too many types (starting with %s), %d max",
+                   die("too many types (starting with %s), %d max",
                           cp, NTYPES);
                types[ntype++] = cp;
                continue;
 
            case PREFERSW:
                if (!(cp = *argp++) || *cp == '-')
                           cp, NTYPES);
                types[ntype++] = cp;
                continue;
 
            case PREFERSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                if (npreferred >= NPREFS)
                if (npreferred >= NPREFS)
-                   adios (NULL, "too many preferred types (starting with %s), %d max",
+                   die("too many preferred types (starting with %s), %d max",
                           cp, NPREFS);
                 mime_preference[npreferred].type = cp;
                cp = strchr(cp, '/');
                           cp, NPREFS);
                 mime_preference[npreferred].type = cp;
                cp = strchr(cp, '/');
@@ -182,7 +182,7 @@ do_cache:
 
            case FILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
 
            case FILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                file = *cp == '-' ? cp : path (cp, TFILE);
                continue;
 
                file = *cp == '-' ? cp : path (cp, TFILE);
                continue;
 
@@ -212,7 +212,7 @@ do_cache:
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
             folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
@@ -235,7 +235,7 @@ do_cache:
        free (path ("./", TFOLDER));
 
     if (file && msgs.size)
        free (path ("./", TFOLDER));
 
     if (file && msgs.size)
-       adios (NULL, "cannot specify msg and file at same time!");
+       die("cannot specify msg and file at same time!");
 
     /*
      * check if message is coming from file
 
     /*
      * check if message is coming from file
@@ -261,11 +261,11 @@ do_cache:
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 0)))
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 0)))
-           adios (NULL, "unable to read folder %s", folder);
+           die("unable to read folder %s", folder);
 
        /* check for empty folder */
        if (mp->nummsg == 0)
 
        /* check for empty folder */
        if (mp->nummsg == 0)
-           adios (NULL, "no messages in %s", folder);
+           die("no messages in %s", folder);
 
        /* parse all the message ranges/sequences and set SELECTED */
        for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
        /* parse all the message ranges/sequences and set SELECTED */
        for (msgnum = 0; msgnum < msgs.size; msgnum++)
index da4f639..64885d1 100644 (file)
@@ -57,15 +57,15 @@ do_login(const char *svc, const char *user, const char *browser, int snoop)
     const char *url;
 
     if (svc == NULL) {
     const char *url;
 
     if (svc == NULL) {
-        adios(NULL, "missing -authservice switch");
+        die("missing -authservice switch");
     }
 
     if (user == NULL) {
     }
 
     if (user == NULL) {
-        adios(NULL, "missing -user switch");
+        die("missing -user switch");
     }
 
     if (!mh_oauth_new(&ctx, svc)) {
     }
 
     if (!mh_oauth_new(&ctx, svc)) {
-        adios(NULL, "%s", mh_oauth_get_err_string(ctx));
+        die("%s", mh_oauth_get_err_string(ctx));
     }
 
     if (snoop) {
     }
 
     if (snoop) {
@@ -75,7 +75,7 @@ do_login(const char *svc, const char *user, const char *browser, int snoop)
     fn = mh_oauth_cred_fn(svc);
 
     if ((url = mh_oauth_get_authorize_url(ctx)) == NULL) {
     fn = mh_oauth_cred_fn(svc);
 
     if ((url = mh_oauth_get_authorize_url(ctx)) == NULL) {
-      adios(NULL, "%s", mh_oauth_get_err_string(ctx));
+      die("%s", mh_oauth_get_err_string(ctx));
     }
 
     if (browser) {
     }
 
     if (browser) {
@@ -111,7 +111,7 @@ do_login(const char *svc, const char *user, const char *browser, int snoop)
     }
     if (cred == NULL) {
       inform("error exchanging code for OAuth2 token");
     }
     if (cred == NULL) {
       inform("error exchanging code for OAuth2 token");
-      adios(NULL, "%s", mh_oauth_get_err_string(ctx));
+      die("%s", mh_oauth_get_err_string(ctx));
     }
 
     cred_file = lkfopendata(fn, "r+", &failed_to_lock);
     }
 
     cred_file = lkfopendata(fn, "r+", &failed_to_lock);
@@ -122,7 +122,7 @@ do_login(const char *svc, const char *user, const char *browser, int snoop)
       adios(fn, "oops");
     }
     if (!mh_oauth_cred_save(cred_file, cred, user)) {
       adios(fn, "oops");
     }
     if (!mh_oauth_cred_save(cred_file, cred, user)) {
-      adios(NULL, "%s", mh_oauth_get_err_string(ctx));
+      die("%s", mh_oauth_get_err_string(ctx));
     }
     if (lkfclosedata(cred_file, fn) != 0) {
       adios (fn, "oops");
     }
     if (lkfclosedata(cred_file, fn) != 0) {
       adios (fn, "oops");
@@ -156,7 +156,7 @@ main(int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
-               adios (NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW:
                snprintf(help, sizeof(help), "%s [switches]",
 
            case HELPSW:
                snprintf(help, sizeof(help), "%s [switches]",
@@ -169,22 +169,22 @@ main(int argc, char **argv)
 
            case USERSW:
                if (!(user = *argp++) || *user == '-')
 
            case USERSW:
                if (!(user = *argp++) || *user == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
 
            case SASLMECHSW:
                if (!(saslmech = *argp++) || *saslmech == '-')
                continue;
 
            case SASLMECHSW:
                if (!(saslmech = *argp++) || *saslmech == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
 
            case AUTHSERVICESW:
                 if (!(svc = *argp++) || *svc == '-')
                continue;
 
            case AUTHSERVICESW:
                 if (!(svc = *argp++) || *svc == '-')
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 continue;
 
            case BROWSERSW:
                 if (!(browser = *argp++) || *browser == '-')
                 continue;
 
            case BROWSERSW:
                 if (!(browser = *argp++) || *browser == '-')
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 continue;
 
             case SNOOPSW:
                 continue;
 
             case SNOOPSW:
@@ -192,12 +192,12 @@ main(int argc, char **argv)
                 continue;
            }
        }
                 continue;
            }
        }
-        adios(NULL, "extraneous arguments");
+        die("extraneous arguments");
     }
 
     if (saslmech  &&  strcasecmp(saslmech, "xoauth2")) {
         /* xoauth is assumed */
     }
 
     if (saslmech  &&  strcasecmp(saslmech, "xoauth2")) {
         /* xoauth is assumed */
-        adios(NULL, "only -saslmech xoauth2 is supported");
+        die("only -saslmech xoauth2 is supported");
     }
     free(arguments);
 
     }
     free(arguments);
 
@@ -207,7 +207,7 @@ main(int argc, char **argv)
     NMH_UNUSED(svc);
     NMH_UNUSED(browser);
     NMH_UNUSED(snoop);
     NMH_UNUSED(svc);
     NMH_UNUSED(browser);
     NMH_UNUSED(snoop);
-    adios(NULL, "not built with OAuth support");
+    die("not built with OAuth support");
     return 1;
 #endif
 }
     return 1;
 #endif
 }
index 1c8ab4e..e7070fd 100644 (file)
@@ -1742,11 +1742,11 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state,
      */
 
     if (pipe(fdinput) < 0) {
      */
 
     if (pipe(fdinput) < 0) {
-       adios(NULL, "Unable to create input pipe");
+       die("Unable to create input pipe");
     }
 
     if (pipe(fdoutput) < 0) {
     }
 
     if (pipe(fdoutput) < 0) {
-       adios(NULL, "Unable to create output pipe");
+       die("Unable to create output pipe");
     }
 
     /*
     }
 
     /*
@@ -1801,7 +1801,7 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state,
         */
        _exit(0);
     case -1:
         */
        _exit(0);
     case -1:
-       adios(NULL, "Unable to fork for filter writer process");
+       die("Unable to fork for filter writer process");
        break;
     }
 
        break;
     }
 
@@ -1876,7 +1876,7 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state,
        break;
 
     case -1:
        break;
 
     case -1:
-       adios(NULL, "Unable to fork format program");
+       die("Unable to fork format program");
     }
 
     /*
     }
 
     /*
@@ -1899,7 +1899,7 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state,
     }
 
     if (cc < 0) {
     }
 
     if (cc < 0) {
-       adios(NULL, "reading from formatproc");
+       die("reading from formatproc");
     }
 
     /*
     }
 
     /*
index a5b4a27..ce53279 100644 (file)
--- a/uip/mhn.c
+++ b/uip/mhn.c
@@ -134,7 +134,7 @@ main (int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW: 
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW: 
-               adios (NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
@@ -166,13 +166,13 @@ main (int argc, char **argv)
                icachesw = &wcachesw;
 do_cache:
                if (!(cp = *argp++) || *cp == '-')
                icachesw = &wcachesw;
 do_cache:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                switch (*icachesw = smatch (cp, cache_policy)) {
                case AMBIGSW:
                    ambigsw (cp, cache_policy);
                    done (1);
                case UNKWNSW:
                switch (*icachesw = smatch (cp, cache_policy)) {
                case AMBIGSW:
                    ambigsw (cp, cache_policy);
                    done (1);
                case UNKWNSW:
-                   adios (NULL, "%s unknown", cp);
+                   die("%s unknown", cp);
                default:
                    break;
                }
                default:
                    break;
                }
@@ -222,31 +222,31 @@ do_cache:
 
            case PARTSW:
                if (!(cp = *argp++) || *cp == '-')
 
            case PARTSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                if (npart >= NPARTS)
                if (npart >= NPARTS)
-                   adios (NULL, "too many parts (starting with %s), %d max",
+                   die("too many parts (starting with %s), %d max",
                           cp, NPARTS);
                parts[npart++] = cp;
                continue;
 
            case TYPESW:
                if (!(cp = *argp++) || *cp == '-')
                           cp, NPARTS);
                parts[npart++] = cp;
                continue;
 
            case TYPESW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                if (ntype >= NTYPES)
                if (ntype >= NTYPES)
-                   adios (NULL, "too many types (starting with %s), %d max",
+                   die("too many types (starting with %s), %d max",
                           cp, NTYPES);
                types[ntype++] = cp;
                continue;
 
            case FILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
                           cp, NTYPES);
                types[ntype++] = cp;
                continue;
 
            case FILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                file = *cp == '-' ? cp : path (cp, TFILE);
                continue;
 
            case FORMSW:
                if (!(cp = *argp++) || *cp == '-')
                file = *cp == '-' ? cp : path (cp, TFILE);
                continue;
 
            case FORMSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                 free(formsw);
                formsw = mh_xstrdup(etcpath(cp));
                continue;
                 free(formsw);
                formsw = mh_xstrdup(etcpath(cp));
                continue;
@@ -256,7 +256,7 @@ do_cache:
             */
            case PROGSW:
                if (!(progsw = *argp++) || *progsw == '-')
             */
            case PROGSW:
                if (!(progsw = *argp++) || *progsw == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            case NPROGSW:
                nomore++;
                continue;
            case NPROGSW:
                nomore++;
@@ -265,7 +265,7 @@ do_cache:
            case LENSW:
            case WIDTHSW:
                if (!(cp = *argp++) || *cp == '-')
            case LENSW:
            case WIDTHSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
 
            /*
                continue;
 
            /*
@@ -297,7 +297,7 @@ do_cache:
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
             folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
@@ -352,11 +352,11 @@ do_cache:
        int vecp;
 
        if (showsw || storesw || cachesw)
        int vecp;
 
        if (showsw || storesw || cachesw)
-           adios (NULL, "cannot use -build with -show, -store, -cache");
+           die("cannot use -build with -show, -store, -cache");
        if (msgs.size < 1)
        if (msgs.size < 1)
-           adios (NULL, "need to specify a %s composition file", invo_name);
+           die("need to specify a %s composition file", invo_name);
        if (msgs.size > 1)
        if (msgs.size > 1)
-           adios (NULL, "only one %s composition file at a time", invo_name);
+           die("only one %s composition file at a time", invo_name);
 
        vecp = 0;
        vec[vecp++] = "mhbuild";
 
        vecp = 0;
        vec[vecp++] = "mhbuild";
@@ -402,7 +402,7 @@ do_cache:
     }
 
     if (file && msgs.size)
     }
 
     if (file && msgs.size)
-       adios (NULL, "cannot specify msg and file at same time!");
+       die("cannot specify msg and file at same time!");
 
     /*
      * check if message is coming from file
 
     /*
      * check if message is coming from file
@@ -428,11 +428,11 @@ do_cache:
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 1)))
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 1)))
-           adios (NULL, "unable to read folder %s", folder);
+           die("unable to read folder %s", folder);
 
        /* check for empty folder */
        if (mp->nummsg == 0)
 
        /* check for empty folder */
        if (mp->nummsg == 0)
-           adios (NULL, "no messages in %s", folder);
+           die("no messages in %s", folder);
 
        /* parse all the message ranges/sequences and set SELECTED */
        for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
        /* parse all the message ranges/sequences and set SELECTED */
        for (msgnum = 0; msgnum < msgs.size; msgnum++)
@@ -462,7 +462,7 @@ do_cache:
      * at a time.
      */
     if (showsw + listsw + storesw + cachesw > 1)
      * at a time.
      */
     if (showsw + listsw + storesw + cachesw > 1)
-       adios (NULL, "can only use one of -show, -list, -store, -cache at same time");
+       die("can only use one of -show, -list, -store, -cache at same time");
 
     /* If no action is specified, assume -show */
     if (!listsw && !showsw && !storesw && !cachesw)
 
     /* If no action is specified, assume -show */
     if (!listsw && !showsw && !storesw && !cachesw)
index e8047be..abb44b3 100644 (file)
@@ -157,7 +157,7 @@ main(int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [profile-components] [switches]",
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [profile-components] [switches]",
index 1c4a1a9..d634a06 100644 (file)
@@ -361,10 +361,10 @@ get_content (FILE *in, char *file, int toplevel)
 
        case LENERR:
        case FMTERR:
 
        case LENERR:
        case FMTERR:
-           adios (NULL, "message format error in component #%d", compnum);
+           die("message format error in component #%d", compnum);
 
        default:
 
        default:
-           adios (NULL, "getfld() returned %d", state);
+           die("getfld() returned %d", state);
        }
 
        /* break out of the loop */
        }
 
        /* break out of the loop */
@@ -1511,7 +1511,7 @@ invalid_param:
                                adios ("failed", "fread");
 
                            case OK:
                                adios ("failed", "fread");
 
                            case OK:
-                               adios (NULL, "unexpected EOF from fread");
+                               die("unexpected EOF from fread");
 
                            default:
                                bp += cc, size -= cc;
 
                            default:
                                bp += cc, size -= cc;
@@ -1780,7 +1780,7 @@ openBase64 (CT ct, char **file)
        if (ce->ce_unlink) {
            /* Create temporary file with filename extension. */
            if ((ce->ce_file = m_mktemps(invo_name, cp, NULL, NULL)) == NULL) {
        if (ce->ce_unlink) {
            /* Create temporary file with filename extension. */
            if ((ce->ce_file = m_mktemps(invo_name, cp, NULL, NULL)) == NULL) {
-               adios(NULL, "unable to create temporary file in %s",
+               die("unable to create temporary file in %s",
                      get_temp_dir());
            }
        } else {
                      get_temp_dir());
            }
        } else {
@@ -1789,7 +1789,7 @@ openBase64 (CT ct, char **file)
     } else if (*file == NULL) {
        char *tempfile;
        if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
     } else if (*file == NULL) {
        char *tempfile;
        if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
-           adios(NULL, "unable to create temporary file in %s",
+           die("unable to create temporary file in %s",
                  get_temp_dir());
        }
        ce->ce_file = mh_xstrdup(tempfile);
                  get_temp_dir());
        }
        ce->ce_file = mh_xstrdup(tempfile);
@@ -1801,7 +1801,7 @@ openBase64 (CT ct, char **file)
     }
 
     if ((len = ct->c_end - ct->c_begin) < 0)
     }
 
     if ((len = ct->c_end - ct->c_begin) < 0)
-       adios (NULL, "internal error(1)");
+       die("internal error(1)");
 
     buffer = mh_xmalloc (len + 1);
 
 
     buffer = mh_xmalloc (len + 1);
 
@@ -1965,7 +1965,7 @@ openQuoted (CT ct, char **file)
        if (ce->ce_unlink) {
            /* Create temporary file with filename extension. */
            if ((ce->ce_file = m_mktemps(invo_name, cp, NULL, NULL)) == NULL) {
        if (ce->ce_unlink) {
            /* Create temporary file with filename extension. */
            if ((ce->ce_file = m_mktemps(invo_name, cp, NULL, NULL)) == NULL) {
-               adios(NULL, "unable to create temporary file in %s",
+               die("unable to create temporary file in %s",
                      get_temp_dir());
            }
        } else {
                      get_temp_dir());
            }
        } else {
@@ -1974,7 +1974,7 @@ openQuoted (CT ct, char **file)
     } else if (*file == NULL) {
        char *tempfile;
        if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
     } else if (*file == NULL) {
        char *tempfile;
        if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
-           adios(NULL, "unable to create temporary file in %s",
+           die("unable to create temporary file in %s",
                  get_temp_dir());
        }
        ce->ce_file = mh_xstrdup(tempfile);
                  get_temp_dir());
        }
        ce->ce_file = mh_xstrdup(tempfile);
@@ -1986,7 +1986,7 @@ openQuoted (CT ct, char **file)
     }
 
     if ((len = ct->c_end - ct->c_begin) < 0)
     }
 
     if ((len = ct->c_end - ct->c_begin) < 0)
-       adios (NULL, "internal error(2)");
+       die("internal error(2)");
 
     if (! ct->c_fp) {
        if ((ct->c_fp = fopen (ct->c_file, "r")) == NULL) {
 
     if (! ct->c_fp) {
        if ((ct->c_fp = fopen (ct->c_file, "r")) == NULL) {
@@ -2181,7 +2181,7 @@ open7Bit (CT ct, char **file)
        if (ce->ce_unlink) {
            /* Create temporary file with filename extension. */
            if ((ce->ce_file = m_mktemps(invo_name, cp, NULL, NULL)) == NULL) {
        if (ce->ce_unlink) {
            /* Create temporary file with filename extension. */
            if ((ce->ce_file = m_mktemps(invo_name, cp, NULL, NULL)) == NULL) {
-               adios(NULL, "unable to create temporary file in %s",
+               die("unable to create temporary file in %s",
                      get_temp_dir());
            }
        } else {
                      get_temp_dir());
            }
        } else {
@@ -2190,7 +2190,7 @@ open7Bit (CT ct, char **file)
     } else if (*file == NULL) {
        char *tempfile;
        if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
     } else if (*file == NULL) {
        char *tempfile;
        if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
-           adios(NULL, "unable to create temporary file in %s",
+           die("unable to create temporary file in %s",
                  get_temp_dir());
        }
        ce->ce_file = mh_xstrdup(tempfile);
                  get_temp_dir());
        }
        ce->ce_file = mh_xstrdup(tempfile);
@@ -2239,7 +2239,7 @@ open7Bit (CT ct, char **file)
     }
 
     if ((len = ct->c_end - ct->c_begin) < 0)
     }
 
     if ((len = ct->c_end - ct->c_begin) < 0)
-       adios (NULL, "internal error(3)");
+       die("internal error(3)");
 
     if (! ct->c_fp) {
        if ((ct->c_fp = fopen (ct->c_file, "r")) == NULL) {
 
     if (! ct->c_fp) {
        if ((ct->c_fp = fopen (ct->c_file, "r")) == NULL) {
@@ -2540,7 +2540,7 @@ openFTP (CT ct, char **file)
     else {
        char *tempfile;
        if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
     else {
        char *tempfile;
        if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
-           adios(NULL, "unable to create temporary file in %s",
+           die("unable to create temporary file in %s",
                  get_temp_dir());
        }
        ce->ce_file = mh_xstrdup(tempfile);
                  get_temp_dir());
        }
        ce->ce_file = mh_xstrdup(tempfile);
@@ -2725,7 +2725,7 @@ openMail (CT ct, char **file)
     if (*file == NULL) {
        char *tempfile;
        if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
     if (*file == NULL) {
        char *tempfile;
        if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
-           adios(NULL, "unable to create temporary file in %s",
+           die("unable to create temporary file in %s",
                  get_temp_dir());
        }
        ce->ce_file = mh_xstrdup(tempfile);
                  get_temp_dir());
        }
        ce->ce_file = mh_xstrdup(tempfile);
@@ -2816,7 +2816,7 @@ openURL (CT ct, char **file)
     else {
        char *tempfile;
        if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
     else {
        char *tempfile;
        if ((tempfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
-           adios(NULL, "unable to create temporary file in %s",
+           die("unable to create temporary file in %s",
                  get_temp_dir());
        }
        ce->ce_file = mh_xstrdup(tempfile);
                  get_temp_dir());
        }
        ce->ce_file = mh_xstrdup(tempfile);
@@ -3867,7 +3867,7 @@ param_len(PM pm, int index, size_t valueoff, int *encode, int *cont,
        if (! pm->pm_charset) {
            pm->pm_charset = mh_xstrdup(write_charset_8bit());
            if (strcasecmp(pm->pm_charset, "US-ASCII") == 0)
        if (! pm->pm_charset) {
            pm->pm_charset = mh_xstrdup(write_charset_8bit());
            if (strcasecmp(pm->pm_charset, "US-ASCII") == 0)
-               adios(NULL, "8-bit characters in parameter \"%s\", but "
+               die("8-bit characters in parameter \"%s\", but "
                      "local character set is US-ASCII", pm->pm_name);
        }
        if (! pm->pm_lang)
                      "local character set is US-ASCII", pm->pm_name);
        }
        if (! pm->pm_lang)
index 1e6ab51..ceed476 100644 (file)
@@ -47,7 +47,7 @@ main(int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
@@ -61,7 +61,7 @@ main(int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
             folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
@@ -85,7 +85,7 @@ main(int argc, char **argv)
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
-       adios (NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     /*
      * We need to make sure there is message status space
 
     /*
      * We need to make sure there is message status space
@@ -95,10 +95,10 @@ main(int argc, char **argv)
      */
     if (mp->hghmsg >= mp->hghoff) {
        if (!(mp = folder_realloc (mp, 1, mp->hghmsg + 10)))
      */
     if (mp->hghmsg >= mp->hghoff) {
        if (!(mp = folder_realloc (mp, 1, mp->hghmsg + 10)))
-           adios (NULL, "unable to allocate folder storage");
+           die("unable to allocate folder storage");
     } else if (mp->lowoff > 1) {
        if (!(mp = folder_realloc (mp, 1, mp->hghoff)))
     } else if (mp->lowoff > 1) {
        if (!(mp = folder_realloc (mp, 1, mp->hghoff)))
-           adios (NULL, "unable to allocate folder storage");
+           die("unable to allocate folder storage");
     }
 
     mp->msgflags |= ALLOW_NEW; /* allow the "new" sequence */
     }
 
     mp->msgflags |= ALLOW_NEW; /* allow the "new" sequence */
index 13fa3b7..f03c570 100644 (file)
@@ -109,7 +109,7 @@ main (int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
-               adios (NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW:
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
 
            case HELPSW:
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
@@ -127,13 +127,13 @@ main (int argc, char **argv)
                icachesw = &wcachesw;
 do_cache:
                if (!(cp = *argp++) || *cp == '-')
                icachesw = &wcachesw;
 do_cache:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                switch (*icachesw = smatch (cp, cache_policy)) {
                case AMBIGSW:
                    ambigsw (cp, cache_policy);
                    done (1);
                case UNKWNSW:
                switch (*icachesw = smatch (cp, cache_policy)) {
                case AMBIGSW:
                    ambigsw (cp, cache_policy);
                    done (1);
                case UNKWNSW:
-                   adios (NULL, "%s unknown", cp);
+                   die("%s unknown", cp);
                default:
                    break;
                }
                default:
                    break;
                }
@@ -167,27 +167,27 @@ do_cache:
 
            case PARTSW:
                if (!(cp = *argp++) || *cp == '-')
 
            case PARTSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                if (npart >= NPARTS)
                if (npart >= NPARTS)
-                   adios (NULL, "too many parts (starting with %s), %d max",
+                   die("too many parts (starting with %s), %d max",
                           cp, NPARTS);
                parts[npart++] = cp;
                continue;
 
            case TYPESW:
                if (!(cp = *argp++) || *cp == '-')
                           cp, NPARTS);
                parts[npart++] = cp;
                continue;
 
            case TYPESW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                if (ntype >= NTYPES)
                if (ntype >= NTYPES)
-                   adios (NULL, "too many types (starting with %s), %d max",
+                   die("too many types (starting with %s), %d max",
                           cp, NTYPES);
                types[ntype++] = cp;
                continue;
 
            case PREFERSW:
                if (!(cp = *argp++) || *cp == '-')
                           cp, NTYPES);
                types[ntype++] = cp;
                continue;
 
            case PREFERSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                if (npreferred >= NPREFS)
                if (npreferred >= NPREFS)
-                   adios (NULL, "too many preferred types (starting with %s), %d max",
+                   die("too many preferred types (starting with %s), %d max",
                           cp, NPREFS);
                mime_preference[npreferred].type = cp;
                cp = strchr(cp, '/');
                           cp, NPREFS);
                mime_preference[npreferred].type = cp;
                cp = strchr(cp, '/');
@@ -201,13 +201,13 @@ do_cache:
 
            case FILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
 
            case FILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                file = *cp == '-' ? cp : path (cp, TFILE);
                continue;
 
            case FORMSW:
                if (!(cp = *argp++) || *cp == '-')
                file = *cp == '-' ? cp : path (cp, TFILE);
                continue;
 
            case FORMSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                 free(formsw);
                formsw = mh_xstrdup(etcpath(cp));
                continue;
                 free(formsw);
                formsw = mh_xstrdup(etcpath(cp));
                continue;
@@ -221,12 +221,12 @@ do_cache:
 
            case HEADFORMSW:
                if (!(headerform = *argp++) || *headerform == '-')
 
            case HEADFORMSW:
                if (!(headerform = *argp++) || *headerform == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
 
            case MARKFORMSW:
                if (!(markerform = *argp++) || *markerform == '-')
                continue;
 
            case MARKFORMSW:
                if (!(markerform = *argp++) || *markerform == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
 
            /*
                continue;
 
            /*
@@ -234,7 +234,7 @@ do_cache:
             */
            case PROGSW:
                if (!(progsw = *argp++) || *progsw == '-')
             */
            case PROGSW:
                if (!(progsw = *argp++) || *progsw == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            case NPROGSW:
                nomore++;
                continue;
            case NPROGSW:
                nomore++;
@@ -243,7 +243,7 @@ do_cache:
            case LENSW:
            case WIDTHSW:
                if (!(cp = *argp++) || *cp == '-')
            case LENSW:
            case WIDTHSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
 
            case VERBSW:
                continue;
 
            case VERBSW:
@@ -259,7 +259,7 @@ do_cache:
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
             folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
@@ -314,7 +314,7 @@ do_cache:
        free (path ("./", TFOLDER));
 
     if (file && msgs.size)
        free (path ("./", TFOLDER));
 
     if (file && msgs.size)
-       adios (NULL, "cannot specify msg and file at same time!");
+       die("cannot specify msg and file at same time!");
 
     /*
      * check if message is coming from file
 
     /*
      * check if message is coming from file
@@ -342,11 +342,11 @@ do_cache:
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 1)))
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 1)))
-           adios (NULL, "unable to read folder %s", folder);
+           die("unable to read folder %s", folder);
 
        /* check for empty folder */
        if (mp->nummsg == 0)
 
        /* check for empty folder */
        if (mp->nummsg == 0)
-           adios (NULL, "no messages in %s", folder);
+           die("no messages in %s", folder);
 
        /* parse all the message ranges/sequences and set SELECTED */
        for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
        /* parse all the message ranges/sequences and set SELECTED */
        for (msgnum = 0; msgnum < msgs.size; msgnum++)
index 5283179..5d66409 100644 (file)
@@ -1084,7 +1084,7 @@ convert_charset (CT ct, char *dest_charset, int *message_mods) {
         }
 
         if ((tempfile = m_mktemp2 (NULL, invo_name, &fd, NULL)) == NULL) {
         }
 
         if ((tempfile = m_mktemp2 (NULL, invo_name, &fd, NULL)) == NULL) {
-            adios (NULL, "unable to create temporary file in %s",
+            die("unable to create temporary file in %s",
                    get_temp_dir());
         }
         dest = mh_xstrdup(tempfile);
                    get_temp_dir());
         }
         dest = mh_xstrdup(tempfile);
index b7c9943..a848224 100644 (file)
@@ -94,7 +94,7 @@ main (int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
-               adios (NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW:
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
 
            case HELPSW:
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
@@ -119,13 +119,13 @@ main (int argc, char **argv)
                icachesw = &wcachesw;
 do_cache:
                if (!(cp = *argp++) || *cp == '-')
                icachesw = &wcachesw;
 do_cache:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                switch (*icachesw = smatch (cp, cache_policy)) {
                case AMBIGSW:
                    ambigsw (cp, cache_policy);
                    done (1);
                case UNKWNSW:
                switch (*icachesw = smatch (cp, cache_policy)) {
                case AMBIGSW:
                    ambigsw (cp, cache_policy);
                    done (1);
                case UNKWNSW:
-                   adios (NULL, "%s unknown", cp);
+                   die("%s unknown", cp);
                default:
                    break;
                }
                default:
                    break;
                }
@@ -140,27 +140,27 @@ do_cache:
 
            case PARTSW:
                if (!(cp = *argp++) || *cp == '-')
 
            case PARTSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                if (npart >= NPARTS)
                if (npart >= NPARTS)
-                   adios (NULL, "too many parts (starting with %s), %d max",
+                   die("too many parts (starting with %s), %d max",
                           cp, NPARTS);
                parts[npart++] = cp;
                continue;
 
            case TYPESW:
                if (!(cp = *argp++) || *cp == '-')
                           cp, NPARTS);
                parts[npart++] = cp;
                continue;
 
            case TYPESW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                if (ntype >= NTYPES)
                if (ntype >= NTYPES)
-                   adios (NULL, "too many types (starting with %s), %d max",
+                   die("too many types (starting with %s), %d max",
                           cp, NTYPES);
                types[ntype++] = cp;
                continue;
 
            case PREFERSW:
                if (!(cp = *argp++) || *cp == '-')
                           cp, NTYPES);
                types[ntype++] = cp;
                continue;
 
            case PREFERSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                if (npreferred >= NPREFS)
                if (npreferred >= NPREFS)
-                   adios (NULL, "too many preferred types (starting with %s), %d max",
+                   die("too many preferred types (starting with %s), %d max",
                           cp, NPREFS);
                mime_preference[npreferred].type = cp;
                cp = strchr(cp, '/');
                           cp, NPREFS);
                mime_preference[npreferred].type = cp;
                cp = strchr(cp, '/');
@@ -174,13 +174,13 @@ do_cache:
 
            case FILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
 
            case FILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                file = *cp == '-' ? cp : path (cp, TFILE);
                continue;
 
            case OUTFILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
                file = *cp == '-' ? cp : path (cp, TFILE);
                continue;
 
            case OUTFILESW:
                if (!(cp = *argp++) || (*cp == '-' && cp[1]))
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                outfile = *cp == '-' ? cp : path (cp, TFILE);
                continue;
 
                outfile = *cp == '-' ? cp : path (cp, TFILE);
                continue;
 
@@ -192,7 +192,7 @@ do_cache:
                continue;
             case CLOBBERSW:
                if (!(cp = *argp++) || *cp == '-')
                continue;
             case CLOBBERSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                clobbersw = cp;
                continue;
            case DEBUGSW:
                clobbersw = cp;
                continue;
            case DEBUGSW:
@@ -202,7 +202,7 @@ do_cache:
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
             folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
@@ -250,7 +250,7 @@ do_cache:
        free (path ("./", TFOLDER));
 
     if (file && msgs.size)
        free (path ("./", TFOLDER));
 
     if (file && msgs.size)
-       adios (NULL, "cannot specify msg and file at same time!");
+       die("cannot specify msg and file at same time!");
 
     /*
      * check if message is coming from file
 
     /*
      * check if message is coming from file
@@ -280,11 +280,11 @@ do_cache:
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 1)))
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 1)))
-           adios (NULL, "unable to read folder %s", folder);
+           die("unable to read folder %s", folder);
 
        /* check for empty folder */
        if (mp->nummsg == 0)
 
        /* check for empty folder */
        if (mp->nummsg == 0)
-           adios (NULL, "no messages in %s", folder);
+           die("no messages in %s", folder);
 
        /* parse all the message ranges/sequences and set SELECTED */
        for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
        /* parse all the message ranges/sequences and set SELECTED */
        for (msgnum = 0; msgnum < msgs.size; msgnum++)
index a9993d6..f579fcd 100644 (file)
@@ -566,7 +566,7 @@ store_content (CT ct, CT p, mhstoreinfo_t info)
 
            /* Store content in temporary file for now */
            if ((tmpfilenam = m_mktemp(invo_name, NULL, NULL)) == NULL) {
 
            /* Store content in temporary file for now */
            if ((tmpfilenam = m_mktemp(invo_name, NULL, NULL)) == NULL) {
-               adios(NULL, "unable to create temporary file in %s",
+               die("unable to create temporary file in %s",
                      get_temp_dir());
            }
            ct->c_storage = mh_xstrdup(tmpfilenam);
                      get_temp_dir());
            }
            ct->c_storage = mh_xstrdup(tmpfilenam);
@@ -1139,7 +1139,7 @@ clobber_policy (const char *value) {
     return NMH_CLOBBER_NEVER;
   }
 
     return NMH_CLOBBER_NEVER;
   }
 
-  adios (NULL, "invalid argument, %s, to clobber", value);
+  die("invalid argument, %s, to clobber", value);
 }
 
 
 }
 
 
index 7028d43..3cb95ff 100644 (file)
@@ -181,7 +181,7 @@ process_args(int argc, char **argv, const char **directory,
             case DIRECTORYSW:
                 /* Allow the directory to start with '-'. */
                 if ((cp = *argp++) == NULL) {
             case DIRECTORYSW:
                 /* Allow the directory to start with '-'. */
                 if ((cp = *argp++) == NULL) {
-                    adios(NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 }
                 *directory = cp;
                 continue;
                 }
                 *directory = cp;
                 continue;
@@ -189,7 +189,7 @@ process_args(int argc, char **argv, const char **directory,
             case PREFIXSW:
                 /* Allow the prefix to start with '-'. */
                 if ((cp = *argp++) == NULL) {
             case PREFIXSW:
                 /* Allow the prefix to start with '-'. */
                 if ((cp = *argp++) == NULL) {
-                    adios(NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 }
                 *prefix = cp;
                 continue;
                 }
                 *prefix = cp;
                 continue;
@@ -198,7 +198,7 @@ process_args(int argc, char **argv, const char **directory,
             case SUFFIXSW:
                 /* Allow the suffix to start with '-'. */
                 if ((cp = *argp++) == NULL) {
             case SUFFIXSW:
                 /* Allow the suffix to start with '-'. */
                 if ((cp = *argp++) == NULL) {
-                    adios(NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 }
                 *suffix = cp;
                 continue;
                 }
                 *suffix = cp;
                 continue;
index 5551e50..dac9cda 100644 (file)
@@ -100,7 +100,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches] [users ...]",
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches] [users ...]",
@@ -120,30 +120,30 @@ main (int argc, char **argv)
 
                case NOTESW:
                    if (!(cp = *argp++) || *cp == '-')
 
                case NOTESW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    notifysw |= donote (cp, 1);
                    continue;
                case NNOTESW:
                    if (!(cp = *argp++) || *cp == '-')
                    notifysw |= donote (cp, 1);
                    continue;
                case NNOTESW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    notifysw &= ~donote (cp, 0);
                    continue;
 
                case HOSTSW: 
                    if (!(host = *argp++) || *host == '-')
                    notifysw &= ~donote (cp, 0);
                    continue;
 
                case HOSTSW: 
                    if (!(host = *argp++) || *host == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case PORTSW:
                    if (!(port = *argp++) || *port == '-')
                    continue;
 
                case PORTSW:
                    if (!(port = *argp++) || *port == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                continue;
 
                case USERSW: 
                    if (!(cp = *argp++) || *cp == '-')
                continue;
 
                case USERSW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    if (vecp >= MAXVEC-1)
                    if (vecp >= MAXVEC-1)
-                       adios (NULL, "you can only check %d users at a time", MAXVEC-1);
+                       die("you can only check %d users at a time", MAXVEC-1);
                     user = vec[vecp++] = cp;
                    continue;
 
                     user = vec[vecp++] = cp;
                    continue;
 
@@ -161,7 +161,7 @@ main (int argc, char **argv)
 
                case SASLMECHSW:
                    if (!(saslmech = *argp++) || *saslmech == '-')
 
                case SASLMECHSW:
                    if (!(saslmech = *argp++) || *saslmech == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case INITTLSSW:
                    continue;
 
                case INITTLSSW:
@@ -183,20 +183,20 @@ main (int argc, char **argv)
                case AUTHSERVICESW:
 #ifdef OAUTH_SUPPORT
                    if (!(auth_svc = *argp++) || *auth_svc == '-')
                case AUTHSERVICESW:
 #ifdef OAUTH_SUPPORT
                    if (!(auth_svc = *argp++) || *auth_svc == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
 #else
 #else
-                   adios (NULL, "not built with OAuth support");
+                   die("not built with OAuth support");
 #endif
                    continue;
 
                case PROXYSW:
                    if (!(proxy = *argp++) || *proxy == '-')
 #endif
                    continue;
 
                case PROXYSW:
                    if (!(proxy = *argp++) || *proxy == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
            }
        }
        if (vecp >= MAXVEC-1)
                    continue;
            }
        }
        if (vecp >= MAXVEC-1)
-           adios (NULL, "you can only check %d users at a time", MAXVEC-1);
+           die("you can only check %d users at a time", MAXVEC-1);
         vec[vecp++] = cp;
     }
 
         vec[vecp++] = cp;
     }
 
@@ -243,7 +243,7 @@ main (int argc, char **argv)
            if (!geteuid() || NULL == (home = getenv("HOME"))) {
                pw = getpwnam (user);
                if (pw == NULL)
            if (!geteuid() || NULL == (home = getenv("HOME"))) {
                pw = getpwnam (user);
                if (pw == NULL)
-                   adios (NULL, "unable to get information about user");
+                   die("unable to get information about user");
                home = pw->pw_dir;
            }
            status = checkmail (user, home, datesw, notifysw, 1);
                home = pw->pw_dir;
            }
            status = checkmail (user, home, datesw, notifysw, 1);
@@ -284,7 +284,7 @@ donote (char *cp, int ntflag)
            ambigsw (cp, ntswitches);
            done (1);
        case UNKWNSW: 
            ambigsw (cp, ntswitches);
            done (1);
        case UNKWNSW: 
-           adios (NULL, "-%snotify %s unknown", ntflag ? "" : "no", cp);
+           die("-%snotify %s unknown", ntflag ? "" : "no", cp);
 
        case NALLSW: 
            return NT_ALL;
 
        case NALLSW: 
            return NT_ALL;
@@ -348,11 +348,11 @@ remotemail (char *host, char *port, char *user, char *proxy, int notifysw,
 
     if (auth_svc == NULL) {
        if (saslmech  &&  ! strcasecmp(saslmech, "xoauth2")) {
 
     if (auth_svc == NULL) {
        if (saslmech  &&  ! strcasecmp(saslmech, "xoauth2")) {
-           adios (NULL, "must specify -authservice with -saslmech xoauth2");
+           die("must specify -authservice with -saslmech xoauth2");
        }
     } else {
        if (user == NULL) {
        }
     } else {
        if (user == NULL) {
-           adios (NULL, "must specify -user with -saslmech xoauth2");
+           die("must specify -user with -saslmech xoauth2");
        }
     }
 
        }
     }
 
index d608883..2d035a1 100644 (file)
--- a/uip/new.c
+++ b/uip/new.c
@@ -176,14 +176,14 @@ get_msgnums(char *folder, char *sequences[])
                 continue;
 
             case BODY:
                 continue;
 
             case BODY:
-                adios (NULL, "no blank lines are permitted in %s", seqfile);
+                die("no blank lines are permitted in %s", seqfile);
                 break;
 
             case FILEEOF:
                 break;
 
             default:
                 break;
 
             case FILEEOF:
                 break;
 
             default:
-                adios (NULL, "%s is poorly formatted", seqfile);
+                die("%s is poorly formatted", seqfile);
         }
         break;  /* break from for loop */
     }
         }
         break;  /* break from for loop */
     }
@@ -274,7 +274,7 @@ check_folders(struct node **first, struct node **last,
     } else {
        fp = fopen(folders, "r");
        if (fp  == NULL) {
     } else {
        fp = fopen(folders, "r");
        if (fp  == NULL) {
-           adios(NULL, "failed to read %s", folders);
+           die("failed to read %s", folders);
        }
        while (vfgets(fp, &line) == OK) {
            len = strlen(line) - 1;
        }
        while (vfgets(fp, &line) == OK) {
            len = strlen(line) - 1;
@@ -459,7 +459,7 @@ main(int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
-               adios (NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW:
                snprintf (help, sizeof(help), "%s [switches] [sequences]",
 
            case HELPSW:
                snprintf (help, sizeof(help), "%s [switches] [sequences]",
@@ -472,11 +472,11 @@ main(int argc, char **argv)
 
            case FOLDERSSW:
                if (!(folders = *argp++) || *folders == '-')
 
            case FOLDERSSW:
                if (!(folders = *argp++) || *folders == '-')
-                   adios(NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            case MODESW:
                if (!(invo_name = *argp++) || *invo_name == '-')
                continue;
            case MODESW:
                if (!(invo_name = *argp++) || *invo_name == '-')
-                   adios(NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                invo_name = r1bindex(invo_name, '/');
                continue;
            }
                invo_name = r1bindex(invo_name, '/');
                continue;
            }
@@ -508,7 +508,7 @@ main(int argc, char **argv)
        /* no sequence arguments; use unseen */
        unseen = context_find(usequence);
        if (unseen == NULL || unseen[0] == '\0') {
        /* no sequence arguments; use unseen */
        unseen = context_find(usequence);
        if (unseen == NULL || unseen[0] == '\0') {
-           adios(NULL, "must specify sequences or set %s", usequence);
+           die("must specify sequences or set %s", usequence);
        }
        for (ap = brkstring(unseen, " ", "\n"); *ap; ap++) {
            svector_push_back (sequences, *ap);
        }
        for (ap = brkstring(unseen, " ", "\n"); *ap; ap++) {
            svector_push_back (sequences, *ap);
index 4d25c38..1dce11e 100644 (file)
@@ -62,7 +62,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
@@ -75,9 +75,9 @@ main (int argc, char **argv)
 
                case FILESW: 
                    if (file)
 
                case FILESW: 
                    if (file)
-                       adios (NULL, "only one file at a time!");
+                       die("only one file at a time!");
                    if (!(file = *argp++) || *file == '-')
                    if (!(file = *argp++) || *file == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case MBOXSW:
                    continue;
 
                case MBOXSW:
@@ -90,7 +90,7 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
            folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
            folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
@@ -129,11 +129,11 @@ main (int argc, char **argv)
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
-       adios (NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     /* check for empty folder */
     if (mp->nummsg == 0)
 
     /* check for empty folder */
     if (mp->nummsg == 0)
-       adios (NULL, "no messages in %s", folder);
+       die("no messages in %s", folder);
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
index d252f3c..0a1ea24 100644 (file)
@@ -90,7 +90,7 @@ main (int argc, char **argv)
                listsw = 0;     /* HACK */
                done (1);
            case UNKWNSW: 
                listsw = 0;     /* HACK */
                done (1);
            case UNKWNSW: 
-               adios (NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
@@ -119,11 +119,11 @@ main (int argc, char **argv)
                vec[vecp++] = --cp;
            pattern:
                if (!(cp = *argp++))/* allow -xyz arguments */
                vec[vecp++] = --cp;
            pattern:
                if (!(cp = *argp++))/* allow -xyz arguments */
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                vec[vecp++] = cp;
                continue;
            case OTHRSW: 
                vec[vecp++] = cp;
                continue;
            case OTHRSW: 
-               adios (NULL, "internal error!");
+               die("internal error!");
 
            case ANDSW:
            case ORSW:
 
            case ANDSW:
            case ORSW:
@@ -135,7 +135,7 @@ main (int argc, char **argv)
 
            case SEQSW: 
                if (!(cp = *argp++) || *cp == '-')
 
            case SEQSW: 
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
 
                 if (!seq_nameok (cp))
                   done (1);
 
                 if (!seq_nameok (cp))
                   done (1);
@@ -173,7 +173,7 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
             folder = pluspath (cp);
        } else
                app_msgarg(&msgs, cp);
@@ -199,11 +199,11 @@ main (int argc, char **argv)
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 0)))
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 0)))
-       adios (NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     /* check for empty folder */
     if (mp->nummsg == 0)
 
     /* check for empty folder */
     if (mp->nummsg == 0)
-       adios (NULL, "no messages in %s", folder);
+       die("no messages in %s", folder);
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
@@ -218,7 +218,7 @@ main (int argc, char **argv)
        listsw = !seqp;
 
     if (publicsw == 1 && is_readonly(mp))
        listsw = !seqp;
 
     if (publicsw == 1 && is_readonly(mp))
-       adios (NULL, "folder %s is read-only, so -public not allowed", folder);
+       die("folder %s is read-only, so -public not allowed", folder);
 
     if (!pcompile (vec, NULL))
        done (1);
 
     if (!pcompile (vec, NULL))
        done (1);
@@ -258,7 +258,7 @@ main (int argc, char **argv)
     }
 
     if (nums.size >= mp->numsel)
     }
 
     if (nums.size >= mp->numsel)
-       adios (NULL, "no messages match specification");
+       die("no messages match specification");
 
     /*
      * So, what's happening here?
 
     /*
      * So, what's happening here?
@@ -271,7 +271,7 @@ main (int argc, char **argv)
      */
 
     if (!(mp2 = folder_read (folder, 1)))
      */
 
     if (!(mp2 = folder_read (folder, 1)))
-       adios (NULL, "unable to reread folder %s", folder);
+       die("unable to reread folder %s", folder);
 
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
        if (!m_convert (mp2, msgs.msgs[msgnum]))
 
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
        if (!m_convert (mp2, msgs.msgs[msgnum]))
index 2eddab7..a518479 100644 (file)
@@ -958,7 +958,7 @@ TWSaction(struct nexus *n, FILE *fp, int msgnum, long start, long stop)
                return 0;
 
            default: 
                return 0;
 
            default: 
-               adios (NULL, "internal error -- you lose");
+               die("internal error -- you lose");
        }
        break;
     }
        }
        break;
     }
index 93531c9..dbe936b 100644 (file)
@@ -339,7 +339,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches] file", invo_name);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches] file", invo_name);
@@ -351,7 +351,7 @@ main (int argc, char **argv)
 
                case LIBSW:
                    if (!(cp = *argp++) || *cp == '-')
 
                case LIBSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    /* create a minimal context */
                    if (context_foil (cp) == -1)
                        done (1);
                    /* create a minimal context */
                    if (context_foil (cp) == -1)
                        done (1);
@@ -359,9 +359,9 @@ main (int argc, char **argv)
 
                case ALIASW: 
                    if (!(cp = *argp++) || *cp == '-')
 
                case ALIASW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    if ((state = alias (cp)) != AK_OK)
                    if ((state = alias (cp)) != AK_OK)
-                       adios (NULL, "aliasing error in %s - %s",
+                       die("aliasing error in %s - %s",
                                cp, akerror (state));
                    continue;
 
                                cp, akerror (state));
                    continue;
 
@@ -382,7 +382,7 @@ main (int argc, char **argv)
 
                case FILTSW:
                    if (!(filter = *argp++) || *filter == '-')
 
                case FILTSW:
                    if (!(filter = *argp++) || *filter == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    mime = 0;
                    continue;
                case NFILTSW:
                    mime = 0;
                    continue;
                case NFILTSW:
@@ -438,25 +438,25 @@ main (int argc, char **argv)
 
                case WIDTHSW: 
                    if (!(cp = *argp++) || *cp == '-')
 
                case WIDTHSW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    if ((outputlinelen = atoi (cp)) < 10)
                    if ((outputlinelen = atoi (cp)) < 10)
-                       adios (NULL, "impossible width %d", outputlinelen);
+                       die("impossible width %d", outputlinelen);
                    continue;
 
                case ANNOSW: 
                    if (!(cp = *argp++) || *cp == '-')
                    continue;
 
                case ANNOSW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    if ((pfd = atoi (cp)) <= 2)
                    if ((pfd = atoi (cp)) <= 2)
-                       adios (NULL, "bad argument %s %s", argp[-2], cp);
+                       die("bad argument %s %s", argp[-2], cp);
                    continue;
 
                case CLIESW:
                    if (!(clientsw = *argp++) || *clientsw == '-')
                    continue;
 
                case CLIESW:
                    if (!(clientsw = *argp++) || *clientsw == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
                case SERVSW:
                    if (!(serversw = *argp++) || *serversw == '-')
                    continue;
                case SERVSW:
                    if (!(serversw = *argp++) || *serversw == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
                case SNOOPSW:
                    snoop++;
                    continue;
                case SNOOPSW:
                    snoop++;
@@ -464,7 +464,7 @@ main (int argc, char **argv)
 
                case PARTSW:
                    if (!(partno = *argp++) || *partno == '-')
 
                case PARTSW:
                    if (!(partno = *argp++) || *partno == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case SASLSW:
                    continue;
 
                case SASLSW:
@@ -477,12 +477,12 @@ main (int argc, char **argv)
 
                case SASLMECHSW:
                    if (!(saslmech = *argp++) || *saslmech == '-')
 
                case SASLMECHSW:
                    if (!(saslmech = *argp++) || *saslmech == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case AUTHSERVICESW:
                    if (!(auth_svc = *argp++) || *auth_svc == '-')
                    continue;
 
                case AUTHSERVICESW:
                    if (!(auth_svc = *argp++) || *auth_svc == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    oauth_flag++;
                    continue;
 
                    oauth_flag++;
                    continue;
 
@@ -497,7 +497,7 @@ main (int argc, char **argv)
                    int i;
 
                    if (!(cp = *argp++) || *cp == '-')
                    int i;
 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
 
                    for (i = 0; oauthswitches[i].profname != NULL; i++) {
                        if (oauthswitches[i].switchnum == swnum) {
 
                    for (i = 0; oauthswitches[i].profname != NULL; i++) {
                        if (oauthswitches[i].switchnum == swnum) {
@@ -507,7 +507,7 @@ main (int argc, char **argv)
                    }
 
                    if (oauthswitches[i].profname == NULL)
                    }
 
                    if (oauthswitches[i].profname == NULL)
-                       adios (NULL, "internal error: cannot map switch %s "
+                       die("internal error: cannot map switch %s "
                               "to profile entry", argp[-2]);
 
                    oauth_flag++;
                               "to profile entry", argp[-2]);
 
                    oauth_flag++;
@@ -516,12 +516,12 @@ main (int argc, char **argv)
 
                case USERSW:
                    if (!(user = *argp++) || *user == '-')
 
                case USERSW:
                    if (!(user = *argp++) || *user == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case PORTSW:
                    if (!(port = *argp++) || *port == '-')
                    continue;
 
                case PORTSW:
                    if (!(port = *argp++) || *port == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case TLSSW:
                    continue;
 
                case TLSSW:
@@ -546,55 +546,55 @@ main (int argc, char **argv)
 
                case FILEPROCSW:
                    if (!(cp = *argp++) || *cp == '-')
 
                case FILEPROCSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    fileproc = cp;
                    continue;
 
                case MHLPROCSW:
                    if (!(cp = *argp++) || *cp == '-')
                    fileproc = cp;
                    continue;
 
                case MHLPROCSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    mhlproc = cp;
                    continue;
 
                case MTSSM:
                    if (!(cp = *argp++) || *cp == '-')
                    mhlproc = cp;
                    continue;
 
                case MTSSM:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                     sendmail = cp;
                    continue;
 
                case MTSSW:
                    if (!(cp = *argp++) || *cp == '-')
                     sendmail = cp;
                    continue;
 
                case MTSSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                     save_mts_method (cp);
                    continue;
 
                case CREDENTIALSSW: {
                    if (!(cp = *argp++) || *cp == '-')
                     save_mts_method (cp);
                    continue;
 
                case CREDENTIALSSW: {
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    add_profile_entry ("credentials", cp);
                    continue;
                }
 
                case MESSAGEIDSW:
                    if (!(cp = *argp++) || *cp == '-')
                    add_profile_entry ("credentials", cp);
                    continue;
                }
 
                case MESSAGEIDSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                     if (save_message_id_style (cp) != 0)
                     if (save_message_id_style (cp) != 0)
-                       adios (NULL, "unsupported messageid \"%s\"", cp);
+                       die("unsupported messageid \"%s\"", cp);
                    continue;
            }
        }
        if (msg)
                    continue;
            }
        }
        if (msg)
-           adios (NULL, "only one message at a time!");
+           die("only one message at a time!");
         msg = cp;
     }
 
     alias (AliasFile);
 
     if (!msg)
         msg = cp;
     }
 
     alias (AliasFile);
 
     if (!msg)
-       adios (NULL, "usage: %s [switches] file", invo_name);
+       die("usage: %s [switches] file", invo_name);
 
     if (outputlinelen < 10)
 
     if (outputlinelen < 10)
-       adios (NULL, "impossible width %d", outputlinelen);
+       die("impossible width %d", outputlinelen);
 
     if ((in = fopen (msg, "r")) == NULL)
        adios (msg, "unable to open");
 
     if ((in = fopen (msg, "r")) == NULL)
        adios (msg, "unable to open");
@@ -610,7 +610,7 @@ main (int argc, char **argv)
        } else {
            char *cp = m_mktemp2(NULL, invo_name, NULL, &out);
            if (cp == NULL) {
        } else {
            char *cp = m_mktemp2(NULL, invo_name, NULL, &out);
            if (cp == NULL) {
-               adios(NULL, "unable to create temporary file in %s",
+               die("unable to create temporary file in %s",
                      get_temp_dir());
            }
             strncpy(tmpfil, cp, sizeof(tmpfil));
                      get_temp_dir());
            }
             strncpy(tmpfil, cp, sizeof(tmpfil));
@@ -654,10 +654,10 @@ main (int argc, char **argv)
 
            case LENERR: 
            case FMTERR: 
 
            case LENERR: 
            case FMTERR: 
-               adios (NULL, "message format error in component #%d", compnum);
+               die("message format error in component #%d", compnum);
 
            default: 
 
            default: 
-               adios (NULL, "getfld() returned %d", state);
+               die("getfld() returned %d", state);
        }
        break;
     }
        }
        break;
     }
@@ -727,7 +727,7 @@ main (int argc, char **argv)
        char sbuf[128];
 
        if (auth_svc == NULL) {
        char sbuf[128];
 
        if (auth_svc == NULL) {
-           adios(NULL, "No authentication service given with -authservice");
+           die("No authentication service given with -authservice");
        }
 
        for (i = 0; oauthswitches[i].profname != NULL; i++) {
        }
 
        for (i = 0; oauthswitches[i].profname != NULL; i++) {
@@ -1000,8 +1000,7 @@ putfmt (char *name, char *str, int *eai, FILE *out)
                           aliases and put them in Bcc:, but then
                           they'd have the Blind-Carbon-Copy
                           indication. */
                           aliases and put them in Bcc:, but then
                           they'd have the Blind-Carbon-Copy
                           indication. */
-                       adios (NULL,
-                              "blind lists not compatible with"
+                       die(                           "blind lists not compatible with"
                               " sendmail/pipe");
                    }
 
                               " sendmail/pipe");
                    }
 
@@ -1211,9 +1210,9 @@ finish_headers (FILE *out)
     }
 
     if (badmsg)
     }
 
     if (badmsg)
-       adios (NULL, "re-format message and try again");
+       die("re-format message and try again");
     if (!recipients)
     if (!recipients)
-       adios (NULL, "no addressees");
+       die("no addressees");
 }
 
 
 }
 
 
@@ -1447,7 +1446,7 @@ insert_fcc (struct headers *hdr, char *pp)
        return;
 
     if (fccind >= FCCS)
        return;
 
     if (fccind >= FCCS)
-       adios (NULL, "too many %ss", hdr->value);
+       die("too many %ss", hdr->value);
     fccfold[fccind++] = mh_xstrdup(cp);
 }
 
     fccfold[fccind++] = mh_xstrdup(cp);
 }
 
@@ -1465,7 +1464,7 @@ make_bcc_file (int dashstuff)
     char *tfile = NULL, *program;
 
     if ((tfile = m_mktemp2(NULL, "bccs", NULL, &out)) == NULL) {
     char *tfile = NULL, *program;
 
     if ((tfile = m_mktemp2(NULL, "bccs", NULL, &out)) == NULL) {
-       adios(NULL, "unable to create temporary file in %s", get_temp_dir());
+       die("unable to create temporary file in %s", get_temp_dir());
     }
     strncpy (bccfil, tfile, sizeof(bccfil));
 
     }
     strncpy (bccfil, tfile, sizeof(bccfil));
 
@@ -1490,12 +1489,12 @@ make_bcc_file (int dashstuff)
         * prefix and check again.
         */
        if ((cp = strchr(prefix, 'a')) == NULL)
         * prefix and check again.
         */
        if ((cp = strchr(prefix, 'a')) == NULL)
-           adios (NULL, "lost prefix start");
+           die("lost prefix start");
        while (find_prefix () == NOTOK) {
            if (*cp < 'z')
                (*cp)++;
            else if (*++cp == 0)
        while (find_prefix () == NOTOK) {
            if (*cp < 'z')
                (*cp)++;
            else if (*++cp == 0)
-                adios (NULL, "can't find a unique delimiter string");
+                die("can't find a unique delimiter string");
             else
                 (*cp)++;
        }
             else
                 (*cp)++;
        }
index 3a51dbe..4336ff2 100644 (file)
@@ -79,7 +79,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buffer, sizeof(buffer), "%s [switches] file",
 
                case HELPSW: 
                    snprintf (buffer, sizeof(buffer), "%s [switches] file",
@@ -92,11 +92,11 @@ main (int argc, char **argv)
 
                case ERASESW: 
                    if (!(erasep = *argp++) || *erasep == '-')
 
                case ERASESW: 
                    if (!(erasep = *argp++) || *erasep == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
                case KILLSW: 
                    if (!(killp = *argp++) || *killp == '-')
                    continue;
                case KILLSW: 
                    if (!(killp = *argp++) || *killp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case PREPSW: 
                    continue;
 
                case PREPSW: 
@@ -133,12 +133,12 @@ main (int argc, char **argv)
        }
 
     if (!drft)
        }
 
     if (!drft)
-       adios (NULL, "usage: %s [switches] file", invo_name);
+       die("usage: %s [switches] file", invo_name);
     if ((in = fopen (drft, "r")) == NULL)
        adios (drft, "unable to open");
 
     if ((tmpfil = m_mktemp2(NULL, invo_name, NULL, &out)) == NULL) {
     if ((in = fopen (drft, "r")) == NULL)
        adios (drft, "unable to open");
 
     if ((tmpfil = m_mktemp2(NULL, invo_name, NULL, &out)) == NULL) {
-       adios(NULL, "unable to create temporary file in %s", get_temp_dir());
+       die("unable to create temporary file in %s", get_temp_dir());
     }
 
     /*
     }
 
     /*
@@ -280,7 +280,7 @@ abort:
                break;
 
            default: 
                break;
 
            default: 
-               adios (NULL, "skeleton is poorly formatted");
+               die("skeleton is poorly formatted");
        }
        break;
     }
        }
        break;
     }
index bf301cc..eaa66bf 100644 (file)
@@ -85,7 +85,7 @@ main (int argc, char **argv)
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
            }
        }
                    continue;
            }
        }
@@ -93,13 +93,13 @@ main (int argc, char **argv)
     }
 
     if (addrs == NULL)
     }
 
     if (addrs == NULL)
-       adios (NULL, "usage: %s [switches] [switches for postproc] address ...",
+       die("usage: %s [switches] [switches for postproc] address ...",
            invo_name);
 
     umask (~m_gmprot ());
 
     if ((tfile = m_mktemp2(NULL, invo_name, NULL, &fp)) == NULL) {
            invo_name);
 
     umask (~m_gmprot ());
 
     if ((tfile = m_mktemp2(NULL, invo_name, NULL, &fp)) == NULL) {
-       adios(NULL, "unable to create temporary file in %s", get_temp_dir());
+       die("unable to create temporary file in %s", get_temp_dir());
     }
     strncpy (tmpfil, tfile, sizeof(tmpfil));
 
     }
     strncpy (tmpfil, tfile, sizeof(tmpfil));
 
@@ -107,7 +107,7 @@ main (int argc, char **argv)
     fseek (fp, 0L, SEEK_SET);
 
     if ((tfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
     fseek (fp, 0L, SEEK_SET);
 
     if ((tfile = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
-       adios(NULL, "unable to create temporary file in %s", get_temp_dir());
+       die("unable to create temporary file in %s", get_temp_dir());
     }
     strncpy (drft, tfile, sizeof(tmpfil));
 
     }
     strncpy (drft, tfile, sizeof(tmpfil));
 
@@ -227,7 +227,7 @@ rcvdistout (FILE *inb, char *form, char *addrs)
                goto finished;
 
            default: 
                goto finished;
 
            default: 
-               adios (NULL, "m_getfld2() returned %d", state);
+               die("m_getfld2() returned %d", state);
        }
     }
 finished: ;
        }
     }
 finished: ;
index ec1342e..f641667 100644 (file)
@@ -54,7 +54,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches] file", invo_name);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches] file", invo_name);
@@ -73,12 +73,12 @@ main (int argc, char **argv)
            }
        }
        if (file)
            }
        }
        if (file)
-           adios (NULL, "only one file at a time!");
+           die("only one file at a time!");
         file = cp;
     }
 
     if (!file)
         file = cp;
     }
 
     if (!file)
-       adios (NULL, "%s [switches] file", invo_name);
+       die("%s [switches] file", invo_name);
 
     rewind (stdin);
 
 
     rewind (stdin);
 
index 0238818..a3f4d3c 100644 (file)
@@ -73,7 +73,7 @@ main (int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW: 
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW: 
-               adios (NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [+folder] [switches]",
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [+folder] [switches]",
@@ -86,7 +86,7 @@ main (int argc, char **argv)
 
            case SEQSW: 
                if (!(cp = *argp++) || *cp == '-')
 
            case SEQSW: 
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument name to %s", argp[-2]);
+                   die("missing argument name to %s", argp[-2]);
 
                svector_push_back (seqs, cp);
                seqp++;
 
                svector_push_back (seqs, cp);
                seqp++;
@@ -123,10 +123,10 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else {
             folder = pluspath (cp);
        } else {
-           adios (NULL, "usage: %s [+folder] [switches]", invo_name);
+           die("usage: %s [+folder] [switches]", invo_name);
        }
     }
 
        }
     }
 
@@ -143,9 +143,9 @@ main (int argc, char **argv)
        if (errno != ENOENT)
            adios (maildir, "error on folder");
        if (!create)
        if (errno != ENOENT)
            adios (maildir, "error on folder");
        if (!create)
-           adios (NULL, "folder %s doesn't exist", maildir);
+           die("folder %s doesn't exist", maildir);
        if (!makedir (maildir))
        if (!makedir (maildir))
-           adios (NULL, "unable to create folder %s", maildir);
+           die("unable to create folder %s", maildir);
     }
 
     if (chdir (maildir) == NOTOK)
     }
 
     if (chdir (maildir) == NOTOK)
@@ -160,7 +160,7 @@ main (int argc, char **argv)
     /* create a temporary file */
     tmpfilenam = m_mktemp (invo_name, &fd, NULL);
     if (tmpfilenam == NULL) {
     /* create a temporary file */
     tmpfilenam = m_mktemp (invo_name, &fd, NULL);
     if (tmpfilenam == NULL) {
-       adios(NULL, "unable to create temporary file in %s", get_temp_dir());
+       die("unable to create temporary file in %s", get_temp_dir());
     }
     chmod (tmpfilenam, m_gmprot());
 
     }
     chmod (tmpfilenam, m_gmprot());
 
@@ -185,7 +185,7 @@ main (int argc, char **argv)
      * read folder and create message structure
      */
     if (!(mp = folder_read (folder, 1)))
      * read folder and create message structure
      */
     if (!(mp = folder_read (folder, 1)))
-       adios (NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     /*
      * Link message into folder, and possibly add
 
     /*
      * Link message into folder, and possibly add
index f1368f7..cb164b5 100644 (file)
@@ -108,18 +108,18 @@ main (int argc, char **argv)
 
                case FORMSW:
                    if (!(form = *argp++) || *form == '-')
 
                case FORMSW:
                    if (!(form = *argp++) || *form == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    format = NULL;
                    continue;
                case FMTSW:
                    if (!(format = *argp++) || *format == '-')
                    format = NULL;
                    continue;
                case FMTSW:
                    if (!(format = *argp++) || *format == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    form = NULL;
                    continue;
 
                case WIDTHSW:
                    if (!(cp = *argp++) || *cp == '-')
                    form = NULL;
                    continue;
 
                case WIDTHSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios(NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    width = atoi(cp);
                    continue;
                 case NLSW:
                    width = atoi(cp);
                    continue;
                 case NLSW:
index 3035f2c..4cba2e1 100644 (file)
@@ -84,7 +84,7 @@ main (int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
-               adios (NULL, "-%s unknown\n", cp);
+               die("-%s unknown\n", cp);
 
            case HELPSW:
                snprintf (buf, sizeof(buf), "%s [msgs] [switches] +folder ...",
 
            case HELPSW:
                snprintf (buf, sizeof(buf), "%s [msgs] [switches] +folder ...",
@@ -125,29 +125,29 @@ main (int argc, char **argv)
 
            case SRCSW:
                if (folder)
 
            case SRCSW:
                if (folder)
-                   adios (NULL, "only one source folder at a time!");
+                   die("only one source folder at a time!");
                if (!(cp = *argp++) || *cp == '-')
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                folder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                               *cp != '@' ? TFOLDER : TSUBCWF);
                continue;
            case DRAFTSW:
                if (filep > NFOLDERS)
                folder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                               *cp != '@' ? TFOLDER : TSUBCWF);
                continue;
            case DRAFTSW:
                if (filep > NFOLDERS)
-                   adios (NULL, "only %d files allowed!", NFOLDERS);
+                   die("only %d files allowed!", NFOLDERS);
                isdf = 0;
                files[filep++] = mh_xstrdup(m_draft(NULL, NULL, 1, &isdf));
                continue;
            case FILESW:
                if (filep > NFOLDERS)
                isdf = 0;
                files[filep++] = mh_xstrdup(m_draft(NULL, NULL, 1, &isdf));
                continue;
            case FILESW:
                if (filep > NFOLDERS)
-                   adios (NULL, "only %d files allowed!", NFOLDERS);
+                   die("only %d files allowed!", NFOLDERS);
                if (!(cp = *argp++) || *cp == '-')
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                files[filep++] = path (cp, TFILE);
                continue;
 
            case RPROCSW:
                if (!(rmmproc = *argp++) || *rmmproc == '-')
                files[filep++] = path (cp, TFILE);
                continue;
 
            case RPROCSW:
                if (!(rmmproc = *argp++) || *rmmproc == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            case NRPRCSW:
                rmmproc = NULL;
                continue;
            case NRPRCSW:
                rmmproc = NULL;
@@ -156,7 +156,7 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (foldp > NFOLDERS)
        }
        if (*cp == '+' || *cp == '@') {
            if (foldp > NFOLDERS)
-               adios (NULL, "only %d folders allowed!", NFOLDERS);
+               die("only %d folders allowed!", NFOLDERS);
            folders[foldp++].f_name =
                pluspath (cp);
        } else
            folders[foldp++].f_name =
                pluspath (cp);
        } else
@@ -166,14 +166,14 @@ main (int argc, char **argv)
     if (!context_find ("path"))
        free (path ("./", TFOLDER));
     if (foldp == 0)
     if (!context_find ("path"))
        free (path ("./", TFOLDER));
     if (foldp == 0)
-       adios (NULL, "no folder specified");
+       die("no folder specified");
 
     /*
      * We are refiling a file to the folders
      */
     if (filep > 0) {
        if (folder || msgs.size)
 
     /*
      * We are refiling a file to the folders
      */
     if (filep > 0) {
        if (folder || msgs.size)
-           adios (NULL, "use -file or some messages, not both");
+           die("use -file or some messages, not both");
        opnfolds (NULL, folders, foldp);
        for (i = 0; i < filep; i++)
            if (m_file (0, files[i], 0, folders, foldp, preserve, 0))
        opnfolds (NULL, folders, foldp);
        for (i = 0; i < filep; i++)
            if (m_file (0, files[i], 0, folders, foldp, preserve, 0))
@@ -195,11 +195,11 @@ main (int argc, char **argv)
 
     /* read source folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
 
     /* read source folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
-       adios (NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     /* check for empty folder */
     if (mp->nummsg == 0)
 
     /* check for empty folder */
     if (mp->nummsg == 0)
-       adios (NULL, "no messages in %s", folder);
+       die("no messages in %s", folder);
 
     /* parse the message range/sequence/name and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
     /* parse the message range/sequence/name and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
@@ -296,7 +296,7 @@ opnfolds (struct msgs *src_folder, struct st_fold *folders, int nfolders)
            if (chdir (nmaildir) == NOTOK)
                adios (nmaildir, "unable to change directory to");
            if (!(mp = folder_read (fp->f_name, 1)))
            if (chdir (nmaildir) == NOTOK)
                adios (nmaildir, "unable to change directory to");
            if (!(mp = folder_read (fp->f_name, 1)))
-               adios (NULL, "unable to read folder %s", fp->f_name);
+               die("unable to read folder %s", fp->f_name);
            mp->curmsg = 0;
 
            fp->f_mp = mp;
            mp->curmsg = 0;
 
            fp->f_mp = mp;
index 79a4522..ca35a9d 100644 (file)
@@ -146,7 +146,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s: [+folder] [msg] [switches]",
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s: [+folder] [msg] [switches]",
@@ -173,18 +173,18 @@ main (int argc, char **argv)
 
                case CCSW: 
                    if (!(cp = *argp++) || *cp == '-')
 
                case CCSW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    docc (cp, 1);
                    continue;
                case NCCSW: 
                    if (!(cp = *argp++) || *cp == '-')
                    docc (cp, 1);
                    continue;
                case NCCSW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    docc (cp, 0);
                    continue;
 
                case EDITRSW: 
                    if (!(ed = *argp++) || *ed == '-')
                    docc (cp, 0);
                    continue;
 
                case EDITRSW: 
                    if (!(ed = *argp++) || *ed == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    nedit = 0;
                    continue;
                case NEDITSW:
                    nedit = 0;
                    continue;
                case NEDITSW:
@@ -196,10 +196,10 @@ main (int argc, char **argv)
                     size_t i;
 
                    if (!(type = *argp++)) {
                     size_t i;
 
                    if (!(type = *argp++)) {
-                       adios (NULL, "missing type argument to %s", argp[-2]);
+                       die("missing type argument to %s", argp[-2]);
                     }
                    if (!(cp = *argp++)) {
                     }
                    if (!(cp = *argp++)) {
-                       adios (NULL, "missing argstring argument to %s",
+                       die("missing argstring argument to %s",
                               argp[-3]);
                     }
 
                               argp[-3]);
                     }
 
@@ -221,7 +221,7 @@ main (int argc, char **argv)
 
                case WHATSW: 
                    if (!(whatnowproc = *argp++) || *whatnowproc == '-')
 
                case WHATSW: 
                    if (!(whatnowproc = *argp++) || *whatnowproc == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    nwhat = 0;
                    continue;
                case BILDSW: 
                    nwhat = 0;
                    continue;
                case BILDSW: 
@@ -233,7 +233,7 @@ main (int argc, char **argv)
 
                case FCCSW: 
                    if (!(cp = *argp++) || *cp == '-')
 
                case FCCSW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    dp = NULL;
                    if (*cp == '@')
                        cp = dp = path (cp + 1, TSUBCWF);
                    dp = NULL;
                    if (*cp == '@')
                        cp = dp = path (cp + 1, TSUBCWF);
@@ -245,20 +245,20 @@ main (int argc, char **argv)
 
                case FILESW: 
                    if (file)
 
                case FILESW: 
                    if (file)
-                       adios (NULL, "only one file at a time!");
+                       die("only one file at a time!");
                    if (!(cp = *argp++) || *cp == '-')
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    file = path (cp, TFILE);
                    continue;
                case FILTSW:
                    if (!(cp = *argp++) || *cp == '-')
                    file = path (cp, TFILE);
                    continue;
                case FILTSW:
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    filter = mh_xstrdup(etcpath(cp));
                    mime = 0;
                    continue;
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
                    filter = mh_xstrdup(etcpath(cp));
                    mime = 0;
                    continue;
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case FRMTSW: 
                    continue;
 
                case FRMTSW: 
@@ -293,24 +293,24 @@ main (int argc, char **argv)
 
                case WIDTHSW: 
                    if (!(cp = *argp++) || *cp == '-')
 
                case WIDTHSW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    if ((outputlinelen = atoi (cp)) < 10)
                    if ((outputlinelen = atoi (cp)) < 10)
-                       adios (NULL, "impossible width %d", outputlinelen);
+                       die("impossible width %d", outputlinelen);
                    continue;
 
                case DFOLDSW: 
                    if (dfolder)
                    continue;
 
                case DFOLDSW: 
                    if (dfolder)
-                       adios (NULL, "only one draft folder at a time!");
+                       die("only one draft folder at a time!");
                    if (!(cp = *argp++) || *cp == '-')
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                                    *cp != '@' ? TFOLDER : TSUBCWF);
                    continue;
                case DMSGSW:
                    if (dmsg)
                    dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                                    *cp != '@' ? TFOLDER : TSUBCWF);
                    continue;
                case DMSGSW:
                    if (dmsg)
-                       adios (NULL, "only one draft message at a time!");
+                       die("only one draft message at a time!");
                    if (!(dmsg = *argp++) || *dmsg == '-')
                    if (!(dmsg = *argp++) || *dmsg == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
                case NDFLDSW: 
                    dfolder = NULL;
                    continue;
                case NDFLDSW: 
                    dfolder = NULL;
@@ -326,7 +326,7 @@ main (int argc, char **argv)
 
                case FMTPROCSW:
                    if (!(formatproc = *argp++) || *formatproc == '-')
 
                case FMTPROCSW:
                    if (!(formatproc = *argp++) || *formatproc == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    fmtproc = 1;
                    continue;
                case NFMTPROCSW:
                    fmtproc = 1;
                    continue;
                case NFMTPROCSW:
@@ -336,11 +336,11 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else {
            if (msg)
             folder = pluspath (cp);
        } else {
            if (msg)
-               adios (NULL, "only one message at a time!");
+               die("only one message at a time!");
             msg = cp;
        }
     }
             msg = cp;
        }
     }
@@ -357,7 +357,7 @@ main (int argc, char **argv)
     if (!context_find ("path"))
        free (path ("./", TFOLDER));
     if (file && (msg || folder))
     if (!context_find ("path"))
        free (path ("./", TFOLDER));
     if (file && (msg || folder))
-       adios (NULL, "can't mix files and folders/msgs");
+       die("can't mix files and folders/msgs");
 
 try_it_again:
 
 
 try_it_again:
 
@@ -413,11 +413,11 @@ try_it_again:
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 1)))
 
        /* read folder and create message structure */
        if (!(mp = folder_read (folder, 1)))
-           adios (NULL, "unable to read folder %s", folder);
+           die("unable to read folder %s", folder);
 
        /* check for empty folder */
        if (mp->nummsg == 0)
 
        /* check for empty folder */
        if (mp->nummsg == 0)
-           adios (NULL, "no messages in %s", folder);
+           die("no messages in %s", folder);
 
        /* parse the message range/sequence/name and set SELECTED */
        if (!m_convert (mp, msg))
 
        /* parse the message range/sequence/name and set SELECTED */
        if (!m_convert (mp, msg))
@@ -425,7 +425,7 @@ try_it_again:
        seq_setprev (mp);       /* set the previous-sequence */
 
        if (mp->numsel > 1)
        seq_setprev (mp);       /* set the previous-sequence */
 
        if (mp->numsel > 1)
-           adios (NULL, "only one message at a time!");
+           die("only one message at a time!");
 
        context_replace (pfolder, folder);      /* update current folder   */
        seq_setcur (mp, mp->lowsel);    /* update current message  */
 
        context_replace (pfolder, folder);      /* update current folder   */
        seq_setcur (mp, mp->lowsel);    /* update current message  */
@@ -483,7 +483,7 @@ docc (char *cp, int ccflag)
            ambigsw (cp, ccswitches);
            done (1);
        case UNKWNSW: 
            ambigsw (cp, ccswitches);
            done (1);
        case UNKWNSW: 
-           adios (NULL, "-%scc %s unknown", ccflag ? "" : "no", cp);
+           die("-%scc %s unknown", ccflag ? "" : "no", cp);
 
        case CTOSW: 
            ccto = ccflag;
 
        case CTOSW: 
            ccto = ccflag;
index 05997fd..966744c 100644 (file)
@@ -149,7 +149,7 @@ replout (FILE *inb, char *msg, char *drft, struct msgs *mp, int outputlinelen,
                goto finished;
 
            default:
                goto finished;
 
            default:
-               adios (NULL, "m_getfld2() returned %d", state);
+               die("m_getfld2() returned %d", state);
        }
     }
 
        }
     }
 
index 406d9a6..6faaa4f 100644 (file)
--- a/uip/rmf.c
+++ b/uip/rmf.c
@@ -52,7 +52,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [switches]",
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [switches]",
@@ -73,10 +73,10 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else {
             folder = pluspath (cp);
        } else {
-           adios (NULL, "usage: %s [+folder] [switches]", invo_name);
+           die("usage: %s [+folder] [switches]", invo_name);
        }
     }
 
        }
     }
 
@@ -88,7 +88,7 @@ main (int argc, char **argv)
     }
     fp = m_mailpath(folder);
     if (!strcmp(fp, pwd()))
     }
     fp = m_mailpath(folder);
     if (!strcmp(fp, pwd()))
-       adios (NULL, "sorry, you can't remove the current working directory");
+       die("sorry, you can't remove the current working directory");
     free(fp);
 
     if (interactive == -1)
     free(fp);
 
     if (interactive == -1)
@@ -154,7 +154,7 @@ rmf (char *folder)
     }
 
     if ((dd = opendir (".")) == NULL)
     }
 
     if ((dd = opendir (".")) == NULL)
-       adios (NULL, "unable to read folder +%s", folder);
+       die("unable to read folder +%s", folder);
     others = 0;
 
     /*
     others = 0;
 
     /*
index 104d5d2..c49bf65 100644 (file)
--- a/uip/rmm.c
+++ b/uip/rmm.c
@@ -50,7 +50,7 @@ main (int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
-               adios (NULL, "-%s unknown\n", cp);
+               die("-%s unknown\n", cp);
 
            case HELPSW:
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
 
            case HELPSW:
                snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
@@ -70,7 +70,7 @@ main (int argc, char **argv)
 
             case RPROCSW:
                 if (!(rmmproc = *argp++) || *rmmproc == '-')
 
             case RPROCSW:
                 if (!(rmmproc = *argp++) || *rmmproc == '-')
-                    adios (NULL, "missing argument to %s", argp[-2]);
+                    die("missing argument to %s", argp[-2]);
                 continue;
             case NRPRCSW:
                 rmmproc = NULL;
                 continue;
             case NRPRCSW:
                 rmmproc = NULL;
@@ -79,7 +79,7 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else
             app_msgarg(&msgs, cp);
             folder = pluspath (cp);
        } else
             app_msgarg(&msgs, cp);
@@ -98,11 +98,11 @@ main (int argc, char **argv)
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
-       adios (NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     /* check for empty folder */
     if (mp->nummsg == 0)
 
     /* check for empty folder */
     if (mp->nummsg == 0)
-       adios (NULL, "no messages in %s", folder);
+       die("no messages in %s", folder);
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
index c9cf4ce..592cc0a 100644 (file)
@@ -69,7 +69,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
@@ -89,12 +89,12 @@ main (int argc, char **argv)
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    format = NULL;
                    continue;
                case FMTSW: 
                    if (!(format = *argp++) || *format == '-')
                    format = NULL;
                    continue;
                case FMTSW: 
                    if (!(format = *argp++) || *format == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    form = NULL;
                    continue;
 
                    form = NULL;
                    continue;
 
@@ -107,7 +107,7 @@ main (int argc, char **argv)
 
                case WIDTHSW: 
                    if (!(cp = *argp++) || *cp == '-')
 
                case WIDTHSW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    width = atoi (cp);
                    continue;
                case REVSW:
                    width = atoi (cp);
                    continue;
                case REVSW:
@@ -119,7 +119,7 @@ main (int argc, char **argv)
 
                case FILESW:
                    if (!(cp = *argp++) || (cp[0] == '-' && cp[1]))
 
                case FILESW:
                    if (!(cp = *argp++) || (cp[0] == '-' && cp[1]))
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    if (strcmp (file = cp, "-"))
                        file = path (cp, TFILE);
                    continue;
                    if (strcmp (file = cp, "-"))
                        file = path (cp, TFILE);
                    continue;
@@ -127,7 +127,7 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else
             app_msgarg(&msgs, cp);
             folder = pluspath (cp);
        } else
             app_msgarg(&msgs, cp);
@@ -146,9 +146,9 @@ main (int argc, char **argv)
      */
     if (file) {
        if (msgs.size)
      */
     if (file) {
        if (msgs.size)
-           adios (NULL, "\"msgs\" not allowed with -file");
+           die("\"msgs\" not allowed with -file");
        if (folder)
        if (folder)
-           adios (NULL, "\"+folder\" not allowed with -file");
+           die("\"+folder\" not allowed with -file");
 
        /* check if "file" is really stdin */
        if (strcmp (file, "-") == 0) {
 
        /* check if "file" is really stdin */
        if (strcmp (file, "-") == 0) {
@@ -193,11 +193,11 @@ main (int argc, char **argv)
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
-       adios (NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     /* check for empty folder */
     if (mp->nummsg == 0)
 
     /* check for empty folder */
     if (mp->nummsg == 0)
-       adios (NULL, "no messages in %s", folder);
+       die("no messages in %s", folder);
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
@@ -263,7 +263,7 @@ main (int argc, char **argv)
                    break;
 
                default: 
                    break;
 
                default: 
-                   adios (NULL, "scan() botch (%d)", state);
+                   die("scan() botch (%d)", state);
 
                case SCNEOF: 
                    inform("message %d: empty", msgnum);
 
                case SCNEOF: 
                    inform("message %d: empty", msgnum);
index ea5cf26..1164698 100644 (file)
@@ -284,7 +284,7 @@ body:;
                goto finished;
 
            default: 
                goto finished;
 
            default: 
-               adios (NULL, "getfld() returned %d", state);
+               die("getfld() returned %d", state);
        }
     }
 
        }
     }
 
index 0546bf5..52fbbd1 100644 (file)
@@ -158,7 +158,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown\n", cp);
+                   die("-%s unknown\n", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [file] [switches]", invo_name);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [file] [switches]", invo_name);
@@ -174,15 +174,15 @@ main (int argc, char **argv)
 
                case DFOLDSW: 
                    if (dfolder)
 
                case DFOLDSW: 
                    if (dfolder)
-                       adios (NULL, "only one draft folder at a time!");
+                       die("only one draft folder at a time!");
                    if (!(cp = *argp++) || *cp == '-')
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                            *cp != '@' ? TFOLDER : TSUBCWF);
                    continue;
                case DMSGSW: 
                    if (!(cp = *argp++) || *cp == '-')
                    dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                            *cp != '@' ? TFOLDER : TSUBCWF);
                    continue;
                case DMSGSW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    msgs[msgp++] = cp;
                    continue;
                case NDFLDSW: 
                    msgs[msgp++] = cp;
                    continue;
                case NDFLDSW: 
@@ -199,7 +199,7 @@ main (int argc, char **argv)
 
                case SPLITSW: 
                    if (!(cp = *argp++) || sscanf (cp, "%d", &splitsw) != 1)
 
                case SPLITSW: 
                    if (!(cp = *argp++) || sscanf (cp, "%d", &splitsw) != 1)
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case UNIQSW: 
                    continue;
 
                case UNIQSW: 
@@ -264,7 +264,7 @@ main (int argc, char **argv)
                case USERSW:
                    vec[vecp++] = --cp;
                    if (!(cp = *argp++) || *cp == '-')
                case USERSW:
                    vec[vecp++] = --cp;
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    vec[vecp++] = cp;
                     user = cp;
                    continue;
                    vec[vecp++] = cp;
                     user = cp;
                    continue;
@@ -272,15 +272,15 @@ main (int argc, char **argv)
                case AUTHSERVICESW:
 #ifdef OAUTH_SUPPORT
                    if (!(auth_svc = *argp++) || *auth_svc == '-')
                case AUTHSERVICESW:
 #ifdef OAUTH_SUPPORT
                    if (!(auth_svc = *argp++) || *auth_svc == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
 #else
 #else
-                   adios (NULL, "not built with OAuth support");
+                   die("not built with OAuth support");
 #endif
                    continue;
 
                case SASLMECHSW:
                    if (!(saslmech = *argp) || *saslmech == '-')
 #endif
                    continue;
 
                case SASLMECHSW:
                    if (!(saslmech = *argp) || *saslmech == '-')
-                       adios (NULL, "missing argument to %s", argp[-1]);
+                       die("missing argument to %s", argp[-1]);
                    /* FALLTHRU */
 
                case ALIASW: 
                    /* FALLTHRU */
 
                case ALIASW: 
@@ -294,7 +294,7 @@ main (int argc, char **argv)
                case MESSAGEIDSW:
                    vec[vecp++] = --cp;
                    if (!(cp = *argp++) || *cp == '-')
                case MESSAGEIDSW:
                    vec[vecp++] = --cp;
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    vec[vecp++] = cp;
                    continue;
            }
                    vec[vecp++] = cp;
                    continue;
            }
@@ -354,11 +354,11 @@ main (int argc, char **argv)
 
        /* read folder and create message structure */
        if (!(mp = folder_read (dfolder, 1)))
 
        /* read folder and create message structure */
        if (!(mp = folder_read (dfolder, 1)))
-           adios (NULL, "unable to read folder %s", dfolder);
+           die("unable to read folder %s", dfolder);
 
        /* check for empty folder */
        if (mp->nummsg == 0)
 
        /* check for empty folder */
        if (mp->nummsg == 0)
-           adios (NULL, "no messages in %s", dfolder);
+           die("no messages in %s", dfolder);
 
        /* parse all the message ranges/sequences and set SELECTED */
        for (msgnum = 0; msgnum < msgp; msgnum++)
 
        /* parse all the message ranges/sequences and set SELECTED */
        for (msgnum = 0; msgnum < msgp; msgnum++)
@@ -402,7 +402,7 @@ go_to_it:
            && altmsg) {
        vec[vecp++] = "-dist";
        if ((cp = m_mktemp2(altmsg, invo_name, NULL, NULL)) == NULL) {
            && altmsg) {
        vec[vecp++] = "-dist";
        if ((cp = m_mktemp2(altmsg, invo_name, NULL, NULL)) == NULL) {
-           adios(NULL, "unable to create temporary file");
+           die("unable to create temporary file");
        }
        distfile = mh_xstrdup(cp);
        (void) m_unlink(distfile);
        }
        distfile = mh_xstrdup(cp);
        (void) m_unlink(distfile);
@@ -416,7 +416,7 @@ go_to_it:
                adios (distfile, "unable to link %s to", altmsg);
            free (distfile);
            if ((cp = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
                adios (distfile, "unable to link %s to", altmsg);
            free (distfile);
            if ((cp = m_mktemp2(NULL, invo_name, NULL, NULL)) == NULL) {
-               adios(NULL, "unable to create temporary file in %s",
+               die("unable to create temporary file in %s",
                      get_temp_dir());
            }
            distfile = mh_xstrdup(cp);
                      get_temp_dir());
            }
            distfile = mh_xstrdup(cp);
@@ -441,11 +441,11 @@ go_to_it:
 #ifdef OAUTH_SUPPORT
     if (auth_svc == NULL) {
         if (saslmech  &&  ! strcasecmp(saslmech, "xoauth2")) {
 #ifdef OAUTH_SUPPORT
     if (auth_svc == NULL) {
         if (saslmech  &&  ! strcasecmp(saslmech, "xoauth2")) {
-            adios (NULL, "must specify -authservice with -saslmech xoauth2");
+            die("must specify -authservice with -saslmech xoauth2");
         }
     } else {
         if (user == NULL) {
         }
     } else {
         if (user == NULL) {
-            adios (NULL, "must specify -user with -saslmech xoauth2");
+            die("must specify -user with -saslmech xoauth2");
         }
     }
 #else
         }
     }
 #else
index c8a16a4..cc00e0c 100644 (file)
@@ -120,7 +120,7 @@ sendsbr (char **vec, int vecp, char *program, char *draft, struct stat *st,
        if (pushsw && unique) {
            char *cp = m_mktemp2(drft, invo_name, NULL, NULL);
            if (cp == NULL) {
        if (pushsw && unique) {
            char *cp = m_mktemp2(drft, invo_name, NULL, NULL);
            if (cp == NULL) {
-               adios(NULL, "unable to create temporary file");
+               die("unable to create temporary file");
            }
            if (rename (drft, strncpy(file, cp, sizeof(file))) == NOTOK)
                adios (file, "unable to rename %s to", drft);
            }
            if (rename (drft, strncpy(file, cp, sizeof(file))) == NOTOK)
                adios (file, "unable to rename %s to", drft);
@@ -135,10 +135,10 @@ sendsbr (char **vec, int vecp, char *program, char *draft, struct stat *st,
 #ifdef OAUTH_SUPPORT
                const char *errmsg;
                if (setup_oauth_params(vec, nvecsp, auth_svc, &errmsg) != OK) {
 #ifdef OAUTH_SUPPORT
                const char *errmsg;
                if (setup_oauth_params(vec, nvecsp, auth_svc, &errmsg) != OK) {
-                        adios(NULL, "%s", errmsg);
+                        die("%s", errmsg);
                }
 #else
                }
 #else
-                adios(NULL, "send built without OAUTH_SUPPORT, "
+                die("send built without OAUTH_SUPPORT, "
                       "so auth_svc %s is not supported", auth_svc);
 #endif /* OAUTH_SUPPORT */
        }
                       "so auth_svc %s is not supported", auth_svc);
 #endif /* OAUTH_SUPPORT */
        }
@@ -276,17 +276,17 @@ splitmsg (char **vec, int vecp, char *program, char *drft,
 
           case LENERR:
           case FMTERR:
 
           case LENERR:
           case FMTERR:
-               adios (NULL, "message format error in component #%d", compnum);
+               die("message format error in component #%d", compnum);
 
           default:
 
           default:
-               adios (NULL, "getfld () returned %d", state);
+               die("getfld () returned %d", state);
        }
 
        break;
     }
     m_getfld_state_destroy (&gstate);
     if (cp == NULL)
        }
 
        break;
     }
     m_getfld_state_destroy (&gstate);
     if (cp == NULL)
-       adios (NULL, "headers missing from draft");
+       die("headers missing from draft");
 
     nparts = 1;
     pos = start;
 
     nparts = 1;
     pos = start;
@@ -329,7 +329,7 @@ splitmsg (char **vec, int vecp, char *program, char *drft,
 
        char *cp = m_mktemp2(drft, invo_name, NULL, &out);
         if (cp == NULL) {
 
        char *cp = m_mktemp2(drft, invo_name, NULL, &out);
         if (cp == NULL) {
-           adios(NULL, "unable to create temporary file");
+           die("unable to create temporary file");
         }
        strncpy(tmpdrf, cp, sizeof(tmpdrf));
 
         }
        strncpy(tmpdrf, cp, sizeof(tmpdrf));
 
@@ -362,7 +362,7 @@ splitmsg (char **vec, int vecp, char *program, char *drft,
            if (!fgets (buffer, sizeof buffer, in)) {
                if (partno == nparts)
                    break;
            if (!fgets (buffer, sizeof buffer, in)) {
                if (partno == nparts)
                    break;
-               adios (NULL, "premature eof");
+               die("premature eof");
            }
 
            if ((pos += (len = strlen (buffer))) > CPERMSG) {
            }
 
            if ((pos += (len = strlen (buffer))) > CPERMSG) {
@@ -763,12 +763,12 @@ handle_sendfrom(char **vec, int *vecp, char *draft, const char *auth_svc) {
             if (strcmp(*vp, "xoauth2") == 0) {
 #ifdef OAUTH_SUPPORT
                 if (setup_oauth_params(vec, vecp, auth_svc, &message) != OK) {
             if (strcmp(*vp, "xoauth2") == 0) {
 #ifdef OAUTH_SUPPORT
                 if (setup_oauth_params(vec, vecp, auth_svc, &message) != OK) {
-                    adios(NULL, "%s", message);
+                    die("%s", message);
                 }
                 break;
 #else
                 NMH_UNUSED(auth_svc);
                 }
                 break;
 #else
                 NMH_UNUSED(auth_svc);
-                adios(NULL, "send built without OAUTH_SUPPORT, "
+                die("send built without OAUTH_SUPPORT, "
                       "so -saslmech xoauth2 is not supported");
 #endif /* OAUTH_SUPPORT */
             }
                       "so -saslmech xoauth2 is not supported");
 #endif /* OAUTH_SUPPORT */
             }
@@ -816,7 +816,7 @@ setup_oauth_params(char *vec[], int *vecp, const char *auth_svc,
         if (saslmech  &&  ! strcasecmp(saslmech, "xoauth2")) {
            if (! mh_oauth_get_service_info(auth_svc, &svc, errbuf,
                                            sizeof(errbuf)))
         if (saslmech  &&  ! strcasecmp(saslmech, "xoauth2")) {
            if (! mh_oauth_get_service_info(auth_svc, &svc, errbuf,
                                            sizeof(errbuf)))
-               adios(NULL, "Unable to retrieve oauth profile entries: %s",
+               die("Unable to retrieve oauth profile entries: %s",
                      errbuf);
 
            vec[(*vecp)++] = mh_xstrdup("-authservice");
                      errbuf);
 
            vec[(*vecp)++] = mh_xstrdup("-authservice");
index 130ccce..5153ffb 100644 (file)
@@ -123,28 +123,27 @@ non_mhl_switches:
 
                case DRFTSW:
                    if (file)
 
                case DRFTSW:
                    if (file)
-                       adios (NULL, "only one file at a time!");
+                       die("only one file at a time!");
                    draftsw++;
                    if (mode == SHOW)
                        continue;
 usage:
                    draftsw++;
                    if (mode == SHOW)
                        continue;
 usage:
-                   adios (NULL,
-                           "usage: %s [+folder] [switches] [switches for showproc]",
+                   die(                            "usage: %s [+folder] [switches] [switches for showproc]",
                            invo_name);
                case FILESW:
                    if (mode != SHOW)
                        goto usage;
                    if (draftsw || file)
                            invo_name);
                case FILESW:
                    if (mode != SHOW)
                        goto usage;
                    if (draftsw || file)
-                       adios (NULL, "only one file at a time!");
+                       die("only one file at a time!");
                    if (!(cp = *argp++) || *cp == '-')
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    file = path (cp, TFILE);
                    continue;
 
                case FORMSW:
                    app_msgarg(&vec, --cp);
                    if (!(cp = *argp++) || *cp == '-')
                    file = path (cp, TFILE);
                    continue;
 
                case FORMSW:
                    app_msgarg(&vec, --cp);
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    app_msgarg(&vec, mh_xstrdup(etcpath(cp)));
                    continue;
 
                    app_msgarg(&vec, mh_xstrdup(etcpath(cp)));
                    continue;
 
@@ -160,13 +159,13 @@ usage:
                case WCACHESW:
                    app_msgarg(&vec, --cp);
                    if (!(cp = *argp++) || *cp == '-')
                case WCACHESW:
                    app_msgarg(&vec, --cp);
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    app_msgarg(&vec, cp);
                    continue;
 
                case SHOWSW:
                    if (!(showproc = *argp++) || *showproc == '-')
                    app_msgarg(&vec, cp);
                    continue;
 
                case SHOWSW:
                    if (!(showproc = *argp++) || *showproc == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    nshow = 0;
                    continue;
                case NSHOWSW:
                    nshow = 0;
                    continue;
                case NSHOWSW:
@@ -175,7 +174,7 @@ usage:
 
                case SHOWMIMESW:
                    if (!(showmimeproc = *argp++) || *showmimeproc == '-')
 
                case SHOWMIMESW:
                    if (!(showmimeproc = *argp++) || *showmimeproc == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    nshow = 0;
                    continue;
                case CHECKMIMESW:
                    nshow = 0;
                    continue;
                case CHECKMIMESW:
@@ -188,7 +187,7 @@ usage:
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else {
            if (mode != SHOW)
             folder = pluspath (cp);
        } else {
            if (mode != SHOW)
@@ -202,7 +201,7 @@ usage:
 
     if (draftsw || file) {
        if (msgs.size)
 
     if (draftsw || file) {
        if (msgs.size)
-           adios (NULL, "only one file at a time!");
+           die("only one file at a time!");
        if (draftsw)
            app_msgarg(&vec, mh_xstrdup(m_draft(folder, NULL, 1, &isdf)));
        else
        if (draftsw)
            app_msgarg(&vec, mh_xstrdup(m_draft(folder, NULL, 1, &isdf)));
        else
@@ -234,11 +233,11 @@ usage:
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
-       adios (NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     /* check for empty folder */
     if (mp->nummsg == 0)
 
     /* check for empty folder */
     if (mp->nummsg == 0)
-       adios (NULL, "no messages in %s", folder);
+       die("no messages in %s", folder);
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
index cfdc0df..9f1d8a4 100644 (file)
@@ -203,7 +203,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches]", invo_name);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches]", invo_name);
@@ -215,38 +215,38 @@ main (int argc, char **argv)
 
                case ADDRSW: 
                    if (!(addr = *argp++))/* allow -xyz arguments */
 
                case ADDRSW: 
                    if (!(addr = *argp++))/* allow -xyz arguments */
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
                case INFOSW: 
                    if (!(info = *argp++))/* allow -xyz arguments */
                    continue;
                case INFOSW: 
                    if (!(info = *argp++))/* allow -xyz arguments */
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
                case USERSW: 
                    if (!(user = *argp++))/* allow -xyz arguments */
                    continue;
                case USERSW: 
                    if (!(user = *argp++))/* allow -xyz arguments */
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
                case FILESW: 
                    if (!(file = *argp++) || *file == '-')
                    continue;
                case FILESW: 
                    if (!(file = *argp++) || *file == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
                case SENDERSW: 
                    if (!(sender = *argp++))/* allow -xyz arguments */
                    continue;
                case SENDERSW: 
                    if (!(sender = *argp++))/* allow -xyz arguments */
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
                case MAILBOXSW: 
                    if (!(mbox = *argp++) || *mbox == '-')
                    continue;
                case MAILBOXSW: 
                    if (!(mbox = *argp++) || *mbox == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
                case HOMESW: 
                    if (!(home = *argp++) || *home == '-')
                    continue;
                case HOMESW: 
                    if (!(home = *argp++) || *home == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
 
                case MAILSW: 
                    if (!(cp = *argp++) || *cp == '-')
                    continue;
 
                case MAILSW: 
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    if (mdlvr)
                    if (mdlvr)
-                       adios (NULL, "only one maildelivery file at a time!");
+                       die("only one maildelivery file at a time!");
                    mdlvr = cp;
                    continue;
 
                    mdlvr = cp;
                    continue;
 
@@ -268,7 +268,7 @@ main (int argc, char **argv)
                    continue;
            }
        } else {
                    continue;
            }
        } else {
-               adios (NULL, "only switch arguments are supported");
+               die("only switch arguments are supported");
        }
     }
 
        }
     }
 
@@ -278,7 +278,7 @@ main (int argc, char **argv)
        user = getusername ();
     }
     if ((pw = getpwnam (user)) == NULL)
        user = getusername ();
     }
     if ((pw = getpwnam (user)) == NULL)
-       adios (NULL, "no such local user as %s", user);
+       die("no such local user as %s", user);
 
     if (chdir (pw->pw_dir) == -1)
        if (chdir ("/") < 0) {
 
     if (chdir (pw->pw_dir) == -1)
        if (chdir ("/") < 0) {
@@ -303,7 +303,7 @@ main (int argc, char **argv)
 
     /* Record the delivery time */
     if ((now = dlocaltimenow ()) == NULL)
 
     /* Record the delivery time */
     if ((now = dlocaltimenow ()) == NULL)
-       adios (NULL, "unable to ascertain local time");
+       die("unable to ascertain local time");
     snprintf (ddate, sizeof(ddate), "Delivery-Date: %s\n", dtimenow (0));
 
     /*
     snprintf (ddate, sizeof(ddate), "Delivery-Date: %s\n", dtimenow (0));
 
     /*
@@ -318,7 +318,7 @@ main (int argc, char **argv)
        if (debug)
            debug_printf ("retrieving message from file \"%s\"\n", file);
        if ((fd = copy_message (tempfd, tmpfil, 1)) == -1)
        if (debug)
            debug_printf ("retrieving message from file \"%s\"\n", file);
        if ((fd = copy_message (tempfd, tmpfil, 1)) == -1)
-           adios(NULL, "unable to create temporary file in %s",
+           die("unable to create temporary file in %s",
                   get_temp_dir());
        close (tempfd);
     } else {
                   get_temp_dir());
        close (tempfd);
     } else {
@@ -326,7 +326,7 @@ main (int argc, char **argv)
        if (debug)
            debug_printf ("retrieving message from stdin\n");
        if ((fd = copy_message (fileno (stdin), tmpfil, 1)) == -1)
        if (debug)
            debug_printf ("retrieving message from stdin\n");
        if ((fd = copy_message (fileno (stdin), tmpfil, 1)) == -1)
-           adios(NULL, "unable to create temporary file in %s",
+           die("unable to create temporary file in %s",
                   get_temp_dir());
     }
 
                   get_temp_dir());
     }
 
@@ -347,7 +347,7 @@ main (int argc, char **argv)
     (void) m_unlink (tmpfil);
 
     if (!(fp = fdopen (fd, "r+")))
     (void) m_unlink (tmpfil);
 
     if (!(fp = fdopen (fd, "r+")))
-       adios (NULL, "unable to access temporary file");
+       die("unable to access temporary file");
 
     /*
      * If no sender given, extract it
 
     /*
      * If no sender given, extract it
index 9d661f1..41652ec 100644 (file)
@@ -93,7 +93,7 @@ main (int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW:
-               adios (NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW:
                snprintf(buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
 
            case HELPSW:
                snprintf(buf, sizeof(buf), "%s [+folder] [msgs] [switches]",
@@ -106,16 +106,16 @@ main (int argc, char **argv)
 
            case DATESW:
                if (datesw)
 
            case DATESW:
                if (datesw)
-                   adios (NULL, "only one date field at a time");
+                   die("only one date field at a time");
                if (!(datesw = *argp++) || *datesw == '-')
                if (!(datesw = *argp++) || *datesw == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
 
            case TEXTSW:
                if (subjsort)
                continue;
 
            case TEXTSW:
                if (subjsort)
-                   adios (NULL, "only one text field at a time");
+                   die("only one text field at a time");
                if (!(subjsort = *argp++) || *subjsort == '-')
                if (!(subjsort = *argp++) || *subjsort == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
 
            case SUBJSW:
                continue;
 
            case SUBJSW:
@@ -127,7 +127,7 @@ main (int argc, char **argv)
 
            case LIMSW:
                if (!(cp = *argp++) || *cp == '-')
 
            case LIMSW:
                if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                while (*cp == '0')
                    cp++;               /* skip any leading zeros */
                if (!*cp) {             /* hit end of string */
                while (*cp == '0')
                    cp++;               /* skip any leading zeros */
                if (!*cp) {             /* hit end of string */
@@ -135,7 +135,7 @@ main (int argc, char **argv)
                    continue;
                }
                if (!isdigit((unsigned char) *cp) || !(datelimit = atoi(cp)))
                    continue;
                }
                if (!isdigit((unsigned char) *cp) || !(datelimit = atoi(cp)))
-                   adios (NULL, "impossible limit %s", cp);
+                   die("impossible limit %s", cp);
                datelimit *= 60*60*24;
                continue;
            case NLIMSW:
                datelimit *= 60*60*24;
                continue;
            case NLIMSW:
@@ -167,7 +167,7 @@ main (int argc, char **argv)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
        }
        if (*cp == '+' || *cp == '@') {
            if (folder)
-               adios (NULL, "only one folder at a time!");
+               die("only one folder at a time!");
             folder = pluspath (cp);
        } else
             app_msgarg(&msgs, cp);
             folder = pluspath (cp);
        } else
             app_msgarg(&msgs, cp);
@@ -179,7 +179,7 @@ main (int argc, char **argv)
        if (allmsgs) {
            app_msgarg(&msgs, "all");
         } else {
        if (allmsgs) {
            app_msgarg(&msgs, "all");
         } else {
-           adios (NULL, "must specify messages to sort with -noall");
+           die("must specify messages to sort with -noall");
         }
     }
     if (!datesw)
         }
     }
     if (!datesw)
@@ -193,11 +193,11 @@ main (int argc, char **argv)
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
 
     /* read folder and create message structure */
     if (!(mp = folder_read (folder, 1)))
-       adios (NULL, "unable to read folder %s", folder);
+       die("unable to read folder %s", folder);
 
     /* check for empty folder */
     if (mp->nummsg == 0)
 
     /* check for empty folder */
     if (mp->nummsg == 0)
-       adios (NULL, "no messages in %s", folder);
+       die("no messages in %s", folder);
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
 
     /* parse all the message ranges/sequences and set SELECTED */
     for (msgnum = 0; msgnum < msgs.size; msgnum++)
@@ -206,10 +206,10 @@ main (int argc, char **argv)
     seq_setprev (mp);  /* set the previous sequence */
 
     if ((nmsgs = read_hdrs (mp, datesw)) <= 0)
     seq_setprev (mp);  /* set the previous sequence */
 
     if ((nmsgs = read_hdrs (mp, datesw)) <= 0)
-       adios (NULL, "no messages to sort");
+       die("no messages to sort");
 
     if (checksw  &&  check_failed) {
 
     if (checksw  &&  check_failed) {
-       adios (NULL, "errors found, no messages sorted");
+       die("errors found, no messages sorted");
     }
 
     /*
     }
 
     /*
@@ -397,7 +397,7 @@ get_fields (char *datesw, int msg, struct smsg *smsg)
            return 0;
 
        default:
            return 0;
 
        default:
-           adios (NULL, "internal error -- you lose");
+           die("internal error -- you lose");
        }
        break;
     }
        }
        break;
     }
index f706dfd..4bfd50c 100644 (file)
@@ -70,7 +70,7 @@ main (int argc, char **argv)
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW: 
                ambigsw (cp, switches);
                done (1);
            case UNKWNSW: 
-               adios (NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [switches]", invo_name);
 
            case HELPSW: 
                snprintf (buf, sizeof(buf), "%s [switches]", invo_name);
@@ -82,27 +82,27 @@ main (int argc, char **argv)
     
            case TOSW:
                if (!(f1 = *argp++))
     
            case TOSW:
                if (!(f1 = *argp++))
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            case SUBJECTSW:
                if (!(f2 = *argp++))
                continue;
            case SUBJECTSW:
                if (!(f2 = *argp++))
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            case PARAMSW:
                if (!(f3 = *argp++))
                continue;
            case PARAMSW:
                if (!(f3 = *argp++))
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            case DESCRIPTSW:
                if (!(f4 = *argp++))
                continue;
            case DESCRIPTSW:
                if (!(f4 = *argp++))
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            case COMMENTSW:
                if (!(f5 = *argp++))
                continue;
            case COMMENTSW:
                if (!(f5 = *argp++))
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            case DELAYSW:
                if (!(cp = *argp++) || *cp == '-')
                continue;
            case DELAYSW:
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
 
                /*
                 * If there is an error, just reset the delay parameter
 
                /*
                 * If there is an error, just reset the delay parameter
@@ -113,7 +113,7 @@ main (int argc, char **argv)
                continue;
            case FROMSW:
                if (!(f7 = *argp++))
                continue;
            case FROMSW:
                if (!(f7 = *argp++))
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
 
            case VERBSW: 
                continue;
 
            case VERBSW: 
@@ -131,7 +131,7 @@ main (int argc, char **argv)
     }
 
     if (!f1)
     }
 
     if (!f1)
-       adios (NULL, "missing -viamail \"mailpath\" switch");
+       die("missing -viamail \"mailpath\" switch");
 
     via_mail (f1, f2, f3, f4, f5, delay, f7);
     return 0;  /* dead code to satisfy the compiler */
 
     via_mail (f1, f2, f3, f4, f5, delay, f7);
     return 0;  /* dead code to satisfy the compiler */
@@ -157,7 +157,7 @@ via_mail (char *mailsw, char *subjsw, char *parmsw, char *descsw,
     umask (~m_gmprot ());
 
     if ((tfile = m_mktemp2(NULL, invo_name, NULL, &fp)) == NULL) {
     umask (~m_gmprot ());
 
     if ((tfile = m_mktemp2(NULL, invo_name, NULL, &fp)) == NULL) {
-       adios(NULL, "unable to create temporary file in %s", get_temp_dir());
+       die("unable to create temporary file in %s", get_temp_dir());
     }
     strncpy (tmpfil, tfile, sizeof(tmpfil));
 
     }
     strncpy (tmpfil, tfile, sizeof(tmpfil));
 
index 9092f0e..8b0b2ac 100644 (file)
@@ -154,7 +154,7 @@ WhatNow (int argc, char **argv)
                ambigsw (cp, whatnowswitches);
                done (1);
            case UNKWNSW:
                ambigsw (cp, whatnowswitches);
                done (1);
            case UNKWNSW:
-               adios (NULL, "-%s unknown", cp);
+               die("-%s unknown", cp);
 
            case HELPSW:
                snprintf (buf, sizeof(buf), "%s [switches] [file]", invo_name);
 
            case HELPSW:
                snprintf (buf, sizeof(buf), "%s [switches] [file]", invo_name);
@@ -166,17 +166,17 @@ WhatNow (int argc, char **argv)
 
            case DFOLDSW:
                if (dfolder)
 
            case DFOLDSW:
                if (dfolder)
-                   adios (NULL, "only one draft folder at a time!");
+                   die("only one draft folder at a time!");
                if (!(cp = *argp++) || *cp == '-')
                if (!(cp = *argp++) || *cp == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                                *cp != '@' ? TFOLDER : TSUBCWF);
                continue;
            case DMSGSW:
                if (dmsg)
                dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                                *cp != '@' ? TFOLDER : TSUBCWF);
                continue;
            case DMSGSW:
                if (dmsg)
-                   adios (NULL, "only one draft message at a time!");
+                   die("only one draft message at a time!");
                if (!(dmsg = *argp++) || *dmsg == '-')
                if (!(dmsg = *argp++) || *dmsg == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            case NDFLDSW:
                dfolder = NULL;
                continue;
            case NDFLDSW:
                dfolder = NULL;
@@ -185,7 +185,7 @@ WhatNow (int argc, char **argv)
 
            case EDITRSW:
                if (!(ed = *argp++) || *ed == '-')
 
            case EDITRSW:
                if (!(ed = *argp++) || *ed == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                nedit = 0;
                continue;
            case NEDITSW:
                nedit = 0;
                continue;
            case NEDITSW:
@@ -194,12 +194,12 @@ WhatNow (int argc, char **argv)
 
            case PRMPTSW:
                if (!(myprompt = *argp++) || *myprompt == '-')
 
            case PRMPTSW:
                if (!(myprompt = *argp++) || *myprompt == '-')
-                   adios (NULL, "missing argument to %s", argp[-2]);
+                   die("missing argument to %s", argp[-2]);
                continue;
            }
        }
        if (drft)
                continue;
            }
        }
        if (drft)
-           adios (NULL, "only one draft at a time!");
+           die("only one draft at a time!");
         drft = cp;
     }
 
         drft = cp;
     }
 
@@ -551,7 +551,7 @@ writesomecmd(char *buf, int bufsz, char *cmd, char *trailcmd, char **argp)
      */
     int trailln = strlen(trailcmd) + 4;
     if (ln < 0 || ln + trailln > bufsz)
      */
     int trailln = strlen(trailcmd) + 4;
     if (ln < 0 || ln + trailln > bufsz)
-       adios(NULL, "arguments too long");
+       die("arguments too long");
 
     cp = buf + ln;
 
 
     cp = buf + ln;
 
@@ -559,7 +559,7 @@ writesomecmd(char *buf, int bufsz, char *cmd, char *trailcmd, char **argp)
        ln = strlen(*argp);
        /* +1 for leading space */
        if (ln + trailln + 1 > bufsz - (cp-buf))
        ln = strlen(*argp);
        /* +1 for leading space */
        if (ln + trailln + 1 > bufsz - (cp-buf))
-           adios(NULL, "arguments too long");
+           die("arguments too long");
        *cp++ = ' ';
        memcpy(cp, *argp, ln+1);
        cp += ln;
        *cp++ = ' ';
        memcpy(cp, *argp, ln+1);
        cp += ln;
@@ -1132,11 +1132,11 @@ sendit (char *sp, char **arg, char *file, int pushed)
                case AUTHSERVICESW:
 #ifdef OAUTH_SUPPORT
                    if (!(auth_svc = *argp++) || *auth_svc == '-')
                case AUTHSERVICESW:
 #ifdef OAUTH_SUPPORT
                    if (!(auth_svc = *argp++) || *auth_svc == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
 #else
                     NMH_UNUSED (user);
                     NMH_UNUSED (auth_svc);
 #else
                     NMH_UNUSED (user);
                     NMH_UNUSED (auth_svc);
-                   adios (NULL, "not built with OAuth support");
+                   die("not built with OAuth support");
 #endif
                    continue;
 
 #endif
                    continue;
 
@@ -1205,7 +1205,7 @@ sendit (char *sp, char **arg, char *file, int pushed)
            && altmsg) {
        vec[vecp++] = "-dist";
        if ((cp = m_mktemp2(altmsg, invo_name, NULL, NULL)) == NULL) {
            && altmsg) {
        vec[vecp++] = "-dist";
        if ((cp = m_mktemp2(altmsg, invo_name, NULL, NULL)) == NULL) {
-           adios(NULL, "unable to create temporary file");
+           die("unable to create temporary file");
        }
        distfile = mh_xstrdup(cp);
        (void) m_unlink(distfile);
        }
        distfile = mh_xstrdup(cp);
        (void) m_unlink(distfile);
@@ -1218,11 +1218,11 @@ sendit (char *sp, char **arg, char *file, int pushed)
 #ifdef OAUTH_SUPPORT
     if (auth_svc == NULL) {
         if (saslmech  &&  ! strcasecmp(saslmech, "xoauth2")) {
 #ifdef OAUTH_SUPPORT
     if (auth_svc == NULL) {
         if (saslmech  &&  ! strcasecmp(saslmech, "xoauth2")) {
-            adios (NULL, "must specify -authservice with -saslmech xoauth2");
+            die("must specify -authservice with -saslmech xoauth2");
         }
     } else {
         if (user == NULL) {
         }
     } else {
         if (user == NULL) {
-            adios (NULL, "must specify -user with -saslmech xoauth2");
+            die("must specify -user with -saslmech xoauth2");
         }
     }
 #else
         }
     }
 #else
index b5935de..3432382 100644 (file)
@@ -92,7 +92,7 @@ main (int argc, char **argv)
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
                    ambigsw (cp, switches);
                    done (1);
                case UNKWNSW: 
-                   adios (NULL, "-%s unknown", cp);
+                   die("-%s unknown", cp);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches] [file]", invo_name);
 
                case HELPSW: 
                    snprintf (buf, sizeof(buf), "%s [switches] [file]", invo_name);
@@ -118,17 +118,17 @@ main (int argc, char **argv)
 
                case DFOLDSW: 
                    if (dfolder)
 
                case DFOLDSW: 
                    if (dfolder)
-                       adios (NULL, "only one draft folder at a time!");
+                       die("only one draft folder at a time!");
                    if (!(cp = *argp++) || *cp == '-')
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                            *cp != '@' ? TFOLDER : TSUBCWF);
                    continue;
                case DMSGSW: 
                    if (dmsg)
                    dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp,
                            *cp != '@' ? TFOLDER : TSUBCWF);
                    continue;
                case DMSGSW: 
                    if (dmsg)
-                       adios (NULL, "only one draft message at a time!");
+                       die("only one draft message at a time!");
                    if (!(dmsg = *argp++) || *dmsg == '-')
                    if (!(dmsg = *argp++) || *dmsg == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    continue;
                case NDFLDSW: 
                    dfolder = NULL;
                    continue;
                case NDFLDSW: 
                    dfolder = NULL;
@@ -144,13 +144,13 @@ main (int argc, char **argv)
                case MTSSW:
                    vec[vecp++] = --cp;
                    if (!(cp = *argp++) || *cp == '-')
                case MTSSW:
                    vec[vecp++] = --cp;
                    if (!(cp = *argp++) || *cp == '-')
-                       adios (NULL, "missing argument to %s", argp[-2]);
+                       die("missing argument to %s", argp[-2]);
                    vec[vecp++] = cp;
                    continue;
            }
        }
        if (msg)
                    vec[vecp++] = cp;
                    continue;
            }
        }
        if (msg)
-           adios (NULL, "only one draft at a time!");
+           die("only one draft at a time!");
         vec[vecp++] = msg = cp;
     }
 
         vec[vecp++] = msg = cp;
     }