bug-ncurses
[Top][All Lists]
Advanced

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

lib_getch.c


From: Philippe Blain
Subject: lib_getch.c
Date: Sun, 4 Aug 2002 06:35:04 +0200

>From Philippe Blain, Bordeaux, France. <address@hidden>    ________________

.'----------------`.
My antique computer: P133 8,4 Go 32 Mo - Red Hat 7.0     | .--------------.
|
                                                         | | ncurses 5.2  |
|
To the maintainers of ncurses. (and to Mr Dickey)        | | Bugs report! |
|
Subject: Corrections for ncurses-5.2-20020727+           | `--------------'
|

`-------.--.-------'

_________|__|_________
                                                       /  ##################
\
Here are some problems I found:                       /
####################  \

^^^^^^^^^^^^^^^^^^^^^^^^^^
----------------------------------------------------------------------------
----
Files : ncurses/base/lib_getch.c
        ncurses/base/lib_getstr.c

MAJOR PROBLEM :
I would like to point out some INCOHERENCES.
I don't have a C flow program for tracing functions calls, but it seems to
me
that in the treatement of input characters, a loop has taken place between
some functions after modifications and modifications (since 1.9.9g at
least).
    I refer to wgetch().
If you look at functions calls in these files, you can see that, starting
from wgetch(), dependencies are like this schema :

    --->  wgetch()  ---->  _nc_wgetch()  ---->  wgetnstr()  -----
    |                                                           |
    ------------------------["calls"]----------------------------

Q: Which function was the first defined ??????
(Who was the first : egg or chicken ?)
Logicaly, we should get a string (wgetnstr) by first getting its chars
(wgetch).
And I see no dependencies in the makefile ?....

I don't understand the _nc_wgetch() code at all, and i don't have historic
of modifications (and why).
Perhaps the wgetch() in wgetnstr(..) should be a kgetch() ??? I don't know.

----------------------------------------------------------------------------
----
File  : ncurses/base/lib_addch.c

Function : render_char() - line 66 - redundant A_ATTRIBUTES

    /* color in attrs has precedence over bkgrnd */
==> a |= (AttrOf(win->_nc_bkgd) & A_ATTRIBUTES) & COLOR_MASK(a);
Can be
    a |= (AttrOf(win->_nc_bkgd) & COLOR_MASK(a));

----------------------------------------------------------------------------
----
File  : ncurses/man/lib_inopts.3x

Change CS8 by CS7.

curs_inopts(3X)                                   curs_inopts(3X)
       ..........................................................
       Initially, whether the terminal returns 7 or 8 significant
       bits on input depends on  the  control  mode  of  the  tty
       driver  [see  termio(7)].  To force 8 bits to be returned,
       invoke meta(win, TRUE); this is equivalent,  under  POSIX,
       to  setting the CS8 flag on the terminal.  To force 7 bits
       to be returned, invoke meta(win, FALSE); this  is  equiva­
==>    lent,  under  POSIX, to setting the CS8 flag on the termi­
       nal.  The window argument, win, is always ignored.  If the
       ..........................................................

----------------------------------------------------------------------------
----
- Philippe





reply via email to

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