build: Centralize all POD manipulation in 'podwrapper.sh' script.
[libguestfs.git] / fish / cmds_gperf.h
1 /* libguestfs - guestfish shell
2  * Copyright (C) 2010 Red Hat Inc.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18
19 #ifndef FISH_CMDS_GPERF_H
20 #define FISH_CMDS_GPERF_H
21
22 /* There is one of these structures for each individual command that
23  * guestfish can execute.
24  */
25 struct command_entry {
26   /* These fields are passed to pod2text to implement the online help. */
27   const char *name;
28   const char *shortdesc;
29   const char *podbody;
30
31   /* The run_* function. */
32   int (*run) (const char *cmd, size_t argc, char *argv[]);
33 };
34
35 /* Command table used by the gperf-generated lookup function.
36  * Multiple rows in this table can and do point to a single command
37  * entry.  This is used to implement aliases.
38  */
39 struct command_table {
40   char *name;
41   struct command_entry *entry;
42 };
43
44 const struct command_table *lookup_fish_command (register const char *str, register unsigned int len);
45
46 #endif /* FISH_CMDS_GPERF_H */