Wykres commitów

12406 Commity (d66a601c8395178bf02955a0f99b42180438701b)

Autor SHA1 Wiadomość Data
Nate Bargmann d66a601c83 Fix typo in digraph 2025-08-24 21:58:50 +02:00
Daniele Forsi IU5HKX a0792e4f85 Excercise the detect logic for INDI on the macOS CI
libnova is available in brew, but libindi isn't available;
./configure will detect that and not build the INDI driver.
2025-08-24 14:04:54 +02:00
Daniele Forsi IU5HKX 43d9b3d354 If --with-indi[=yes] was given, error out if prerequisites aren't met
Error out also if libnova or libindi are missing, not just if a C++11
compiler is missing.
2025-08-24 13:32:18 +02:00
Daniele Forsi IU5HKX e81e40ed70 If neither yes or no were given, build C++ binding only if prerequisites are met
Options availables are:
 ./configure # same as --with-cxx-binding=detect
 ./configure --with-cxx-binding=detect # build if prerequisites are met
 ./configure --with-cxx-binding=no # do not build
 ./configure --without-cxx-binding # do not build
 ./configure --with-cxx-binding=yes # fail if prerequisites aren't met
2025-08-24 09:43:23 +02:00
Daniele Forsi IU5HKX 91e5f1441f If neither yes or no were given, build INDI only if prerequisites are met
Options availables are:
 ./configure # same as --with-indi=detect
 ./configure --with-indi=detect # build if prerequisites are met
 ./configure --with-indi=no # do not build
 ./configure --without-indi # do not build
 ./configure --with-indi=yes # fail if prerequisites aren't met
2025-08-24 09:43:10 +02:00
Daniele Forsi IU5HKX b300747aa2 Fix comment and messages
Looks like they were copied from the texts for readline.
2025-08-24 09:33:02 +02:00
Daniele Forsi IU5HKX 8febac180a Fix typo 2025-08-22 14:38:12 +02:00
Daniele Forsi IU5HKX cb6866ff86 Fix detecting functional C++11 compilers
Allows to build Hamlib when a C++ compiler isn't available, by running:
 ./configure --without-indi --without-cxx-binding
2025-08-22 10:47:35 +02:00
Daniele Forsi IU5HKX e772d6481e Fix usage of AS_IF
Needs one set of square brackets for the true case and one sert for
false case.
2025-08-21 22:42:11 +02:00
Daniele Forsi IU5HKX 3b2df4ecd0 Fix detecting the availability of a C++ compiler that needs arguments
If the earlier macro AC_PROG_CXX found a compiler that needs some
arguments, the variable CXX will contain also the arguments, so the
macro AC_CHECK_PROG will try to find a file that doesn't exist
(such as "g++ -std=gnu++11" instead of just "g++").
If AC_PROG_CXX didn't find a compiler, the variable CXX is empty.
2025-08-21 22:26:18 +02:00
Daniele Forsi IU5HKX 7dc8462b20 Add missing AC_MSG_RESULT 2025-08-21 18:02:17 +02:00
Daniele Forsi IU5HKX ee7c0c3235 Make a C++11 compiler mandatory if INDI or C++ binding are requested
Otherwise make it optional.

Fixes issue #1730.
2025-08-21 17:19:35 +02:00
Daniele Forsi IU5HKX 0317e64dc8 Remove double call to rig_token_lookup() and rot_token_lookup()
The needed value is already in the variable.

Test case /to check that the changes don't break the code):
tests/rigctl --set-conf=rig_pathname=test,write_delay=1,timeout=2 --show-conf Q | grep --no-group-separator -A1 -E "(rig_pathname|^write_delay|^timeout):"
tests/rotctl --set-conf=rot_pathname=test,write_delay=1,timeout=2 --show-conf Q | grep --no-group-separator -A1 -E "(rot_pathname|^write_delay|^timeout):"

The output before and after this patch is:
rig_pathname: "Path name to the device file of the rig"
        Default: /dev/rig, Value: test
write_delay: "Delay in ms between each byte sent out"
        Default: 0, Value: 1
timeout: "Timeout in ms"
        Default: 0, Value: 2
Command 'Q' not found!
rot_pathname: "Path name to the device file of the rotator"
        Default: /dev/rotator, Value: test
