1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-06 04:06:14 +02:00
git/help.h
Miklos Vajna 3d78d1f18f Builtin git-help.
This patch splits out git-help's functions to builtin-help.c and leaves
only functions used by other builtins in help.c.

First this removes git-help's functions from libgit which are not
interesting for other builtins, second this makes 'git help help' work
again.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-02 18:06:37 -07:00

30 lines
731 B
C

#ifndef HELP_H
#define HELP_H
struct cmdnames {
int alloc;
int cnt;
struct cmdname {
size_t len;
char name[FLEX_ARRAY];
} **names;
};
static inline void mput_char(char c, unsigned int num)
{
while(num--)
putchar(c);
}
unsigned int load_command_list(const char *prefix,
struct cmdnames *main_cmds,
struct cmdnames *other_cmds);
void add_cmdname(struct cmdnames *cmds, const char *name, int len);
/* Here we require that excludes is a sorted list. */
void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes);
int is_in_cmdlist(struct cmdnames *c, const char *s);
void list_commands(const char *title, unsigned int longest,
struct cmdnames *main_cmds, struct cmdnames *other_cmds);
#endif /* HELP_H */