mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-22 14:17:43 +02:00
txMain.c: readline needs function shim for prototype difference TxGetChar
USE_READLINE build option
This commit is contained in:
committed by
R. Timothy Edwards
parent
3b57ae1179
commit
0f047b89ce
+9
-1
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user