Home | History | Annotate | Download | only in libcurses
History log of /src/lib/libcurses/cr_put.c
RevisionDateAuthorComments
 1.40  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.39  10-Apr-2022  andvar fix various typos in comments and output/log messages.
 1.38  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.37  06-Sep-2021  rin Style fixes most for __CTRACE().
 1.36  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.35  27-Jun-2021  blymn Fix PR lib/55931
Only reset outcol if we actually emit a \n as cursor_down may not may
not put the cursor at the start of the next line.
 1.34  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.33  20-Mar-2017  christos branches: 1.33.12;
comment out unused code.
 1.32  06-Jan-2017  roy branches: 1.32.2;
KNF.
Normalise coding style.
White space police.
Sprinkle some extra braces to make the flow more clear.

No functional changes.
 1.31  03-Oct-2011  roy branches: 1.31.24;
Use tiparm instead of vtparm.
 1.30  12-Feb-2010  roy Change from scroll_forward to cursor_down.
cursor_down is more similar to our old termcap use of nl.
Fixes PR lib/42770.
 1.29  03-Feb-2010  roy Userland now builds and uses terminfo instead of termcap.

OK: core@, jdc@
 1.28  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.27  23-Jul-2008  tnozaki add workaround for PR/39175(Curses regression causes disoptimal and
confusing output), act as rev1.25 does when wcwidth == 1.
 1.26  04-Jul-2008  tnozaki fix cursor position problem with the character wcwidth > 1.
discussed in tech-userlevel, ok'ed by jdc@ thanks!
 1.25  28-May-2007  blymn branches: 1.25.12;
Merge in wide curses code done as a Summer of Code project by
Ruibiao Qiu.
 1.24  21-Jan-2007  jdc Add debug "areas" that allow selective debugging by setting the
"CURSES_TRACE_MASK" environment variable. Postive vales include
debug areas, negative values exclude them.
 1.23  24-Jul-2004  blymn branches: 1.23.12;
Remove _cursesi_genbuf, it was not being set and caused a SIGSEGV
in getcap(). Fixed getcap() to use screen->cursesi_genbuf.
Thanks to Peter Bex for spotting this. This closes pr lib/26404.
 1.22  07-Aug-2003  agc branches: 1.22.2;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.21  26-Jun-2002  christos PR/17352: David Laight: Curses core-dumps on windows > 1024 wide.
 1.20  19-Dec-2000  jdc Rename variables refering to termcap capabilities from NN to __tc_nn. Case
adjusted to match termcap capability. A few other variable names renamed too
(ones related to or derived from termcap variables).
 1.19  01-Aug-2000  itojun use __cputchar(), not putchar().
otherwise, __CTRACE() will not be useful for debugging curses internals.
 1.18  19-May-2000  mycroft branches: 1.18.4;
We already initialize UP and BC when we fire up Curses, so pass a null pointer
to t_goto() to avoid doing it again... and again... and...
 1.17  19-Apr-2000  blymn Converted all termcap library calls to the "new" interface, this fixes
a problem with curses crashing when the CM capability was larger than
64 bytes and eliminates some possible buffer overflow problems.
 1.16  15-Apr-2000  blymn Added functions to replace what were previously macros in curses.h
(this is a requirement of SUSv2) - the old macro behaviour can be
restored by defining _CURSES_USE_MACROS.
Changed function prototypes to use ANSI style.
All externally visible functions now have ANSI style declarations.
 1.15  11-Apr-2000  blymn Made data structures opaque
 1.14  04-Oct-1999  lukem branches: 1.14.4;
update post change to return value of tputs() third argument
 1.13  28-Jun-1999  simonb branches: 1.13.2;
Get rid of the evil trailing spaces and tabs.
 1.12  13-Apr-1999  mrg Upgrades the standard NetBSD curses library to provide some
of the SYSV curses facilities. The added features are the collapsing
of arrow and function keysequences (as defined by termcap for the
terminal) into symbolic code returns thus relieving the application of
recognising multi-character key sequences. Other features are the
capability to perform a timed wait for a key (good for when you are
not sure if there is a keypress ready or not) and the capability for
turning off the inter-key timeout when assembling multi-character
function keys.

