blob: 01cf9d2ece7124c63c2992a1d82532cd4086f8ff [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301.\"***************************************************************************
micky3879b9f5e72025-07-08 18:04:53 -04002.\" Copyright 2018-2023,2024 Thomas E. Dickey *
3.\" Copyright 1999-2010,2016 Free Software Foundation, Inc. *
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05304.\" *
5.\" Permission is hereby granted, free of charge, to any person obtaining a *
6.\" copy of this software and associated documentation files (the *
7.\" "Software"), to deal in the Software without restriction, including *
8.\" without limitation the rights to use, copy, modify, merge, publish, *
9.\" distribute, distribute with modifications, sublicense, and/or sell *
10.\" copies of the Software, and to permit persons to whom the Software is *
11.\" furnished to do so, subject to the following conditions: *
12.\" *
13.\" The above copyright notice and this permission notice shall be included *
14.\" in all copies or substantial portions of the Software. *
15.\" *
16.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23.\" *
24.\" Except as contained in this notice, the name(s) of the above copyright *
25.\" holders shall not be used in advertising or otherwise to promote the *
26.\" sale, use or other dealings in this Software without prior written *
27.\" authorization. *
28.\"***************************************************************************
29.\"
30.\" Author: Thomas E. Dickey 1999-on
31.\"
micky3879b9f5e72025-07-08 18:04:53 -040032.\" $Id: curs_extend.3x,v 1.46 2024/03/16 15:35:01 tom Exp $
33.TH curs_extend 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
34.ie \n(.g \{\
35.ds `` \(lq
36.ds '' \(rq
37.\}
38.el \{\
39.ie t .ds `` ``
40.el .ds `` ""
41.ie t .ds '' ''
42.el .ds '' ""
43.\}
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053044.SH NAME
micky3879b9f5e72025-07-08 18:04:53 -040045\fB\%curses_version\fP,
46\fB\%use_extended_names\fP \-
47miscellaneous \fIcurses\fR extensions
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053048.SH SYNOPSIS
micky3879b9f5e72025-07-08 18:04:53 -040049.nf
50\fB#include <curses.h>
51.PP
52\fBconst char * curses_version(void);
53\fBint use_extended_names(bool \fIenable\fP);
54.fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053055.SH DESCRIPTION
56These functions are extensions to the curses library
57which do not fit easily into other categories.
micky3879b9f5e72025-07-08 18:04:53 -040058.SS curses_version
59Use \fBcurses_version\fP
60to get the version number, including patch level of the library,
61prefixed by \*(``ncurses\*('', e.g.,
62.RS
63.sp
64.B ncurses 5.0.19991023
65.RE
66.SS use_extended_names
67The \fBuse_extended_names\fP
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053068function controls whether the calling application
69is able to use user-defined or nonstandard names
70which may be compiled into the terminfo
71description, i.e., via the terminfo or termcap interfaces.
72Normally these names are available for use, since the essential decision
Steve Kondikae271bc2015-11-15 02:50:53 +010073is made by using the \fB\-x\fP option of \fB@TIC@\fP to compile
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053074extended terminal definitions.
75However you can disable this feature
76to ensure compatibility with other implementations of curses.
micky3879b9f5e72025-07-08 18:04:53 -040077.SH RETURN VALUE
78\fBcurses_version\fP returns a pointer to static memory; you should not free
79this in your application.
80.PP
81\fBuse_extended_names\fP returns the previous state, allowing you to
82save this and restore it.
83.SH EXTENSIONS
84These functions are \fB\%ncurses\fP(3X) extensions,
85and are not found in SVr4
86.IR curses ,
874.4BSD
88.IR curses ,
89or any other previous curses implementation.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053090.SH PORTABILITY
micky3879b9f5e72025-07-08 18:04:53 -040091Applications employing
92.I \%ncurses
93extensions should condition their use on the visibility of the
94.B \%NCURSES_VERSION
95preprocessor macro.
96.SH AUTHORS
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053097Thomas Dickey.
micky3879b9f5e72025-07-08 18:04:53 -040098.SH SEE ALSO
99\fB\%curs_getch\fP(3X),
100\fB\%curs_mouse\fP(3X),
101\fB\%curs_print\fP(3X),
102\fB\%curs_util\fP(3X),
103\fB\%default_colors\fP(3X),
104\fB\%define_key\fP(3X),
105\fB\%keybound\fP(3X),
106\fB\%keyok\fP(3X),
107\fB\%resizeterm\fP(3X),
108\fB\%wresize\fP(3X)