write_delay: "Delay in ms between each byte sent out"
        Default: 0, Value: 1
timeout: "Timeout in ms"
        Default: 0, Value: 2
2025-08-20 23:07:48 +02:00
Nate Bargmann 32d064d60b
Merge GitHub PR #1860 2025-08-20 13:03:23 -05:00
Daniele Forsi IU5HKX 8847cbeafb Implement send_raw for the Perl bindings
Doesn't allow '\0' embedded in the strings to be sent or received.
Closes #1479.
2025-08-20 19:18:02 +02:00
Daniele Forsi IU5HKX cbefd0835f Do not show any debug trace messages unless requested with -vvvvv
This fixes the following commands that always printed debug messages
at the trace level:
 tests/ampctld -l >/dev/null
 tests/ampctl -h >/dev/null
 tests/rigctld -l >/dev/null
 tests/rigctltcp -l >/dev/null
 tests/rotctld -l >/dev/null
It doesn't affect other software which worked around this issue,
but changes all software to avoid regressions in future.

Test case (should print nothing in bash):
{
tests/ampctl -l -h
tests/ampctld -l -h
tests/rigctl -l -h
tests/rigctlcom -l -h
tests/rigctld -l -h
tests/rigctlsync -l -h
tests/rigctltcp -l -h
tests/rotctl -l -h
tests/rotctld -l -h
} >/dev/null
2025-08-20 17:03:32 +02:00
Daniele Forsi IU5HKX 5a001ab3aa Explicitely initialize static int verbose 2025-08-20 12:17:29 +02:00
Daniele Forsi IU5HKX ead67ec170 Replace magic number with define 2025-08-20 12:17:29 +02:00
Nate Bargmann d6165f7411
Merge GitHub PR #1859 2025-08-19 20:21:03 -05:00
Nate Bargmann db7219b731
Merge GitHub PR #1858 2025-08-19 20:05:20 -05:00
Nate Bargmann 285b44add6
Merge GitHub PR #1857 2025-08-19 19:50:45 -05:00
Nate Bargmann e2ced58a14
Merge GitHub PR #1855 2025-08-19 13:23:37 -05:00
Nate Bargmann c4aad6e0ec
Merge GitHub PR #1854 2025-08-19 13:18:47 -05:00
Nate Bargmann ab311ac97b
Merge GitHub PR #1852 2025-08-19 13:06:34 -05:00
Nate Bargmann cde3a59432
Merge GitHub PR #1851 2025-08-19 12:59:51 -05:00
Daniele Forsi IU5HKX 7a9e101b9d Add missing string form for RIG_FUNC_SLICE 2025-08-19 19:41:26 +02:00
Daniele Forsi IU5HKX a0fa2def82 Refactor to remove code duplication in rotctl*.c 2025-08-19 16:51:31 +02:00
Daniele Forsi IU5HKX 90ffcadfa5 Refactor to remove code duplication in ampctl*.c 2025-08-19 16:51:31 +02:00
Daniele Forsi IU5HKX 67038154db Refactor to remove code duplication in rigctl*.c 2025-08-19 16:51:31 +02:00
Daniele Forsi IU5HKX 7fce140970 Make help texts more similar 2025-08-19 16:51:19 +02:00
Nate Bargmann c15fecb865
Merge GitHub PR #1849 2025-08-19 08:16:22 -05:00
Daniele Forsi IU5HKX 6049d020a5 Fix compiler errors
Adds the needed const qualifier.

