The type key_callback has got a real prototype.
Этот коммит содержится в:
родитель
b08778c9c6
Коммит
e0ea1733e3
@ -1238,7 +1238,7 @@ static const key_map ctl_x_map[] = {
|
|||||||
static int ctl_x_map_enabled = 0;
|
static int ctl_x_map_enabled = 0;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ctl_x_cmd (int ignore)
|
ctl_x_cmd (void)
|
||||||
{
|
{
|
||||||
ctl_x_map_enabled = 1;
|
ctl_x_map_enabled = 1;
|
||||||
}
|
}
|
||||||
@ -1468,7 +1468,7 @@ midnight_callback (struct Dlg_head *h, dlg_msg_t msg, int parm)
|
|||||||
ctl_x_map_enabled = 0;
|
ctl_x_map_enabled = 0;
|
||||||
for (i = 0; ctl_x_map[i].key_code; i++)
|
for (i = 0; ctl_x_map[i].key_code; i++)
|
||||||
if (parm == ctl_x_map[i].key_code) {
|
if (parm == ctl_x_map[i].key_code) {
|
||||||
(*ctl_x_map[i].fn) (parm);
|
(*ctl_x_map[i].fn) ();
|
||||||
return MSG_HANDLED;
|
return MSG_HANDLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1564,13 +1564,13 @@ midnight_callback (struct Dlg_head *h, dlg_msg_t msg, int parm)
|
|||||||
ctl_x_map_enabled = 0;
|
ctl_x_map_enabled = 0;
|
||||||
for (i = 0; ctl_x_map[i].key_code; i++)
|
for (i = 0; ctl_x_map[i].key_code; i++)
|
||||||
if (parm == ctl_x_map[i].key_code) {
|
if (parm == ctl_x_map[i].key_code) {
|
||||||
(*ctl_x_map[i].fn) (parm);
|
(*ctl_x_map[i].fn) ();
|
||||||
return MSG_HANDLED;
|
return MSG_HANDLED;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; default_map[i].key_code; i++) {
|
for (i = 0; default_map[i].key_code; i++) {
|
||||||
if (parm == default_map[i].key_code) {
|
if (parm == default_map[i].key_code) {
|
||||||
(*default_map[i].fn) (parm);
|
(*default_map[i].fn) ();
|
||||||
return MSG_HANDLED;
|
return MSG_HANDLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,10 +73,7 @@ extern int is_right; /* If the selected menu was the right */
|
|||||||
#define MENU_PANEL_IDX (is_right ? 1 : 0)
|
#define MENU_PANEL_IDX (is_right ? 1 : 0)
|
||||||
#define SELECTED_IS_PANEL (get_display_type (is_right ? 1 : 0) == view_listing)
|
#define SELECTED_IS_PANEL (get_display_type (is_right ? 1 : 0) == view_listing)
|
||||||
|
|
||||||
typedef void (*key_callback) ();
|
typedef void (*key_callback) (void);
|
||||||
/* FIXME: We have to leave this type ambiguous, because `key_callback'
|
|
||||||
is used both for functions that take an argument and ones that don't.
|
|
||||||
That ought to be cleared up. */
|
|
||||||
|
|
||||||
/* The keymaps are of this type */
|
/* The keymaps are of this type */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user