bug-ncurses
[Top][All Lists]
Advanced

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

Bug in ncurses


From: VanVoorst, Brian (MN65)
Subject: Bug in ncurses
Date: Fri, 7 Dec 2001 11:26:50 -0600

Let me start by saying that I have looked to see if I could
find this documented elsewhere.  I do not believe this bug
to be published elsewhere.  I have tested it on multiple 
machines MANY times and it is completely reproducible.
If for some reason it is NOT a bug, my apologies, and 
please tell me.

The code (below) is the simplest ncurses program you could
imagine.  The buggy behavior is that it does not echo back 
a " " (space) character at a particular point in an input stream.
All other characters including spaces are echoed back.  The 
character (space) that is not echoed back IS read from the keyboard,
and if you store the input you can check it.

I have run this on two linux boxes (redhat) with ncurses.
On both machines the .h file has this version information:
  /* $Id: curses.h.in,v 1.97 2000/12/10 02:00:24 tom Exp $ */

I also tried this on a Sun and DID NOT have the problem.

The input stream to try is:
1 2 3 4 5 6 7

What will be echo'd to the screen is:
1 2 3 45 6 7

Here is the code:

#include <stdio.h>
#include <string.h>
#include <curses.h>

main()
{
  int c;
  int done = 0;
  WINDOW *mywindow;

  mywindow=initscr();

  while(!done)
   {
      c=wgetch(mywindow);
   }
  endwin();
}

Please follow up by letting me know your findings.  This bug 
seems so odd - I am very curious about it and I also would 
like to get my larger program to work.  

Thanks,
Brian VanVoorst



reply via email to

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