[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Where does lynx set the raw/cooked/other modes?
From: |
Klaus Weide |
Subject: |
Re: lynx-dev Where does lynx set the raw/cooked/other modes? |
Date: |
Sat, 13 Feb 1999 17:42:34 -0600 (CST) |
On Sat, 13 Feb 1999, Larry W. Virden wrote:
> I went fishing for strings of ioctl, stty, cooked, raw and didn't find them.
> I wanted to see what I might need to do to take care of this annoying problem
> with ^V needing to be doubled. But I have to find the src for it first...
Lynx doesn't do this low-level stuff directly - it is done by the curses
library, and I think that's where it belongs. The closest lynx comes to
controlling these things is this section from start_curses (LYCurses.c),
where lynx does it by calling curses-provided functions:
--------------------------------------------------------------------
/* nonl(); */ /* seems to slow things down */
#ifdef VMS
crmode();
raw();
#else
#if HAVE_CBREAK
cbreak();
#else
crmode();
#endif /* HAVE_CBREAK */
signal(SIGINT, cleanup_sig);
#endif /* VMS */
noecho();
--------------------------------------------------------------------
I assume that HAVE_CBREAK is true for you.
What exactly cbreak() does may depend on the curses lib and the OS.
It doesn't sound like such a good idea to start putting system-dependent
knowledge like that into the Lynx code unless there is a really good
reason.
Maybe you have to find a cbreak()-like alternative curses function
that has the behavior you want on your system. If possible, that
would be preferable to starting to deal with tcsetattr()/ioctl()
directly.
Maybe your cbreak() is broken :) - most people don't seem to have this
problem, after all. But you already know how to solve the problem
externally, write a wrapper script around lynx that does the stty.
Klaus