X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fforw.c;h=54b7c074e26aae0ab131129a4c05d48a8ff9d93c;hb=2932d136debcf53a45c44891ee80e6d34e61f109;hp=fe056f4a67152a6fb981d5f664e823cae6c2dc00;hpb=75fca31a5b9d5c1a99c74ab14c94438d8852fba9;p=mmh diff --git a/uip/forw.c b/uip/forw.c index fe056f4..54b7c07 100644 --- a/uip/forw.c +++ b/uip/forw.c @@ -20,7 +20,7 @@ static struct swit switches[] = { #define ANNOSW 0 { "annotate", 0 }, #define NANNOSW 1 - { "noannotate", 0 }, + { "noannotate", 2 }, #define EDITRSW 2 { "editor editor", 0 }, #define FORMSW 3 @@ -34,15 +34,11 @@ static struct swit switches[] = { #define WHATSW 7 { "whatnowproc program", 0 }, #define VERSIONSW 8 - { "version", 0 }, + { "Version", 0 }, #define HELPSW 9 { "help", 0 }, - -#ifdef MHE -#define BILDSW 12 +#define BILDSW 10 { "build", 5 }, /* interface from mhe */ -#endif /* MHE */ - { NULL, 0 } }; @@ -70,14 +66,9 @@ main(int argc, char **argv) char *form = NULL, buf[BUFSIZ], value[10]; char **argp, **arguments, *msgs[MAXARGS]; char *fmtstr; - -#ifdef MHE int buildsw = 0; -#endif /* MHE */ -#ifdef LOCALE setlocale(LC_ALL, ""); -#endif invo_name = mhbasename(argv[0]); /* read user profile/context */ @@ -122,11 +113,10 @@ main(int argc, char **argv) adios(NULL, "missing argument to %s", argp[-2]); continue; -#ifdef MHE + case BILDSW: - buildsw++; /* fall... */ + buildsw++; continue; -#endif /* MHE */ case FORMSW: if (!(form = *argp++) || *form == '-') @@ -169,13 +159,14 @@ main(int argc, char **argv) } cwd = getcpy(pwd()); - -#ifdef MHE - strncpy(drft, buildsw ? toabsdir("draft") - : m_draft(seq_beyond), sizeof(drft)); -#else - strncpy(drft, m_draft(seq_beyond), sizeof(drft)); -#endif /* MHE */ + strncpy(drft, buildsw ? toabsdir("draft") : m_draft(seq_beyond), + sizeof(drft)); + /* + ** FIXME: (concerning MHE support (buildsw) only) + ** There's no check if the draft already exists. mmh has removed + ** this case by having the draft folder. I won't add code only to + ** handle this legacy issue for MHE. -- meillo@marmaro.de 2012-05 + */ /* ** Forwarding a message.