This commit has been left as documentation should these files be moved
to /doc or some such. However, never of these files are built or
distributed.
----------------
From example.c the following warning was generated by MinGW:
CC example.o
example.c: In function ‘main’:
example.c:93:32: warning: format ‘%lX’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘rmode_t’ {aka ‘long long unsigned int’} [-Wformat=]
93 | printf("Current mode = 0x%lX = %s, width = %ld\n", mode, rig_strrmode(mode),
| ~~^ ~~~~
| | |
| long unsigned int rmode_t {aka long long unsigned int}
| %llX
The 'l' was added as suggested to the format specifier but that resulted
in the following warning from Linux:
CC example.o
../../hamlib/tests/example.c:93:57: warning: format specifies type 'unsigned long long' but the argument has type 'rmode_t' (aka 'unsigned long') [-Wformat]
printf("Current mode = 0x%llX = %s, width = %ld\n", mode, rig_strrmode(mode),
~~~~ ^~~~
%lX
CC rigctl-dumpcaps.o
1 warning generated.
So casting `mode` to `unsigned long long` quelled both warnings!
From testsecurity.c came this warning:
CC testsecurity-testsecurity.o
In file included from ../include/hamlib/rig.h:49,
from ../src/misc.h:26,
from testsecurity.c:29:
/usr/share/mingw-w64/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp]
15 | #warning Please include winsock2.h before windows.h
| ^~~~~~~
Apparently winsock2.h being included through misc.h didn't work.
Finally, the Mingw linker gave the following error:
CCLD testsecurity.exe
/usr/bin/x86_64-w64-mingw32-ld: testsecurity-testsecurity.o: in function `main':
/home/nate/builds/hamlib-4.7~git/tests/testsecurity.c:97:(.text.startup+0x87): undefined reference to `AESStringCrypt'
/usr/bin/x86_64-w64-mingw32-ld: /home/nate/builds/hamlib-4.7~git/tests/testsecurity.c:116:(.text.startup+0x128): undefined reference to `AESStringDecrypt'
collect2: error: ld returned 1 exit status
Specifcally add the libsecurity.la file path as a specific library.
Even though the libhamlib.la seems to have the AESStringCrypt symbol
already.
https://github.com/Hamlib/Hamlib/issues/259
set_vfo_opt can now dynamically change vfo mode on rigctld
So this example now works...does some non-vfo stuff then switches to vfo mode
rigctl -m 2 F 14074000 V VFOB F 14076000 V VFOA f V VFOB f set_vfo_opt 1 f VFOA
rigctl commands v,V and S have been changed to not require VFO arguments
New API function rig_set_vfo_opt -- only implemented for Net rigctl as it doesn't apply to any other rigs
Various strncpy operations could result in a port pathname that is not a
NULL terminated string as the allowed string length is the same size as
the buffer per the strncpy manual page. This is corrected by assuring
that the allowed length is FILPATHLEN - 1.