--- trunk/src/applications/staticProps/StaticPropsCmd.c 2005/04/15 22:04:00 507 +++ trunk/src/applications/staticProps/StaticPropsCmd.c 2005/05/26 22:45:00 543 @@ -1,7 +1,7 @@ /* File autogenerated by gengetopt version 2.11 generated with the following command: - /home/maul/gezelter/tim/bin/gengetopt -F StaticPropsCmd + /home/maul/gezelter/tim/bin/gengetopt -i StaticProps.ggo -F StaticPropsCmd The developers of gengetopt consider the fixed text that goes in all gengetopt output files to be in the public domain: @@ -33,7 +33,7 @@ cmdline_parser_print_help (void) { cmdline_parser_print_version (); printf("\n" - "Usage: %s [OPTIONS]...\n", CMDLINE_PARSER_PACKAGE); + "Usage: %s [OPTIONS]...\n", CMDLINE_PARSER_PACKAGE); printf("\n"); printf(" -h, --help Print help and exit\n"); printf(" -V, --version Print version and exit\n"); @@ -53,6 +53,7 @@ cmdline_parser_print_help (void) printf(" --r_omega g(r, cos(omega))\n"); printf(" --theta_omega g(cos(theta), cos(omega))\n"); printf(" --gxyz g(x, y, z)\n"); + printf(" --p2 p2 order parameter\n"); } @@ -94,16 +95,17 @@ cmdline_parser (int argc, char * const *argv, struct g args_info->r_omega_given = 0 ; args_info->theta_omega_given = 0 ; args_info->gxyz_given = 0 ; -#define clear_args() { \ - args_info->input_arg = NULL; \ - args_info->output_arg = NULL; \ - args_info->step_arg = 1 ; \ - args_info->nrbins_arg = 100 ; \ - args_info->nanglebins_arg = 50 ; \ - args_info->sele1_arg = NULL; \ - args_info->sele2_arg = NULL; \ - args_info->refsele_arg = NULL; \ - } + args_info->p2_given = 0 ; +#define clear_args() { \ + args_info->input_arg = NULL; \ + args_info->output_arg = NULL; \ + args_info->step_arg = 1 ;\ + args_info->nrbins_arg = 100 ;\ + args_info->nanglebins_arg = 50 ;\ + args_info->sele1_arg = NULL; \ + args_info->sele2_arg = NULL; \ + args_info->refsele_arg = NULL; \ +} clear_args(); @@ -134,6 +136,7 @@ cmdline_parser (int argc, char * const *argv, struct g { "r_omega", 0, NULL, 0 }, { "theta_omega", 0, NULL, 0 }, { "gxyz", 0, NULL, 0 }, + { "p2", 0, NULL, 0 }, { NULL, 0, NULL, 0 } }; @@ -224,116 +227,130 @@ cmdline_parser (int argc, char * const *argv, struct g case 0: /* Long option with no short option */ /* select first stuntdouble set. */ if (strcmp (long_options[option_index].name, "sele1") == 0) - { - if (args_info->sele1_given) - { - fprintf (stderr, "%s: `--sele1' option given more than once\n", CMDLINE_PARSER_PACKAGE); - clear_args (); - exit (EXIT_FAILURE); - } - args_info->sele1_given = 1; - args_info->sele1_arg = gengetopt_strdup (optarg); - break; - } + { + if (args_info->sele1_given) + { + fprintf (stderr, "%s: `--sele1' option given more than once\n", CMDLINE_PARSER_PACKAGE); + clear_args (); + exit (EXIT_FAILURE); + } + args_info->sele1_given = 1; + args_info->sele1_arg = gengetopt_strdup (optarg); + break; + } /* select second stuntdouble set. */ else if (strcmp (long_options[option_index].name, "sele2") == 0) - { - if (args_info->sele2_given) - { - fprintf (stderr, "%s: `--sele2' option given more than once\n", CMDLINE_PARSER_PACKAGE); - clear_args (); - exit (EXIT_FAILURE); - } - args_info->sele2_given = 1; - args_info->sele2_arg = gengetopt_strdup (optarg); - break; - } + { + if (args_info->sele2_given) + { + fprintf (stderr, "%s: `--sele2' option given more than once\n", CMDLINE_PARSER_PACKAGE); + clear_args (); + exit (EXIT_FAILURE); + } + args_info->sele2_given = 1; + args_info->sele2_arg = gengetopt_strdup (optarg); + break; + } /* select reference (use and only use with --gxyz). */ else if (strcmp (long_options[option_index].name, "refsele") == 0) - { - if (args_info->refsele_given) - { - fprintf (stderr, "%s: `--refsele' option given more than once\n", CMDLINE_PARSER_PACKAGE); - clear_args (); - exit (EXIT_FAILURE); - } - args_info->refsele_given = 1; - args_info->refsele_arg = gengetopt_strdup (optarg); - break; - } + { + if (args_info->refsele_given) + { + fprintf (stderr, "%s: `--refsele' option given more than once\n", CMDLINE_PARSER_PACKAGE); + clear_args (); + exit (EXIT_FAILURE); + } + args_info->refsele_given = 1; + args_info->refsele_arg = gengetopt_strdup (optarg); + break; + } /* g(r). */ else if (strcmp (long_options[option_index].name, "gofr") == 0) - { - if (args_info->gofr_given) - { - fprintf (stderr, "%s: `--gofr' option given more than once\n", CMDLINE_PARSER_PACKAGE); - clear_args (); - exit (EXIT_FAILURE); - } - args_info->gofr_given = 1; staticProps_group_counter += 1; + { + if (args_info->gofr_given) + { + fprintf (stderr, "%s: `--gofr' option given more than once\n", CMDLINE_PARSER_PACKAGE); + clear_args (); + exit (EXIT_FAILURE); + } + args_info->gofr_given = 1; staticProps_group_counter += 1; - break; - } + break; + } /* g(r, cos(theta)). */ else if (strcmp (long_options[option_index].name, "r_theta") == 0) - { - if (args_info->r_theta_given) - { - fprintf (stderr, "%s: `--r_theta' option given more than once\n", CMDLINE_PARSER_PACKAGE); - clear_args (); - exit (EXIT_FAILURE); - } - args_info->r_theta_given = 1; staticProps_group_counter += 1; + { + if (args_info->r_theta_given) + { + fprintf (stderr, "%s: `--r_theta' option given more than once\n", CMDLINE_PARSER_PACKAGE); + clear_args (); + exit (EXIT_FAILURE); + } + args_info->r_theta_given = 1; staticProps_group_counter += 1; - break; - } + break; + } /* g(r, cos(omega)). */ else if (strcmp (long_options[option_index].name, "r_omega") == 0) - { - if (args_info->r_omega_given) - { - fprintf (stderr, "%s: `--r_omega' option given more than once\n", CMDLINE_PARSER_PACKAGE); - clear_args (); - exit (EXIT_FAILURE); - } - args_info->r_omega_given = 1; staticProps_group_counter += 1; + { + if (args_info->r_omega_given) + { + fprintf (stderr, "%s: `--r_omega' option given more than once\n", CMDLINE_PARSER_PACKAGE); + clear_args (); + exit (EXIT_FAILURE); + } + args_info->r_omega_given = 1; staticProps_group_counter += 1; - break; - } + break; + } /* g(cos(theta), cos(omega)). */ else if (strcmp (long_options[option_index].name, "theta_omega") == 0) - { - if (args_info->theta_omega_given) - { - fprintf (stderr, "%s: `--theta_omega' option given more than once\n", CMDLINE_PARSER_PACKAGE); - clear_args (); - exit (EXIT_FAILURE); - } - args_info->theta_omega_given = 1; staticProps_group_counter += 1; + { + if (args_info->theta_omega_given) + { + fprintf (stderr, "%s: `--theta_omega' option given more than once\n", CMDLINE_PARSER_PACKAGE); + clear_args (); + exit (EXIT_FAILURE); + } + args_info->theta_omega_given = 1; staticProps_group_counter += 1; - break; - } + break; + } /* g(x, y, z). */ else if (strcmp (long_options[option_index].name, "gxyz") == 0) - { - if (args_info->gxyz_given) - { - fprintf (stderr, "%s: `--gxyz' option given more than once\n", CMDLINE_PARSER_PACKAGE); - clear_args (); - exit (EXIT_FAILURE); - } - args_info->gxyz_given = 1; staticProps_group_counter += 1; + { + if (args_info->gxyz_given) + { + fprintf (stderr, "%s: `--gxyz' option given more than once\n", CMDLINE_PARSER_PACKAGE); + clear_args (); + exit (EXIT_FAILURE); + } + args_info->gxyz_given = 1; staticProps_group_counter += 1; - break; - } + break; + } + /* p2 order parameter. */ + else if (strcmp (long_options[option_index].name, "p2") == 0) + { + if (args_info->p2_given) + { + fprintf (stderr, "%s: `--p2' option given more than once\n", CMDLINE_PARSER_PACKAGE); + clear_args (); + exit (EXIT_FAILURE); + } + args_info->p2_given = 1; staticProps_group_counter += 1; + + break; + } + case '?': /* Invalid option. */ /* `getopt_long' already printed an error message. */