~mterry/ubuntu/natty/libofx/libofx.new-upstream-benoit-sru

« back to all changes in this revision

Viewing changes to ofxdump/cmdline.h

  • Committer: Bazaar Package Importer
  • Author(s): Saïvann Carignan
  • Date: 2008-02-06 17:25:16 UTC
  • mto: (3.1.2 lenny)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20080206172516-bnzxb29igye8um9h
Tags: upstream-0.9.0
Import upstream version 0.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* cmdline.h */
2
 
 
3
 
/* File autogenerated by gengetopt version 2.10  */
 
1
/** @file cmdline.h
 
2
 *  @brief The header file for the command line option parser
 
3
 *  generated by GNU Gengetopt version 2.21
 
4
 *  http://www.gnu.org/software/gengetopt.
 
5
 *  DO NOT modify this file, since it can be overwritten
 
6
 *  @author GNU Gengetopt by Lorenzo Bettini */
4
7
 
5
8
#ifndef CMDLINE_H
6
9
#define CMDLINE_H
15
18
#endif /* __cplusplus */
16
19
 
17
20
#ifndef CMDLINE_PARSER_PACKAGE
 
21
/** @brief the program name */
18
22
#define CMDLINE_PARSER_PACKAGE PACKAGE
19
23
#endif
20
24
 
21
25
#ifndef CMDLINE_PARSER_VERSION
 
26
/** @brief the program version */
22
27
#define CMDLINE_PARSER_VERSION VERSION
23
28
#endif
24
29
 
 
30
/** @brief Where the command line options are stored */
25
31
struct gengetopt_args_info
26
32
{
27
 
  char * import_format_arg;     /* Force the file format of the file(s) specified (default='AUTODETECT').  */
28
 
  int msg_parser_flag;  /* Output file parsing messages (default=off).  */
29
 
  int msg_debug_flag;   /* Output messages meant for debuging (default=off).  */
30
 
  int msg_warning_flag; /* Output warning messages about abnormal conditions and unknown constructs (default=on).  */
31
 
  int msg_error_flag;   /* Output error messages (default=on).  */
32
 
  int msg_info_flag;    /* Output informational messages about the progress of the library (default=on).  */
33
 
  int msg_status_flag;  /* Output status messages (default=on).  */
34
 
 
35
 
  int help_given ;      /* Whether help was given.  */
36
 
  int version_given ;   /* Whether version was given.  */
37
 
  int import_format_given ;     /* Whether import-format was given.  */
38
 
  int list_import_formats_given ;       /* Whether list-import-formats was given.  */
39
 
  int msg_parser_given ;        /* Whether msg_parser was given.  */
40
 
  int msg_debug_given ; /* Whether msg_debug was given.  */
41
 
  int msg_warning_given ;       /* Whether msg_warning was given.  */
42
 
  int msg_error_given ; /* Whether msg_error was given.  */
43
 
  int msg_info_given ;  /* Whether msg_info was given.  */
44
 
  int msg_status_given ;        /* Whether msg_status was given.  */
45
 
 
46
 
  char **inputs ; /* unamed options */
47
 
  unsigned inputs_num ; /* unamed options number */
48
 
} ;
49
 
 
50
 
int cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info);
51
 
 
 
33
  const char *help_help; /**< @brief Print help and exit help description.  */
 
34
  const char *version_help; /**< @brief Print version and exit help description.  */
 
35
  char * import_format_arg;     /**< @brief Force the file format of the file(s) specified (default='AUTODETECT').  */
 
36
  char * import_format_orig;    /**< @brief Force the file format of the file(s) specified original value given at command line.  */
 
37
  const char *import_format_help; /**< @brief Force the file format of the file(s) specified help description.  */
 
38
  const char *list_import_formats_help; /**< @brief List available import file formats 'import-format' command help description.  */
 
39
  int msg_parser_flag;  /**< @brief Output file parsing messages (default=off).  */
 
40
  const char *msg_parser_help; /**< @brief Output file parsing messages help description.  */
 
41
  int msg_debug_flag;   /**< @brief Output messages meant for debuging (default=off).  */
 
42
  const char *msg_debug_help; /**< @brief Output messages meant for debuging help description.  */
 
43
  int msg_warning_flag; /**< @brief Output warning messages about abnormal conditions and unknown constructs (default=on).  */
 
44
  const char *msg_warning_help; /**< @brief Output warning messages about abnormal conditions and unknown constructs help description.  */
 
45
  int msg_error_flag;   /**< @brief Output error messages (default=on).  */
 
46
  const char *msg_error_help; /**< @brief Output error messages help description.  */
 
47
  int msg_info_flag;    /**< @brief Output informational messages about the progress of the library (default=on).  */
 
48
  const char *msg_info_help; /**< @brief Output informational messages about the progress of the library help description.  */
 
49
  int msg_status_flag;  /**< @brief Output status messages (default=on).  */
 
50
  const char *msg_status_help; /**< @brief Output status messages help description.  */
 
51
  
 
52
  int help_given ;      /**< @brief Whether help was given.  */
 
53
  int version_given ;   /**< @brief Whether version was given.  */
 
54
  int import_format_given ;     /**< @brief Whether import-format was given.  */
 
55
  int list_import_formats_given ;       /**< @brief Whether list-import-formats was given.  */
 
