From: David Levine Date: Sat, 18 Jan 2014 00:42:52 +0000 (-0600) Subject: Removed -a option from whatnow attach, in anticipation of X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/bc7e7fff04e49c829957d3c99a24a037c6d49d5e?ds=sidebyside;hp=-c Removed -a option from whatnow attach, in anticipation of removal of send -attachformat. --- bc7e7fff04e49c829957d3c99a24a037c6d49d5e diff --git a/docs/pending-release-notes b/docs/pending-release-notes index 2e15c714..cfe66e3a 100644 --- a/docs/pending-release-notes +++ b/docs/pending-release-notes @@ -64,7 +64,7 @@ NEW FEATURES attachment using a program such as file --mime-type, if available at configuration time. If not, it will use mhshow-suffix- entries as before. The -v switch to attach causes it to display the mhbuild - directive for an attachformat specied by an optional -a switch. + directive that send(1) will use. - mhbuild(1) now supports the -auto/-noauto flags (to be used by send(1) when invoking mhbuild automatically). diff --git a/man/whatnow.man b/man/whatnow.man index 76d93ba7..367a3267 100644 --- a/man/whatnow.man +++ b/man/whatnow.man @@ -1,4 +1,4 @@ -.TH WHATNOW %manext1% "January 12, 2014" "%nmhversion%" +.TH WHATNOW %manext1% "January 17, 2014" "%nmhversion%" .\" .\" %nmhwarning% .\" @@ -108,11 +108,11 @@ print the working directory for attachment files .B ls [ls-options] list files in the attachment working directory using the ls command .TP \w'refilezzzzfolderz'u -.B attach [-v [-a 0|1|2]] files +.B attach [-v] files add the named files to the message as MIME attachments; -v displays -the mhbuild directive, using the optionally specified attachformat -[-a] if that is also provided to +the mhbuild directive that .IR send (1) +will use .TP \w'refilezzzzfolderz'u .B alist [-ln] list the MIME attachments, either short, long [-l] or numbered [-n] diff --git a/uip/whatnowsbr.c b/uip/whatnowsbr.c index 82b0d67f..7c2c021b 100644 --- a/uip/whatnowsbr.c +++ b/uip/whatnowsbr.c @@ -26,12 +26,9 @@ * pwd command and exists to allow the user * to verify the directory. * - * attach [-v [-a 0|1|2]] files - * This option attaches the named files to + * attach [-v] files This option attaches the named files to * the draft. -v displays the mhbuild - * directive, using the optionally specified - * attachformat [-a] if that is also provided - * to send(1). + * directive that send(1) will use. * * alist [-ln] This option lists the attachments on the * draft. -l gets long listings, -n gets @@ -84,7 +81,7 @@ DEFINE_SWITCH_ARRAY(WHATNOW, whatnowswitches); X("cd [directory]", 0, CDCMDSW) \ X("pwd", 0, PWDCMDSW) \ X("ls", 2, LSCMDSW) \ - X("attach [-v [-a 0|1|2]]", 0, ATTACHCMDSW) \ + X("attach [-v]", 0, ATTACHCMDSW) \ X("detach [-n]", 0, DETACHCMDSW) \ X("alist [-ln] ", 2, ALISTCMDSW) \ @@ -403,7 +400,6 @@ WhatNow (int argc, char **argv) */ int verbose = 0; - int attachformat = 1; char **ap; if (attach == (char *)0) { @@ -415,22 +411,6 @@ WhatNow (int argc, char **argv) if (strcmp(*ap, "-v") == 0) { ++argp; verbose = 1; - } else if (strcmp(*ap, "-a") == 0) { - ++argp; - if (*(ap+1) == NULL || - ! isdigit ((unsigned char) *(ap+1)[0])) { - advise(NULL, - "ignoring attach -a without format argument."); - } else { - ++argp; - ++ap; - if ((attachformat = atoi(*ap)) > 2) { - advise(NULL, - "ignoring invalid attachformat value of %d", - attachformat); - attachformat = 1; - } - } } else if (*ap[0] != '-') { break; } @@ -465,16 +445,14 @@ WhatNow (int argc, char **argv) (void)annotate(drft, attach, shell, 1, 0, -2, 1); if (verbose) { build_directive = - construct_build_directive (shell, NULL, - attachformat); + construct_build_directive (shell, NULL, 1); } } else { (void)sprintf(file, "%s/%s", cwd, shell); (void)annotate(drft, attach, file, 1, 0, -2, 1); if (verbose) { build_directive = - construct_build_directive (file, NULL, - attachformat); + construct_build_directive (file, NULL, 1); } }