bug-ncurses
[Top][All Lists]
Advanced

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

Re: Report for 20021012


From: Thomas Dickey
Subject: Re: Report for 20021012
Date: Mon, 14 Oct 2002 17:06:55 -0400
User-agent: Mutt/1.2.5i

On Mon, Oct 14, 2002 at 07:16:19AM +0200, Philippe Blain wrote:
> >From Philippe Blain, Bordeaux, FRANCE.
> My old computer: P133 - 8,4 Go - 32 Mo Red Hat Linux 7.0
> 
> To maintainers of 'ncurses'.(and to Mr Dickey)
> Subject: Corrections for ncurses-5.3-20021012+
> 
> Here are some problems I found :
> 
> ----------------------------------------------------------------------------
> File : ncurses/base/lib_newterm.c
> 
> Function newterm() :
> 
> Initialization of TABSIZE in filter mode already done in
> setupterm/_nc_get_screensize .

ok.  I also noticed (but did not change) that there was some overlap in
the terminal-mode settings of setupterm() versus newterm().
 
> ----------------------------------------------------------------------------
> File : ncurses/base/lib_addch.c
> 
> Function _nc_waddch_nosync() :
> 
> The following control-chars are not explicitely treated :
>     \a    bell (alert)
>     \v    vertical tab
>     \f    form feed

But they should not be.  They're written as ^G, ^K and ^L (odd, but documented
in addch):

       If ch is any control character other than tab, newline, or
       backspace,  it  is  drawn  in  ^X notation.  Calling winch
       after adding a control character does not return the char-
       acter  itself, but instead returns the ^-representation of
       the control character.

 
> ----------------------------------------------------------------------------
> File : ncurses/base/lib_insstr.c
> 
> Function winsnstr() :
> 
> That function inserts a string of at most n characters at cursor position.
> The cursor position does not change.
> 
> Problems :
> 
> 1) The routine _nc_waddch_nosync(win, wch) do not insert chars but
> overwrites

ouch (appears to have been incorrect since the beginning ;-)

> the old ones.  Apply only to \n, \r, \t, \b
> (ex: TAB does not right-shift chars but overwrites them with blanks,
> NEWLINE clears chars to end of line)
> 
> 2) Because _nc_waddch_nosync() declared static in lib_addch.c,
> cannot link when winsnstr() is used in a program.
> 
> Would be better if interpretation of chars was done in winsch().

that sounds likely (though remotely possible that it's duplicating Solaris
behavior)
 
> Could approach the insert mode of an editor if all characters of window
> after cursor position were shifted, and not only the current line.
> 
> ----------------------------------------------------------------------------
> File : ncurses/base/lib_bkgd.c
> 
> Function : wbkgrnd()
> That line is absolutely useless and can be deleted.
> 
>     ...............
>     else {
>         NCURSES_CH_T wch = win->_line[y].text[x];
> ==>     RemAttr(wch, ~A_ALTCHARSET);

test c++/demo, e.g., the "Silly Demo" entry
(that's the case which changed when I modified that line)

>         win->_line[y].text[x] = _nc_render(win, wch);
>     }
>     ...............

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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