Let's free that space to put anything useful.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
#define RSORT(x) (SortAlias & SORT_REVERSE) ? -x : x
-static struct mapping_t AliasHelp[] = {
- {N_("Exit"), OP_EXIT},
- {N_("Del"), OP_DELETE},
- {N_("Undel"), OP_UNDELETE},
- {N_("Select"), OP_GENERIC_SELECT_ENTRY},
- {N_("Help"), OP_HELP},
- {NULL, OP_NULL}
-};
-
static void mutt_alias_menu(char *, size_t, alias_t *);
const address_t *alias_lookup(const char *s)
int t = -1;
int i, done = 0;
int op;
- char helpstr[STRING];
int omax;
menu->tag = alias_tag;
menu->menu = MENU_ALIAS;
menu->title = _("Aliases");
- menu->help = mutt_compile_help(helpstr, sizeof(helpstr),
- MENU_ALIAS, AliasHelp);
new_aliases:
#include "nntp.h"
#endif
-static struct mapping_t FolderHelp[] = {
- {N_("Exit"), OP_EXIT},
- {N_("Chdir"), OP_CHANGE_DIRECTORY},
- {N_("Mask"), OP_ENTER_MASK},
- {N_("Help"), OP_HELP},
- {NULL, OP_NULL}
-};
-
-#ifdef USE_NNTP
-static struct mapping_t FolderNewsHelp[] = {
- {N_("Exit"), OP_EXIT},
- {N_("List"), OP_TOGGLE_MAILBOXES},
- {N_("Subscribe"), OP_BROWSER_SUBSCRIBE},
- {N_("Unsubscribe"), OP_BROWSER_UNSUBSCRIBE},
- {N_("Catchup"), OP_CATCHUP},
- {N_("Mask"), OP_ENTER_MASK},
- {N_("Help"), OP_HELP},
- {NULL, OP_NULL}
-};
-#endif
-
typedef struct folder_t {
struct folder_file *ff;
int num;
{
char buf[_POSIX_PATH_MAX];
char prefix[_POSIX_PATH_MAX] = "";
- char helpstr[STRING];
char title[STRING];
struct browser_state state;
MUTTMENU *menu;
menu->data = state.entry;
if (multiple)
menu->tag = file_tag;
-
- menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_FOLDER,
-#ifdef USE_NNTP
- (option (OPTNEWS)) ? FolderNewsHelp :
-#endif
- FolderHelp);
-
init_menu (&state, menu, title, sizeof (title), buffy);
for (;;) {
#endif
};
-static struct mapping_t ComposeHelp[] = {
- {N_("Send"), OP_COMPOSE_SEND_MESSAGE},
- {N_("Abort"), OP_EXIT},
- {"To", OP_COMPOSE_EDIT_TO},
- {"CC", OP_COMPOSE_EDIT_CC},
- {"Subj", OP_COMPOSE_EDIT_SUBJECT},
- {N_("Attach file"), OP_COMPOSE_ATTACH_FILE},
- {N_("Descrip"), OP_COMPOSE_EDIT_DESCRIPTION},
- {N_("Help"), OP_HELP},
- {NULL, OP_NULL}
-};
-
-#ifdef USE_NNTP
-static struct mapping_t ComposeNewsHelp[] = {
- {N_("Send"), OP_COMPOSE_SEND_MESSAGE},
- {N_("Abort"), OP_EXIT},
- {"Newsgroups", OP_COMPOSE_EDIT_NEWSGROUPS},
- {"Subj", OP_COMPOSE_EDIT_SUBJECT},
- {N_("Attach file"), OP_COMPOSE_ATTACH_FILE},
- {N_("Descrip"), OP_COMPOSE_EDIT_DESCRIPTION},
- {N_("Help"), OP_HELP},
- {NULL, OP_NULL}
-};
-#endif
-
-
static void snd_entry (char *b, ssize_t blen, MUTTMENU * menu, int num) {
m_strformat(b, blen, COLS - SW, AttachFormat, mutt_attach_fmt,
((ATTACHPTR **)menu->data)[num], M_FORMAT_STAT_FILE);
ssize_t fcclen,
HEADER * cur __attribute__ ((unused)))
{ /* current message */
- char helpstr[STRING];
char buf[LONG_STRING];
char fname[_POSIX_PATH_MAX];
MUTTMENU *menu;
menu->make_entry = snd_entry;
menu->tag = mutt_tag_attach;
menu->data = idx;
-#ifdef USE_NNTP
- if (news)
- menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_COMPOSE,
- ComposeNewsHelp);
- else
-#endif
- menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_COMPOSE,
- ComposeHelp);
if (option (OPTMBOXPANE))
buffy_check (0);
cryptkey_t **cryptkey_table;
MUTTMENU *menu;
int i, done = 0;
- char helpstr[STRING], buf[LONG_STRING];
+ char buf[LONG_STRING];
cryptkey_t *k;
int (*f) (const void *, const void *);
int menu_to_use = 0;
else if (app & APPLICATION_SMIME)
menu_to_use = MENU_KEY_SELECT_SMIME;
- helpstr[0] = 0;
- mutt_make_help (buf, sizeof (buf), _("Exit "), menu_to_use, OP_EXIT);
- m_strcat(helpstr, sizeof(helpstr), buf);
- mutt_make_help (buf, sizeof (buf), _("Select "), menu_to_use,
- OP_GENERIC_SELECT_ENTRY);
- m_strcat(helpstr, sizeof(helpstr), buf);
- mutt_make_help (buf, sizeof (buf), _("Check key "),
- menu_to_use, OP_VERIFY_KEY);
- m_strcat(helpstr, sizeof(helpstr), buf);
- mutt_make_help (buf, sizeof (buf), _("Help"), menu_to_use, OP_HELP);
- m_strcat(helpstr, sizeof(helpstr), buf);
-
menu = mutt_new_menu ();
menu->max = i;
menu->make_entry = crypt_entry;
menu->menu = menu_to_use;
- menu->help = helpstr;
menu->data = cryptkey_table;
{
d[0] = 0;
}
-char *mutt_compile_help (char *buf, ssize_t buflen, int menu,
- struct mapping_t *items)
-{
- int i;
- ssize_t len;
- char *pbuf = buf;
-
- for (i = 0; items[i].name && buflen > 2; i++) {
- if (i) {
- *pbuf++ = ' ';
- *pbuf++ = ' ';
- buflen -= 2;
- }
- mutt_make_help (pbuf, buflen, _(items[i].name), menu, items[i].value);
- len = m_strlen(pbuf);
- pbuf += len;
- buflen -= len;
- }
- return buf;
-}
-
static int print_macro (FILE * f, int maxwidth, const char **macro)
{
int n = maxwidth;
{
tlssockdata *data = conn->sockdata;
gnutls_session state = data->state;
- char helpstr[STRING];
- char buf[STRING];
char fpbuf[STRING];
ssize_t buflen;
char dn_common_name[STRING];
menu->keys = _("ro");
}
- helpstr[0] = '\0';
- mutt_make_help (buf, sizeof (buf), _("Exit "), MENU_GENERIC, OP_EXIT);
- strncat (helpstr, buf, sizeof (helpstr));
- mutt_make_help (buf, sizeof (buf), _("Help"), MENU_GENERIC, OP_HELP);
- strncat (helpstr, buf, sizeof (helpstr));
- menu->help = helpstr;
-
done = 0;
set_option (OPTUNBUFFEREDINPUT);
while (!done) {
*/
int mutt_index_menu (void)
{
- char buf[LONG_STRING], helpstr[STRING];
+ char buf[LONG_STRING];
int flags;
int op = OP_NULL;
int done = 0; /* controls when to exit the "event" loop */
menu->make_entry = (void *) index_make_entry;
menu->color = index_color;
menu->current = ci_first_message ();
- menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_MAIN,
-#ifdef USE_NNTP
- (Context
- && (Context->magic ==
- M_NNTP)) ? IndexNewsHelp :
-#endif
- IndexHelp);
if (!attach_msg) {
buffy_check (0); /* force the buffy check after we enter the folder */
menu->current = 0;
sidebar_set_current (buf);
-#ifdef USE_NNTP
- /* buffy_check() must be done with mail-reader mode! */
- menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_MAIN,
- (Context
- && (Context->magic ==
- M_NNTP)) ? IndexNewsHelp :
- IndexHelp);
-#endif
mutt_clear_error ();
buffy_check (0); /* force the buffy check after we have changed
the folder */
if (option (OPTHELP)) {
SETCOLOR (MT_COLOR_STATUS);
move (option (OPTSTATUSONTOP) ? LINES - 2 : 0, SW);
- mutt_paddstr (COLS-SW, menu->help);
+ mutt_paddstr (COLS-SW, "");
SETCOLOR (MT_COLOR_NORMAL);
menu->offset = 1;
menu->pagelen = LINES - 3;
typedef struct menu_t {
const char *title; /* the title of this menu */
- const char *help; /* quickref for the current menu */
void *data; /* extra data for the current menu */
int current; /* current entry */
int max; /* the number of entries in the menu */
QUERY *data;
} ENTRY;
-static struct mapping_t QueryHelp[] = {
- {N_("Exit"), OP_EXIT},
- {N_("Mail"), OP_MAIL},
- {N_("New Query"), OP_QUERY},
- {N_("Make Alias"), OP_CREATE_ALIAS},
- {N_("Search"), OP_SEARCH},
- {N_("Help"), OP_HELP},
- {NULL, OP_NULL}
-};
-
/* Variables for outsizing output format */
static int FirstColumn;
static int SecondColumn;
QUERY *queryp = NULL;
int i, done = 0;
int op;
- char helpstr[STRING];
char title[STRING];
snprintf (title, sizeof (title), _("Query")); /* FIXME */
menu->tag = query_tag;
menu->menu = MENU_QUERY;
menu->title = title;
- menu->help =
- mutt_compile_help (helpstr, sizeof (helpstr), MENU_QUERY, QueryHelp);
if (results == NULL) {
/* Prompt for Query */
menu->tag = query_tag;
menu->menu = MENU_QUERY;
menu->title = title;
- menu->help =
- mutt_compile_help (helpstr, sizeof (helpstr), MENU_QUERY,
- QueryHelp);
/* count the number of results */
for (queryp = results; queryp; queryp = queryp->next)
return cur;
}
-static struct mapping_t PagerHelp[] = {
- {N_("Exit"), OP_EXIT},
- {N_("PrevPg"), OP_PREV_PAGE},
- {N_("NextPg"), OP_NEXT_PAGE},
- {NULL, 0}
-};
-static struct mapping_t PagerHelpExtra[] = {
- {N_("View Attachm."), OP_VIEW_ATTACHMENTS},
- {N_("Del"), OP_DELETE},
- {N_("Reply"), OP_REPLY},
- {N_("Next"), OP_MAIN_NEXT_UNDELETED},
- {NULL, 0}
-};
-
-#ifdef USE_NNTP
-static struct mapping_t PagerNewsHelpExtra[] = {
- {N_("Post"), OP_POST},
- {N_("Followup"), OP_FOLLOWUP},
- {N_("Del"), OP_DELETE},
- {N_("Next"), OP_MAIN_NEXT_UNDELETED},
- {NULL, 0}
-};
-#endif
-
-
/* This pager is actually not so simple as it once was. It now operates in
two modes: one for viewing messages and the other for viewing help. These
can be distinguished by whether or not ``hdr'' is NULL. The ``hdr'' arg
{
static char searchbuf[STRING];
char buffer[LONG_STRING];
- char helpstr[STRING * 2];
- char tmphelp[STRING * 2];
int maxLine, lastLine = 0;
struct line_t *lineInfo;
struct q_class_t *QuoteList = NULL;
(lineInfo[i].syntax)[0].first = (lineInfo[i].syntax)[0].last = -1;
}
- mutt_compile_help (helpstr, sizeof(helpstr), MENU_PAGER, PagerHelp);
- if (IsHeader (extra)) {
- m_strcpy(tmphelp, sizeof(tmphelp), helpstr);
- mutt_compile_help (buffer, sizeof(buffer), MENU_PAGER,
-#ifdef USE_NNTP
- (Context
- && (Context->magic == M_NNTP)) ? PagerNewsHelpExtra :
-#endif
- PagerHelpExtra);
- snprintf (helpstr, sizeof (helpstr), "%s %s", tmphelp, buffer);
- }
- if (!InHelp) {
- m_strcpy(tmphelp, sizeof(tmphelp), helpstr);
- mutt_make_help (buffer, sizeof(buffer), _("Help"), MENU_PAGER, OP_HELP);
- snprintf (helpstr, sizeof(helpstr), "%s %s", tmphelp, buffer);
- }
-
while (ch != -1) {
mutt_curs_set (0);
imap_keepalive ();
if (option (OPTHELP)) {
SETCOLOR (MT_COLOR_STATUS);
move (helpoffset, SW);
- mutt_paddstr (COLS-SW, helpstr);
+ mutt_paddstr (COLS-SW, "");
SETCOLOR (MT_COLOR_NORMAL);
}
#include <imap/imap.h>
-static struct mapping_t PostponeHelp[] = {
- {N_("Exit"), OP_EXIT},
- {N_("Del"), OP_DELETE},
- {N_("Undel"), OP_UNDELETE},
- {N_("Help"), OP_HELP},
- {NULL, OP_NULL}
-};
-
-
-
static short PostCount = 0;
static CONTEXT *PostContext = NULL;
static short UpdateNumPostponed = 0;
{
MUTTMENU *menu;
int i, done = 0, r = -1;
- char helpstr[STRING];
short orig_sort;
menu = mutt_new_menu ();
menu->max = PostContext->msgcount;
menu->title = _("Postponed Messages");
menu->data = PostContext;
- menu->help =
- mutt_compile_help (helpstr, sizeof (helpstr), MENU_POST, PostponeHelp);
/* The postponed mailbox is setup to have sorting disabled, but the global
* Sort variable may indicate something different. Sorting has to be
void mutt_make_attribution (CONTEXT * ctx, HEADER * cur, FILE * out);
void mutt_make_forward_subject (ENVELOPE * env, CONTEXT * ctx, HEADER * cur);
void mutt_make_help (char *, ssize_t, const char *, int, int);
-char *mutt_compile_help(char *, ssize_t, int, struct mapping_t *);
void mutt_make_misc_reply_headers (ENVELOPE * env, CONTEXT * ctx,
HEADER * cur, ENVELOPE * curenv);
void mutt_message_to_7bit (BODY *, FILE *);
#define SW (option(OPTMBOXPANE)?SidebarWidth:0)
-static struct mapping_t AttachHelp[] = {
- {N_("Exit"), OP_EXIT},
- {N_("Save"), OP_SAVE},
- {N_("Pipe"), OP_PIPE},
- {N_("Print"), OP_PRINT},
- {N_("Help"), OP_HELP},
- {NULL, OP_NULL}
-};
-
void mutt_update_tree (ATTACHPTR ** idx, short idxlen)
{
char buf[STRING];
int secured = 0;
int need_secured = 0;
- char helpstr[STRING];
MUTTMENU *menu;
BODY *cur = NULL;
MESSAGE *msg;
menu->title = _("Attachments");
menu->make_entry = attach_entry;
menu->tag = mutt_tag_attach;
- menu->help =
- mutt_compile_help (helpstr, sizeof (helpstr), MENU_ATTACH, AttachHelp);
mutt_attach_init (cur);
attach_collapse (cur, 0, 1, 0);
return 0;
}
-static struct mapping_t RemailerHelp[] = {
- {N_("Append"), OP_MIX_APPEND},
- {N_("Insert"), OP_MIX_INSERT},
- {N_("Delete"), OP_MIX_DELETE},
- {N_("Abort"), OP_EXIT},
- {N_("OK"), OP_MIX_USE},
- {NULL, OP_NULL}
-};
-
-
void mix_make_chain (string_list_t ** chainp, int *redraw)
{
string_list_t *p;
struct coord *coords = NULL;
MUTTMENU *menu;
- char helpstr[STRING];
short loop = 1;
int op;
menu->tag = NULL;
menu->title = _("Select a remailer chain.");
menu->data = type2_list;
- menu->help =
- mutt_compile_help (helpstr, sizeof (helpstr), MENU_MIX, RemailerHelp);
m_len = menu->pagelen = MIX_VOFFSET - menu->offset - 1;