aboutsummaryrefslogtreecommitdiff
path: root/src/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli.c')
-rw-r--r--src/cli.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cli.c b/src/cli.c
index f357ed5..703d418 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -29,6 +29,7 @@ void
cli_display_calc(int x, int y)
{
printf("%d + %d = ", x, y);
+ fflush(stdout);
}
int
@@ -60,3 +61,14 @@ void cli_destroy(void) {}
void *cli_pre_reload(void) {return NULL;}
void cli_post_reload(void *) {}
#endif
+
+#ifdef NDEBUG
+static struct disp __cli_disp = {
+ .init = cli_init,
+ .display_calc = cli_display_calc,
+ .read_input = cli_read_input,
+ .display_res = cli_display_res,
+ .destroy = cli_destroy
+};
+struct disp *cli_disp = &__cli_disp;
+#endif