| 229 | } |
| 230 | |
| 231 | int main(int argc, char *argv[]) |
| 232 | { |
| 233 | rig_model_t my_model = RIG_MODEL_DUMMY; |
| 234 | |
| 235 | int retcode; /* generic return code from functions */ |
| 236 | |
| 237 | int show_conf = 0; |
| 238 | int dump_caps_opt = 0; |
| 239 | const char *rig_file = NULL, *ptt_file = NULL, *dcd_file = NULL; |
| 240 | ptt_type_t ptt_type = RIG_PTT_NONE; |
| 241 | dcd_type_t dcd_type = RIG_DCD_NONE; |
| 242 | int serial_rate = 0; |
| 243 | char *civaddr = NULL; /* NULL means no need to set conf */ |
| 244 | char conf_parms[MAXCONFLEN] = ""; |
| 245 | |
| 246 | struct addrinfo hints, *result, *saved_result; |
| 247 | int sock_listen; |
| 248 | int reuseaddr = 1; |
| 249 | int twiddle_timeout = 0; |
| 250 | int twiddle_rit = 0; |
| 251 | int uplink = 0; |
| 252 | char host[NI_MAXHOST]; |
| 253 | char serv[NI_MAXSERV]; |
| 254 | char rigstartup[1024]; |
| 255 | char vbuf[1024]; |
| 256 | #if HAVE_SIGACTION |
| 257 | struct sigaction act; |
| 258 | #endif |
| 259 | |
| 260 | pthread_t thread; |
| 261 | pthread_attr_t attr; |
| 262 | int vfo_mode = 0; /* vfo_mode=0 means target VFO is current VFO */ |
| 263 | int i; |
| 264 | extern int is_rigctld; |
| 265 | struct rig_state *rs; |
| 266 | |
| 267 | is_rigctld = 1; |
| 268 | |
| 269 | int err = setvbuf(stderr, vbuf, _IOFBF, sizeof(vbuf)); |
| 270 | |
| 271 | if (err) { rig_debug(RIG_DEBUG_ERR, "%s: setvbuf err=%s\n", __func__, strerror(err)); } |
| 272 | |
| 273 | rig_set_debug(verbose); |
| 274 | while (1) |
| 275 | { |
| 276 | int c; |
| 277 | int option_index = 0; |
| 278 | char dummy[2]; |
| 279 | |
| 280 | c = getopt_long(argc, |
| 281 | argv, |
| 282 | SHORT_OPTIONS, |
| 283 | long_options, |
| 284 | &option_index); |
| 285 | |
| 286 | if (c == -1) |
| 287 | { |
| 288 | break; |
nothing calls this directly
no test coverage detected