From 0e05ad063f643c34359bcdf8253984bdcaed4b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 9 Sep 2014 18:06:34 +0200 Subject: Add infrastructure for commands --- main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index 1c4843d..b998786 100644 --- a/main.c +++ b/main.c @@ -5,8 +5,12 @@ #include #include #include +#include #include +#include +#include #include +#include #include "vis.h" #include "util.h" @@ -102,6 +106,12 @@ typedef struct { Arg arg; } Action; +typedef struct { + const char *name; + bool (*cmd)(const char *argv[]); + regex_t regex; +} Command; + static Key getkey(void); static void cursor(const Arg *arg); static void call(const Arg *arg); -- cgit v1.2.3