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

Comparing trunk/OOPSE-3.0/src/applications/nanoRodBuilder/nanorodBuilderCmd.c (file contents):
Revision 2215 by chuckv, Thu Apr 28 00:24:11 2005 UTC vs.
Revision 2218 by chuckv, Tue May 3 17:55:28 2005 UTC

# Line 46 | Line 46 | void clear_given (struct gengetopt_args_info *args_inf
46    args_info->width_given = 0 ;
47    args_info->latticeCnst_given = 0 ;
48    args_info->genGeomview_given = 0 ;
49 +  args_info->twinnedCrystal_given = 0 ;
50   }
51  
52   static
# Line 54 | Line 55 | void clear_args (struct gengetopt_args_info *args_info
55    args_info->output_arg = NULL;
56    args_info->latticetype_arg = gengetopt_strdup ("fcc");
57    args_info->genGeomview_flag = 0;
58 +  args_info->twinnedCrystal_flag = 0;
59   }
60  
61   void
# Line 76 | Line 78 | cmdline_parser_print_help (void)
78    printf("%s\n","      --width=DOUBLE        diameter  of nanorod in Angstroms");
79    printf("%s\n","      --latticeCnst=DOUBLE  lattice spacing in Angstrons for cubic lattice");
80    printf("%s\n","      --genGeomview         generate a geomview file with the object geometry  \n                              (default=off)");
81 +  printf("%s\n","      --twinnedCrystal      generate a twinned crystal nanorod  (default=off)");
82    
83   }
84  
# Line 225 | Line 228 | cmdline_parser_internal (int argc, char * const *argv,
228          { "width",      1, NULL, 0 },
229          { "latticeCnst",        1, NULL, 0 },
230          { "genGeomview",        0, NULL, 0 },
231 +        { "twinnedCrystal",     0, NULL, 0 },
232          { NULL, 0, NULL, 0 }
233        };
234  
# Line 331 | Line 335 | cmdline_parser_internal (int argc, char * const *argv,
335              local_args_info.genGeomview_given = 1;
336              args_info->genGeomview_given = 1;
337              args_info->genGeomview_flag = !(args_info->genGeomview_flag);
338 +          }
339 +          /* generate a twinned crystal nanorod.  */
340 +          else if (strcmp (long_options[option_index].name, "twinnedCrystal") == 0)
341 +          {
342 +            if (local_args_info.twinnedCrystal_given)
343 +              {
344 +                fprintf (stderr, "%s: `--twinnedCrystal' option given more than once%s\n", argv[0], (additional_error ? additional_error : ""));
345 +                goto failure;
346 +              }
347 +            if (args_info->twinnedCrystal_given && ! override)
348 +              continue;
349 +            local_args_info.twinnedCrystal_given = 1;
350 +            args_info->twinnedCrystal_given = 1;
351 +            args_info->twinnedCrystal_flag = !(args_info->twinnedCrystal_flag);
352            }
353            
354            break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines