diff options
author | James Booth <boothj5@gmail.com> | 2012-03-01 01:52:35 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-03-01 01:52:35 +0000 |
commit | 0f5769e5a7ea7a703277a5cb86053d54d1b86a91 (patch) | |
tree | 186e7f54746015ba0c53b0cb97d3a9989dceb6ad | |
parent | 723a99540d1c3971ea02645c118fda2d1814d88a (diff) | |
download | profani-tty-0f5769e5a7ea7a703277a5cb86053d54d1b86a91.tar.gz |
Removed event loop function
-rw-r--r-- | profanity.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/profanity.c b/profanity.c index cef0aba5..2603235c 100644 --- a/profanity.c +++ b/profanity.c @@ -32,8 +32,6 @@ #include "command.h" #include "history.h" -static void _profanity_event_loop(int *ch, char *cmd, int *size); - void profanity_run(void) { int cmd_result = TRUE; @@ -44,8 +42,13 @@ void profanity_run(void) char inp[100]; int size = 0; - while(ch != '\n') - _profanity_event_loop(&ch, inp, &size); + while(ch != '\n') { + usleep(1); + gui_refresh(); + jabber_process_events(); + win_handle_switch(&ch); + inp_poll_char(&ch, inp, &size); + } inp[size++] = '\0'; cmd_result = process_input(inp); @@ -67,12 +70,3 @@ void profanity_shutdown(void) gui_close(); log_close(); } - -static void _profanity_event_loop(int *ch, char *cmd, int *size) -{ - usleep(1); - gui_refresh(); - jabber_process_events(); - win_handle_switch(ch); - inp_poll_char(ch, cmd, size); -} |