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