summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd.h
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/cli-cmd.h')
-rw-r--r--cli/src/cli-cmd.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/cli/src/cli-cmd.h b/cli/src/cli-cmd.h
index 0ec3167742f..a30a6cfe418 100644
--- a/cli/src/cli-cmd.h
+++ b/cli/src/cli-cmd.h
@@ -20,6 +20,19 @@
#include "cli.h"
#include "list.h"
+#define CLI_LOCAL_INIT(local, words, frame, dictionary) \
+ do { \
+ local = cli_local_get (); \
+ \
+ if (local) { \
+ local->words = words; \
+ if (dictionary) \
+ local->dict = dictionary; \
+ if (frame) \
+ frame->local = local; \
+ } \
+ } while (0)
+
#define CLI_STACK_DESTROY(_frame) \
do { \
if (_frame) { \