aboutsummaryrefslogtreecommitdiff
path: root/src/tui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tui.c')
-rw-r--r--src/tui.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tui.c b/src/tui.c
index 7b49adf..e02429f 100644
--- a/src/tui.c
+++ b/src/tui.c
@@ -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(&current_idx, data + sizeof(calcs), sizeof(current_idx));
free(data);
- init();
+ tui_init();
redraw();
}
#endif