From e0ea1733e353493bede47849a33ca13f3cd6f971 Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Mon, 16 Aug 2004 04:20:56 +0000 Subject: [PATCH] The type key_callback has got a real prototype. --- src/main.c | 8 ++++---- src/main.h | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main.c b/src/main.c index d3510d0b9..01db21f9a 100644 --- a/src/main.c +++ b/src/main.c @@ -1238,7 +1238,7 @@ static const key_map ctl_x_map[] = { static int ctl_x_map_enabled = 0; static void -ctl_x_cmd (int ignore) +ctl_x_cmd (void) { 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; for (i = 0; ctl_x_map[i].key_code; i++) if (parm == ctl_x_map[i].key_code) { - (*ctl_x_map[i].fn) (parm); + (*ctl_x_map[i].fn) (); return MSG_HANDLED; } } @@ -1564,13 +1564,13 @@ midnight_callback (struct Dlg_head *h, dlg_msg_t msg, int parm) ctl_x_map_enabled = 0; for (i = 0; ctl_x_map[i].key_code; i++) if (parm == ctl_x_map[i].key_code) { - (*ctl_x_map[i].fn) (parm); + (*ctl_x_map[i].fn) (); return MSG_HANDLED; } } else { for (i = 0; default_map[i].key_code; i++) { if (parm == default_map[i].key_code) { - (*default_map[i].fn) (parm); + (*default_map[i].fn) (); return MSG_HANDLED; } } diff --git a/src/main.h b/src/main.h index add2f01dd..2ddc06e83 100644 --- a/src/main.h +++ b/src/main.h @@ -73,10 +73,7 @@ extern int is_right; /* If the selected menu was the right */ #define MENU_PANEL_IDX (is_right ? 1 : 0) #define SELECTED_IS_PANEL (get_display_type (is_right ? 1 : 0) == view_listing) -typedef void (*key_callback) (); -/* 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. */ +typedef void (*key_callback) (void); /* The keymaps are of this type */ typedef struct {