21#define FIX_UNUSED(X) (void) (X)
27const char *gengetopt_args_info_purpose =
"Takes a MetaData file and maps all StuntDoubles back to the periodic box.\nWill optionally replicate the system in the three box directions, or \ntranslate every object in the box and before writing out a new MetaData file.\n\nExample:\n omd2omd -i lipidSystem.omd -o bigLipidSystem.omd -x 2 -y 2 -z 1 -v 35.0";
29const char *gengetopt_args_info_usage =
"Usage: omd2omd [OPTION]... [FILE]...";
31const char *gengetopt_args_info_versiontext =
"";
33const char *gengetopt_args_info_description =
"";
35const char *gengetopt_args_info_help[] = {
36 " -h, --help Print help and exit",
37 " -V, --version Print version and exit",
38 " -i, --input=filename use specified input (.omd, .dump, .eor) file\n (mandatory)",
39 " -o, --output=filename use specified output file (mandatory)",
40 " -x, --repeatX=INT make the system repeat in the x direction\n (default=`1')",
41 " -y, --repeatY=INT make the system repeat in the y direction\n (default=`1')",
42 " -z, --repeatZ=INT make the system repeat in the z direction\n (default=`1')",
43 " -t, --translateX=DOUBLE translate all x coordinates by some amount\n (default=`0.0')",
44 " -u, --translateY=DOUBLE translate all y coordinates by some amount\n (default=`0.0')",
45 " -v, --translateZ=DOUBLE translate all z coordinates by some amount\n (default=`0.0')",
46 " -p, --rotatePhi=DOUBLE rotate all coordinates Euler angle Phi\n (default=`0.0')",
47 " -q, --rotateTheta=DOUBLE rotate all coordinates Euler angle Theta\n (default=`0.0')",
48 " -r, --rotatePsi=DOUBLE rotate all coordinates Euler angle Psi\n (default=`0.0')",
49 " -m, --repairMolecules=INT rewrap molecules around the molecular center of\n mass (default=`1')",
50 " --noWrap do not rewrap coordinates into the box\n (default=off)",
51 " --noCOM do not use Center of Mass as origin of the box\n (default=off)",
60} cmdline_parser_arg_type;
72cmdline_parser_required2 (
struct gengetopt_args_info *args_info,
const char *prog_name,
const char *additional_error);
75gengetopt_strdup (
const char *s);
101 FIX_UNUSED (args_info);
136 args_info->
help_help = gengetopt_args_info_help[0] ;
138 args_info->
input_help = gengetopt_args_info_help[2] ;
139 args_info->
output_help = gengetopt_args_info_help[3] ;
150 args_info->
noWrap_help = gengetopt_args_info_help[14] ;
151 args_info->
noCOM_help = gengetopt_args_info_help[15] ;
156cmdline_parser_print_version (
void)
162 if (strlen(gengetopt_args_info_versiontext) > 0)
163 printf(
"\n%s\n", gengetopt_args_info_versiontext);
166static void print_help_common(
void)
168 size_t len_purpose = strlen(gengetopt_args_info_purpose);
169 size_t len_usage = strlen(gengetopt_args_info_usage);
172 printf(
"%s\n", gengetopt_args_info_usage);
174 if (len_purpose > 0) {
175 printf(
"%s\n", gengetopt_args_info_purpose);
178 if (len_usage || len_purpose) {
182 if (strlen(gengetopt_args_info_description) > 0) {
183 printf(
"%s\n\n", gengetopt_args_info_description);
188cmdline_parser_print_help (
void)
192 while (gengetopt_args_info_help[i])
193 printf(
"%s\n", gengetopt_args_info_help[i++]);
199 clear_given (args_info);
200 clear_args (args_info);
201 init_args_info (args_info);
230free_string_field (
char **s)
244 free_string_field (&(args_info->
input_arg));
261 free (args_info->
inputs [i]);
266 clear_given (args_info);
271write_into_file(FILE *outfile,
const char *opt,
const char *arg,
const char *values[])
275 fprintf(outfile,
"%s=\"%s\"\n", opt, arg);
277 fprintf(outfile,
"%s\n", opt);
294 write_into_file(outfile,
"help", 0, 0 );
296 write_into_file(outfile,
"version", 0, 0 );
298 write_into_file(outfile,
"input", args_info->
input_orig, 0);
300 write_into_file(outfile,
"output", args_info->
output_orig, 0);
302 write_into_file(outfile,
"repeatX", args_info->
repeatX_orig, 0);
304 write_into_file(outfile,
"repeatY", args_info->
repeatY_orig, 0);
306 write_into_file(outfile,
"repeatZ", args_info->
repeatZ_orig, 0);
314 write_into_file(outfile,
"rotatePhi", args_info->
rotatePhi_orig, 0);
318 write_into_file(outfile,
"rotatePsi", args_info->
rotatePsi_orig, 0);
322 write_into_file(outfile,
"noWrap", 0, 0 );
324 write_into_file(outfile,
"noCOM", 0, 0 );
337 outfile = fopen(filename,
"w");
354 cmdline_parser_release (args_info);
359gengetopt_strdup (
const char *s)
365 result = (
char*)malloc(strlen(s) + 1);
366 if (result == (
char*)0)
383 result = cmdline_parser_internal (argc, argv, args_info, params, 0);
400 result = cmdline_parser_internal (argc, argv, args_info, ¶ms, 0);
408 int result = EXIT_SUCCESS;
410 if (cmdline_parser_required2(args_info, prog_name, 0) > 0)
411 result = EXIT_FAILURE;
417cmdline_parser_required2 (
struct gengetopt_args_info *args_info,
const char *prog_name,
const char *additional_error)
419 int error_occurred = 0;
420 FIX_UNUSED (additional_error);
425 fprintf (stderr,
"%s: '--input' ('-i') option required%s\n", prog_name, (additional_error ? additional_error :
""));
431 fprintf (stderr,
"%s: '--output' ('-o') option required%s\n", prog_name, (additional_error ? additional_error :
""));
438 return error_occurred;
496#ifndef required_argument
497#define required_argument 1
500#ifndef optional_argument
501#define optional_argument 2
504struct custom_getopt_data {
546static char *custom_optarg;
563static int custom_optind = 1;
569static int custom_opterr = 1;
575static int custom_optopt =
'?';
585static void exchange(
char **argv,
struct custom_getopt_data *d)
587 int bottom = d->first_nonopt;
588 int middle = d->last_nonopt;
589 int top = d->custom_optind;
598 while (top > middle && middle > bottom) {
599 if (top - middle > middle - bottom) {
601 int len = middle - bottom;
605 for (i = 0; i < len; i++) {
606 tem = argv[bottom + i];
608 argv[top - (middle - bottom) + i];
609 argv[top - (middle - bottom) + i] = tem;
615 int len = top - middle;
619 for (i = 0; i < len; i++) {
620 tem = argv[bottom + i];
621 argv[bottom + i] = argv[middle + i];
622 argv[middle + i] = tem;
629 d->first_nonopt += (d->custom_optind - d->last_nonopt);
630 d->last_nonopt = d->custom_optind;
634static void custom_getopt_initialize(
struct custom_getopt_data *d)
641 d->first_nonopt = d->last_nonopt = d->custom_optind;
646#define NONOPTION_P (argv[d->custom_optind][0] != '-' || argv[d->custom_optind][1] == '\0')
649static int shuffle_argv(
int argc,
char *
const *argv,
const struct option *longopts,
650 struct custom_getopt_data *d)
656 if (d->last_nonopt > d->custom_optind)
657 d->last_nonopt = d->custom_optind;
658 if (d->first_nonopt > d->custom_optind)
659 d->first_nonopt = d->custom_optind;
664 if (d->first_nonopt != d->last_nonopt &&
665 d->last_nonopt != d->custom_optind)
666 exchange((
char **) argv, d);
667 else if (d->last_nonopt != d->custom_optind)
668 d->first_nonopt = d->custom_optind;
673 while (d->custom_optind < argc && NONOPTION_P)
675 d->last_nonopt = d->custom_optind;
681 if (d->custom_optind != argc && !strcmp(argv[d->custom_optind],
"--")) {
683 if (d->first_nonopt != d->last_nonopt
684 && d->last_nonopt != d->custom_optind)
685 exchange((
char **) argv, d);
686 else if (d->first_nonopt == d->last_nonopt)
687 d->first_nonopt = d->custom_optind;
688 d->last_nonopt = argc;
689 d->custom_optind = argc;
695 if (d->custom_optind == argc) {
700 if (d->first_nonopt != d->last_nonopt)
701 d->custom_optind = d->first_nonopt;
709 d->custom_optarg = argv[d->custom_optind++];
716 d->nextchar = (argv[d->custom_optind] + 1 + (longopts != NULL && argv[d->custom_optind][1] ==
'-'));
730static int check_long_opt(
int argc,
char *
const *argv,
const char *optstring,
731 const struct option *longopts,
int *longind,
732 int print_errors,
struct custom_getopt_data *d)
735 const struct option *p;
736 const struct option *pfound = NULL;
742 for (nameend = d->nextchar; *nameend && *nameend !=
'='; nameend++)
746 for (p = longopts, option_index = 0; p->name; p++, option_index++)
747 if (!strncmp(p->name, d->nextchar, nameend - d->nextchar)) {
748 if ((
unsigned int) (nameend - d->nextchar)
749 == (
unsigned int) strlen(p->name)) {
752 indfound = option_index;
755 }
else if (pfound == NULL) {
758 indfound = option_index;
759 }
else if (pfound->has_arg != p->has_arg
760 || pfound->flag != p->flag
761 || pfound->val != p->val)
765 if (ambig && !exact) {
768 "%s: option `%s' is ambiguous\n",
769 argv[0], argv[d->custom_optind]);
771 d->nextchar += strlen(d->nextchar);
773 d->custom_optopt = 0;
777 option_index = indfound;
780 if (pfound->has_arg != no_argument)
781 d->custom_optarg = nameend + 1;
784 if (argv[d->custom_optind - 1][1] ==
'-') {
786 fprintf(stderr,
"%s: option `--%s' doesn't allow an argument\n",
787 argv[0], pfound->name);
790 fprintf(stderr,
"%s: option `%c%s' doesn't allow an argument\n",
791 argv[0], argv[d->custom_optind - 1][0], pfound->name);
795 d->nextchar += strlen(d->nextchar);
796 d->custom_optopt = pfound->val;
799 }
else if (pfound->has_arg == required_argument) {
800 if (d->custom_optind < argc)
801 d->custom_optarg = argv[d->custom_optind++];
805 "%s: option `%s' requires an argument\n",
807 argv[d->custom_optind - 1]);
809 d->nextchar += strlen(d->nextchar);
810 d->custom_optopt = pfound->val;
811 return optstring[0] ==
':' ?
':' :
'?';
814 d->nextchar += strlen(d->nextchar);
816 *longind = option_index;
818 *(pfound->flag) = pfound->val;
829 if (argv[d->custom_optind][1] ==
'-') {
832 "%s: unrecognized option `--%s'\n",
833 argv[0], d->nextchar);
837 "%s: unrecognized option `%c%s'\n",
838 argv[0], argv[d->custom_optind][0],
842 d->nextchar = (
char *)
"";
844 d->custom_optopt = 0;
848static int check_short_opt(
int argc,
char *
const *argv,
const char *optstring,
849 int print_errors,
struct custom_getopt_data *d)
851 char c = *d->nextchar++;
852 const char *temp = strchr(optstring, c);
855 if (*d->nextchar ==
'\0')
857 if (!temp || c ==
':') {
859 fprintf(stderr,
"%s: invalid option -- %c\n", argv[0], c);
861 d->custom_optopt = c;
864 if (temp[1] ==
':') {
865 if (temp[2] ==
':') {
867 if (*d->nextchar !=
'\0') {
868 d->custom_optarg = d->nextchar;
871 d->custom_optarg = NULL;
875 if (*d->nextchar !=
'\0') {
876 d->custom_optarg = d->nextchar;
883 }
else if (d->custom_optind == argc) {
886 "%s: option requires an argument -- %c\n",
889 d->custom_optopt = c;
890 if (optstring[0] ==
':')
900 d->custom_optarg = argv[d->custom_optind++];
977static int getopt_internal_r(
int argc,
char *
const *argv,
const char *optstring,
978 const struct option *longopts,
int *longind,
979 struct custom_getopt_data *d)
981 int ret, print_errors = d->custom_opterr;
983 if (optstring[0] ==
':')
987 d->custom_optarg = NULL;
993 if (d->custom_optind == 0 || !d->initialized) {
994 if (d->custom_optind == 0)
995 d->custom_optind = 1;
996 custom_getopt_initialize(d);
998 if (d->nextchar == NULL || *d->nextchar ==
'\0') {
999 ret = shuffle_argv(argc, argv, longopts, d);
1003 if (longopts && (argv[d->custom_optind][1] ==
'-' ))
1004 return check_long_opt(argc, argv, optstring, longopts,
1005 longind, print_errors, d);
1006 return check_short_opt(argc, argv, optstring, print_errors, d);
1009static int custom_getopt_internal(
int argc,
char *
const *argv,
const char *optstring,
1010 const struct option *longopts,
int *longind)
1014 static struct custom_getopt_data d;
1016 d.custom_optind = custom_optind;
1017 d.custom_opterr = custom_opterr;
1018 result = getopt_internal_r(argc, argv, optstring, longopts,
1020 custom_optind = d.custom_optind;
1021 custom_optarg = d.custom_optarg;
1022 custom_optopt = d.custom_optopt;
1026static int custom_getopt_long (
int argc,
char *
const *argv,
const char *options,
1027 const struct option *long_options,
int *opt_index)
1029 return custom_getopt_internal(argc, argv, options, long_options,
1034static char *package_name = 0;
1055int update_arg(
void *field,
char **orig_field,
1056 unsigned int *field_given,
unsigned int *prev_given,
1057 char *value,
const char *possible_values[],
1058 const char *default_value,
1059 cmdline_parser_arg_type arg_type,
1060 int check_ambiguity,
int override,
1061 int no_free,
int multiple_option,
1062 const char *long_opt,
char short_opt,
1063 const char *additional_error)
1065 char *stop_char = 0;
1066 const char *val = value;
1068 char **string_field;
1074 if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given)))
1076 if (short_opt !=
'-')
1077 fprintf (stderr,
"%s: `--%s' (`-%c') option given more than once%s\n",
1078 package_name, long_opt, short_opt,
1079 (additional_error ? additional_error :
""));
1081 fprintf (stderr,
"%s: `--%s' option given more than once%s\n",
1082 package_name, long_opt,
1083 (additional_error ? additional_error :
""));
1087 FIX_UNUSED (default_value);
1089 if (field_given && *field_given && !
override)
1095 if (possible_values)
1096 val = possible_values[found];
1100 *((
int *)field) = !*((
int *)field);
1103 if (val) *((
int *)field) = strtol (val, &stop_char, 0);
1106 if (val) *((
double *)field) = strtod (val, &stop_char);
1110 string_field = (
char **)field;
1111 if (!no_free && *string_field)
1112 free (*string_field);
1113 *string_field = gengetopt_strdup (val);
1124 if (val && !(stop_char && *stop_char ==
'\0')) {
1125 fprintf(stderr,
"%s: invalid numeric value: %s\n", package_name, val);
1139 if (value && orig_field) {
1141 *orig_field = value;
1145 *orig_field = gengetopt_strdup (value);
1155cmdline_parser_internal (
1161 int error_occurred = 0;
1167 int check_ambiguity;
1174 package_name = argv[0];
1178 FIX_UNUSED(
override);
1185 FIX_UNUSED(check_ambiguity);
1199 int option_index = 0;
1201 static struct option long_options[] = {
1202 {
"help", 0, NULL,
'h' },
1203 {
"version", 0, NULL,
'V' },
1204 {
"input", 1, NULL,
'i' },
1205 {
"output", 1, NULL,
'o' },
1206 {
"repeatX", 1, NULL,
'x' },
1207 {
"repeatY", 1, NULL,
'y' },
1208 {
"repeatZ", 1, NULL,
'z' },
1209 {
"translateX", 1, NULL,
't' },
1210 {
"translateY", 1, NULL,
'u' },
1211 {
"translateZ", 1, NULL,
'v' },
1212 {
"rotatePhi", 1, NULL,
'p' },
1213 {
"rotateTheta", 1, NULL,
'q' },
1214 {
"rotatePsi", 1, NULL,
'r' },
1215 {
"repairMolecules", 1, NULL,
'm' },
1216 {
"noWrap", 0, NULL, 0 },
1217 {
"noCOM", 0, NULL, 0 },
1221 custom_optarg = optarg;
1222 custom_optind = optind;
1223 custom_opterr = opterr;
1224 custom_optopt = optopt;
1226 c = custom_getopt_long (argc, argv,
"hVi:o:x:y:z:t:u:v:p:q:r:m:", long_options, &option_index);
1228 optarg = custom_optarg;
1229 optind = custom_optind;
1230 opterr = custom_opterr;
1231 optopt = custom_optopt;
1238 cmdline_parser_print_help ();
1239 cmdline_parser_free (&local_args_info);
1240 exit (EXIT_SUCCESS);
1243 cmdline_parser_print_version ();
1244 cmdline_parser_free (&local_args_info);
1245 exit (EXIT_SUCCESS);
1250 if (update_arg( (
void *)&(args_info->
input_arg),
1252 &(local_args_info.input_given), optarg, 0, 0, ARG_STRING,
1253 check_ambiguity,
override, 0, 0,
1262 if (update_arg( (
void *)&(args_info->
output_arg),
1264 &(local_args_info.output_given), optarg, 0, 0, ARG_STRING,
1265 check_ambiguity,
override, 0, 0,
1274 if (update_arg( (
void *)&(args_info->
repeatX_arg),
1276 &(local_args_info.repeatX_given), optarg, 0,
"1", ARG_INT,
1277 check_ambiguity,
override, 0, 0,
1286 if (update_arg( (
void *)&(args_info->
repeatY_arg),
1288 &(local_args_info.repeatY_given), optarg, 0,
"1", ARG_INT,
1289 check_ambiguity,
override, 0, 0,
1298 if (update_arg( (
void *)&(args_info->
repeatZ_arg),
1300 &(local_args_info.repeatZ_given), optarg, 0,
"1", ARG_INT,
1301 check_ambiguity,
override, 0, 0,
1312 &(local_args_info.translateX_given), optarg, 0,
"0.0", ARG_DOUBLE,
1313 check_ambiguity,
override, 0, 0,
1324 &(local_args_info.translateY_given), optarg, 0,
"0.0", ARG_DOUBLE,
1325 check_ambiguity,
override, 0, 0,
1336 &(local_args_info.translateZ_given), optarg, 0,
"0.0", ARG_DOUBLE,
1337 check_ambiguity,
override, 0, 0,
1348 &(local_args_info.rotatePhi_given), optarg, 0,
"0.0", ARG_DOUBLE,
1349 check_ambiguity,
override, 0, 0,
1360 &(local_args_info.rotateTheta_given), optarg, 0,
"0.0", ARG_DOUBLE,
1361 check_ambiguity,
override, 0, 0,
1372 &(local_args_info.rotatePsi_given), optarg, 0,
"0.0", ARG_DOUBLE,
1373 check_ambiguity,
override, 0, 0,
1384 &(local_args_info.repairMolecules_given), optarg, 0,
"1", ARG_INT,
1385 check_ambiguity,
override, 0, 0,
1386 "repairMolecules",
'm',
1394 if (strcmp (long_options[option_index].name,
"noWrap") == 0)
1399 &(local_args_info.noWrap_given), optarg, 0, 0, ARG_FLAG,
1400 check_ambiguity,
override, 1, 0,
"noWrap",
'-',
1406 else if (strcmp (long_options[option_index].name,
"noCOM") == 0)
1411 &(local_args_info.noCOM_given), optarg, 0, 0, ARG_FLAG,
1412 check_ambiguity,
override, 1, 0,
"noCOM",
'-',
1424 fprintf (stderr,
"%s: option unknown: %c%s\n",
CMDLINE_PARSER_PACKAGE, c, (additional_error ? additional_error :
""));
1433 error_occurred += cmdline_parser_required2 (args_info, argv[0], additional_error);
1436 cmdline_parser_release (&local_args_info);
1438 if ( error_occurred )
1439 return (EXIT_FAILURE);
1444 int found_prog_name = 0;
1450 args_info->
inputs_num = argc - optind - found_prog_name;
1452 (
char **)(malloc ((args_info->
inputs_num)*
sizeof(
char *))) ;
1453 while (optind < argc)
1454 args_info->
inputs[ i++ ] = gengetopt_strdup (argv[optind++]) ;
1461 cmdline_parser_release (&local_args_info);
1462 return (EXIT_FAILURE);
#define CMDLINE_PARSER_VERSION
the program version
#define CMDLINE_PARSER_PACKAGE_NAME
the complete program name (used for help and version)
#define CMDLINE_PARSER_PACKAGE
the program name (used for printing errors)
The header file for the command line option parser generated by GNU Gengetopt version 2....
The additional parameters to pass to parser functions.
int print_errors
whether getopt_long should print an error message for a bad option (default 1)
int check_required
whether to check that all required options were provided (default 1)
int check_ambiguity
whether to check for options already specified in the option structure gengetopt_args_info (default 0...
int initialize
whether to initialize the option structure gengetopt_args_info (default 1)
int override
whether to override possibly already present options (default 0)
Where the command line options are stored.
double translateY_arg
translate all y coordinates by some amount (default='0.0').
unsigned int noCOM_given
Whether noCOM was given.
int repeatY_arg
The number of images to repeat in the y direction (default='0').
const char * rotatePsi_help
rotate all coordinates Euler angle Psi help description.
unsigned int output_given
Whether output was given.
double translateZ_arg
translate all z coordinates by some amount (default='0.0').
int noCOM_flag
do not use Center of Mass as origin of the box (default=off).
char * rotateTheta_orig
rotate all coordinates Euler angle Theta original value given at command line.
unsigned int noWrap_given
Whether noWrap was given.
unsigned int repeatY_given
Whether repeatY was given.
char * output_orig
output file name original value given at command line.
const char * output_help
output file name help description.
char * repeatX_orig
The number of images to repeat in the x direction original value given at command line.
char * translateY_orig
translate all y coordinates by some amount original value given at command line.
unsigned int repeatX_given
Whether repeatX was given.
int repeatX_arg
The number of images to repeat in the x direction (default='0').
char * repairMolecules_orig
rewrap molecules around the molecular center of mass original value given at command line.
char * translateX_orig
translate all x coordinates by some amount original value given at command line.
const char * repeatY_help
The number of images to repeat in the y direction help description.
double rotateTheta_arg
rotate all coordinates Euler angle Theta (default='0.0').
unsigned inputs_num
unamed options number
char * rotatePsi_orig
rotate all coordinates Euler angle Psi original value given at command line.
const char * repeatX_help
The number of images to repeat in the x direction help description.
unsigned int repairMolecules_given
Whether repairMolecules was given.
const char * translateX_help
translate all x coordinates by some amount help description.
int repairMolecules_arg
rewrap molecules around the molecular center of mass (default='1').
const char * help_help
Print help and exit help description.
char * output_arg
output file name.
char * repeatZ_orig
The number of images to repeat in the z direction original value given at command line.
const char * translateZ_help
translate all z coordinates by some amount help description.
char ** inputs
unamed options (options without names)
const char * translateY_help
translate all y coordinates by some amount help description.
char * input_arg
input dump file.
int repeatZ_arg
The number of images to repeat in the z direction (default='0').
unsigned int rotatePhi_given
Whether rotatePhi was given.
unsigned int repeatZ_given
Whether repeatZ was given.
int noWrap_flag
do not rewrap coordinates into the box (default=off).
unsigned int translateY_given
Whether translateY was given.
char * repeatY_orig
The number of images to repeat in the y direction original value given at command line.
const char * noWrap_help
do not rewrap coordinates into the box help description.
double rotatePhi_arg
rotate all coordinates Euler angle Phi (default='0.0').
unsigned int help_given
Whether help was given.
unsigned int rotateTheta_given
Whether rotateTheta was given.
const char * noCOM_help
do not use Center of Mass as origin of the box help description.
const char * repeatZ_help
The number of images to repeat in the z direction help description.
unsigned int rotatePsi_given
Whether rotatePsi was given.
unsigned int input_given
Whether input was given.
unsigned int translateX_given
Whether translateX was given.
char * translateZ_orig
translate all z coordinates by some amount original value given at command line.
const char * repairMolecules_help
rewrap molecules around the molecular center of mass help description.
unsigned int version_given
Whether version was given.
const char * version_help
Print version and exit help description.
char * input_orig
input dump file original value given at command line.
char * rotatePhi_orig
rotate all coordinates Euler angle Phi original value given at command line.
const char * rotateTheta_help
rotate all coordinates Euler angle Theta help description.
double rotatePsi_arg
rotate all coordinates Euler angle Psi (default='0.0').
const char * rotatePhi_help
rotate all coordinates Euler angle Phi help description.
double translateX_arg
translate all x coordinates by some amount (default='0.0').
const char * input_help
input dump file help description.
unsigned int translateZ_given
Whether translateZ was given.
int cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
Save the contents of the option struct into an already open FILE stream.
int cmdline_parser(int argc, char **argv, struct gengetopt_args_info *args_info)
The command line parser.
int cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info)
Save the contents of the option struct into a (text) file.
int cmdline_parser2(int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
The command line parser (version with additional parameters - deprecated)
int cmdline_parser_required(struct gengetopt_args_info *args_info, const char *prog_name)
Checks that all the required options were specified.
struct cmdline_parser_params * cmdline_parser_params_create(void)
Allocates dynamically a cmdline_parser_params structure and initializes all its fields to their defau...
int cmdline_parser_ext(int argc, char **argv, struct gengetopt_args_info *args_info, struct cmdline_parser_params *params)
The command line parser (version with additional parameters)
void cmdline_parser_init(struct gengetopt_args_info *args_info)
Initializes the passed gengetopt_args_info structure's fields (also set default values for options th...
void cmdline_parser_free(struct gengetopt_args_info *args_info)
Deallocates the string fields of the gengetopt_args_info structure (but does not deallocate the struc...
void cmdline_parser_params_init(struct cmdline_parser_params *params)
Initializes all the fields a cmdline_parser_params structure to their default values.