Having the setlocale() stuff in the rline() function only, invites kuroko to behave differently in a script and in the REPL.
The path of least surprise is to initialize the locale at the top of the main() entry point, before arguments have been parsed and before other routines have been called.
This pull-request:
moves the setlocale() stuff from rline() to the main() function,
unignores the return value of setlocale(), and
fixes #47.
Disclaimer: I don't really speak C, but I have tried to match your indentation style, and the code compiles cleanly and passes all tests.
Having the
setlocale()
stuff in therline()
function only, inviteskuroko
to behave differently in a script and in the REPL.The path of least surprise is to initialize the locale at the top of the
main()
entry point, before arguments have been parsed and before other routines have been called.This pull-request:
setlocale()
stuff fromrline()
to themain()
function,setlocale()
, andDisclaimer: I don't really speak C, but I have tried to match your indentation style, and the code compiles cleanly and passes all tests.