[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 0db3eafe6670c57873313
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2020-07-06 15:17: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 0db3eafe6670c578733138b3f33e3e4028eb774a (commit) from 281febec6221ba8eeaff8da4cc5740c3baecdb2d (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 0db3eafe6670c578733138b3f33e3e4028eb774a Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jul 6 10:15:57 2020 -0500 Fix rigctl argument prompt for non-readline capable system https://github.com/Hamlib/Hamlib/issues/339 diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index a6b75b60..f3b791e9 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -736,6 +736,8 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, break; } + rig_debug(RIG_DEBUG_VERBOSE, "%s: cmd==0x%02x\n", __func__, cmd); + if (cmd == 0x0a || cmd == 0x0d) { if (last_was_ret) @@ -935,12 +937,17 @@ int rigctl_parse(RIG *my_rig, FILE *fin, FILE *fout, char *argv[], int argc, if (interactive) { - rig_debug(RIG_DEBUG_TRACE, "%s: debug4\n", __func__); + int c = fgetc(fin); + rig_debug(RIG_DEBUG_TRACE, "%s: debug4 c=%02x\n", __func__, c); - if (prompt) + if (prompt && c == 0x0a) { fprintf_flush(fout, "%s: ", cmd_entry->arg1); } + else + { + ungetc(c, fin); + } if (scanfc(fin, "%s", arg1) < 1) { ----------------------------------------------------------------------- Summary of changes: tests/rigctl_parse.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |