Home | History | Annotate | Download | only in libcurses
History log of /src/lib/libcurses/ins_wstr.c
RevisionDateAuthorComments
 1.25  23-Dec-2024  blymn Sprinkle about some cycle wasting checks for the win pointer being
null. Unfortunately, ncurses does this and there is some sloppy code
out there that relies on the check resulting in segfaults in
NetBSD curses which then, of course, gets blamed for the error.
 1.24  19-Oct-2022  blymn Fixes for lib/56926 amongst other things:
- plod now correctly accounts for wide characters when plodding
- use erase line when in color mode if the terminal has the capability
- ensure that the CA_CONTINUATION flag is applied consistently to the
subsequent characters in a wide character.
- fix a bunch of refresh bugs that caused inconsistent placement of
wide characters.
 1.23  12-Apr-2022  blymn Make the default colour pair be pair 0 which appears to match other
curses implementations.
 1.22  25-Jan-2022  blymn Correct (hopefully) the handling of wide characters.

* Remove the WCOL family of macros, these were "stealing" the upper bits
of a character attribute to store the column width of a character. No
warning was given about this in curses.h which meant it was easy to
accidentally reuse the bits in use by the WCOL macros (we already did).
Add couple of 16bit ints to the character structure iff HAVE_WCHAR is
true to hold the display width and wide char related flags (just
continuation at the moment)
* Convert all instances of WCOL macros to just reference the column width
in the char structure so it is not obfuscated.
* Fix cursor positioning so placing a cursor in the middle of a wide char
actually does just that.
* Fix plod so it understands that if the cursor is going to be positioned
in the middle of a wide char it cannot just reprint the char to get there.
* Fix plodput so it correctly counts the number of output characters for
wide characters.
* Fix slk routines to properly size the wctomb() buffer.
 1.21  16-Jan-2022  rillig libcurses: remove unreachable statements

Found by lint.

No binary change.
 1.20  16-Nov-2021  kre Move 'i' into DEBUG only code (now there be three).
Hopefully unbreaks !DEBUG builds.
 1.19  16-Nov-2021  blymn Fix handling of the tab special character.
 1.18  15-Nov-2021  blymn Fix for PR lib/55433

Correct the behaviour for ins_wstr:
* Properly check the string will fit by processing any special
characters present when preforming the check.
* Simplify the routine by removing code that duplicates the code in
_cursesi_addwchar and just call _cursesi_addwchar.
 1.17  06-Sep-2021  rin Style fixes most for __CTRACE().
 1.16  06-Sep-2021  rin Expand __CTRACE() to __nothing #ifndef DEBUG.

Remove most of #ifdef DEBUG around __CTRACE() calls.

No binary changes, except for line numbers for assert().
 1.15  06-Jul-2020  uwe mvwins*(WINDOW *win, ...) functions - call wins* on win, not stdscr.
From Naman Jain in PR lib/55460.
 1.14  09-Jun-2019  blymn branches: 1.14.2;
Rework previous fix for getch cursor position when cursor is moved
without refresh. If the window is not dirty but the window cursor
position does not match curscr then move the cursor. This fixes
the issues seen in PR lib/54263.
 1.13  20-May-2019  blymn Back out incorrect fix for PR 53617 and fix it in a different way.
Keep track of the cursor location, if getch is called without a refresh
and without pending updates (dirty windows) then move the cursor to the
correct location directly. Doing this prevents unnecessary refreshes.
 1.12  22-Nov-2018  uwe Drop HAVE_WCHAR ifdefs from code that is not even compiled with !HAVE_WCHAR.

We still try to mainain the ability to build our curses with
!HAVE_WCHAR, but it doesn't make sense to provide stubs for new wide
API functions that just error out when !HAVE_WCHAR. Any code that
only uses old API (and can work with !HAVE_WCHAR curses) doesn't use
those new functions. The code that uses new API obviosly cannot work
when all the new API is stubbed out.

So the plan is to drop the stubs. This commit does that for files
that are not even compiled with !HAVE_WCHAR (not only those stubs are
useless, they were not even there to begin with).

Same object code is generated for the normal HAVE_WCHAR case. Nothing
is even recompiled for !HAVE_WCHAR.

Ok by blymn@ jdc@ roy@
 1.11  31-Jan-2017  roy branches: 1.11.4; 1.11.10; 1.11.12;
Move ESCDELAY to curses.c so all globals are close to each other.
Remove _reentrant and use ESCDELAY and TABSIZE as we're not really
reentrant.
 1.10  30-Jan-2017  roy If either set_escdelay(3) or set_tabsize(3) are called, set _reentrant
to ensure we use the saved value for the sceen.

This effectively makes ESCDELAY and TABSIZE read-only when either
of these functions are called.
 1.9  02-Jan-2017  roy branches: 1.9.2;
Implement POSIX Curses functions immedok(3) and syncok(3).
 1.8  22-Oct-2016  christos remove bogus malloc casts
 1.7  16-Oct-2013  roy branches: 1.7.8;
Add TABSIZE, which is derived from terminfo init_tabs.
Use this when processing \t.
If TABSIZE is set in the environment, this takes precedence.
 1.6  16-Dec-2010  wiz branches: 1.6.6; 1.6.12;
Observe the following spelling:
- wide character (noun)
- wide-character (adjective)

Inspired by jmc@OpenBSD.
 1.5  23-Feb-2010  drochner misc fixes and improvements:
-call setlocale(LC_CTYPE, "") before nl_langinfo(CODESET) if the
locale settings is (still) at "C" - otherwise the CODESET doesn't work
-fix the type of the WACS_* symbols -- this needs to be cchar_t*
-add safeguards where the return value of wcwidth() is used for
loop counters or indexing -- it can be -1
-use more common code in the widechar support case -- in particular
let the wchar functions do the work even if chtype ones were called
-implement wcursyncup/wsyncup/wsyncdown
-somewhat experimental: allow ACS_* variables to refer to WACS_*
table entries -- this way, programs using the old chtype using API
can use UTF8 line drawing on terminals which support UTF8 but not
ACS switching
-fix some logics bugs in UTF8 recognition and ALTCHARSET handling
 1.4  22-Jul-2009  roy Prepare curses for the possibility of changing from termcap to terminfo.
term.h #defines lines, pad_char and no_color_video macros which conflict
with existing curses code. We change lines to alines and nlines depending
on use, pad_char to padchar and no_color_video becomes no_color_attributes
but with a strong alias from no_color_video.
 1.3  29-May-2007  blymn Fix some compiler warnings.
Remove shadowed variable declarations when DEBUG is defined.
 1.2  28-May-2007  blymn Merge in wide curses code done as a Summer of Code project by
Ruibiao Qiu.
 1.1  21-Jan-2007  blymn branches: 1.1.2;
Wide curses merge
 1.1.2.2  21-Jan-2007  jdc Apply the changes that add debug "areas" on HEAD to the wcurses branch.
Add correspending changes to the debug code that is only present on the branch.
 1.1.2.1  21-Jan-2007  blymn Merge wide curses.
 1.6.12.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.6.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.8.3  20-Mar-2017  pgoyette Sync with HEAD
 1.7.8.2  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.7.8.1  04-Nov-2016  pgoyette Sync with HEAD
 1.9.2.1  21-Apr-2017  bouyer Sync with HEAD
 1.11.12.1  10-Jun-2019  christos Sync with HEAD
 1.11.10.1  26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.11.4.1  07-Jul-2020  martin Pull up following revision(s) (requested by uwe in ticket #1567):

lib/libcurses/insch.c: revision 1.26
lib/libcurses/ins_wch.c: revision 1.15
lib/libcurses/ins_wstr.c: revision 1.15
lib/libcurses/insstr.c: revision 1.8

mvwins*(WINDOW *win, ...) functions - call wins* on win, not stdscr.
From Naman Jain in PR lib/55460.
 1.14.2.1  07-Jul-2020  martin Pull up following revision(s) (requested by uwe in ticket #986):

lib/libcurses/insch.c: revision 1.26
lib/libcurses/ins_wch.c: revision 1.15
lib/libcurses/ins_wstr.c: revision 1.15
lib/libcurses/insstr.c: revision 1.8

mvwins*(WINDOW *win, ...) functions - call wins* on win, not stdscr.
From Naman Jain in PR lib/55460.

RSS XML Feed