cmdtree

A trie command launcher for X11
git clone git://jb55.com/cmdtree
Log | Files | Refs | README | LICENSE

command.h (407B)


      1 
      2 #ifndef CMDTREE_COMMAND_H
      3 #define CMDTREE_COMMAND_H
      4 
      5 struct command {
      6 	char *name;
      7 	char *command;
      8 	char *bind;
      9 	struct command *children;
     10 	int nchildren;
     11 };
     12 
     13 
     14 void
     15 command_init(struct command *cmd);
     16 
     17 void
     18 command_exec(struct command *cmd);
     19 
     20 int
     21 command_is_prefix(struct command *cmd);
     22 
     23 struct command *
     24 command_lookup(struct command *cmd, int ncmds, const char *binding);
     25 
     26 
     27 #endif /* CMDTREE_COMMAND_H */