pull/1755/head
Nate Bargmann 2025-06-05 21:42:20 -05:00
commit c92fee947a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: FB2C5130D55A8819
12 zmienionych plików z 0 dodań i 684 usunięć

Wyświetl plik

@ -160,32 +160,14 @@ int main(int argc, char *argv[])
exit(0); exit(0);
case 'm': case 'm':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
my_model = atoi(optarg); my_model = atoi(optarg);
break; break;
case 'r': case 'r':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
amp_file = optarg; amp_file = optarg;
break; break;
case 's': case 's':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1)
{ {
fprintf(stderr, "Invalid baud rate of %s\n", optarg); fprintf(stderr, "Invalid baud rate of %s\n", optarg);
@ -195,12 +177,6 @@ int main(int argc, char *argv[])
break; break;
case 'C': case 'C':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (*conf_parms != '\0') if (*conf_parms != '\0')
{ {
strcat(conf_parms, ","); strcat(conf_parms, ",");
@ -217,12 +193,6 @@ int main(int argc, char *argv[])
break; break;
case 't': case 't':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (strlen(optarg) > 1) if (strlen(optarg) > 1)
{ {
send_cmd_term = strtol(optarg, NULL, 0); send_cmd_term = strtol(optarg, NULL, 0);

Wyświetl plik

@ -203,32 +203,14 @@ int main(int argc, char *argv[])
exit(0); exit(0);
case 'm': case 'm':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
my_model = atoi(optarg); my_model = atoi(optarg);
break; break;
case 'r': case 'r':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
amp_file = optarg; amp_file = optarg;
break; break;
case 's': case 's':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1)
{ {
fprintf(stderr, "Invalid baud rate of %s\n", optarg); fprintf(stderr, "Invalid baud rate of %s\n", optarg);
@ -238,12 +220,6 @@ int main(int argc, char *argv[])
break; break;
case 'C': case 'C':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (*conf_parms != '\0') if (*conf_parms != '\0')
{ {
strcat(conf_parms, ","); strcat(conf_parms, ",");
@ -260,22 +236,10 @@ int main(int argc, char *argv[])
break; break;
case 't': case 't':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
portno = optarg; portno = optarg;
break; break;
case 'T': case 'T':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
src_addr = optarg; src_addr = optarg;
break; break;

Wyświetl plik

@ -276,52 +276,22 @@ int main(int argc, char *argv[])
exit(0); exit(0);
case 'm': case 'm':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
my_model = atoi(optarg); my_model = atoi(optarg);
break; break;
case 'r': case 'r':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rig_file = optarg; rig_file = optarg;
break; break;
case 'p': case 'p':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
ptt_file = optarg; ptt_file = optarg;
break; break;
case 'd': case 'd':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
dcd_file = optarg; dcd_file = optarg;
break; break;
case 'P': case 'P':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (!strcmp(optarg, "RIG")) if (!strcmp(optarg, "RIG"))
{ {
ptt_type = RIG_PTT_RIG; ptt_type = RIG_PTT_RIG;
@ -363,12 +333,6 @@ int main(int argc, char *argv[])
break; break;
case 'D': case 'D':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (!strcmp(optarg, "RIG")) if (!strcmp(optarg, "RIG"))
{ {
dcd_type = RIG_DCD_RIG; dcd_type = RIG_DCD_RIG;
@ -414,22 +378,10 @@ int main(int argc, char *argv[])
break; break;
case 'c': case 'c':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
civaddr = optarg; civaddr = optarg;
break; break;
case 't': case 't':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (strlen(optarg) > 1) if (strlen(optarg) > 1)
{ {
send_cmd_term = strtol(optarg, NULL, 0); send_cmd_term = strtol(optarg, NULL, 0);
@ -442,12 +394,6 @@ int main(int argc, char *argv[])
break; break;
case 's': case 's':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1)
{ {
fprintf(stderr, "Invalid baud rate of %s\n", optarg); fprintf(stderr, "Invalid baud rate of %s\n", optarg);
@ -457,12 +403,6 @@ int main(int argc, char *argv[])
break; break;
case 'C': case 'C':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (*conf_parms != '\0') if (*conf_parms != '\0')
{ {
strcat(conf_parms, ","); strcat(conf_parms, ",");

Wyświetl plik

@ -259,63 +259,27 @@ int main(int argc, char *argv[])
break; break;
case 'm': case 'm':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
my_model = atoi(optarg); my_model = atoi(optarg);
break; break;
case 'r': case 'r':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rig_file = optarg; rig_file = optarg;
break; break;
case 'R': case 'R':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rig_file2 = optarg; rig_file2 = optarg;
break; break;
case 'p': case 'p':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
ptt_file = optarg; ptt_file = optarg;
break; break;
case 'd': case 'd':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
dcd_file = optarg; dcd_file = optarg;
break; break;
case 'P': case 'P':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (!strcmp(optarg, "RIG")) if (!strcmp(optarg, "RIG"))
{ {
ptt_type = RIG_PTT_RIG; ptt_type = RIG_PTT_RIG;
@ -348,12 +312,6 @@ int main(int argc, char *argv[])
break; break;
case 'D': case 'D':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (!strcmp(optarg, "RIG")) if (!strcmp(optarg, "RIG"))
{ {
dcd_type = RIG_DCD_RIG; dcd_type = RIG_DCD_RIG;
@ -386,22 +344,10 @@ int main(int argc, char *argv[])
break; break;
case 'c': case 'c':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
civaddr = optarg; civaddr = optarg;
break; break;
case 's': case 's':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1)
{ {
fprintf(stderr, "Invalid baud rate of %s\n", optarg); fprintf(stderr, "Invalid baud rate of %s\n", optarg);
@ -411,23 +357,11 @@ int main(int argc, char *argv[])
break; break;
case 'S': case 'S':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
serial_rate2 = atoi(optarg); serial_rate2 = atoi(optarg);
break; break;
case 'C': case 'C':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (*conf_parms != '\0') if (*conf_parms != '\0')
{ {
strcat(conf_parms, ","); strcat(conf_parms, ",");

Wyświetl plik

@ -334,52 +334,22 @@ int main(int argc, char *argv[])
break; break;
case 'm': case 'm':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
my_model = atoi(optarg); my_model = atoi(optarg);
break; break;
case 'r': case 'r':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rig_file = optarg; rig_file = optarg;
break; break;
case 'p': case 'p':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
ptt_file = optarg; ptt_file = optarg;
break; break;
case 'd': case 'd':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
dcd_file = optarg; dcd_file = optarg;
break; break;
case 'P': case 'P':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (!strcmp(optarg, "RIG")) if (!strcmp(optarg, "RIG"))
{ {
ptt_type = RIG_PTT_RIG; ptt_type = RIG_PTT_RIG;
@ -421,12 +391,6 @@ int main(int argc, char *argv[])
break; break;
case 'D': case 'D':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (!strcmp(optarg, "RIG")) if (!strcmp(optarg, "RIG"))
{ {
dcd_type = RIG_DCD_RIG; dcd_type = RIG_DCD_RIG;
@ -472,33 +436,15 @@ int main(int argc, char *argv[])
break; break;
case 'c': case 'c':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
civaddr = optarg; civaddr = optarg;
break; break;
case 'S': case 'S':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
resp_sep = *optarg; resp_sep = *optarg;
rig_debug(RIG_DEBUG_VERBOSE, "%s: resp_sep=%c\n", __func__, resp_sep); rig_debug(RIG_DEBUG_VERBOSE, "%s: resp_sep=%c\n", __func__, resp_sep);
break; break;
case 's': case 's':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1)
{ {
fprintf(stderr, "Invalid baud rate of %s\n", optarg); fprintf(stderr, "Invalid baud rate of %s\n", optarg);
@ -508,12 +454,6 @@ int main(int argc, char *argv[])
break; break;
case 'C': case 'C':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (strcmp(optarg, "auto_power_on=0") == 0) if (strcmp(optarg, "auto_power_on=0") == 0)
{ {
rig_debug(RIG_DEBUG_ERR, "%s: skipping rig_open\n", __func__); rig_debug(RIG_DEBUG_ERR, "%s: skipping rig_open\n", __func__);
@ -540,22 +480,10 @@ int main(int argc, char *argv[])
break; break;
case 't': case 't':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
portno = optarg; portno = optarg;
break; break;
case 'T': case 'T':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
src_addr = optarg; src_addr = optarg;
break; break;
@ -581,24 +509,12 @@ int main(int argc, char *argv[])
break; break;
case 'W': case 'W':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
twiddle_timeout = atoi(optarg); twiddle_timeout = atoi(optarg);
fprintf(stderr, fprintf(stderr,
"twiddle_timeout is deprecated...use e.g. --set-conf=twiddle_timeout=5\n"); "twiddle_timeout is deprecated...use e.g. --set-conf=twiddle_timeout=5\n");
break; break;
case 'w': case 'w':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
twiddle_rit = atoi(optarg); twiddle_rit = atoi(optarg);
fprintf(stderr, fprintf(stderr,
"twiddle_rit is deprecated...use e.g. --set-conf=twiddle_rit=1\n"); "twiddle_rit is deprecated...use e.g. --set-conf=twiddle_rit=1\n");
@ -606,12 +522,6 @@ int main(int argc, char *argv[])
case 'x': case 'x':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
uplink = atoi(optarg); uplink = atoi(optarg);
break; break;

Wyświetl plik

@ -248,12 +248,6 @@ int main(int argc, char *argv[])
case 'm': case 'm':
case 'M': case 'M':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (c == 'm') if (c == 'm')
{ {
my_model[0] = atoi(optarg); my_model[0] = atoi(optarg);
@ -266,22 +260,10 @@ int main(int argc, char *argv[])
break; break;
case 'r': case 'r':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rig_file = optarg; rig_file = optarg;
break; break;
case 'R': case 'R':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rig_file2 = optarg; rig_file2 = optarg;
break; break;
@ -289,12 +271,6 @@ int main(int argc, char *argv[])
#if 0 #if 0
case 'p': case 'p':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
ptt_file = optarg; ptt_file = optarg;
break; break;
#endif #endif
@ -302,12 +278,6 @@ int main(int argc, char *argv[])
#if 0 #if 0
case 'd': case 'd':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
dcd_file = optarg; dcd_file = optarg;
break; break;
#endif #endif
@ -315,12 +285,6 @@ int main(int argc, char *argv[])
#if 0 #if 0
case 'P': case 'P':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (!strcmp(optarg, "RIG")) if (!strcmp(optarg, "RIG"))
{ {
ptt_type = RIG_PTT_RIG; ptt_type = RIG_PTT_RIG;
@ -356,12 +320,6 @@ int main(int argc, char *argv[])
#if 0 #if 0
case 'D': case 'D':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (!strcmp(optarg, "RIG")) if (!strcmp(optarg, "RIG"))
{ {
dcd_type = RIG_DCD_RIG; dcd_type = RIG_DCD_RIG;
@ -395,22 +353,10 @@ int main(int argc, char *argv[])
#endif #endif
case 'c': case 'c':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
civaddr = optarg; civaddr = optarg;
break; break;
case 's': case 's':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1)
{ {
fprintf(stderr, "Invalid baud rate of %s\n", optarg); fprintf(stderr, "Invalid baud rate of %s\n", optarg);
@ -420,23 +366,11 @@ int main(int argc, char *argv[])
break; break;
case 'S': case 'S':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
serial_rate2 = atoi(optarg); serial_rate2 = atoi(optarg);
break; break;
case 'C': case 'C':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (*conf_parms != '\0') if (*conf_parms != '\0')
{ {
strcat(conf_parms, ","); strcat(conf_parms, ",");

Wyświetl plik

@ -331,52 +331,22 @@ int main(int argc, char *argv[])
break; break;
case 'm': case 'm':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
my_model = atoi(optarg); my_model = atoi(optarg);
break; break;
case 'r': case 'r':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rig_file = optarg; rig_file = optarg;
break; break;
case 'p': case 'p':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
ptt_file = optarg; ptt_file = optarg;
break; break;
case 'd': case 'd':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
dcd_file = optarg; dcd_file = optarg;
break; break;
case 'P': case 'P':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (!strcmp(optarg, "RIG")) if (!strcmp(optarg, "RIG"))
{ {
ptt_type = RIG_PTT_RIG; ptt_type = RIG_PTT_RIG;
@ -418,12 +388,6 @@ int main(int argc, char *argv[])
break; break;
case 'D': case 'D':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (!strcmp(optarg, "RIG")) if (!strcmp(optarg, "RIG"))
{ {
dcd_type = RIG_DCD_RIG; dcd_type = RIG_DCD_RIG;
@ -469,33 +433,15 @@ int main(int argc, char *argv[])
break; break;
case 'c': case 'c':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
civaddr = optarg; civaddr = optarg;
break; break;
case 'S': case 'S':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
resp_sep = *optarg; resp_sep = *optarg;
rig_debug(RIG_DEBUG_VERBOSE, "%s: resp_sep=%c\n", __func__, resp_sep); rig_debug(RIG_DEBUG_VERBOSE, "%s: resp_sep=%c\n", __func__, resp_sep);
break; break;
case 's': case 's':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1)
{ {
fprintf(stderr, "Invalid baud rate of %s\n", optarg); fprintf(stderr, "Invalid baud rate of %s\n", optarg);
@ -505,12 +451,6 @@ int main(int argc, char *argv[])
break; break;
case 'C': case 'C':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (*conf_parms != '\0') if (*conf_parms != '\0')
{ {
strcat(conf_parms, ","); strcat(conf_parms, ",");
@ -527,22 +467,10 @@ int main(int argc, char *argv[])
break; break;
case 't': case 't':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
portno = optarg; portno = optarg;
break; break;
case 'T': case 'T':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
src_addr = optarg; src_addr = optarg;
break; break;
@ -568,24 +496,12 @@ int main(int argc, char *argv[])
break; break;
case 'W': case 'W':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
twiddle_timeout = atoi(optarg); twiddle_timeout = atoi(optarg);
fprintf(stderr, fprintf(stderr,
"twiddle_timeout is deprecated...use e.g. --set-conf=twiddle_timeout=5\n"); "twiddle_timeout is deprecated...use e.g. --set-conf=twiddle_timeout=5\n");
break; break;
case 'w': case 'w':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
twiddle_rit = atoi(optarg); twiddle_rit = atoi(optarg);
fprintf(stderr, fprintf(stderr,
"twiddle_rit is deprecated...use e.g. --set-conf=twiddle_rit=1\n"); "twiddle_rit is deprecated...use e.g. --set-conf=twiddle_rit=1\n");
@ -593,12 +509,6 @@ int main(int argc, char *argv[])
case 'x': case 'x':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
uplink = atoi(optarg); uplink = atoi(optarg);
break; break;
@ -608,22 +518,10 @@ int main(int argc, char *argv[])
break; break;
case 'M': case 'M':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
multicast_addr = optarg; multicast_addr = optarg;
break; break;
case 'n': case 'n':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
multicast_port = atoi(optarg); multicast_port = atoi(optarg);
if (multicast_port == 0) if (multicast_port == 0)

Wyświetl plik

@ -128,42 +128,18 @@ int main(int argc, char *argv[])
exit(0); exit(0);
case 'm': case 'm':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
my_model = atoi(optarg); my_model = atoi(optarg);
break; break;
case 'r': case 'r':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rig_file = optarg; rig_file = optarg;
break; break;
case 'c': case 'c':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
civaddr = optarg; civaddr = optarg;
break; break;
case 's': case 's':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1)
{ {
fprintf(stderr, "Invalid baud rate of %s\n", optarg); fprintf(stderr, "Invalid baud rate of %s\n", optarg);
@ -173,12 +149,6 @@ int main(int argc, char *argv[])
break; break;
case 'C': case 'C':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (*conf_parms != '\0') if (*conf_parms != '\0')
{ {
strcat(conf_parms, ","); strcat(conf_parms, ",");
@ -195,12 +165,6 @@ int main(int argc, char *argv[])
break; break;
case 'p': case 'p':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
csv_sep = optarg[0]; csv_sep = optarg[0];
break; break;

Wyświetl plik

@ -113,42 +113,18 @@ int main(int argc, char *argv[])
exit(0); exit(0);
case 'm': case 'm':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rig_model = atoi(optarg); rig_model = atoi(optarg);
break; break;
case 'r': case 'r':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rig_file = optarg; rig_file = optarg;
break; break;
case 'c': case 'c':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
civaddr = optarg; civaddr = optarg;
break; break;
case 's': case 's':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1)
{ {
fprintf(stderr, "Invalid baud rate of %s\n", optarg); fprintf(stderr, "Invalid baud rate of %s\n", optarg);
@ -158,12 +134,6 @@ int main(int argc, char *argv[])
break; break;
case 'C': case 'C':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (*rig_conf_parms != '\0') if (*rig_conf_parms != '\0')
{ {
strcat(rig_conf_parms, ","); strcat(rig_conf_parms, ",");
@ -180,42 +150,18 @@ int main(int argc, char *argv[])
break; break;
case 'M': case 'M':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rot_model = atoi(optarg); rot_model = atoi(optarg);
break; break;
case 'R': case 'R':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rot_file = optarg; rot_file = optarg;
break; break;
case 'S': case 'S':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rot_serial_rate = atoi(optarg); rot_serial_rate = atoi(optarg);
break; break;
case 'N': case 'N':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (*rot_conf_parms != '\0') if (*rot_conf_parms != '\0')
{ {
strcat(rot_conf_parms, ","); strcat(rot_conf_parms, ",");

Wyświetl plik

@ -103,42 +103,18 @@ int main(int argc, char *argv[])
exit(0); exit(0);
case 'm': case 'm':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
my_model = atoi(optarg); my_model = atoi(optarg);
break; break;
case 'r': case 'r':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rig_file = optarg; rig_file = optarg;
break; break;
case 'c': case 'c':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
civaddr = optarg; civaddr = optarg;
break; break;
case 's': case 's':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1)
{ {
fprintf(stderr, "Invalid baud rate of %s\n", optarg); fprintf(stderr, "Invalid baud rate of %s\n", optarg);
@ -148,12 +124,6 @@ int main(int argc, char *argv[])
break; break;
case 'C': case 'C':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (*conf_parms != '\0') if (*conf_parms != '\0')
{ {
strcat(conf_parms, ","); strcat(conf_parms, ",");
@ -170,22 +140,10 @@ int main(int argc, char *argv[])
break; break;
case 'p': case 'p':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
ptt_file = optarg; ptt_file = optarg;
break; break;
case 'P': case 'P':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (!strcmp(optarg, "RIG")) if (!strcmp(optarg, "RIG"))
{ {
ptt_type = RIG_PTT_RIG; ptt_type = RIG_PTT_RIG;

Wyświetl plik

@ -168,42 +168,18 @@ int main(int argc, char *argv[])
exit(0); exit(0);
case 'm': case 'm':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
my_model = atoi(optarg); my_model = atoi(optarg);
break; break;
case 'r': case 'r':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rot_file = optarg; rot_file = optarg;
break; break;
case 'R': case 'R':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rot_file2 = optarg; rot_file2 = optarg;
break; break;
case 's': case 's':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1)
{ {
fprintf(stderr, "Invalid baud rate of %s\n", optarg); fprintf(stderr, "Invalid baud rate of %s\n", optarg);
@ -213,12 +189,6 @@ int main(int argc, char *argv[])
break; break;
case 'C': case 'C':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (*conf_parms != '\0') if (*conf_parms != '\0')
{ {
strcat(conf_parms, ","); strcat(conf_parms, ",");
@ -235,12 +205,6 @@ int main(int argc, char *argv[])
break; break;
case 't': case 't':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (strlen(optarg) > 1) if (strlen(optarg) > 1)
{ {
send_cmd_term = strtol(optarg, NULL, 0); send_cmd_term = strtol(optarg, NULL, 0);
@ -253,22 +217,10 @@ int main(int argc, char *argv[])
break; break;
case 'o': case 'o':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
az_offset = atof(optarg); az_offset = atof(optarg);
break; break;
case 'O': case 'O':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
el_offset = atof(optarg); el_offset = atof(optarg);
break; break;

Wyświetl plik

@ -196,42 +196,18 @@ int main(int argc, char *argv[])
exit(0); exit(0);
case 'm': case 'm':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
my_model = atoi(optarg); my_model = atoi(optarg);
break; break;
case 'r': case 'r':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rot_file = optarg; rot_file = optarg;
break; break;
case 'R': case 'R':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
rot_file2 = optarg; rot_file2 = optarg;
break; break;
case 's': case 's':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1) if (sscanf(optarg, "%d%1s", &serial_rate, dummy) != 1)
{ {
fprintf(stderr, "Invalid baud rate of %s\n", optarg); fprintf(stderr, "Invalid baud rate of %s\n", optarg);
@ -241,12 +217,6 @@ int main(int argc, char *argv[])
break; break;
case 'C': case 'C':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
if (*conf_parms != '\0') if (*conf_parms != '\0')
{ {
strcat(conf_parms, ","); strcat(conf_parms, ",");
@ -263,42 +233,18 @@ int main(int argc, char *argv[])
break; break;
case 't': case 't':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
portno = optarg; portno = optarg;
break; break;
case 'T': case 'T':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
src_addr = optarg; src_addr = optarg;
break; break;
case 'o': case 'o':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
az_offset = atof(optarg); az_offset = atof(optarg);
break; break;
case 'O': case 'O':
if (!optarg)
{
usage(); /* wrong arg count */
exit(1);
}
el_offset = atof(optarg); el_offset = atof(optarg);
case 'v': case 'v':