Jeroen Demeyer on Mon, 18 Jan 2016 12:33:40 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Move readline interface to libpari


On 2016-01-18 11:08, Bill Allombert wrote:
On Thu, Jan 14, 2016 at 10:20:48AM +0100, Jeroen Demeyer wrote:
New version of patch with extended comment for pari_use_readline()

As a start, could you change the patch so that pari_rl is an argument to
pari_completion* instead of a public global variable ?
I cannot change the signature of pari_completion() since it needs to be compatible with readline: the function pari_completion() needs to be a
rl_completion_func_t.

So I think that global variables cannot be avoided, that's just how readline works.

readline_interface should be renamed to 'struct pari_rl_interface'
OK.

Maybe pari_rl_back and current_ep should be part of readline_interface ?
For pari_rl_back, this makes sense.

current_ep is private to be used in src/language/readline.c, I don't see much point of exposing it publicly.

Also it would be nice if you updated examples/minigp.c to make use of
this interface.
What do mean more concretely? You mean implementing TAB-completion in minigp?


Cheers,
Jeroen.