[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 64babdb3615f71c92dcd3
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: n0nb <n0...@us...> - 2025-07-09 12:41:22
|
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 64babdb3615f71c92dcd341161fc0b2fcdde45e3 (commit) via 61ad3cda1098411fa8636b4347a791fd975ffa55 (commit) via 407d3f669b636f57990a095bb63f448f5b77dfdf (commit) from b5ba3f45b8de53866d160a86911672812627ee1e (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 64babdb3615f71c92dcd341161fc0b2fcdde45e3 Merge: b5ba3f45b 61ad3cda1 Author: Nate Bargmann <n0...@n0...> Date: Wed Jul 9 07:36:00 2025 -0500 Merge GitHub PR #1797 commit 61ad3cda1098411fa8636b4347a791fd975ffa55 Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 6 15:24:18 2025 +0200 Use Hamlib.rigerror2() to get the error message for the given error number diff --git a/bindings/python/test_startup.py b/bindings/python/test_startup.py index e4cfaf8c0..e38cc355d 100755 --- a/bindings/python/test_startup.py +++ b/bindings/python/test_startup.py @@ -31,7 +31,7 @@ class TestClass: assert my_rig.get_conf("retry") == '5' assert my_rig.error_status == Hamlib.RIG_OK - assert Hamlib.rigerror(my_rig.error_status) == "Command completed successfully\n" + assert Hamlib.rigerror2(my_rig.error_status) == "Command completed successfully\n" assert my_rig.set_freq(Hamlib.RIG_VFO_B, 5700000000) is None assert my_rig.set_vfo(Hamlib.RIG_VFO_B) is None commit 407d3f669b636f57990a095bb63f448f5b77dfdf Author: Daniele Forsi IU5HKX <iu...@gm...> Date: Sun Jul 6 14:58:41 2025 +0200 Revert "Fix debug messages shown even from disabled levels" This reverts commit ae9556462a2989b8b97af0d6e320558ffa0e1f3e. diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index a72e47474..c6421d324 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -3770,10 +3770,11 @@ extern HAMLIB_EXPORT_VAR(char) debugmsgsave2[DEBUGMSGSAVE_SIZE]; // last-1 debu // debugmsgsave3 is deprecated extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debug msg #define rig_debug_clear() { debugmsgsave[0] = debugmsgsave2[0] = debugmsgsave3[0] = 0; }; -#if !defined(__cplusplus) && defined(__GNUC__) -#define ATTRIBUTE_FORMAT_PRINTF __attribute__((__format__ (__printf__, 2, 3))) -#else -#define ATTRIBUTE_FORMAT_PRINTF +#ifndef __cplusplus +#ifdef __GNUC__ +// doing the debug macro with a dummy sprintf allows gcc to check the format string +#define rig_debug(debug_level,fmt,...) do { snprintf(debugmsgsave2,sizeof(debugmsgsave2),fmt,__VA_ARGS__);rig_debug(debug_level,fmt,##__VA_ARGS__); add2debugmsgsave(debugmsgsave2); } while(0) +#endif #endif // Measuring elapsed time -- local variable inside function when macro is used @@ -3785,7 +3786,7 @@ extern HAMLIB_EXPORT_VAR(char) debugmsgsave3[DEBUGMSGSAVE_SIZE]; // last-2 debu extern HAMLIB_EXPORT(void) rig_debug HAMLIB_PARAMS((enum rig_debug_level_e debug_level, - const char *fmt, ...)) ATTRIBUTE_FORMAT_PRINTF; + const char *fmt, ...)); extern HAMLIB_EXPORT(vprintf_cb_t) rig_set_debug_callback HAMLIB_PARAMS((vprintf_cb_t cb, diff --git a/src/debug.c b/src/debug.c index a57685535..de66c0879 100644 --- a/src/debug.c +++ b/src/debug.c @@ -202,6 +202,7 @@ void HAMLIB_API rig_set_debug_time_stamp(int flag) * The formatted character string is passed to the `vfprintf`(3) C library * call and follows its format specification. */ +#undef rig_debug void HAMLIB_API rig_debug(enum rig_debug_level_e debug_level, const char *fmt, ...) { ----------------------------------------------------------------------- Summary of changes: bindings/python/test_startup.py | 2 +- include/hamlib/rig.h | 11 ++++++----- src/debug.c | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |