ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-1.0/utils/sysbuilder/simpleBuilderCmd.c
(Generate patch)

Comparing trunk/OOPSE-1.0/utils/sysbuilder/simpleBuilderCmd.c (file contents):
Revision 1432 by tim, Thu Jul 29 03:31:50 2004 UTC vs.
Revision 1436 by tim, Thu Jul 29 19:12:00 2004 UTC

# Line 39 | Line 39 | cmdline_parser_print_help (void)
39    printf("  -V, --version             Print version and exit\n");
40    printf("  -o, --output=STRING       Output file name\n");
41    printf("      --latticetype=STRING  Lattice type string. Valid types are fcc,hcp,bcc \n                              and hcp-water.  (default=`fcc')\n");
42 <  printf("      --density=DOUBLE      density g/cm^3\n");
43 <  printf("      --ndensity=DOUBLE     number density\n");
42 >  printf("      --density=DOUBLE      density (g/cm^3)\n");
43    printf("      --nx=INT              number of unit cells in x\n");
44    printf("      --ny=INT              number of unit cells in y\n");
45    printf("      --nz=INT              number of unit cells in z\n");
# Line 72 | Line 71 | cmdline_parser (int argc, char * const *argv, struct g
71    args_info->output_given = 0 ;
72    args_info->latticetype_given = 0 ;
73    args_info->density_given = 0 ;
75  args_info->ndensity_given = 0 ;
74    args_info->nx_given = 0 ;
75    args_info->ny_given = 0 ;
76    args_info->nz_given = 0 ;
# Line 102 | Line 100 | cmdline_parser (int argc, char * const *argv, struct g
100          { "output",     1, NULL, 'o' },
101          { "latticetype",        1, NULL, 0 },
102          { "density",    1, NULL, 0 },
105        { "ndensity",   1, NULL, 0 },
103          { "nx", 1, NULL, 0 },
104          { "ny", 1, NULL, 0 },
105          { "nz", 1, NULL, 0 },
# Line 155 | Line 152 | cmdline_parser (int argc, char * const *argv, struct g
152              break;
153            }
154            
155 <          /* density g/cm^3.  */
155 >          /* density (g/cm^3).  */
156            else if (strcmp (long_options[option_index].name, "density") == 0)
157            {
158              if (args_info->density_given)
# Line 166 | Line 163 | cmdline_parser (int argc, char * const *argv, struct g
163                }
164              args_info->density_given = 1;
165              args_info->density_arg = strtod (optarg, NULL);
169            break;
170          }
171          
172          /* number density.  */
173          else if (strcmp (long_options[option_index].name, "ndensity") == 0)
174          {
175            if (args_info->ndensity_given)
176              {
177                fprintf (stderr, "%s: `--ndensity' option given more than once\n", CMDLINE_PARSER_PACKAGE);
178                clear_args ();
179                exit (EXIT_FAILURE);
180              }
181            args_info->ndensity_given = 1;
182            args_info->ndensity_arg = strtod (optarg, NULL);
166              break;
167            }
168            
# Line 237 | Line 220 | cmdline_parser (int argc, char * const *argv, struct g
220      } /* while */
221  
222  
223 +  if (! args_info->density_given)
224 +    {
225 +      fprintf (stderr, "%s: '--density' option required\n", CMDLINE_PARSER_PACKAGE);
226 +      missing_required_options = 1;
227 +    }
228    if (! args_info->nx_given)
229      {
230        fprintf (stderr, "%s: '--nx' option required\n", CMDLINE_PARSER_PACKAGE);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines