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 1128 by chuckv, Wed Apr 11 23:27:20 2007 UTC vs.
branches/development/src/applications/staticProps/StaticPropsCmd.cpp (file contents), Revision 1655 by gezelter, Mon Oct 3 20:32:45 2011 UTC

# Line 1 | Line 1
1   /*
2 <  File autogenerated by gengetopt version 2.19.1
2 >  File autogenerated by gengetopt version 2.22.4
3    generated with the following command:
4 <  gengetopt -i StaticProps.ggo -F StaticPropsCmd -u
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 17 | Line 17
17   #include <stdlib.h>
18   #include <string.h>
19  
20 < #include "getopt.h"
20 > #ifndef FIX_UNUSED
21 > #define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */
22 > #endif
23  
24 + #include <getopt.h>
25 +
26   #include "StaticPropsCmd.h"
27  
28   const char *gengetopt_args_info_purpose = "";
# Line 36 | Line 40 | const char *gengetopt_args_info_help[] = {
40    "  -b, --nbins=INT               number of bins (general purpose)  \n                                  (default=`100')",
41    "  -x, --nbins_x=INT             number of bins in x axis  (default=`100')",
42    "  -y, --nbins_y=INT             number of bins in y axis  (default=`100')",
43 +  "      --nbins_z=INT             number of bins in z axis  (default=`100')",
44    "  -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)",
45    "  -c, --rcut=DOUBLE             cutoff radius (rcut)",
46 +  "      --dz=DOUBLE               slab width (dz)",
47 +  "      --length=DOUBLE           maximum length (Defaults to 1/2 smallest length \n                                  of first frame)",
48 +  "      --zlength=DOUBLE          maximum length (Defaults to 1/2 smallest length \n                                  of first frame)",
49    "  -z, --zoffset=DOUBLE          Where to set the zero for the slab_density \n                                  calculation  (default=`0')",
50    "      --sele1=selection script  select the first stuntdouble set",
51    "      --sele2=selection script  select the second stuntdouble set",
52    "      --sele3=selection script  select the third stuntdouble set",
53    "      --refsele=selection script\n                                select reference (use and only use with --gxyz)",
54 +  "      --comsele=selection script\n                                select stunt doubles for center-of-mass \n                                  reference point",
55    "      --molname=STRING          molecule name",
56    "      --begin=INT               begin internal index",
57    "      --end=INT                 end internal index",
# Line 51 | Line 59 | const char *gengetopt_args_info_help[] = {
59    "\n Group: staticProps\n   an option of this group is required",
60    "      --bo                      bond order parameter (--rcut must be specified)",
61    "      --bor                     bond order parameter as a function of radius \n                                  (--rcut must be specified)",
62 +  "      --bad                     N(theta) bond angle density within (--rcut must \n                                  be specified)",
63 +  "      --count                   count of molecules matching selection criteria \n                                  (and associated statistics)",
64    "  -g, --gofr                    g(r)",
65 +  "      --gofz                    g(z)",
66    "      --r_theta                 g(r, cos(theta))",
67    "      --r_omega                 g(r, cos(omega))",
68 +  "      --r_z                     g(r, z)",
69    "      --theta_omega             g(cos(theta), cos(omega))",
70    "      --gxyz                    g(x, y, z)",
71 <  "  -p, --p2                      p2 order parameter (--sele1 and --sele2 must be \n                                  specified)",
71 >  "      --twodgofr                2D g(r) (Slab width --dz must be specified)",
72 >  "  -p, --p2                      p2 order parameter (--sele1 must be specified, \n                                  --sele2 is optional)",
73    "      --rp2                     rp2 order parameter (--sele1 and --sele2 must \n                                  be specified)",
74    "  -s, --scd                     scd order parameter (either --sele1, --sele2, \n                                  --sele3 are specified or --molname, --begin, \n                                  --end are specified)",
75    "  -d, --density                 density plot",
76    "      --slab_density            slab density",
77 +  "      --p_angle                 p(cos(theta))",
78    "      --hxy                     hxy",
79    "      --rho_r                   rho of R",
80 +  "      --angle_r                 angle of R",
81 +  "      --hullvol                 hull volume of nanoparticle",
82 +  "      --rodlength               length of nanorod",
83 +  "  -Q, --tet_param               tetrahedrality order parameter",
84      0
85   };
86  
87 + typedef enum {ARG_NO
88 +  , ARG_STRING
89 +  , ARG_INT
90 +  , ARG_DOUBLE
91 + } cmdline_parser_arg_type;
92 +
93   static
94   void clear_given (struct gengetopt_args_info *args_info);
95   static
96   void clear_args (struct gengetopt_args_info *args_info);
97  
98   static int
99 < cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required, const char *additional_error);
99 > cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info,
100 >                        struct cmdline_parser_params *params, const char *additional_error);
101  
102   static int
103   cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error);
# Line 91 | Line 116 | void clear_given (struct gengetopt_args_info *args_inf
116    args_info->nbins_given = 0 ;
117    args_info->nbins_x_given = 0 ;
118    args_info->nbins_y_given = 0 ;
119 +  args_info->nbins_z_given = 0 ;
120    args_info->nanglebins_given = 0 ;
95  args_info->length_given = 0 ;
121    args_info->rcut_given = 0 ;
122 +  args_info->dz_given = 0 ;
123 +  args_info->length_given = 0 ;
124 +  args_info->zlength_given = 0 ;
125    args_info->zoffset_given = 0 ;
126    args_info->sele1_given = 0 ;
127    args_info->sele2_given = 0 ;
128    args_info->sele3_given = 0 ;
129    args_info->refsele_given = 0 ;
130 +  args_info->comsele_given = 0 ;
131    args_info->molname_given = 0 ;
132    args_info->begin_given = 0 ;
133    args_info->end_given = 0 ;
134    args_info->radius_given = 0 ;
135    args_info->bo_given = 0 ;
136    args_info->bor_given = 0 ;
137 +  args_info->bad_given = 0 ;
138 +  args_info->count_given = 0 ;
139    args_info->gofr_given = 0 ;
140 +  args_info->gofz_given = 0 ;
141    args_info->r_theta_given = 0 ;
142    args_info->r_omega_given = 0 ;
143 +  args_info->r_z_given = 0 ;
144    args_info->theta_omega_given = 0 ;
145    args_info->gxyz_given = 0 ;
146 +  args_info->twodgofr_given = 0 ;
147    args_info->p2_given = 0 ;
148    args_info->rp2_given = 0 ;
149    args_info->scd_given = 0 ;
150    args_info->density_given = 0 ;
151    args_info->slab_density_given = 0 ;
152 +  args_info->p_angle_given = 0 ;
153    args_info->hxy_given = 0 ;
154    args_info->rho_r_given = 0 ;
155 +  args_info->angle_r_given = 0 ;
156 +  args_info->hullvol_given = 0 ;
157 +  args_info->rodlength_given = 0 ;
158 +  args_info->tet_param_given = 0 ;
159    args_info->staticProps_group_counter = 0 ;
160   }
161  
162   static
163   void clear_args (struct gengetopt_args_info *args_info)
164   {
165 +  FIX_UNUSED (args_info);
166    args_info->input_arg = NULL;
167    args_info->input_orig = NULL;
168    args_info->output_arg = NULL;
# Line 135 | Line 175 | void clear_args (struct gengetopt_args_info *args_info
175    args_info->nbins_x_orig = NULL;
176    args_info->nbins_y_arg = 100;
177    args_info->nbins_y_orig = NULL;
178 +  args_info->nbins_z_arg = 100;
179 +  args_info->nbins_z_orig = NULL;
180    args_info->nanglebins_arg = 50;
181    args_info->nanglebins_orig = NULL;
140  args_info->length_orig = NULL;
182    args_info->rcut_orig = NULL;
183 +  args_info->dz_orig = NULL;
184 +  args_info->length_orig = NULL;
185 +  args_info->zlength_orig = NULL;
186    args_info->zoffset_arg = 0;
187    args_info->zoffset_orig = NULL;
188    args_info->sele1_arg = NULL;
# Line 149 | Line 193 | void clear_args (struct gengetopt_args_info *args_info
193    args_info->sele3_orig = NULL;
194    args_info->refsele_arg = NULL;
195    args_info->refsele_orig = NULL;
196 +  args_info->comsele_arg = NULL;
197 +  args_info->comsele_orig = NULL;
198    args_info->molname_arg = NULL;
199    args_info->molname_orig = NULL;
200    args_info->begin_orig = NULL;
# Line 160 | Line 206 | void init_args_info(struct gengetopt_args_info *args_i
206   static
207   void init_args_info(struct gengetopt_args_info *args_info)
208   {
209 +
210 +
211    args_info->help_help = gengetopt_args_info_help[0] ;
212    args_info->version_help = gengetopt_args_info_help[1] ;
213    args_info->input_help = gengetopt_args_info_help[2] ;
# Line 168 | Line 216 | void init_args_info(struct gengetopt_args_info *args_i
216    args_info->nbins_help = gengetopt_args_info_help[5] ;
217    args_info->nbins_x_help = gengetopt_args_info_help[6] ;
218    args_info->nbins_y_help = gengetopt_args_info_help[7] ;
219 <  args_info->nanglebins_help = gengetopt_args_info_help[8] ;
220 <  args_info->length_help = gengetopt_args_info_help[9] ;
219 >  args_info->nbins_z_help = gengetopt_args_info_help[8] ;
220 >  args_info->nanglebins_help = gengetopt_args_info_help[9] ;
221    args_info->rcut_help = gengetopt_args_info_help[10] ;
222 <  args_info->zoffset_help = gengetopt_args_info_help[11] ;
223 <  args_info->sele1_help = gengetopt_args_info_help[12] ;
224 <  args_info->sele2_help = gengetopt_args_info_help[13] ;
225 <  args_info->sele3_help = gengetopt_args_info_help[14] ;
226 <  args_info->refsele_help = gengetopt_args_info_help[15] ;
227 <  args_info->molname_help = gengetopt_args_info_help[16] ;
228 <  args_info->begin_help = gengetopt_args_info_help[17] ;
229 <  args_info->end_help = gengetopt_args_info_help[18] ;
230 <  args_info->radius_help = gengetopt_args_info_help[19] ;
231 <  args_info->bo_help = gengetopt_args_info_help[20] ;
232 <  args_info->bor_help = gengetopt_args_info_help[21] ;
233 <  args_info->gofr_help = gengetopt_args_info_help[22] ;
234 <  args_info->r_theta_help = gengetopt_args_info_help[23] ;
235 <  args_info->r_omega_help = gengetopt_args_info_help[24] ;
236 <  args_info->theta_omega_help = gengetopt_args_info_help[25] ;
237 <  args_info->gxyz_help = gengetopt_args_info_help[26] ;
238 <  args_info->p2_help = gengetopt_args_info_help[27] ;
239 <  args_info->rp2_help = gengetopt_args_info_help[28] ;
240 <  args_info->scd_help = gengetopt_args_info_help[29] ;
241 <  args_info->density_help = gengetopt_args_info_help[30] ;
242 <  args_info->slab_density_help = gengetopt_args_info_help[31] ;
243 <  args_info->hxy_help = gengetopt_args_info_help[32] ;
244 <  args_info->rho_r_help = gengetopt_args_info_help[33] ;
222 >  args_info->dz_help = gengetopt_args_info_help[11] ;
223 >  args_info->length_help = gengetopt_args_info_help[12] ;
224 >  args_info->zlength_help = gengetopt_args_info_help[13] ;
225 >  args_info->zoffset_help = gengetopt_args_info_help[14] ;
226 >  args_info->sele1_help = gengetopt_args_info_help[15] ;
227 >  args_info->sele2_help = gengetopt_args_info_help[16] ;
228 >  args_info->sele3_help = gengetopt_args_info_help[17] ;
229 >  args_info->refsele_help = gengetopt_args_info_help[18] ;
230 >  args_info->comsele_help = gengetopt_args_info_help[19] ;
231 >  args_info->molname_help = gengetopt_args_info_help[20] ;
232 >  args_info->begin_help = gengetopt_args_info_help[21] ;
233 >  args_info->end_help = gengetopt_args_info_help[22] ;
234 >  args_info->radius_help = gengetopt_args_info_help[23] ;
235 >  args_info->bo_help = gengetopt_args_info_help[25] ;
236 >  args_info->bor_help = gengetopt_args_info_help[26] ;
237 >  args_info->bad_help = gengetopt_args_info_help[27] ;
238 >  args_info->count_help = gengetopt_args_info_help[28] ;
239 >  args_info->gofr_help = gengetopt_args_info_help[29] ;
240 >  args_info->gofz_help = gengetopt_args_info_help[30] ;
241 >  args_info->r_theta_help = gengetopt_args_info_help[31] ;
242 >  args_info->r_omega_help = gengetopt_args_info_help[32] ;
243 >  args_info->r_z_help = gengetopt_args_info_help[33] ;
244 >  args_info->theta_omega_help = gengetopt_args_info_help[34] ;
245 >  args_info->gxyz_help = gengetopt_args_info_help[35] ;
246 >  args_info->twodgofr_help = gengetopt_args_info_help[36] ;
247 >  args_info->p2_help = gengetopt_args_info_help[37] ;
248 >  args_info->rp2_help = gengetopt_args_info_help[38] ;
249 >  args_info->scd_help = gengetopt_args_info_help[39] ;
250 >  args_info->density_help = gengetopt_args_info_help[40] ;
251 >  args_info->slab_density_help = gengetopt_args_info_help[41] ;
252 >  args_info->p_angle_help = gengetopt_args_info_help[42] ;
253 >  args_info->hxy_help = gengetopt_args_info_help[43] ;
254 >  args_info->rho_r_help = gengetopt_args_info_help[44] ;
255 >  args_info->angle_r_help = gengetopt_args_info_help[45] ;
256 >  args_info->hullvol_help = gengetopt_args_info_help[46] ;
257 >  args_info->rodlength_help = gengetopt_args_info_help[47] ;
258 >  args_info->tet_param_help = gengetopt_args_info_help[48] ;
259    
260   }
261  
262   void
263   cmdline_parser_print_version (void)
264   {
265 <  printf ("%s %s\n", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION);
265 >  printf ("%s %s\n",
266 >     (strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE),
267 >     CMDLINE_PARSER_VERSION);
268   }
269  
270 < void
207 < cmdline_parser_print_help (void)
208 < {
209 <  int i = 0;
270 > static void print_help_common(void) {
271    cmdline_parser_print_version ();
272  
273    if (strlen(gengetopt_args_info_purpose) > 0)
274      printf("\n%s\n", gengetopt_args_info_purpose);
275  
276 <  printf("\n%s\n\n", gengetopt_args_info_usage);
276 >  if (strlen(gengetopt_args_info_usage) > 0)
277 >    printf("\n%s\n", gengetopt_args_info_usage);
278  
279 +  printf("\n");
280 +
281    if (strlen(gengetopt_args_info_description) > 0)
282 <    printf("%s\n", gengetopt_args_info_description);
282 >    printf("%s\n\n", gengetopt_args_info_description);
283 > }
284  
285 + void
286 + cmdline_parser_print_help (void)
287 + {
288 +  int i = 0;
289 +  print_help_common();
290    while (gengetopt_args_info_help[i])
291      printf("%s\n", gengetopt_args_info_help[i++]);
292   }
# Line 228 | Line 298 | cmdline_parser_init (struct gengetopt_args_info *args_
298    clear_args (args_info);
299    init_args_info (args_info);
300  
301 <  args_info->inputs = NULL;
301 >  args_info->inputs = 0;
302    args_info->inputs_num = 0;
303   }
304  
305 + void
306 + cmdline_parser_params_init(struct cmdline_parser_params *params)
307 + {
308 +  if (params)
309 +    {
310 +      params->override = 0;
311 +      params->initialize = 1;
312 +      params->check_required = 1;
313 +      params->check_ambiguity = 0;
314 +      params->print_errors = 1;
315 +    }
316 + }
317 +
318 + struct cmdline_parser_params *
319 + cmdline_parser_params_create(void)
320 + {
321 +  struct cmdline_parser_params *params =
322 +    (struct cmdline_parser_params *)malloc(sizeof(struct cmdline_parser_params));
323 +  cmdline_parser_params_init(params);  
324 +  return params;
325 + }
326 +
327   static void
328 < cmdline_parser_release (struct gengetopt_args_info *args_info)
328 > free_string_field (char **s)
329   {
330 <  
239 <  unsigned int i;
240 <  if (args_info->input_arg)
330 >  if (*s)
331      {
332 <      free (args_info->input_arg); /* free previous argument */
333 <      args_info->input_arg = 0;
244 <    }
245 <  if (args_info->input_orig)
246 <    {
247 <      free (args_info->input_orig); /* free previous argument */
248 <      args_info->input_orig = 0;
249 <    }
250 <  if (args_info->output_arg)
251 <    {
252 <      free (args_info->output_arg); /* free previous argument */
253 <      args_info->output_arg = 0;
254 <    }
255 <  if (args_info->output_orig)
256 <    {
257 <      free (args_info->output_orig); /* free previous argument */
258 <      args_info->output_orig = 0;
259 <    }
260 <  if (args_info->step_orig)
261 <    {
262 <      free (args_info->step_orig); /* free previous argument */
263 <      args_info->step_orig = 0;
264 <    }
265 <  if (args_info->nbins_orig)
266 <    {
267 <      free (args_info->nbins_orig); /* free previous argument */
268 <      args_info->nbins_orig = 0;
269 <    }
270 <  if (args_info->nbins_x_orig)
271 <    {
272 <      free (args_info->nbins_x_orig); /* free previous argument */
273 <      args_info->nbins_x_orig = 0;
274 <    }
275 <  if (args_info->nbins_y_orig)
276 <    {
277 <      free (args_info->nbins_y_orig); /* free previous argument */
278 <      args_info->nbins_y_orig = 0;
279 <    }
280 <  if (args_info->nanglebins_orig)
281 <    {
282 <      free (args_info->nanglebins_orig); /* free previous argument */
283 <      args_info->nanglebins_orig = 0;
284 <    }
285 <  if (args_info->length_orig)
286 <    {
287 <      free (args_info->length_orig); /* free previous argument */
288 <      args_info->length_orig = 0;
289 <    }
290 <  if (args_info->rcut_orig)
291 <    {
292 <      free (args_info->rcut_orig); /* free previous argument */
293 <      args_info->rcut_orig = 0;
294 <    }
295 <  if (args_info->zoffset_orig)
296 <    {
297 <      free (args_info->zoffset_orig); /* free previous argument */
298 <      args_info->zoffset_orig = 0;
332 >      free (*s);
333 >      *s = 0;
334      }
335 <  if (args_info->sele1_arg)
336 <    {
337 <      free (args_info->sele1_arg); /* free previous argument */
338 <      args_info->sele1_arg = 0;
339 <    }
340 <  if (args_info->sele1_orig)
341 <    {
342 <      free (args_info->sele1_orig); /* free previous argument */
343 <      args_info->sele1_orig = 0;
344 <    }
345 <  if (args_info->sele2_arg)
346 <    {
347 <      free (args_info->sele2_arg); /* free previous argument */
348 <      args_info->sele2_arg = 0;
349 <    }
350 <  if (args_info->sele2_orig)
351 <    {
352 <      free (args_info->sele2_orig); /* free previous argument */
353 <      args_info->sele2_orig = 0;
354 <    }
355 <  if (args_info->sele3_arg)
356 <    {
357 <      free (args_info->sele3_arg); /* free previous argument */
358 <      args_info->sele3_arg = 0;
359 <    }
360 <  if (args_info->sele3_orig)
361 <    {
362 <      free (args_info->sele3_orig); /* free previous argument */
363 <      args_info->sele3_orig = 0;
364 <    }
365 <  if (args_info->refsele_arg)
366 <    {
367 <      free (args_info->refsele_arg); /* free previous argument */
368 <      args_info->refsele_arg = 0;
369 <    }
370 <  if (args_info->refsele_orig)
371 <    {
337 <      free (args_info->refsele_orig); /* free previous argument */
338 <      args_info->refsele_orig = 0;
339 <    }
340 <  if (args_info->molname_arg)
341 <    {
342 <      free (args_info->molname_arg); /* free previous argument */
343 <      args_info->molname_arg = 0;
344 <    }
345 <  if (args_info->molname_orig)
346 <    {
347 <      free (args_info->molname_orig); /* free previous argument */
348 <      args_info->molname_orig = 0;
349 <    }
350 <  if (args_info->begin_orig)
351 <    {
352 <      free (args_info->begin_orig); /* free previous argument */
353 <      args_info->begin_orig = 0;
354 <    }
355 <  if (args_info->end_orig)
356 <    {
357 <      free (args_info->end_orig); /* free previous argument */
358 <      args_info->end_orig = 0;
359 <    }
360 <  if (args_info->radius_orig)
361 <    {
362 <      free (args_info->radius_orig); /* free previous argument */
363 <      args_info->radius_orig = 0;
364 <    }
335 > }
336 >
337 >
338 > static void
339 > cmdline_parser_release (struct gengetopt_args_info *args_info)
340 > {
341 >  unsigned int i;
342 >  free_string_field (&(args_info->input_arg));
343 >  free_string_field (&(args_info->input_orig));
344 >  free_string_field (&(args_info->output_arg));
345 >  free_string_field (&(args_info->output_orig));
346 >  free_string_field (&(args_info->step_orig));
347 >  free_string_field (&(args_info->nbins_orig));
348 >  free_string_field (&(args_info->nbins_x_orig));
349 >  free_string_field (&(args_info->nbins_y_orig));
350 >  free_string_field (&(args_info->nbins_z_orig));
351 >  free_string_field (&(args_info->nanglebins_orig));
352 >  free_string_field (&(args_info->rcut_orig));
353 >  free_string_field (&(args_info->dz_orig));
354 >  free_string_field (&(args_info->length_orig));
355 >  free_string_field (&(args_info->zlength_orig));
356 >  free_string_field (&(args_info->zoffset_orig));
357 >  free_string_field (&(args_info->sele1_arg));
358 >  free_string_field (&(args_info->sele1_orig));
359 >  free_string_field (&(args_info->sele2_arg));
360 >  free_string_field (&(args_info->sele2_orig));
361 >  free_string_field (&(args_info->sele3_arg));
362 >  free_string_field (&(args_info->sele3_orig));
363 >  free_string_field (&(args_info->refsele_arg));
364 >  free_string_field (&(args_info->refsele_orig));
365 >  free_string_field (&(args_info->comsele_arg));
366 >  free_string_field (&(args_info->comsele_orig));
367 >  free_string_field (&(args_info->molname_arg));
368 >  free_string_field (&(args_info->molname_orig));
369 >  free_string_field (&(args_info->begin_orig));
370 >  free_string_field (&(args_info->end_orig));
371 >  free_string_field (&(args_info->radius_orig));
372    
373 +  
374    for (i = 0; i < args_info->inputs_num; ++i)
375      free (args_info->inputs [i]);
376 <  
376 >
377    if (args_info->inputs_num)
378      free (args_info->inputs);
379 <  
379 >
380    clear_given (args_info);
381   }
382  
383 +
384 + static void
385 + write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[])
386 + {
387 +  FIX_UNUSED (values);
388 +  if (arg) {
389 +    fprintf(outfile, "%s=\"%s\"\n", opt, arg);
390 +  } else {
391 +    fprintf(outfile, "%s\n", opt);
392 +  }
393 + }
394 +
395 +
396   int
397 + cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
398 + {
399 +  int i = 0;
400 +
401 +  if (!outfile)
402 +    {
403 +      fprintf (stderr, "%s: cannot dump options to stream\n", CMDLINE_PARSER_PACKAGE);
404 +      return EXIT_FAILURE;
405 +    }
406 +
407 +  if (args_info->help_given)
408 +    write_into_file(outfile, "help", 0, 0 );
409 +  if (args_info->version_given)
410 +    write_into_file(outfile, "version", 0, 0 );
411 +  if (args_info->input_given)
412 +    write_into_file(outfile, "input", args_info->input_orig, 0);
413 +  if (args_info->output_given)
414 +    write_into_file(outfile, "output", args_info->output_orig, 0);
415 +  if (args_info->step_given)
416 +    write_into_file(outfile, "step", args_info->step_orig, 0);
417 +  if (args_info->nbins_given)
418 +    write_into_file(outfile, "nbins", args_info->nbins_orig, 0);
419 +  if (args_info->nbins_x_given)
420 +    write_into_file(outfile, "nbins_x", args_info->nbins_x_orig, 0);
421 +  if (args_info->nbins_y_given)
422 +    write_into_file(outfile, "nbins_y", args_info->nbins_y_orig, 0);
423 +  if (args_info->nbins_z_given)
424 +    write_into_file(outfile, "nbins_z", args_info->nbins_z_orig, 0);
425 +  if (args_info->nanglebins_given)
426 +    write_into_file(outfile, "nanglebins", args_info->nanglebins_orig, 0);
427 +  if (args_info->rcut_given)
428 +    write_into_file(outfile, "rcut", args_info->rcut_orig, 0);
429 +  if (args_info->dz_given)
430 +    write_into_file(outfile, "dz", args_info->dz_orig, 0);
431 +  if (args_info->length_given)
432 +    write_into_file(outfile, "length", args_info->length_orig, 0);
433 +  if (args_info->zlength_given)
434 +    write_into_file(outfile, "zlength", args_info->zlength_orig, 0);
435 +  if (args_info->zoffset_given)
436 +    write_into_file(outfile, "zoffset", args_info->zoffset_orig, 0);
437 +  if (args_info->sele1_given)
438 +    write_into_file(outfile, "sele1", args_info->sele1_orig, 0);
439 +  if (args_info->sele2_given)
440 +    write_into_file(outfile, "sele2", args_info->sele2_orig, 0);
441 +  if (args_info->sele3_given)
442 +    write_into_file(outfile, "sele3", args_info->sele3_orig, 0);
443 +  if (args_info->refsele_given)
444 +    write_into_file(outfile, "refsele", args_info->refsele_orig, 0);
445 +  if (args_info->comsele_given)
446 +    write_into_file(outfile, "comsele", args_info->comsele_orig, 0);
447 +  if (args_info->molname_given)
448 +    write_into_file(outfile, "molname", args_info->molname_orig, 0);
449 +  if (args_info->begin_given)
450 +    write_into_file(outfile, "begin", args_info->begin_orig, 0);
451 +  if (args_info->end_given)
452 +    write_into_file(outfile, "end", args_info->end_orig, 0);
453 +  if (args_info->radius_given)
454 +    write_into_file(outfile, "radius", args_info->radius_orig, 0);
455 +  if (args_info->bo_given)
456 +    write_into_file(outfile, "bo", 0, 0 );
457 +  if (args_info->bor_given)
458 +    write_into_file(outfile, "bor", 0, 0 );
459 +  if (args_info->bad_given)
460 +    write_into_file(outfile, "bad", 0, 0 );
461 +  if (args_info->count_given)
462 +    write_into_file(outfile, "count", 0, 0 );
463 +  if (args_info->gofr_given)
464 +    write_into_file(outfile, "gofr", 0, 0 );
465 +  if (args_info->gofz_given)
466 +    write_into_file(outfile, "gofz", 0, 0 );
467 +  if (args_info->r_theta_given)
468 +    write_into_file(outfile, "r_theta", 0, 0 );
469 +  if (args_info->r_omega_given)
470 +    write_into_file(outfile, "r_omega", 0, 0 );
471 +  if (args_info->r_z_given)
472 +    write_into_file(outfile, "r_z", 0, 0 );
473 +  if (args_info->theta_omega_given)
474 +    write_into_file(outfile, "theta_omega", 0, 0 );
475 +  if (args_info->gxyz_given)
476 +    write_into_file(outfile, "gxyz", 0, 0 );
477 +  if (args_info->twodgofr_given)
478 +    write_into_file(outfile, "twodgofr", 0, 0 );
479 +  if (args_info->p2_given)
480 +    write_into_file(outfile, "p2", 0, 0 );
481 +  if (args_info->rp2_given)
482 +    write_into_file(outfile, "rp2", 0, 0 );
483 +  if (args_info->scd_given)
484 +    write_into_file(outfile, "scd", 0, 0 );
485 +  if (args_info->density_given)
486 +    write_into_file(outfile, "density", 0, 0 );
487 +  if (args_info->slab_density_given)
488 +    write_into_file(outfile, "slab_density", 0, 0 );
489 +  if (args_info->p_angle_given)
490 +    write_into_file(outfile, "p_angle", 0, 0 );
491 +  if (args_info->hxy_given)
492 +    write_into_file(outfile, "hxy", 0, 0 );
493 +  if (args_info->rho_r_given)
494 +    write_into_file(outfile, "rho_r", 0, 0 );
495 +  if (args_info->angle_r_given)
496 +    write_into_file(outfile, "angle_r", 0, 0 );
497 +  if (args_info->hullvol_given)
498 +    write_into_file(outfile, "hullvol", 0, 0 );
499 +  if (args_info->rodlength_given)
500 +    write_into_file(outfile, "rodlength", 0, 0 );
501 +  if (args_info->tet_param_given)
502 +    write_into_file(outfile, "tet_param", 0, 0 );
503 +  
504 +
505 +  i = EXIT_SUCCESS;
506 +  return i;
507 + }
508 +
509 + int
510   cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info)
511   {
512    FILE *outfile;
# Line 386 | Line 520 | cmdline_parser_file_save(const char *filename, struct
520        return EXIT_FAILURE;
521      }
522  
523 <  if (args_info->help_given) {
390 <    fprintf(outfile, "%s\n", "help");
391 <  }
392 <  if (args_info->version_given) {
393 <    fprintf(outfile, "%s\n", "version");
394 <  }
395 <  if (args_info->input_given) {
396 <    if (args_info->input_orig) {
397 <      fprintf(outfile, "%s=\"%s\"\n", "input", args_info->input_orig);
398 <    } else {
399 <      fprintf(outfile, "%s\n", "input");
400 <    }
401 <  }
402 <  if (args_info->output_given) {
403 <    if (args_info->output_orig) {
404 <      fprintf(outfile, "%s=\"%s\"\n", "output", args_info->output_orig);
405 <    } else {
406 <      fprintf(outfile, "%s\n", "output");
407 <    }
408 <  }
409 <  if (args_info->step_given) {
410 <    if (args_info->step_orig) {
411 <      fprintf(outfile, "%s=\"%s\"\n", "step", args_info->step_orig);
412 <    } else {
413 <      fprintf(outfile, "%s\n", "step");
414 <    }
415 <  }
416 <  if (args_info->nbins_given) {
417 <    if (args_info->nbins_orig) {
418 <      fprintf(outfile, "%s=\"%s\"\n", "nbins", args_info->nbins_orig);
419 <    } else {
420 <      fprintf(outfile, "%s\n", "nbins");
421 <    }
422 <  }
423 <  if (args_info->nbins_x_given) {
424 <    if (args_info->nbins_x_orig) {
425 <      fprintf(outfile, "%s=\"%s\"\n", "nbins_x", args_info->nbins_x_orig);
426 <    } else {
427 <      fprintf(outfile, "%s\n", "nbins_x");
428 <    }
429 <  }
430 <  if (args_info->nbins_y_given) {
431 <    if (args_info->nbins_y_orig) {
432 <      fprintf(outfile, "%s=\"%s\"\n", "nbins_y", args_info->nbins_y_orig);
433 <    } else {
434 <      fprintf(outfile, "%s\n", "nbins_y");
435 <    }
436 <  }
437 <  if (args_info->nanglebins_given) {
438 <    if (args_info->nanglebins_orig) {
439 <      fprintf(outfile, "%s=\"%s\"\n", "nanglebins", args_info->nanglebins_orig);
440 <    } else {
441 <      fprintf(outfile, "%s\n", "nanglebins");
442 <    }
443 <  }
444 <  if (args_info->length_given) {
445 <    if (args_info->length_orig) {
446 <      fprintf(outfile, "%s=\"%s\"\n", "length", args_info->length_orig);
447 <    } else {
448 <      fprintf(outfile, "%s\n", "length");
449 <    }
450 <  }
451 <  if (args_info->rcut_given) {
452 <    if (args_info->rcut_orig) {
453 <      fprintf(outfile, "%s=\"%s\"\n", "rcut", args_info->rcut_orig);
454 <    } else {
455 <      fprintf(outfile, "%s\n", "rcut");
456 <    }
457 <  }
458 <  if (args_info->zoffset_given) {
459 <    if (args_info->zoffset_orig) {
460 <      fprintf(outfile, "%s=\"%s\"\n", "zoffset", args_info->zoffset_orig);
461 <    } else {
462 <      fprintf(outfile, "%s\n", "zoffset");
463 <    }
464 <  }
465 <  if (args_info->sele1_given) {
466 <    if (args_info->sele1_orig) {
467 <      fprintf(outfile, "%s=\"%s\"\n", "sele1", args_info->sele1_orig);
468 <    } else {
469 <      fprintf(outfile, "%s\n", "sele1");
470 <    }
471 <  }
472 <  if (args_info->sele2_given) {
473 <    if (args_info->sele2_orig) {
474 <      fprintf(outfile, "%s=\"%s\"\n", "sele2", args_info->sele2_orig);
475 <    } else {
476 <      fprintf(outfile, "%s\n", "sele2");
477 <    }
478 <  }
479 <  if (args_info->sele3_given) {
480 <    if (args_info->sele3_orig) {
481 <      fprintf(outfile, "%s=\"%s\"\n", "sele3", args_info->sele3_orig);
482 <    } else {
483 <      fprintf(outfile, "%s\n", "sele3");
484 <    }
485 <  }
486 <  if (args_info->refsele_given) {
487 <    if (args_info->refsele_orig) {
488 <      fprintf(outfile, "%s=\"%s\"\n", "refsele", args_info->refsele_orig);
489 <    } else {
490 <      fprintf(outfile, "%s\n", "refsele");
491 <    }
492 <  }
493 <  if (args_info->molname_given) {
494 <    if (args_info->molname_orig) {
495 <      fprintf(outfile, "%s=\"%s\"\n", "molname", args_info->molname_orig);
496 <    } else {
497 <      fprintf(outfile, "%s\n", "molname");
498 <    }
499 <  }
500 <  if (args_info->begin_given) {
501 <    if (args_info->begin_orig) {
502 <      fprintf(outfile, "%s=\"%s\"\n", "begin", args_info->begin_orig);
503 <    } else {
504 <      fprintf(outfile, "%s\n", "begin");
505 <    }
506 <  }
507 <  if (args_info->end_given) {
508 <    if (args_info->end_orig) {
509 <      fprintf(outfile, "%s=\"%s\"\n", "end", args_info->end_orig);
510 <    } else {
511 <      fprintf(outfile, "%s\n", "end");
512 <    }
513 <  }
514 <  if (args_info->radius_given) {
515 <    if (args_info->radius_orig) {
516 <      fprintf(outfile, "%s=\"%s\"\n", "radius", args_info->radius_orig);
517 <    } else {
518 <      fprintf(outfile, "%s\n", "radius");
519 <    }
520 <  }
521 <  if (args_info->bo_given) {
522 <    fprintf(outfile, "%s\n", "bo");
523 <  }
524 <  if (args_info->bor_given) {
525 <    fprintf(outfile, "%s\n", "bor");
526 <  }
527 <  if (args_info->gofr_given) {
528 <    fprintf(outfile, "%s\n", "gofr");
529 <  }
530 <  if (args_info->r_theta_given) {
531 <    fprintf(outfile, "%s\n", "r_theta");
532 <  }
533 <  if (args_info->r_omega_given) {
534 <    fprintf(outfile, "%s\n", "r_omega");
535 <  }
536 <  if (args_info->theta_omega_given) {
537 <    fprintf(outfile, "%s\n", "theta_omega");
538 <  }
539 <  if (args_info->gxyz_given) {
540 <    fprintf(outfile, "%s\n", "gxyz");
541 <  }
542 <  if (args_info->p2_given) {
543 <    fprintf(outfile, "%s\n", "p2");
544 <  }
545 <  if (args_info->rp2_given) {
546 <    fprintf(outfile, "%s\n", "rp2");
547 <  }
548 <  if (args_info->scd_given) {
549 <    fprintf(outfile, "%s\n", "scd");
550 <  }
551 <  if (args_info->density_given) {
552 <    fprintf(outfile, "%s\n", "density");
553 <  }
554 <  if (args_info->slab_density_given) {
555 <    fprintf(outfile, "%s\n", "slab_density");
556 <  }
557 <  if (args_info->hxy_given) {
558 <    fprintf(outfile, "%s\n", "hxy");
559 <  }
560 <  if (args_info->rho_r_given) {
561 <    fprintf(outfile, "%s\n", "rho_r");
562 <  }
563 <  
523 >  i = cmdline_parser_dump(outfile, args_info);
524    fclose (outfile);
525  
566  i = EXIT_SUCCESS;
526    return i;
527   }
528  
# Line 573 | Line 532 | cmdline_parser_free (struct gengetopt_args_info *args_
532    cmdline_parser_release (args_info);
533   }
534  
535 <
577 < /* gengetopt_strdup() */
578 < /* strdup.c replacement of strdup, which is not standard */
535 > /** @brief replacement of strdup, which is not standard */
536   char *
537   gengetopt_strdup (const char *s)
538   {
539 <  char *result = NULL;
539 >  char *result = 0;
540    if (!s)
541      return result;
542  
# Line 591 | Line 548 | static void
548   }
549  
550   static void
594 reset_group_staticProps(struct gengetopt_args_info *args_info);
595
596 static void
551   reset_group_staticProps(struct gengetopt_args_info *args_info)
552   {
553    if (! args_info->staticProps_group_counter)
# Line 601 | Line 555 | reset_group_staticProps(struct gengetopt_args_info *ar
555    
556    args_info->bo_given = 0 ;
557    args_info->bor_given = 0 ;
558 +  args_info->bad_given = 0 ;
559 +  args_info->count_given = 0 ;
560    args_info->gofr_given = 0 ;
561 +  args_info->gofz_given = 0 ;
562    args_info->r_theta_given = 0 ;
563    args_info->r_omega_given = 0 ;
564 +  args_info->r_z_given = 0 ;
565    args_info->theta_omega_given = 0 ;
566    args_info->gxyz_given = 0 ;
567 +  args_info->twodgofr_given = 0 ;
568    args_info->p2_given = 0 ;
569    args_info->rp2_given = 0 ;
570    args_info->scd_given = 0 ;
571    args_info->density_given = 0 ;
572    args_info->slab_density_given = 0 ;
573 +  args_info->p_angle_given = 0 ;
574    args_info->hxy_given = 0 ;
575    args_info->rho_r_given = 0 ;
576 +  args_info->angle_r_given = 0 ;
577 +  args_info->hullvol_given = 0 ;
578 +  args_info->rodlength_given = 0 ;
579 +  args_info->tet_param_given = 0 ;
580  
581    args_info->staticProps_group_counter = 0;
582   }
583  
584   int
585 < cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info)
585 > cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info)
586   {
587    return cmdline_parser2 (argc, argv, args_info, 0, 1, 1);
588   }
589  
590   int
591 < cmdline_parser2 (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
591 > cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info,
592 >                   struct cmdline_parser_params *params)
593   {
594    int result;
595 +  result = cmdline_parser_internal (argc, argv, args_info, params, 0);
596  
597 <  result = cmdline_parser_internal (argc, argv, args_info, override, initialize, check_required, NULL);
597 >  if (result == EXIT_FAILURE)
598 >    {
599 >      cmdline_parser_free (args_info);
600 >      exit (EXIT_FAILURE);
601 >    }
602 >  
603 >  return result;
604 > }
605  
606 + int
607 + cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
608 + {
609 +  int result;
610 +  struct cmdline_parser_params params;
611 +  
612 +  params.override = override;
613 +  params.initialize = initialize;
614 +  params.check_required = check_required;
615 +  params.check_ambiguity = 0;
616 +  params.print_errors = 1;
617 +
618 +  result = cmdline_parser_internal (argc, argv, args_info, &params, 0);
619 +
620    if (result == EXIT_FAILURE)
621      {
622        cmdline_parser_free (args_info);
# Line 644 | Line 631 | cmdline_parser_required (struct gengetopt_args_info *a
631   {
632    int result = EXIT_SUCCESS;
633  
634 <  if (cmdline_parser_required2(args_info, prog_name, NULL) > 0)
634 >  if (cmdline_parser_required2(args_info, prog_name, 0) > 0)
635      result = EXIT_FAILURE;
636  
637    if (result == EXIT_FAILURE)
# Line 660 | Line 647 | cmdline_parser_required2 (struct gengetopt_args_info *
647   cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error)
648   {
649    int error = 0;
650 +  FIX_UNUSED (additional_error);
651  
652    /* checks for required options */
653    if (! args_info->input_given)
# Line 670 | Line 658 | cmdline_parser_required2 (struct gengetopt_args_info *
658    
659    if (args_info->staticProps_group_counter == 0)
660      {
661 <      fprintf (stderr, "%s: %d options of group staticProps were given. One is required.%s\n", prog_name, args_info->staticProps_group_counter, (additional_error ? additional_error : ""));
661 >      fprintf (stderr, "%s: %d options of group staticProps were given. One is required%s.\n", prog_name, args_info->staticProps_group_counter, (additional_error ? additional_error : ""));
662        error = 1;
663      }
664    
# Line 678 | Line 666 | cmdline_parser_required2 (struct gengetopt_args_info *
666    /* checks for dependences among options */
667  
668    return error;
669 + }
670 +
671 +
672 + static char *package_name = 0;
673 +
674 + /**
675 + * @brief updates an option
676 + * @param field the generic pointer to the field to update
677 + * @param orig_field the pointer to the orig field
678 + * @param field_given the pointer to the number of occurrence of this option
679 + * @param prev_given the pointer to the number of occurrence already seen
680 + * @param value the argument for this option (if null no arg was specified)
681 + * @param possible_values the possible values for this option (if specified)
682 + * @param default_value the default value (in case the option only accepts fixed values)
683 + * @param arg_type the type of this option
684 + * @param check_ambiguity @see cmdline_parser_params.check_ambiguity
685 + * @param override @see cmdline_parser_params.override
686 + * @param no_free whether to free a possible previous value
687 + * @param multiple_option whether this is a multiple option
688 + * @param long_opt the corresponding long option
689 + * @param short_opt the corresponding short option (or '-' if none)
690 + * @param additional_error possible further error specification
691 + */
692 + static
693 + int update_arg(void *field, char **orig_field,
694 +               unsigned int *field_given, unsigned int *prev_given,
695 +               char *value, const char *possible_values[],
696 +               const char *default_value,
697 +               cmdline_parser_arg_type arg_type,
698 +               int check_ambiguity, int override,
699 +               int no_free, int multiple_option,
700 +               const char *long_opt, char short_opt,
701 +               const char *additional_error)
702 + {
703 +  char *stop_char = 0;
704 +  const char *val = value;
705 +  int found;
706 +  char **string_field;
707 +  FIX_UNUSED (field);
708 +
709 +  stop_char = 0;
710 +  found = 0;
711 +
712 +  if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given)))
713 +    {
714 +      if (short_opt != '-')
715 +        fprintf (stderr, "%s: `--%s' (`-%c') option given more than once%s\n",
716 +               package_name, long_opt, short_opt,
717 +               (additional_error ? additional_error : ""));
718 +      else
719 +        fprintf (stderr, "%s: `--%s' option given more than once%s\n",
720 +               package_name, long_opt,
721 +               (additional_error ? additional_error : ""));
722 +      return 1; /* failure */
723 +    }
724 +
725 +  FIX_UNUSED (default_value);
726 +    
727 +  if (field_given && *field_given && ! override)
728 +    return 0;
729 +  if (prev_given)
730 +    (*prev_given)++;
731 +  if (field_given)
732 +    (*field_given)++;
733 +  if (possible_values)
734 +    val = possible_values[found];
735 +
736 +  switch(arg_type) {
737 +  case ARG_INT:
738 +    if (val) *((int *)field) = strtol (val, &stop_char, 0);
739 +    break;
740 +  case ARG_DOUBLE:
741 +    if (val) *((double *)field) = strtod (val, &stop_char);
742 +    break;
743 +  case ARG_STRING:
744 +    if (val) {
745 +      string_field = (char **)field;
746 +      if (!no_free && *string_field)
747 +        free (*string_field); /* free previous string */
748 +      *string_field = gengetopt_strdup (val);
749 +    }
750 +    break;
751 +  default:
752 +    break;
753 +  };
754 +
755 +  /* check numeric conversion */
756 +  switch(arg_type) {
757 +  case ARG_INT:
758 +  case ARG_DOUBLE:
759 +    if (val && !(stop_char && *stop_char == '\0')) {
760 +      fprintf(stderr, "%s: invalid numeric value: %s\n", package_name, val);
761 +      return 1; /* failure */
762 +    }
763 +    break;
764 +  default:
765 +    ;
766 +  };
767 +
768 +  /* store the original value */
769 +  switch(arg_type) {
770 +  case ARG_NO:
771 +    break;
772 +  default:
773 +    if (value && orig_field) {
774 +      if (no_free) {
775 +        *orig_field = value;
776 +      } else {
777 +        if (*orig_field)
778 +          free (*orig_field); /* free previous string */
779 +        *orig_field = gengetopt_strdup (value);
780 +      }
781 +    }
782 +  };
783 +
784 +  return 0; /* OK */
785   }
786  
787 +
788   int
789 < cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required, const char *additional_error)
789 > cmdline_parser_internal (
790 >  int argc, char **argv, struct gengetopt_args_info *args_info,
791 >                        struct cmdline_parser_params *params, const char *additional_error)
792   {
793    int c;        /* Character of the parsed option.  */
794  
795    int error = 0;
796    struct gengetopt_args_info local_args_info;
797 +  
798 +  int override;
799 +  int initialize;
800 +  int check_required;
801 +  int check_ambiguity;
802 +  
803 +  package_name = argv[0];
804 +  
805 +  override = params->override;
806 +  initialize = params->initialize;
807 +  check_required = params->check_required;
808 +  check_ambiguity = params->check_ambiguity;
809  
810    if (initialize)
811      cmdline_parser_init (args_info);
# Line 695 | Line 814 | cmdline_parser_internal (int argc, char * const *argv,
814  
815    optarg = 0;
816    optind = 0;
817 <  opterr = 1;
817 >  opterr = params->print_errors;
818    optopt = '?';
819  
820    while (1)
821      {
822        int option_index = 0;
704      char *stop_char;
823  
824        static struct option long_options[] = {
825          { "help",       0, NULL, 'h' },
# Line 712 | Line 830 | cmdline_parser_internal (int argc, char * const *argv,
830          { "nbins",      1, NULL, 'b' },
831          { "nbins_x",    1, NULL, 'x' },
832          { "nbins_y",    1, NULL, 'y' },
833 +        { "nbins_z",    1, NULL, 0 },
834          { "nanglebins", 1, NULL, 'a' },
716        { "length",     1, NULL, 0 },
835          { "rcut",       1, NULL, 'c' },
836 +        { "dz", 1, NULL, 0 },
837 +        { "length",     1, NULL, 0 },
838 +        { "zlength",    1, NULL, 0 },
839          { "zoffset",    1, NULL, 'z' },
840          { "sele1",      1, NULL, 0 },
841          { "sele2",      1, NULL, 0 },
842          { "sele3",      1, NULL, 0 },
843          { "refsele",    1, NULL, 0 },
844 +        { "comsele",    1, NULL, 0 },
845          { "molname",    1, NULL, 0 },
846          { "begin",      1, NULL, 0 },
847          { "end",        1, NULL, 0 },
848          { "radius",     1, NULL, 0 },
849          { "bo", 0, NULL, 0 },
850          { "bor",        0, NULL, 0 },
851 +        { "bad",        0, NULL, 0 },
852 +        { "count",      0, NULL, 0 },
853          { "gofr",       0, NULL, 'g' },
854 +        { "gofz",       0, NULL, 0 },
855          { "r_theta",    0, NULL, 0 },
856          { "r_omega",    0, NULL, 0 },
857 +        { "r_z",        0, NULL, 0 },
858          { "theta_omega",        0, NULL, 0 },
859          { "gxyz",       0, NULL, 0 },
860 +        { "twodgofr",   0, NULL, 0 },
861          { "p2", 0, NULL, 'p' },
862          { "rp2",        0, NULL, 0 },
863          { "scd",        0, NULL, 's' },
864          { "density",    0, NULL, 'd' },
865          { "slab_density",       0, NULL, 0 },
866 +        { "p_angle",    0, NULL, 0 },
867          { "hxy",        0, NULL, 0 },
868          { "rho_r",      0, NULL, 0 },
869 <        { NULL, 0, NULL, 0 }
869 >        { "angle_r",    0, NULL, 0 },
870 >        { "hullvol",    0, NULL, 0 },
871 >        { "rodlength",  0, NULL, 0 },
872 >        { "tet_param",  0, NULL, 'Q' },
873 >        { 0,  0, 0, 0 }
874        };
875  
876 <      stop_char = 0;
745 <      c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsd", long_options, &option_index);
876 >      c = getopt_long (argc, argv, "hVi:o:n:b:x:y:a:c:z:gpsdQ", long_options, &option_index);
877  
878        if (c == -1) break;       /* Exit from `while (1)' loop.  */
879  
# Line 759 | Line 890 | cmdline_parser_internal (int argc, char * const *argv,
890            exit (EXIT_SUCCESS);
891  
892          case 'i':       /* input dump file.  */
893 <          if (local_args_info.input_given)
894 <            {
895 <              fprintf (stderr, "%s: `--input' (`-i') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
896 <              goto failure;
897 <            }
898 <          if (args_info->input_given && ! override)
899 <            continue;
900 <          local_args_info.input_given = 1;
901 <          args_info->input_given = 1;
902 <          if (args_info->input_arg)
772 <            free (args_info->input_arg); /* free previous string */
773 <          args_info->input_arg = gengetopt_strdup (optarg);
774 <          if (args_info->input_orig)
775 <            free (args_info->input_orig); /* free previous string */
776 <          args_info->input_orig = gengetopt_strdup (optarg);
893 >        
894 >        
895 >          if (update_arg( (void *)&(args_info->input_arg),
896 >               &(args_info->input_orig), &(args_info->input_given),
897 >              &(local_args_info.input_given), optarg, 0, 0, ARG_STRING,
898 >              check_ambiguity, override, 0, 0,
899 >              "input", 'i',
900 >              additional_error))
901 >            goto failure;
902 >        
903            break;
778
904          case 'o':       /* output file name.  */
905 <          if (local_args_info.output_given)
906 <            {
907 <              fprintf (stderr, "%s: `--output' (`-o') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
908 <              goto failure;
909 <            }
910 <          if (args_info->output_given && ! override)
911 <            continue;
912 <          local_args_info.output_given = 1;
913 <          args_info->output_given = 1;
914 <          if (args_info->output_arg)
790 <            free (args_info->output_arg); /* free previous string */
791 <          args_info->output_arg = gengetopt_strdup (optarg);
792 <          if (args_info->output_orig)
793 <            free (args_info->output_orig); /* free previous string */
794 <          args_info->output_orig = gengetopt_strdup (optarg);
905 >        
906 >        
907 >          if (update_arg( (void *)&(args_info->output_arg),
908 >               &(args_info->output_orig), &(args_info->output_given),
909 >              &(local_args_info.output_given), optarg, 0, 0, ARG_STRING,
910 >              check_ambiguity, override, 0, 0,
911 >              "output", 'o',
912 >              additional_error))
913 >            goto failure;
914 >        
915            break;
796
916          case 'n':       /* process every n frame.  */
917 <          if (local_args_info.step_given)
918 <            {
919 <              fprintf (stderr, "%s: `--step' (`-n') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
920 <              goto failure;
921 <            }
922 <          if (args_info->step_given && ! override)
923 <            continue;
924 <          local_args_info.step_given = 1;
806 <          args_info->step_given = 1;
807 <          args_info->step_arg = strtol (optarg, &stop_char, 0);
808 <          if (!(stop_char && *stop_char == '\0')) {
809 <            fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
917 >        
918 >        
919 >          if (update_arg( (void *)&(args_info->step_arg),
920 >               &(args_info->step_orig), &(args_info->step_given),
921 >              &(local_args_info.step_given), optarg, 0, "1", ARG_INT,
922 >              check_ambiguity, override, 0, 0,
923 >              "step", 'n',
924 >              additional_error))
925              goto failure;
926 <          }
812 <          if (args_info->step_orig)
813 <            free (args_info->step_orig); /* free previous string */
814 <          args_info->step_orig = gengetopt_strdup (optarg);
926 >        
927            break;
816
928          case 'b':       /* number of bins (general purpose).  */
929 <          if (local_args_info.nbins_given)
930 <            {
931 <              fprintf (stderr, "%s: `--nbins' (`-b') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
932 <              goto failure;
933 <            }
934 <          if (args_info->nbins_given && ! override)
935 <            continue;
936 <          local_args_info.nbins_given = 1;
826 <          args_info->nbins_given = 1;
827 <          args_info->nbins_arg = strtol (optarg, &stop_char, 0);
828 <          if (!(stop_char && *stop_char == '\0')) {
829 <            fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
929 >        
930 >        
931 >          if (update_arg( (void *)&(args_info->nbins_arg),
932 >               &(args_info->nbins_orig), &(args_info->nbins_given),
933 >              &(local_args_info.nbins_given), optarg, 0, "100", ARG_INT,
934 >              check_ambiguity, override, 0, 0,
935 >              "nbins", 'b',
936 >              additional_error))
937              goto failure;
938 <          }
832 <          if (args_info->nbins_orig)
833 <            free (args_info->nbins_orig); /* free previous string */
834 <          args_info->nbins_orig = gengetopt_strdup (optarg);
938 >        
939            break;
836
940          case 'x':       /* number of bins in x axis.  */
941 <          if (local_args_info.nbins_x_given)
942 <            {
943 <              fprintf (stderr, "%s: `--nbins_x' (`-x') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
944 <              goto failure;
945 <            }
946 <          if (args_info->nbins_x_given && ! override)
947 <            continue;
948 <          local_args_info.nbins_x_given = 1;
846 <          args_info->nbins_x_given = 1;
847 <          args_info->nbins_x_arg = strtol (optarg, &stop_char, 0);
848 <          if (!(stop_char && *stop_char == '\0')) {
849 <            fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
941 >        
942 >        
943 >          if (update_arg( (void *)&(args_info->nbins_x_arg),
944 >               &(args_info->nbins_x_orig), &(args_info->nbins_x_given),
945 >              &(local_args_info.nbins_x_given), optarg, 0, "100", ARG_INT,
946 >              check_ambiguity, override, 0, 0,
947 >              "nbins_x", 'x',
948 >              additional_error))
949              goto failure;
950 <          }
852 <          if (args_info->nbins_x_orig)
853 <            free (args_info->nbins_x_orig); /* free previous string */
854 <          args_info->nbins_x_orig = gengetopt_strdup (optarg);
950 >        
951            break;
856
952          case 'y':       /* number of bins in y axis.  */
953 <          if (local_args_info.nbins_y_given)
954 <            {
955 <              fprintf (stderr, "%s: `--nbins_y' (`-y') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
956 <              goto failure;
957 <            }
958 <          if (args_info->nbins_y_given && ! override)
959 <            continue;
960 <          local_args_info.nbins_y_given = 1;
866 <          args_info->nbins_y_given = 1;
867 <          args_info->nbins_y_arg = strtol (optarg, &stop_char, 0);
868 <          if (!(stop_char && *stop_char == '\0')) {
869 <            fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
953 >        
954 >        
955 >          if (update_arg( (void *)&(args_info->nbins_y_arg),
956 >               &(args_info->nbins_y_orig), &(args_info->nbins_y_given),
957 >              &(local_args_info.nbins_y_given), optarg, 0, "100", ARG_INT,
958 >              check_ambiguity, override, 0, 0,
959 >              "nbins_y", 'y',
960 >              additional_error))
961              goto failure;
962 <          }
872 <          if (args_info->nbins_y_orig)
873 <            free (args_info->nbins_y_orig); /* free previous string */
874 <          args_info->nbins_y_orig = gengetopt_strdup (optarg);
962 >        
963            break;
876
964          case 'a':       /* number of bins for cos(angle).  */
965 <          if (local_args_info.nanglebins_given)
966 <            {
967 <              fprintf (stderr, "%s: `--nanglebins' (`-a') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
968 <              goto failure;
969 <            }
970 <          if (args_info->nanglebins_given && ! override)
971 <            continue;
972 <          local_args_info.nanglebins_given = 1;
886 <          args_info->nanglebins_given = 1;
887 <          args_info->nanglebins_arg = strtol (optarg, &stop_char, 0);
888 <          if (!(stop_char && *stop_char == '\0')) {
889 <            fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
965 >        
966 >        
967 >          if (update_arg( (void *)&(args_info->nanglebins_arg),
968 >               &(args_info->nanglebins_orig), &(args_info->nanglebins_given),
969 >              &(local_args_info.nanglebins_given), optarg, 0, "50", ARG_INT,
970 >              check_ambiguity, override, 0, 0,
971 >              "nanglebins", 'a',
972 >              additional_error))
973              goto failure;
974 <          }
892 <          if (args_info->nanglebins_orig)
893 <            free (args_info->nanglebins_orig); /* free previous string */
894 <          args_info->nanglebins_orig = gengetopt_strdup (optarg);
974 >        
975            break;
896
976          case 'c':       /* cutoff radius (rcut).  */
977 <          if (local_args_info.rcut_given)
978 <            {
979 <              fprintf (stderr, "%s: `--rcut' (`-c') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
980 <              goto failure;
981 <            }
982 <          if (args_info->rcut_given && ! override)
983 <            continue;
984 <          local_args_info.rcut_given = 1;
906 <          args_info->rcut_given = 1;
907 <          args_info->rcut_arg = strtod (optarg, &stop_char);
908 <          if (!(stop_char && *stop_char == '\0')) {
909 <            fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
977 >        
978 >        
979 >          if (update_arg( (void *)&(args_info->rcut_arg),
980 >               &(args_info->rcut_orig), &(args_info->rcut_given),
981 >              &(local_args_info.rcut_given), optarg, 0, 0, ARG_DOUBLE,
982 >              check_ambiguity, override, 0, 0,
983 >              "rcut", 'c',
984 >              additional_error))
985              goto failure;
986 <          }
912 <          if (args_info->rcut_orig)
913 <            free (args_info->rcut_orig); /* free previous string */
914 <          args_info->rcut_orig = gengetopt_strdup (optarg);
986 >        
987            break;
916
988          case 'z':       /* Where to set the zero for the slab_density calculation.  */
989 <          if (local_args_info.zoffset_given)
990 <            {
991 <              fprintf (stderr, "%s: `--zoffset' (`-z') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
992 <              goto failure;
993 <            }
994 <          if (args_info->zoffset_given && ! override)
995 <            continue;
996 <          local_args_info.zoffset_given = 1;
926 <          args_info->zoffset_given = 1;
927 <          args_info->zoffset_arg = strtod (optarg, &stop_char);
928 <          if (!(stop_char && *stop_char == '\0')) {
929 <            fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
989 >        
990 >        
991 >          if (update_arg( (void *)&(args_info->zoffset_arg),
992 >               &(args_info->zoffset_orig), &(args_info->zoffset_given),
993 >              &(local_args_info.zoffset_given), optarg, 0, "0", ARG_DOUBLE,
994 >              check_ambiguity, override, 0, 0,
995 >              "zoffset", 'z',
996 >              additional_error))
997              goto failure;
998 <          }
932 <          if (args_info->zoffset_orig)
933 <            free (args_info->zoffset_orig); /* free previous string */
934 <          args_info->zoffset_orig = gengetopt_strdup (optarg);
998 >        
999            break;
936
1000          case 'g':       /* g(r).  */
1001 <          if (local_args_info.gofr_given)
939 <            {
940 <              fprintf (stderr, "%s: `--gofr' (`-g') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
941 <              goto failure;
942 <            }
943 <          if (args_info->gofr_given && ! override)
944 <            continue;
945 <          local_args_info.gofr_given = 1;
946 <          args_info->gofr_given = 1;
1001 >        
1002            if (args_info->staticProps_group_counter && override)
1003              reset_group_staticProps (args_info);
1004            args_info->staticProps_group_counter += 1;
1005 +        
1006 +          if (update_arg( 0 ,
1007 +               0 , &(args_info->gofr_given),
1008 +              &(local_args_info.gofr_given), optarg, 0, 0, ARG_NO,
1009 +              check_ambiguity, override, 0, 0,
1010 +              "gofr", 'g',
1011 +              additional_error))
1012 +            goto failure;
1013 +        
1014            break;
1015 <
1016 <        case 'p':       /* p2 order parameter (--sele1 and --sele2 must be specified).  */
953 <          if (local_args_info.p2_given)
954 <            {
955 <              fprintf (stderr, "%s: `--p2' (`-p') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
956 <              goto failure;
957 <            }
958 <          if (args_info->p2_given && ! override)
959 <            continue;
960 <          local_args_info.p2_given = 1;
961 <          args_info->p2_given = 1;
1015 >        case 'p':       /* p2 order parameter (--sele1 must be specified, --sele2 is optional).  */
1016 >        
1017            if (args_info->staticProps_group_counter && override)
1018              reset_group_staticProps (args_info);
1019            args_info->staticProps_group_counter += 1;
1020 +        
1021 +          if (update_arg( 0 ,
1022 +               0 , &(args_info->p2_given),
1023 +              &(local_args_info.p2_given), optarg, 0, 0, ARG_NO,
1024 +              check_ambiguity, override, 0, 0,
1025 +              "p2", 'p',
1026 +              additional_error))
1027 +            goto failure;
1028 +        
1029            break;
966
1030          case 's':       /* scd order parameter (either --sele1, --sele2, --sele3 are specified or --molname, --begin, --end are specified).  */
1031 <          if (local_args_info.scd_given)
969 <            {
970 <              fprintf (stderr, "%s: `--scd' (`-s') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
971 <              goto failure;
972 <            }
973 <          if (args_info->scd_given && ! override)
974 <            continue;
975 <          local_args_info.scd_given = 1;
976 <          args_info->scd_given = 1;
1031 >        
1032            if (args_info->staticProps_group_counter && override)
1033              reset_group_staticProps (args_info);
1034            args_info->staticProps_group_counter += 1;
1035 +        
1036 +          if (update_arg( 0 ,
1037 +               0 , &(args_info->scd_given),
1038 +              &(local_args_info.scd_given), optarg, 0, 0, ARG_NO,
1039 +              check_ambiguity, override, 0, 0,
1040 +              "scd", 's',
1041 +              additional_error))
1042 +            goto failure;
1043 +        
1044            break;
981
1045          case 'd':       /* density plot.  */
1046 <          if (local_args_info.density_given)
984 <            {
985 <              fprintf (stderr, "%s: `--density' (`-d') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
986 <              goto failure;
987 <            }
988 <          if (args_info->density_given && ! override)
989 <            continue;
990 <          local_args_info.density_given = 1;
991 <          args_info->density_given = 1;
1046 >        
1047            if (args_info->staticProps_group_counter && override)
1048              reset_group_staticProps (args_info);
1049            args_info->staticProps_group_counter += 1;
1050 +        
1051 +          if (update_arg( 0 ,
1052 +               0 , &(args_info->density_given),
1053 +              &(local_args_info.density_given), optarg, 0, 0, ARG_NO,
1054 +              check_ambiguity, override, 0, 0,
1055 +              "density", 'd',
1056 +              additional_error))
1057 +            goto failure;
1058 +        
1059            break;
1060 +        case 'Q':       /* tetrahedrality order parameter.  */
1061 +        
1062 +          if (args_info->staticProps_group_counter && override)
1063 +            reset_group_staticProps (args_info);
1064 +          args_info->staticProps_group_counter += 1;
1065 +        
1066 +          if (update_arg( 0 ,
1067 +               0 , &(args_info->tet_param_given),
1068 +              &(local_args_info.tet_param_given), optarg, 0, 0, ARG_NO,
1069 +              check_ambiguity, override, 0, 0,
1070 +              "tet_param", 'Q',
1071 +              additional_error))
1072 +            goto failure;
1073 +        
1074 +          break;
1075  
997
1076          case 0: /* Long option with no short option */
1077 +          /* number of bins in z axis.  */
1078 +          if (strcmp (long_options[option_index].name, "nbins_z") == 0)
1079 +          {
1080 +          
1081 +          
1082 +            if (update_arg( (void *)&(args_info->nbins_z_arg),
1083 +                 &(args_info->nbins_z_orig), &(args_info->nbins_z_given),
1084 +                &(local_args_info.nbins_z_given), optarg, 0, "100", ARG_INT,
1085 +                check_ambiguity, override, 0, 0,
1086 +                "nbins_z", '-',
1087 +                additional_error))
1088 +              goto failure;
1089 +          
1090 +          }
1091 +          /* slab width (dz).  */
1092 +          else if (strcmp (long_options[option_index].name, "dz") == 0)
1093 +          {
1094 +          
1095 +          
1096 +            if (update_arg( (void *)&(args_info->dz_arg),
1097 +                 &(args_info->dz_orig), &(args_info->dz_given),
1098 +                &(local_args_info.dz_given), optarg, 0, 0, ARG_DOUBLE,
1099 +                check_ambiguity, override, 0, 0,
1100 +                "dz", '-',
1101 +                additional_error))
1102 +              goto failure;
1103 +          
1104 +          }
1105            /* maximum length (Defaults to 1/2 smallest length of first frame).  */
1106 <          if (strcmp (long_options[option_index].name, "length") == 0)
1106 >          else if (strcmp (long_options[option_index].name, "length") == 0)
1107            {
1108 <            if (local_args_info.length_given)
1109 <              {
1110 <                fprintf (stderr, "%s: `--length' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1111 <                goto failure;
1112 <              }
1113 <            if (args_info->length_given && ! override)
1114 <              continue;
1115 <            local_args_info.length_given = 1;
1010 <            args_info->length_given = 1;
1011 <            args_info->length_arg = strtod (optarg, &stop_char);
1012 <            if (!(stop_char && *stop_char == '\0')) {
1013 <              fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
1108 >          
1109 >          
1110 >            if (update_arg( (void *)&(args_info->length_arg),
1111 >                 &(args_info->length_orig), &(args_info->length_given),
1112 >                &(local_args_info.length_given), optarg, 0, 0, ARG_DOUBLE,
1113 >                check_ambiguity, override, 0, 0,
1114 >                "length", '-',
1115 >                additional_error))
1116                goto failure;
1117 <            }
1016 <            if (args_info->length_orig)
1017 <              free (args_info->length_orig); /* free previous string */
1018 <            args_info->length_orig = gengetopt_strdup (optarg);
1117 >          
1118            }
1119 +          /* maximum length (Defaults to 1/2 smallest length of first frame).  */
1120 +          else if (strcmp (long_options[option_index].name, "zlength") == 0)
1121 +          {
1122 +          
1123 +          
1124 +            if (update_arg( (void *)&(args_info->zlength_arg),
1125 +                 &(args_info->zlength_orig), &(args_info->zlength_given),
1126 +                &(local_args_info.zlength_given), optarg, 0, 0, ARG_DOUBLE,
1127 +                check_ambiguity, override, 0, 0,
1128 +                "zlength", '-',
1129 +                additional_error))
1130 +              goto failure;
1131 +          
1132 +          }
1133            /* select the first stuntdouble set.  */
1134            else if (strcmp (long_options[option_index].name, "sele1") == 0)
1135            {
1136 <            if (local_args_info.sele1_given)
1137 <              {
1138 <                fprintf (stderr, "%s: `--sele1' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1139 <                goto failure;
1140 <              }
1141 <            if (args_info->sele1_given && ! override)
1142 <              continue;
1143 <            local_args_info.sele1_given = 1;
1144 <            args_info->sele1_given = 1;
1145 <            if (args_info->sele1_arg)
1033 <              free (args_info->sele1_arg); /* free previous string */
1034 <            args_info->sele1_arg = gengetopt_strdup (optarg);
1035 <            if (args_info->sele1_orig)
1036 <              free (args_info->sele1_orig); /* free previous string */
1037 <            args_info->sele1_orig = gengetopt_strdup (optarg);
1136 >          
1137 >          
1138 >            if (update_arg( (void *)&(args_info->sele1_arg),
1139 >                 &(args_info->sele1_orig), &(args_info->sele1_given),
1140 >                &(local_args_info.sele1_given), optarg, 0, 0, ARG_STRING,
1141 >                check_ambiguity, override, 0, 0,
1142 >                "sele1", '-',
1143 >                additional_error))
1144 >              goto failure;
1145 >          
1146            }
1147            /* select the second stuntdouble set.  */
1148            else if (strcmp (long_options[option_index].name, "sele2") == 0)
1149            {
1150 <            if (local_args_info.sele2_given)
1151 <              {
1152 <                fprintf (stderr, "%s: `--sele2' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1153 <                goto failure;
1154 <              }
1155 <            if (args_info->sele2_given && ! override)
1156 <              continue;
1157 <            local_args_info.sele2_given = 1;
1158 <            args_info->sele2_given = 1;
1159 <            if (args_info->sele2_arg)
1052 <              free (args_info->sele2_arg); /* free previous string */
1053 <            args_info->sele2_arg = gengetopt_strdup (optarg);
1054 <            if (args_info->sele2_orig)
1055 <              free (args_info->sele2_orig); /* free previous string */
1056 <            args_info->sele2_orig = gengetopt_strdup (optarg);
1150 >          
1151 >          
1152 >            if (update_arg( (void *)&(args_info->sele2_arg),
1153 >                 &(args_info->sele2_orig), &(args_info->sele2_given),
1154 >                &(local_args_info.sele2_given), optarg, 0, 0, ARG_STRING,
1155 >                check_ambiguity, override, 0, 0,
1156 >                "sele2", '-',
1157 >                additional_error))
1158 >              goto failure;
1159 >          
1160            }
1161            /* select the third stuntdouble set.  */
1162            else if (strcmp (long_options[option_index].name, "sele3") == 0)
1163            {
1164 <            if (local_args_info.sele3_given)
1165 <              {
1166 <                fprintf (stderr, "%s: `--sele3' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1167 <                goto failure;
1168 <              }
1169 <            if (args_info->sele3_given && ! override)
1170 <              continue;
1171 <            local_args_info.sele3_given = 1;
1172 <            args_info->sele3_given = 1;
1173 <            if (args_info->sele3_arg)
1071 <              free (args_info->sele3_arg); /* free previous string */
1072 <            args_info->sele3_arg = gengetopt_strdup (optarg);
1073 <            if (args_info->sele3_orig)
1074 <              free (args_info->sele3_orig); /* free previous string */
1075 <            args_info->sele3_orig = gengetopt_strdup (optarg);
1164 >          
1165 >          
1166 >            if (update_arg( (void *)&(args_info->sele3_arg),
1167 >                 &(args_info->sele3_orig), &(args_info->sele3_given),
1168 >                &(local_args_info.sele3_given), optarg, 0, 0, ARG_STRING,
1169 >                check_ambiguity, override, 0, 0,
1170 >                "sele3", '-',
1171 >                additional_error))
1172 >              goto failure;
1173 >          
1174            }
1175            /* select reference (use and only use with --gxyz).  */
1176            else if (strcmp (long_options[option_index].name, "refsele") == 0)
1177            {
1178 <            if (local_args_info.refsele_given)
1179 <              {
1180 <                fprintf (stderr, "%s: `--refsele' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1181 <                goto failure;
1182 <              }
1183 <            if (args_info->refsele_given && ! override)
1184 <              continue;
1185 <            local_args_info.refsele_given = 1;
1186 <            args_info->refsele_given = 1;
1187 <            if (args_info->refsele_arg)
1090 <              free (args_info->refsele_arg); /* free previous string */
1091 <            args_info->refsele_arg = gengetopt_strdup (optarg);
1092 <            if (args_info->refsele_orig)
1093 <              free (args_info->refsele_orig); /* free previous string */
1094 <            args_info->refsele_orig = gengetopt_strdup (optarg);
1178 >          
1179 >          
1180 >            if (update_arg( (void *)&(args_info->refsele_arg),
1181 >                 &(args_info->refsele_orig), &(args_info->refsele_given),
1182 >                &(local_args_info.refsele_given), optarg, 0, 0, ARG_STRING,
1183 >                check_ambiguity, override, 0, 0,
1184 >                "refsele", '-',
1185 >                additional_error))
1186 >              goto failure;
1187 >          
1188            }
1189 +          /* select stunt doubles for center-of-mass reference point.  */
1190 +          else if (strcmp (long_options[option_index].name, "comsele") == 0)
1191 +          {
1192 +          
1193 +          
1194 +            if (update_arg( (void *)&(args_info->comsele_arg),
1195 +                 &(args_info->comsele_orig), &(args_info->comsele_given),
1196 +                &(local_args_info.comsele_given), optarg, 0, 0, ARG_STRING,
1197 +                check_ambiguity, override, 0, 0,
1198 +                "comsele", '-',
1199 +                additional_error))
1200 +              goto failure;
1201 +          
1202 +          }
1203            /* molecule name.  */
1204            else if (strcmp (long_options[option_index].name, "molname") == 0)
1205            {
1206 <            if (local_args_info.molname_given)
1207 <              {
1208 <                fprintf (stderr, "%s: `--molname' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1209 <                goto failure;
1210 <              }
1211 <            if (args_info->molname_given && ! override)
1212 <              continue;
1213 <            local_args_info.molname_given = 1;
1214 <            args_info->molname_given = 1;
1215 <            if (args_info->molname_arg)
1109 <              free (args_info->molname_arg); /* free previous string */
1110 <            args_info->molname_arg = gengetopt_strdup (optarg);
1111 <            if (args_info->molname_orig)
1112 <              free (args_info->molname_orig); /* free previous string */
1113 <            args_info->molname_orig = gengetopt_strdup (optarg);
1206 >          
1207 >          
1208 >            if (update_arg( (void *)&(args_info->molname_arg),
1209 >                 &(args_info->molname_orig), &(args_info->molname_given),
1210 >                &(local_args_info.molname_given), optarg, 0, 0, ARG_STRING,
1211 >                check_ambiguity, override, 0, 0,
1212 >                "molname", '-',
1213 >                additional_error))
1214 >              goto failure;
1215 >          
1216            }
1217            /* begin internal index.  */
1218            else if (strcmp (long_options[option_index].name, "begin") == 0)
1219            {
1220 <            if (local_args_info.begin_given)
1221 <              {
1222 <                fprintf (stderr, "%s: `--begin' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1223 <                goto failure;
1224 <              }
1225 <            if (args_info->begin_given && ! override)
1226 <              continue;
1227 <            local_args_info.begin_given = 1;
1126 <            args_info->begin_given = 1;
1127 <            args_info->begin_arg = strtol (optarg, &stop_char, 0);
1128 <            if (!(stop_char && *stop_char == '\0')) {
1129 <              fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
1220 >          
1221 >          
1222 >            if (update_arg( (void *)&(args_info->begin_arg),
1223 >                 &(args_info->begin_orig), &(args_info->begin_given),
1224 >                &(local_args_info.begin_given), optarg, 0, 0, ARG_INT,
1225 >                check_ambiguity, override, 0, 0,
1226 >                "begin", '-',
1227 >                additional_error))
1228                goto failure;
1229 <            }
1132 <            if (args_info->begin_orig)
1133 <              free (args_info->begin_orig); /* free previous string */
1134 <            args_info->begin_orig = gengetopt_strdup (optarg);
1229 >          
1230            }
1231            /* end internal index.  */
1232            else if (strcmp (long_options[option_index].name, "end") == 0)
1233            {
1234 <            if (local_args_info.end_given)
1235 <              {
1236 <                fprintf (stderr, "%s: `--end' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1237 <                goto failure;
1238 <              }
1239 <            if (args_info->end_given && ! override)
1240 <              continue;
1241 <            local_args_info.end_given = 1;
1147 <            args_info->end_given = 1;
1148 <            args_info->end_arg = strtol (optarg, &stop_char, 0);
1149 <            if (!(stop_char && *stop_char == '\0')) {
1150 <              fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
1234 >          
1235 >          
1236 >            if (update_arg( (void *)&(args_info->end_arg),
1237 >                 &(args_info->end_orig), &(args_info->end_given),
1238 >                &(local_args_info.end_given), optarg, 0, 0, ARG_INT,
1239 >                check_ambiguity, override, 0, 0,
1240 >                "end", '-',
1241 >                additional_error))
1242                goto failure;
1243 <            }
1153 <            if (args_info->end_orig)
1154 <              free (args_info->end_orig); /* free previous string */
1155 <            args_info->end_orig = gengetopt_strdup (optarg);
1243 >          
1244            }
1245            /* nanoparticle radius.  */
1246            else if (strcmp (long_options[option_index].name, "radius") == 0)
1247            {
1248 <            if (local_args_info.radius_given)
1249 <              {
1250 <                fprintf (stderr, "%s: `--radius' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1251 <                goto failure;
1252 <              }
1253 <            if (args_info->radius_given && ! override)
1254 <              continue;
1255 <            local_args_info.radius_given = 1;
1168 <            args_info->radius_given = 1;
1169 <            args_info->radius_arg = strtod (optarg, &stop_char);
1170 <            if (!(stop_char && *stop_char == '\0')) {
1171 <              fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
1248 >          
1249 >          
1250 >            if (update_arg( (void *)&(args_info->radius_arg),
1251 >                 &(args_info->radius_orig), &(args_info->radius_given),
1252 >                &(local_args_info.radius_given), optarg, 0, 0, ARG_DOUBLE,
1253 >                check_ambiguity, override, 0, 0,
1254 >                "radius", '-',
1255 >                additional_error))
1256                goto failure;
1257 <            }
1174 <            if (args_info->radius_orig)
1175 <              free (args_info->radius_orig); /* free previous string */
1176 <            args_info->radius_orig = gengetopt_strdup (optarg);
1257 >          
1258            }
1259            /* bond order parameter (--rcut must be specified).  */
1260            else if (strcmp (long_options[option_index].name, "bo") == 0)
1261            {
1262 <            if (local_args_info.bo_given)
1182 <              {
1183 <                fprintf (stderr, "%s: `--bo' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1184 <                goto failure;
1185 <              }
1186 <            if (args_info->bo_given && ! override)
1187 <              continue;
1188 <            local_args_info.bo_given = 1;
1189 <            args_info->bo_given = 1;
1262 >          
1263              if (args_info->staticProps_group_counter && override)
1264                reset_group_staticProps (args_info);
1265              args_info->staticProps_group_counter += 1;
1266 <            break;
1266 >          
1267 >            if (update_arg( 0 ,
1268 >                 0 , &(args_info->bo_given),
1269 >                &(local_args_info.bo_given), optarg, 0, 0, ARG_NO,
1270 >                check_ambiguity, override, 0, 0,
1271 >                "bo", '-',
1272 >                additional_error))
1273 >              goto failure;
1274 >          
1275            }
1276            /* bond order parameter as a function of radius (--rcut must be specified).  */
1277            else if (strcmp (long_options[option_index].name, "bor") == 0)
1278            {
1279 <            if (local_args_info.bor_given)
1199 <              {
1200 <                fprintf (stderr, "%s: `--bor' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1201 <                goto failure;
1202 <              }
1203 <            if (args_info->bor_given && ! override)
1204 <              continue;
1205 <            local_args_info.bor_given = 1;
1206 <            args_info->bor_given = 1;
1279 >          
1280              if (args_info->staticProps_group_counter && override)
1281                reset_group_staticProps (args_info);
1282              args_info->staticProps_group_counter += 1;
1283 <            break;
1283 >          
1284 >            if (update_arg( 0 ,
1285 >                 0 , &(args_info->bor_given),
1286 >                &(local_args_info.bor_given), optarg, 0, 0, ARG_NO,
1287 >                check_ambiguity, override, 0, 0,
1288 >                "bor", '-',
1289 >                additional_error))
1290 >              goto failure;
1291 >          
1292            }
1293 +          /* N(theta) bond angle density within (--rcut must be specified).  */
1294 +          else if (strcmp (long_options[option_index].name, "bad") == 0)
1295 +          {
1296 +          
1297 +            if (args_info->staticProps_group_counter && override)
1298 +              reset_group_staticProps (args_info);
1299 +            args_info->staticProps_group_counter += 1;
1300 +          
1301 +            if (update_arg( 0 ,
1302 +                 0 , &(args_info->bad_given),
1303 +                &(local_args_info.bad_given), optarg, 0, 0, ARG_NO,
1304 +                check_ambiguity, override, 0, 0,
1305 +                "bad", '-',
1306 +                additional_error))
1307 +              goto failure;
1308 +          
1309 +          }
1310 +          /* count of molecules matching selection criteria (and associated statistics).  */
1311 +          else if (strcmp (long_options[option_index].name, "count") == 0)
1312 +          {
1313 +          
1314 +            if (args_info->staticProps_group_counter && override)
1315 +              reset_group_staticProps (args_info);
1316 +            args_info->staticProps_group_counter += 1;
1317 +          
1318 +            if (update_arg( 0 ,
1319 +                 0 , &(args_info->count_given),
1320 +                &(local_args_info.count_given), optarg, 0, 0, ARG_NO,
1321 +                check_ambiguity, override, 0, 0,
1322 +                "count", '-',
1323 +                additional_error))
1324 +              goto failure;
1325 +          
1326 +          }
1327 +          /* g(z).  */
1328 +          else if (strcmp (long_options[option_index].name, "gofz") == 0)
1329 +          {
1330 +          
1331 +            if (args_info->staticProps_group_counter && override)
1332 +              reset_group_staticProps (args_info);
1333 +            args_info->staticProps_group_counter += 1;
1334 +          
1335 +            if (update_arg( 0 ,
1336 +                 0 , &(args_info->gofz_given),
1337 +                &(local_args_info.gofz_given), optarg, 0, 0, ARG_NO,
1338 +                check_ambiguity, override, 0, 0,
1339 +                "gofz", '-',
1340 +                additional_error))
1341 +              goto failure;
1342 +          
1343 +          }
1344            /* g(r, cos(theta)).  */
1345            else if (strcmp (long_options[option_index].name, "r_theta") == 0)
1346            {
1347 <            if (local_args_info.r_theta_given)
1216 <              {
1217 <                fprintf (stderr, "%s: `--r_theta' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1218 <                goto failure;
1219 <              }
1220 <            if (args_info->r_theta_given && ! override)
1221 <              continue;
1222 <            local_args_info.r_theta_given = 1;
1223 <            args_info->r_theta_given = 1;
1347 >          
1348              if (args_info->staticProps_group_counter && override)
1349                reset_group_staticProps (args_info);
1350              args_info->staticProps_group_counter += 1;
1351 <            break;
1351 >          
1352 >            if (update_arg( 0 ,
1353 >                 0 , &(args_info->r_theta_given),
1354 >                &(local_args_info.r_theta_given), optarg, 0, 0, ARG_NO,
1355 >                check_ambiguity, override, 0, 0,
1356 >                "r_theta", '-',
1357 >                additional_error))
1358 >              goto failure;
1359 >          
1360            }
1361            /* g(r, cos(omega)).  */
1362            else if (strcmp (long_options[option_index].name, "r_omega") == 0)
1363            {
1364 <            if (local_args_info.r_omega_given)
1233 <              {
1234 <                fprintf (stderr, "%s: `--r_omega' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1235 <                goto failure;
1236 <              }
1237 <            if (args_info->r_omega_given && ! override)
1238 <              continue;
1239 <            local_args_info.r_omega_given = 1;
1240 <            args_info->r_omega_given = 1;
1364 >          
1365              if (args_info->staticProps_group_counter && override)
1366                reset_group_staticProps (args_info);
1367              args_info->staticProps_group_counter += 1;
1368 <            break;
1368 >          
1369 >            if (update_arg( 0 ,
1370 >                 0 , &(args_info->r_omega_given),
1371 >                &(local_args_info.r_omega_given), optarg, 0, 0, ARG_NO,
1372 >                check_ambiguity, override, 0, 0,
1373 >                "r_omega", '-',
1374 >                additional_error))
1375 >              goto failure;
1376 >          
1377 >          }
1378 >          /* g(r, z).  */
1379 >          else if (strcmp (long_options[option_index].name, "r_z") == 0)
1380 >          {
1381 >          
1382 >            if (args_info->staticProps_group_counter && override)
1383 >              reset_group_staticProps (args_info);
1384 >            args_info->staticProps_group_counter += 1;
1385 >          
1386 >            if (update_arg( 0 ,
1387 >                 0 , &(args_info->r_z_given),
1388 >                &(local_args_info.r_z_given), optarg, 0, 0, ARG_NO,
1389 >                check_ambiguity, override, 0, 0,
1390 >                "r_z", '-',
1391 >                additional_error))
1392 >              goto failure;
1393 >          
1394            }
1395            /* g(cos(theta), cos(omega)).  */
1396            else if (strcmp (long_options[option_index].name, "theta_omega") == 0)
1397            {
1398 <            if (local_args_info.theta_omega_given)
1250 <              {
1251 <                fprintf (stderr, "%s: `--theta_omega' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1252 <                goto failure;
1253 <              }
1254 <            if (args_info->theta_omega_given && ! override)
1255 <              continue;
1256 <            local_args_info.theta_omega_given = 1;
1257 <            args_info->theta_omega_given = 1;
1398 >          
1399              if (args_info->staticProps_group_counter && override)
1400                reset_group_staticProps (args_info);
1401              args_info->staticProps_group_counter += 1;
1402 <            break;
1402 >          
1403 >            if (update_arg( 0 ,
1404 >                 0 , &(args_info->theta_omega_given),
1405 >                &(local_args_info.theta_omega_given), optarg, 0, 0, ARG_NO,
1406 >                check_ambiguity, override, 0, 0,
1407 >                "theta_omega", '-',
1408 >                additional_error))
1409 >              goto failure;
1410 >          
1411            }
1412            /* g(x, y, z).  */
1413            else if (strcmp (long_options[option_index].name, "gxyz") == 0)
1414            {
1415 <            if (local_args_info.gxyz_given)
1267 <              {
1268 <                fprintf (stderr, "%s: `--gxyz' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1269 <                goto failure;
1270 <              }
1271 <            if (args_info->gxyz_given && ! override)
1272 <              continue;
1273 <            local_args_info.gxyz_given = 1;
1274 <            args_info->gxyz_given = 1;
1415 >          
1416              if (args_info->staticProps_group_counter && override)
1417                reset_group_staticProps (args_info);
1418              args_info->staticProps_group_counter += 1;
1419 <            break;
1419 >          
1420 >            if (update_arg( 0 ,
1421 >                 0 , &(args_info->gxyz_given),
1422 >                &(local_args_info.gxyz_given), optarg, 0, 0, ARG_NO,
1423 >                check_ambiguity, override, 0, 0,
1424 >                "gxyz", '-',
1425 >                additional_error))
1426 >              goto failure;
1427 >          
1428            }
1429 +          /* 2D g(r) (Slab width --dz must be specified).  */
1430 +          else if (strcmp (long_options[option_index].name, "twodgofr") == 0)
1431 +          {
1432 +          
1433 +            if (args_info->staticProps_group_counter && override)
1434 +              reset_group_staticProps (args_info);
1435 +            args_info->staticProps_group_counter += 1;
1436 +          
1437 +            if (update_arg( 0 ,
1438 +                 0 , &(args_info->twodgofr_given),
1439 +                &(local_args_info.twodgofr_given), optarg, 0, 0, ARG_NO,
1440 +                check_ambiguity, override, 0, 0,
1441 +                "twodgofr", '-',
1442 +                additional_error))
1443 +              goto failure;
1444 +          
1445 +          }
1446            /* rp2 order parameter (--sele1 and --sele2 must be specified).  */
1447            else if (strcmp (long_options[option_index].name, "rp2") == 0)
1448            {
1449 <            if (local_args_info.rp2_given)
1284 <              {
1285 <                fprintf (stderr, "%s: `--rp2' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1286 <                goto failure;
1287 <              }
1288 <            if (args_info->rp2_given && ! override)
1289 <              continue;
1290 <            local_args_info.rp2_given = 1;
1291 <            args_info->rp2_given = 1;
1449 >          
1450              if (args_info->staticProps_group_counter && override)
1451                reset_group_staticProps (args_info);
1452              args_info->staticProps_group_counter += 1;
1453 <            break;
1453 >          
1454 >            if (update_arg( 0 ,
1455 >                 0 , &(args_info->rp2_given),
1456 >                &(local_args_info.rp2_given), optarg, 0, 0, ARG_NO,
1457 >                check_ambiguity, override, 0, 0,
1458 >                "rp2", '-',
1459 >                additional_error))
1460 >              goto failure;
1461 >          
1462            }
1463            /* slab density.  */
1464            else if (strcmp (long_options[option_index].name, "slab_density") == 0)
1465            {
1466 <            if (local_args_info.slab_density_given)
1301 <              {
1302 <                fprintf (stderr, "%s: `--slab_density' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1303 <                goto failure;
1304 <              }
1305 <            if (args_info->slab_density_given && ! override)
1306 <              continue;
1307 <            local_args_info.slab_density_given = 1;
1308 <            args_info->slab_density_given = 1;
1466 >          
1467              if (args_info->staticProps_group_counter && override)
1468                reset_group_staticProps (args_info);
1469              args_info->staticProps_group_counter += 1;
1470 <            break;
1470 >          
1471 >            if (update_arg( 0 ,
1472 >                 0 , &(args_info->slab_density_given),
1473 >                &(local_args_info.slab_density_given), optarg, 0, 0, ARG_NO,
1474 >                check_ambiguity, override, 0, 0,
1475 >                "slab_density", '-',
1476 >                additional_error))
1477 >              goto failure;
1478 >          
1479            }
1480 +          /* p(cos(theta)).  */
1481 +          else if (strcmp (long_options[option_index].name, "p_angle") == 0)
1482 +          {
1483 +          
1484 +            if (args_info->staticProps_group_counter && override)
1485 +              reset_group_staticProps (args_info);
1486 +            args_info->staticProps_group_counter += 1;
1487 +          
1488 +            if (update_arg( 0 ,
1489 +                 0 , &(args_info->p_angle_given),
1490 +                &(local_args_info.p_angle_given), optarg, 0, 0, ARG_NO,
1491 +                check_ambiguity, override, 0, 0,
1492 +                "p_angle", '-',
1493 +                additional_error))
1494 +              goto failure;
1495 +          
1496 +          }
1497            /* hxy.  */
1498            else if (strcmp (long_options[option_index].name, "hxy") == 0)
1499            {
1500 <            if (local_args_info.hxy_given)
1318 <              {
1319 <                fprintf (stderr, "%s: `--hxy' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1320 <                goto failure;
1321 <              }
1322 <            if (args_info->hxy_given && ! override)
1323 <              continue;
1324 <            local_args_info.hxy_given = 1;
1325 <            args_info->hxy_given = 1;
1500 >          
1501              if (args_info->staticProps_group_counter && override)
1502                reset_group_staticProps (args_info);
1503              args_info->staticProps_group_counter += 1;
1504 <            break;
1504 >          
1505 >            if (update_arg( 0 ,
1506 >                 0 , &(args_info->hxy_given),
1507 >                &(local_args_info.hxy_given), optarg, 0, 0, ARG_NO,
1508 >                check_ambiguity, override, 0, 0,
1509 >                "hxy", '-',
1510 >                additional_error))
1511 >              goto failure;
1512 >          
1513            }
1514            /* rho of R.  */
1515            else if (strcmp (long_options[option_index].name, "rho_r") == 0)
1516            {
1517 <            if (local_args_info.rho_r_given)
1335 <              {
1336 <                fprintf (stderr, "%s: `--rho_r' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
1337 <                goto failure;
1338 <              }
1339 <            if (args_info->rho_r_given && ! override)
1340 <              continue;
1341 <            local_args_info.rho_r_given = 1;
1342 <            args_info->rho_r_given = 1;
1517 >          
1518              if (args_info->staticProps_group_counter && override)
1519                reset_group_staticProps (args_info);
1520              args_info->staticProps_group_counter += 1;
1521 <            break;
1521 >          
1522 >            if (update_arg( 0 ,
1523 >                 0 , &(args_info->rho_r_given),
1524 >                &(local_args_info.rho_r_given), optarg, 0, 0, ARG_NO,
1525 >                check_ambiguity, override, 0, 0,
1526 >                "rho_r", '-',
1527 >                additional_error))
1528 >              goto failure;
1529 >          
1530            }
1531 +          /* angle of R.  */
1532 +          else if (strcmp (long_options[option_index].name, "angle_r") == 0)
1533 +          {
1534            
1535 +            if (args_info->staticProps_group_counter && override)
1536 +              reset_group_staticProps (args_info);
1537 +            args_info->staticProps_group_counter += 1;
1538 +          
1539 +            if (update_arg( 0 ,
1540 +                 0 , &(args_info->angle_r_given),
1541 +                &(local_args_info.angle_r_given), optarg, 0, 0, ARG_NO,
1542 +                check_ambiguity, override, 0, 0,
1543 +                "angle_r", '-',
1544 +                additional_error))
1545 +              goto failure;
1546 +          
1547 +          }
1548 +          /* hull volume of nanoparticle.  */
1549 +          else if (strcmp (long_options[option_index].name, "hullvol") == 0)
1550 +          {
1551 +          
1552 +            if (args_info->staticProps_group_counter && override)
1553 +              reset_group_staticProps (args_info);
1554 +            args_info->staticProps_group_counter += 1;
1555 +          
1556 +            if (update_arg( 0 ,
1557 +                 0 , &(args_info->hullvol_given),
1558 +                &(local_args_info.hullvol_given), optarg, 0, 0, ARG_NO,
1559 +                check_ambiguity, override, 0, 0,
1560 +                "hullvol", '-',
1561 +                additional_error))
1562 +              goto failure;
1563 +          
1564 +          }
1565 +          /* length of nanorod.  */
1566 +          else if (strcmp (long_options[option_index].name, "rodlength") == 0)
1567 +          {
1568 +          
1569 +            if (args_info->staticProps_group_counter && override)
1570 +              reset_group_staticProps (args_info);
1571 +            args_info->staticProps_group_counter += 1;
1572 +          
1573 +            if (update_arg( 0 ,
1574 +                 0 , &(args_info->rodlength_given),
1575 +                &(local_args_info.rodlength_given), optarg, 0, 0, ARG_NO,
1576 +                check_ambiguity, override, 0, 0,
1577 +                "rodlength", '-',
1578 +                additional_error))
1579 +              goto failure;
1580 +          
1581 +          }
1582 +          
1583            break;
1584          case '?':       /* Invalid option.  */
1585            /* `getopt_long' already printed an error message.  */
# Line 1359 | Line 1593 | cmdline_parser_internal (int argc, char * const *argv,
1593  
1594    if (args_info->staticProps_group_counter > 1)
1595      {
1596 <      fprintf (stderr, "%s: %d options of group staticProps were given. One is required.%s\n", argv[0], args_info->staticProps_group_counter, (additional_error ? additional_error : ""));
1596 >      fprintf (stderr, "%s: %d options of group staticProps were given. One is required%s.\n", argv[0], args_info->staticProps_group_counter, (additional_error ? additional_error : ""));
1597        error = 1;
1598      }
1599    

Comparing:
trunk/src/applications/staticProps/StaticPropsCmd.c (property svn:keywords), Revision 1128 by chuckv, Wed Apr 11 23:27:20 2007 UTC vs.
branches/development/src/applications/staticProps/StaticPropsCmd.cpp (property svn:keywords), Revision 1655 by gezelter, Mon Oct 3 20:32:45 2011 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines