whatnow(1)'s -prompt option would use the value as a printf(3) format
string, supplying `invo_name' as the sole value to be formatted. This
was undocumented, and upset gcc's checking of format strings. As no
requests to keep the ability appeared on nmh-workers in reply to
2017-08-09's email, treat -prompt's value as a simple string.
int isdf = 0, nedit = 0, use = 0, atfile = 1;
char *cp, *dfolder = NULL, *dmsg = NULL;
char *ed = NULL, *drft = NULL, *msgnam = NULL;
int isdf = 0, nedit = 0, use = 0, atfile = 1;
char *cp, *dfolder = NULL, *dmsg = NULL;
char *ed = NULL, *drft = NULL, *msgnam = NULL;
- char buf[BUFSIZ], prompt[BUFSIZ];
char **argp, **arguments;
struct stat st;
char cwd[PATH_MAX + 1]; /* current working directory */
char **argp, **arguments;
struct stat st;
char cwd[PATH_MAX + 1]; /* current working directory */
NULL, 1, atfile) < 0)
done (1);
NULL, 1, atfile) < 0)
done (1);
- snprintf (prompt, sizeof(prompt), myprompt, invo_name);
for (;;) {
#ifdef READLINE_SUPPORT
for (;;) {
#ifdef READLINE_SUPPORT
- if (!(argp = read_switch_multiword_via_readline (prompt, aleqs))) {
+ if (!(argp = read_switch_multiword_via_readline(myprompt, aleqs))) {
#else /* ! READLINE_SUPPORT */
#else /* ! READLINE_SUPPORT */
- if (!(argp = read_switch_multiword (prompt, aleqs))) {
+ if (!(argp = read_switch_multiword(myprompt, aleqs))) {
#endif /* READLINE_SUPPORT */
(void) m_unlink (LINK);
done (1);
#endif /* READLINE_SUPPORT */
(void) m_unlink (LINK);
done (1);