projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FOREVER is of very bad taste, use for (;;)
[apps/madmutt.git]
/
keymap.c
diff --git
a/keymap.c
b/keymap.c
index
abfc8c3
..
29e0dcd
100644
(file)
--- a/
keymap.c
+++ b/
keymap.c
@@
-15,9
+15,9
@@
#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.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 "mutt.h"
-#include "buffer.h"
#include "mutt_menu.h"
#include "mutt_curses.h"
#include "keymap.h"
#include "mutt_menu.h"
#include "mutt_curses.h"
#include "keymap.h"
@@
-359,7
+359,7
@@
int km_dokey (int menu)
if (!map)
return (retry_generic (menu, NULL, 0, 0));
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);
/* ncurses doesn't return on resized screen when timeout is set to zero */
if (menu != MENU_EDITOR)
timeout ((Timeout > 0 ? Timeout : 60) * 1000);
@@
-491,7
+491,7
@@
int km_expand_key (char *s, size_t len, struct keymap_t *map)
if (!map)
return (0);
if (!map)
return (0);
-
FOREVER
{
+
for (;;)
{
strfcpy (s, km_keyname (map->keys[p]), len);
len -= (l = m_strlen(s));
strfcpy (s, km_keyname (map->keys[p]), len);
len -= (l = m_strlen(s));
@@
-722,7
+722,7
@@
try_bind (char *key, int menu, char *func, struct binding_t *bindings)
int i;
for (i = 0; bindings[i].name; i++)
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);
}
km_bindkey (key, menu, bindings[i].op);
return (0);
}