ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/SHAPES/visualizer.cpp
(Generate patch)

Comparing trunk/SHAPES/visualizer.cpp (file contents):
Revision 1315 by chrisfen, Mon Jun 28 23:05:25 2004 UTC vs.
Revision 1361 by gezelter, Tue Jul 20 20:22:43 2004 UTC

# Line 32 | Line 32 | int main(int argc, char* argv[]){
32    if (cmdline_parser (argc, argv, &args_info) != 0)
33      exit(1) ;
34  
35 <  if (args_info.shape_given){
36 <    shapeFileName = args_info.shape_arg;
37 <  }
38 <  else{
35 >
36 >  if (args_info.inputs_num > 0) {
37 >      shapeFileName = args_info.inputs[0];
38 >  } else {
39      std::cerr << "Does not have shape file name" << endl;
40      exit(1);
41    }
# Line 43 | Line 43 | int main(int argc, char* argv[]){
43    shape = new SHAPE();
44    shape->readSHAPEfile(shapeFileName);
45  
46 <
47 <  if (args_info.output_given){
48 <    outputFileName = args_info.output_arg;
46 >  if (args_info.inputs_num > 1) {
47 >      outputFileName = args_info.inputs[1];
48 >  } else {
49 >    std::cerr << "No output file name specified." << endl;
50 >    outputFileName = strdup(shapeFileName);
51 >    strcat(outputFileName, ".viz");
52 >    std::cerr << "Using: " << outputFileName << endl;
53    }
50  else{
51    std::cerr << "Does not have output file name" << endl;
52    exit(1);
53  }
54  
55    outputFile = fopen(outputFileName, "w");
56  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines