tconfig: Declare variable only where actually needed - sacc - sacc (saccomys): … | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 55a9e8d63e4a4ab5188eacbee3ef48f0170f7230 | |
parent 5c2c788d7cda17dfadca2d12738792be1b140387 | |
Author: Quentin Rameau <[email protected]> | |
Date: Tue, 9 Nov 2021 00:26:41 +0100 | |
config: Declare variable only where actually needed | |
Diffstat: | |
M config.def.h | 4 ++++ | |
M sacc.c | 2 ++ | |
2 files changed, 6 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/config.def.h b/config.def.h | |
t@@ -20,6 +20,8 @@ | |
#define _key_searchnext 'n' /* search same string forward */ | |
#define _key_searchprev 'N' /* search same string backward */ | |
+#ifdef NEED_CONF | |
+ | |
/* default plumber */ | |
static char *plumber = "xdg-open"; | |
t@@ -50,3 +52,5 @@ static char *typestr[] = { | |
[UNK] = " ? +", | |
[BRK] = "! |", /* malformed entry */ | |
}; | |
+ | |
+#endif /* NEED_CONF */ | |
diff --git a/sacc.c b/sacc.c | |
t@@ -20,7 +20,9 @@ | |
#include "common.h" | |
#include "io.h" | |
+#define NEED_CONF | |
#include "config.h" | |
+#undef NEED_CONF | |
void (*diag)(char *, ...); | |