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