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

Comparing trunk/OOPSE-4/src/applications/staticProps/StaticPropsCmd.c (file contents):
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
Revision 2240 by tim, Thu May 26 22:45:00 2005 UTC

# Line 1 | Line 1
1   /*
2    File autogenerated by gengetopt version 2.11
3    generated with the following command:
4 <  /home/maul/gezelter/tim/bin/gengetopt -F StaticPropsCmd
4 >  /home/maul/gezelter/tim/bin/gengetopt -i StaticProps.ggo -F StaticPropsCmd
5  
6    The developers of gengetopt consider the fixed text that goes in all
7    gengetopt output files to be in the public domain:
# Line 33 | Line 33 | cmdline_parser_print_help (void)
33   {
34    cmdline_parser_print_version ();
35    printf("\n"
36 <         "Usage: %s [OPTIONS]...\n", CMDLINE_PARSER_PACKAGE);
36 >  "Usage: %s [OPTIONS]...\n", CMDLINE_PARSER_PACKAGE);
37    printf("\n");
38    printf("  -h, --help                      Print help and exit\n");
39    printf("  -V, --version                   Print version and exit\n");
# Line 53 | Line 53 | cmdline_parser_print_help (void)
53    printf("      --r_omega                   g(r, cos(omega))\n");
54    printf("      --theta_omega               g(cos(theta), cos(omega))\n");
55    printf("      --gxyz                      g(x, y, z)\n");
56 +  printf("      --p2                        p2 order parameter\n");
57   }
58  
59  
# Line 94 | Line 95 | cmdline_parser (int argc, char * const *argv, struct g
95    args_info->r_omega_given = 0 ;
96    args_info->theta_omega_given = 0 ;
97    args_info->gxyz_given = 0 ;
98 < #define clear_args() {                          \
99 <    args_info->input_arg = NULL;                \
100 <    args_info->output_arg = NULL;               \
101 <    args_info->step_arg = 1 ;                   \
102 <    args_info->nrbins_arg = 100 ;               \
103 <    args_info->nanglebins_arg = 50 ;            \
104 <    args_info->sele1_arg = NULL;                \
105 <    args_info->sele2_arg = NULL;                \
106 <    args_info->refsele_arg = NULL;              \
107 <  }
98 >  args_info->p2_given = 0 ;
99 > #define clear_args() { \
100 >  args_info->input_arg = NULL; \
101 >  args_info->output_arg = NULL; \
102 >  args_info->step_arg = 1 ;\
103 >  args_info->nrbins_arg = 100 ;\
104 >  args_info->nanglebins_arg = 50 ;\
105 >  args_info->sele1_arg = NULL; \
106 >  args_info->sele2_arg = NULL; \
107 >  args_info->refsele_arg = NULL; \
108 > }
109  
110    clear_args();
111  
# Line 134 | Line 136 | cmdline_parser (int argc, char * const *argv, struct g
136          { "r_omega",    0, NULL, 0 },
137          { "theta_omega",        0, NULL, 0 },
138          { "gxyz",       0, NULL, 0 },
139 +        { "p2", 0, NULL, 0 },
140          { NULL, 0, NULL, 0 }
141        };
142  
# Line 224 | Line 227 | cmdline_parser (int argc, char * const *argv, struct g
227          case 0: /* Long option with no short option */
228            /* select first stuntdouble set.  */
229            if (strcmp (long_options[option_index].name, "sele1") == 0)
230 <            {
231 <              if (args_info->sele1_given)
232 <                {
233 <                  fprintf (stderr, "%s: `--sele1' option given more than once\n", CMDLINE_PARSER_PACKAGE);
234 <                  clear_args ();
235 <                  exit (EXIT_FAILURE);
236 <                }
237 <              args_info->sele1_given = 1;
238 <              args_info->sele1_arg = gengetopt_strdup (optarg);
239 <              break;
240 <            }
230 >          {
231 >            if (args_info->sele1_given)
232 >              {
233 >                fprintf (stderr, "%s: `--sele1' option given more than once\n", CMDLINE_PARSER_PACKAGE);
234 >                clear_args ();
235 >                exit (EXIT_FAILURE);
236 >              }
237 >            args_info->sele1_given = 1;
238 >            args_info->sele1_arg = gengetopt_strdup (optarg);
239 >            break;
240 >          }
241            
242            /* select second stuntdouble set.  */
243            else if (strcmp (long_options[option_index].name, "sele2") == 0)
244 <            {
245 <              if (args_info->sele2_given)
246 <                {
247 <                  fprintf (stderr, "%s: `--sele2' option given more than once\n", CMDLINE_PARSER_PACKAGE);
248 <                  clear_args ();
249 <                  exit (EXIT_FAILURE);
250 <                }
251 <              args_info->sele2_given = 1;
252 <              args_info->sele2_arg = gengetopt_strdup (optarg);
253 <              break;
254 <            }
244 >          {
245 >            if (args_info->sele2_given)
246 >              {
247 >                fprintf (stderr, "%s: `--sele2' option given more than once\n", CMDLINE_PARSER_PACKAGE);
248 >                clear_args ();
249 >                exit (EXIT_FAILURE);
250 >              }
251 >            args_info->sele2_given = 1;
252 >            args_info->sele2_arg = gengetopt_strdup (optarg);
253 >            break;
254 >          }
255            
256            /* select reference (use and only use with --gxyz).  */
257            else if (strcmp (long_options[option_index].name, "refsele") == 0)
258 <            {
259 <              if (args_info->refsele_given)
260 <                {
261 <                  fprintf (stderr, "%s: `--refsele' option given more than once\n", CMDLINE_PARSER_PACKAGE);
262 <                  clear_args ();
263 <                  exit (EXIT_FAILURE);
264 <                }
265 <              args_info->refsele_given = 1;
266 <              args_info->refsele_arg = gengetopt_strdup (optarg);
267 <              break;
268 <            }
258 >          {
259 >            if (args_info->refsele_given)
260 >              {
261 >                fprintf (stderr, "%s: `--refsele' option given more than once\n", CMDLINE_PARSER_PACKAGE);
262 >                clear_args ();
263 >                exit (EXIT_FAILURE);
264 >              }
265 >            args_info->refsele_given = 1;
266 >            args_info->refsele_arg = gengetopt_strdup (optarg);
267 >            break;
268 >          }
269            
270            /* g(r).  */
271            else if (strcmp (long_options[option_index].name, "gofr") == 0)
272 <            {
273 <              if (args_info->gofr_given)
274 <                {
275 <                  fprintf (stderr, "%s: `--gofr' option given more than once\n", CMDLINE_PARSER_PACKAGE);
276 <                  clear_args ();
277 <                  exit (EXIT_FAILURE);
278 <                }
279 <              args_info->gofr_given = 1; staticProps_group_counter += 1;
272 >          {
273 >            if (args_info->gofr_given)
274 >              {
275 >                fprintf (stderr, "%s: `--gofr' option given more than once\n", CMDLINE_PARSER_PACKAGE);
276 >                clear_args ();
277 >                exit (EXIT_FAILURE);
278 >              }
279 >            args_info->gofr_given = 1; staticProps_group_counter += 1;
280            
281 <              break;
282 <            }
281 >            break;
282 >          }
283            
284            /* g(r, cos(theta)).  */
285            else if (strcmp (long_options[option_index].name, "r_theta") == 0)
286 <            {
287 <              if (args_info->r_theta_given)
288 <                {
289 <                  fprintf (stderr, "%s: `--r_theta' option given more than once\n", CMDLINE_PARSER_PACKAGE);
290 <                  clear_args ();
291 <                  exit (EXIT_FAILURE);
292 <                }
293 <              args_info->r_theta_given = 1; staticProps_group_counter += 1;
286 >          {
287 >            if (args_info->r_theta_given)
288 >              {
289 >                fprintf (stderr, "%s: `--r_theta' option given more than once\n", CMDLINE_PARSER_PACKAGE);
290 >                clear_args ();
291 >                exit (EXIT_FAILURE);
292 >              }
293 >            args_info->r_theta_given = 1; staticProps_group_counter += 1;
294            
295 <              break;
296 <            }
295 >            break;
296 >          }
297            
298            /* g(r, cos(omega)).  */
299            else if (strcmp (long_options[option_index].name, "r_omega") == 0)
300 <            {
301 <              if (args_info->r_omega_given)
302 <                {
303 <                  fprintf (stderr, "%s: `--r_omega' option given more than once\n", CMDLINE_PARSER_PACKAGE);
304 <                  clear_args ();
305 <                  exit (EXIT_FAILURE);
306 <                }
307 <              args_info->r_omega_given = 1; staticProps_group_counter += 1;
300 >          {
301 >            if (args_info->r_omega_given)
302 >              {
303 >                fprintf (stderr, "%s: `--r_omega' option given more than once\n", CMDLINE_PARSER_PACKAGE);
304 >                clear_args ();
305 >                exit (EXIT_FAILURE);
306 >              }
307 >            args_info->r_omega_given = 1; staticProps_group_counter += 1;
308            
309 <              break;
310 <            }
309 >            break;
310 >          }
311            
312            /* g(cos(theta), cos(omega)).  */
313            else if (strcmp (long_options[option_index].name, "theta_omega") == 0)
314 <            {
315 <              if (args_info->theta_omega_given)
316 <                {
317 <                  fprintf (stderr, "%s: `--theta_omega' option given more than once\n", CMDLINE_PARSER_PACKAGE);
318 <                  clear_args ();
319 <                  exit (EXIT_FAILURE);
320 <                }
321 <              args_info->theta_omega_given = 1; staticProps_group_counter += 1;
314 >          {
315 >            if (args_info->theta_omega_given)
316 >              {
317 >                fprintf (stderr, "%s: `--theta_omega' option given more than once\n", CMDLINE_PARSER_PACKAGE);
318 >                clear_args ();
319 >                exit (EXIT_FAILURE);
320 >              }
321 >            args_info->theta_omega_given = 1; staticProps_group_counter += 1;
322            
323 <              break;
324 <            }
323 >            break;
324 >          }
325            
326            /* g(x, y, z).  */
327            else if (strcmp (long_options[option_index].name, "gxyz") == 0)
328 <            {
329 <              if (args_info->gxyz_given)
330 <                {
331 <                  fprintf (stderr, "%s: `--gxyz' option given more than once\n", CMDLINE_PARSER_PACKAGE);
332 <                  clear_args ();
333 <                  exit (EXIT_FAILURE);
334 <                }
335 <              args_info->gxyz_given = 1; staticProps_group_counter += 1;
328 >          {
329 >            if (args_info->gxyz_given)
330 >              {
331 >                fprintf (stderr, "%s: `--gxyz' option given more than once\n", CMDLINE_PARSER_PACKAGE);
332 >                clear_args ();
333 >                exit (EXIT_FAILURE);
334 >              }
335 >            args_info->gxyz_given = 1; staticProps_group_counter += 1;
336            
337 <              break;
338 <            }
337 >            break;
338 >          }
339            
340 +          /* p2 order parameter.  */
341 +          else if (strcmp (long_options[option_index].name, "p2") == 0)
342 +          {
343 +            if (args_info->p2_given)
344 +              {
345 +                fprintf (stderr, "%s: `--p2' option given more than once\n", CMDLINE_PARSER_PACKAGE);
346 +                clear_args ();
347 +                exit (EXIT_FAILURE);
348 +              }
349 +            args_info->p2_given = 1; staticProps_group_counter += 1;
350 +          
351 +            break;
352 +          }
353 +          
354  
355          case '?':       /* Invalid option.  */
356            /* `getopt_long' already printed an error message.  */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines