[m-users.] GNU Readline example
Sean Charles (emacstheviking)
objitsu at gmail.com
Fri May 21 21:15:19 AEST 2021
I have used this library from C many times but I think it is used by the mercury debugger but try as I might I couldn’t really find any sample code to figure out how to do the FFI wrappers. I have done C FFI in Mercury before so I am sure I could manage to do it, there are only a few calls needed to initialise it and the history feature IIRC.
As a time saver I wondered if anybody had a reference in the code that did this already? I did a search but only found compiler options, noactual stealable code!
Thanks,
Sean.
—
{12:13}~/Documents/code/mercury/mercury-srcdist-20.06.1:master ✗ ➭ find . -name "*.m" -exec grep -iHn readline {} \;
./browser/browser_info.m:280:% done via a call to the readline library (if available), using streams
./compiler/compile_target_code.m:2394: globals.lookup_bool_option(Globals, use_readline, UseReadline),
./compiler/compile_target_code.m:2396: UseReadline = yes,
./compiler/compile_target_code.m:2397: globals.lookup_string_option(Globals, readline_libs, ReadlineLibs),
./compiler/compile_target_code.m:2398: SystemTraceLibs = SystemTraceLibs0 ++ " " ++ ReadlineLibs
./compiler/compile_target_code.m:2400: UseReadline = no,
./compiler/options.m:985: ; use_readline
./compiler/options.m:1015: ; readline_libs
./compiler/options.m:1930: use_readline - bool(yes),
./compiler/options.m:1962: readline_libs - string(""),
./compiler/options.m:2968:long_option("use-readline", use_readline).
./compiler/options.m:3000:long_option("readline-libs", readline_libs).
./compiler/options.m:6118: "--no-use-readline",
./compiler/options.m:6119: "\tDisable use of the readline library in the debugger.",
./compiler/options.m:6176: % --thread-libs, --shared-libs, --math-lib, --readline-libs,
More information about the users
mailing list