#endif
#include <lib-lib/mem.h>
+#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
+#include <lib-lib/buffer.h>
#include "mutt.h"
-#include "buffer.h"
-#include "ascii.h"
#include "mutt_menu.h"
#include "mutt_curses.h"
#include "keymap.h"
if (!map)
return (retry_generic (menu, NULL, 0, 0));
- FOREVER {
+ for (;;) {
/* ncurses doesn't return on resized screen when timeout is set to zero */
if (menu != MENU_EDITOR)
timeout ((Timeout > 0 ? Timeout : 60) * 1000);
if (!map)
return (0);
- FOREVER {
+ for (;;) {
strfcpy (s, km_keyname (map->keys[p]), len);
len -= (l = m_strlen(s));
void km_init (void)
{
- memset (Keymaps, 0, sizeof (struct keymap_t *) * MENU_MAX);
+ p_clear(Keymaps, MENU_MAX);
create_bindings (OpAttach, MENU_ATTACH);
create_bindings (OpBrowser, MENU_FOLDER);
int i = 0;
char *p, *q;
- memset (&buf, 0, sizeof (buf));
+ p_clear(&buf, 1);
/* menu name */
mutt_extract_token (&buf, s, 0);
int i;
for (i = 0; bindings[i].name; i++)
- if (str_cmp (func, bindings[i].name) == 0) {
+ if (m_strcmp(func, bindings[i].name) == 0) {
km_bindkey (key, menu, bindings[i].op);
return (0);
}