1 |
|
/* |
2 |
< |
File autogenerated by gengetopt version 2.22.4 |
2 |
> |
File autogenerated by gengetopt version 2.22.6 |
3 |
|
generated with the following command: |
4 |
< |
gengetopt --file-name recenterCmd --unamed-opts |
4 |
> |
gengetopt --file-name=recenterCmd --unamed-opts |
5 |
|
|
6 |
|
The developers of gengetopt consider the fixed text that goes in all |
7 |
|
gengetopt output files to be in the public domain: |
21 |
|
#define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */ |
22 |
|
#endif |
23 |
|
|
24 |
+ |
#ifdef WIN32 |
25 |
+ |
#include "utils/wingetopt.h" |
26 |
+ |
#else |
27 |
|
#include <getopt.h> |
28 |
+ |
#endif |
29 |
|
|
30 |
|
#include "recenterCmd.h" |
31 |
|
|
32 |
< |
const char *gengetopt_args_info_purpose = "Moves all integrable objects in an OpenMD file so that the center of mass is at \nthe origin."; |
32 |
> |
const char *gengetopt_args_info_purpose = "Moves all integrable objects in an OpenMD file so that the center of mass is at\nthe origin."; |
33 |
|
|
34 |
|
const char *gengetopt_args_info_usage = "Usage: recenter [OPTIONS]... [FILES]..."; |
35 |
|
|
36 |
+ |
const char *gengetopt_args_info_versiontext = ""; |
37 |
+ |
|
38 |
|
const char *gengetopt_args_info_description = ""; |
39 |
|
|
40 |
|
const char *gengetopt_args_info_help[] = { |
97 |
|
printf ("%s %s\n", |
98 |
|
(strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE), |
99 |
|
CMDLINE_PARSER_VERSION); |
100 |
+ |
|
101 |
+ |
if (strlen(gengetopt_args_info_versiontext) > 0) |
102 |
+ |
printf("\n%s\n", gengetopt_args_info_versiontext); |
103 |
|
} |
104 |
|
|
105 |
|
static void print_help_common(void) { |
329 |
|
int |
330 |
|
cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error) |
331 |
|
{ |
332 |
< |
int error = 0; |
332 |
> |
int error_occurred = 0; |
333 |
|
FIX_UNUSED (additional_error); |
334 |
|
|
335 |
|
/* checks for required options */ |
336 |
|
if (! args_info->output_given) |
337 |
|
{ |
338 |
|
fprintf (stderr, "%s: '--output' ('-o') option required%s\n", prog_name, (additional_error ? additional_error : "")); |
339 |
< |
error = 1; |
339 |
> |
error_occurred = 1; |
340 |
|
} |
341 |
|
|
342 |
|
|
343 |
|
/* checks for dependences among options */ |
344 |
|
|
345 |
< |
return error; |
345 |
> |
return error_occurred; |
346 |
|
} |
347 |
|
|
348 |
|
|
451 |
|
{ |
452 |
|
int c; /* Character of the parsed option. */ |
453 |
|
|
454 |
< |
int error = 0; |
454 |
> |
int error_occurred = 0; |
455 |
|
struct gengetopt_args_info local_args_info; |
456 |
|
|
457 |
|
int override; |
531 |
|
|
532 |
|
if (check_required) |
533 |
|
{ |
534 |
< |
error += cmdline_parser_required2 (args_info, argv[0], additional_error); |
534 |
> |
error_occurred += cmdline_parser_required2 (args_info, argv[0], additional_error); |
535 |
|
} |
536 |
|
|
537 |
|
cmdline_parser_release (&local_args_info); |
538 |
|
|
539 |
< |
if ( error ) |
539 |
> |
if ( error_occurred ) |
540 |
|
return (EXIT_FAILURE); |
541 |
|
|
542 |
|
if (optind < argc) |