* Raw mode for current-input-port.
@ 2003-02-08 17:02 Rob Browning
2003-02-08 20:30 ` Christopher Cramer
0 siblings, 1 reply; 2+ messages in thread
From: Rob Browning @ 2003-02-08 17:02 UTC (permalink / raw)
I'd like to have (read-char) return immediately when a key is pressed,
rather than waiting for a carriage return. At first I thought setvbuf
would do it, but then I recalled that that was probably designed for
output ports. So do we already have anything suitable? I'm guessing
cfmakeraw might work, but I'd need to wrap that.
Thanks
--
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Raw mode for current-input-port.
2003-02-08 17:02 Raw mode for current-input-port Rob Browning
@ 2003-02-08 20:30 ` Christopher Cramer
0 siblings, 0 replies; 2+ messages in thread
From: Christopher Cramer @ 2003-02-08 20:30 UTC (permalink / raw)
Cc: guile-devel
On Sat, Feb 08, 2003 at 11:02:14AM -0600, Rob Browning wrote:
> I'd like to have (read-char) return immediately when a key is pressed,
> rather than waiting for a carriage return. At first I thought setvbuf
> would do it, but then I recalled that that was probably designed for
> output ports. So do we already have anything suitable? I'm guessing
> cfmakeraw might work, but I'd need to wrap that.
Right, the buffering is not on the application side, it's on the system
side, so you need to change the terminal mode. So... there are already
four different Ncurses libaries available. It should be trivial to make
a soft port that calls getch.
If you can wait a day, I'll be releasing a new version of mine
(current is at http://www.pyro.net/~crayc/guile-ncurses.tar.gz)
tomorrow that will work with 1.6.
--
Christopher Cramer <crayc@pyro.net> <http://www.pyro.net/~crayc/>
"All you have to do is tell them they are being attacked and denounce the
pacifists for lack of patriotism and exposing the country to danger. It
works the same way in any country." - Hermann Georing, 1946
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-02-08 20:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-08 17:02 Raw mode for current-input-port Rob Browning
2003-02-08 20:30 ` Christopher Cramer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).