This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Console input in xterm from NT program?


Hi,

I've written a small command-line class (editing, history, command completion 
etc.). That requires cursor positioning and reading of single characters. It 
works quite well under Linux (with tcsetattr() and escape sequences) and in 
NT console windows (using the WinNT console API from wincon.h). The program 
gets compiled with GCC under Linux and with VC++ under Windows.

The problem is that the NT console API doesn't work in Cygwin xterm windows at 
all (probably because I'd have to switch them to non-line-buffered mode), but 
I don't have access to tcsetattr() since VC++ doesn't have that. The result 
is that I don't get any input at all on the NT/Cygwin-xterm combination. But 
I'd like the command line to work in all three contextes.

Can anybody tell me what I'm missing here, or is there any magical control 
sequence that I could send the xterm that toggles line-buffered mode?

Thanks in advance,
		--Björn
-- 
Dipl.-Inform. Björn Giesler, IAIM, University of Karlsruhe (TH)
See http://wwwiaim.ira.uka.de/users/giesler for information.

A society that will trade a little freedom for a little order will 
lose both, and deserves neither.    --T. Jefferson
Support privacy. Mail me for my PGP/GPG public key.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]