diff options
Diffstat (limited to 'src/tui.c')
-rw-r--r-- | src/tui.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -65,7 +65,7 @@ redraw(void) } void -init(void) +tui_init(void) { win = initscr(); noecho(); @@ -74,7 +74,7 @@ init(void) } void -display_calc(int x, int y) +tui_display_calc(int x, int y) { current_idx = next_calc(current_idx); calcs[current_idx].x = x; @@ -92,7 +92,7 @@ display_calc(int x, int y) break; int -read_input(void) +tui_read_input(void) { int c = getch(); while (c != ERR) @@ -136,7 +136,7 @@ read_input(void) } void -display_res(bool right, int ms) +tui_display_res(bool right, int ms) { calcs[current_idx].right = right; calcs[current_idx].ms = ms; @@ -144,14 +144,14 @@ display_res(bool right, int ms) } void -destroy(void) +tui_destroy(void) { endwin(); } #ifndef NDEBUG void * -pre_reload(void) +tui_pre_reload(void) { char *data = malloc(sizeof(calcs) + sizeof(current_idx)); memcpy(data, &calcs, sizeof(calcs)); @@ -161,13 +161,13 @@ pre_reload(void) } void -post_reload(void *state) +tui_post_reload(void *state) { char *data = state; memcpy(&calcs, data, sizeof(calcs)); memcpy(¤t_idx, data + sizeof(calcs), sizeof(current_idx)); free(data); - init(); + tui_init(); redraw(); } #endif |