# | Line 1 | Line 1 | |
---|---|---|
1 | /* | |
2 | < | File autogenerated by gengetopt version 2.16 |
2 | > | File autogenerated by gengetopt version 2.19.1 |
3 | generated with the following command: | |
4 | gengetopt -F DynamicPropsCmd | |
5 | ||
# | Line 21 | Line 21 | |
21 | ||
22 | #include "DynamicPropsCmd.h" | |
23 | ||
24 | + | const char *gengetopt_args_info_purpose = ""; |
25 | + | |
26 | + | const char *gengetopt_args_info_usage = "Usage: DynamicProps [OPTIONS]..."; |
27 | + | |
28 | + | const char *gengetopt_args_info_description = ""; |
29 | + | |
30 | + | const char *gengetopt_args_info_help[] = { |
31 | + | " -h, --help Print help and exit", |
32 | + | " -V, --version Print version and exit", |
33 | + | " -i, --input=filename input dump file", |
34 | + | " -o, --output=filename output file name", |
35 | + | " --sele1=selection script select first stuntdouble set", |
36 | + | " --sele2=selection script select second stuntdouble set (if sele2 is not \n set, use script from sele1)", |
37 | + | " --order=INT Lengendre Polynomial Order", |
38 | + | "\n Group: dynamicProps\n an option of this group is required", |
39 | + | " -r, --rcorr rmsd", |
40 | + | " -v, --vcorr velocity correlation function", |
41 | + | " -d, --dcorr dipole correlation function", |
42 | + | " -l, --lcorr Lengendre correlation function", |
43 | + | " --r_rcorr Radial rmsd", |
44 | + | " --thetacorr Angular rmsd", |
45 | + | " --drcorr Directional rmsd for particles with unit \n vectors", |
46 | + | 0 |
47 | + | }; |
48 | + | |
49 | static | |
50 | void clear_given (struct gengetopt_args_info *args_info); | |
51 | static | |
# | Line 51 | Line 76 | void clear_given (struct gengetopt_args_info *args_inf | |
76 | args_info->lcorr_given = 0 ; | |
77 | args_info->r_rcorr_given = 0 ; | |
78 | args_info->thetacorr_given = 0 ; | |
54 | – | args_info->actioncorr_given = 0 ; |
79 | args_info->drcorr_given = 0 ; | |
80 | args_info->dynamicProps_group_counter = 0 ; | |
81 | } | |
# | Line 71 | Line 95 | void clear_args (struct gengetopt_args_info *args_info | |
95 | ||
96 | } | |
97 | ||
98 | + | static |
99 | + | void init_args_info(struct gengetopt_args_info *args_info) |
100 | + | { |
101 | + | args_info->help_help = gengetopt_args_info_help[0] ; |
102 | + | args_info->version_help = gengetopt_args_info_help[1] ; |
103 | + | args_info->input_help = gengetopt_args_info_help[2] ; |
104 | + | args_info->output_help = gengetopt_args_info_help[3] ; |
105 | + | args_info->sele1_help = gengetopt_args_info_help[4] ; |
106 | + | args_info->sele2_help = gengetopt_args_info_help[5] ; |
107 | + | args_info->order_help = gengetopt_args_info_help[6] ; |
108 | + | args_info->rcorr_help = gengetopt_args_info_help[7] ; |
109 | + | args_info->vcorr_help = gengetopt_args_info_help[8] ; |
110 | + | args_info->dcorr_help = gengetopt_args_info_help[9] ; |
111 | + | args_info->lcorr_help = gengetopt_args_info_help[10] ; |
112 | + | args_info->r_rcorr_help = gengetopt_args_info_help[11] ; |
113 | + | args_info->thetacorr_help = gengetopt_args_info_help[12] ; |
114 | + | args_info->drcorr_help = gengetopt_args_info_help[13] ; |
115 | + | |
116 | + | } |
117 | + | |
118 | void | |
119 | cmdline_parser_print_version (void) | |
120 | { | |
# | Line 80 | Line 124 | cmdline_parser_print_help (void) | |
124 | void | |
125 | cmdline_parser_print_help (void) | |
126 | { | |
127 | + | int i = 0; |
128 | cmdline_parser_print_version (); | |
129 | < | printf("\nUsage: DynamicProps [OPTIONS]...\n\n"); |
130 | < | printf("%s\n"," -h, --help Print help and exit"); |
131 | < | printf("%s\n"," -V, --version Print version and exit"); |
132 | < | printf("%s\n"," -i, --input=filename input dump file"); |
133 | < | printf("%s\n"," -o, --output=filename output file name"); |
134 | < | printf("%s\n"," --sele1=selection script select first stuntdouble set"); |
135 | < | printf("%s\n"," --sele2=selection script select second stuntdouble set (if sele2 is not \n set, use script from sele1)"); |
136 | < | printf("%s\n"," --order=INT Lengendre Polynomial Order"); |
137 | < | printf("%s\n","\n Group: dynamicProps\n an option of this group is required"); |
138 | < | printf("%s\n"," -r, --rcorr rmsd"); |
139 | < | printf("%s\n"," -v, --vcorr velocity correlation function"); |
95 | < | printf("%s\n"," -d, --dcorr dipole correlation function"); |
96 | < | printf("%s\n"," -l, --lcorr Lengendre correlation function"); |
97 | < | printf("%s\n"," --r_rcorr Radial rmsd"); |
98 | < | printf("%s\n"," --thetacorr Angular rmsd"); |
99 | < | printf("%s\n"," --actioncorr Action correlation function"); |
100 | < | printf("%s\n"," --drcorr Directional rmsd for particles with unit \n vectors"); |
101 | < | |
129 | > | |
130 | > | if (strlen(gengetopt_args_info_purpose) > 0) |
131 | > | printf("\n%s\n", gengetopt_args_info_purpose); |
132 | > | |
133 | > | printf("\n%s\n\n", gengetopt_args_info_usage); |
134 | > | |
135 | > | if (strlen(gengetopt_args_info_description) > 0) |
136 | > | printf("%s\n", gengetopt_args_info_description); |
137 | > | |
138 | > | while (gengetopt_args_info_help[i]) |
139 | > | printf("%s\n", gengetopt_args_info_help[i++]); |
140 | } | |
141 | ||
142 | void | |
# | Line 106 | Line 144 | cmdline_parser_init (struct gengetopt_args_info *args_ | |
144 | { | |
145 | clear_given (args_info); | |
146 | clear_args (args_info); | |
147 | + | init_args_info (args_info); |
148 | } | |
149 | ||
150 | static void | |
# | Line 234 | Line 273 | cmdline_parser_file_save(const char *filename, struct | |
273 | if (args_info->thetacorr_given) { | |
274 | fprintf(outfile, "%s\n", "thetacorr"); | |
275 | } | |
237 | – | if (args_info->actioncorr_given) { |
238 | – | fprintf(outfile, "%s\n", "actioncorr"); |
239 | – | } |
276 | if (args_info->drcorr_given) { | |
277 | fprintf(outfile, "%s\n", "drcorr"); | |
278 | } | |
# | Line 285 | Line 321 | reset_group_dynamicProps(struct gengetopt_args_info *a | |
321 | args_info->lcorr_given = 0 ; | |
322 | args_info->r_rcorr_given = 0 ; | |
323 | args_info->thetacorr_given = 0 ; | |
288 | – | args_info->actioncorr_given = 0 ; |
324 | args_info->drcorr_given = 0 ; | |
325 | ||
326 | args_info->dynamicProps_group_counter = 0; | |
# | Line 335 | Line 370 | cmdline_parser_required2 (struct gengetopt_args_info * | |
370 | { | |
371 | int error = 0; | |
372 | ||
373 | + | /* checks for required options */ |
374 | if (! args_info->input_given) | |
375 | { | |
376 | fprintf (stderr, "%s: '--input' ('-i') option required%s\n", prog_name, (additional_error ? additional_error : "")); | |
377 | error = 1; | |
378 | } | |
379 | + | |
380 | if (args_info->dynamicProps_group_counter == 0) | |
381 | { | |
382 | fprintf (stderr, "%s: %d options of group dynamicProps were given. One is required.%s\n", prog_name, args_info->dynamicProps_group_counter, (additional_error ? additional_error : "")); | |
# | Line 347 | Line 384 | cmdline_parser_required2 (struct gengetopt_args_info * | |
384 | } | |
385 | ||
386 | ||
387 | + | /* checks for dependences among options */ |
388 | + | |
389 | return error; | |
390 | } | |
391 | ||
# | Line 387 | Line 426 | cmdline_parser_internal (int argc, char * const *argv, | |
426 | { "lcorr", 0, NULL, 'l' }, | |
427 | { "r_rcorr", 0, NULL, 0 }, | |
428 | { "thetacorr", 0, NULL, 0 }, | |
390 | – | { "actioncorr", 0, NULL, 0 }, |
429 | { "drcorr", 0, NULL, 0 }, | |
430 | { NULL, 0, NULL, 0 } | |
431 | }; | |
# | Line 595 | Line 633 | cmdline_parser_internal (int argc, char * const *argv, | |
633 | continue; | |
634 | local_args_info.thetacorr_given = 1; | |
635 | args_info->thetacorr_given = 1; | |
598 | – | if (args_info->dynamicProps_group_counter && override) |
599 | – | reset_group_dynamicProps (args_info); |
600 | – | args_info->dynamicProps_group_counter += 1; |
601 | – | break; |
602 | – | } |
603 | – | /* Action correlation function. */ |
604 | – | else if (strcmp (long_options[option_index].name, "actioncorr") == 0) |
605 | – | { |
606 | – | if (local_args_info.actioncorr_given) |
607 | – | { |
608 | – | fprintf (stderr, "%s: `--actioncorr' option given more than once%s\n", argv[0], (additional_error ? additional_error : "")); |
609 | – | goto failure; |
610 | – | } |
611 | – | if (args_info->actioncorr_given && ! override) |
612 | – | continue; |
613 | – | local_args_info.actioncorr_given = 1; |
614 | – | args_info->actioncorr_given = 1; |
636 | if (args_info->dynamicProps_group_counter && override) | |
637 | reset_group_dynamicProps (args_info); | |
638 | args_info->dynamicProps_group_counter += 1; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |