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

Comparing:
trunk/src/applications/randomBuilder/randomBuilderCmd.c (file contents), Revision 950 by chuckv, Tue Apr 25 22:59:27 2006 UTC vs.
trunk/src/applications/randomBuilder/randomBuilderCmd.cpp (file contents), Revision 1795 by gezelter, Fri Sep 7 18:13:55 2012 UTC

# Line 1 | Line 1
1   /*
2 <  File autogenerated by gengetopt version 2.15
2 >  File autogenerated by gengetopt version 2.22.4
3    generated with the following command:
4 <  gengetopt --file-name=randomBuilderCmd --unamed-opts
4 >  gengetopt -F randomBuilderCmd -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 + #ifdef WIN32
25 + #include "utils/wingetopt.h"
26 + #else
27 + #include <getopt.h>
28 + #endif
29 +
30   #include "randomBuilderCmd.h"
31  
32 + const char *gengetopt_args_info_purpose = "";
33 +
34 + const char *gengetopt_args_info_usage = "Usage: randomBuilder [OPTIONS]... [FILES]...";
35 +
36 + const char *gengetopt_args_info_description = "";
37 +
38 + const char *gengetopt_args_info_help[] = {
39 +  "  -h, --help                Print help and exit",
40 +  "  -V, --version             Print version and exit",
41 +  "  -o, --output=STRING       Output file name",
42 +  "      --density=DOUBLE      density (g/cm^3)",
43 +  "      --nx=INT              number of unit cells in x",
44 +  "      --ny=INT              number of unit cells in y",
45 +  "      --nz=INT              number of unit cells in z",
46 +  "      --molFraction=DOUBLE  (Default) Builds a multi-component random mixed \n                              nanoparticle. Mole Fraction must be specified for \n                              each componet > 1 in MD file.",
47 +    0
48 + };
49 +
50 + typedef enum {ARG_NO
51 +  , ARG_STRING
52 +  , ARG_INT
53 +  , ARG_DOUBLE
54 + } cmdline_parser_arg_type;
55 +
56   static
57   void clear_given (struct gengetopt_args_info *args_info);
58   static
59   void clear_args (struct gengetopt_args_info *args_info);
60  
61   static int
62 < 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);
62 > cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info,
63 >                        struct cmdline_parser_params *params, const char *additional_error);
64  
65   static int
66   cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error);
67  
35 struct molFraction_list
36 {
37  double molFraction_arg;
38  char *molFraction_orig;
39  struct molFraction_list * next;
40 };
41
68   static char *
69   gengetopt_strdup (const char *s);
70  
# Line 48 | Line 74 | void clear_given (struct gengetopt_args_info *args_inf
74    args_info->help_given = 0 ;
75    args_info->version_given = 0 ;
76    args_info->output_given = 0 ;
51  args_info->latticetype_given = 0 ;
77    args_info->density_given = 0 ;
78    args_info->nx_given = 0 ;
79    args_info->ny_given = 0 ;
# Line 59 | Line 84 | void clear_args (struct gengetopt_args_info *args_info
84   static
85   void clear_args (struct gengetopt_args_info *args_info)
86   {
87 +  FIX_UNUSED (args_info);
88    args_info->output_arg = NULL;
89    args_info->output_orig = NULL;
64  args_info->latticetype_arg = gengetopt_strdup ("fcc");
65  args_info->latticetype_orig = NULL;
90    args_info->density_orig = NULL;
91    args_info->nx_orig = NULL;
92    args_info->ny_orig = NULL;
# Line 72 | Line 96 | void clear_args (struct gengetopt_args_info *args_info
96    
97   }
98  
99 + static
100 + void init_args_info(struct gengetopt_args_info *args_info)
101 + {
102 +
103 +
104 +  args_info->help_help = gengetopt_args_info_help[0] ;
105 +  args_info->version_help = gengetopt_args_info_help[1] ;
106 +  args_info->output_help = gengetopt_args_info_help[2] ;
107 +  args_info->density_help = gengetopt_args_info_help[3] ;
108 +  args_info->nx_help = gengetopt_args_info_help[4] ;
109 +  args_info->ny_help = gengetopt_args_info_help[5] ;
110 +  args_info->nz_help = gengetopt_args_info_help[6] ;
111 +  args_info->molFraction_help = gengetopt_args_info_help[7] ;
112 +  args_info->molFraction_min = 0;
113 +  args_info->molFraction_max = 0;
114 +  
115 + }
116 +
117   void
118   cmdline_parser_print_version (void)
119   {
120 <  printf ("%s %s\n", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION);
120 >  printf ("%s %s\n",
121 >     (strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE),
122 >     CMDLINE_PARSER_VERSION);
123   }
124  
125 + static void print_help_common(void) {
126 +  cmdline_parser_print_version ();
127 +
128 +  if (strlen(gengetopt_args_info_purpose) > 0)
129 +    printf("\n%s\n", gengetopt_args_info_purpose);
130 +
131 +  if (strlen(gengetopt_args_info_usage) > 0)
132 +    printf("\n%s\n", gengetopt_args_info_usage);
133 +
134 +  printf("\n");
135 +
136 +  if (strlen(gengetopt_args_info_description) > 0)
137 +    printf("%s\n\n", gengetopt_args_info_description);
138 + }
139 +
140   void
141   cmdline_parser_print_help (void)
142   {
143 <  cmdline_parser_print_version ();
144 <  printf("\nUsage: simpleBuilder [OPTIONS]... [FILES]...\n\n");
145 <  printf("%s\n","  -h, --help                Print help and exit");
146 <  printf("%s\n","  -V, --version             Print version and exit");
88 <  printf("%s\n","  -o, --output=STRING       Output file name");
89 <  printf("%s\n","      --latticetype=STRING  Lattice type string. Valid types are fcc,hcp,bcc \n                              and hcp-water.  (default=`fcc')");
90 <  printf("%s\n","      --density=DOUBLE      density (g/cm^3)");
91 <  printf("%s\n","      --nx=INT              number of unit cells in x");
92 <  printf("%s\n","      --ny=INT              number of unit cells in y");
93 <  printf("%s\n","      --nz=INT              number of unit cells in z");
94 <  printf("%s\n","      --molFraction=DOUBLE  (Default) Builds a multi-component random mixed \n                              nanoparticle. Mole Fraction must be specified for \n                              each componet > 1 in MD file.");
95 <  
143 >  int i = 0;
144 >  print_help_common();
145 >  while (gengetopt_args_info_help[i])
146 >    printf("%s\n", gengetopt_args_info_help[i++]);
147   }
148  
149   void
# Line 100 | Line 151 | cmdline_parser_init (struct gengetopt_args_info *args_
151   {
152    clear_given (args_info);
153    clear_args (args_info);
154 +  init_args_info (args_info);
155  
156 <  args_info->inputs = NULL;
156 >  args_info->inputs = 0;
157    args_info->inputs_num = 0;
158   }
159  
160 + void
161 + cmdline_parser_params_init(struct cmdline_parser_params *params)
162 + {
163 +  if (params)
164 +    {
165 +      params->override = 0;
166 +      params->initialize = 1;
167 +      params->check_required = 1;
168 +      params->check_ambiguity = 0;
169 +      params->print_errors = 1;
170 +    }
171 + }
172 +
173 + struct cmdline_parser_params *
174 + cmdline_parser_params_create(void)
175 + {
176 +  struct cmdline_parser_params *params =
177 +    (struct cmdline_parser_params *)malloc(sizeof(struct cmdline_parser_params));
178 +  cmdline_parser_params_init(params);  
179 +  return params;
180 + }
181 +
182   static void
183 < cmdline_parser_release (struct gengetopt_args_info *args_info)
183 > free_string_field (char **s)
184   {
185 <  
112 <  unsigned int i;
113 <  if (args_info->output_arg)
185 >  if (*s)
186      {
187 <      free (args_info->output_arg); /* free previous argument */
188 <      args_info->output_arg = 0;
187 >      free (*s);
188 >      *s = 0;
189      }
190 <  if (args_info->output_orig)
191 <    {
192 <      free (args_info->output_orig); /* free previous argument */
193 <      args_info->output_orig = 0;
194 <    }
195 <  if (args_info->latticetype_arg)
196 <    {
197 <      free (args_info->latticetype_arg); /* free previous argument */
198 <      args_info->latticetype_arg = 0;
199 <    }
200 <  if (args_info->latticetype_orig)
201 <    {
202 <      free (args_info->latticetype_orig); /* free previous argument */
203 <      args_info->latticetype_orig = 0;
204 <    }
205 <  if (args_info->density_orig)
206 <    {
207 <      free (args_info->density_orig); /* free previous argument */
208 <      args_info->density_orig = 0;
209 <    }
210 <  if (args_info->nx_orig)
211 <    {
212 <      free (args_info->nx_orig); /* free previous argument */
213 <      args_info->nx_orig = 0;
214 <    }
215 <  if (args_info->ny_orig)
216 <    {
217 <      free (args_info->ny_orig); /* free previous argument */
218 <      args_info->ny_orig = 0;
219 <    }
220 <  if (args_info->nz_orig)
221 <    {
222 <      free (args_info->nz_orig); /* free previous argument */
223 <      args_info->nz_orig = 0;
224 <    }
225 <  if (args_info->molFraction_arg)
226 <    {
227 <      for (i = 0; i < args_info->molFraction_given; ++i)
228 <        {
229 <          if (args_info->molFraction_orig [i])
230 <            {
231 <              free (args_info->molFraction_orig [i]); /* free previous argument */
232 <              args_info->molFraction_orig [i] = 0;
233 <            }
234 <        }
235 <      free (args_info->molFraction_arg); /* free previous argument */
236 <      args_info->molFraction_arg = 0;
237 <      free (args_info->molFraction_orig); /* free previous argument */
238 <      args_info->molFraction_orig = 0;
239 <    }
190 > }
191 >
192 > /** @brief generic value variable */
193 > union generic_value {
194 >    int int_arg;
195 >    double double_arg;
196 >    char *string_arg;
197 >    const char *default_string_arg;
198 > };
199 >
200 > /** @brief holds temporary values for multiple options */
201 > struct generic_list
202 > {
203 >  union generic_value arg;
204 >  char *orig;
205 >  struct generic_list *next;
206 > };
207 >
208 > /**
209 > * @brief add a node at the head of the list
210 > */
211 > static void add_node(struct generic_list **list) {
212 >  struct generic_list *new_node = (struct generic_list *) malloc (sizeof (struct generic_list));
213 >  new_node->next = *list;
214 >  *list = new_node;
215 >  new_node->arg.string_arg = 0;
216 >  new_node->orig = 0;
217 > }
218 >
219 > /**
220 > * The passed arg parameter is NOT set to 0 from this function
221 > */
222 > static void
223 > free_multiple_field(unsigned int len, void *arg, char ***orig)
224 > {
225 >  unsigned int i;
226 >  if (arg) {
227 >    for (i = 0; i < len; ++i)
228 >      {
229 >        free_string_field(&((*orig)[i]));
230 >      }
231 >
232 >    free (arg);
233 >    free (*orig);
234 >    *orig = 0;
235 >  }
236 > }
237 >
238 >
239 > static void
240 > cmdline_parser_release (struct gengetopt_args_info *args_info)
241 > {
242 >  unsigned int i;
243 >  free_string_field (&(args_info->output_arg));
244 >  free_string_field (&(args_info->output_orig));
245 >  free_string_field (&(args_info->density_orig));
246 >  free_string_field (&(args_info->nx_orig));
247 >  free_string_field (&(args_info->ny_orig));
248 >  free_string_field (&(args_info->nz_orig));
249 >  free_multiple_field (args_info->molFraction_given, (void *)(args_info->molFraction_arg), &(args_info->molFraction_orig));
250 >  args_info->molFraction_arg = 0;
251    
252 +  
253    for (i = 0; i < args_info->inputs_num; ++i)
254      free (args_info->inputs [i]);
255 <  
255 >
256    if (args_info->inputs_num)
257      free (args_info->inputs);
258 <  
258 >
259    clear_given (args_info);
260   }
261  
262 +
263 + static void
264 + write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[])
265 + {
266 +  FIX_UNUSED (values);
267 +  if (arg) {
268 +    fprintf(outfile, "%s=\"%s\"\n", opt, arg);
269 +  } else {
270 +    fprintf(outfile, "%s\n", opt);
271 +  }
272 + }
273 +
274 + static void
275 + write_multiple_into_file(FILE *outfile, int len, const char *opt, char **arg, const char *values[])
276 + {
277 +  int i;
278 +  
279 +  for (i = 0; i < len; ++i)
280 +    write_into_file(outfile, opt, (arg ? arg[i] : 0), values);
281 + }
282 +
283   int
284 + cmdline_parser_dump(FILE *outfile, struct gengetopt_args_info *args_info)
285 + {
286 +  int i = 0;
287 +
288 +  if (!outfile)
289 +    {
290 +      fprintf (stderr, "%s: cannot dump options to stream\n", CMDLINE_PARSER_PACKAGE);
291 +      return EXIT_FAILURE;
292 +    }
293 +
294 +  if (args_info->help_given)
295 +    write_into_file(outfile, "help", 0, 0 );
296 +  if (args_info->version_given)
297 +    write_into_file(outfile, "version", 0, 0 );
298 +  if (args_info->output_given)
299 +    write_into_file(outfile, "output", args_info->output_orig, 0);
300 +  if (args_info->density_given)
301 +    write_into_file(outfile, "density", args_info->density_orig, 0);
302 +  if (args_info->nx_given)
303 +    write_into_file(outfile, "nx", args_info->nx_orig, 0);
304 +  if (args_info->ny_given)
305 +    write_into_file(outfile, "ny", args_info->ny_orig, 0);
306 +  if (args_info->nz_given)
307 +    write_into_file(outfile, "nz", args_info->nz_orig, 0);
308 +  write_multiple_into_file(outfile, args_info->molFraction_given, "molFraction", args_info->molFraction_orig, 0);
309 +  
310 +
311 +  i = EXIT_SUCCESS;
312 +  return i;
313 + }
314 +
315 + int
316   cmdline_parser_file_save(const char *filename, struct gengetopt_args_info *args_info)
317   {
318    FILE *outfile;
# Line 189 | Line 326 | cmdline_parser_file_save(const char *filename, struct
326        return EXIT_FAILURE;
327      }
328  
329 <  if (args_info->help_given) {
193 <    fprintf(outfile, "%s\n", "help");
194 <  }
195 <  if (args_info->version_given) {
196 <    fprintf(outfile, "%s\n", "version");
197 <  }
198 <  if (args_info->output_given) {
199 <    if (args_info->output_orig) {
200 <      fprintf(outfile, "%s=\"%s\"\n", "output", args_info->output_orig);
201 <    } else {
202 <      fprintf(outfile, "%s\n", "output");
203 <    }
204 <  }
205 <  if (args_info->latticetype_given) {
206 <    if (args_info->latticetype_orig) {
207 <      fprintf(outfile, "%s=\"%s\"\n", "latticetype", args_info->latticetype_orig);
208 <    } else {
209 <      fprintf(outfile, "%s\n", "latticetype");
210 <    }
211 <  }
212 <  if (args_info->density_given) {
213 <    if (args_info->density_orig) {
214 <      fprintf(outfile, "%s=\"%s\"\n", "density", args_info->density_orig);
215 <    } else {
216 <      fprintf(outfile, "%s\n", "density");
217 <    }
218 <  }
219 <  if (args_info->nx_given) {
220 <    if (args_info->nx_orig) {
221 <      fprintf(outfile, "%s=\"%s\"\n", "nx", args_info->nx_orig);
222 <    } else {
223 <      fprintf(outfile, "%s\n", "nx");
224 <    }
225 <  }
226 <  if (args_info->ny_given) {
227 <    if (args_info->ny_orig) {
228 <      fprintf(outfile, "%s=\"%s\"\n", "ny", args_info->ny_orig);
229 <    } else {
230 <      fprintf(outfile, "%s\n", "ny");
231 <    }
232 <  }
233 <  if (args_info->nz_given) {
234 <    if (args_info->nz_orig) {
235 <      fprintf(outfile, "%s=\"%s\"\n", "nz", args_info->nz_orig);
236 <    } else {
237 <      fprintf(outfile, "%s\n", "nz");
238 <    }
239 <  }
240 <  if (args_info->molFraction_orig)
241 <    {
242 <      for (i = 0; i < args_info->molFraction_given; ++i)
243 <        {
244 <          if (args_info->molFraction_orig [i])
245 <            {
246 <              fprintf(outfile, "%s=\"%s\"\n", "molFraction", args_info->molFraction_orig [i]);
247 <            }
248 <        }
249 <    }
250 <  
329 >  i = cmdline_parser_dump(outfile, args_info);
330    fclose (outfile);
331  
253  i = EXIT_SUCCESS;
332    return i;
333   }
334  
# Line 260 | Line 338 | cmdline_parser_free (struct gengetopt_args_info *args_
338    cmdline_parser_release (args_info);
339   }
340  
341 <
264 < /* gengetopt_strdup() */
265 < /* strdup.c replacement of strdup, which is not standard */
341 > /** @brief replacement of strdup, which is not standard */
342   char *
343   gengetopt_strdup (const char *s)
344   {
345 <  char *result = NULL;
345 >  char *result = 0;
346    if (!s)
347      return result;
348  
# Line 280 | Line 356 | get_multiple_arg_token(const char *arg)
356   static char *
357   get_multiple_arg_token(const char *arg)
358   {
359 <  char *tok, *ret;
360 <  size_t len;
359 >  const char *tok;
360 >  char *ret;
361 >  size_t len, num_of_escape, i, j;
362  
363    if (!arg)
364 <    return NULL;
364 >    return 0;
365  
366    tok = strchr (arg, ',');
367 +  num_of_escape = 0;
368  
369 +  /* make sure it is not escaped */
370 +  while (tok)
371 +    {
372 +      if (*(tok-1) == '\\')
373 +        {
374 +          /* find the next one */
375 +          tok = strchr (tok+1, ',');
376 +          ++num_of_escape;
377 +        }
378 +      else
379 +        break;
380 +    }
381 +
382    if (tok)
383      len = (size_t)(tok - arg + 1);
384    else
385      len = strlen (arg) + 1;
386  
387 +  len -= num_of_escape;
388 +
389    ret = (char *) malloc (len);
390 <  strncpy (ret, arg, len-1);
390 >
391 >  i = 0;
392 >  j = 0;
393 >  while (arg[i] && (j < len-1))
394 >    {
395 >      if (arg[i] == '\\' &&
396 >          arg[ i + 1 ] &&
397 >          arg[ i + 1 ] == ',')
398 >        ++i;
399 >
400 >      ret[j++] = arg[i++];
401 >    }
402 >
403    ret[len-1] = '\0';
404  
405    return ret;
406   }
407  
408 < static char *
408 > static const char *
409   get_multiple_arg_token_next(const char *arg)
410   {
411 <  char *tok;
411 >  const char *tok;
412  
413    if (!arg)
414 <    return NULL;
414 >    return 0;
415  
416    tok = strchr (arg, ',');
417  
418 +  /* make sure it is not escaped */
419 +  while (tok)
420 +    {
421 +      if (*(tok-1) == '\\')
422 +        {
423 +          /* find the next one */
424 +          tok = strchr (tok+1, ',');
425 +        }
426 +      else
427 +        break;
428 +    }
429 +
430    if (! tok || strlen(tok) == 1)
431      return 0;
432  
433    return tok+1;
434   }
435  
436 + static int
437 + check_multiple_option_occurrences(const char *prog_name, unsigned int option_given, unsigned int min, unsigned int max, const char *option_desc);
438 +
439   int
440 < cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info)
440 > check_multiple_option_occurrences(const char *prog_name, unsigned int option_given, unsigned int min, unsigned int max, const char *option_desc)
441   {
442 +  int error = 0;
443 +
444 +  if (option_given && (min > 0 || max > 0))
445 +    {
446 +      if (min > 0 && max > 0)
447 +        {
448 +          if (min == max)
449 +            {
450 +              /* specific occurrences */
451 +              if (option_given != (unsigned int) min)
452 +                {
453 +                  fprintf (stderr, "%s: %s option occurrences must be %d\n",
454 +                    prog_name, option_desc, min);
455 +                  error = 1;
456 +                }
457 +            }
458 +          else if (option_given < (unsigned int) min
459 +                || option_given > (unsigned int) max)
460 +            {
461 +              /* range occurrences */
462 +              fprintf (stderr, "%s: %s option occurrences must be between %d and %d\n",
463 +                prog_name, option_desc, min, max);
464 +              error = 1;
465 +            }
466 +        }
467 +      else if (min > 0)
468 +        {
469 +          /* at least check */
470 +          if (option_given < min)
471 +            {
472 +              fprintf (stderr, "%s: %s option occurrences must be at least %d\n",
473 +                prog_name, option_desc, min);
474 +              error = 1;
475 +            }
476 +        }
477 +      else if (max > 0)
478 +        {
479 +          /* at most check */
480 +          if (option_given > max)
481 +            {
482 +              fprintf (stderr, "%s: %s option occurrences must be at most %d\n",
483 +                prog_name, option_desc, max);
484 +              error = 1;
485 +            }
486 +        }
487 +    }
488 +    
489 +  return error;
490 + }
491 + int
492 + cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info)
493 + {
494    return cmdline_parser2 (argc, argv, args_info, 0, 1, 1);
495   }
496  
497   int
498 < cmdline_parser2 (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
498 > cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info,
499 >                   struct cmdline_parser_params *params)
500   {
501    int result;
502 +  result = cmdline_parser_internal (argc, argv, args_info, params, 0);
503  
504 <  result = cmdline_parser_internal (argc, argv, args_info, override, initialize, check_required, NULL);
504 >  if (result == EXIT_FAILURE)
505 >    {
506 >      cmdline_parser_free (args_info);
507 >      exit (EXIT_FAILURE);
508 >    }
509 >  
510 >  return result;
511 > }
512  
513 + int
514 + cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
515 + {
516 +  int result;
517 +  struct cmdline_parser_params params;
518 +  
519 +  params.override = override;
520 +  params.initialize = initialize;
521 +  params.check_required = check_required;
522 +  params.check_ambiguity = 0;
523 +  params.print_errors = 1;
524 +
525 +  result = cmdline_parser_internal (argc, argv, args_info, &params, 0);
526 +
527    if (result == EXIT_FAILURE)
528      {
529        cmdline_parser_free (args_info);
# Line 343 | Line 538 | cmdline_parser_required (struct gengetopt_args_info *a
538   {
539    int result = EXIT_SUCCESS;
540  
541 <  if (cmdline_parser_required2(args_info, prog_name, NULL) > 0)
541 >  if (cmdline_parser_required2(args_info, prog_name, 0) > 0)
542      result = EXIT_FAILURE;
543  
544    if (result == EXIT_FAILURE)
# Line 359 | Line 554 | cmdline_parser_required2 (struct gengetopt_args_info *
554   cmdline_parser_required2 (struct gengetopt_args_info *args_info, const char *prog_name, const char *additional_error)
555   {
556    int error = 0;
557 +  FIX_UNUSED (additional_error);
558  
559 +  /* checks for required options */
560 +  if (! args_info->output_given)
561 +    {
562 +      fprintf (stderr, "%s: '--output' ('-o') option required%s\n", prog_name, (additional_error ? additional_error : ""));
563 +      error = 1;
564 +    }
565 +  
566    if (! args_info->density_given)
567      {
568        fprintf (stderr, "%s: '--density' option required%s\n", prog_name, (additional_error ? additional_error : ""));
569        error = 1;
570      }
571 +  
572    if (! args_info->nx_given)
573      {
574        fprintf (stderr, "%s: '--nx' option required%s\n", prog_name, (additional_error ? additional_error : ""));
575        error = 1;
576      }
577 +  
578    if (! args_info->ny_given)
579      {
580        fprintf (stderr, "%s: '--ny' option required%s\n", prog_name, (additional_error ? additional_error : ""));
581        error = 1;
582      }
583 +  
584    if (! args_info->nz_given)
585      {
586        fprintf (stderr, "%s: '--nz' option required%s\n", prog_name, (additional_error ? additional_error : ""));
587        error = 1;
588      }
589 +  
590 +  if (check_multiple_option_occurrences(prog_name, args_info->molFraction_given, args_info->molFraction_min, args_info->molFraction_max, "'--molFraction'"))
591 +     error = 1;
592 +  
593 +  
594 +  /* checks for dependences among options */
595  
596    return error;
597   }
598  
599 +
600 + static char *package_name = 0;
601 +
602 + /**
603 + * @brief updates an option
604 + * @param field the generic pointer to the field to update
605 + * @param orig_field the pointer to the orig field
606 + * @param field_given the pointer to the number of occurrence of this option
607 + * @param prev_given the pointer to the number of occurrence already seen
608 + * @param value the argument for this option (if null no arg was specified)
609 + * @param possible_values the possible values for this option (if specified)
610 + * @param default_value the default value (in case the option only accepts fixed values)
611 + * @param arg_type the type of this option
612 + * @param check_ambiguity @see cmdline_parser_params.check_ambiguity
613 + * @param override @see cmdline_parser_params.override
614 + * @param no_free whether to free a possible previous value
615 + * @param multiple_option whether this is a multiple option
616 + * @param long_opt the corresponding long option
617 + * @param short_opt the corresponding short option (or '-' if none)
618 + * @param additional_error possible further error specification
619 + */
620 + static
621 + int update_arg(void *field, char **orig_field,
622 +               unsigned int *field_given, unsigned int *prev_given,
623 +               char *value, const char *possible_values[],
624 +               const char *default_value,
625 +               cmdline_parser_arg_type arg_type,
626 +               int check_ambiguity, int override,
627 +               int no_free, int multiple_option,
628 +               const char *long_opt, char short_opt,
629 +               const char *additional_error)
630 + {
631 +  char *stop_char = 0;
632 +  const char *val = value;
633 +  int found;
634 +  char **string_field;
635 +  FIX_UNUSED (field);
636 +
637 +  stop_char = 0;
638 +  found = 0;
639 +
640 +  if (!multiple_option && prev_given && (*prev_given || (check_ambiguity && *field_given)))
641 +    {
642 +      if (short_opt != '-')
643 +        fprintf (stderr, "%s: `--%s' (`-%c') option given more than once%s\n",
644 +               package_name, long_opt, short_opt,
645 +               (additional_error ? additional_error : ""));
646 +      else
647 +        fprintf (stderr, "%s: `--%s' option given more than once%s\n",
648 +               package_name, long_opt,
649 +               (additional_error ? additional_error : ""));
650 +      return 1; /* failure */
651 +    }
652 +
653 +  FIX_UNUSED (default_value);
654 +    
655 +  if (field_given && *field_given && ! override)
656 +    return 0;
657 +  if (prev_given)
658 +    (*prev_given)++;
659 +  if (field_given)
660 +    (*field_given)++;
661 +  if (possible_values)
662 +    val = possible_values[found];
663 +
664 +  switch(arg_type) {
665 +  case ARG_INT:
666 +    if (val) *((int *)field) = strtol (val, &stop_char, 0);
667 +    break;
668 +  case ARG_DOUBLE:
669 +    if (val) *((double *)field) = strtod (val, &stop_char);
670 +    break;
671 +  case ARG_STRING:
672 +    if (val) {
673 +      string_field = (char **)field;
674 +      if (!no_free && *string_field)
675 +        free (*string_field); /* free previous string */
676 +      *string_field = gengetopt_strdup (val);
677 +    }
678 +    break;
679 +  default:
680 +    break;
681 +  };
682 +
683 +  /* check numeric conversion */
684 +  switch(arg_type) {
685 +  case ARG_INT:
686 +  case ARG_DOUBLE:
687 +    if (val && !(stop_char && *stop_char == '\0')) {
688 +      fprintf(stderr, "%s: invalid numeric value: %s\n", package_name, val);
689 +      return 1; /* failure */
690 +    }
691 +    break;
692 +  default:
693 +    ;
694 +  };
695 +
696 +  /* store the original value */
697 +  switch(arg_type) {
698 +  case ARG_NO:
699 +    break;
700 +  default:
701 +    if (value && orig_field) {
702 +      if (no_free) {
703 +        *orig_field = value;
704 +      } else {
705 +        if (*orig_field)
706 +          free (*orig_field); /* free previous string */
707 +        *orig_field = gengetopt_strdup (value);
708 +      }
709 +    }
710 +  };
711 +
712 +  return 0; /* OK */
713 + }
714 +
715 + /**
716 + * @brief store information about a multiple option in a temporary list
717 + * @param list where to (temporarily) store multiple options
718 + */
719 + static
720 + int update_multiple_arg_temp(struct generic_list **list,
721 +               unsigned int *prev_given, const char *val,
722 +               const char *possible_values[], const char *default_value,
723 +               cmdline_parser_arg_type arg_type,
724 +               const char *long_opt, char short_opt,
725 +               const char *additional_error)
726 + {
727 +  /* store single arguments */
728 +  char *multi_token;
729 +  const char *multi_next;
730 +
731 +  if (arg_type == ARG_NO) {
732 +    (*prev_given)++;
733 +    return 0; /* OK */
734 +  }
735 +
736 +  multi_token = get_multiple_arg_token(val);
737 +  multi_next = get_multiple_arg_token_next (val);
738 +
739 +  while (1)
740 +    {
741 +      add_node (list);
742 +      if (update_arg((void *)&((*list)->arg), &((*list)->orig), 0,
743 +          prev_given, multi_token, possible_values, default_value,
744 +          arg_type, 0, 1, 1, 1, long_opt, short_opt, additional_error)) {
745 +        if (multi_token) free(multi_token);
746 +        return 1; /* failure */
747 +      }
748 +
749 +      if (multi_next)
750 +        {
751 +          multi_token = get_multiple_arg_token(multi_next);
752 +          multi_next = get_multiple_arg_token_next (multi_next);
753 +        }
754 +      else
755 +        break;
756 +    }
757 +
758 +  return 0; /* OK */
759 + }
760 +
761 + /**
762 + * @brief free the passed list (including possible string argument)
763 + */
764 + static
765 + void free_list(struct generic_list *list, short string_arg)
766 + {
767 +  if (list) {
768 +    struct generic_list *tmp;
769 +    while (list)
770 +      {
771 +        tmp = list;
772 +        if (string_arg && list->arg.string_arg)
773 +          free (list->arg.string_arg);
774 +        if (list->orig)
775 +          free (list->orig);
776 +        list = list->next;
777 +        free (tmp);
778 +      }
779 +  }
780 + }
781 +
782 + /**
783 + * @brief updates a multiple option starting from the passed list
784 + */
785 + static
786 + void update_multiple_arg(void *field, char ***orig_field,
787 +               unsigned int field_given, unsigned int prev_given, union generic_value *default_value,
788 +               cmdline_parser_arg_type arg_type,
789 +               struct generic_list *list)
790 + {
791 +  int i;
792 +  struct generic_list *tmp;
793 +
794 +  if (prev_given && list) {
795 +    *orig_field = (char **) realloc (*orig_field, (field_given + prev_given) * sizeof (char *));
796 +
797 +    switch(arg_type) {
798 +    case ARG_INT:
799 +      *((int **)field) = (int *)realloc (*((int **)field), (field_given + prev_given) * sizeof (int)); break;
800 +    case ARG_DOUBLE:
801 +      *((double **)field) = (double *)realloc (*((double **)field), (field_given + prev_given) * sizeof (double)); break;
802 +    case ARG_STRING:
803 +      *((char ***)field) = (char **)realloc (*((char ***)field), (field_given + prev_given) * sizeof (char *)); break;
804 +    default:
805 +      break;
806 +    };
807 +    
808 +    for (i = (prev_given - 1); i >= 0; --i)
809 +      {
810 +        tmp = list;
811 +        
812 +        switch(arg_type) {
813 +        case ARG_INT:
814 +          (*((int **)field))[i + field_given] = tmp->arg.int_arg; break;
815 +        case ARG_DOUBLE:
816 +          (*((double **)field))[i + field_given] = tmp->arg.double_arg; break;
817 +        case ARG_STRING:
818 +          (*((char ***)field))[i + field_given] = tmp->arg.string_arg; break;
819 +        default:
820 +          break;
821 +        }        
822 +        (*orig_field) [i + field_given] = list->orig;
823 +        list = list->next;
824 +        free (tmp);
825 +      }
826 +  } else { /* set the default value */
827 +    if (default_value && ! field_given) {
828 +      switch(arg_type) {
829 +      case ARG_INT:
830 +        if (! *((int **)field)) {
831 +          *((int **)field) = (int *)malloc (sizeof (int));
832 +          (*((int **)field))[0] = default_value->int_arg;
833 +        }
834 +        break;
835 +      case ARG_DOUBLE:
836 +        if (! *((double **)field)) {
837 +          *((double **)field) = (double *)malloc (sizeof (double));
838 +          (*((double **)field))[0] = default_value->double_arg;
839 +        }
840 +        break;
841 +      case ARG_STRING:
842 +        if (! *((char ***)field)) {
843 +          *((char ***)field) = (char **)malloc (sizeof (char *));
844 +          (*((char ***)field))[0] = gengetopt_strdup(default_value->string_arg);
845 +        }
846 +        break;
847 +      default: break;
848 +      }
849 +      if (!(*orig_field)) {
850 +        *orig_field = (char **) malloc (sizeof (char *));
851 +        (*orig_field)[0] = 0;
852 +      }
853 +    }
854 +  }
855 + }
856 +
857   int
858 < 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)
858 > cmdline_parser_internal (
859 >  int argc, char **argv, struct gengetopt_args_info *args_info,
860 >                        struct cmdline_parser_params *params, const char *additional_error)
861   {
862    int c;        /* Character of the parsed option.  */
391  char *multi_token, *multi_next; /* for multiple options */
863  
864 <  int i;        /* Counter */
394 <
395 <  struct molFraction_list * molFraction_list = NULL,* molFraction_new = NULL;
864 >  struct generic_list * molFraction_list = NULL;
865    int error = 0;
866    struct gengetopt_args_info local_args_info;
867 +  
868 +  int override;
869 +  int initialize;
870 +  int check_required;
871 +  int check_ambiguity;
872 +  
873 +  package_name = argv[0];
874 +  
875 +  override = params->override;
876 +  initialize = params->initialize;
877 +  check_required = params->check_required;
878 +  check_ambiguity = params->check_ambiguity;
879  
880    if (initialize)
881      cmdline_parser_init (args_info);
# Line 402 | Line 883 | cmdline_parser_internal (int argc, char * const *argv,
883    cmdline_parser_init (&local_args_info);
884  
885    optarg = 0;
886 <  optind = 1;
887 <  opterr = 1;
886 >  optind = 0;
887 >  opterr = params->print_errors;
888    optopt = '?';
889  
890    while (1)
891      {
892        int option_index = 0;
412      char *stop_char;
893  
894        static struct option long_options[] = {
895          { "help",       0, NULL, 'h' },
896          { "version",    0, NULL, 'V' },
897          { "output",     1, NULL, 'o' },
418        { "latticetype",        1, NULL, 0 },
898          { "density",    1, NULL, 0 },
899          { "nx", 1, NULL, 0 },
900          { "ny", 1, NULL, 0 },
901          { "nz", 1, NULL, 0 },
902          { "molFraction",        1, NULL, 0 },
903 <        { NULL, 0, NULL, 0 }
903 >        { 0,  0, 0, 0 }
904        };
905  
427      stop_char = 0;
906        c = getopt_long (argc, argv, "hVo:", long_options, &option_index);
907  
908        if (c == -1) break;       /* Exit from `while (1)' loop.  */
# Line 442 | Line 920 | cmdline_parser_internal (int argc, char * const *argv,
920            exit (EXIT_SUCCESS);
921  
922          case 'o':       /* Output file name.  */
923 <          if (local_args_info.output_given)
924 <            {
925 <              fprintf (stderr, "%s: `--output' (`-o') option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
926 <              goto failure;
927 <            }
928 <          if (args_info->output_given && ! override)
929 <            continue;
930 <          local_args_info.output_given = 1;
931 <          args_info->output_given = 1;
932 <          if (args_info->output_arg)
455 <            free (args_info->output_arg); /* free previous string */
456 <          args_info->output_arg = gengetopt_strdup (optarg);
457 <          if (args_info->output_orig)
458 <            free (args_info->output_orig); /* free previous string */
459 <          args_info->output_orig = gengetopt_strdup (optarg);
923 >        
924 >        
925 >          if (update_arg( (void *)&(args_info->output_arg),
926 >               &(args_info->output_orig), &(args_info->output_given),
927 >              &(local_args_info.output_given), optarg, 0, 0, ARG_STRING,
928 >              check_ambiguity, override, 0, 0,
929 >              "output", 'o',
930 >              additional_error))
931 >            goto failure;
932 >        
933            break;
934  
462
935          case 0: /* Long option with no short option */
464          /* Lattice type string. Valid types are fcc,hcp,bcc and hcp-water..  */
465          if (strcmp (long_options[option_index].name, "latticetype") == 0)
466          {
467            if (local_args_info.latticetype_given)
468              {
469                fprintf (stderr, "%s: `--latticetype' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
470                goto failure;
471              }
472            if (args_info->latticetype_given && ! override)
473              continue;
474            local_args_info.latticetype_given = 1;
475            args_info->latticetype_given = 1;
476            if (args_info->latticetype_arg)
477              free (args_info->latticetype_arg); /* free previous string */
478            args_info->latticetype_arg = gengetopt_strdup (optarg);
479            if (args_info->latticetype_orig)
480              free (args_info->latticetype_orig); /* free previous string */
481            args_info->latticetype_orig = gengetopt_strdup (optarg);
482          }
936            /* density (g/cm^3).  */
937 <          else if (strcmp (long_options[option_index].name, "density") == 0)
937 >          if (strcmp (long_options[option_index].name, "density") == 0)
938            {
939 <            if (local_args_info.density_given)
940 <              {
941 <                fprintf (stderr, "%s: `--density' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
942 <                goto failure;
943 <              }
944 <            if (args_info->density_given && ! override)
945 <              continue;
946 <            local_args_info.density_given = 1;
494 <            args_info->density_given = 1;
495 <            args_info->density_arg = strtod (optarg, &stop_char);
496 <            if (!(stop_char && *stop_char == '\0')) {
497 <              fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
939 >          
940 >          
941 >            if (update_arg( (void *)&(args_info->density_arg),
942 >                 &(args_info->density_orig), &(args_info->density_given),
943 >                &(local_args_info.density_given), optarg, 0, 0, ARG_DOUBLE,
944 >                check_ambiguity, override, 0, 0,
945 >                "density", '-',
946 >                additional_error))
947                goto failure;
948 <            }
500 <            if (args_info->density_orig)
501 <              free (args_info->density_orig); /* free previous string */
502 <            args_info->density_orig = gengetopt_strdup (optarg);
948 >          
949            }
950            /* number of unit cells in x.  */
951            else if (strcmp (long_options[option_index].name, "nx") == 0)
952            {
953 <            if (local_args_info.nx_given)
954 <              {
955 <                fprintf (stderr, "%s: `--nx' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
956 <                goto failure;
957 <              }
958 <            if (args_info->nx_given && ! override)
959 <              continue;
960 <            local_args_info.nx_given = 1;
515 <            args_info->nx_given = 1;
516 <            args_info->nx_arg = strtol (optarg, &stop_char, 0);
517 <            if (!(stop_char && *stop_char == '\0')) {
518 <              fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
953 >          
954 >          
955 >            if (update_arg( (void *)&(args_info->nx_arg),
956 >                 &(args_info->nx_orig), &(args_info->nx_given),
957 >                &(local_args_info.nx_given), optarg, 0, 0, ARG_INT,
958 >                check_ambiguity, override, 0, 0,
959 >                "nx", '-',
960 >                additional_error))
961                goto failure;
962 <            }
521 <            if (args_info->nx_orig)
522 <              free (args_info->nx_orig); /* free previous string */
523 <            args_info->nx_orig = gengetopt_strdup (optarg);
962 >          
963            }
964            /* number of unit cells in y.  */
965            else if (strcmp (long_options[option_index].name, "ny") == 0)
966            {
967 <            if (local_args_info.ny_given)
968 <              {
969 <                fprintf (stderr, "%s: `--ny' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
970 <                goto failure;
971 <              }
972 <            if (args_info->ny_given && ! override)
973 <              continue;
974 <            local_args_info.ny_given = 1;
536 <            args_info->ny_given = 1;
537 <            args_info->ny_arg = strtol (optarg, &stop_char, 0);
538 <            if (!(stop_char && *stop_char == '\0')) {
539 <              fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
967 >          
968 >          
969 >            if (update_arg( (void *)&(args_info->ny_arg),
970 >                 &(args_info->ny_orig), &(args_info->ny_given),
971 >                &(local_args_info.ny_given), optarg, 0, 0, ARG_INT,
972 >                check_ambiguity, override, 0, 0,
973 >                "ny", '-',
974 >                additional_error))
975                goto failure;
976 <            }
542 <            if (args_info->ny_orig)
543 <              free (args_info->ny_orig); /* free previous string */
544 <            args_info->ny_orig = gengetopt_strdup (optarg);
976 >          
977            }
978            /* number of unit cells in z.  */
979            else if (strcmp (long_options[option_index].name, "nz") == 0)
980            {
981 <            if (local_args_info.nz_given)
982 <              {
983 <                fprintf (stderr, "%s: `--nz' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
984 <                goto failure;
985 <              }
986 <            if (args_info->nz_given && ! override)
987 <              continue;
988 <            local_args_info.nz_given = 1;
557 <            args_info->nz_given = 1;
558 <            args_info->nz_arg = strtol (optarg, &stop_char, 0);
559 <            if (!(stop_char && *stop_char == '\0')) {
560 <              fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], optarg);
981 >          
982 >          
983 >            if (update_arg( (void *)&(args_info->nz_arg),
984 >                 &(args_info->nz_orig), &(args_info->nz_given),
985 >                &(local_args_info.nz_given), optarg, 0, 0, ARG_INT,
986 >                check_ambiguity, override, 0, 0,
987 >                "nz", '-',
988 >                additional_error))
989                goto failure;
990 <            }
563 <            if (args_info->nz_orig)
564 <              free (args_info->nz_orig); /* free previous string */
565 <            args_info->nz_orig = gengetopt_strdup (optarg);
990 >          
991            }
992            /* (Default) Builds a multi-component random mixed nanoparticle. Mole Fraction must be specified for each componet > 1 in MD file..  */
993            else if (strcmp (long_options[option_index].name, "molFraction") == 0)
994            {
570            local_args_info.molFraction_given++;
995            
996 <            multi_token = get_multiple_arg_token(optarg);
997 <            multi_next = get_multiple_arg_token_next (optarg);
996 >            if (update_multiple_arg_temp(&molFraction_list,
997 >                &(local_args_info.molFraction_given), optarg, 0, 0, ARG_DOUBLE,
998 >                "molFraction", '-',
999 >                additional_error))
1000 >              goto failure;
1001            
575            while (1)
576              {
577                molFraction_new = (struct molFraction_list *) malloc (sizeof (struct molFraction_list));
578                molFraction_new->next = molFraction_list;
579                molFraction_list = molFraction_new;
580                molFraction_new->molFraction_arg = strtod (multi_token, &stop_char);
581                if (!(stop_char && *stop_char == '\0')) {
582                  fprintf(stderr, "%s: invalid numeric value: %s\n", argv[0], multi_token);
583                  goto failure;
584                }
585                molFraction_new->molFraction_orig = multi_token;
586          
587                if (multi_next)
588                  {
589                    multi_token = get_multiple_arg_token(multi_next);
590                    multi_next = get_multiple_arg_token_next (multi_next);
591                    local_args_info.molFraction_given++;
592                  }
593                else
594                  break;
595              }
596            break;
1002            }
1003            
1004            break;
# Line 608 | Line 1013 | cmdline_parser_internal (int argc, char * const *argv,
1013      } /* while */
1014  
1015  
1016 <  if (local_args_info.molFraction_given && molFraction_list)
1017 <    {
1018 <      struct molFraction_list *tmp;
1019 <      args_info->molFraction_arg = (double *) realloc (args_info->molFraction_arg, (args_info->molFraction_given + local_args_info.molFraction_given) * sizeof (double));
615 <      args_info->molFraction_orig = (char **) realloc (args_info->molFraction_orig, (args_info->molFraction_given + local_args_info.molFraction_given) * sizeof (char *));
616 <      for (i = (local_args_info.molFraction_given - 1); i >= 0; --i)
617 <        {
618 <          tmp = molFraction_list;
619 <          args_info->molFraction_arg [i + args_info->molFraction_given] = molFraction_list->molFraction_arg;
620 <          args_info->molFraction_orig [i + args_info->molFraction_given] = molFraction_list->molFraction_orig;
621 <          molFraction_list = molFraction_list->next;
622 <          free (tmp);
623 <        }
624 <    }
625 <  
1016 >  update_multiple_arg((void *)&(args_info->molFraction_arg),
1017 >    &(args_info->molFraction_orig), args_info->molFraction_given,
1018 >    local_args_info.molFraction_given, 0,
1019 >    ARG_DOUBLE, molFraction_list);
1020  
1021    args_info->molFraction_given += local_args_info.molFraction_given;
1022    local_args_info.molFraction_given = 0;
# Line 640 | Line 1034 | cmdline_parser_internal (int argc, char * const *argv,
1034    if (optind < argc)
1035      {
1036        int i = 0 ;
1037 +      int found_prog_name = 0;
1038 +      /* whether program name, i.e., argv[0], is in the remaining args
1039 +         (this may happen with some implementations of getopt,
1040 +          but surely not with the one included by gengetopt) */
1041  
1042 <      args_info->inputs_num = argc - optind ;
1042 >      i = optind;
1043 >      while (i < argc)
1044 >        if (argv[i++] == argv[0]) {
1045 >          found_prog_name = 1;
1046 >          break;
1047 >        }
1048 >      i = 0;
1049 >
1050 >      args_info->inputs_num = argc - optind - found_prog_name;
1051        args_info->inputs =
1052          (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ;
1053        while (optind < argc)
1054 <        args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind++]) ;
1054 >        if (argv[optind++] != argv[0])
1055 >          args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ;
1056      }
1057  
1058    return 0;
1059  
1060   failure:
1061 <  if (molFraction_list)
655 <    {
656 <      struct molFraction_list *tmp;
657 <      while (molFraction_list)
658 <        {
659 <          tmp = molFraction_list;
660 <          free (molFraction_list->molFraction_orig);
661 <          molFraction_list = molFraction_list->next;
662 <          free (tmp);
663 <        }
664 <    }
1061 >  free_list (molFraction_list, 0 );
1062    
1063    cmdline_parser_release (&local_args_info);
1064    return (EXIT_FAILURE);

Comparing:
trunk/src/applications/randomBuilder/randomBuilderCmd.c (property svn:keywords), Revision 950 by chuckv, Tue Apr 25 22:59:27 2006 UTC vs.
trunk/src/applications/randomBuilder/randomBuilderCmd.cpp (property svn:keywords), Revision 1795 by gezelter, Fri Sep 7 18:13:55 2012 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines