extensions(3NCURSES)
π extensions β the ncurses lil extras page π
okay bestie so this is extensions(3NCURSES), a Library calls situation, and it's basically the junk drawer of ncurses β¨ except the junk is iconic and you actually need it.
πΈ NAME πΈ
curses_version, use_extended_names β miscellaneous ncurses extensions π
π¦ SYNOPSIS π¦
#include <curses.h>
const char * curses_version(void);
int use_extended_names(bool bf);
β¨ DESCRIPTION β¨
These are ncurses extensions to the curses library, and the way they just do not fit into any other functional category... it's giving "miscellaneous" and honestly that's fine, they ate π«Ά
π curses_version
curses_version hands you back a pointer to a string that's got the library's name and version number in it, patch level included, like for example βncurses 6.5.20240720β. literally just the whole vibe of "which ncurses am I" in one string π
π§ 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. like that's where the actual yes/no happens, not here, iykyk.
But use_extended_names(FALSE) stops ncurses from recognizing these capabilities, and you'd do that to ensure compatibility with other implementations of curses. so if you need to play nice with the other curses kids, that's your move π
π RETURN VALUE π
curses_version returns a constant string. no cap, it's just a string.
use_extended_names returns the previous state of extended capability name recognition, so you can save that property and restore it later. it's giving "let me remember how things were before I changed them" and honestly, respectful π«Ά
π NOTES π
The pointer returned bycurses_versioncorresponds to statically allocated memory β do not attempt tofree(3)it. bestie do NOT. that's not your memory to free, put it down π
π₯ EXTENSIONS π₯
These functions are ncurses extensions, meaning they are not found in SVr4 curses, 4.4BSD curses, or any other previous curses implementation. ncurses originals only, periodt π
π PORTABILITY π
If your app is out here employing ncurses extensions, you should condition their use on the visibility of the NCURSES_VERSION preprocessor macro. check before you use, that's the rule β
Also NetBSD 9 added a curses_version function that intentionally returns a string devoid of version information. so same name, but it's not giving what ncurses' version is giving π
π AUTHORS π
Thomas Dickey
π SEE ALSO π
ncurses offers several other extensions to the X/Open Curses API, so if you liked this page you're gonna be obsessed with these:
getch(3NCURSES)inopts(3NCURSES)mouse(3NCURSES)print(3NCURSES)util(3NCURSES)default_colors(3NCURSES)define_key(3NCURSES)keybound(3NCURSES)keyok(3NCURSES)new_pair(3NCURSES)resizeterm(3NCURSES)wresize(3NCURSES)
and that's the whole page bestie!! this was ncurses 6.6, dated 2025-11-11, from extensions(3NCURSES) β go forth and call your little extension functions, mwah πβ¨ππ¦
π¦ where this page comes from
- ubuntu resolute: ncurses-doc 6.6+20251231-1 Β· MIT/X11
- ubuntu stonking: ncurses-doc 6.6+20260608-2 Β· MIT/X11
- Copyright 2018-2024,2025 Thomas E. Dickey
- Copyright 1999-2010,2016 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms