[Top][All Lists]

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

Spurious characters echoed to screen by raw() and endwin()

From: Jerry Rains
Subject: Spurious characters echoed to screen by raw() and endwin()
Date: Tue, 5 Mar 2002 13:03:37 -0600

I have run into a problem with a keyboard input program (waitkey) that I
have written that uses ncurses.  'waitkey' is accessed through a SYSTEM call
from a filePro program.  When run from a login on the same machine all is
fine.  However, the filePro program has been moved to a RedHat7.1 machine.
In the /usr/include/ncurses/curses.h file it says it is Version 1.97
2000/12/10 02:00:24.

It is now being accessed through a login on a SCO OpenServer5.0.4 box that
uses rlogin to access my program on the RH7.1 box.  The program runs fine
but the raw() function echos an accented E and the endwin() function echos
an accented a.  This causes the cursor to be in the wrong place and
overwrites the characters that are supposed to be under the cursor.

I have an earlier version of 'waitkey' that does not use ncurses and uses
ioctl() to setup raw mode.  In it I set:

tiobuf.c_iflag &= ~ICRNL;
tiobuf.c_lflag &= ~ICANON;
tiobuf.c_lflag &= ~ISIG;
tiobuf.c_lflag &= ~ECHO;
tiobuf.c_cc[VMIN] = 1;
tiobuf.c_cc[VTIME] = 0;

It does not have the problem, but it doesn't recognize type-ahead characters
which creates different problems that the ncurses version solved.  I realize
that this is a very obscure bug, however it made the program unusable in its
current configuration forcing me to use the older version.

I am not an experienced C programmer.  This is my first C program.  Any help
will be greatly appreciated.

Jerry Rains
Application Specialist
Coastal Construction Products, Inc.

reply via email to

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