aboutsummaryrefslogtreecommitdiff
path: root/src/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli.c')
-rw-r--r--src/cli.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/cli.c b/src/cli.c
index af8522b..19846c0 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -37,7 +37,13 @@ read_input(void)
char *txt = readline("");
if ((!txt) || (*txt == '\0'))
- return INT_MAX;
+ return DISP_QUIT;
+ if (*txt == 'q')
+ return DISP_QUIT;
+#ifndef NDEBUG
+ if ((*txt == 'r') || (*txt == 'g'))
+ return DISP_RELOAD;
+#endif
return atoi(txt);
}
@@ -45,8 +51,12 @@ read_input(void)
void
display_res(bool ok, int ms)
{
- (void) ms;
- printf("%s\n", ok ? "RIGHT" : "WRONG");
+ printf("%s\t%dms\n", ok ? "RIGHT" : "WRONG", ms);
}
void destroy(void) {}
+
+#ifndef NDEBUG
+void *pre_reload(void) {return NULL;}
+void post_reload(void *) {}
+#endif