From bd8c223756d2f912526ecef53bae0cc8e0c63442 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Mon, 9 Jul 2018 21:02:42 -0700 Subject: these macros don't need to be in cfg.def.h --- cfg.def.h | 16 ---------------- cmdtree.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cfg.def.h b/cfg.def.h index 3a8d83d..c2b0c7f 100644 --- a/cfg.def.h +++ b/cfg.def.h @@ -39,22 +39,6 @@ static struct scheme schemes[SchemeLast] = { }, }; -#define DEFCMD(b, nme, cmd) \ - { .bind = (b), \ - .name = (nme), \ - .command = (cmd), \ - .nchildren = 0, \ - .children = NULL, \ - }, - -#define DEFPREFIX(b, nme, cs) \ - { .bind = b, \ - .name = nme, \ - .command = 0, \ - .nchildren = LENGTH(cs), \ - .children = (cs), \ - }, - static struct command test_commands[] = { DEFCMD("t", "test command", "echo ok") }; diff --git a/cmdtree.c b/cmdtree.c index d52920f..ba8c514 100644 --- a/cmdtree.c +++ b/cmdtree.c @@ -39,6 +39,22 @@ static int sep_width; static int bh, mw, mh; static XIC xic; +#define DEFCMD(b, nme, cmd) \ + { .bind = (b), \ + .name = (nme), \ + .command = (cmd), \ + .nchildren = 0, \ + .children = NULL, \ + }, + +#define DEFPREFIX(b, nme, cs) \ + { .bind = b, \ + .name = nme, \ + .command = 0, \ + .nchildren = LENGTH(cs), \ + .children = (cs), \ + }, + #include "cfg.h" static int -- cgit v1.2.3