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

Comparing trunk/src/applications/staticProps/StaticPropsCmd.c (file contents):
Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
Revision 1513 by gezelter, Tue Oct 19 18:40:54 2010 UTC

# Line 1 | Line 1
1   /*
2    File autogenerated by gengetopt version 2.22
3    generated with the following command:
4 <  gengetopt -F StaticPropsCmd
4 >  gengetopt -F StaticPropsCmd -u
5  
6    The developers of gengetopt consider the fixed text that goes in all
7    gengetopt output files to be in the public domain:
# Line 23 | Line 23 | const char *gengetopt_args_info_purpose = "";
23  
24   const char *gengetopt_args_info_purpose = "";
25  
26 < const char *gengetopt_args_info_usage = "Usage: StaticProps [OPTIONS]...";
26 > const char *gengetopt_args_info_usage = "Usage: StaticProps [OPTIONS]... [FILES]...";
27  
28   const char *gengetopt_args_info_description = "";
29  
# Line 36 | Line 36 | const char *gengetopt_args_info_help[] = {
36    "  -b, --nbins=INT               number of bins (general purpose)  \n                                  (default=`100')",
37    "  -x, --nbins_x=INT             number of bins in x axis  (default=`100')",
38    "  -y, --nbins_y=INT             number of bins in y axis  (default=`100')",
39 +  "      --nbins_z=INT             number of bins in z axis  (default=`100')",
40    "  -a, --nanglebins=INT          number of bins for cos(angle)  (default=`50')",
40  "      --length=DOUBLE           maximum length (Defaults to 1/2 smallest length \n                                  of first frame)",
41    "  -c, --rcut=DOUBLE             cutoff radius (rcut)",
42 +  "      --dz=DOUBLE               slab width (dz)",
43 +  "      --length=DOUBLE           maximum length (Defaults to 1/2 smallest length \n                                  of first frame)",
44 +  "      --zlength=DOUBLE          maximum length (Defaults to 1/2 smallest length \n                                  of first frame)",
45    "  -z, --zoffset=DOUBLE          Where to set the zero for the slab_density \n                                  calculation  (default=`0')",
46    "      --sele1=selection script  select the first stuntdouble set",
47    "      --sele2=selection script  select the second stuntdouble set",
# Line 53 | Line 56 | const char *gengetopt_args_info_help[] = {
56    "      --bo                      bond order parameter (--rcut must be specified)",
57    "      --bor                     bond order parameter as a function of radius \n                                  (--rcut must be specified)",
58    "      --bad                     N(theta) bond angle density within (--rcut must \n                                  be specified)",
59 +  "      --count                   count of molecules matching selection criteria \n                                  (and associated statistics)",
60    "  -g, --gofr                    g(r)",
61    "      --gofz                    g(z)",
62    "      --r_theta                 g(r, cos(theta))",
63    "      --r_omega                 g(r, cos(omega))",
64 +  "      --r_z                     g(r, z)",
65    "      --theta_omega             g(cos(theta), cos(omega))",
66    "      --gxyz                    g(x, y, z)",
67 +  "      --twodgofr                2D g(r) (Slab width --dz must be specified)",
68    "  -p, --p2                      p2 order parameter (--sele1 and --sele2 must be \n                                  specified)",
69    "      --rp2                     rp2 order parameter (--sele1 and --sele2 must \n                                  be specified)",
70    "  -s, --scd                     scd order parameter (either --sele1, --sele2, \n                                  --sele3 are specified or --molname, --begin, \n                                  --end are specified)",
71    "  -d, --density                 density plot",
72    "      --slab_density            slab density",
73 +  "      --p_angle                 p(cos(theta))",
74    "      --hxy                     hxy",
75    "      --rho_r                   rho of R",
76    "      --hullvol                 hull volume of nanoparticle",
# Line 102 | Line 109 | void clear_given (struct gengetopt_args_info *args_inf
109    args_info->nbins_given = 0 ;
110    args_info->nbins_x_given = 0 ;
111    args_info->nbins_y_given = 0 ;
112 +  args_info->nbins_z_given = 0 ;
113    args_info->nanglebins_given = 0 ;
106  args_info->length_given = 0 ;
114    args_info->rcut_given = 0 ;
115 +  args_info->dz_given = 0 ;
116 +  args_info->length_given = 0 ;
117 +  args_info->zlength_given = 0 ;
118    args_info->zoffset_given = 0 ;
119    args_info->sele1_given = 0 ;
120    args_info->sele2_given = 0 ;
# Line 118 | Line 128 | void clear_given (struct gengetopt_args_info *args_inf
128    args_info->bo_given = 0 ;
129    args_info->bor_given = 0 ;
130    args_info->bad_given = 0 ;
131 +  args_info->count_given = 0 ;
132    args_info->gofr_given = 0 ;
133    args_info->gofz_given = 0 ;
134    args_info->r_theta_given = 0 ;
135    args_info->r_omega_given = 0 ;
136 +  args_info->r_z_given = 0 ;
137    args_info->theta_omega_given = 0 ;
138    args_info->gxyz_given = 0 ;
139 +  args_info->twodgofr_given = 0 ;
140    args_info->p2_given = 0 ;
141    args_info->rp2_given = 0 ;
142    args_info->scd_given = 0 ;
143    args_info->density_given = 0 ;
144    args_info->slab_density_given = 0 ;
145 +  args_info->p_angle_given = 0 ;
146    args_info->hxy_given = 0 ;
147    args_info->rho_r_given = 0 ;
148    args_info->hullvol_given = 0 ;
# Line 150 | Line 164 | void clear_args (struct gengetopt_args_info *args_info
164    args_info->nbins_x_orig = NULL;
165    args_info->nbins_y_arg = 100;
166    args_info->nbins_y_orig = NULL;
167 +  args_info->nbins_z_arg = 100;
168 +  args_info->nbins_z_orig = NULL;
169    args_info->nanglebins_arg = 50;
170    args_info->nanglebins_orig = NULL;
155  args_info->length_orig = NULL;
171    args_info->rcut_orig = NULL;
172 +  args_info->dz_orig = NULL;
173 +  args_info->length_orig = NULL;
174 +  args_info->zlength_orig = NULL;
175    args_info->zoffset_arg = 0;
176    args_info->zoffset_orig = NULL;
177    args_info->sele1_arg = NULL;
# Line 187 | Line 205 | void init_args_info(struct gengetopt_args_info *args_i
205    args_info->nbins_help = gengetopt_args_info_help[5] ;
206    args_info->nbins_x_help = gengetopt_args_info_help[6] ;
207    args_info->nbins_y_help = gengetopt_args_info_help[7] ;
208 <  args_info->nanglebins_help = gengetopt_args_info_help[8] ;
209 <  args_info->length_help = gengetopt_args_info_help[9] ;
208 >  args_info->nbins_z_help = gengetopt_args_info_help[8] ;
209 >  args_info->nanglebins_help = gengetopt_args_info_help[9] ;
210    args_info->rcut_help = gengetopt_args_info_help[10] ;
211 <  args_info->zoffset_help = gengetopt_args_info_help[11] ;
212 <  args_info->sele1_help = gengetopt_args_info_help[12] ;
213 <  args_info->sele2_help = gengetopt_args_info_help[13] ;
214 <  args_info->sele3_help = gengetopt_args_info_help[14] ;
215 <  args_info->refsele_help = gengetopt_args_info_help[15] ;
216 <  args_info->comsele_help = gengetopt_args_info_help[16] ;
217 <  args_info->molname_help = gengetopt_args_info_help[17] ;
218 <  args_info->begin_help = gengetopt_args_info_help[18] ;
219 <  args_info->end_help = gengetopt_args_info_help[19] ;
220 <  args_info->radius_help = gengetopt_args_info_help[20] ;
221 <  args_info->bo_help = gengetopt_args_info_help[22] ;
222 <  args_info->bor_help = gengetopt_args_info_help[23] ;
223 <  args_info->bad_help = gengetopt_args_info_help[24] ;
224 <  args_info->gofr_help = gengetopt_args_info_help[25] ;
225 <  args_info->gofz_help = gengetopt_args_info_help[26] ;
226 <  args_info->r_theta_help = gengetopt_args_info_help[27] ;
227 <  args_info->r_omega_help = gengetopt_args_info_help[28] ;
228 <  args_info->theta_omega_help = gengetopt_args_info_help[29] ;
229 <  args_info->gxyz_help = gengetopt_args_info_help[30] ;
230 <  args_info->p2_help = gengetopt_args_info_help[31] ;
231 <  args_info->rp2_help = gengetopt_args_info_help[32] ;
232 <  args_info->scd_help = gengetopt_args_info_help[33] ;
233 <  args_info->density_help = gengetopt_args_info_help[34] ;
234 <  args_info->slab_density_help = gengetopt_args_info_help[35] ;
235 <  args_info->hxy_help = gengetopt_args_info_help[36] ;
236 <  args_info->rho_r_help = gengetopt_args_info_help[37] ;
237 <  args_info->hullvol_help = gengetopt_args_info_help[38] ;
211 >  args_info->dz_help = gengetopt_args_info_help[11] ;
212 >  args_info->length_help = gengetopt_args_info_help[12] ;
213 >  args_info->zlength_help = gengetopt_args_info_help[13] ;
214 >  args_info->zoffset_help = gengetopt_args_info_help[14] ;
215 >  args_info->sele1_help = gengetopt_args_info_help[15] ;
216 >  args_info->sele2_help = gengetopt_args_info_help[16] ;
217 >  args_info->sele3_help = gengetopt_args_info_help[17] ;
218 >  args_info->refsele_help = gengetopt_args_info_help[18] ;
219 >  args_info->comsele_help = gengetopt_args_info_help[19] ;
220 >  args_info->molname_help = gengetopt_args_info_help[20] ;
221 >  args_info->begin_help = gengetopt_args_info_help[21] ;
222 >  args_info->end_help = gengetopt_args_info_help[22] ;
223 >  args_info->radius_help = gengetopt_args_info_help[23] ;
224 >  args_info->bo_help = gengetopt_args_info_help[25] ;
225 >  args_info->bor_help = gengetopt_args_info_help[26] ;
226 >  args_info->bad_help = gengetopt_args_info_help[27] ;
227 >  args_info->count_help = gengetopt_args_info_help[28] ;
228 >  args_info->gofr_help = gengetopt_args_info_help[29] ;
229 >  args_info->gofz_help = gengetopt_args_info_help[30] ;
230 >  args_info->r_theta_help = gengetopt_args_info_help[31] ;
231 >  args_info->r_omega_help = gengetopt_args_info_help[32] ;
232 >  args_info->r_z_help = gengetopt_args_info_help[33] ;
233 >  args_info->theta_omega_help = gengetopt_args_info_help[34] ;
234 >  args_info->gxyz_help = gengetopt_args_info_help[35] ;
235 >  args_info->twodgofr_help = gengetopt_args_info_help[36] ;
236 >  args_info->p2_help = gengetopt_args_info_help[37] ;
237 >  args_info->rp2_help = gengetopt_args_info_help[38] ;
238 >  args_info->scd_help = gengetopt_args_info_help[39] ;
239 >  args_info->density_help = gengetopt_args_info_help[40] ;
240 >  args_info->slab_density_help = gengetopt_args_info_help[41] ;
241 >  args_info->p_angle_help = gengetopt_args_info_help[42] ;
242 >  args_info->hxy_help = gengetopt_args_info_help[43] ;
243 >  args_info->rho_r_help = gengetopt_args_info_help[44] ;
244 >  args_info->hullvol_help = gengetopt_args_info_help[45] ;
245    
246   }
247  
# Line 256 | Line 281 | cmdline_parser_init (struct gengetopt_args_info *args_
281    clear_given (args_info);
282    clear_args (args_info);
283    init_args_info (args_info);
284 +
285 +  args_info->inputs = NULL;
286 +  args_info->inputs_num = 0;
287   }
288  
289   void
# Line 294 | Line 322 | cmdline_parser_release (struct gengetopt_args_info *ar
322   static void
323   cmdline_parser_release (struct gengetopt_args_info *args_info)
324   {
325 <
325 >  unsigned int i;
326    free_string_field (&(args_info->input_arg));
327    free_string_field (&(args_info->input_orig));
328    free_string_field (&(args_info->output_arg));
# Line 303 | Line 331 | cmdline_parser_release (struct gengetopt_args_info *ar
331    free_string_field (&(args_info->nbins_orig));
332    free_string_field (&(args_info->nbins_x_orig));
333    free_string_field (&(args_info->nbins_y_orig));
334 +  free_string_field (&(args_info->nbins_z_orig));
335    free_string_field (&(args_info->nanglebins_orig));
307  free_string_field (&(args_info->length_orig));
336    free_string_field (&(args_info->rcut_orig));
337 +  free_string_field (&(args_info->dz_orig));
338 +  free_string_field (&(args_info->length_orig));
339 +  free_string_field (&(args_info->zlength_orig));
340    free_string_field (&(args_info->zoffset_orig));
341    free_string_field (&(args_info->sele1_arg));
342    free_string_field (&(args_info->sele1_orig));
# Line 324 | Line 355 | cmdline_parser_release (struct gengetopt_args_info *ar
355    free_string_field (&(args_info->radius_orig));
356    
357    
358 +  for (i = 0; i < args_info->inputs_num; ++i)
359 +    free (args_info->inputs [i]);
360  
361 +  if (args_info->inputs_num)
362 +    free (args_info->inputs);
363 +
364    clear_given (args_info);
365   }
366  
# Line 367 | Line 403 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
403      write_into_file(outfile, "nbins_x", args_info->nbins_x_orig, 0);
404    if (args_info->nbins_y_given)
405      write_into_file(outfile, "nbins_y", args_info->nbins_y_orig, 0);
406 +  if (args_info->nbins_z_given)
407 +    write_into_file(outfile, "nbins_z", args_info->nbins_z_orig, 0);
408    if (args_info->nanglebins_given)
409      write_into_file(outfile, "nanglebins", args_info->nanglebins_orig, 0);
372  if (args_info->length_given)
373    write_into_file(outfile, "length", args_info->length_orig, 0);
410    if (args_info->rcut_given)
411      write_into_file(outfile, "rcut", args_info->rcut_orig, 0);
412 +  if (args_info->dz_given)
413 +    write_into_file(outfile, "dz", args_info->dz_orig, 0);
414 +  if (args_info->length_given)
415 +    write_into_file(outfile, "length", args_info->length_orig, 0);
416 +  if (args_info->zlength_given)
417 +    write_into_file(outfile, "zlength", args_info->zlength_orig, 0);
418    if (args_info->zoffset_given)
419      write_into_file(outfile, "zoffset", args_info->zoffset_orig, 0);
420    if (args_info->sele1_given)
# Line 399 | Line 441 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
441      write_into_file(outfile, "bor", 0, 0 );
442    if (args_info->bad_given)
443      write_into_file(outfile, "bad", 0, 0 );
444 +  if (args_info->count_given)
445 +    write_into_file(outfile, "count", 0, 0 );
446    if (args_info->gofr_given)
447      write_into_file(outfile, "gofr", 0, 0 );
448    if (args_info->gofz_given)
# Line 407 | Line 451 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
451      write_into_file(outfile, "r_theta", 0, 0 );
452    if (args_info->r_omega_given)
453      write_into_file(outfile, "r_omega", 0, 0 );
454 +  if (args_info->r_z_given)
455 +    write_into_file(outfile, "r_z", 0, 0 );
456    if (args_info->theta_omega_given)
457      write_into_file(outfile, "theta_omega", 0, 0 );
458    if (args_info->gxyz_given)
459      write_into_file(outfile, "gxyz", 0, 0 );
460 +  if (args_info->twodgofr_given)
461 +    write_into_file(outfile, "twodgofr", 0, 0 );
462    if (args_info->p2_given)
463      write_into_file(outfile, "p2", 0, 0 );
464    if (args_info->rp2_given)
# Line 421 | Line 469 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
469      write_into_file(outfile, "density", 0, 0 );
470    if (args_info->slab_density_given)
471      write_into_file(outfile, "slab_density", 0, 0 );
472 +  if (args_info->p_angle_given)
473 +    write_into_file(outfile, "p_angle", 0, 0 );
474    if (args_info->hxy_given)
475      write_into_file(outfile, "hxy", 0, 0 );
476    if (args_info->rho_r_given)
# Line 483 | Line 533 | reset_group_staticProps(struct gengetopt_args_info *ar
533    args_info->bo_given = 0 ;
534    args_info->bor_given = 0 ;
535    args_info->bad_given = 0 ;
536 +  args_info->count_given = 0 ;
537    args_info->gofr_given = 0 ;
538    args_info->gofz_given = 0 ;
539    args_info->r_theta_given = 0 ;
540    args_info->r_omega_given = 0 ;
541 +  args_info->r_z_given = 0 ;
542    args_info->theta_omega_given = 0 ;
543    args_info->gxyz_given = 0 ;
544 +  args_info->twodgofr_given = 0 ;
545    args_info->p2_given = 0 ;
546    args_info->rp2_given = 0 ;
547    args_info->scd_given = 0 ;
548    args_info->density_given = 0 ;
549    args_info->slab_density_given = 0 ;
550 +  args_info->p_angle_given = 0 ;
551    args_info->hxy_given = 0 ;
552    args_info->rho_r_given = 0 ;
553    args_info->hullvol_given = 0 ;
# Line 745 | Line 799 | cmdline_parser_internal (int argc, char * const *argv,
799          { "nbins",      1, NULL, 'b' },
800          { "nbins_x",    1, NULL, 'x' },
801          { "nbins_y",    1, NULL, 'y' },
802 +        { "nbins_z",    1, NULL, 0 },
803          { "nanglebins", 1, NULL, 'a' },
749        { "length",     1, NULL, 0 },
804          { "rcut",       1, NULL, 'c' },
805 +        { "dz", 1, NULL, 0 },
806 +        { "length",     1, NULL, 0 },
807 +        { "zlength",    1, NULL, 0 },
808          { "zoffset",    1, NULL, 'z' },
809          { "sele1",      1, NULL, 0 },
810          { "sele2",      1, NULL, 0 },
# Line 761 | Line 818 | cmdline_parser_internal (int argc, char * const *argv,
818          { "bo", 0, NULL, 0 },
819          { "bor",        0, NULL, 0 },
820          { "bad",        0, NULL, 0 },
821 +        { "count",      0, NULL, 0 },
822          { "gofr",       0, NULL, 'g' },
823          { "gofz",       0, NULL, 0 },
824          { "r_theta",    0, NULL, 0 },
825          { "r_omega",    0, NULL, 0 },
826 +        { "r_z",        0, NULL, 0 },
827          { "theta_omega",        0, NULL, 0 },
828          { "gxyz",       0, NULL, 0 },
829 +        { "twodgofr",   0, NULL, 0 },
830          { "p2", 0, NULL, 'p' },
831          { "rp2",        0, NULL, 0 },
832          { "scd",        0, NULL, 's' },
833          { "density",    0, NULL, 'd' },
834          { "slab_density",       0, NULL, 0 },
835 +        { "p_angle",    0, NULL, 0 },
836          { "hxy",        0, NULL, 0 },
837          { "rho_r",      0, NULL, 0 },
838          { "hullvol",    0, NULL, 0 },
# Line 964 | Line 1025 | cmdline_parser_internal (int argc, char * const *argv,
1025            break;
1026  
1027          case 0: /* Long option with no short option */
1028 +          /* number of bins in z axis.  */
1029 +          if (strcmp (long_options[option_index].name, "nbins_z") == 0)
1030 +          {
1031 +          
1032 +          
1033 +            if (update_arg( (void *)&(args_info->nbins_z_arg),
1034 +                 &(args_info->nbins_z_orig), &(args_info->nbins_z_given),
1035 +                &(local_args_info.nbins_z_given), optarg, 0, "100", ARG_INT,
1036 +                check_ambiguity, override, 0, 0,
1037 +                "nbins_z", '-',
1038 +                additional_error))
1039 +              goto failure;
1040 +          
1041 +          }
1042 +          /* slab width (dz).  */
1043 +          else if (strcmp (long_options[option_index].name, "dz") == 0)
1044 +          {
1045 +          
1046 +          
1047 +            if (update_arg( (void *)&(args_info->dz_arg),
1048 +                 &(args_info->dz_orig), &(args_info->dz_given),
1049 +                &(local_args_info.dz_given), optarg, 0, 0, ARG_DOUBLE,
1050 +                check_ambiguity, override, 0, 0,
1051 +                "dz", '-',
1052 +                additional_error))
1053 +              goto failure;
1054 +          
1055 +          }
1056            /* maximum length (Defaults to 1/2 smallest length of first frame).  */
1057 <          if (strcmp (long_options[option_index].name, "length") == 0)
1057 >          else if (strcmp (long_options[option_index].name, "length") == 0)
1058            {
1059            
1060            
# Line 974 | Line 1063 | cmdline_parser_internal (int argc, char * const *argv,
1063                  &(local_args_info.length_given), optarg, 0, 0, ARG_DOUBLE,
1064                  check_ambiguity, override, 0, 0,
1065                  "length", '-',
1066 +                additional_error))
1067 +              goto failure;
1068 +          
1069 +          }
1070 +          /* maximum length (Defaults to 1/2 smallest length of first frame).  */
1071 +          else if (strcmp (long_options[option_index].name, "zlength") == 0)
1072 +          {
1073 +          
1074 +          
1075 +            if (update_arg( (void *)&(args_info->zlength_arg),
1076 +                 &(args_info->zlength_orig), &(args_info->zlength_given),
1077 +                &(local_args_info.zlength_given), optarg, 0, 0, ARG_DOUBLE,
1078 +                check_ambiguity, override, 0, 0,
1079 +                "zlength", '-',
1080                  additional_error))
1081                goto failure;
1082            
# Line 1155 | Line 1258 | cmdline_parser_internal (int argc, char * const *argv,
1258                goto failure;
1259            
1260            }
1261 +          /* count of molecules matching selection criteria (and associated statistics).  */
1262 +          else if (strcmp (long_options[option_index].name, "count") == 0)
1263 +          {
1264 +          
1265 +            if (args_info->staticProps_group_counter && override)
1266 +              reset_group_staticProps (args_info);
1267 +            args_info->staticProps_group_counter += 1;
1268 +          
1269 +            if (update_arg( 0 ,
1270 +                 0 , &(args_info->count_given),
1271 +                &(local_args_info.count_given), optarg, 0, 0, ARG_NO,
1272 +                check_ambiguity, override, 0, 0,
1273 +                "count", '-',
1274 +                additional_error))
1275 +              goto failure;
1276 +          
1277 +          }
1278            /* g(z).  */
1279            else if (strcmp (long_options[option_index].name, "gofz") == 0)
1280            {
# Line 1206 | Line 1326 | cmdline_parser_internal (int argc, char * const *argv,
1326                goto failure;
1327            
1328            }
1329 +          /* g(r, z).  */
1330 +          else if (strcmp (long_options[option_index].name, "r_z") == 0)
1331 +          {
1332 +          
1333 +            if (args_info->staticProps_group_counter && override)
1334 +              reset_group_staticProps (args_info);
1335 +            args_info->staticProps_group_counter += 1;
1336 +          
1337 +            if (update_arg( 0 ,
1338 +                 0 , &(args_info->r_z_given),
1339 +                &(local_args_info.r_z_given), optarg, 0, 0, ARG_NO,
1340 +                check_ambiguity, override, 0, 0,
1341 +                "r_z", '-',
1342 +                additional_error))
1343 +              goto failure;
1344 +          
1345 +          }
1346            /* g(cos(theta), cos(omega)).  */
1347            else if (strcmp (long_options[option_index].name, "theta_omega") == 0)
1348            {
# Line 1240 | Line 1377 | cmdline_parser_internal (int argc, char * const *argv,
1377                goto failure;
1378            
1379            }
1380 +          /* 2D g(r) (Slab width --dz must be specified).  */
1381 +          else if (strcmp (long_options[option_index].name, "twodgofr") == 0)
1382 +          {
1383 +          
1384 +            if (args_info->staticProps_group_counter && override)
1385 +              reset_group_staticProps (args_info);
1386 +            args_info->staticProps_group_counter += 1;
1387 +          
1388 +            if (update_arg( 0 ,
1389 +                 0 , &(args_info->twodgofr_given),
1390 +                &(local_args_info.twodgofr_given), optarg, 0, 0, ARG_NO,
1391 +                check_ambiguity, override, 0, 0,
1392 +                "twodgofr", '-',
1393 +                additional_error))
1394 +              goto failure;
1395 +          
1396 +          }
1397            /* rp2 order parameter (--sele1 and --sele2 must be specified).  */
1398            else if (strcmp (long_options[option_index].name, "rp2") == 0)
1399            {
# Line 1274 | Line 1428 | cmdline_parser_internal (int argc, char * const *argv,
1428                goto failure;
1429            
1430            }
1431 +          /* p(cos(theta)).  */
1432 +          else if (strcmp (long_options[option_index].name, "p_angle") == 0)
1433 +          {
1434 +          
1435 +            if (args_info->staticProps_group_counter && override)
1436 +              reset_group_staticProps (args_info);
1437 +            args_info->staticProps_group_counter += 1;
1438 +          
1439 +            if (update_arg( 0 ,
1440 +                 0 , &(args_info->p_angle_given),
1441 +                &(local_args_info.p_angle_given), optarg, 0, 0, ARG_NO,
1442 +                check_ambiguity, override, 0, 0,
1443 +                "p_angle", '-',
1444 +                additional_error))
1445 +              goto failure;
1446 +          
1447 +          }
1448            /* hxy.  */
1449            else if (strcmp (long_options[option_index].name, "hxy") == 0)
1450            {
# Line 1355 | Line 1526 | cmdline_parser_internal (int argc, char * const *argv,
1526    if ( error )
1527      return (EXIT_FAILURE);
1528  
1529 +  if (optind < argc)
1530 +    {
1531 +      int i = 0 ;
1532 +      int found_prog_name = 0;
1533 +      /* whether program name, i.e., argv[0], is in the remaining args
1534 +         (this may happen with some implementations of getopt,
1535 +          but surely not with the one included by gengetopt) */
1536 +
1537 +      i = optind;
1538 +      while (i < argc)
1539 +        if (argv[i++] == argv[0]) {
1540 +          found_prog_name = 1;
1541 +          break;
1542 +        }
1543 +      i = 0;
1544 +
1545 +      args_info->inputs_num = argc - optind - found_prog_name;
1546 +      args_info->inputs =
1547 +        (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ;
1548 +      while (optind < argc)
1549 +        if (argv[optind++] != argv[0])
1550 +          args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ;
1551 +    }
1552 +
1553    return 0;
1554  
1555   failure:

Comparing trunk/src/applications/staticProps/StaticPropsCmd.c (property svn:keywords):
Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
Revision 1513 by gezelter, Tue Oct 19 18:40:54 2010 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines