| 2 | 
  | 
#include <fstream> | 
| 3 | 
  | 
#include <string> | 
| 4 | 
  | 
#include <vector> | 
| 5 | 
+ | 
#include <cmath> | 
| 6 | 
  | 
#include "visualizerCmd.h" | 
| 7 | 
+ | 
#include "SHAPE.hpp" | 
| 8 | 
  | 
 | 
| 7 | 
– | 
 | 
| 8 | 
– | 
int count_tokens(char *line, char *delimiters); | 
| 9 | 
  | 
using namespace std; | 
| 10 | 
  | 
 | 
| 11 | 
  | 
int main(int argc, char* argv[]){ | 
| 18 | 
  | 
  double r, theta, phi, f, s, w, w0; | 
| 19 | 
  | 
  double fp, sp, wp, tot; | 
| 20 | 
  | 
  double rup, ru, rlow; | 
| 21 | 
< | 
  FILE *my_file; | 
| 21 | 
> | 
  char* shapeFileName; | 
| 22 | 
> | 
  SHAPE* shape; | 
| 23 | 
> | 
  FILE* my_file; | 
| 24 | 
  | 
 | 
| 25 | 
  | 
  //parse the command line options | 
| 26 | 
  | 
  if (cmdline_parser (argc, argv, &args_info) != 0) | 
| 27 | 
  | 
    exit(1) ; | 
| 28 | 
  | 
 | 
| 29 | 
< | 
  if (args_info.input_given){ | 
| 30 | 
< | 
    shapeFileName = args_info.input_arg; | 
| 29 | 
> | 
  if (args_info.shape_given){ | 
| 30 | 
> | 
    shapeFileName = args_info.shape_arg; | 
| 31 | 
  | 
  } | 
| 32 | 
  | 
  else{ | 
| 33 | 
  | 
    std::cerr << "Does not have shape file name" << endl; | 
| 34 | 
  | 
    exit(1); | 
| 35 | 
  | 
  } | 
| 36 | 
+ | 
 | 
| 37 | 
+ | 
  shape = new SHAPE(); | 
| 38 | 
+ | 
  shape->readSHAPEfile(shapeFileName); | 
| 39 | 
+ | 
 | 
| 40 | 
  | 
   | 
| 41 | 
  | 
  // grid has a default value (default=51), so it is always given | 
| 42 | 
  | 
  npts = args_info.grid_arg; | 
| 43 | 
  | 
 | 
| 44 | 
< | 
  printf ("opening %s\n", shapeFileName); | 
| 39 | 
< | 
  shapeFile = fopen( shapeFileName, "r" ); | 
| 44 | 
> | 
   | 
| 45 | 
  | 
 | 
| 46 | 
  | 
 | 
| 42 | 
– | 
 | 
| 47 | 
  | 
  my_file = fopen("junk.dat", "w"); | 
| 48 | 
  | 
  if (my_file == NULL) { | 
| 49 | 
  | 
    (void) fprintf(stderr, "No File\n"); |