Fixes:
rigmatrix.c:699:22: error: passing argument 1 of ‘rig_list_foreach’ from incompatible pointer type [-Wincompatible-pointer-types]
rigmatrix.c:706:22: error: passing argument 1 of ‘rig_list_foreach’ from incompatible pointer type [-Wincompatible-pointer-types]
rigmatrix.c:728:22: error: passing argument 1 of ‘rig_list_foreach’ from incompatible pointer type [-Wincompatible-pointer-types]
rigmatrix.c:762:22: error: passing argument 1 of ‘rig_list_foreach’ from incompatible pointer type [-Wincompatible-pointer-types]
rigmatrix.c:771:22: error: passing argument 1 of ‘rig_list_foreach’ from incompatible pointer type [-Wincompatible-pointer-types]
rigmatrix.c:805:22: error: passing argument 1 of ‘rig_list_foreach’ from incompatible pointer type [-Wincompatible-pointer-types]
rigmatrix.c:814:22: error: passing argument 1 of ‘rig_list_foreach’ from incompatible pointer type [-Wincompatible-pointer-types]
rigmatrix.c:848:22: error: passing argument 1 of ‘rig_list_foreach’ from incompatible pointer type [-Wincompatible-pointer-types]
rigmatrix.c:857:22: error: passing argument 1 of ‘rig_list_foreach’ from incompatible pointer type [-Wincompatible-pointer-types]
rigmatrix.c:891:22: error: passing argument 1 of ‘rig_list_foreach’ from incompatible pointer type [-Wincompatible-pointer-types]
2025-08-19 10:36:25 +02:00
Daniele Forsi IU5HKX 7746d59438 Implement get_agc for flrig 2.0.06+
Test case:
run: flrig configured for the rig in use
run: tests/rigctl -m 4 get_level AGC
expected: should print an enum agc_level_e (an integer in range 0..10)

Part of issue #1376.
2025-08-19 09:08:28 +02:00
Nate Bargmann 3fa91c8771
Document fixing MinGW warnings and linker error
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.
2025-08-18 17:24:08 -05:00
Daniele Forsi IU5HKX 73a967e569
Remove the remaining files of the DejaGnu tests
The tests were disabled in commit cb1732fc2a.
2025-08-18 17:17:32 -05:00
Daniele Forsi IU5HKX 6e3b8b223d
Remove the perl/ subdirectory
It breaks "make dist", it was deprecated in favor of SWIG in
commit 59b81dfa18 and if only
the contained some Makefiles.
2025-08-18 17:17:32 -05:00
Daniele Forsi IU5HKX e3d1ed00b7
Split and sort the list of DIST_SUBDIRS 2025-08-18 17:17:32 -05:00
Daniele Forsi IU5HKX 8f0c94dc77
[simulators] Fix compiler warning
Adds the same code used in other simulators.

Fixes:
simft897.c:26:9: warning: variable ‘n’ set but not used [-Wunused-but-set-variable]
2025-08-18 17:17:32 -05:00
Daniele Forsi IU5HKX 1aafbb3f24
[simulators] Add missing files to check_PROGRAMS 2025-08-18 17:17:31 -05:00
Daniele Forsi IU5HKX 271129705a
[simulators] Split and sort the list of check_PROGRAMS 2025-08-18 17:17:31 -05:00
Daniele Forsi IU5HKX c91c3feac0
[tests] Make testnet.c build 2025-08-18 09:02:09 -05:00
Daniele Forsi IU5HKX edda52b40e
[tests] Fix search path for includes 2025-08-18 09:02:08 -05:00
Daniele Forsi IU5HKX dadd6e1495
[tests] Set return codes in case of success/failure of the tests 2025-08-18 09:02:08 -05:00
Daniele Forsi IU5HKX 014b34e674
[tests] Convert line endings from CR LF to LF 2025-08-18 09:02:08 -05:00
Daniele Forsi IU5HKX 8dc20bb270
[tests] Remove non-working duplicated code
It is almost an exact copy of testrigopen 1 line different and
without includes so it's not compiling.
2025-08-18 09:02:07 -05:00
Daniele Forsi IU5HKX 26412650a6
[tests] Add other existing test scripts
Adds: amptest.sh and testcaps.sh
Doesn't add cachetest.sh because it needs 2 instances of rigctld running.
2025-08-18 09:02:07 -05:00
Daniele Forsi IU5HKX d4eee93c85
[tests] Add missing files to EXTRA_DIST 2025-08-18 09:02:07 -05:00
Daniele Forsi IU5HKX 53e27d6e88
[tests] Split and sort the list of EXTRA_DIST files 2025-08-18 09:02:07 -05:00
Daniele Forsi IU5HKX 8805748e74
[simulators] Add missing files to EXTRA_DIST 2025-08-18 09:02:06 -05:00
Daniele Forsi IU5HKX 69a9f15e3e
[security] Add missing files to EXTRA_DIST 2025-08-18 09:02:06 -05:00