carta
curses_version(3ncurses)

curses_version3ncurses

Miscellaneous curses extensions

Part of extensions(3ncurses).

Usage

const char * curses_version(void); int use_extended_names(bool bf);

Overview

These ncurses extensions to the curses library do not fit easily into other functional categories.

curses_version

curses_version returns a pointer to a string containing the library's name and version number, including its patch level, for example “ncurses 6.5.20240720”.

use_extended_names

use_extended_names configures whether the library recognizes user-defined or nonstandard terminfo capability names that may be compiled into terminal type descriptions via the terminfo(3NCURSES) or termcap(3NCURSES) interfaces. Normally these names are available for use, since the essential decision is made through use of tic(1)'s -x option to include such extensions in terminal type descriptions. use_extended_names can prevent ncurses from recognizing these capabilities to ensure compatibility with other implementations of curses.

Return value

curses_version returns a constant string.

use_extended_names returns the previous state of extended capability name recognition, allowing you to save this property and restore it.

Notes

The pointer returned by curses_version corresponds to statically allocated memory; do not attempt to free(3) it.

Extensions

These functions are ncurses extensions, and are not found in SVr4 curses, 4.4BSD curses, or any other previous curses implementation.

Portability

Applications employing ncurses extensions should condition their use on the visibility of the NCURSES_VERSION preprocessor macro.

History

  • Debian 13 (Trixie): the text shown here
  • Debian 12 (Bookworm)
  • Debian 11 (Bullseye)
  • Debian 10 (Buster)
  • Debian 9 (Stretch)
  • Debian 8 (Jessie) to Debian 7 (Wheezy)
  • Debian 6.0 (Squeeze) to Debian 5.0 (Lenny)
  • Debian 4.0 (Etch)
  • Debian 3.1 (Sarge)
  • Debian 3.0 (Woody)

Authors

Thomas Dickey

From ncurses-doc 6.5+20250216-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.