2 * option.h: Library for interactive commandline interfaces
4 * Copyright (C) 2009 Matthias Bolte <matthias.bolte@googlemail.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __VSC_CLI__OPTION_H__
22 #define __VSC_CLI__OPTION_H__
26 #define VSC_CLI__VERBOSE_ERRORS__OPTION_INFO__LONG_NAME "verbose-errors"
27 #define VSC_CLI__VERBOSE_ERRORS__OPTION_INFO \
28 { -1, VSC_CLI__VERBOSE_ERRORS__OPTION_INFO__LONG_NAME, \
29 "enable verbose error reporting", \
30 VSC_CLI__OPTION_TYPE__BOOL, FALSE }
32 #define VSC_CLI__NO_COLOR__OPTION_INFO__LONG_NAME "no-color"
33 #define VSC_CLI__NO_COLOR__OPTION_INFO \
34 { -1, VSC_CLI__NO_COLOR__OPTION_INFO__LONG_NAME, \
35 "disable output coloring", \
36 VSC_CLI__OPTION_TYPE__BOOL, FALSE }
43 vsc_cli_option_get_bool (const struct VscCliOption *option_list,
44 const char *option_long_name);
47 vsc_cli_option_get_number (const struct VscCliOption *option_list,
48 const char *option_long_name, int *found);
51 vsc_cli_option_get_string (const struct VscCliOption *option_list,
52 const char *option_long_name);
55 vsc_cli_option_list_free (struct VscCliOption **option_list);
61 #endif /* __VSC_CLI__OPTION_H__ */