| 110 | |
| 111 | |
| 112 | int main(int argc, char *argv[]) |
| 113 | { |
| 114 | AMP *my_amp; /* handle to amp (instance) */ |
| 115 | amp_model_t my_model = AMP_MODEL_DUMMY; |
| 116 | |
| 117 | int retcode; /* generic return code from functions */ |
| 118 | int exitcode; |
| 119 | |
| 120 | int verbose = RIG_DEBUG_NONE; |
| 121 | int show_conf = 0; |
| 122 | int dump_caps_opt = 0; |
| 123 | |
| 124 | #ifdef HAVE_READLINE_HISTORY |
| 125 | int rd_hist = 0; |
| 126 | int sv_hist = 0; |
| 127 | const char *hist_dir = NULL; |
| 128 | const char hist_file[] = "/.ampctl_history"; |
| 129 | char *hist_path = NULL; |
| 130 | #endif /* HAVE_READLINE_HISTORY */ |
| 131 | |
| 132 | const char *amp_file = NULL; |
| 133 | int serial_rate = 0; |
| 134 | char conf_parms[MAXCONFLEN] = ""; |
| 135 | |
| 136 | rig_set_debug(verbose); |
| 137 | while (1) |
| 138 | { |
| 139 | int c; |
| 140 | int option_index = 0; |
| 141 | char dummy[2]; |
| 142 | |
| 143 | c = getopt_long(argc, |
| 144 | argv, |
| 145 | SHORT_OPTIONS HST_SHRT_OPTS, |
| 146 | long_options, |
| 147 | &option_index); |
| 148 | |
| 149 | if (c == -1) |
| 150 | { |
| 151 | break; |
| 152 | } |
| 153 | |
| 154 | switch (c) |
| 155 | { |
| 156 | case 'h': |
| 157 | usage(stdout); |
| 158 | exit(0); |
| 159 | |
| 160 | case 'V': |
| 161 | version(); |
| 162 | exit(0); |
| 163 | |
| 164 | case 'm': |
| 165 | my_model = atoi(optarg); |
| 166 | break; |
| 167 | |
| 168 | case 'r': |
| 169 | amp_file = optarg; |
nothing calls this directly
no test coverage detected