X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Frepl.c;h=ab8042fe5bf96b39150ad7d20be80fe89dd9e398;hb=8a87f7b5fd5622dcde0fc4b48d93157616b496f0;hp=e5fa527d6aee378764015a66f6c8aa74afb0a885;hpb=9a33ff618b5901a3af815650d4b84d39ee96e529;p=mmh diff --git a/uip/repl.c b/uip/repl.c index e5fa527..ab8042f 100644 --- a/uip/repl.c +++ b/uip/repl.c @@ -2,8 +2,6 @@ /* * repl.c -- reply to a message * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -70,11 +68,8 @@ static struct swit switches[] = { { "help", 0 }, #define FILESW 27 { "file file", 4 }, /* interface from msh */ - -#ifdef MHE #define BILDSW 28 { "build", 5 }, /* interface from mhe */ -#endif { NULL, 0 } }; @@ -147,9 +142,7 @@ main (int argc, char **argv) struct stat st; FILE *in; -#ifdef MHE int buildsw = 0; -#endif /* MHE */ #ifdef LOCALE setlocale(LC_ALL, ""); @@ -219,10 +212,8 @@ main (int argc, char **argv) adios (NULL, "missing argument to %s", argp[-2]); nwhat = 0; continue; -#ifdef MHE case BILDSW: buildsw++; /* fall... */ -#endif /* MHE */ case NWHATSW: nwhat++; continue; @@ -319,7 +310,7 @@ main (int argc, char **argv) if (folder) adios (NULL, "only one folder at a time!"); else - folder = path (cp + 1, *cp == '+' ? TFOLDER : TSUBCWF); + folder = pluspath (cp); } else { if (msg) adios (NULL, "only one message at a time!"); @@ -344,18 +335,11 @@ main (int argc, char **argv) try_it_again: -#ifdef MHE strncpy (drft, buildsw ? m_maildir ("reply") : m_draft (dfolder, NULL, NOUSE, &isdf), sizeof(drft)); /* Check if a draft exists */ if (!buildsw && stat (drft, &st) != NOTOK) { -#else - strncpy (drft, m_draft (dfolder, dmsg, NOUSE, &isdf), sizeof(drft)); - - /* Check if a draft exists */ - if (stat (drft, &st) != NOTOK) { -#endif /* MHE */ printf ("Draft \"%s\" exists (%ld bytes).", drft, (long) st.st_size); for (i = LISTDSW; i != YESW;) { if (!(argp = getans ("\nDisposition? ", isdf ? aqrnl : aqrl))) @@ -442,7 +426,8 @@ try_it_again: done (0); what_now (ed, nedit, NOUSE, drft, msg, 0, mp, anot ? "Replied" : NULL, inplace, cwd); - return done (1); + done (1); + return 1; } void