56
  int msg_parser_given ;        /**< @brief Whether msg_parser was given.  */
 
57
  int msg_debug_given ; /**< @brief Whether msg_debug was given.  */
 
58
  int msg_warning_given ;       /**< @brief Whether msg_warning was given.  */
 
59
  int msg_error_given ; /**< @brief Whether msg_error was given.  */
 
60
  int msg_info_given ;  /**< @brief Whether msg_info was given.  */
 
61
  int msg_status_given ;        /**< @brief Whether msg_status was given.  */
 
62
 
 
63
  char **inputs ; /**< @brief unamed options (options without names) */
 
64
  unsigned inputs_num ; /**< @brief unamed options number */
 
65
} ;
 
66
 
 
67
/** @brief The additional parameters to pass to parser functions */
 
68
struct cmdline_parser_params
 
69
{
 
70
  int override; /**< @brief whether to override possibly already present options (default 0) */
 
71
  int initialize; /**< @brief whether to initialize the option structure gengetopt_args_info (default 0) */
 
72
  int check_required; /**< @brief whether to check that all required options were provided (default 0) */
 
73
  int check_ambiguity; /**< @brief whether to check for options already specified in the option structure gengetopt_args_info (default 0) */
 
74
} ;
 
75
 
 
76
/** @brief the purpose string of the program */
 
77
extern const char *gengetopt_args_info_purpose;
 
78
/** @brief the usage string of the program */
 
79
extern const char *gengetopt_args_info_usage;
 
80
/** @brief all the lines making the help output */
 
81
extern const char *gengetopt_args_info_help[];
 
82
 
 
83
/**
 
84
 * The command line parser
 
85
 * @param argc the number of command line options
 
86
 * @param argv the command line options
 
87
 * @param args_info the structure where option information will be stored
 
88
 * @return 0 if everything went fine, NON 0 if an error took place
 
89
 */
 
90
int cmdline_parser (int argc, char * const *argv,
 
91
  struct gengetopt_args_info *args_info);
 
92
 
 
93
/**
 
94
 * The command line parser (version with additional parameters - deprecated)
 
95
 * @param argc the number of command line options
 
96
 * @param argv the command line options
 
97
 * @param args_info the structure where option information will be stored
 
98
 * @param override whether to override possibly already present options
 
99
 * @param initialize whether to initialize the option structure my_args_info
 
100
 * @param check_required whether to check that all required options were provided
 
101
 * @return 0 if everything went fine, NON 0 if an error took place
 
102
 * @deprecated use cmdline_parser_ext() instead
 
103
 */
 
104
int cmdline_parser2 (int argc, char * const *argv,
 
105
  struct gengetopt_args_info *args_info,
 
106
  int override, int initialize, int check_required);
 
107
 
 
108
/**
 
109
 * The command line parser (version with additional parameters)
 
110
 * @param argc the number of command line options
 
111
 * @param argv the command line options
 
112
 * @param args_info the structure where option information will be stored
 
113
 * @param params additional parameters for the parser
 
114
 * @return 0 if everything went fine, NON 0 if an error took place
 
115
 */
 
116
int cmdline_parser_ext (int argc, char * const *argv,
 
117
  struct gengetopt_args_info *args_info,
 
118
  struct cmdline_parser_params *params);
 
119
 
 
120
/**
 
121
 * Save the contents of the option struct into a (text) file.
 
122
 * This file can be read by the config file parser (if generated by gengetopt)
 
123
 * @param filename the file where to save
 
124
 * @param args_info the option struct to save
 
125
 * @return 0 if everything went fine, NON 0 if an error took place
 
126
 */
 
127
int cmdline_parser_file_save(const char *filename,
 
128
  struct gengetopt_args_info *args_info);
 
129
 
 
130
/**
 
131
 * Print the help
 
132
 */
52
133
void cmdline_parser_print_help(void);
 
134
/**
 
135
 * Print the version
 
136
 */
53
137
void cmdline_parser_print_version(void);
54
138
 
 
139
/**
 
140
 * Allocates dynamically a cmdline_parser_params structure and initializes
 
141
 * all its fields to 0
 
142
 * @return the initialized cmdline_parser_params structure
 
143
 */
 
144
struct cmdline_parser_params *cmdline_parser_params_init();
 
145
 
 
146
/**
 
147
 * Initializes the passed gengetopt_args_info structure's fields
 
148
 * (also set default values for options that have a default)
 
149
 * @param args_info the structure to initialize
 
150
 */
 
151
void cmdline_parser_init (struct gengetopt_args_info *args_info);
 
152
/**
 
153
 * Deallocates the string fields of the gengetopt_args_info structure
 
154
 * (but does not deallocate the structure itself)
 
155
 * @param args_info the structure to deallocate
 
156
 */
 
157
void cmdline_parser_free (struct gengetopt_args_info *args_info);
 
158
 
 
159
/**
 
160
 * Checks that all the required options were specified
 
161
 * @param args_info the structure to check
 
162
 * @param prog_name the name of the program that will be used to print
 
163
 *   possible errors
 
164
 * @return
 
165
 */
 
166
int cmdline_parser_required (struct gengetopt_args_info *args_info,
 
167
  const char *prog_name);
 
168
 
 
169
 
55
170
#ifdef __cplusplus
56
171
}
57
172
#endif /* __cplusplus */