| 73 | } |
| 74 | |
| 75 | int main(int argc, char *argv[]) |
| 76 | { |
| 77 | int i, j; |
| 78 | bool verbose = false; |
| 79 | bool very_verbose = false; |
| 80 | bool waveform = true; |
| 81 | int num_points = 1; |
| 82 | int num_returns = 3; |
| 83 | double start_time = 0.0; |
| 84 | |
| 85 | LASwriteOpener laswriteopener; |
| 86 | LASwaveform13writer* laswaveform13writer = 0; |
| 87 | |
| 88 | if (argc == 1) |
| 89 | { |
| 90 | fprintf(stderr,"%s is better run in the command line\n", argv[0]); |
| 91 | char file_name[256]; |
| 92 | fprintf(stderr,"enter output file: "); fgets(file_name, 256, stdin); |
| 93 | file_name[strlen(file_name)-1] = '\0'; |
| 94 | laswriteopener.set_file_name(file_name); |
| 95 | } |
| 96 | else |
| 97 | { |
| 98 | laswriteopener.parse(argc, argv); |
| 99 | } |
| 100 | |
| 101 | for (i = 1; i < argc; i++) |
| 102 | { |
| 103 | if (argv[i][0] == '\0') |
| 104 | { |
| 105 | continue; |
| 106 | } |
| 107 | else if (strcmp(argv[i],"-h") == 0 || strcmp(argv[i],"-help") == 0) |
| 108 | { |
| 109 | usage(); |
| 110 | } |
| 111 | else if (strcmp(argv[i],"-v") == 0 || strcmp(argv[i],"-verbose") == 0) |
| 112 | { |
| 113 | verbose = true; |
| 114 | } |
| 115 | else if (strcmp(argv[i],"-vv") == 0 || strcmp(argv[i],"-very_verbose") == 0) |
| 116 | { |
| 117 | verbose = true; |
| 118 | very_verbose = true; |
| 119 | } |
| 120 | else if (i == argc - 1 && !laswriteopener.active()) |
| 121 | { |
| 122 | laswriteopener.set_file_name(argv[i]); |
| 123 | } |
| 124 | else if (strcmp(argv[i],"-no_waveform") == 0 || strcmp(argv[i],"-no_waveforms") == 0) |
| 125 | { |
| 126 | waveform = false; |
| 127 | } |
| 128 | else if (strcmp(argv[i],"-num_points") == 0) |
| 129 | { |
| 130 | if ((i+1) >= argc) |
| 131 | { |
| 132 | fprintf(stderr,"ERROR: '%s' needs 1 argument: number\n", argv[i]); |
nothing calls this directly
no test coverage detected