| 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 | 
  | 
  } | 
| 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 | 
  | 
 |