1 /* libguestfs - guestfish shell
2 * Copyright (C) 2010 Red Hat Inc.
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.
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.
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.
19 #ifndef FISH_CMDS_GPERF_H
20 #define FISH_CMDS_GPERF_H
22 /* There is one of these structures for each individual command that
23 * guestfish can execute.
25 struct command_entry {
26 const char *name; /* Short name. */
27 const char *help; /* Online help. */
29 /* The run_* function. */
30 int (*run) (const char *cmd, size_t argc, char *argv[]);
33 /* Command table used by the gperf-generated lookup function.
34 * Multiple rows in this table can and do point to a single command
35 * entry. This is used to implement aliases.
37 struct command_table {
39 struct command_entry *entry;
42 const struct command_table *lookup_fish_command (register const char *str, register unsigned int len);
44 #endif /* FISH_CMDS_GPERF_H */