From fa08887471dfc9755dfd59e396bd684fa6bf0f36 Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Thu, 2 Jul 2020 10:23:41 -0500 Subject: [PATCH] Change hamlib_cache_t enums to HAMLIB namespace --- include/hamlib/rig.h | 12 ++++++------ src/conf.c | 4 ++-- tests/rigctl_parse.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index fe9f12fa1..ef9c46271 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1903,12 +1903,12 @@ typedef hamlib_port_t port_t; #define HAMLIB_ELAPSED_INVALIDATE 2 typedef enum { - CACHE_ALL, // to set all cache timeouts at once - CACHE_VFO, - CACHE_FREQ, - CACHE_MODE, - CACHE_PTT, - CACHE_SPLIT + HAMLIB_CACHE_ALL, // to set all cache timeouts at once + HAMLIB_CACHE_VFO, + HAMLIB_CACHE_FREQ, + HAMLIB_CACHE_MODE, + HAMLIB_CACHE_PTT, + HAMLIB_CACHE_SPLIT } hamlib_cache_t; /** diff --git a/src/conf.c b/src/conf.c index f343f8db5..43c8bed78 100644 --- a/src/conf.c +++ b/src/conf.c @@ -549,7 +549,7 @@ static int frontend_set_conf(RIG *rig, token_t token, const char *val) break; case TOK_CACHE_TIMEOUT: - rig_set_cache_timeout_ms(rig, CACHE_ALL, atol(val)); + rig_set_cache_timeout_ms(rig, HAMLIB_CACHE_ALL, atol(val)); break; default: @@ -861,7 +861,7 @@ static int frontend_get_conf(RIG *rig, token_t token, char *val) break; case TOK_CACHE_TIMEOUT: - sprintf(val, "%d", rig_get_cache_timeout_ms(rig, CACHE_ALL)); + sprintf(val, "%d", rig_get_cache_timeout_ms(rig, HAMLIB_CACHE_ALL)); break; default: diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 31c1d28c5..a6b75b600 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -4598,7 +4598,7 @@ declare_proto_rig(set_cache) int ms; CHKSCN1ARG(sscanf(arg1, "%d", &ms)); - return rig_set_cache_timeout_ms(rig, CACHE_ALL, ms); + return rig_set_cache_timeout_ms(rig, HAMLIB_CACHE_ALL, ms); } @@ -4607,7 +4607,7 @@ declare_proto_rig(get_cache) { int ms; - ms = rig_get_cache_timeout_ms(rig, CACHE_ALL); + ms = rig_get_cache_timeout_ms(rig, HAMLIB_CACHE_ALL); if ((interactive && prompt) || (interactive && !prompt && ext_resp)) {