config: Declare variable only where actually needed - sacc - sacc(omys), simple console gopher client
(HTM) git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) LICENSE
---
(DIR) commit 55a9e8d63e4a4ab5188eacbee3ef48f0170f7230
(DIR) parent 5c2c788d7cda17dfadca2d12738792be1b140387
(HTM) Author: Quentin Rameau <quinq@fifth.space>
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(-)
---
(DIR) diff --git a/config.def.h b/config.def.h
@@ -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";
@@ -50,3 +52,5 @@ static char *typestr[] = {
[UNK] = " ? +",
[BRK] = "! |", /* malformed entry */
};
+
+#endif /* NEED_CONF */
(DIR) diff --git a/sacc.c b/sacc.c
@@ -20,7 +20,9 @@
#include "common.h"
#include "io.h"
+#define NEED_CONF
#include "config.h"
+#undef NEED_CONF
void (*diag)(char *, ...);