X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;ds=sidebyside;f=gui.c;h=ebfab3564836e7b1708dc430e9375815b00d49b7;hb=9055c71be97f1095dcdbd83da305b600f204f763;hp=fc7bfaf4e5d362f2323b4b760777b4219f0dfab0;hpb=bb899fb1a0c279a2890ff30d11bf7aec50fb92ed;p=paraslash.git diff --git a/gui.c b/gui.c index fc7bfaf4..ebfab356 100644 --- a/gui.c +++ b/gui.c @@ -431,7 +431,7 @@ static void rb_add_entry(int color, char *msg) if (strwidth(msg, &len) < 0) return; - new = para_malloc(sizeof(struct rb_entry)); + new = alloc(sizeof(struct rb_entry)); new->color = color; new->len = len; new->msg = msg; @@ -609,7 +609,7 @@ static void clear_all_items(void) } } -static void status_pre_select(struct sched *s, void *context) +static void status_pre_monitor(struct sched *s, void *context) { struct status_task *st = context; @@ -621,7 +621,7 @@ static void status_pre_select(struct sched *s, void *context) sched_request_barrier_or_min_delay(&st->next_exec, s); } -static int status_post_select(__a_unused struct sched *s, void *context) +static int status_post_monitor(__a_unused struct sched *s, void *context) { struct status_task *st = context; size_t sz; @@ -892,7 +892,7 @@ static void reread_conf(void) } /* React to various signal-related events. */ -static int signal_post_select(struct sched *s, __a_unused void *context) +static int signal_post_monitor(struct sched *s, __a_unused void *context) { int ret = para_next_signal(); @@ -931,7 +931,7 @@ static enum exec_status exec_status(void) return EXEC_IDLE; } -static void exec_pre_select(struct sched *s, void *context) +static void exec_pre_monitor(struct sched *s, void *context) { struct exec_task *et = context; if (exec_fds[0] >= 0) @@ -942,7 +942,7 @@ static void exec_pre_select(struct sched *s, void *context) sched_min_delay(s); } -static int exec_post_select(__a_unused struct sched *s, void *context) +static int exec_post_monitor(__a_unused struct sched *s, void *context) { struct exec_task *ct = context; int i, ret; @@ -992,7 +992,7 @@ static int exec_post_select(__a_unused struct sched *s, void *context) return 0; } -static void input_pre_select(struct sched *s, __a_unused void *context) +static void input_pre_monitor(struct sched *s, __a_unused void *context) { if (exec_status() != EXEC_XCMD) sched_monitor_readfd(STDIN_FILENO, s); @@ -1089,7 +1089,7 @@ static void handle_command(int c) keyname); } -static int input_post_select(__a_unused struct sched *s, +static int input_post_monitor(__a_unused struct sched *s, __a_unused void *context) { int ret; @@ -1115,7 +1115,7 @@ static int input_post_select(__a_unused struct sched *s, ret = wgetch(top.win); if (ret == ERR) return 0; - if (ret == KEY_RESIZE) /* already handled in signal_post_select() */ + if (ret == KEY_RESIZE) /* already handled in signal_post_monitor() */ return 0; if (exs == EXEC_IDLE) handle_command(ret); @@ -1395,22 +1395,22 @@ static int setup_tasks_and_schedule(void) exec_task.task = task_register(&(struct task_info) { .name = "exec", - .pre_select = exec_pre_select, - .post_select = exec_post_select, + .pre_monitor = exec_pre_monitor, + .post_monitor = exec_post_monitor, .context = &exec_task, }, &sched); status_task.task = task_register(&(struct task_info) { .name = "status", - .pre_select = status_pre_select, - .post_select = status_post_select, + .pre_monitor = status_pre_monitor, + .post_monitor = status_post_monitor, .context = &status_task, }, &sched); input_task.task = task_register(&(struct task_info) { .name = "input", - .pre_select = input_pre_select, - .post_select = input_post_select, + .pre_monitor = input_pre_monitor, + .post_monitor = input_post_monitor, .context = &input_task, }, &sched); @@ -1422,8 +1422,8 @@ static int setup_tasks_and_schedule(void) para_install_sighandler(SIGWINCH); signal_task->task = task_register(&(struct task_info) { .name = "signal", - .pre_select = signal_pre_select, - .post_select = signal_post_select, + .pre_monitor = signal_pre_monitor, + .post_monitor = signal_post_monitor, .context = signal_task, }, &sched); ret = schedule(&sched);