LibOFX
ofxdump/cmdline.h
Go to the documentation of this file.
1
7
8#ifndef CMDLINE_H
9#define CMDLINE_H
10
11/* If we use autoconf. */
12#ifdef HAVE_CONFIG_H
13#include "config.h"
14#endif
15
16#include <stdio.h> /* for FILE */
17
18#ifdef __cplusplus
19extern "C" {
20#endif /* __cplusplus */
21
22#ifndef CMDLINE_PARSER_PACKAGE
24#define CMDLINE_PARSER_PACKAGE PACKAGE
25#endif
26
27#ifndef CMDLINE_PARSER_PACKAGE_NAME
29#ifdef PACKAGE_NAME
30#define CMDLINE_PARSER_PACKAGE_NAME PACKAGE_NAME
31#else
32#define CMDLINE_PARSER_PACKAGE_NAME PACKAGE
33#endif
34#endif
35
36#ifndef CMDLINE_PARSER_VERSION
38#define CMDLINE_PARSER_VERSION VERSION
39#endif
40
43{
44 const char *help_help;
45 const char *version_help;
48 const char *import_format_help;
51 const char *msg_parser_help;
53 const char *msg_debug_help;
55 const char *msg_warning_help;
57 const char *msg_error_help;
59 const char *msg_info_help;
61 const char *msg_status_help;
62
63 unsigned int help_given ;
64 unsigned int version_given ;
65 unsigned int import_format_given ;
67 unsigned int msg_parser_given ;
68 unsigned int msg_debug_given ;
69 unsigned int msg_warning_given ;
70 unsigned int msg_error_given ;
71 unsigned int msg_info_given ;
72 unsigned int msg_status_given ;
73
74 char **inputs ;
75 unsigned inputs_num ;
76} ;
77
80{
81 int override;
82 int initialize;
83 int check_required;
84 int check_ambiguity;
85 int print_errors;
86} ;
87
89extern const char *gengetopt_args_info_purpose;
91extern const char *gengetopt_args_info_usage;
93extern const char *gengetopt_args_info_description;
95extern const char *gengetopt_args_info_help[];
96
104int cmdline_parser (int argc, char **argv,
105 struct gengetopt_args_info *args_info);
106
118int cmdline_parser2 (int argc, char **argv,
119 struct gengetopt_args_info *args_info,
120 int override, int initialize, int check_required);
121
130int cmdline_parser_ext (int argc, char **argv,
131 struct gengetopt_args_info *args_info,
132 struct cmdline_parser_params *params);
133
140int cmdline_parser_dump(FILE *outfile,
141 struct gengetopt_args_info *args_info);
142
150int cmdline_parser_file_save(const char *filename,
151 struct gengetopt_args_info *args_info);
152
161
168
175
181void cmdline_parser_init (struct gengetopt_args_info *args_info);
187void cmdline_parser_free (struct gengetopt_args_info *args_info);
188
196int cmdline_parser_required (struct gengetopt_args_info *args_info,
197 const char *prog_name);
198
199
200#ifdef __cplusplus
201}
202#endif /* __cplusplus */
203#endif /* CMDLINE_H */
int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
int cmdline_parser(int argc, char **argv, struct gengetopt_args_info *args_info)
int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info)
int cmdline_parser2(int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
int cmdline_parser_required(struct gengetopt_args_info *args_info, const char *prog_name)
void cmdline_parser_print_version(void)
struct cmdline_parser_params * cmdline_parser_params_create(void)
int cmdline_parser_ext(int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params)
void cmdline_parser_init(struct gengetopt_args_info *args_info)
void cmdline_parser_print_help(void)
void cmdline_parser_free(struct gengetopt_args_info *args_info)
void cmdline_parser_params_init(struct cmdline_parser_params *params)
The additional parameters to pass to parser functions.
int print_errors
whether getopt_long should print an error message for a bad option (default 1)
int check_required
whether to check that all required options were provided (default 1)
int check_ambiguity
whether to check for options already specified in the option structure gengetopt_args_info (default 0...
int initialize
whether to initialize the option structure gengetopt_args_info (default 1)
Where the command line options are stored.
const char * msg_error_help
Output error messages help description.
int msg_status_flag
Output status messages (default=on).
const char * msg_info_help
Output informational messages about the progress of the library help description.
unsigned int list_import_formats_given
Whether list-import-formats was given.
char * import_format_orig
Force the file format of the file(s) specified original value given at command line.
unsigned inputs_num
unnamed options number
const char * msg_parser_help
Output file parsing messages help description.
unsigned int import_format_given
Whether import-format was given.
unsigned int msg_info_given
Whether msg_info was given.
const char * msg_status_help
Output status messages help description.
int msg_parser_flag
Output file parsing messages (default=off).
const char * help_help
Print help and exit help description.
const char * import_format_help
Force the file format of the file(s) specified help description.
int msg_debug_flag
Output messages meant for debugging (default=off).
char ** inputs
unnamed options (options without names)
const char * msg_debug_help
Output messages meant for debugging help description.
int msg_info_flag
Output informational messages about the progress of the library (default=on).
int msg_warning_flag
Output warning messages about abnormal conditions and unknown constructs (default=on).
unsigned int msg_debug_given
Whether msg_debug was given.
int msg_error_flag
Output error messages (default=on).
const char * msg_warning_help
Output warning messages about abnormal conditions and unknown constructs help description.
unsigned int help_given
Whether help was given.
unsigned int msg_error_given
Whether msg_error was given.
const char * list_import_formats_help
List available import file formats 'import-format' command help description.
unsigned int version_given
Whether version was given.
const char * version_help
Print version and exit help description.
unsigned int msg_parser_given
Whether msg_parser was given.
unsigned int msg_status_given
Whether msg_status was given.
unsigned int msg_warning_given
Whether msg_warning was given.
char * import_format_arg
Force the file format of the file(s) specified (default='AUTODETECT').