| 114 | #endif |
| 115 | |
| 116 | int main(int argc, char *argv[]) |
| 117 | { |
| 118 | ROT *my_rot; /* handle to rot (instance) */ |
| 119 | rot_model_t my_model = ROT_MODEL_DUMMY; |
| 120 | |
| 121 | int retcode; /* generic return code from functions */ |
| 122 | int exitcode; |
| 123 | |
| 124 | int verbose = RIG_DEBUG_NONE; |
| 125 | int show_conf = 0; |
| 126 | int dump_caps_opt = 0; |
| 127 | |
| 128 | #ifdef HAVE_READLINE_HISTORY |
| 129 | int rd_hist = 0; |
| 130 | int sv_hist = 0; |
| 131 | const char *hist_dir = NULL; |
| 132 | const char hist_file[] = "/.rotctl_history"; |
| 133 | char *hist_path = NULL; |
| 134 | #endif /* HAVE_READLINE_HISTORY */ |
| 135 | |
| 136 | const char *rot_file = NULL; |
| 137 | const char *rot_file2 = NULL; // for 2nd controller for RT21 |
| 138 | int serial_rate = 0; |
| 139 | char conf_parms[MAXCONFLEN] = ""; |
| 140 | int interactive = 1; /* if no cmd on command line, switch to interactive */ |
| 141 | int prompt = 1; /* Print prompt in rotctl */ |
| 142 | char send_cmd_term = '\r'; /* send_cmd termination char */ |
| 143 | azimuth_t az_offset = 0; |
| 144 | elevation_t el_offset = 0; |
| 145 | |
| 146 | rig_set_debug(verbose); |
| 147 | while (1) |
| 148 | { |
| 149 | int c; |
| 150 | int option_index = 0; |
| 151 | char dummy[2]; |
| 152 | |
| 153 | c = getopt_long(argc, |
| 154 | argv, |
| 155 | SHORT_OPTIONS HST_SHRT_OPTS, |
| 156 | long_options, |
| 157 | &option_index); |
| 158 | |
| 159 | if (c == -1) |
| 160 | { |
| 161 | break; |
| 162 | } |
| 163 | |
| 164 | switch (c) |
| 165 | { |
| 166 | case 'h': |
| 167 | usage(stdout); |
| 168 | exit(0); |
| 169 | |
| 170 | case 'V': |
| 171 | version(); |
| 172 | exit(0); |
| 173 |
nothing calls this directly
no test coverage detected