NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Files Functions Variables Macros Pages
dumperargs.h
Go to the documentation of this file.
1 
8 #ifndef DUMPERARGS_H
9 #define DUMPERARGS_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
19 extern "C" {
20 #endif /* __cplusplus */
21 
22 #ifndef CMDLINE_PARSER_PACKAGE
23 
24 #define CMDLINE_PARSER_PACKAGE "ddasdumper"
25 #endif
26 
27 #ifndef CMDLINE_PARSER_PACKAGE_NAME
28 
29 #define CMDLINE_PARSER_PACKAGE_NAME "ddasdumper"
30 #endif
31 
32 #ifndef CMDLINE_PARSER_VERSION
33 
34 #define CMDLINE_PARSER_VERSION "1.1"
35 #endif
36 
39 {
40  const char *help_help;
41  const char *version_help;
42  char * source_arg;
43  char * source_orig;
44  const char *source_help;
45  int skip_arg;
46  char * skip_orig;
47  const char *skip_help;
48  int count_arg;
49  char * count_orig;
50  const char *count_help;
51  char * sample_arg;
52  char * sample_orig;
53  const char *sample_help;
54  char * exclude_arg;
55  char * exclude_orig;
56  const char *exclude_help;
57  char * fileout_arg;
58  char * fileout_orig;
59  const char *fileout_help;
61  const char *legacy_mode_help;
63  unsigned int help_given ;
64  unsigned int version_given ;
65  unsigned int source_given ;
66  unsigned int skip_given ;
67  unsigned int count_given ;
68  unsigned int sample_given ;
69  unsigned int exclude_given ;
70  unsigned int fileout_given ;
71  unsigned int legacy_mode_given ;
73 } ;
74 
77 {
78  int override;
79  int initialize;
83 } ;
84 
86 extern const char *gengetopt_args_info_purpose;
88 extern const char *gengetopt_args_info_usage;
90 extern const char *gengetopt_args_info_help[];
91 
99 int cmdline_parser (int argc, char **argv,
100  struct gengetopt_args_info *args_info);
101 
113 int cmdline_parser2 (int argc, char **argv,
114  struct gengetopt_args_info *args_info,
115  int override, int initialize, int check_required);
116 
125 int cmdline_parser_ext (int argc, char **argv,
126  struct gengetopt_args_info *args_info,
127  struct cmdline_parser_params *params);
128 
135 int cmdline_parser_dump(FILE *outfile,
136  struct gengetopt_args_info *args_info);
137 
145 int cmdline_parser_file_save(const char *filename,
146  struct gengetopt_args_info *args_info);
147 
151 void cmdline_parser_print_help(void);
155 void cmdline_parser_print_version(void);
156 
162 void cmdline_parser_params_init(struct cmdline_parser_params *params);
163 
169 struct cmdline_parser_params *cmdline_parser_params_create(void);
170 
176 void cmdline_parser_init (struct gengetopt_args_info *args_info);
182 void cmdline_parser_free (struct gengetopt_args_info *args_info);
183 
191 int cmdline_parser_required (struct gengetopt_args_info *args_info,
192  const char *prog_name);
193 
194 
195 #ifdef __cplusplus
196 }
197 #endif /* __cplusplus */
198 #endif /* DUMPERARGS_H */