1
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-01-03 14:57:42 -05:00

Removed event loop function

This commit is contained in:
James Booth 2012-03-01 01:52:35 +00:00
parent 723a99540d
commit 0f5769e5a7

View File

@ -32,8 +32,6 @@
#include "command.h" #include "command.h"
#include "history.h" #include "history.h"
static void _profanity_event_loop(int *ch, char *cmd, int *size);
void profanity_run(void) void profanity_run(void)
{ {
int cmd_result = TRUE; int cmd_result = TRUE;
@ -44,8 +42,13 @@ void profanity_run(void)
char inp[100]; char inp[100];
int size = 0; int size = 0;
while(ch != '\n') while(ch != '\n') {
_profanity_event_loop(&ch, inp, &size); usleep(1);
gui_refresh();
jabber_process_events();
win_handle_switch(&ch);
inp_poll_char(&ch, inp, &size);
}
inp[size++] = '\0'; inp[size++] = '\0';
cmd_result = process_input(inp); cmd_result = process_input(inp);
@ -67,12 +70,3 @@ void profanity_shutdown(void)
gui_close(); gui_close();
log_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);
}