Home | History | Annotate | Download | only in libcurses
History log of /src/lib/libcurses/initscr.c
RevisionDateAuthorComments
 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  12-Mar-2020  roy curses: use perror rather than err in initscr

libhack lacks err and perror is more portable.
 1.34  11-Mar-2020  roy curses: application should exit if initscr(3) fails

POSIX defines this behaviour here:
https://pubs.opengroup.org/onlinepubs/7908799/xcurses/initscr.html

Partial fix for PR lib/23910
 1.33  02-Oct-2018  roy curses: fix ripoffline

When creating stdscr, ensure it's placed and sized in accordance with
lines ripped off.
LINES is no longer adjusted for lines ripped off.
POSIX makes no mention that it should be adjusted.
Bottom lines are now placed correctly.
Lines ripped off are now displayed after calling initscr.

ok kamil@

Fixes PR #53635
 1.32  11-Jan-2017  roy branches: 1.32.6; 1.32.12; 1.32.14;
Remove setup already done in newterm and even set_term.
 1.31  10-Jan-2017  roy Implement POSIX curses function ripoffline(3).
 1.30  06-Jan-2017  roy KNF.
Normalise coding style.
White space police.
Sprinkle some extra braces to make the flow more clear.

No functional changes.
 1.29  22-Jan-2007  jdc branches: 1.29.58;
Pull down the following from the wcurses branch:
ctrace.c: revision 1.16.2.2
initscr.c: revision 1.27.18.2
Orginal commit message:

Do the debug initialisation only in ctrace.c. Otherwise, it might not
get done, for example, if we start curses with setterm() and not initscr().
 1.28  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.27  16-Mar-2004  jdc branches: 1.27.18;
We no longer need <signal.h>.
 1.26  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.
 1.25  30-Jul-2003  dsl Remove __winlistp, add *screen to WINDOW and initialise in newwin().
Make delwin() remove window from list of windows on its screen.
Free win->lspace and win->lines for subwins (they only share text space).
Free things in the correct (and same) order if malloc() fails in __makenew().
Adjust delscreen() for delwin() removing itself from winlist.
Fixes potential massive corruptions if delwin() called on a main window.
NB: not responsible for the sysinst core dumps :-(
 1.24  27-Jan-2003  jdc ARemove (no longer used) __nca.
 1.23  02-Jan-2002  blymn Remove extraneous tabs from blank lines.
 1.22  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.21  05-Jan-2001  christos de-lint:
- bad arithmetic shift
- const castaways.
 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  15-Jun-2000  jdc Move setting of __endwin so that we also change it from the stop handler.
 1.18  01-May-2000  blymn branches: 1.18.2;
* 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.17  27-Apr-2000  jdc Add virtual screen for wnoutrefresh()/doupdate().
 1.16  17-Apr-2000  blymn Multiple fixes:
* Added Bill's fixes for errors when compiling with WARNS=1
* Incorporated fixes to make usage of unctrl consistent in debug and
made improvements to ctrace - it now timestamps it's output better.
* Reduced the number of mallocs done by __init_getch by allocating key
structs in bunches instead of singly.
* Removed the shadowing of global declarations in newwin and subwin
functions
 1.15  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.14  14-Apr-2000  jdc Add a list of windows (used when a colour pair changes).
 1.13  12-Apr-2000  jdc Initialise colour variable (__nca).
Include private header.
 1.12  11-Apr-2000  blymn Made data structures opaque
 1.11  28-Jun-1999  simonb branches: 1.11.6;
Get rid of the evil trailing spaces and tabs.
 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  12-Sep-1997  phil Make endwin() save state so a subsequent call to wrefresh restores curses
and makes endwin()/wrefresh() act like a SIGTSTP.
 1.7  22-Jul-1997  mikel RCSid police, fix warnings
 1.6  17-Aug-1994  cgd branches: 1.6.2;
clean up import
 1.5  09-Nov-1993  cgd repeat after me: "I hate rcs ids"
 1.4  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.3  07-Aug-1993  mycroft New version from uunet.
 1.2  01-Aug-1993  mycroft Add RCS identifiers.
 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.6.2.2  17-Aug-1994  cgd clean up import
 1.6.2.1  17-Aug-1994  cgd file initscr.c was added on branch netbsd-1-0 on 1994-08-17 21:52:24 +0000
 1.11.6.1  05-Mar-2000  jdc Add alternate character set support.
 1.18.2.1  23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.27.18.2  22-Jan-2007  jdc Do the debug initialisation only in ctrace.c. Otherwise, it might not
get done, for example, if we start curses with setterm() and not initscr().
 1.27.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.29.58.2  20-Mar-2017  pgoyette Sync with HEAD
 1.29.58.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.32.14.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.32.14.1  10-Jun-2019  christos Sync with HEAD
 1.32.12.1  20-Oct-2018  pgoyette Sync with head
 1.32.6.1  04-Oct-2018  martin Pull up following revision(s) (requested by roy in ticket #1047):

lib/libcurses/curses_private.h: revision 1.64
lib/libcurses/curses_private.h: revision 1.65
lib/libcurses/initscr.c: revision 1.33
lib/libcurses/curses_screen.3: revision 1.24
lib/libcurses/curses_screen.3: revision 1.25
lib/libcurses/newwin.c: revision 1.52
lib/libcurses/fileio.c: revision 1.6
lib/libcurses/ripoffline.c: revision 1.4
lib/libcurses/resize.c: revision 1.28
lib/libcurses/ripoffline.c: revision 1.5
lib/libcurses/resize.c: revision 1.29
lib/libcurses/screen.c: revision 1.34
lib/libcurses/setterm.c: revision 1.67

curses: fix ripoffline

When creating stdscr, ensure it's placed and sized in accordance with
lines ripped off.

LINES is no longer adjusted for lines ripped off.
POSIX makes no mention that it should be adjusted.
Bottom lines are now placed correctly.
Lines ripped off are now displayed after calling initscr.

ok kamil@

Fixes PR #53635

-

curses: resize ripped off windows
The application must still redraw them though.

-

Fix typos in curses_screen.3
Fn -> Ft in the resize_term(3) prototype
funcion -> function

RSS XML Feed