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

Comparing trunk/src/applications/staticProps/StaticPropsCmd.c (file contents):
Revision 1440 by gezelter, Thu Apr 29 14:41:48 2010 UTC vs.
Revision 1445 by chuckv, Tue Jun 8 20:26:50 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 -u
4 >  gengetopt -F StaticPropsCmd
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]... [FILES]...";
26 > const char *gengetopt_args_info_usage = "Usage: StaticProps [OPTIONS]...";
27  
28   const char *gengetopt_args_info_description = "";
29  
# Line 38 | Line 38 | const char *gengetopt_args_info_help[] = {
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')",
41  "      --length=DOUBLE           maximum length (Defaults to 1/2 smallest length \n                                  of first frame)",
41    "  -c, --rcut=DOUBLE             cutoff radius (rcut)",
42 +  "      --length=DOUBLE           maximum length (Defaults to 1/2 smallest length \n                                  of first frame)",
43 +  "      --zlength=DOUBLE          maximum length (Defaults to 1/2 smallest length \n                                  of first frame)",
44    "  -z, --zoffset=DOUBLE          Where to set the zero for the slab_density \n                                  calculation  (default=`0')",
45    "      --sele1=selection script  select the first stuntdouble set",
46    "      --sele2=selection script  select the second stuntdouble set",
# Line 107 | Line 108 | void clear_given (struct gengetopt_args_info *args_inf
108    args_info->nbins_y_given = 0 ;
109    args_info->nbins_z_given = 0 ;
110    args_info->nanglebins_given = 0 ;
110  args_info->length_given = 0 ;
111    args_info->rcut_given = 0 ;
112 +  args_info->length_given = 0 ;
113 +  args_info->zlength_given = 0 ;
114    args_info->zoffset_given = 0 ;
115    args_info->sele1_given = 0 ;
116    args_info->sele2_given = 0 ;
# Line 160 | Line 162 | void clear_args (struct gengetopt_args_info *args_info
162    args_info->nbins_z_orig = NULL;
163    args_info->nanglebins_arg = 50;
164    args_info->nanglebins_orig = NULL;
163  args_info->length_orig = NULL;
165    args_info->rcut_orig = NULL;
166 +  args_info->length_orig = NULL;
167 +  args_info->zlength_orig = NULL;
168    args_info->zoffset_arg = 0;
169    args_info->zoffset_orig = NULL;
170    args_info->sele1_arg = NULL;
# Line 197 | Line 200 | void init_args_info(struct gengetopt_args_info *args_i
200    args_info->nbins_y_help = gengetopt_args_info_help[7] ;
201    args_info->nbins_z_help = gengetopt_args_info_help[8] ;
202    args_info->nanglebins_help = gengetopt_args_info_help[9] ;
203 <  args_info->length_help = gengetopt_args_info_help[10] ;
204 <  args_info->rcut_help = gengetopt_args_info_help[11] ;
205 <  args_info->zoffset_help = gengetopt_args_info_help[12] ;
206 <  args_info->sele1_help = gengetopt_args_info_help[13] ;
207 <  args_info->sele2_help = gengetopt_args_info_help[14] ;
208 <  args_info->sele3_help = gengetopt_args_info_help[15] ;
209 <  args_info->refsele_help = gengetopt_args_info_help[16] ;
210 <  args_info->comsele_help = gengetopt_args_info_help[17] ;
211 <  args_info->molname_help = gengetopt_args_info_help[18] ;
212 <  args_info->begin_help = gengetopt_args_info_help[19] ;
213 <  args_info->end_help = gengetopt_args_info_help[20] ;
214 <  args_info->radius_help = gengetopt_args_info_help[21] ;
215 <  args_info->bo_help = gengetopt_args_info_help[23] ;
216 <  args_info->bor_help = gengetopt_args_info_help[24] ;
217 <  args_info->bad_help = gengetopt_args_info_help[25] ;
218 <  args_info->gofr_help = gengetopt_args_info_help[26] ;
219 <  args_info->gofz_help = gengetopt_args_info_help[27] ;
220 <  args_info->r_theta_help = gengetopt_args_info_help[28] ;
221 <  args_info->r_omega_help = gengetopt_args_info_help[29] ;
222 <  args_info->r_z_help = gengetopt_args_info_help[30] ;
223 <  args_info->theta_omega_help = gengetopt_args_info_help[31] ;
224 <  args_info->gxyz_help = gengetopt_args_info_help[32] ;
225 <  args_info->p2_help = gengetopt_args_info_help[33] ;
226 <  args_info->rp2_help = gengetopt_args_info_help[34] ;
227 <  args_info->scd_help = gengetopt_args_info_help[35] ;
228 <  args_info->density_help = gengetopt_args_info_help[36] ;
229 <  args_info->slab_density_help = gengetopt_args_info_help[37] ;
230 <  args_info->p_angle_help = gengetopt_args_info_help[38] ;
231 <  args_info->hxy_help = gengetopt_args_info_help[39] ;
232 <  args_info->rho_r_help = gengetopt_args_info_help[40] ;
233 <  args_info->hullvol_help = gengetopt_args_info_help[41] ;
203 >  args_info->rcut_help = gengetopt_args_info_help[10] ;
204 >  args_info->length_help = gengetopt_args_info_help[11] ;
205 >  args_info->zlength_help = gengetopt_args_info_help[12] ;
206 >  args_info->zoffset_help = gengetopt_args_info_help[13] ;
207 >  args_info->sele1_help = gengetopt_args_info_help[14] ;
208 >  args_info->sele2_help = gengetopt_args_info_help[15] ;
209 >  args_info->sele3_help = gengetopt_args_info_help[16] ;
210 >  args_info->refsele_help = gengetopt_args_info_help[17] ;
211 >  args_info->comsele_help = gengetopt_args_info_help[18] ;
212 >  args_info->molname_help = gengetopt_args_info_help[19] ;
213 >  args_info->begin_help = gengetopt_args_info_help[20] ;
214 >  args_info->end_help = gengetopt_args_info_help[21] ;
215 >  args_info->radius_help = gengetopt_args_info_help[22] ;
216 >  args_info->bo_help = gengetopt_args_info_help[24] ;
217 >  args_info->bor_help = gengetopt_args_info_help[25] ;
218 >  args_info->bad_help = gengetopt_args_info_help[26] ;
219 >  args_info->gofr_help = gengetopt_args_info_help[27] ;
220 >  args_info->gofz_help = gengetopt_args_info_help[28] ;
221 >  args_info->r_theta_help = gengetopt_args_info_help[29] ;
222 >  args_info->r_omega_help = gengetopt_args_info_help[30] ;
223 >  args_info->r_z_help = gengetopt_args_info_help[31] ;
224 >  args_info->theta_omega_help = gengetopt_args_info_help[32] ;
225 >  args_info->gxyz_help = gengetopt_args_info_help[33] ;
226 >  args_info->p2_help = gengetopt_args_info_help[34] ;
227 >  args_info->rp2_help = gengetopt_args_info_help[35] ;
228 >  args_info->scd_help = gengetopt_args_info_help[36] ;
229 >  args_info->density_help = gengetopt_args_info_help[37] ;
230 >  args_info->slab_density_help = gengetopt_args_info_help[38] ;
231 >  args_info->p_angle_help = gengetopt_args_info_help[39] ;
232 >  args_info->hxy_help = gengetopt_args_info_help[40] ;
233 >  args_info->rho_r_help = gengetopt_args_info_help[41] ;
234 >  args_info->hullvol_help = gengetopt_args_info_help[42] ;
235    
236   }
237  
# Line 267 | Line 271 | cmdline_parser_init (struct gengetopt_args_info *args_
271    clear_given (args_info);
272    clear_args (args_info);
273    init_args_info (args_info);
270
271  args_info->inputs = NULL;
272  args_info->inputs_num = 0;
274   }
275  
276   void
# Line 308 | Line 309 | cmdline_parser_release (struct gengetopt_args_info *ar
309   static void
310   cmdline_parser_release (struct gengetopt_args_info *args_info)
311   {
312 <  unsigned int i;
312 >
313    free_string_field (&(args_info->input_arg));
314    free_string_field (&(args_info->input_orig));
315    free_string_field (&(args_info->output_arg));
# Line 319 | Line 320 | cmdline_parser_release (struct gengetopt_args_info *ar
320    free_string_field (&(args_info->nbins_y_orig));
321    free_string_field (&(args_info->nbins_z_orig));
322    free_string_field (&(args_info->nanglebins_orig));
322  free_string_field (&(args_info->length_orig));
323    free_string_field (&(args_info->rcut_orig));
324 +  free_string_field (&(args_info->length_orig));
325 +  free_string_field (&(args_info->zlength_orig));
326    free_string_field (&(args_info->zoffset_orig));
327    free_string_field (&(args_info->sele1_arg));
328    free_string_field (&(args_info->sele1_orig));
# Line 339 | Line 341 | cmdline_parser_release (struct gengetopt_args_info *ar
341    free_string_field (&(args_info->radius_orig));
342    
343    
342  for (i = 0; i < args_info->inputs_num; ++i)
343    free (args_info->inputs [i]);
344  
345  if (args_info->inputs_num)
346    free (args_info->inputs);
347
345    clear_given (args_info);
346   }
347  
# Line 391 | Line 388 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
388      write_into_file(outfile, "nbins_z", args_info->nbins_z_orig, 0);
389    if (args_info->nanglebins_given)
390      write_into_file(outfile, "nanglebins", args_info->nanglebins_orig, 0);
394  if (args_info->length_given)
395    write_into_file(outfile, "length", args_info->length_orig, 0);
391    if (args_info->rcut_given)
392      write_into_file(outfile, "rcut", args_info->rcut_orig, 0);
393 +  if (args_info->length_given)
394 +    write_into_file(outfile, "length", args_info->length_orig, 0);
395 +  if (args_info->zlength_given)
396 +    write_into_file(outfile, "zlength", args_info->zlength_orig, 0);
397    if (args_info->zoffset_given)
398      write_into_file(outfile, "zoffset", args_info->zoffset_orig, 0);
399    if (args_info->sele1_given)
# Line 775 | Line 774 | cmdline_parser_internal (int argc, char * const *argv,
774          { "nbins_y",    1, NULL, 'y' },
775          { "nbins_z",    1, NULL, 0 },
776          { "nanglebins", 1, NULL, 'a' },
778        { "length",     1, NULL, 0 },
777          { "rcut",       1, NULL, 'c' },
778 +        { "length",     1, NULL, 0 },
779 +        { "zlength",    1, NULL, 0 },
780          { "zoffset",    1, NULL, 'z' },
781          { "sele1",      1, NULL, 0 },
782          { "sele2",      1, NULL, 0 },
# Line 1023 | Line 1023 | cmdline_parser_internal (int argc, char * const *argv,
1023                goto failure;
1024            
1025            }
1026 +          /* maximum length (Defaults to 1/2 smallest length of first frame).  */
1027 +          else if (strcmp (long_options[option_index].name, "zlength") == 0)
1028 +          {
1029 +          
1030 +          
1031 +            if (update_arg( (void *)&(args_info->zlength_arg),
1032 +                 &(args_info->zlength_orig), &(args_info->zlength_given),
1033 +                &(local_args_info.zlength_given), optarg, 0, 0, ARG_DOUBLE,
1034 +                check_ambiguity, override, 0, 0,
1035 +                "zlength", '-',
1036 +                additional_error))
1037 +              goto failure;
1038 +          
1039 +          }
1040            /* select the first stuntdouble set.  */
1041            else if (strcmp (long_options[option_index].name, "sele1") == 0)
1042            {
# Line 1434 | Line 1448 | cmdline_parser_internal (int argc, char * const *argv,
1448    if ( error )
1449      return (EXIT_FAILURE);
1450  
1437  if (optind < argc)
1438    {
1439      int i = 0 ;
1440      int found_prog_name = 0;
1441      /* whether program name, i.e., argv[0], is in the remaining args
1442         (this may happen with some implementations of getopt,
1443          but surely not with the one included by gengetopt) */
1444
1445      i = optind;
1446      while (i < argc)
1447        if (argv[i++] == argv[0]) {
1448          found_prog_name = 1;
1449          break;
1450        }
1451      i = 0;
1452
1453      args_info->inputs_num = argc - optind - found_prog_name;
1454      args_info->inputs =
1455        (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ;
1456      while (optind < argc)
1457        if (argv[optind++] != argv[0])
1458          args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ;
1459    }
1460
1451    return 0;
1452  
1453   failure:

Comparing trunk/src/applications/staticProps/StaticPropsCmd.c (property svn:keywords):
Revision 1440 by gezelter, Thu Apr 29 14:41:48 2010 UTC vs.
Revision 1445 by chuckv, Tue Jun 8 20:26:50 2010 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines