DSF2FLAC
|
00001 00009 #ifndef CMDLINE_H 00010 #define CMDLINE_H 00011 00012 /* If we use autoconf. */ 00013 #ifdef HAVE_CONFIG_H 00014 #include "config.h" 00015 #endif 00016 00017 #include <stdio.h> /* for FILE */ 00018 00019 #ifdef __cplusplus 00020 extern "C" { 00021 #endif /* __cplusplus */ 00022 00023 #ifndef CMDLINE_PARSER_PACKAGE 00024 00025 #define CMDLINE_PARSER_PACKAGE "dsf2flac" 00026 #endif 00027 00028 #ifndef CMDLINE_PARSER_PACKAGE_NAME 00029 00030 #define CMDLINE_PARSER_PACKAGE_NAME "dsf2flac" 00031 #endif 00032 00033 #ifndef CMDLINE_PARSER_VERSION 00034 00035 #define CMDLINE_PARSER_VERSION "0.1Rev30" 00036 #endif 00037 00039 struct gengetopt_args_info 00040 { 00041 const char *help_help; 00042 const char *version_help; 00043 int samplerate_arg; 00044 char * samplerate_orig; 00045 const char *samplerate_help; 00046 int bits_arg; 00047 char * bits_orig; 00048 const char *bits_help; 00049 int nodither_flag; 00050 const char *nodither_help; 00051 float scale_arg; 00052 char * scale_orig; 00053 const char *scale_help; 00054 char * infile_arg; 00055 char * infile_orig; 00056 const char *infile_help; 00057 char * outfile_arg; 00058 char * outfile_orig; 00059 const char *outfile_help; 00060 int dop_flag; 00061 const char *dop_help; 00063 unsigned int help_given ; 00064 unsigned int version_given ; 00065 unsigned int samplerate_given ; 00066 unsigned int bits_given ; 00067 unsigned int nodither_given ; 00068 unsigned int scale_given ; 00069 unsigned int infile_given ; 00070 unsigned int outfile_given ; 00071 unsigned int dop_given ; 00073 } ; 00074 00076 struct cmdline_parser_params 00077 { 00078 int override; 00079 int initialize; 00080 int check_required; 00081 int check_ambiguity; 00082 int print_errors; 00083 } ; 00084 00086 extern const char *gengetopt_args_info_purpose; 00088 extern const char *gengetopt_args_info_usage; 00090 extern const char *gengetopt_args_info_help[]; 00091 00099 int cmdline_parser (int argc, char **argv, 00100 struct gengetopt_args_info *args_info); 00101 00113 int cmdline_parser2 (int argc, char **argv, 00114 struct gengetopt_args_info *args_info, 00115 int override, int initialize, int check_required); 00116 00125 int cmdline_parser_ext (int argc, char **argv, 00126 struct gengetopt_args_info *args_info, 00127 struct cmdline_parser_params *params); 00128 00135 int cmdline_parser_dump(FILE *outfile, 00136 struct gengetopt_args_info *args_info); 00137 00145 int cmdline_parser_file_save(const char *filename, 00146 struct gengetopt_args_info *args_info); 00147 00151 void cmdline_parser_print_help(void); 00155 void cmdline_parser_print_version(void); 00156 00162 void cmdline_parser_params_init(struct cmdline_parser_params *params); 00163 00169 struct cmdline_parser_params *cmdline_parser_params_create(void); 00170 00176 void cmdline_parser_init (struct gengetopt_args_info *args_info); 00182 void cmdline_parser_free (struct gengetopt_args_info *args_info); 00183 00191 int cmdline_parser_required (struct gengetopt_args_info *args_info, 00192 const char *prog_name); 00193 00194 extern const char *cmdline_parser_samplerate_values[]; 00195 extern const char *cmdline_parser_bits_values[]; 00198 #ifdef __cplusplus 00199 } 00200 #endif /* __cplusplus */ 00201 #endif /* CMDLINE_H */