On Tue, 11 Oct 2011, BERTRAND Joel wrote:
Thomas Dickey a écrit :
On Tue, 11 Oct 2011, BERTRAND Joel wrote:
Hello,
I'm trying to use ncurses on an OS/2 workstation (eComStation 2.1 +
gcc 4.4.4). I obtain without any difficulties an usable library but
some fonctions does work as expected.
For example :
struct termios tp;
if (tcgetattr(0, &tp) == -1)
{
perror("tcgetattr");
}
returns :
tcgetattr: Invalid argument
perhaps tcgetattr is seeing a /dev/tty that isn't a tty?
I don't have any /dev/tty in /dev directory.
That was meant as a generic comment. The terminal I/O functions (which
ncurses may help with, in term.h) try to set the input/output to raw
mode to process individual characters.
An invalid argument for instance would happen if the input was a pipe
(which doesn't sound likely from the context).
I mentioned term.h - until recently it would #define tcgetattr to
an ioctl if the function is unavailable. But that led to problems
with the MinGW port, so I split-out those definitions to avoid
name pollution. You may be getting similar problems with eCom.