commit 55a9e8d63e4a4ab5188eacbee3ef48f0170f7230 Quentin Rameau <quinq@fifth.space> 2021-11-09 00:26:41 +0100 config: Declare variable only where actually needed
config.def.h | 4 ++++ sacc.c | 2 ++ 2 files changed, 6 insertions(+)
diff --git a/config.def.h b/config.def.h index f744d34..dbc4f2f 100644 --- 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 */ diff --git a/sacc.c b/sacc.c index aee0a9b..816cf66 100644 --- 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 *, ...);