curs_extend(3X)
π curs_extend(3X) β library calls, but make it β¨extendedβ¨
okay bestie, welcome to curs_extend(3X), a lil corner of the ncurses manual where the miscellaneous extensions live. it's the drawer where the stuff that didn't fit anywhere else goes, and honestly? iconic behavior.
πΈ 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 π¦
so these two are ncurses extensions to the curses library that justβ¦ don't fit easily into any of the other functional categories. they're the orphans. the free spirits. the ones that said "not me being categorized". π«Ά
π curses_version
curses_version returns a pointer to a string containing the library's name and version number, including its patch level. like, for example, βncurses 6.5.20240720β. it literally tells you who it is. main character energy fr fr. π
π 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 curs_terminfo(3X) or curs_termcap(3X) 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.
but use_extended_names(FALSE)? that prevents ncurses from recognizing these capabilities, so you can ensure compatibility with other implementations of curses. it's giving "i'm being normal on purpose for the other curses girls". π
π RETURN VALUE π
curses_versionreturns a constant string. no cap.use_extended_namesreturns the previous state of extended capability name recognition, which lets you save this property and restore it later. so thoughtful of it honestly. π₯Ή
β NOTES β
the pointer returned bycurses_versioncorresponds to statically allocated memory β do not attempt tofree(3)it. i am begging you. hands off the static memory bestie. π
π EXTENSIONS π
these functions are ncurses extensions, and they are not found in SVr4 curses, 4.4BSD curses, or any other previous curses implementation. they're exclusive. limited edition. iykyk. β¨
π§ PORTABILITY π§
applications employing ncurses extensions should condition their use on the visibility of the NCURSES_VERSION preprocessor macro. vibe check your macros before you commit, bestie.
also β NetBSD 9 added a curses_version function that intentionally returns a string devoid of version information. so likeβ¦ same name, no lore. π
π AUTHORS π
Thomas Dickey
π SEE ALSO π
ncurses offers several other extensions to the X/Open Curses API:
curs_getch(3X), curs_inopts(3X), curs_mouse(3X), curs_print(3X), curs_util(3X), default_colors(3X), define_key(3X), keybound(3X), keyok(3X), new_pair(3X), resizeterm(3X), wresize(3X)
and that's the whole page, periodt. this one's from ncurses 6.6, dated 2025-11-11 β go read the rest of the extensions too, they ate. mwah. ππ πΈ
π¦ where this page comes from
- alpine 3.24: ncurses-doc 6.6_p20260516-r0 Β· X11
- arch rolling: ncurses 6.6-2 Β· MIT-open-group
- fedora 44: ncurses-devel 6.6-1.fc44 Β· MIT-open-group
- fedora 44: ncurses-devel 6.6-1.fc44 Β· MIT-open-group
- 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