cmdline.h

Go to the documentation of this file.
00001 
00008 #ifndef CMDLINE_H
00009 #define CMDLINE_H
00010 
00011 /* If we use autoconf.  */
00012 #ifdef HAVE_CONFIG_H
00013 #include "config.h"
00014 #endif
00015 
00016 #ifdef __cplusplus
00017 extern "C" {
00018 #endif /* __cplusplus */
00019 
00020 #ifndef CMDLINE_PARSER_PACKAGE
00021 
00022 #define CMDLINE_PARSER_PACKAGE PACKAGE
00023 #endif
00024 
00025 #ifndef CMDLINE_PARSER_VERSION
00026 
00027 #define CMDLINE_PARSER_VERSION VERSION
00028 #endif
00029 
00031 struct gengetopt_args_info
00032 {
00033   const char *help_help; 
00034   const char *version_help; 
00035   char * import_format_arg;     
00036   char * import_format_orig;    
00037   const char *import_format_help; 
00038   const char *list_import_formats_help; 
00039   int msg_parser_flag;  
00040   const char *msg_parser_help; 
00041   int msg_debug_flag;   
00042   const char *msg_debug_help; 
00043   int msg_warning_flag; 
00044   const char *msg_warning_help; 
00045   int msg_error_flag;   
00046   const char *msg_error_help; 
00047   int msg_info_flag;    
00048   const char *msg_info_help; 
00049   int msg_status_flag;  
00050   const char *msg_status_help; 
00052   int help_given ;      
00053   int version_given ;   
00054   int import_format_given ;     
00055   int list_import_formats_given ;       
00056   int msg_parser_given ;        
00057   int msg_debug_given ; 
00058   int msg_warning_given ;       
00059   int msg_error_given ; 
00060   int msg_info_given ;  
00061   int msg_status_given ;        
00063   char **inputs ; 
00064   unsigned inputs_num ; 
00065 } ;
00066 
00068 struct cmdline_parser_params
00069 {
00070   int override; 
00071   int initialize; 
00072   int check_required; 
00073   int check_ambiguity; 
00074 } ;
00075 
00077 extern const char *gengetopt_args_info_purpose;
00079 extern const char *gengetopt_args_info_usage;
00081 extern const char *gengetopt_args_info_help[];
00082 
00090 int cmdline_parser (int argc, char * const *argv,
00091   struct gengetopt_args_info *args_info);
00092 
00104 int cmdline_parser2 (int argc, char * const *argv,
00105   struct gengetopt_args_info *args_info,
00106   int override, int initialize, int check_required);
00107 
00116 int cmdline_parser_ext (int argc, char * const *argv,
00117   struct gengetopt_args_info *args_info,
00118   struct cmdline_parser_params *params);
00119 
00127 int cmdline_parser_file_save(const char *filename,
00128   struct gengetopt_args_info *args_info);
00129 
00133 void cmdline_parser_print_help(void);
00137 void cmdline_parser_print_version(void);
00138 
00144 struct cmdline_parser_params *cmdline_parser_params_init();
00145 
00151 void cmdline_parser_init (struct gengetopt_args_info *args_info);
00157 void cmdline_parser_free (struct gengetopt_args_info *args_info);
00158 
00166 int cmdline_parser_required (struct gengetopt_args_info *args_info,
00167   const char *prog_name);
00168 
00169 
00170 #ifdef __cplusplus
00171 }
00172 #endif /* __cplusplus */
00173 #endif /* CMDLINE_H */

Generated on Mon Feb 9 21:21:59 2009 for LibOFX by  doxygen 1.5.0