bug-ncurses
[Top][All Lists]
Advanced

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

Re: NCurses and eComStation (OS/2)


From: Thomas Dickey
Subject: Re: NCurses and eComStation (OS/2)
Date: Tue, 11 Oct 2011 18:12:13 -0400 (EDT)

On Tue, 11 Oct 2011, BERTRAND Joel wrote:

Thomas Dickey a écrit :
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.

Sorry, Thomas, I don't understand your answer as I'm not very familiar with ncurses internals. I can do some tests to help debug, but you'll say exaclty what I have to do...

I was suggesting that if you're building with ncurses before 5.9 patch date 20110625, it's possible that your application is getting some
definitions from ncurses' term.h which conflict with eCom's definitions
for tcgetattr.

If that's the case, it might improve things to update the ncurses
version to something more recent.  (Caveat - I've not built with
OS/2 EMX since the spring).

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

reply via email to

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