From 7fce140970f93569b68af6dbe5e18b1092633d63 Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Thu, 14 Aug 2025 23:16:17 +0200 Subject: [PATCH 1/4] Make help texts more similar --- tests/ampctl.c | 2 +- tests/ampctld.c | 2 +- tests/rigctlcom.c | 2 +- tests/rigctld.c | 2 +- tests/rigctlsync.c | 2 +- tests/rigctltcp.c | 4 ++-- tests/rigmem.c | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/ampctl.c b/tests/ampctl.c index 3add9ce6e..bc250e16b 100644 --- a/tests/ampctl.c +++ b/tests/ampctl.c @@ -449,7 +449,7 @@ void usage() " -r, --amp-file=DEVICE set device of the amplifier to operate on\n" " -s, --serial-speed=BAUD set serial speed of the serial port\n" " -t, --send-cmd-term=CHAR set send_cmd command termination char\n" - " -C, --set-conf=PARM=VAL set config parameters\n" + " -C, --set-conf=PARM=VAL[,...] set config parameters\n" " -L, --show-conf list all config parameters\n" " -l, --list list all model numbers and exit\n" " -u, --dump-caps dump capabilities and exit\n" diff --git a/tests/ampctld.c b/tests/ampctld.c index 2c0a5ec81..d5c49ff0b 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -694,7 +694,7 @@ void usage() " -s, --serial-speed=BAUD set serial speed of the serial port\n" " -t, --port=NUM set TCP listening port, default %s\n" " -T, --listen-addr=IPADDR set listening IP address, default ANY\n" - " -C, --set-conf=PARM=VAL set config parameters\n" + " -C, --set-conf=PARM=VAL[,...] set config parameters\n" " -L, --show-conf list all config parameters\n" " -l, --list list all model numbers and exit\n" " -u, --dump-caps dump capabilities and exit\n" diff --git a/tests/rigctlcom.c b/tests/rigctlcom.c index 405520b29..3471e9f18 100644 --- a/tests/rigctlcom.c +++ b/tests/rigctlcom.c @@ -1715,7 +1715,7 @@ void usage() " -s, --serial-speed=BAUD set serial speed of the serial port\n" " -S, --serial-speed2=BAUD set serial speed of the virtual com port [default=115200]\n" " -c, --civaddr=ID set CI-V address, decimal (for Icom rigs only)\n" - " -C, --set-conf=PARM=VAL set config parameters\n" + " -C, --set-conf=PARM=VAL[,...] set config parameters\n" " -B, --mapa2b map set_freq on VFOA to VFOB -- useful for CW Skimmer\n" " -L, --show-conf list all config parameters\n" " -l, --list list all model numbers and exit\n" diff --git a/tests/rigctld.c b/tests/rigctld.c index 0c502cf0b..778f24a70 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1438,7 +1438,7 @@ void usage(void) " -v, --verbose set verbose mode, cumulative (-v to -vvvvv)\n" " -W, --twiddle_timeout=SECONDS timeout after detecting vfo manual change\n" " -w, --twiddle_rit=SECONDS suppress VFOB getfreq so RIT can be twiddled\n" - " -x, --uplink=OPTION set uplink get_freq ignore: option 1=Sub, 2=Main\n" + " -x, --uplink=OPTION set uplink get_freq ignore, option 1=Sub, 2=Main\n" " -Z, --debug-time-stamps enable time stamps for debug messages\n" " -A, --password=PASSWORD set password for rigctld access (NOT IMPLEMENTED)\n" " -R, --rigctld-idle make rigctld close the rig when no clients are connected\n" diff --git a/tests/rigctlsync.c b/tests/rigctlsync.c index 7b70df398..ef563888d 100644 --- a/tests/rigctlsync.c +++ b/tests/rigctlsync.c @@ -611,7 +611,7 @@ void usage() " -s, --serial-speed=BAUD set serial speed of the serial port\n" " -S, --serial-speed2=BAUD set serial speed of the virtual com port [default=115200]\n" " -c, --civaddr=ID set CI-V address, decimal (for Icom rigs only)\n" - " -C, --set-conf=PARM=VAL set config parameters\n" + " -C, --set-conf=PARM=VAL[,...] set config parameters\n" " -L, --show-conf list all config parameters\n" " -l, --list list all model numbers and exit\n" " -u, --dump-caps dump capabilities and exit\n" diff --git a/tests/rigctltcp.c b/tests/rigctltcp.c index b3cd4b398..59c383677 100644 --- a/tests/rigctltcp.c +++ b/tests/rigctltcp.c @@ -1432,7 +1432,7 @@ void usage(void) " -t, --port=NUM set TCP listening port, default %s\n" " -S, --separator=CHAR set char as rigctld response separator, default is \\n\n" " -T, --listen-addr=IPADDR set listening IP address, default ANY\n" - " -C, --set-conf=PARM=VAL set config parameters\n" + " -C, --set-conf=PARM=VAL[,...] set config parameters\n" " -L, --show-conf list all config parameters\n" " -l, --list list all model numbers and exit\n" " -u, --dump-caps dump capabilities and exit\n" @@ -1440,7 +1440,7 @@ void usage(void) " -v, --verbose set verbose mode, cumulative (-v to -vvvvv)\n" " -W, --twiddle_timeout=SECONDS timeout after detecting vfo manual change\n" " -w, --twiddle_rit=SECONDS suppress VFOB getfreq so RIT can be twiddled\n" - " -x, --uplink set uplink get_freq ignore, 1=Sub, 2=Main\n" + " -x, --uplink=OPTION set uplink get_freq ignore, option 1=Sub, 2=Main\n" " -Z, --debug-time-stamps enable time stamps for debug messages\n" " -M, --multicast-addr=ADDR set multicast UDP address, default 0.0.0.0 (off), recommend 224.0.1.1\n" " -n, --multicast-port=PORT set multicast UDP port, default 4531\n" diff --git a/tests/rigmem.c b/tests/rigmem.c index 084d59399..be307f2c5 100644 --- a/tests/rigmem.c +++ b/tests/rigmem.c @@ -382,7 +382,7 @@ void usage() " -r, --rig-file=DEVICE set device of the radio to operate on\n" " -s, --serial-speed=BAUD set serial speed of the serial port\n" " -c, --civaddr=ID set CI-V address, decimal (for Icom rigs only)\n" - " -C, --set-conf=PARM=VAL set config parameters\n" + " -C, --set-conf=PARM=VAL[,...] set config parameters\n" " -p, --set-separator=CHAR set character separator instead of the CSV comma\n" " -a, --all bypass mem_caps, apply to all fields of channel_t\n" #ifdef HAVE_XML2 From 67038154db238bec7b51cc66417665c9ee828918 Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Fri, 15 Aug 2025 18:04:30 +0200 Subject: [PATCH 2/4] Refactor to remove code duplication in rigctl*.c --- tests/rigctl.c | 10 ---------- tests/rigctl_parse.c | 9 +++++++++ tests/rigctld.c | 11 ----------- tests/rigctltcp.c | 11 ----------- 4 files changed, 9 insertions(+), 32 deletions(-) diff --git a/tests/rigctl.c b/tests/rigctl.c index 8db08d10c..0d5d772f9 100644 --- a/tests/rigctl.c +++ b/tests/rigctl.c @@ -910,14 +910,4 @@ void usage(void) ); usage_rig(stdout); - - printf("\nError codes and messages\n"); - - for (enum rig_errcode_e e = 0; e < RIG_EEND; ++e) - { - printf("-%d - %s", e, rigerror2(e)); - } - - printf("\nReport bugs to .\n"); - } diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 711dd7502..689c90e0f 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -2005,6 +2005,15 @@ void usage_rig(FILE *fout) "Commands and arguments read from standard input must be white space separated,\n" "comments are allowed, comments start with the # character and continue to the\n" "end of the line.\n"); + + fprintf(fout, "\nError codes and messages\n"); + + for (enum rig_errcode_e e = 0; e < RIG_EEND; ++e) + { + fprintf(fout, "-%d - %s", e, rigerror2(e)); + } + + fprintf(fout, "\nReport bugs to .\n"); } diff --git a/tests/rigctld.c b/tests/rigctld.c index 778f24a70..31f65e94c 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -1448,15 +1448,4 @@ void usage(void) portno); usage_rig(stdout); - - printf("\nError codes and messages\n"); - - for (enum rig_errcode_e e = 0; e < RIG_EEND; ++e) - { - printf("-%d - %s", e, rigerror2(e)); - } - - - printf("\nReport bugs to .\n"); - } diff --git a/tests/rigctltcp.c b/tests/rigctltcp.c index 59c383677..e965a1a88 100644 --- a/tests/rigctltcp.c +++ b/tests/rigctltcp.c @@ -1451,15 +1451,4 @@ void usage(void) portno); usage_rig(stdout); - - printf("\nError codes and messages\n"); - - for (enum rig_errcode_e e = 0; e < RIG_EEND; ++e) - { - printf("-%d - %s", e, rigerror2(e)); - } - - - printf("\nReport bugs to .\n"); - } From 90ffcadfa516176e26275b680baa68a689bd5dc1 Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Fri, 15 Aug 2025 18:08:06 +0200 Subject: [PATCH 3/4] Refactor to remove code duplication in ampctl*.c --- tests/ampctl.c | 2 -- tests/ampctl_parse.c | 2 ++ tests/ampctld.c | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/ampctl.c b/tests/ampctl.c index bc250e16b..321dde1ec 100644 --- a/tests/ampctl.c +++ b/tests/ampctl.c @@ -466,6 +466,4 @@ void usage() ); usage_amp(stdout); - - printf("\nReport bugs to .\n"); } diff --git a/tests/ampctl_parse.c b/tests/ampctl_parse.c index 44705b8d5..e47b6c1ff 100644 --- a/tests/ampctl_parse.c +++ b/tests/ampctl_parse.c @@ -1492,6 +1492,8 @@ void usage_amp(FILE *fout) "Commands and arguments read from standard input must be white space separated,\n" "comments are allowed, comments start with the # character and continue to the\n" "end of the line.\n"); + + fprintf(fout, "\nReport bugs to .\n"); } diff --git a/tests/ampctld.c b/tests/ampctld.c index d5c49ff0b..b03d2f2c8 100644 --- a/tests/ampctld.c +++ b/tests/ampctld.c @@ -705,6 +705,4 @@ void usage() portno); usage_amp(stdout); - - printf("\nReport bugs to .\n"); } From a0fa2def82abd321aa547e1f7ba5cf7417dfe359 Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Fri, 15 Aug 2025 18:10:08 +0200 Subject: [PATCH 4/4] Refactor to remove code duplication in rotctl*.c --- tests/rotctl.c | 2 -- tests/rotctl_parse.c | 2 ++ tests/rotctld.c | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/rotctl.c b/tests/rotctl.c index 6817977f0..1be198500 100644 --- a/tests/rotctl.c +++ b/tests/rotctl.c @@ -509,6 +509,4 @@ void usage() ); usage_rot(stdout); - - printf("\nReport bugs to .\n"); } diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c index 62ab4bcf1..fa2c69f0a 100644 --- a/tests/rotctl_parse.c +++ b/tests/rotctl_parse.c @@ -1572,6 +1572,8 @@ void usage_rot(FILE *fout) "Commands and arguments read from standard input must be white space separated,\n" "comments are allowed, comments start with the # character and continue to the\n" "end of the line.\n"); + + fprintf(fout, "\nReport bugs to .\n"); } diff --git a/tests/rotctld.c b/tests/rotctld.c index c3dedb52f..454def788 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -734,6 +734,4 @@ void usage() portno); usage_rot(stdout); - - printf("\nReport bugs to .\n"); }