From c48f0176412f2c15fbb3cbc6052550959f581da9 Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Sun, 30 Jun 2024 17:00:48 +0900 Subject: Add support for release compilation mode Displays are not shared libraries, but object files that are part of the final executable. --- src/cli.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/cli.c') 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 -- cgit v1.2.3