From 12384c77965dfee4663138fee2e01246c762f336 Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sat, 13 May 2023 16:11:46 -0500 Subject: [PATCH] Change rigctl_parse to use ENTERFUNC2 instead of ENTERFUNC https://github.com/Hamlib/Hamlib/issues/695 --- src/rig.c | 2 +- tests/rigctl_parse.c | 488 +++++++++++++++++++++---------------------- 2 files changed, 245 insertions(+), 245 deletions(-) diff --git a/src/rig.c b/src/rig.c index eb15b5655..a82c5a472 100644 --- a/src/rig.c +++ b/src/rig.c @@ -168,7 +168,7 @@ const char hamlib_copyright[231] = /* hamlib 1.2 ABI specifies 231 bytes */ #define CHECK_RIG_ARG(r) (!(r) || !(r)->caps || !(r)->state.comm_state) #define CHECK_RIG_CAPS(r) (!(r) || !(r)->caps) -#define LOCK if (rig->state.depth == 1) { rig_debug(RIG_DEBUG_ERR, "%s: lock!! *******************************************\n", __func__); } +#define LOCK if (rig->state.depth == 0) { rig_debug(RIG_DEBUG_ERR, "%s: lock!! *******************************************\n", __func__); } #ifdef PTHREAD #define MUTEX(var) static pthread_mutex_t var = PTHREAD_MUTEX_INITIALIZER diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 331363ed0..d084462e1 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -153,7 +153,7 @@ struct test_table }; -#define CHKSCN1ARG(a) if ((a) != 1) { rig_debug(RIG_DEBUG_ERR,"%s: chkarg err\n", __func__);RETURNFUNC(-RIG_EINVAL);} else do {} while(0) +#define CHKSCN1ARG(a) if ((a) != 1) { rig_debug(RIG_DEBUG_ERR,"%s: chkarg err\n", __func__);RETURNFUNC2(-RIG_EINVAL);} else do {} while(0) #define ACTION(f) rigctl_##f #define declare_proto_rig(f) static int (ACTION(f))(RIG *rig, \ @@ -2085,7 +2085,7 @@ declare_proto_rig(set_freq) char *fmt = "%"PRIll"%c"; #endif - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%"SCNfreq, &freq)); retval = rig_set_freq(rig, vfo, freq); @@ -2097,7 +2097,7 @@ declare_proto_rig(set_freq) } - RETURNFUNC(retval); + RETURNFUNC2(retval); } @@ -2109,13 +2109,13 @@ declare_proto_rig(get_freq) // cppcheck-suppress * char *fmt = "%"PRIll"%c"; - ENTERFUNC; + ENTERFUNC2; status = rig_get_freq(rig, vfo, &freq); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2135,7 +2135,7 @@ declare_proto_rig(get_freq) fprintf(fout, "%s%c", rig_strvfo(vfo), resp_sep); #endif - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -2144,11 +2144,11 @@ declare_proto_rig(set_rit) { shortfreq_t rit; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%ld", &rit)); - RETURNFUNC(rig_set_rit(rig, vfo, rit)); + RETURNFUNC2(rig_set_rit(rig, vfo, rit)); } @@ -2158,13 +2158,13 @@ declare_proto_rig(get_rit) int status; shortfreq_t rit; - ENTERFUNC; + ENTERFUNC2; status = rig_get_rit(rig, vfo, &rit); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2174,7 +2174,7 @@ declare_proto_rig(get_rit) fprintf(fout, "%ld%c", rit, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -2183,11 +2183,11 @@ declare_proto_rig(set_xit) { shortfreq_t xit; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%ld", &xit)); - RETURNFUNC(rig_set_xit(rig, vfo, xit)); + RETURNFUNC2(rig_set_xit(rig, vfo, xit)); } @@ -2197,13 +2197,13 @@ declare_proto_rig(get_xit) int status; shortfreq_t xit; - ENTERFUNC; + ENTERFUNC2; status = rig_get_xit(rig, vfo, &xit); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2213,7 +2213,7 @@ declare_proto_rig(get_xit) fprintf(fout, "%ld%c", xit, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -2223,24 +2223,24 @@ declare_proto_rig(set_mode) rmode_t mode; pbwidth_t width; - ENTERFUNC; + ENTERFUNC2; - if (rig->state.lock_mode || lock_mode) { RETURNFUNC(RIG_OK); } + if (rig->state.lock_mode || lock_mode) { RETURNFUNC2(RIG_OK); } if (!strcmp(arg1, "?")) { char s[SPRINTF_MAX_SIZE]; rig_sprintf_mode(s, sizeof(s), rig->state.mode_list); fprintf(fout, "%s\n", s); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } mode = rig_parse_mode(arg1); CHKSCN1ARG(sscanf(arg2, "%ld", &width)); - if (rig->state.lock_mode) { RETURNFUNC(RIG_OK); } + if (rig->state.lock_mode) { RETURNFUNC2(RIG_OK); } - RETURNFUNC(rig_set_mode(rig, vfo, mode, width)); + RETURNFUNC2(rig_set_mode(rig, vfo, mode, width)); } @@ -2251,13 +2251,13 @@ declare_proto_rig(get_mode) rmode_t mode; pbwidth_t width; - ENTERFUNC; + ENTERFUNC2; status = rig_get_mode(rig, vfo, &mode, &width); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2274,7 +2274,7 @@ declare_proto_rig(get_mode) fprintf(fout, "%ld%c", width, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -2283,14 +2283,14 @@ declare_proto_rig(set_vfo) { int retval; - ENTERFUNC; + ENTERFUNC2; if (!strcmp(arg1, "?")) { char s[SPRINTF_MAX_SIZE]; rig_sprintf_vfo(s, sizeof(s), rig->state.vfo_list); fprintf(fout, "%s\n", s); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } vfo = rig_parse_vfo(arg1); @@ -2326,7 +2326,7 @@ declare_proto_rig(set_vfo) rig_strvfo(vfo), arg1); } - RETURNFUNC(retval); + RETURNFUNC2(retval); } @@ -2335,13 +2335,13 @@ declare_proto_rig(get_vfo) { int status; - ENTERFUNC; + ENTERFUNC2; status = rig_get_vfo(rig, &vfo); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2351,20 +2351,20 @@ declare_proto_rig(get_vfo) fprintf(fout, "%s%c", rig_strvfo(vfo), resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } declare_proto_rig(get_rig_info) { char buf[1024]; // big enough to last numerous years hopefully int ret; - ENTERFUNC; + ENTERFUNC2; ret = rig_get_rig_info(rig, buf, sizeof(buf)); - if (ret != RIG_OK) { RETURNFUNC(ret); } + if (ret != RIG_OK) { RETURNFUNC2(ret); } fprintf(fout, "%s\n", buf); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } /* '\get_vfo_info' */ @@ -2372,7 +2372,7 @@ declare_proto_rig(get_vfo_info) { int retval; - ENTERFUNC; + ENTERFUNC2; ELAPSED1; if (!strcmp(arg1, "?")) @@ -2380,7 +2380,7 @@ declare_proto_rig(get_vfo_info) char s[SPRINTF_MAX_SIZE]; rig_sprintf_vfo(s, sizeof(s), rig->state.vfo_list); fprintf(fout, "%s\n", s); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } vfo = rig_parse_vfo(arg1); @@ -2416,7 +2416,7 @@ declare_proto_rig(get_vfo_info) } ELAPSED2; - RETURNFUNC(retval); + RETURNFUNC2(retval); } /* '\get_vfo_list' */ @@ -2424,7 +2424,7 @@ declare_proto_rig(get_vfo_list) { static char prntbuf[256]; - ENTERFUNC; + ENTERFUNC2; rig_sprintf_vfo(prntbuf, sizeof(prntbuf), rig->state.vfo_list); @@ -2435,7 +2435,7 @@ declare_proto_rig(get_vfo_list) fprintf(fout, "%s%c\n", prntbuf[0] ? prntbuf : "None", ext_resp); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } /* '\get_modes' */ @@ -2445,7 +2445,7 @@ declare_proto_rig(get_modes) int i; char freqbuf[32]; - ENTERFUNC; + ENTERFUNC2; rig_strrmodes(rig->state.mode_list, prntbuf, sizeof(prntbuf)); @@ -2478,7 +2478,7 @@ declare_proto_rig(get_modes) } - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } declare_proto_rig(get_mode_bandwidths) @@ -2486,7 +2486,7 @@ declare_proto_rig(get_mode_bandwidths) int i; char freqbuf[32]; - ENTERFUNC; + ENTERFUNC2; rmode_t mode = rig_parse_mode(arg1); @@ -2518,7 +2518,7 @@ declare_proto_rig(get_mode_bandwidths) } - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } @@ -2530,7 +2530,7 @@ declare_proto_rig(set_ptt) int scr; ptt_t ptt; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%d", &scr)); ptt = scr; @@ -2574,11 +2574,11 @@ declare_proto_rig(set_ptt) // this case is not handled in hamlib, but we guard against // illegal parameters here. The hamlib behaviour is to switch // on PTT whenever ptt != RIG_PTT_OFF. - RETURNFUNC(-RIG_EINVAL); + RETURNFUNC2(-RIG_EINVAL); } rig_debug(RIG_DEBUG_ERR, "%s: ptt=%d\n", __func__, ptt); - RETURNFUNC(rig_set_ptt(rig, vfo, ptt)); + RETURNFUNC2(rig_set_ptt(rig, vfo, ptt)); } @@ -2588,13 +2588,13 @@ declare_proto_rig(get_ptt) int status; ptt_t ptt = 0; - ENTERFUNC; + ENTERFUNC2; status = rig_get_ptt(rig, vfo, &ptt); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2605,7 +2605,7 @@ declare_proto_rig(get_ptt) /* TODO MICDATA */ fprintf(fout, "%d%c", ptt, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -2615,13 +2615,13 @@ declare_proto_rig(get_dcd) int status; dcd_t dcd; - ENTERFUNC; + ENTERFUNC2; status = rig_get_dcd(rig, vfo, &dcd); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2631,7 +2631,7 @@ declare_proto_rig(get_dcd) fprintf(fout, "%d%c", dcd, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -2640,11 +2640,11 @@ declare_proto_rig(set_rptr_shift) { rptr_shift_t rptr_shift; - ENTERFUNC; + ENTERFUNC2; rptr_shift = rig_parse_rptr_shift(arg1); - RETURNFUNC(rig_set_rptr_shift(rig, vfo, rptr_shift)); + RETURNFUNC2(rig_set_rptr_shift(rig, vfo, rptr_shift)); } @@ -2654,13 +2654,13 @@ declare_proto_rig(get_rptr_shift) int status; rptr_shift_t rptr_shift; - ENTERFUNC; + ENTERFUNC2; status = rig_get_rptr_shift(rig, vfo, &rptr_shift); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2670,7 +2670,7 @@ declare_proto_rig(get_rptr_shift) fprintf(fout, "%s%c", rig_strptrshift(rptr_shift), resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -2679,11 +2679,11 @@ declare_proto_rig(set_rptr_offs) { unsigned long rptr_offs; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%lu", &rptr_offs)); - RETURNFUNC(rig_set_rptr_offs(rig, vfo, rptr_offs)); + RETURNFUNC2(rig_set_rptr_offs(rig, vfo, rptr_offs)); } @@ -2693,13 +2693,13 @@ declare_proto_rig(get_rptr_offs) int status; shortfreq_t rptr_offs; - ENTERFUNC; + ENTERFUNC2; status = rig_get_rptr_offs(rig, vfo, &rptr_offs); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2709,7 +2709,7 @@ declare_proto_rig(get_rptr_offs) fprintf(fout, "%ld%c", rptr_offs, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -2718,11 +2718,11 @@ declare_proto_rig(set_ctcss_tone) { tone_t tone; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%u", &tone)); - RETURNFUNC(rig_set_ctcss_tone(rig, vfo, tone)); + RETURNFUNC2(rig_set_ctcss_tone(rig, vfo, tone)); } @@ -2732,13 +2732,13 @@ declare_proto_rig(get_ctcss_tone) int status; tone_t tone; - ENTERFUNC; + ENTERFUNC2; status = rig_get_ctcss_tone(rig, vfo, &tone); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2748,7 +2748,7 @@ declare_proto_rig(get_ctcss_tone) fprintf(fout, "%d%c", tone, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -2757,11 +2757,11 @@ declare_proto_rig(set_dcs_code) { tone_t code; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%u", &code)); - RETURNFUNC(rig_set_dcs_code(rig, vfo, code)); + RETURNFUNC2(rig_set_dcs_code(rig, vfo, code)); } @@ -2771,13 +2771,13 @@ declare_proto_rig(get_dcs_code) int status; tone_t code; - ENTERFUNC; + ENTERFUNC2; status = rig_get_dcs_code(rig, vfo, &code); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2787,7 +2787,7 @@ declare_proto_rig(get_dcs_code) fprintf(fout, "%d%c", code, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -2796,11 +2796,11 @@ declare_proto_rig(set_ctcss_sql) { tone_t tone; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%u", &tone)); - RETURNFUNC(rig_set_ctcss_sql(rig, vfo, tone)); + RETURNFUNC2(rig_set_ctcss_sql(rig, vfo, tone)); } @@ -2810,13 +2810,13 @@ declare_proto_rig(get_ctcss_sql) int status; tone_t tone; - ENTERFUNC; + ENTERFUNC2; status = rig_get_ctcss_sql(rig, vfo, &tone); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2826,7 +2826,7 @@ declare_proto_rig(get_ctcss_sql) fprintf(fout, "%d%c", tone, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -2835,11 +2835,11 @@ declare_proto_rig(set_dcs_sql) { tone_t code; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%u", &code)); - RETURNFUNC(rig_set_dcs_sql(rig, vfo, code)); + RETURNFUNC2(rig_set_dcs_sql(rig, vfo, code)); } @@ -2849,13 +2849,13 @@ declare_proto_rig(get_dcs_sql) int status; tone_t code; - ENTERFUNC; + ENTERFUNC2; status = rig_get_dcs_sql(rig, vfo, &code); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2865,7 +2865,7 @@ declare_proto_rig(get_dcs_sql) fprintf(fout, "%d%c", code, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -2875,11 +2875,11 @@ declare_proto_rig(set_split_freq) freq_t txfreq; vfo_t txvfo = RIG_VFO_TX; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%"SCNfreq, &txfreq)); - RETURNFUNC(rig_set_split_freq(rig, txvfo, txfreq)); + RETURNFUNC2(rig_set_split_freq(rig, txvfo, txfreq)); } @@ -2890,13 +2890,13 @@ declare_proto_rig(get_split_freq) freq_t txfreq; vfo_t txvfo = RIG_VFO_TX; - ENTERFUNC; + ENTERFUNC2; status = rig_get_split_freq(rig, txvfo, &txfreq); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2906,7 +2906,7 @@ declare_proto_rig(get_split_freq) fprintf(fout, "%"PRIll"%c", (int64_t)txfreq, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -2917,14 +2917,14 @@ declare_proto_rig(set_split_mode) int width; vfo_t txvfo = RIG_VFO_TX; - ENTERFUNC; + ENTERFUNC2; if (!strcmp(arg1, "?")) { char s[SPRINTF_MAX_SIZE]; rig_sprintf_mode(s, sizeof(s), rig->state.mode_list); fprintf(fout, "%s\n", s); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } // mode could be RIG_MODE_NONE here @@ -2932,7 +2932,7 @@ declare_proto_rig(set_split_mode) // rig_parse_mode will spit out error msg mode = rig_parse_mode(arg1); CHKSCN1ARG(sscanf(arg2, "%d", &width)); - RETURNFUNC(rig_set_split_mode(rig, txvfo, mode, (pbwidth_t) width)); + RETURNFUNC2(rig_set_split_mode(rig, txvfo, mode, (pbwidth_t) width)); } @@ -2944,13 +2944,13 @@ declare_proto_rig(get_split_mode) pbwidth_t width; vfo_t txvfo = RIG_VFO_TX; - ENTERFUNC; + ENTERFUNC2; status = rig_get_split_mode(rig, txvfo, &mode, &width); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -2967,7 +2967,7 @@ declare_proto_rig(get_split_mode) fprintf(fout, "%ld%c", width, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -2979,20 +2979,20 @@ declare_proto_rig(set_split_freq_mode) int width; vfo_t txvfo = RIG_VFO_TX; - ENTERFUNC; + ENTERFUNC2; if (!strcmp(arg1, "?")) { char s[SPRINTF_MAX_SIZE]; rig_sprintf_mode(s, sizeof(s), rig->state.mode_list); fprintf(fout, "%s\n", s); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } CHKSCN1ARG(sscanf(arg1, "%"SCNfreq, &freq)); mode = rig_parse_mode(arg2); CHKSCN1ARG(sscanf(arg3, "%d", &width)); - RETURNFUNC(rig_set_split_freq_mode(rig, txvfo, freq, mode, (pbwidth_t) width)); + RETURNFUNC2(rig_set_split_freq_mode(rig, txvfo, freq, mode, (pbwidth_t) width)); } @@ -3005,13 +3005,13 @@ declare_proto_rig(get_split_freq_mode) pbwidth_t width; vfo_t txvfo = RIG_VFO_TX; - ENTERFUNC; + ENTERFUNC2; status = rig_get_split_freq_mode(rig, txvfo, &freq, &mode, &width); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -3035,7 +3035,7 @@ declare_proto_rig(get_split_freq_mode) fprintf(fout, "%ld%c", width, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -3045,7 +3045,7 @@ declare_proto_rig(set_split_vfo) int split; vfo_t tx_vfo; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%d", &split)); @@ -3054,20 +3054,20 @@ declare_proto_rig(set_split_vfo) char s[SPRINTF_MAX_SIZE]; rig_sprintf_vfo(s, sizeof(s), rig->state.vfo_list); fprintf(fout, "%s\n", s); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } tx_vfo = rig_parse_vfo(arg2); if (tx_vfo == RIG_VFO_NONE) { - RETURNFUNC(-RIG_EINVAL); + RETURNFUNC2(-RIG_EINVAL); } rig_debug(RIG_DEBUG_VERBOSE, "%s(%d): rx_vfo = %s, tx_vfo = %s\n", __func__, __LINE__, rig_strvfo(vfo), rig_strvfo(tx_vfo)); - RETURNFUNC(rig_set_split_vfo(rig, vfo, (split_t) split, tx_vfo)); + RETURNFUNC2(rig_set_split_vfo(rig, vfo, (split_t) split, tx_vfo)); } @@ -3078,13 +3078,13 @@ declare_proto_rig(get_split_vfo) split_t split; vfo_t tx_vfo; - ENTERFUNC; + ENTERFUNC2; status = rig_get_split_vfo(rig, vfo, &split, &tx_vfo); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -3101,7 +3101,7 @@ declare_proto_rig(get_split_vfo) fprintf(fout, "%s%c", rig_strvfo(tx_vfo), resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -3110,11 +3110,11 @@ declare_proto_rig(set_ts) { unsigned long ts; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%lu", &ts)); - RETURNFUNC(rig_set_ts(rig, vfo, ts)); + RETURNFUNC2(rig_set_ts(rig, vfo, ts)); } @@ -3124,13 +3124,13 @@ declare_proto_rig(get_ts) int status; shortfreq_t ts; - ENTERFUNC; + ENTERFUNC2; status = rig_get_ts(rig, vfo, &ts); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -3140,7 +3140,7 @@ declare_proto_rig(get_ts) fprintf(fout, "%ld%c", ts, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -3153,7 +3153,7 @@ declare_proto_rig(power2mW) rmode_t mode; unsigned int mwp; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%f", &power)); CHKSCN1ARG(sscanf(arg2, "%"SCNfreq, &freq)); @@ -3163,7 +3163,7 @@ declare_proto_rig(power2mW) if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -3173,7 +3173,7 @@ declare_proto_rig(power2mW) fprintf(fout, "%i%c", mwp, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -3186,7 +3186,7 @@ declare_proto_rig(mW2power) rmode_t mode; unsigned int mwp; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%u", &mwp)); CHKSCN1ARG(sscanf(arg2, "%"SCNfreq, &freq)); @@ -3196,7 +3196,7 @@ declare_proto_rig(mW2power) if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -3206,7 +3206,7 @@ declare_proto_rig(mW2power) fprintf(fout, "%f%c", power, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -3224,7 +3224,7 @@ declare_proto_rig(set_level) setting_t level; value_t val; - ENTERFUNC; + ENTERFUNC2; if (!strcmp(arg1, "?")) { @@ -3239,7 +3239,7 @@ declare_proto_rig(set_level) } fputc('\n', fout); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } level = rig_parse_level(arg1); @@ -3257,7 +3257,7 @@ declare_proto_rig(set_level) if (!cfp) { - RETURNFUNC(-RIG_ENAVAIL); /* no such parameter */ + RETURNFUNC2(-RIG_ENAVAIL); /* no such parameter */ } switch (cfp->type) @@ -3281,10 +3281,10 @@ declare_proto_rig(set_level) break; default: - RETURNFUNC(-RIG_ECONF); + RETURNFUNC2(-RIG_ECONF); } - RETURNFUNC(rig_set_ext_level(rig, vfo, cfp->token, val)); + RETURNFUNC2(rig_set_ext_level(rig, vfo, cfp->token, val)); } if (RIG_LEVEL_IS_FLOAT(level)) @@ -3296,7 +3296,7 @@ declare_proto_rig(set_level) CHKSCN1ARG(sscanf(arg2, "%d", &val.i)); } - RETURNFUNC(rig_set_level(rig, vfo, level, val)); + RETURNFUNC2(rig_set_level(rig, vfo, level, val)); } @@ -3307,7 +3307,7 @@ declare_proto_rig(get_level) setting_t level; value_t val; - ENTERFUNC; + ENTERFUNC2; if (!strcmp(arg1, "?")) { @@ -3322,7 +3322,7 @@ declare_proto_rig(get_level) } //fputc('\n', fout); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } level = rig_parse_level(arg1); @@ -3336,14 +3336,14 @@ declare_proto_rig(get_level) if (!cfp) { rig_debug(RIG_DEBUG_ERR, "%s: level not found=%s\n", __func__, arg1); - RETURNFUNC(-RIG_EINVAL); /* no such parameter */ + RETURNFUNC2(-RIG_EINVAL); /* no such parameter */ } status = rig_get_ext_level(rig, vfo, cfp->token, &val); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if (interactive && prompt) @@ -3355,7 +3355,7 @@ declare_proto_rig(get_level) { case RIG_CONF_BUTTON: /* there's no sense in retrieving value of stateless button */ - RETURNFUNC(-RIG_EINVAL); + RETURNFUNC2(-RIG_EINVAL); case RIG_CONF_CHECKBUTTON: case RIG_CONF_COMBO: @@ -3371,17 +3371,17 @@ declare_proto_rig(get_level) break; default: - RETURNFUNC(-RIG_ECONF); + RETURNFUNC2(-RIG_ECONF); } - RETURNFUNC(status); + RETURNFUNC2(status); } status = rig_get_level(rig, vfo, level, &val); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if (interactive && prompt) @@ -3398,7 +3398,7 @@ declare_proto_rig(get_level) fprintf(fout, "%d%c", val.i, resp_sep); } - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -3408,14 +3408,14 @@ declare_proto_rig(set_func) setting_t func; int func_stat; - ENTERFUNC; + ENTERFUNC2; if (!strcmp(arg1, "?")) { char s[SPRINTF_MAX_SIZE]; rig_sprintf_func(s, sizeof(s), rig->state.has_set_func); fprintf(fout, "%s\n", s); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } func = rig_parse_func(arg1); @@ -3428,16 +3428,16 @@ declare_proto_rig(set_func) if (!cfp) { - RETURNFUNC(-RIG_ENAVAIL); /* no such parameter */ + RETURNFUNC2(-RIG_ENAVAIL); /* no such parameter */ } CHKSCN1ARG(sscanf(arg2, "%d", &func_stat)); - RETURNFUNC(rig_set_ext_func(rig, vfo, cfp->token, func_stat)); + RETURNFUNC2(rig_set_ext_func(rig, vfo, cfp->token, func_stat)); } CHKSCN1ARG(sscanf(arg2, "%d", &func_stat)); - RETURNFUNC(rig_set_func(rig, vfo, func, func_stat)); + RETURNFUNC2(rig_set_func(rig, vfo, func, func_stat)); } @@ -3448,14 +3448,14 @@ declare_proto_rig(get_func) setting_t func; int func_stat; - ENTERFUNC; + ENTERFUNC2; if (!strcmp(arg1, "?")) { char s[SPRINTF_MAX_SIZE]; rig_sprintf_func(s, sizeof(s), rig->state.has_get_func); fprintf(fout, "%s\n", s); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } func = rig_parse_func(arg1); @@ -3468,14 +3468,14 @@ declare_proto_rig(get_func) if (!cfp) { - RETURNFUNC(-RIG_EINVAL); /* no such parameter */ + RETURNFUNC2(-RIG_EINVAL); /* no such parameter */ } status = rig_get_ext_func(rig, vfo, cfp->token, &func_stat); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if (interactive && prompt) @@ -3485,14 +3485,14 @@ declare_proto_rig(get_func) fprintf(fout, "%d\n", func_stat); - RETURNFUNC(status); + RETURNFUNC2(status); } status = rig_get_func(rig, vfo, func, &func_stat); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if (interactive && prompt) @@ -3502,7 +3502,7 @@ declare_proto_rig(get_func) fprintf(fout, "%d\n", func_stat); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -3512,14 +3512,14 @@ declare_proto_rig(set_parm) setting_t parm; value_t val; - ENTERFUNC; + ENTERFUNC2; if (!strcmp(arg1, "?")) { char s[SPRINTF_MAX_SIZE]; rig_sprintf_parm(s, sizeof(s), rig->state.has_set_parm); fprintf(fout, "%s\n", s); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } parm = rig_parse_parm(arg1); @@ -3532,7 +3532,7 @@ declare_proto_rig(set_parm) if (!cfp) { - RETURNFUNC(-RIG_EINVAL); /* no such parameter */ + RETURNFUNC2(-RIG_EINVAL); /* no such parameter */ } switch (cfp->type) @@ -3560,10 +3560,10 @@ declare_proto_rig(set_parm) break; default: - RETURNFUNC(-RIG_ECONF); + RETURNFUNC2(-RIG_ECONF); } - RETURNFUNC(rig_set_ext_parm(rig, cfp->token, val)); + RETURNFUNC2(rig_set_ext_parm(rig, cfp->token, val)); } if (RIG_PARM_IS_FLOAT(parm)) @@ -3575,7 +3575,7 @@ declare_proto_rig(set_parm) CHKSCN1ARG(sscanf(arg2, "%d", &val.i)); } - RETURNFUNC(rig_set_parm(rig, parm, val)); + RETURNFUNC2(rig_set_parm(rig, parm, val)); } @@ -3587,14 +3587,14 @@ declare_proto_rig(get_parm) value_t val; char buffer[RIG_BIN_MAX]; - ENTERFUNC; + ENTERFUNC2; if (!strcmp(arg1, "?")) { char s[SPRINTF_MAX_SIZE]; rig_sprintf_parm(s, sizeof(s), rig->state.has_get_parm); fprintf(fout, "%s\n", s); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } parm = rig_parse_parm(arg1); @@ -3607,7 +3607,7 @@ declare_proto_rig(get_parm) if (!cfp) { - RETURNFUNC(-RIG_EINVAL); /* no such parameter */ + RETURNFUNC2(-RIG_EINVAL); /* no such parameter */ } switch (cfp->type) @@ -3632,7 +3632,7 @@ declare_proto_rig(get_parm) if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if (interactive && prompt) @@ -3644,7 +3644,7 @@ declare_proto_rig(get_parm) { case RIG_CONF_BUTTON: /* there's not sense in retrieving value of stateless button */ - RETURNFUNC(-RIG_EINVAL); + RETURNFUNC2(-RIG_EINVAL); case RIG_CONF_CHECKBUTTON: case RIG_CONF_COMBO: @@ -3664,17 +3664,17 @@ declare_proto_rig(get_parm) break; default: - RETURNFUNC(-RIG_ECONF); + RETURNFUNC2(-RIG_ECONF); } - RETURNFUNC(status); + RETURNFUNC2(status); } status = rig_get_parm(rig, parm, &val); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if (interactive && prompt) @@ -3691,7 +3691,7 @@ declare_proto_rig(get_parm) fprintf(fout, "%d\n", val.i); } - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -3700,11 +3700,11 @@ declare_proto_rig(set_bank) { int bank; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%d", &bank)); - RETURNFUNC(rig_set_bank(rig, vfo, bank)); + RETURNFUNC2(rig_set_bank(rig, vfo, bank)); } @@ -3713,11 +3713,11 @@ declare_proto_rig(set_mem) { int ch; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%d", &ch)); - RETURNFUNC(rig_set_mem(rig, vfo, ch)); + RETURNFUNC2(rig_set_mem(rig, vfo, ch)); } @@ -3727,13 +3727,13 @@ declare_proto_rig(get_mem) int status; int ch; - ENTERFUNC; + ENTERFUNC2; status = rig_get_mem(rig, vfo, &ch); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -3743,7 +3743,7 @@ declare_proto_rig(get_mem) fprintf(fout, "%d%c", ch, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -3752,14 +3752,14 @@ declare_proto_rig(vfo_op) { vfo_op_t op; - ENTERFUNC; + ENTERFUNC2; if (!strcmp(arg1, "?")) { char s[SPRINTF_MAX_SIZE]; rig_sprintf_vfop(s, sizeof(s), rig->caps->vfo_ops); fprintf(fout, "%s\n", s); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } op = rig_parse_vfo_op(arg1); @@ -3768,10 +3768,10 @@ declare_proto_rig(vfo_op) { rig_debug(RIG_DEBUG_ERR, "%s: rig_parse_vfo failed with '%s'\n", __func__, arg1); - RETURNFUNC(-RIG_EINVAL); + RETURNFUNC2(-RIG_EINVAL); } - RETURNFUNC(rig_vfo_op(rig, vfo, op)); + RETURNFUNC2(rig_vfo_op(rig, vfo, op)); } @@ -3781,19 +3781,19 @@ declare_proto_rig(scan) scan_t op; int ch; - ENTERFUNC; + ENTERFUNC2; if (!strcmp(arg1, "?")) { char s[SPRINTF_MAX_SIZE]; rig_sprintf_scan(s, sizeof(s), rig->caps->scan_ops); fprintf(fout, "%s\n", s); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } op = rig_parse_scan(arg1); CHKSCN1ARG(sscanf(arg2, "%d", &ch)); - RETURNFUNC(rig_scan(rig, vfo, op, ch)); + RETURNFUNC2(rig_scan(rig, vfo, op, ch)); } @@ -3806,7 +3806,7 @@ declare_proto_rig(set_channel) int status; char s[16]; - ENTERFUNC; + ENTERFUNC2; memset(&chan, 0, sizeof(channel_t)); @@ -3836,7 +3836,7 @@ declare_proto_rig(set_channel) if (!mem_caps) { - RETURNFUNC(-RIG_ECONF); + RETURNFUNC2(-RIG_ECONF); } if (mem_caps->bank_num) @@ -4112,7 +4112,7 @@ declare_proto_rig(set_channel) status = rig_set_channel(rig, vfo, &chan); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -4123,7 +4123,7 @@ declare_proto_rig(get_channel) int read_only = 0; channel_t chan; - ENTERFUNC; + ENTERFUNC2; memset(&chan, 0, sizeof(channel_t)); @@ -4144,7 +4144,7 @@ declare_proto_rig(get_channel) if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } status = dump_chan(fout, rig, &chan); @@ -4154,7 +4154,7 @@ declare_proto_rig(get_channel) free(chan.ext_levels); } - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -4164,8 +4164,8 @@ declare_proto_rig(get_channel) */ declare_proto_rig(set_trn) { - ENTERFUNC; - RETURNFUNC(-RIG_EDEPRECATED); + ENTERFUNC2; + RETURNFUNC2(-RIG_EDEPRECATED); } @@ -4175,8 +4175,8 @@ declare_proto_rig(set_trn) */ declare_proto_rig(get_trn) { - ENTERFUNC; - RETURNFUNC(-RIG_EDEPRECATED); + ENTERFUNC2; + RETURNFUNC2(-RIG_EDEPRECATED); } @@ -4185,7 +4185,7 @@ declare_proto_rig(get_info) { const char *s; - ENTERFUNC; + ENTERFUNC2; s = rig_get_info(rig); @@ -4196,7 +4196,7 @@ declare_proto_rig(get_info) fprintf(fout, "%s%c", s ? s : "None", resp_sep); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } @@ -4207,7 +4207,7 @@ int dump_chan(FILE *fout, RIG *rig, channel_t *chan) char widthbuf[16]; char prntbuf[256]; - ENTERFUNC; + ENTERFUNC2; fprintf(fout, "Channel: %d, Name: '%s'\n", @@ -4314,7 +4314,7 @@ int dump_chan(FILE *fout, RIG *rig, channel_t *chan) if (!cfp) { - RETURNFUNC(-RIG_EINVAL); + RETURNFUNC2(-RIG_EINVAL); } switch (cfp->type) @@ -4339,7 +4339,7 @@ int dump_chan(FILE *fout, RIG *rig, channel_t *chan) continue; default: - RETURNFUNC(-RIG_EINTERNAL); + RETURNFUNC2(-RIG_EINTERNAL); } fprintf(fout, ",\t %s: %s", cfp->name, lstr); @@ -4347,18 +4347,18 @@ int dump_chan(FILE *fout, RIG *rig, channel_t *chan) fprintf(fout, "\n"); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } /* '1' */ declare_proto_rig(dump_caps) { - ENTERFUNC; + ENTERFUNC2; dumpcaps(rig, fout); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } @@ -4369,7 +4369,7 @@ declare_proto_rig(dump_state) struct rig_state *rs = &rig->state; char buf[1024]; - ENTERFUNC; + ENTERFUNC2; /* * - Protocol version @@ -4533,18 +4533,18 @@ declare_proto_rig(dump_state) gran_t parm_gran[RIG_SETTING_MAX]; /*!< parm granularity */ #endif - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } /* '3' */ declare_proto_rig(dump_conf) { - ENTERFUNC; + ENTERFUNC2; dumpconf(rig, fout); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } @@ -4554,12 +4554,12 @@ declare_proto_rig(set_ant) ant_t ant; value_t option; // some rigs have a another option for the antenna - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%d", &ant)); CHKSCN1ARG(sscanf(arg2, "%d", &option.i)); // assuming they are integer values - RETURNFUNC(rig_set_ant(rig, vfo, rig_idx2setting(ant - 1), option)); + RETURNFUNC2(rig_set_ant(rig, vfo, rig_idx2setting(ant - 1), option)); } @@ -4571,7 +4571,7 @@ declare_proto_rig(get_ant) value_t option; char antbuf[64]; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%d", &ant)); @@ -4588,7 +4588,7 @@ declare_proto_rig(get_ant) if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -4625,7 +4625,7 @@ declare_proto_rig(get_ant) fprintf(fout, "%s%c", antbuf, resp_sep); //fprintf(fout, "%d%c", rig_setting2idx(ant_rx)+1, resp_sep); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -4634,35 +4634,35 @@ declare_proto_rig(reset) { int reset; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%d", &reset)); - RETURNFUNC(rig_reset(rig, (reset_t) reset)); + RETURNFUNC2(rig_reset(rig, (reset_t) reset)); } /* 'b' */ declare_proto_rig(send_morse) { - ENTERFUNC; + ENTERFUNC2; - RETURNFUNC(rig_send_morse(rig, vfo, arg1)); + RETURNFUNC2(rig_send_morse(rig, vfo, arg1)); } /* 0xvv */ declare_proto_rig(stop_morse) { - ENTERFUNC; + ENTERFUNC2; - RETURNFUNC(rig_stop_morse(rig, vfo)); + RETURNFUNC2(rig_stop_morse(rig, vfo)); } declare_proto_rig(wait_morse) { - ENTERFUNC; + ENTERFUNC2; - RETURNFUNC(rig_wait_morse(rig, vfo)); + RETURNFUNC2(rig_wait_morse(rig, vfo)); } /* '8' */ @@ -4670,18 +4670,18 @@ declare_proto_rig(send_voice_mem) { int ch; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%d", &ch)); - RETURNFUNC(rig_send_voice_mem(rig, vfo, ch)); + RETURNFUNC2(rig_send_voice_mem(rig, vfo, ch)); } declare_proto_rig(send_dtmf) { - ENTERFUNC; + ENTERFUNC2; - RETURNFUNC(rig_send_dtmf(rig, vfo, arg1)); + RETURNFUNC2(rig_send_dtmf(rig, vfo, arg1)); } @@ -4691,14 +4691,14 @@ declare_proto_rig(recv_dtmf) int len; char digits[MAXARGSZ]; - ENTERFUNC; + ENTERFUNC2; len = MAXARGSZ - 1; status = rig_recv_dtmf(rig, vfo, digits, &len); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if (interactive && prompt) @@ -4708,7 +4708,7 @@ declare_proto_rig(recv_dtmf) fprintf(fout, "%s\n", digits); - RETURNFUNC(status); + RETURNFUNC2(status); } @@ -4718,7 +4718,7 @@ declare_proto_rig(set_powerstat) int stat; int retval; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%d", &stat)); @@ -4726,7 +4726,7 @@ declare_proto_rig(set_powerstat) rig->state.powerstat = stat; rig_powerstat = stat; // update our global so others can see powerstat fflush(fin); - RETURNFUNC(retval); + RETURNFUNC2(retval); } @@ -4736,13 +4736,13 @@ declare_proto_rig(get_powerstat) int status; powerstat_t stat; - ENTERFUNC; + ENTERFUNC2; status = rig_get_powerstat(rig, &stat); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -4753,7 +4753,7 @@ declare_proto_rig(get_powerstat) fprintf(fout, "%d\n", stat); rig->state.powerstat = stat; - RETURNFUNC(status); + RETURNFUNC2(status); } static int hasbinary(char *s, int len) @@ -4788,7 +4788,7 @@ declare_proto_rig(send_cmd) int binary = 0; int rxbytes = BUFSZ; - ENTERFUNC; + ENTERFUNC2; /* * binary protocols enter values as \0xZZ\0xYY.. @@ -4829,7 +4829,7 @@ declare_proto_rig(send_cmd) if (arg1[strlen(arg1) - 1] != ';' && strstr(arg1, "\\0x") == NULL) { rig_debug(RIG_DEBUG_ERR, "%s: expecting binary hex string here\n", __func__); - RETURNFUNC(-RIG_EINVAL); + RETURNFUNC2(-RIG_EINVAL); } for (i = 0; i < BUFSZ - 1 && p != pp; i++) @@ -4902,7 +4902,7 @@ declare_proto_rig(send_cmd) if (retval != RIG_OK) { - RETURNFUNC(retval); + RETURNFUNC2(retval); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -4980,7 +4980,7 @@ declare_proto_rig(send_cmd) retval); fprintf(fout, "%s %d\n", hexbuf, retval); free(hexbuf); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } else { @@ -5004,14 +5004,14 @@ declare_proto_rig(send_cmd) retval = RIG_OK; } - RETURNFUNC(retval); + RETURNFUNC2(retval); } /* '0xf0'--test if rigctld called with -o|--vfo option */ declare_proto_rig(chk_vfo) { - ENTERFUNC; + ENTERFUNC2; if ((interactive && prompt) || (interactive && !prompt && ext_resp)) { @@ -5022,18 +5022,18 @@ declare_proto_rig(chk_vfo) chk_vfo_executed = 1; // this allows us to control dump_state version - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } /* '(' -- turn vfo option on */ declare_proto_rig(set_vfo_opt) { int opt = 0; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%d", &opt)); *vfo_opt = rig->state.vfo_opt = opt; - RETURNFUNC(rig_set_vfo_opt(rig, opt)); + RETURNFUNC2(rig_set_vfo_opt(rig, opt)); } /* '0xf1'--halt rigctld daemon */ @@ -5081,7 +5081,7 @@ declare_proto_rig(password) int retval = -RIG_EPROTO; const char *key = arg1; - ENTERFUNC; + ENTERFUNC2; if (is_rigctld) { @@ -5104,7 +5104,7 @@ declare_proto_rig(password) key, rigctld_password); } - RETURNFUNC(retval); + RETURNFUNC2(retval); } #if 0 // don't think we need this yet @@ -5123,11 +5123,11 @@ declare_proto_rig(set_twiddle) { int seconds; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%d", &seconds)); - RETURNFUNC(rig_set_twiddle(rig, seconds)); + RETURNFUNC2(rig_set_twiddle(rig, seconds)); } /* '0x97' */ @@ -5135,11 +5135,11 @@ declare_proto_rig(set_uplink) { int val; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%d", &val)); - RETURNFUNC(rig_set_uplink(rig, val)); + RETURNFUNC2(rig_set_uplink(rig, val)); } @@ -5150,13 +5150,13 @@ declare_proto_rig(get_twiddle) int status; int seconds; - ENTERFUNC; + ENTERFUNC2; status = rig_get_twiddle(rig, &seconds); if (status != RIG_OK) { - RETURNFUNC(status); + RETURNFUNC2(status); } if ((interactive && prompt) || (interactive && !prompt && ext_resp)) @@ -5166,7 +5166,7 @@ declare_proto_rig(get_twiddle) fprintf(fout, "%d\n", seconds); - RETURNFUNC(status); + RETURNFUNC2(status); } /* '0x95' */ @@ -5174,11 +5174,11 @@ declare_proto_rig(set_cache) { int ms; - ENTERFUNC; + ENTERFUNC2; CHKSCN1ARG(sscanf(arg1, "%d", &ms)); - RETURNFUNC(rig_set_cache_timeout_ms(rig, HAMLIB_CACHE_ALL, ms)); + RETURNFUNC2(rig_set_cache_timeout_ms(rig, HAMLIB_CACHE_ALL, ms)); } @@ -5187,7 +5187,7 @@ declare_proto_rig(get_cache) { int ms; - ENTERFUNC; + ENTERFUNC2; ms = rig_get_cache_timeout_ms(rig, HAMLIB_CACHE_ALL); @@ -5198,7 +5198,7 @@ declare_proto_rig(get_cache) fprintf(fout, "%d\n", ms); - RETURNFUNC(RIG_OK); + RETURNFUNC2(RIG_OK); } /* '0xf8' */ @@ -5210,7 +5210,7 @@ declare_proto_rig(set_clock) int n; char timebuf[64]; - ENTERFUNC; + ENTERFUNC2; if (arg1 && strcasecmp(arg1, "local") == 0) { @@ -5261,7 +5261,7 @@ declare_proto_rig(set_clock) rig_debug(RIG_DEBUG_VERBOSE, "%s: utc_offset=%d\n", __func__, utc_offset); - RETURNFUNC(rig_set_clock(rig, year, mon, day, hour, min, sec, msec, + RETURNFUNC2(rig_set_clock(rig, year, mon, day, hour, min, sec, msec, utc_offset)); } @@ -5273,7 +5273,7 @@ declare_proto_rig(get_clock) int retval; double msec; - ENTERFUNC; + ENTERFUNC2; //CHKSCN1ARG(sscanf(arg1, "%63s", option));