Subject: libedit prompt function
To: None <tech-userlevel@netbsd.org>
From: Anthony Mallet <mallet@laas.fr>
List: tech-userlevel
Date: 10/06/2001 11:53:22
Hi,
I am developping an application using libedit, and I feel the need for a
different prototype for the EL_PROMPT and EL_RPROMPT functions.
At the moment, it is " char *(*f)(EditLine *) "
I would like something like " char *(*f)(EditLine *, void *data) "
to be able to get some contextual data back.
The call to el_set would then be something like :
el_set(el, EL_PROMPT, function, data);
where `function' is a function with the above prototype and `data' a
generic (void) pointer on some data I need to compute the prompt.
If you think this is a good improvement, I can care to code it up and
send-pr a patch. At the moment I see several ways to achieve the same
goal, so we could dicuss about the right method to use (the one which
does not break compatibility too much).
If not, I will try to do without --- I think it's possible if I print
the prompt myself before calling el_gets. But it's an ugly way to go :)
[ I say this because i've already proposed another PR about libedit and i
wouldn't like to stray to much away of the official version :) ]
Bye
--
Anthony