diff options
-rw-r--r-- | src/cli.c | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -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 |