Changeset 5a35c708 for select.c


Ignore:
Timestamp:
Jun 1, 2009, 11:22:12 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
eab5aa1
Parents:
7433402
Message:
Fix the build for 'make test'

The tester build doesn't include owl.c, so owl.c cannot define any
functions called from outside owl.c.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • select.c

    r0cb6c26 r5a35c708  
    285285  }
    286286  return max_fd;
     287}
     288
     289void owl_process_input_char(owl_input j)
     290{
     291  int ret;
     292  owl_popwin *pw;
     293  owl_editwin *tw;
     294
     295  owl_global_set_lastinputtime(&g, time(NULL));
     296  pw=owl_global_get_popwin(&g);
     297  tw=owl_global_get_typwin(&g);
     298
     299  owl_global_set_lastinputtime(&g, time(NULL));
     300  /* find and activate the current keymap.
     301   * TODO: this should really get fixed by activating
     302   * keymaps as we switch between windows...
     303   */
     304  if (pw && owl_popwin_is_active(pw) && owl_global_get_viewwin(&g)) {
     305    owl_context_set_popless(owl_global_get_context(&g),
     306                            owl_global_get_viewwin(&g));
     307    owl_function_activate_keymap("popless");
     308  } else if (owl_global_is_typwin_active(&g)
     309             && owl_editwin_get_style(tw)==OWL_EDITWIN_STYLE_ONELINE) {
     310    /*
     311      owl_context_set_editline(owl_global_get_context(&g), tw);
     312      owl_function_activate_keymap("editline");
     313    */
     314  } else if (owl_global_is_typwin_active(&g)
     315             && owl_editwin_get_style(tw)==OWL_EDITWIN_STYLE_MULTILINE) {
     316    owl_context_set_editmulti(owl_global_get_context(&g), tw);
     317    owl_function_activate_keymap("editmulti");
     318  } else {
     319    owl_context_set_recv(owl_global_get_context(&g));
     320    owl_function_activate_keymap("recv");
     321  }
     322  /* now actually handle the keypress */
     323  ret = owl_keyhandler_process(owl_global_get_keyhandler(&g), j);
     324  if (ret!=0 && ret!=1) {
     325    owl_function_makemsg("Unable to handle keypress");
     326  }
    287327}
    288328
Note: See TracChangeset for help on using the changeset viewer.