From 295fa956f899af37acb6bda9c76ad77748eb9a4a Mon Sep 17 00:00:00 2001 From: Ervin Hegedus Date: Sat, 5 Jun 2021 09:23:06 +0200 Subject: [PATCH] Quick fix for changing of Hamlib's FILPATHLEN macro This patch was prepared for Guix by Jack Hill by squashing together the changes from upstream #268 . It allows the released version of Tlf to build against the version 4.2 of hamlib in Guix. --- src/sendqrg.c | 6 +++--- src/sendqrg.h | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/sendqrg.c b/src/sendqrg.c index ceeb356..5d4420e 100644 --- a/src/sendqrg.c +++ b/src/sendqrg.c @@ -87,7 +87,7 @@ int init_tlf_rig(void) { rigportname[strlen(rigportname) - 1] = '\0'; // remove '\n' strncpy(my_rig->state.rigport.pathname, rigportname, - FILPATHLEN - 1); + TLFFILPATHLEN - 1); caps = my_rig->caps; @@ -104,9 +104,9 @@ int init_tlf_rig(void) { if (dcd_type != RIG_DCD_NONE) my_rig->state.dcdport.type.dcd = dcd_type; if (ptt_file) - strncpy(my_rig->state.pttport.pathname, ptt_file, FILPATHLEN); + strncpy(my_rig->state.pttport.pathname, ptt_file, TLFFILPATHLEN); if (dcd_file) - strncpy(my_rig->state.dcdport.pathname, dcd_file, FILPATHLEN); + strncpy(my_rig->state.dcdport.pathname, dcd_file, TLFFILPATHLEN); my_rig->state.rigport.parm.serial.rate = serial_rate; diff --git a/src/sendqrg.h b/src/sendqrg.h index 8c53f2e..1ef85a6 100644 --- a/src/sendqrg.h +++ b/src/sendqrg.h @@ -23,6 +23,16 @@ #include +#ifdef HAMLIB_FILPATHLEN + #define TLFFILPATHLEN HAMLIB_FILPATHLEN +#else + #ifdef FILPATHLEN + #define TLFFILPATHLEN FILPATHLEN + #else + #error "(HAMLIB_)FILPATHLEN macro not found" + #endif +#endif + int init_tlf_rig(void); void close_tlf_rig(RIG *my_rig); -- 2.32.0 ze='10' name='q' value=''/>
AgeCommit message (Expand)Author
2023-06-04tests: records: Add test for ellipsis in body....* tests/records.scm ("match-record, ellipsis in body"): New test. Josselin Poiret
2023-06-04records: Add MATCH-RECORD-LAMBDA....* guix/records.scm (match-record-lambda): New syntax. * tests/records.scm ("match-record-lambda"): New test. Signed-off-by: Josselin Poiret <dev@jpoiret.xyz> (unmatched-parenthesis ew syntax
2023-06-04records: match-record: Support thunked and delayed fields....* guix/records.scm (match-record): Unwrap matched thunked and delayed fields. * tests/records.scm ("match-record, thunked field", "match-record, delayed field"): New tests. Signed-off-by: Josselin Poiret <dev@jpoiret.xyz> (unmatched-parenthesis d
2022-12-27records: match-record supports specifying a different variable name....An example: (match-record obj <my-type> (field1 (field2 custom-var-name) field3) ...) * guix/records.scm (match-record-inner): Add support for the new syntax. * tests/records.scm ("match-record, simple"): Add a simple test case for the new syntax. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Attila Lendvai
2022-12-02records: 'match-record' checks fields at macro-expansion time....This allows 'match-record' to be more efficient (field offsets are computed at compilation time) and to report unknown fields at macro-expansion time. * guix/records.scm (map-fields): New macro. (define-record-type*)[rtd-identifier]: New procedure. Define TYPE as a macro and use a separate identifier for the RTD. (lookup-field, match-record-inner): New macros. (match-record): Rewrite in terms of 'match-error-inner'. * tests/records.scm ("match-record, simple") ("match-record, unknown field"): New tests. * gnu/services/cuirass.scm (cuirass-shepherd-service): Rename 'log-file' local variable to 'main-log-file'. * gnu/services/getmail.scm (serialize-getmail-configuration-file): Move after <getmail-configuration-file> definition. Ludovic Courtès