octave-maintainers
[Top][All Lists]
Advanced

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

Re: log plots and labels in fltk


From: John W. Eaton
Subject: Re: log plots and labels in fltk
Date: Thu, 28 Jan 2010 02:00:26 -0500

On 27-Jan-2010, Michael D Godfrey wrote:

| On 01/27/2010 10:12 AM, Shai Ayal wrote:
| > Will changing octave_kbhit to use readline's rl_read_key&
| > rl_set_keyboard_input_timeout (which call the input_event_hook) break
| > anything?

What will happen if Octave is configured with --without-readline?  I
think your proposed change needs to be conditional on having readline
available.

Does rl_read_key have the same behavior as the current octave_kbhit
function?  Looking at the readline sources, it appears that
rl_read_key can return '\n' if the rl_event_hook function sets
rl_done.  It seems that could have strange results.  But I'm not sure
of how this is intended to work.  How would you distinguish between a
'\n' character coming from user input and one generated by rl_read_key?

If rl_read_key can be adapted so that the behavior of the current
octave_kbhit function does not change except to call the
input_event_hook  function, I'd also prefer to avoid calling any
readline functions directly from Octave.  All calls to readline should
go through the command_editor class.

If all you want is to have the event hook function called in a few
more places, then why not just call the input hook function where it
is needed?

| My experience is that it is better to use readline calls, but
| anyone with experience of why pause was done the way it is
| should comment.  In any case, this needs to be fixed, so
| trying rl_read_key & rl_set_keyboard_input_timeout
| seems worth it.

My guess is I didn't know about rl_read_key, or it was not available
at the time.  But looking at this particular function, I'm not sure it
is what we want anyway.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]