From 0f047b89ce1598ce5b806bae56598b120ad13c32 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Mon, 25 Aug 2025 11:29:34 +0100 Subject: [PATCH] txMain.c: readline needs function shim for prototype difference TxGetChar USE_READLINE build option --- textio/txMain.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/textio/txMain.c b/textio/txMain.c index 93495b1d..6fb6cdae 100644 --- a/textio/txMain.c +++ b/textio/txMain.c @@ -101,6 +101,14 @@ TxInit(void) #ifdef USE_READLINE +/*ARGSUSED*/ +static int +TxGetChar_internal(FILE *fp) +{ + /* The readline prototype is: typedef int rl_getc_func_t PARAMS((FILE *)); */ + return TxGetChar(); +} + void TxInitReadline(void) { @@ -108,7 +116,7 @@ TxInitReadline(void) const char * const *commandTable; char nobell[] = "set bell-style none"; - rl_getc_function = TxGetChar; + rl_getc_function = TxGetChar_internal; rl_pre_input_hook = TxPrefix; rl_readline_name = "magic";