| 89 | int all; |
| 90 | |
| 91 | int main(int argc, char *argv[]) |
| 92 | { |
| 93 | RIG *rig; /* handle to rig (instance) */ |
| 94 | rig_model_t my_model = RIG_MODEL_DUMMY; |
| 95 | |
| 96 | int retcode; /* generic return code from functions */ |
| 97 | |
| 98 | int verbose = RIG_DEBUG_NONE; |
| 99 | #ifdef HAVE_XML2 |
| 100 | int xml = 0; |
| 101 | #endif |
| 102 | const char *rig_file = NULL; |
| 103 | int serial_rate = 0; |
| 104 | char *civaddr = NULL; /* NULL means no need to set conf */ |
| 105 | char conf_parms[MAXCONFLEN] = ""; |
| 106 | extern char csv_sep; |
| 107 | |
| 108 | rig_set_debug(verbose); |
| 109 | while (1) |
| 110 | { |
| 111 | int c; |
| 112 | int option_index = 0; |
| 113 | char dummy[2]; |
| 114 | |
| 115 | c = getopt_long(argc, argv, SHORT_OPTIONS, long_options, &option_index); |
| 116 | |
| 117 | if (c == -1) |
| 118 | { |
| 119 | break; |
| 120 | } |
| 121 | |
| 122 | switch (c) |
| 123 | { |
| 124 | case 'h': |
| 125 | usage(stdout); |
| 126 | exit(0); |
| 127 | |
| 128 | case 'V': |
| 129 | version(); |
| 130 | exit(0); |
| 131 | |
| 132 | case 'm': |
| 133 | my_model = atoi(optarg); |
| 134 | break; |
| 135 | |
| 136 | case 'r': |
| 137 | rig_file = optarg; |
| 138 | break; |
| 139 | |
| 140 | case 'c': |
| 141 | civaddr = optarg; |
| 142 | break; |
| 143 | |
| 144 | case 's': |
| 145 | if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) |
| 146 | { |
| 147 | fprintf(stderr, "Invalid baud rate of %s\n", optarg); |
| 148 | exit(1); |
nothing calls this directly
no test coverage detected