this work was done by Julian Coleman <J.D.Coleman@newcastle.ac.uk>
and blymn@baea.com.au (Brett Lymn). i'm just integrating it. thanks
HEAPS guys!
 1.11  19-Aug-1998  thorpej Add some braces to make egcs happy.
 1.10  03-Feb-1998  perry remove obsolete register declarations
 1.9  22-Jul-1997  mikel RCSid police, fix warnings
 1.8  17-Aug-1994  cgd branches: 1.8.2;
clean up import
 1.7  24-Jan-1994  cgd changes from branch
 1.6  09-Nov-1993  cgd repeat after me: "I hate rcs ids"
 1.5  09-Nov-1993  cgd branches: 1.5.2;
update to new version from berkeley. doesn't compile yet, nor
does it have rcsid's. this is for diffs.
 1.4  07-Aug-1993  mycroft New version from uunet.
 1.3  01-Aug-1993  mycroft Add RCS identifiers.
 1.2  09-Jul-1993  alm added Andrew Chernov's patch set:
Standard curses library use eight bit for standout mode, so
8-bit characters displays like highlighted 7-bit characters.

This patch produce library which is fully compatible with all curses
programs and add 8-bit chars to all input/display functions.
---
I don't think, that any programs wish to use internal curses
attribute _STANDOUT directly, in expressions like:
addch( ch | _STANDOUT );
Normal interface use standout() and standend() functions instead.
Many programs use 'char' type (with sign extention) for input characters
and sign extention becomes _STANDOUT mode in this case.
So, I refuse this future and allow 8-bit characters for programs,
which is designed for 7-bit only ('char' type using instead of
'unsigned char').
---
This small patch fix unpleasant standard curses bug:
curses can't expand TAB at all (but tries).
A man who wrote this curses misplace SYNC_IN and SYNCH_OUT,
this patch exchange macro calls.

This patch useful for standard 7-bit curses too, for this
you must delete '_' symbol before waddbytes and apply patch.
---
Oh, NO! This curses are really buggy!

This small patch fix following problem:
[ assumed scrollok(stdscr, TRUE) ]
when addch(ch) at lower right corner of screen, curses are realy
gone mad instead if simple scrolling... Curses code assumed that
this will be done correctly, but implement it with two bugs.
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2  17-Aug-1994  cgd new libcurses, from new nvi
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.5.2.1  24-Jan-1994  cgd minor fixups
 1.8.2.2  17-Aug-1994  cgd clean up import
 1.8.2.1  17-Aug-1994  cgd file cr_put.c was added on branch netbsd-1-0 on 1994-08-17 21:51:56 +0000
 1.13.2.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.14.4.1  09-Jan-2000  jdc Changes to make libcurses SUS v2 compatible.
 1.18.4.1  03-Aug-2000  itojun pullup (approved by releng-1-5)

> use __cputchar(), not putchar().
> otherwise, __CTRACE() will not be useful for debugging curses internals.

1.18 -> 1.19 basesrc/lib/libcurses/cr_put.c
1.38 -> 1.39 basesrc/lib/libcurses/refresh.c
1.12 -> 1.13 basesrc/lib/libcurses/scroll.c
 1.22.2.1  26-Jul-2004  tron Pull up revision 1.23 (requested by blymn in ticket #716):
Remove _cursesi_genbuf, it was not being set and caused a SIGSEGV
in getcap(). Fixed getcap() to use screen->cursesi_genbuf.
Thanks to Peter Bex for spotting this. This closes pr lib/26404.
 1.23.12.4  28-Feb-2007  blymn Output the non-spacing characters to the screen.
 1.23.12.3  06-Feb-2007  blymn * Always use putwchar in wide character case when plod'ing
* Removed variable that was only used once.
* Note added to revisit plod due to wide characters outputting more bytes
 1.23.12.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.23.12.1  21-Jan-2007  blymn Wide curses merge
 1.25.12.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.31.24.2  26-Apr-2017  pgoyette Sync with HEAD
 1.31.24.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.32.2.1  21-Apr-2017  bouyer Sync with HEAD
 1.33.12.1  10-Jun-2019  christos Sync with HEAD

RSS XML Feed