On 2/15/22 12:21 PM, Andrew Burgess wrote:
> I've tried two things, neither seem to quite work, as I don't think I
> quite have all the information that I need. I have a rough readline
> patch below which I think solves the issue, but I'd like to explain
> what I've tried so far, I'm hoping there might be a solution that
> doesn't involve changing readline.
>
> My first thought was that I could use rl_deprep_term_function,
> something like:
>
> rl_deprep_term_function = gdb_rl_deprep_term_function;
>
> void
> gdb_rl_deprep_term_function ()
> {
> if (/* Did we just receive eof? */)
> printf ("quit\n");
> rl_deprep_terminal ();
> }
>
> Obviously, I'm struggling with what the if condition should be.
You can test your hypothesis by temporarily using _rl_eof_found as the
`if' condition.
I imagine it will work. If it does, we can either add a new state, like
your patch proposes, or change the previously-private variable to a
public one by removing the leading underscore.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/