builtin-help: make some internal functions available to other builtins
[git/dscho.git] / help.h
blobd614e5491bbdad726dd8a356a3180c5f85ef3990
1 #ifndef HELP_H
2 #define HELP_H
4 struct cmdnames {
5 int alloc;
6 int cnt;
7 struct cmdname {
8 size_t len;
9 char name[FLEX_ARRAY];
10 } **names;
13 unsigned int load_command_list(const char *prefix,
14 struct cmdnames *main_cmds,
15 struct cmdnames *other_cmds);
16 void add_cmdname(struct cmdnames *cmds, const char *name, int len);
17 /* Here we require that excludes is a sorted list. */
18 void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes);
19 int is_in_cmdlist(struct cmdnames *c, const char *s);
20 void list_commands(const char *title, unsigned int longest,
21 struct cmdnames *main_cmds, struct cmdnames *other_cmds);
23 #endif /* HELP_H */