Home | History | Annotate | Download | only in libcurses
History log of /src/lib/libcurses/getstr.c
RevisionDateAuthorComments
 1.30  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.29  06-Sep-2021  rin branches: 1.29.4;
Expand __CTRACE() to __nothing #ifndef DEBUG.

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

No binary changes, except for line numbers for assert().
 1.28  15-Aug-2021  rillig libcurses: fix usage of __warn_references

Since that macro can expand to an empty token list, it adds its own
semicolon as needed. Removing the extra semicolon fixes the lint
warnings about empty declarations. These empty declarations are a GCC
extension.
 1.27  09-Jun-2019  blymn 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.26  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.25  24-Feb-2019  roy Fix warn macro usage.

Thanks to rofl0r.
 1.24  06-Jan-2017  roy branches: 1.24.14;
KNF.
Normalise coding style.
White space police.
Sprinkle some extra braces to make the flow more clear.

No functional changes.
 1.23  01-Oct-2013  blymn branches: 1.23.8;
Use the internal version of touchline to update the line.
 1.22  27-Jan-2012  christos branches: 1.22.6;
handle the case where we have no space properly (Nat Sloss)
 1.21  06-Jan-2012  christos PR/45791: Nat Sloss: getnstr erase character weirdness
Fix processing of backspace erase char and char left.
 1.20  28-May-2007  blymn branches: 1.20.34;
Merge in wide curses code done as a Summer of Code project by
Ruibiao Qiu.
 1.19  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.18  07-Aug-2003  agc branches: 1.18.18;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.17  17-Feb-2003  dsl Fix resize of windows with subwins.
Let window size be given as a -ver number => lines from bottom.
Fix trace calls of pointers
(approved by Brett Lumn)
 1.16  02-Jan-2002  blymn Remove extraneous tabs from blank lines.
 1.15  02-Dec-2001  blymn * Major change to add support for the newterm/set_term functions.
* Added fix to getch.c suggested by Gabriel Rosenkoetter (thanks :-)
 1.14  20-Apr-2001  jdc Forget to mention: This fixes PR lib/12565.
 1.13  20-Apr-2001  jdc Implement the getnstr() functions.
Add __warn_references() for getstr().
Move getstr() family closer to SUSv2 :
add checks for <carriage return>, the kill character, KEY_LEFT and
KEY_BACKSPACE
ignore other KEY_* characters
 1.12  01-May-2000  blymn * Made erasechar and killchar into functions
* Modified __init_getch to use termcap handle that has been allocated
(_cursesi_genbuf) instead of refetching it.
* Make wgetstr support erase - this is not a full blown SUSv2 version
but it is a start.
 1.11  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.10  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.9  03-Feb-1998  perry remove obsolete register declarations
 1.8  22-Jul-1997  mikel RCSid police, fix warnings
 1.7  17-Aug-1994  cgd branches: 1.7.2;
clean up import
 1.6  09-Nov-1993  cgd repeat after me: "I hate rcs ids"
 1.5  09-Nov-1993  cgd 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.7.2.2  17-Aug-1994  cgd clean up import
 1.7.2.1  17-Aug-1994  cgd file getstr.c was added on branch netbsd-1-0 on 1994-08-17 21:52:20 +0000
 1.18.18.3  22-Jan-2007  jdc Needs <assert.h> for _DIAGASSERT().
 1.18.18.2  22-Jan-2007  blymn * Make WCHAR libcurses the default build
* Sprinkle about some SET_WCOL() calls where they were missing
 1.18.18.1  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.20.34.2  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.20.34.1  17-Apr-2012  yamt sync with head
 1.22.6.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.23.8.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.24.14.1  10-Jun-2019  christos Sync with HEAD
 1.29.4.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed