X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fwhatnowsbr.c;h=f8b7223b1d8d21a3c4b0dfa4925d11b4c9333e4b;hp=c0f331a2e96b4f5efe4fa1f11e6f439d215636d1;hb=337338b404931f06f0db2119c9e145e8ca5a9860;hpb=18017df38ebb626f6eed6f339641fd1298c326e7 diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index c0f331a..f8b7223 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -44,23 +44,17 @@ #include static struct swit whatnowswitches[] = { -#define DFOLDSW 0 - { "draftfolder +folder", 0 }, -#define DMSGSW 1 - { "draftmessage msg", 0 }, -#define NDFLDSW 2 - { "nodraftfolder", 0 }, -#define EDITRSW 3 +#define EDITRSW 0 { "editor editor", 0 }, -#define NEDITSW 4 +#define NEDITSW 1 { "noedit", 0 }, -#define PRMPTSW 5 +#define PRMPTSW 2 { "prompt string", 4 }, -#define VERSIONSW 6 +#define VERSIONSW 3 { "version", 0 }, -#define HELPSW 7 +#define HELPSW 4 { "help", 0 }, -#define ATTACHSW 8 +#define ATTACHSW 5 { "attach header-field-name", 0 }, { NULL, 0 } }; @@ -83,21 +77,21 @@ static struct swit aleqs[] = { { "send []", 0 }, #define PUSHSW 6 { "push []", 0 }, -#define QUITSW 8 +#define QUITSW 7 { "quit [-delete]", 0 }, -#define DELETESW 9 +#define DELETESW 8 { "delete", 0 }, -#define CDCMDSW 10 +#define CDCMDSW 9 { "cd [directory]", 0 }, -#define PWDCMDSW 11 +#define PWDCMDSW 10 { "pwd", 0 }, -#define LSCMDSW 12 +#define LSCMDSW 11 { "ls", 0 }, -#define ATTACHCMDSW 13 +#define ATTACHCMDSW 12 { "attach", 0 }, -#define DETACHCMDSW 14 +#define DETACHCMDSW 13 { "detach [-n]", 2 }, -#define ALISTCMDSW 15 +#define ALISTCMDSW 14 { "alist [-ln] ", 2 }, { NULL, 0 } }; @@ -128,8 +122,8 @@ static int copyf (char *, char *); int WhatNow (int argc, char **argv) { - int isdf = 0, nedit = 0, use = 0; - char *cp, *dfolder = NULL, *dmsg = NULL; + int nedit = 0, use = 0; + char *cp; char *ed = NULL, *drft = NULL, *msgnam = NULL; char buf[BUFSIZ], prompt[BUFSIZ]; char **argp, **arguments; @@ -175,25 +169,6 @@ WhatNow (int argc, char **argv) print_version(invo_name); done (1); - case DFOLDSW: - if (dfolder) - adios (NULL, "only one draft folder at a time!"); - if (!(cp = *argp++) || *cp == '-') - adios (NULL, "missing argument to %s", argp[-2]); - dfolder = path (*cp == '+' || *cp == '@' ? cp + 1 : cp, - *cp != '@' ? TFOLDER : TSUBCWF); - continue; - case DMSGSW: - if (dmsg) - adios (NULL, "only one draft message at a time!"); - if (!(dmsg = *argp++) || *dmsg == '-') - adios (NULL, "missing argument to %s", argp[-2]); - continue; - case NDFLDSW: - dfolder = NULL; - isdf = NOTOK; - continue; - case EDITRSW: if (!(ed = *argp++) || *ed == '-') adios (NULL, "missing argument to %s", argp[-2]); @@ -223,7 +198,7 @@ WhatNow (int argc, char **argv) } if ((drft == NULL && (drft = getenv ("mhdraft")) == NULL) || *drft == 0) - drft = getcpy (m_draft (dfolder, dmsg, 1, &isdf)); + drft = getcpy (m_draft("cur")); msgnam = (cp = getenv ("mhaltmsg")) && *cp ? getcpy (cp) : NULL; @@ -1009,53 +984,47 @@ static struct swit sendswitches[] = { { "push", 0 }, #define NSPSHSW 13 { "nopush", 0 }, -#define UNIQSW 15 +#define UNIQSW 14 { "unique", -6 }, -#define NUNIQSW 16 +#define NUNIQSW 15 { "nounique", -8 }, -#define VERBSW 17 +#define VERBSW 16 { "verbose", 0 }, -#define NVERBSW 18 +#define NVERBSW 17 { "noverbose", 0 }, -#define WATCSW 19 +#define WATCSW 18 { "watch", 0 }, -#define NWATCSW 20 +#define NWATCSW 19 { "nowatch", 0 }, -#define WIDTHSW 21 +#define WIDTHSW 20 { "width columns", 0 }, -#define SVERSIONSW 22 +#define SVERSIONSW 21 { "version", 0 }, -#define SHELPSW 23 +#define SHELPSW 22 { "help", 0 }, -#define BITSTUFFSW 24 +#define BITSTUFFSW 23 { "dashstuffing", -12 }, -#define NBITSTUFFSW 25 +#define NBITSTUFFSW 24 { "nodashstuffing", -14 }, -#define MAILSW 26 +#define MAILSW 25 { "mail", -4 }, -#define SAMLSW 27 +#define SAMLSW 26 { "saml", -4 }, -#define SSNDSW 28 +#define SSNDSW 27 { "send", -4 }, -#define SOMLSW 29 +#define SOMLSW 28 { "soml", -4 }, -#define CLIESW 30 +#define CLIESW 29 { "client host", -6 }, -#define SERVSW 31 +#define SERVSW 30 { "server host", 6 }, -#define SNOOPSW 32 +#define SNOOPSW 31 { "snoop", -5 }, -#define SDRFSW 33 - { "draftfolder +folder", -6 }, -#define SDRMSW 34 - { "draftmessage msg", -6 }, -#define SNDRFSW 35 - { "nodraftfolder", -3 }, -#define SNDATTACHSW 39 +#define SNDATTACHSW 32 { "attach file", 6 }, -#define SNDATTACHFORMAT 40 +#define SNDATTACHFORMAT 33 { "attachformat", 7 }, -#define PORTSW 41 +#define PORTSW 34 { "port server-port-name/number", 4 }, { NULL, 0 } }; @@ -1219,15 +1188,6 @@ sendit (char *sp, char **arg, char *file, int pushed) vec[vecp++] = cp; continue; - case SDRFSW: - case SDRMSW: - if (!(cp = *argp++) || *cp == '-') { - advise (NULL, "missing argument to %s", argp[-2]); - return; - } - case SNDRFSW: - continue; - case SNDATTACHSW: if (!(attach = *argp++) || *attach == '-') { advise (NULL, "missing argument to %s", argp[-2]);