[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. ad824fa85e42fbf185add
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: n0nb <n0...@us...> - 2025-05-11 22:58:43
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via ad824fa85e42fbf185addef24526427803056f1e (commit) via c7ba4f5384bad446be7bf392539576dd1c572bd2 (commit) via da60d2d38324bb1d090f6a0d7bf46fa1f01315bd (commit) via de01821c5121c1097695ff3d783dc0b88ddf95d3 (commit) via 1e7b1a628eefad3114e2d484ff18bc441552adb5 (commit) via 56eea198beb22db9aa4f0a1447282e14d4ce7ea3 (commit) via 23a54a7bdf088394e73182d7a2b911e01ca326a7 (commit) via 5c05881e0ed0b9fc440bc64f6b60b369f4109139 (commit) via b73f64f49865ca2d2006f6ef21c6013a57152d7d (commit) via dcf4b7a4e0c03a02396694479a5069108b3555e2 (commit) via 0b68dc588539e0d53bdb758fdf1639e5808f010e (commit) from 6dfa118dace16c3fff039d071ca87a4210c91793 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ad824fa85e42fbf185addef24526427803056f1e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri May 9 22:23:52 2025 +0200 Remove duplicated assignment of compilation flags Fixes a double "-g -O2 -g -O2" in compiler invocation. diff --git a/c++/Makefile.am b/c++/Makefile.am index c01f91368..b1e9d03a7 100644 --- a/c++/Makefile.am +++ b/c++/Makefile.am @@ -4,7 +4,6 @@ lib_LTLIBRARIES = libhamlib++.la libhamlib___la_SOURCES = rigclass.cc rotclass.cc ampclass.cc libhamlib___la_LDFLAGS = -no-undefined -version-info $(ABI_VERSION):$(ABI_REVISION):$(ABI_AGE) $(LDFLAGS) libhamlib___la_LIBADD = $(top_builddir)/src/libhamlib.la -AM_CXXFLAGS=$(CXXFLAGS) check_PROGRAMS = testcpp commit c7ba4f5384bad446be7bf392539576dd1c572bd2 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri May 9 22:02:14 2025 +0200 Fix --without-cxx-binding being ignored Do not build the C++ bindings if the configure script was called with the option --without-cxx-binding. diff --git a/c++/Makefile.am b/c++/Makefile.am index be2b80821..c01f91368 100644 --- a/c++/Makefile.am +++ b/c++/Makefile.am @@ -1,3 +1,4 @@ +if ENABLE_CXX lib_LTLIBRARIES = libhamlib++.la libhamlib___la_SOURCES = rigclass.cc rotclass.cc ampclass.cc @@ -15,3 +16,5 @@ TESTS = $(check_PROGRAMS) $(top_builddir)/src/libhamlib.la: $(MAKE) -C $(top_builddir)/src/ libhamlib.la + +endif diff --git a/configure.ac b/configure.ac index ea06ba611..4a453abdb 100644 --- a/configure.ac +++ b/configure.ac @@ -560,6 +560,7 @@ AC_MSG_RESULT([$cf_with_cxx_binding]) AS_IF([test x"${cf_with_cxx_binding}" = "xyes"], [BINDINGS="${BINDINGS} c++"]) +AM_CONDITIONAL([ENABLE_CXX], [test x"${cf_with_cxx_binding}" = "xyes"]) dnl Check if perl-binding is wanted, default is to not build it commit da60d2d38324bb1d090f6a0d7bf46fa1f01315bd Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Fri May 9 21:08:42 2025 +0200 Replace non-portable make rule with one that is also easier to understand Fixes: warning: '%'-style pattern rules are a GNU make extension diff --git a/src/Makefile.am b/src/Makefile.am index 572818a22..0e940b317 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,17 +27,11 @@ libhamlib_la_LIBADD = $(top_builddir)/lib/libmisc.la $(top_builddir)/security/li libhamlib_la_DEPENDENCIES = $(top_builddir)/lib/libmisc.la $(top_builddir)/security/libsecurity.la $(BACKENDEPS) $(RIG_BACKENDEPS) $(ROT_BACKENDEPS) $(AMP_BACKENDEPS) -# Rule to build the dependencies of libhamlib.la that are not in this directory -# when running make in this directory instead of top_builddir -# (the % matches any number of subdirectories) -# warning: '%'-style pattern rules are a GNU make extension -$(top_builddir)/%.la: - $(MAKE) -C $(@D) $(@F) - -# - EXTRA_DIST = Android.mk hamlibdatetime.h.in band_changed.c +# Rule to build the dependencies of libhamlib.la that are in other directories +$(libhamlib_la_DEPENDENCIES): + $(MAKE) -C $(@D) $(@F) # If we have a .git directory then we will generate the hamlibdate.h # file and replace it if it is different. Fall back to a copy of a commit de01821c5121c1097695ff3d783dc0b88ddf95d3 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue May 6 22:17:54 2025 +0200 Fix typo diff --git a/src/debug.c b/src/debug.c index df8951ec0..de66c0879 100644 --- a/src/debug.c +++ b/src/debug.c @@ -199,7 +199,7 @@ void HAMLIB_API rig_set_debug_time_stamp(int flag) * \param debug_level Debug level from none to most output. * \param fmt Formatted character string to print. * - * The formatted character string is passed to the `frprintf`(3) C library + * The formatted character string is passed to the `vfprintf`(3) C library * call and follows its format specification. */ #undef rig_debug commit 1e7b1a628eefad3114e2d484ff18bc441552adb5 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue May 6 22:57:18 2025 +0200 Fix error return values All constant error values RIG_E* should be negated when returned. Found with: grep -nrE RETURNFUNC.?.RIG_E.+ --include=*.{c,h} | grep -v \- diff --git a/rigs/dummy/aclog.c b/rigs/dummy/aclog.c index 3b9fb4cef..c236003df 100644 --- a/rigs/dummy/aclog.c +++ b/rigs/dummy/aclog.c @@ -293,7 +293,7 @@ static int aclog_transaction(RIG *rig, char *cmd, char *value, } // we get an unknown response if function does not exist - if (strstr(xml, "UNKNOWN")) { set_transaction_inactive(rig); RETURNFUNC(RIG_ENAVAIL); } + if (strstr(xml, "UNKNOWN")) { set_transaction_inactive(rig); RETURNFUNC(-RIG_ENAVAIL); } if (value) { strncpy(value, xml, value_len); } @@ -304,7 +304,7 @@ static int aclog_transaction(RIG *rig, char *cmd, char *value, if (value && strlen(value) == 0) { rig_debug(RIG_DEBUG_ERR, "%s: no value returned\n", __func__); - set_transaction_inactive(rig); RETURNFUNC(RIG_EPROTO); + set_transaction_inactive(rig); RETURNFUNC(-RIG_EPROTO); } ELAPSED2; @@ -646,7 +646,7 @@ static int aclog_open(RIG *rig) if (retval != RIG_OK) { rig_debug(RIG_DEBUG_ERR, "%s: aclog_get_freq not working!!\n", __func__); - RETURNFUNC(RIG_EPROTO); + RETURNFUNC(-RIG_EPROTO); } STATE(rig)->current_vfo = RIG_VFO_A; diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index f46b429f5..505f803bb 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -610,9 +610,9 @@ static int flrig_transaction(RIG *rig, char *cmd, char *cmd_arg, char *value, read_transaction(rig, xml, sizeof(xml)); // this might time out -- that's OK // we get an unknown response if function does not exist - if (strstr(xml, "unknown")) { set_transaction_inactive(rig); RETURNFUNC(RIG_ENAVAIL); } + if (strstr(xml, "unknown")) { set_transaction_inactive(rig); RETURNFUNC(-RIG_ENAVAIL); } - if (strstr(xml, "get_bw") && strstr(xml, "NONE")) { set_transaction_inactive(rig); RETURNFUNC(RIG_ENAVAIL); } + if (strstr(xml, "get_bw") && strstr(xml, "NONE")) { set_transaction_inactive(rig); RETURNFUNC(-RIG_ENAVAIL); } if (value) { @@ -625,7 +625,7 @@ static int flrig_transaction(RIG *rig, char *cmd, char *cmd_arg, char *value, if (value && strlen(value) == 0) { rig_debug(RIG_DEBUG_ERR, "%s: no value returned\n", __func__); - set_transaction_inactive(rig); RETURNFUNC(RIG_EPROTO); + set_transaction_inactive(rig); RETURNFUNC(-RIG_EPROTO); } ELAPSED2; @@ -919,7 +919,7 @@ static int flrig_open(RIG *rig) if (retval != RIG_OK) { rig_debug(RIG_DEBUG_ERR, "%s: flrig_get_freq not working!!\n", __func__); - RETURNFUNC(RIG_EPROTO); + RETURNFUNC(-RIG_EPROTO); } /* see if get_bwA is available */ diff --git a/rigs/dummy/sdrsharp.c b/rigs/dummy/sdrsharp.c index 9fdd4fc3f..c1753d279 100644 --- a/rigs/dummy/sdrsharp.c +++ b/rigs/dummy/sdrsharp.c @@ -254,7 +254,7 @@ static int sdrsharp_transaction(RIG *rig, char *cmd, char *value, if (value && strlen(value) == 0) { rig_debug(RIG_DEBUG_ERR, "%s: no value returned\n", __func__); - set_transaction_inactive(rig); RETURNFUNC(RIG_EPROTO); + set_transaction_inactive(rig); RETURNFUNC(-RIG_EPROTO); } ELAPSED2; @@ -395,7 +395,7 @@ static int sdrsharp_open(RIG *rig) if (retval != RIG_OK) { rig_debug(RIG_DEBUG_ERR, "%s: sdrsharp_get_freq not working!!\n", __func__); - RETURNFUNC(RIG_EPROTO); + RETURNFUNC(-RIG_EPROTO); } STATE(rig)->current_vfo = RIG_VFO_A; diff --git a/rigs/dummy/tci1x.c b/rigs/dummy/tci1x.c index 779a9a8f3..7fdaa64d1 100644 --- a/rigs/dummy/tci1x.c +++ b/rigs/dummy/tci1x.c @@ -407,7 +407,7 @@ static int tci1x_transaction(RIG *rig, char *cmd, char *cmd_arg, char *value, while ((value && (strlen(value) == 0)) && retry--); // we'll do retries if needed - if (value && strlen(value) == 0) { RETURNFUNC(RIG_EPROTO); } + if (value && strlen(value) == 0) { RETURNFUNC(-RIG_EPROTO); } RETURNFUNC(RIG_OK); } diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 766297eae..b64cce03a 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -9820,7 +9820,7 @@ static int get_roofing_filter(RIG *rig, vfo_t vfo, "%s: Expected a valid roofing filter but got %c from '%s'\n", __func__, roofing_filter_choice, priv->ret_data); - RETURNFUNC(RIG_EPROTO); + RETURNFUNC(-RIG_EPROTO); } int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width) diff --git a/src/rig.c b/src/rig.c index e568402f8..227a4aa15 100644 --- a/src/rig.c +++ b/src/rig.c @@ -8044,7 +8044,7 @@ int HAMLIB_API rig_get_rig_info(RIG *rig, char *response, int max_response_len) rig_debug(RIG_DEBUG_ERR, "%s(%d): response len exceeded max %d chars\n", __FILE__, __LINE__, max_response_len); ELAPSED2; - RETURNFUNC2(RIG_EINTERNAL); + RETURNFUNC2(-RIG_EINTERNAL); } ELAPSED2; commit 56eea198beb22db9aa4f0a1447282e14d4ce7ea3 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue May 6 02:44:56 2025 +0200 Remove unneeded test script testcpp.sh Library directory ../dummy/.libs doesn't exist anymore and ../c++/.libs (a.k.a. .libs) is already used by the libtool wrapper script that runs the testcpp program. diff --git a/c++/Makefile.am b/c++/Makefile.am index daca3f4cd..be2b80821 100644 --- a/c++/Makefile.am +++ b/c++/Makefile.am @@ -11,15 +11,7 @@ testcpp_SOURCES = testcpp.cc testcpp_LDADD = libhamlib++.la $(top_builddir)/src/libhamlib.la $(top_builddir)/lib/libmisc.la $(DL_LIBS) testcpp_DEPENDENCIES = libhamlib++.la -check_SCRIPTS = testcpp.sh - -TESTS = $(check_SCRIPTS) +TESTS = $(check_PROGRAMS) $(top_builddir)/src/libhamlib.la: $(MAKE) -C $(top_builddir)/src/ libhamlib.la - -testcpp.sh: - echo 'LD_LIBRARY_PATH=$(top_builddir)/c++/.libs:$(top_builddir)/dummy/.libs ./testcpp' > testcpp.sh - chmod +x ./testcpp.sh - -CLEANFILES = testcpp.sh commit 23a54a7bdf088394e73182d7a2b911e01ca326a7 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Tue May 6 02:08:11 2025 +0200 Remove unneeded dependency diff --git a/security/Makefile.am b/security/Makefile.am index 86680d79e..f0ca51ceb 100644 --- a/security/Makefile.am +++ b/security/Makefile.am @@ -4,4 +4,3 @@ EXTRA_DIST = sctest.c noinst_LTLIBRARIES = libsecurity.la libsecurity_la_SOURCES = aes.c AESStringCrypt.c password.c security.c sha256.c md5.c aes.h AESStringCrypt.h password.h security.h sha256.h md5.h -LDADD = $(top_builddir)/src/libhamlib.la commit 5c05881e0ed0b9fc440bc64f6b60b369f4109139 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat May 3 22:23:53 2025 +0200 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. diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 0f4c1d2f0..11ecea1ec 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -30,6 +30,8 @@ example_DATA = BUILT_SOURCES = MOSTLYCLEANFILES = +$(top_builddir)/src/libhamlib.la: + $(MAKE) -C $(top_builddir)/src/ libhamlib.la if ENABLE_PERL ########################################## diff --git a/c++/Makefile.am b/c++/Makefile.am index 599b40041..daca3f4cd 100644 --- a/c++/Makefile.am +++ b/c++/Makefile.am @@ -15,6 +15,8 @@ check_SCRIPTS = testcpp.sh TESTS = $(check_SCRIPTS) +$(top_builddir)/src/libhamlib.la: + $(MAKE) -C $(top_builddir)/src/ libhamlib.la testcpp.sh: echo 'LD_LIBRARY_PATH=$(top_builddir)/c++/.libs:$(top_builddir)/dummy/.libs ./testcpp' > testcpp.sh diff --git a/simulators/Makefile.am b/simulators/Makefile.am index a58e79147..a9a799e79 100644 --- a/simulators/Makefile.am +++ b/simulators/Makefile.am @@ -44,5 +44,7 @@ EXTRA_DIST = #TESTS = $(check_SCRIPTS) +$(top_builddir)/src/libhamlib.la: + $(MAKE) -C $(top_builddir)/src/ libhamlib.la CLEANFILES = simelelecraft simicgeneric simkenwood simyaesu diff --git a/src/Makefile.am b/src/Makefile.am index 5c484f971..572818a22 100755 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,6 +27,15 @@ libhamlib_la_LIBADD = $(top_builddir)/lib/libmisc.la $(top_builddir)/security/li libhamlib_la_DEPENDENCIES = $(top_builddir)/lib/libmisc.la $(top_builddir)/security/libsecurity.la $(BACKENDEPS) $(RIG_BACKENDEPS) $(ROT_BACKENDEPS) $(AMP_BACKENDEPS) +# Rule to build the dependencies of libhamlib.la that are not in this directory +# when running make in this directory instead of top_builddir +# (the % matches any number of subdirectories) +# warning: '%'-style pattern rules are a GNU make extension +$(top_builddir)/%.la: + $(MAKE) -C $(@D) $(@F) + +# + EXTRA_DIST = Android.mk hamlibdatetime.h.in band_changed.c diff --git a/tests/Makefile.am b/tests/Makefile.am index 706d59bc5..c120165ff 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -110,6 +110,8 @@ check_SCRIPTS = testrig.sh testfreq.sh testbcd.sh testloc.sh testrigcaps.sh test TESTS = $(check_SCRIPTS) +$(top_builddir)/src/libhamlib.la: + $(MAKE) -C $(top_builddir)/src/ libhamlib.la testrig.sh: echo 'LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(top_builddir)/dummy/.libs ./testrig 1' > testrig.sh commit b73f64f49865ca2d2006f6ef21c6013a57152d7d Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sat May 3 00:55:51 2025 +0200 Remove redundant dependencies All *.swg files are in $(SWIGDEP) via $(SWGFILES). diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 17df597df..0f4c1d2f0 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -39,7 +39,7 @@ BUILT_SOURCES += hamlibperl_wrap.c MOSTLYCLEANFILES += hamlibperl_wrap.c Hamlib.pm Hamlib.bs Hamlib-pl.mk.old example_DATA += perltest.pl -hamlibperl_wrap.c: hamlib.swg $(SWIGDEP) ignore.swg rig.swg +hamlibperl_wrap.c: $(SWIGDEP) $(AM_V_GEN)$(SWIG) -perl5 -shadow $(AM_CPPFLAGS) -I$(top_srcdir)/bindings \ -o $@ $$(test -f hamlib.swg || echo '$(srcdir)/')hamlib.swg @@ -120,7 +120,7 @@ check-py: all-py Hamlib.py: hamlibpy_wrap.c -hamlibpy_wrap.c: hamlib.swg $(SWGDEP) +hamlibpy_wrap.c: $(SWGDEP) $(AM_V_GEN)$(SWIG) -python $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS) -I$(top_srcdir)/bindings \ -o $@ $$(test -f hamlib.swg || echo '$(srcdir)/')hamlib.swg @@ -166,7 +166,7 @@ hamlibtcl_la_LTLIBRARIES = $(tcl_ltlib) pkgIndex.tcl: Makefile $(AM_V_at)echo 'package ifneeded hamlib $(PKG_VER) [list load [file join $$dir $(DLL)] Hamlib]' > pkgIndex.tcl -hamlibtcl_wrap.c: hamlib.swg $(SWGDEP) +hamlibtcl_wrap.c: $(SWGDEP) $(AM_V_GEN)$(SWIG) -tcl -pkgversion $(PKG_VER) $(AM_CPPFLAGS) \ -I$(top_srcdir)/bindings \ -o $@ $$(test -f hamlib.swg || echo '$(srcdir)/')hamlib.swg @@ -219,7 +219,7 @@ check-lua: all-lua Hamlib.lua: hamliblua_wrap.c -hamliblua_wrap.c: hamlib.swg $(SWGDEP) +hamliblua_wrap.c: $(SWGDEP) $(AM_V_GEN)$(SWIG) -lua $(AM_CPPFLAGS) -I$(top_srcdir)/bindings \ -o $@ $$(test -f hamlib.swg || echo '$(srcdir)/')hamlib.swg commit dcf4b7a4e0c03a02396694479a5069108b3555e2 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Wed Apr 30 16:30:56 2025 +0200 Fix syntax of #define It was invalid C syntax, but it is currently unused. diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index a6bc0a7e6..f165dca29 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -829,7 +829,7 @@ typedef enum { // numbers here reflect generic values -- need to map to rig valu #define RIG_BANDSELECT_LF (RIG_BANDSELECT_2200M | RIG_BANDSELECT_600M) #define RIG_BANDSELECT_HF (RIG_BANDSELECT_160M | RIG_BANDSELECT_80M | RIG_BANDSELECT_60M | RIG_BANDSELECT_40M\ | RIG_BANDSELECT_30M | RIG_BANDSELECT_20M | RIG_BANDSELECT_17M | RIG_BANDSELECT_15M | RIG_BANDSELECT_12M\ -RIG_BANDSELECT_10M | RIG_BANDSELECT_6M) +| RIG_BANDSELECT_10M | RIG_BANDSELECT_6M) #define RIG_BANDSELECT_VHF (RIG_BANDSELECT_AIR | RIG_BANDSELECT_2M| RIG_BANDSELECT_1_25M( #define RIG_BANDSELECT_UHF (RIG_BANDSELECT_70CM) commit 0b68dc588539e0d53bdb758fdf1639e5808f010e Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Mon Apr 28 22:32:52 2025 +0200 Also check the "name" parameter Avoids a segfault if calling strtol(NULL, NULL, 0). diff --git a/src/conf.c b/src/conf.c index 24fd6a5e3..335b419dd 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1386,6 +1386,10 @@ const struct confparams *HAMLIB_API rig_confparam_lookup(RIG *rig, return NULL; } + if (!name) { + rig_debug(RIG_DEBUG_ERR, "%s: name is NULL\n", __func__); + return NULL; + } /* 0 returned for invalid format */ token = strtol(name, NULL, 0); ----------------------------------------------------------------------- Summary of changes: bindings/Makefile.am | 10 ++++++---- c++/Makefile.am | 14 +++++--------- configure.ac | 1 + include/hamlib/rig.h | 2 +- rigs/dummy/aclog.c | 6 +++--- rigs/dummy/flrig.c | 8 ++++---- rigs/dummy/sdrsharp.c | 4 ++-- rigs/dummy/tci1x.c | 2 +- rigs/yaesu/newcat.c | 2 +- security/Makefile.am | 1 - simulators/Makefile.am | 2 ++ src/Makefile.am | 3 +++ src/conf.c | 4 ++++ src/debug.c | 2 +- src/rig.c | 2 +- tests/Makefile.am | 2 ++ 16 files changed, 37 insertions(+), 28 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |