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: Sat, 19 Oct 2002 19:36:02 -0400
User-agent: Mutt/1.3.27i

On Mon, Oct 14, 2002 at 07:16:19AM +0200, Philippe Blain wrote:
> ----------------------------------------------------------------------------
> 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
> 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)

I'm about halfway through this.  Oddly, Solaris curses doesn't do what you
would expect.  The insstr() inserts a tab as "^I", while insch() inserts
several blanks.  In both cases, the immediately following character is
written to the next column, ignoring the number of cells used for the
tab character.

Backspace inserts as a string as "^H", while insch() treats it as a space.

Tru64 makes insstr() consistent with insch().  For both, insch() seems to
behave the same.

Newline and return are similar: Solaris echos a ^J in innstr(), but does
not remember to skip over it for the next character.
 
> 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().
> 
> Could approach the insert mode of an editor if all characters of window
> after cursor position were shifted, and not only the current line.
> 
> ----------------------------------------------------------------------------

-- 
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]