- Timestamp:
- Jun 22, 2011, 12:37:21 AM (13 years ago)
- Branches:
- master, release-1.10, release-1.8, release-1.9
- Children:
- 2244836
- Parents:
- bcde7926
- git-author:
- David Benjamin <davidben@mit.edu> (05/24/11 01:32:37)
- git-committer:
- David Benjamin <davidben@mit.edu> (06/22/11 00:37:21)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
owl.c
r4f746f8 rbbb7876 302 302 } 303 303 304 void owl_process_input(const owl_io_dispatch *d, void *data)304 gboolean owl_process_input(GIOChannel *source, GIOCondition condition, void *data) 305 305 { 306 owl_global *g = data; 306 307 owl_input j; 307 308 308 309 while (1) { 309 j.ch = wgetch(g .input_pad);310 if (j.ch == ERR) return ;310 j.ch = wgetch(g->input_pad); 311 if (j.ch == ERR) return TRUE; 311 312 312 313 j.uch = '\0'; … … 330 331 331 332 for (i = 1; i < bytes; i++) { 332 int tmp = wgetch(g .input_pad);333 int tmp = wgetch(g->input_pad); 333 334 /* If what we got was not a byte, or not a continuation byte */ 334 335 if (tmp > 0xff || !(tmp & 0x80 && ~tmp & 0x40)) { … … 357 358 owl_process_input_char(j); 358 359 } 360 return TRUE; 359 361 } 360 362 … … 485 487 owl_options opts; 486 488 GSource *source; 489 GIOChannel *channel; 487 490 488 491 argc_copy = argc; … … 510 513 511 514 /* register STDIN dispatch; throw away return, we won't need it */ 512 owl_select_add_io_dispatch(STDIN_FILENO, OWL_IO_READ, &owl_process_input, NULL, NULL); 515 channel = g_io_channel_unix_new(STDIN_FILENO); 516 g_io_add_watch(channel, G_IO_IN | G_IO_HUP | G_IO_ERR, &owl_process_input, &g); 517 g_io_channel_unref(channel); 513 518 owl_zephyr_initialize(); 514 519
Note: See TracChangeset
for help on using the changeset viewer.