--- trunk/src/applications/dynamicProps/DynamicPropsCmd.c 2005/04/15 22:04:00 507 +++ trunk/src/applications/dynamicProps/DynamicPropsCmd.c 2006/03/24 16:49:09 916 @@ -1,7 +1,7 @@ /* File autogenerated by gengetopt version 2.11 generated with the following command: - /home/maul/gezelter/tim/bin/gengetopt -F DynamicPropsCmd + /home/maul/gezelter/tim/program/gengetopt-2.11/src/gengetopt -F DynamicPropsCmd 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"); @@ -41,11 +41,14 @@ cmdline_parser_print_help (void) printf(" -o, --output=filename output file name\n"); printf(" --sele1=selection script select first stuntdouble set\n"); printf(" --sele2=selection script select second stuntdouble set (if sele2 is not \n set, use script from sele1)\n"); + printf(" --order=INT Lengendre Polynomial Order\n"); printf("\n"); printf(" Group: dynamicProps an option of this group is required\n"); - printf(" -r, --rcorr rmsd\n"); + printf(" -m, --rmsd rmsd\n"); + printf(" -r, --rcorr position correlation function\n"); printf(" -v, --vcorr velocity correlation function\n"); printf(" -d, --dcorr dipole correlation function\n"); + printf(" -l, --lcorr Lengendre correlation function\n"); } @@ -77,15 +80,18 @@ cmdline_parser (int argc, char * const *argv, struct g args_info->output_given = 0 ; args_info->sele1_given = 0 ; args_info->sele2_given = 0 ; + args_info->order_given = 0 ; + args_info->rmsd_given = 0 ; args_info->rcorr_given = 0 ; args_info->vcorr_given = 0 ; args_info->dcorr_given = 0 ; -#define clear_args() { \ - args_info->input_arg = NULL; \ - args_info->output_arg = NULL; \ - args_info->sele1_arg = NULL; \ - args_info->sele2_arg = NULL; \ - } + args_info->lcorr_given = 0 ; +#define clear_args() { \ + args_info->input_arg = NULL; \ + args_info->output_arg = NULL; \ + args_info->sele1_arg = NULL; \ + args_info->sele2_arg = NULL; \ +} clear_args(); @@ -106,14 +112,17 @@ cmdline_parser (int argc, char * const *argv, struct g { "output", 1, NULL, 'o' }, { "sele1", 1, NULL, 0 }, { "sele2", 1, NULL, 0 }, + { "order", 1, NULL, 0 }, + { "rmsd", 0, NULL, 'm' }, { "rcorr", 0, NULL, 'r' }, { "vcorr", 0, NULL, 'v' }, { "dcorr", 0, NULL, 'd' }, + { "lcorr", 0, NULL, 'l' }, { NULL, 0, NULL, 0 } }; stop_char = 0; - c = getopt_long (argc, argv, "hVi:o:rvd", long_options, &option_index); + c = getopt_long (argc, argv, "hVi:o:mrvdl", long_options, &option_index); if (c == -1) break; /* Exit from `while (1)' loop. */ @@ -151,7 +160,18 @@ cmdline_parser (int argc, char * const *argv, struct g args_info->output_arg = gengetopt_strdup (optarg); break; - case 'r': /* rmsd. */ + case 'm': /* rmsd. */ + if (args_info->rmsd_given) + { + fprintf (stderr, "%s: `--rmsd' (`-m') option given more than once\n", CMDLINE_PARSER_PACKAGE); + clear_args (); + exit (EXIT_FAILURE); + } + args_info->rmsd_given = 1; + dynamicProps_group_counter += 1; + break; + + case 'r': /* position correlation function. */ if (args_info->rcorr_given) { fprintf (stderr, "%s: `--rcorr' (`-r') option given more than once\n", CMDLINE_PARSER_PACKAGE); @@ -160,7 +180,7 @@ cmdline_parser (int argc, char * const *argv, struct g } args_info->rcorr_given = 1; dynamicProps_group_counter += 1; - break; + break; case 'v': /* velocity correlation function. */ if (args_info->vcorr_given) @@ -171,7 +191,7 @@ cmdline_parser (int argc, char * const *argv, struct g } args_info->vcorr_given = 1; dynamicProps_group_counter += 1; - break; + break; case 'd': /* dipole correlation function. */ if (args_info->dcorr_given) @@ -182,38 +202,63 @@ cmdline_parser (int argc, char * const *argv, struct g } args_info->dcorr_given = 1; dynamicProps_group_counter += 1; - break; + break; + case 'l': /* Lengendre correlation function. */ + if (args_info->lcorr_given) + { + fprintf (stderr, "%s: `--lcorr' (`-l') option given more than once\n", CMDLINE_PARSER_PACKAGE); + clear_args (); + exit (EXIT_FAILURE); + } + args_info->lcorr_given = 1; + dynamicProps_group_counter += 1; + break; + 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 (if sele2 is not set, use script from sele1). */ 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; + } + /* Lengendre Polynomial Order. */ + else if (strcmp (long_options[option_index].name, "order") == 0) + { + if (args_info->order_given) + { + fprintf (stderr, "%s: `--order' option given more than once\n", CMDLINE_PARSER_PACKAGE); + clear_args (); + exit (EXIT_FAILURE); + } + args_info->order_given = 1; + args_info->order_arg = strtol (optarg,&stop_char,0); + break; + } + case '?': /* Invalid option. */ /* `getopt_long' already printed an error message. */