Daniele Forsi IU5HKX
a81aab6e11
Return an error if the keyer type is unknown
...
Instead of quietly doing nothing.
2025-08-13 16:58:46 +02:00
Daniele Forsi IU5HKX
762caa85c0
Remove stray char after printing value of KEYERTYPE
...
Steps to reproduce:
tests/rigctl -m 1 get_parm KEYERTYPE
STRAIGHT
v <-- this 'v' shouldn't be there
2025-08-13 16:58:46 +02:00
Daniele Forsi IU5HKX
9904747358
Handle the question mark as second argument of set_level in ampctl
...
Test command:
tests/ampctl -m 1 \
set_level FAULT '?' \
set_level NH '?' \
set_level PF '?' \
set_level PWRFORWARD '?' \
set_level PWRINPUT '?' \
set_level PWRPEAK '?' \
set_level PWRREFLECTED '?' \
set_level SWR '?'
2025-08-12 23:31:11 +02:00
Daniele Forsi IU5HKX
2a2f33673e
Handle the question mark as second argument of set_level in rotctl
...
Test command:
tests/rotctl -m 1 \
set_level MGC '?' \
set_level MGF '?' \
set_level MGL '?' \
set_level SPEED '?'
2025-08-12 20:38:53 +02:00
Daniele Forsi IU5HKX
4187e9f4a3
Handle the question mark as second argument of set_level in rigctl
...
Closes #720 .
Test command:
tests/rigctl -m 1 \
set_level AF '?' set_level AGC '?' set_level AGC_TIME '?' \
set_level ANTIVOX '?' set_level APF '?' set_level ATT '?' \
set_level BAL '?' set_level BAND_SELECT '?' set_level BKINDL '?' \
set_level BKIN_DLYMS '?' set_level COMP '?' set_level CWPITCH '?' \
set_level IF '?' set_level KEYSPD '?' set_level METER '?' \
set_level MGC '?' set_level MGF '?' set_level MGL '?' \
set_level MICGAIN '?' set_level MONITOR_GAIN '?' set_level NB '?' \
set_level NOTCHF '?' set_level NOTCHF_RAW '?' set_level NR '?' \
set_level PBT_IN '?' set_level PBT_OUT '?' set_level PREAMP '?' \
set_level RF '?' set_level RFPOWER '?' set_level SLOPE_HIGH '?' \
set_level SLOPE_LOW '?' set_level SPECTRUM_ATT '?' set_level SPECTRUM_AVG '?' \
set_level SPECTRUM_EDGE_HIGH '?' set_level SPECTRUM_EDGE_LOW '?' set_level SPECTRUM_MODE '?' \
set_level SPECTRUM_REF '?' set_level SPECTRUM_SPAN '?' set_level SPECTRUM_SPEED '?' \
set_level SQL '?' set_level USB_AF '?' set_level USB_AF_INPUT '?' \
set_level VOXDELAY '?' set_level VOXGAIN '?'
2025-08-12 20:38:11 +02:00
Daniele Forsi IU5HKX
8d8d0328bf
Fix typos
2025-08-03 10:49:23 +02:00
George Baltz N3GB
1c36377480
Still more cppcheck tweaks
2025-07-29 13:10:28 -04:00
George Baltz N3GB
72bc62366d
A few more cppcheck messages silenced
2025-07-28 19:31:20 -04:00
George Baltz N3GB
e172d34381
Deprecate amp_get_conf(), too
2025-07-28 11:32:34 -04:00
George Baltz N3GB
faad247f06
Deprecate rot_get_conf()
2025-07-28 10:43:10 -04:00
George Baltz N3GB
20eeb96787
Deprecate rig_get_conf()
...
Define macro to set attribute, if compiler is capable
Add macro to rig_get_conf(), Rig::getConf() declarations
Fix internal uses of rig_get_conf()
2025-07-27 11:31:18 -04:00
George Baltz N3GB
6c372f981f
Distinguish wanted from unwanted fall through instances
...
Compile with -Wimplicit-fallthrough; analyze the results.
Define macro to mark valid fall through constructs. Mark all of the good
ones, and fix the bad.
Not available with all compilers - for those without the feature this commit
does nothing.
2025-07-27 10:03:38 -04:00
George Baltz N3GB
a7c8c3fa9e
Fix another unwanted fall through
2025-07-27 10:03:38 -04:00
Nate Bargmann
79f8b1cde8
Merge HitHub PR #1811
2025-07-22 22:11:06 -05:00
Daniele Forsi IU5HKX
0267068220
Fix ambiguity between system includes and Hamlib includes
2025-07-22 23:33:57 +02:00
Daniele Forsi IU5HKX
2fab137fc5
Apply fixes suggested by iwyu
...
Removes unused includes and adds missing includes.
2025-07-22 23:33:57 +02:00
Daniele Forsi IU5HKX
d536f0ec93
Fix typos
2025-07-22 23:33:56 +02:00
George Baltz N3GB
47dae3879d
Fix compiler errors with strict C23 standards
...
Fix missing/misplaced '#include "config.h"' statements. Fixes missing
function prototypes, unknown type definitions, etc. Allows configuration
of GCC with CFLAGS="-std=c23" instead of using default -std=gnu23.
Don't know about CLANG, MSVC, MinGW, etc, but using
gwb@stitch:~> gcc --version
gcc (SUSE Linux) 15.1.1 20250714
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Hamlib can compile in strict C23 mode, or previous standard levels.
2025-07-22 11:07:33 -04:00
Diane Bruce
f25f21264f
Provide for updated FreeBSD USB device naming
...
FreeBSD will eventually have the less verbose bNumDeviceCaps instead of
bNumDeviceCapabilities The other changes are (hopefully) to be
upstreamed renaming bU2devExitLat to wU2devExitLat
FreeBSD in the head of the tree has
/usr/include/libusb20_desc.h:#define bNumDeviceCapabilities bNumDeviceCaps
So we have backward compatibility for this.
2025-07-20 15:40:12 -05:00
George Baltz N3GB
1efaacb5ab
Move port definition(s) to include/hamlib/port.h
...
Add some ghost structs and typedefs
Make example.c compile on gcc15 and with new includes
2025-07-10 09:54:03 -04:00
George Baltz N3GB
921a6a9de3
Still more cppcheck cleanups
2025-06-25 10:01:16 -04:00
George Baltz N3GB
8d0e67f017
Make separator character local to rigctld connection
...
Response to rigctld command was being corrupted by other threads
Fixes issue #1748
2025-06-21 04:39:11 -04:00
George Baltz N3GB
0740af61a3
Fix memory leak in rigctl_parse.c
...
strip_quotes() orphaned 1 or 2 strings per call.
2025-06-21 04:39:11 -04:00
George Baltz N3GB
07d0d91a44
Yet more cppcheck messages silenced.
2025-06-15 13:52:09 -04:00
Nate Bargmann
bddd3ace00
Revert 17b404a6c7
...
These changes were unnecessary as the real bug is that the incorrect
function was being called in meade.c.
Closes GitHub issue #268 .
Fix testloc.c
2025-06-14 11:42:45 -05:00
George Baltz N3GB
39a1a367e1
Get rid of a few more style infractions.
...
Update NEWS.
2025-06-08 03:42:33 -04:00
Daniele Forsi IU5HKX
10180a6dc2
Fix sign of error return values
...
All RIG_E* constants should be negated when returned or compared.
Fixed with:
perl -pe 's/return RIG_E/return -RIG_E/' -i $(grep -lEr "return RIG_E" --include=*.{c,h})
perl -pe 's/= RIG_E/= -RIG_E/g' -i $(grep -lEr "= RIG_E" --include=*.{c,h})
2025-06-07 12:07:44 +02:00
Daniele Forsi IU5HKX
72bde6e131
Fix sign of error return values
...
All RIG_E* constants should be negated when returned or compared.
Change the usages of RIG_IS_SOFT_ERRCODE() for consistency.
2025-06-07 10:54:34 +02:00
Daniele Forsi IU5HKX
4ce5763cb9
Fix exit statuses
...
Exit status 2 is for invalid command line options or arguments.
Exit status 2 is for errors returned by Hamlib.
2025-06-06 23:58:02 +02:00
Nate Bargmann
c92fee947a
Merge GitHub PR #1709
2025-06-05 21:42:20 -05:00
George Baltz N3GB
7d28822273
Add '#include "cache.h"' to all files that reference cache structure.
...
Issue #1420
2025-06-03 12:07:27 -04:00
Nate Bargmann
9570d9963b
Merge GitHub PR #1742
2025-05-22 18:17:59 -05:00
Daniele Forsi IU5HKX
4109d606b5
Fix typos
2025-05-22 21:55:10 +02:00
Daniele Forsi IU5HKX
b03dea99b5
Allow to give the command lines options --list or --version
2025-05-14 19:41:34 +02:00
Daniele Forsi IU5HKX
55cae893f0
Fix definition of -B/--mapa2b command line option
...
It doesn't accept an argument.
2025-05-14 19:41:34 +02:00
Daniele Forsi IU5HKX
e34ae180a2
Remove unused definition of -z command line option
2025-05-14 19:41:34 +02:00
Daniele Forsi IU5HKX
dc3a71da1b
Document existing option to read commands from stdin
2025-05-14 19:41:34 +02:00
Daniele Forsi IU5HKX
57e5dba438
Make usage texts more similar
2025-05-14 19:41:34 +02:00
Daniele Forsi IU5HKX
5c05881e0e
Add rules to build dependencies of libhamlib.la in other directories
...
This makes it possible to run "make -C src/" or "make -C tests/ rigctl"
or "make -C bindings/ check" (and so on) in a clean tree, but it doesn't
rebuild those targets if libhamlib.la is changed; for this run make from
the top directory as usual, to rebuild all SUBDIRS if needed.
2025-05-08 23:51:47 +02:00
Nate Bargmann
9aed2637a6
Merge pull request #1708 from GeoBaltz/fix27
...
Minor fixes/cleanups for 4.6.3
2025-04-21 17:27:29 -05:00
Nate Bargmann
8f641b2b6a
Merge pull request #1707 from dforsi/fix/manpage
...
Fix/manpage
2025-04-21 17:22:59 -05:00
Daniele Forsi IU5HKX
20b92ea115
Remove dead code
...
The code removed could never be executed because getopt()/getopt_long()
detect a missing argument only if it is at the end of the command line
and return '?' which is handled by the default case of the switch which
prints an error message to stderr.
2025-04-21 22:37:37 +02:00
Daniele Forsi IU5HKX
cee0fcb2cb
Add -b, --bind-all to --help text
2025-04-21 22:21:10 +02:00
Daniele Forsi IU5HKX
7f717d520d
Add that passwords aren't implemented
2025-04-21 20:25:09 +02:00
Daniele Forsi IU5HKX
cd82f08ec5
Add missing command line short option -b for --bind-all
2025-04-21 20:25:09 +02:00
Daniele Forsi IU5HKX
2c0067d510
Remove unused command line short options -M and -N
...
The long options --multicast-addr and --multicast-port were
removed in commit c8c8869a
.
2025-04-21 20:25:09 +02:00
Daniele Forsi IU5HKX
faae6b5405
Add missing arguments to command line options
2025-04-21 20:25:09 +02:00
George Baltz N3GB
1f707ab31e
Make local functions static.
2025-04-20 21:28:57 -04:00
George Baltz N3GB
8150583541
Drop redundant token lookups.
2025-04-20 21:28:57 -04:00
Daniele Forsi IU5HKX
b141c14270
Make help strings more similar
...
Fixes text indent and verbs.
2025-04-19 23:57:26 +02:00
Daniele Forsi IU5HKX
cfc5c821a0
Delete a generated file when doing make clean
2025-04-16 19:48:56 +02:00
Michael Black W9MDB
f3a932bf50
Revert "Remove setting debug in rotctl.c"
...
This reverts commit eb9bf6fb84
.
2025-02-06 22:33:54 -06:00
Michael Black W9MDB
eb9bf6fb84
Remove setting debug in rotctl.c
2025-02-06 22:27:46 -06:00
Michael Black W9MDB
7d535564bd
Fix rig_list_foreach in testmW2power.c
...
https://github.com/Hamlib/Hamlib/issues/1647
2024-12-29 10:44:32 -06:00
Michael Black W9MDB
ac8a8b2027
Fix rig_list_foreach in hamlibmodels.c
...
https://github.com/Hamlib/Hamlib/issues/1647
2024-12-29 10:33:33 -06:00
Michael Black W9MDB
728d0a5432
Fix listrigs.s rig_list_foreach
...
https://github.com/Hamlib/Hamlib/issues/1647
2024-12-29 08:56:53 -06:00
Michael Black W9MDB
601dd1361c
Fix testrigopen.c rig_list_foreach
...
https://github.com/Hamlib/Hamlib/issues/1647
2024-12-29 08:51:47 -06:00
Michael Black W9MDB
f2a9f091d0
Change rig_list_foreach back to using const argument -- was breaking many C++ application builds
...
https://github.com/Hamlib/Hamlib/issues/1647
2024-12-29 08:42:24 -06:00
Michael Black W9MDB
57c145d5d1
Remove skip_init default
...
Was causing segfault on rigctl -m 2041 -r /dev/pts/4 M CW 250 b 73
2024-12-25 22:43:20 -06:00
Michael Black W9MDB
8edf99fc18
Change skipinit so skip-init for consistency
...
And now ignores the skip-init on the non-interactive rigctl
2024-12-25 16:36:37 -06:00
Michael Black W9MDB
9ac7f92d1e
Update some documentation
2024-12-25 15:59:40 -06:00
Michael Black W9MDB
e0a805ebc3
Make skip_init automatic when rigctl has commands on the line
2024-12-24 23:19:02 -06:00
Michael Black W9MDB
750adb40b5
Fix cleartext warning in rigctl_parse.c
2024-12-22 11:30:04 -06:00
Michael Black W9MDB
b763761d9e
Fix cleartext warning in rigctl_parse.c and rotctl_parse.c
2024-12-22 11:26:18 -06:00
Michael Black W9MDB
d302b8fabd
Fix sscanf in rigctl_parse.c
2024-12-22 11:14:14 -06:00
Michael Black W9MDB
fe45fa2dfc
Fix sscanf compare in rigctl_parse.c
2024-12-22 10:38:07 -06:00
Michael Black W9MDB
57c5047c3e
Hopefully fix codeql warning about cleartext storage of sensitive information
2024-12-22 10:32:59 -06:00
Michael Black W9MDB
89383a553a
Fix buffer overrun in ampctl.c
2024-12-22 10:31:17 -06:00
Michael Black W9MDB
2b23051c6d
Remove display of password from debug
...
https://github.com/Hamlib/Hamlib/security/code-scanning/15
2024-12-21 15:19:25 -06:00
Michael Black W9MDB
e6be427c51
Fix buffer overflow in ampctld.c
2024-12-21 14:42:46 -06:00
Michael Black W9MDB
72424ac144
Fix buffer overflow in rigctl.c
...
https://github.com/Hamlib/Hamlib/security/code-scanning/3212
2024-12-21 14:41:58 -06:00
Michael Black W9MDB
12c453ccd3
Fix buffer overflow in rigctlcom.c
...
https://github.com/Hamlib/Hamlib/security/code-scanning/3213
2024-12-21 14:41:25 -06:00
Michael Black W9MDB
6cf93934a7
Fix buffer overflow in rigctld.c
...
https://github.com/Hamlib/Hamlib/security/code-scanning/3214
2024-12-21 14:40:46 -06:00
Michael Black W9MDB
9624f06be9
Fix buffer overflow in rigctlsync.c
...
https://github.com/Hamlib/Hamlib/security/code-scanning/3215
2024-12-21 14:40:02 -06:00
Michael Black W9MDB
0690fbc0c5
Fix buffer overflow in rigctltcp.c
2024-12-21 14:39:33 -06:00
Michael Black W9MDB
3d8dbbcc1a
Fix bufferoverflow in rigmem.c
...
https://github.com/Hamlib/Hamlib/security/code-scanning/3217
2024-12-21 14:38:46 -06:00
Michael Black W9MDB
5f621c9f53
Fix bufferoverflow in rigsmtr.c
...
https://github.com/Hamlib/Hamlib/security/code-scanning/3219
https://github.com/Hamlib/Hamlib/security/code-scanning/3217
2024-12-21 13:02:33 -06:00
Michael Black W9MDB
a81c7d90c4
Fix bufferoverflow in rigswr.c
2024-12-21 13:01:05 -06:00
Michael Black W9MDB
a72aa0cb41
Fix buffer overflow in rotctl.c
...
https://github.com/Hamlib/Hamlib/security/code-scanning/3221
2024-12-21 13:00:06 -06:00
Michael Black W9MDB
a2af87068e
Fix buffer overflow in rotctld.c
2024-12-21 12:59:49 -06:00
Michael Black W9MDB
be045da06b
Fix set_mode on rigctlcom
2024-12-04 17:15:35 -06:00
Michael Black W9MDB
941e69eda5
Fix set_mode on rigctlcom
2024-12-03 23:19:16 -06:00
Michael Black W9MDB
4a34d4c27f
Add new semi-colon separated hex values for send_raw icom
...
https://github.com/Hamlib/Hamlib/issues/1632
2024-12-01 11:24:43 -06:00
Daniele Forsi IU5HKX
6adfce0305
Fix typos in messages
2024-11-24 19:24:35 +01:00
Daniele Forsi IU5HKX
6036a65d2e
Fix typos in comments
2024-11-24 19:24:35 +01:00
Mike Black W9MDB
5c269964c2
astyle files in preparation for release 4.6
2024-11-06 08:07:34 -06:00
Mike Black W9MDB
44bb600a01
Increase debug buf size and add SPLIT to channel dumpcaps
2024-11-04 16:40:17 -06:00
Mike Black W9MDB
ece40e6bc2
Hopefully clean up clang warning on compile
2024-10-30 17:05:44 -05:00
Mike Black W9MDB
87531d273d
Fix KEYERTYPE
2024-10-21 22:31:42 -05:00
Mike Black W9MDB
e096426ddc
rigctld show-conf now exits only if no -r argument is given
...
https://github.com/Hamlib/Hamlib/issues/1619
2024-10-09 08:53:37 -05:00
Mike Black W9MDB
882d22a50c
Add help to N command in rigctl
2024-10-07 12:19:03 -05:00
George Baltz N3GB
b667e31dcf
Fix wrong utc_offset
...
Only compare magnitude when checking for only hours given. Offsets west of
UTC could be off by a factor of 100.
2024-09-10 21:30:24 -04:00
Mike Black W9MDB
e35b87b11a
Fix MacOS warning in rigctl_parse.c
2024-09-08 11:52:06 -05:00
Mike Black W9MDB
940814617b
Update set_clock options again
2024-08-30 16:36:10 -05:00
Mike Black W9MDB
954fd00161
Fix set_clock information
2024-08-30 10:17:55 -05:00
Mike Black W9MDB
5ba43ba00e
Fix mingw compiles
...
https://github.com/Hamlib/Hamlib/issues/1597
2024-08-18 08:15:11 -05:00
Mike Black W9MDB
abd6d4f388
Avoid possible segfault
2024-07-19 22:39:12 -05:00
Mike Black W9MDB
8b9c768063
Update info in riglist.h
...
Make check for mfg_name or model_name of Misc, Other, or Dummy for GM3ZZA's application
Just to avoid ever using these accidentally
2024-07-14 22:57:40 -05:00
George Baltz N3GB
16707507c6
Yet another batch of state pointers
2024-07-14 01:17:28 -04:00
George Baltz N3GB
7bf63ecbf0
More amplifier and rotator state changes
2024-07-14 01:17:28 -04:00