ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/applications/staticProps/StaticPropsCmd.c
(Generate patch)

Comparing trunk/OOPSE-3.0/src/applications/staticProps/StaticPropsCmd.c (file contents):
Revision 2038 by tim, Wed Feb 16 20:30:50 2005 UTC vs.
Revision 2053 by tim, Fri Feb 18 23:07:32 2005 UTC

# Line 35 | Line 35 | cmdline_parser_print_help (void)
35    printf("\n"
36    "Usage: %s [OPTIONS]...\n", CMDLINE_PARSER_PACKAGE);
37    printf("\n");
38 <  printf("  -h, --help                    Print help and exit\n");
39 <  printf("  -V, --version                 Print version and exit\n");
40 <  printf("  -i, --input=filename          input dump file\n");
41 <  printf("  -o, --output=filename         output file name\n");
42 <  printf("  -n, --step=INT                process every n frame  (default=`1')\n");
43 <  printf("  -r, --nrbins=INT              number of bins for distance  (default=`100')\n");
44 <  printf("  -a, --nanglebins=INT          number of bins for cos(angle)  (default=`50')\n");
45 <  printf("  -l, --length=DOUBLE           maximum length (Defaults to 1/2 smallest \n                                  length of first frame)\n");
46 <  printf("      --sele1=selection script  select first stuntdouble set\n");
47 <  printf("      --sele2=selection script  select second stuntdouble set\n");
38 >  printf("  -h, --help                      Print help and exit\n");
39 >  printf("  -V, --version                   Print version and exit\n");
40 >  printf("  -i, --input=filename            input dump file\n");
41 >  printf("  -o, --output=filename           output file name\n");
42 >  printf("  -n, --step=INT                  process every n frame  (default=`1')\n");
43 >  printf("  -r, --nrbins=INT                number of bins for distance  (default=`100')\n");
44 >  printf("  -a, --nanglebins=INT            number of bins for cos(angle)  (default=\n                                    `50')\n");
45 >  printf("  -l, --length=DOUBLE             maximum length (Defaults to 1/2 smallest \n                                    length of first frame)\n");
46 >  printf("      --sele1=selection script    select first stuntdouble set\n");
47 >  printf("      --sele2=selection script    select second stuntdouble set\n");
48 >  printf("      --refsele=selection script  select reference (use and only use with \n                                    --gxyz)\n");
49    printf("\n");
50    printf(" Group: staticProps  an option of this group is required\n");
51 <  printf("      --gofr                    g(r)\n");
52 <  printf("      --r_theta                 g(r, cos(theta))\n");
53 <  printf("      --r_omega                 g(r, cos(omega))\n");
54 <  printf("      --theta_omega             g(cos(theta), cos(omega))\n");
55 <  printf("      --xyz                     g(x, y, z)\n");
51 >  printf("      --gofr                      g(r)\n");
52 >  printf("      --r_theta                   g(r, cos(theta))\n");
53 >  printf("      --r_omega                   g(r, cos(omega))\n");
54 >  printf("      --theta_omega               g(cos(theta), cos(omega))\n");
55 >  printf("      --gxyz                      g(x, y, z)\n");
56   }
57  
58  
# Line 87 | Line 88 | cmdline_parser (int argc, char * const *argv, struct g
88    args_info->length_given = 0 ;
89    args_info->sele1_given = 0 ;
90    args_info->sele2_given = 0 ;
91 +  args_info->refsele_given = 0 ;
92    args_info->gofr_given = 0 ;
93    args_info->r_theta_given = 0 ;
94    args_info->r_omega_given = 0 ;
95    args_info->theta_omega_given = 0 ;
96 <  args_info->xyz_given = 0 ;
96 >  args_info->gxyz_given = 0 ;
97   #define clear_args() { \
98    args_info->input_arg = NULL; \
99    args_info->output_arg = NULL; \
# Line 100 | Line 102 | cmdline_parser (int argc, char * const *argv, struct g
102    args_info->nanglebins_arg = 50 ;\
103    args_info->sele1_arg = NULL; \
104    args_info->sele2_arg = NULL; \
105 +  args_info->refsele_arg = NULL; \
106   }
107  
108    clear_args();
# Line 125 | Line 128 | cmdline_parser (int argc, char * const *argv, struct g
128          { "length",     1, NULL, 'l' },
129          { "sele1",      1, NULL, 0 },
130          { "sele2",      1, NULL, 0 },
131 +        { "refsele",    1, NULL, 0 },
132          { "gofr",       0, NULL, 0 },
133          { "r_theta",    0, NULL, 0 },
134          { "r_omega",    0, NULL, 0 },
135          { "theta_omega",        0, NULL, 0 },
136 <        { "xyz",        0, NULL, 0 },
136 >        { "gxyz",       0, NULL, 0 },
137          { NULL, 0, NULL, 0 }
138        };
139  
# Line 243 | Line 247 | cmdline_parser (int argc, char * const *argv, struct g
247                }
248              args_info->sele2_given = 1;
249              args_info->sele2_arg = gengetopt_strdup (optarg);
250 +            break;
251 +          }
252 +          
253 +          /* select reference (use and only use with --gxyz).  */
254 +          else if (strcmp (long_options[option_index].name, "refsele") == 0)
255 +          {
256 +            if (args_info->refsele_given)
257 +              {
258 +                fprintf (stderr, "%s: `--refsele' option given more than once\n", CMDLINE_PARSER_PACKAGE);
259 +                clear_args ();
260 +                exit (EXIT_FAILURE);
261 +              }
262 +            args_info->refsele_given = 1;
263 +            args_info->refsele_arg = gengetopt_strdup (optarg);
264              break;
265            }
266            
# Line 303 | Line 321 | cmdline_parser (int argc, char * const *argv, struct g
321            }
322            
323            /* g(x, y, z).  */
324 <          else if (strcmp (long_options[option_index].name, "xyz") == 0)
324 >          else if (strcmp (long_options[option_index].name, "gxyz") == 0)
325            {
326 <            if (args_info->xyz_given)
326 >            if (args_info->gxyz_given)
327                {
328 <                fprintf (stderr, "%s: `--xyz' option given more than once\n", CMDLINE_PARSER_PACKAGE);
328 >                fprintf (stderr, "%s: `--gxyz' option given more than once\n", CMDLINE_PARSER_PACKAGE);
329                  clear_args ();
330                  exit (EXIT_FAILURE);
331                }
332 <            args_info->xyz_given = 1; staticProps_group_counter += 1;
332 >            args_info->gxyz_given = 1; staticProps_group_counter += 1;
333            
334              break;
335            }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines