aboutsummaryrefslogtreecommitdiff
path: root/man/wresize.3x
diff options
context:
space:
mode:
Diffstat (limited to 'man/wresize.3x')
-rw-r--r--man/wresize.3x105
1 files changed, 82 insertions, 23 deletions
diff --git a/man/wresize.3x b/man/wresize.3x
index b67feada0dc0..2e22d2fb4d0e 100644
--- a/man/wresize.3x
+++ b/man/wresize.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright 2018-2023,2024 Thomas E. Dickey *
+.\" Copyright 2018-2024,2025 Thomas E. Dickey *
.\" Copyright 1998-2010,2015 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
@@ -29,8 +29,8 @@
.\"
.\" Author: Thomas E. Dickey 1996
.\"
-.\" $Id: wresize.3x,v 1.36 2024/03/16 15:35:01 tom Exp $
-.TH wresize 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
+.\" $Id: wresize.3x,v 1.47 2025/01/19 00:51:54 tom Exp $
+.TH wresize 3X 2025-01-18 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
.SH NAME
\fB\%wresize\fP \-
resize a \fIcurses\fR window
@@ -38,35 +38,94 @@ resize a \fIcurses\fR window
.nf
\fB#include <curses.h>
.PP
-\fBint wresize(WINDOW *\fIwin\fP, int \fIlines\fP, int \fIcolumns\fP);
+\fBint wresize(WINDOW * \fIwin\fP, int \fIlines\fP, int \fIcolumns\fP);
.fi
.SH DESCRIPTION
-This \fI\%ncurses\fP extension to standard \fIcurses\fP reallocates
-storage for a \fIcurses\fP window to adjust its dimensions to the
-specified values.
+.BR \%wresize ","
+an
+.I \%ncurses
+extension to the
+.I curses
+library,
+reallocates storage for
+.IR win ,
+adjusting its dimensions to
+.I lines
+and
+.IR columns "."
If either dimension is larger than its current value,
-the expanded part of the window is filled with blanks merged with
-current background rendition
-(as set by \fB\%wbkgdset\fP(3X)).
+.I \%ncurses
+fills the expanded part of the window
+with the window's background character as configured by
+\fB\%wbkgdset\fP(3X)
+(wide-character API: \fB\%wbkgrndset\fP(3X)).
.SH RETURN VALUE
-\fB\%wresize\fP returns \fBERR\fP upon failure and \fBOK\fP on success.
-It will fail if either of the dimensions is less than or equal to zero,
-or if an error occurs while (re)allocating memory for the window.
+.B \%wresize
+returns
+.B OK
+on success and
+.B ERR
+on failure.
+It fails if either
+.I lines
+or
+.I columns
+is less than or equal to zero,
+or if an error occurs while (re)allocating memory for
+.IR win "."
.SH NOTES
-The only restriction placed on the dimensions is that they be greater
-than zero.
-They are \fInot\fP compared to the \fIcurses\fP screen dimensions;
+The only restriction placed on the values of
+.I lines
+and
+.I columns
+is that they be greater than zero.
+They are
+.I not
+compared to the dimensions of the
+.I curses
+screen;
this keeps the logic of \fB\%resizeterm\fP(3X) simple.
-The caller must ensure that the window's dimensions fit within the
-actual screen dimensions.
+The caller must ensure that
+.IR win 's
+dimensions fit within those of the screen.
+.SH EXTENSIONS
+.B \%wresize
+is an \fB\%ncurses\fP(3X) extension,
+and is not found in SVr4
+.IR curses ","
+4.4BSD
+.IR curses ","
+or any other previous
+.I curses
+implementation.
.SH PORTABILITY
-It is not possible to resize windows with SVr4 \fIcurses\fP.
+Applications employing
+.I \%ncurses
+extensions should condition their use on the visibility of the
+.B \%NCURSES_VERSION
+preprocessor macro.
.PP
-\fI\%ncurses\fP introduced this extension in mid-1995.
-NetBSD \fIcurses\fP adopted it in 2001,
-and \fI\%PDCurses\fP in 2003.
+NetBSD
+.I curses
+adopted
+.I \%wresize
+in 2001 (release 1.5.3),
+and
+.I \%PDCurses
+in 2004 (version 2.7).
+.PP
+It is not possible to resize windows with SVr4
+.IR curses "."
+.SH HISTORY
+Thomas Dickey developed
+.I \%wresize
+as an extension to BSD
+.I curses
+in 1988,
+and brought it to
+.I \%ncurses
+in mid-1995.
.SH AUTHORS
Thomas Dickey
-(from an equivalent function written in 1988 for BSD \fIcurses\fP).
.SH SEE ALSO
\fB\%resizeterm\fP(3X)