From ae3c8a324d160d4a498f7be6735be1d62a412759 Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Mon, 15 Aug 2005 22:59:20 +0000 Subject: [PATCH] Don't mix enums with ints. --- src/ChangeLog | 1 + src/widget.c | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 30282f497..631cb0c41 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -18,6 +18,7 @@ * complete.c: Don't mix enums with ints. * tree.c: Likewise. * screen.c (use_display_format): Removed unused variable. + * widget.c: Don't mix enums with ints. 2005-08-15 Jindrich Makovicka diff --git a/src/widget.c b/src/widget.c index 880164a9c..dbc34fd75 100644 --- a/src/widget.c +++ b/src/widget.c @@ -1516,10 +1516,10 @@ port_region_marked_for_delete (WInput *in) cb_ret_t handle_char (WInput *in, int c_code) { + cb_ret_t v; int i; - int v; - v = 0; + v = MSG_NOT_HANDLED; if (quote){ free_completions (in); @@ -1534,7 +1534,7 @@ handle_char (WInput *in, int c_code) if (input_map [i].fn != complete) free_completions (in); (*input_map [i].fn)(in); - v = 1; + v = MSG_HANDLED; break; } } @@ -1580,7 +1580,7 @@ cb_ret_t input_callback (Widget *w, widget_msg_t msg, int parm) { WInput *in = (WInput *) w; - int v; + cb_ret_t v; switch (msg) { case WIDGET_KEY: @@ -2004,13 +2004,13 @@ listbox_key (WListbox *l, int key) case XCTRL('v'): for (i = 0; i < l->height-1; i++) j |= listbox_fwd (l); - return j > 0; + return (j > 0) ? MSG_HANDLED : MSG_NOT_HANDLED; case KEY_PPAGE: case ALT('v'): for (i = 0; i < l->height-1; i++) j |= listbox_back (l); - return j > 0; + return (j > 0) ? MSG_HANDLED : MSG_NOT_HANDLED; } return MSG_NOT_HANDLED; } @@ -2033,7 +2033,7 @@ static cb_ret_t listbox_callback (Widget *w, widget_msg_t msg, int parm) { WListbox *l = (WListbox *) w; - int ret_code; + cb_ret_t ret_code; WLEntry *e; Dlg_head *h = l->widget.parent;