#include <lib-lib/lib-lib.h>
-#include <lib-ui/curses.h>
+#include <lib-ui/lib-ui.h>
#include <lib-ui/menu.h>
#include "mutt.h"
{"postpone", MENU_POST},
{"pgp", MENU_PGP},
{"smime", MENU_SMIME},
-
-#ifdef HAVE_GPGME
{"key_select_pgp", MENU_KEY_SELECT_PGP},
{"key_select_smime", MENU_KEY_SELECT_SMIME},
-#endif
-
{"query", MENU_QUERY},
{"generic", MENU_GENERIC},
{NULL, 0}
len--;
}
- return (max - len);
+ return max - len;
}
/* insert a key sequence into the specified map. the map is sorted by ASCII
mutt_ungetch (lastkey, 0);
for (; keyslen; keyslen--)
mutt_ungetch (keys[keyslen - 1], 0);
- return (km_dokey (MENU_GENERIC));
+ return km_dokey (MENU_GENERIC);
}
if (menu != MENU_EDITOR) {
/* probably a good idea to flush input here so we can abort macros */
if (!map)
- return (retry_generic (menu, NULL, 0, 0));
+ return retry_generic (menu, NULL, 0, 0);
for (;;) {
/* ncurses doesn't return on resized screen when timeout is set to zero */
if (menu != MENU_EDITOR)
- wtimeout (stdscr, (Timeout > 0 ? Timeout : 60) * 1000);
+ wtimeout (main_w, (Timeout > 0 ? Timeout : 60) * 1000);
tmp = mutt_getch ();
if (menu != MENU_EDITOR)
- wtimeout (stdscr, -1); /* restore blocking operation */
+ wtimeout (main_w, -1); /* restore blocking operation */
LastKey = tmp.ch;
if (LastKey == -1)
/* Nope. Business as usual */
while (LastKey > map->keys[pos]) {
if (pos > map->eq || !map->next)
- return (retry_generic (menu, map->keys, pos, LastKey));
+ return retry_generic (menu, map->keys, pos, LastKey);
map = map->next;
}
if (LastKey != map->keys[pos])
- return (retry_generic (menu, map->keys, pos, LastKey));
+ return retry_generic (menu, map->keys, pos, LastKey);
if (++pos == map->len) {
snprintf (buf, sizeof (buf), "%c", (unsigned char) c);
else
snprintf (buf, sizeof (buf), "\\x%hx", (unsigned short) c);
- return (buf);
+ return buf;
}
int km_expand_key (char *s, size_t len, struct keymap_t *map)
int p = 0;
if (!map)
- return (0);
+ return 0;
for (;;) {
m_strcpy(s, len, km_keyname(map->keys[p]));
len -= (l = m_strlen(s));
if (++p >= map->len || !len)
- return (1);
+ return 1;
s += l;
}
for (; map; map = map->next)
if (map->op == func)
break;
- return (map);
+ return map;
}
void km_init (void)
}
else
push_string (buf->data);
- return (r);
+ return r;
}
/* expects to see: <menu-string>,<menu-string>,... <key-string> */
m_strcpy(err->data, err->dsize, _("null key sequence"));
}
else if (MoreArgs (s))
- return (buf.data);
+ return buf.data;
}
else {
m_strcpy(err->data, err->dsize, _("too few arguments"));
}
error:
p_delete(&buf.data);
- return (NULL);
+ return NULL;
}
static int
for (i = 0; bindings[i].name; i++)
if (m_strcmp(func, bindings[i].name) == 0) {
km_bindkey (key, menu, bindings[i].op);
- return (0);
+ return 0;
}
- return (-1);
+ return -1;
}
struct binding_t *km_get_table (int menu)
}
}
p_delete(&key);
- return (r);
+ return r;
}
/* macro <menu> <key> <macro> <description> */
if ((key =
parse_keymap (menu, s, sizeof (menu) / sizeof (menu[0]), &nummenus,
err)) == NULL)
- return (-1);
+ return -1;
mutt_extract_token (buf, s, M_TOKEN_CONDENSE);
/* make sure the macro sequence is not an empty string */
}
}
p_delete(&key);
- return (r);
+ return r;
}
/* exec function-name */
if (!MoreArgs (s)) {
m_strcpy(err->data, err->dsize, _("exec: no arguments"));
- return (-1);
+ return -1;
}
do {
if (ops[nops] == OP_NULL) {
mutt_flushinp ();
mutt_error (_("%s: no such function"), function);
- return (-1);
+ return -1;
}
nops++;
}