Don't mix enums with ints.

This commit is contained in:
Roland Illig 2005-08-15 22:59:20 +00:00
parent 08a40c8d17
commit ae3c8a324d
2 changed files with 8 additions and 7 deletions

View File

@ -18,6 +18,7 @@
* complete.c: Don't mix enums with ints. * complete.c: Don't mix enums with ints.
* tree.c: Likewise. * tree.c: Likewise.
* screen.c (use_display_format): Removed unused variable. * screen.c (use_display_format): Removed unused variable.
* widget.c: Don't mix enums with ints.
2005-08-15 Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz> 2005-08-15 Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>

View File

@ -1516,10 +1516,10 @@ port_region_marked_for_delete (WInput *in)
cb_ret_t cb_ret_t
handle_char (WInput *in, int c_code) handle_char (WInput *in, int c_code)
{ {
cb_ret_t v;
int i; int i;
int v;
v = 0; v = MSG_NOT_HANDLED;
if (quote){ if (quote){
free_completions (in); free_completions (in);
@ -1534,7 +1534,7 @@ handle_char (WInput *in, int c_code)
if (input_map [i].fn != complete) if (input_map [i].fn != complete)
free_completions (in); free_completions (in);
(*input_map [i].fn)(in); (*input_map [i].fn)(in);
v = 1; v = MSG_HANDLED;
break; break;
} }
} }
@ -1580,7 +1580,7 @@ cb_ret_t
input_callback (Widget *w, widget_msg_t msg, int parm) input_callback (Widget *w, widget_msg_t msg, int parm)
{ {
WInput *in = (WInput *) w; WInput *in = (WInput *) w;
int v; cb_ret_t v;
switch (msg) { switch (msg) {
case WIDGET_KEY: case WIDGET_KEY:
@ -2004,13 +2004,13 @@ listbox_key (WListbox *l, int key)
case XCTRL('v'): case XCTRL('v'):
for (i = 0; i < l->height-1; i++) for (i = 0; i < l->height-1; i++)
j |= listbox_fwd (l); j |= listbox_fwd (l);
return j > 0; return (j > 0) ? MSG_HANDLED : MSG_NOT_HANDLED;
case KEY_PPAGE: case KEY_PPAGE:
case ALT('v'): case ALT('v'):
for (i = 0; i < l->height-1; i++) for (i = 0; i < l->height-1; i++)
j |= listbox_back (l); j |= listbox_back (l);
return j > 0; return (j > 0) ? MSG_HANDLED : MSG_NOT_HANDLED;
} }
return 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) listbox_callback (Widget *w, widget_msg_t msg, int parm)
{ {
WListbox *l = (WListbox *) w; WListbox *l = (WListbox *) w;
int ret_code; cb_ret_t ret_code;
WLEntry *e; WLEntry *e;
Dlg_head *h = l->widget.parent; Dlg_head *h = l->widget.parent;