curs_extend(3X)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’– 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_version returns a constant string. no cap.
  • use_extended_names returns 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 by curses_version corresponds to statically allocated memory β€” do not attempt to free(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