From 46e6de294243e8dc593551bfe8c0e7090d03a159 Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Sun, 30 Jun 2024 16:20:34 +0900 Subject: Improve dynamic loading Make loading code cleaner and prefix public function names to allow static compilation. --- src/cli.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/cli.c') diff --git a/src/cli.c b/src/cli.c index 19846c0..f357ed5 100644 --- a/src/cli.c +++ b/src/cli.c @@ -23,16 +23,16 @@ #include "_readline.h" #include "disp.h" -void init(void) {} +void cli_init(void) {} void -display_calc(int x, int y) +cli_display_calc(int x, int y) { printf("%d + %d = ", x, y); } int -read_input(void) +cli_read_input(void) { char *txt = readline(""); @@ -49,14 +49,14 @@ read_input(void) } void -display_res(bool ok, int ms) +cli_display_res(bool ok, int ms) { printf("%s\t%dms\n", ok ? "RIGHT" : "WRONG", ms); } -void destroy(void) {} +void cli_destroy(void) {} #ifndef NDEBUG -void *pre_reload(void) {return NULL;} -void post_reload(void *) {} +void *cli_pre_reload(void) {return NULL;} +void cli_post_reload(void *) {} #endif -- cgit v1.2.3