From d10a8424cbf8e529a1b36287d41f7fe6df353e2f Mon Sep 17 00:00:00 2001 From: Tristan Riehs Date: Tue, 4 Aug 2026 23:38:19 +0200 Subject: Get rid of the non-reloadable version It creates two different versions of the code for no valid reason. dynamically loading the display is not that mystical in the end. --- src/disp.h | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/disp.h') diff --git a/src/disp.h b/src/disp.h index 4b1a04c..4b7b163 100644 --- a/src/disp.h +++ b/src/disp.h @@ -10,33 +10,28 @@ #define DISP_TUI "tui" /* Reserved return values for the read_input function. */ -#ifndef NDEBUG -# define DISP_RELOAD INT_MAX -#endif +#define DISP_RELOAD INT_MAX #define DISP_QUIT (INT_MAX - 1) #define DISP_ERR (INT_MAX - 2) struct disp { + char *name; + void *dl_handle; + char *so_path; void (*init)(void); void (*display_calc)(int, int); int (*read_input)(void); void (*display_res)(bool, int); void (*destroy)(void); -#ifndef NDEBUG - char *name; - void *dl_handle; - char *so_path; void *(*pre_reload)(void); void (*post_reload)(void *); -#endif }; /* Get a display handler for the given display type. */ struct disp *get_disp(char *); + void destroy_disp(struct disp *); -#ifndef NDEBUG void disp_reload(struct disp *); -#endif /* NDEBUG */ #endif /* DISP_H */ -- cgit v1.2.3