From f2090b4b13c13711e6e1b9d3a7cde2cf5f121efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 23 Feb 2017 16:52:35 +0100 Subject: vis: make help texts optional to produce a smaller binary $ ./configure --disable-help shrinks the binary by about 20K on a x86_64 system. --- vis-modes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vis-modes.c') diff --git a/vis-modes.c b/vis-modes.c index 47d02c1..00b99a7 100644 --- a/vis-modes.c +++ b/vis-modes.c @@ -8,7 +8,7 @@ static void keyaction_free(KeyAction *action) { if (!action) return; free((char*)action->name); - free((char*)action->help); + free(VIS_HELP_USE((char*)action->help)); free(action); } @@ -18,8 +18,10 @@ KeyAction *vis_action_new(Vis *vis, const char *name, const char *help, KeyActio return NULL; if (name && !(action->name = strdup(name))) goto err; +#if CONFIG_HELP if (help && !(action->help = strdup(help))) goto err; +#endif action->func = func; action->arg = arg; if (!array_add_ptr(&vis->actions_user, action)) -- cgit v1.2.3