form_userptr(3X)
π form_userptr β bestie, let's attach YOUR data to a form π
okay so this is a page from the ncurses manual, and it lives in the Library calls section β the manual name is form_userptr(3X) if you're keeping score β¨
πΈ NAME πΈ
set_form_userptr, form_userptr β associate application data with a form item π«Ά
β¨ SYNOPSIS β¨
#include <form.h>
int set_form_userptr(FORM *form, void *userptr);
void* form_userptr(const FORM *form);
no cap, that's the whole vibe π
π¦ DESCRIPTION π¦
So here's the tea, bestie: every form and every form item has a little field that's yours to fill with whatever application-specific data you want. Like, the form-driver code literally leaves it alone β it does not touch it, it does not look at it, it's your lil storage cubby π
These two functions are the getter and the setter for that form user pointer field. That's it. That's the whole job. Iconic, honestly π
π₯ RETURN VALUE π₯
- The function
form_userptrreturns a pointer β and heads up, that pointer may beNULLπ It does not seterrno. - The function
set_form_userptrreturnsE_OK(which means success, slay β¨).
π PORTABILITY π
- These routines emulate the System V forms library. They were not supported on Version 7 or BSD versions β so if you're kicking it old-school on those, sorry bestie, no user pointer for you π
- The user pointer is a
voidpointer. And here's why: we chose not to leave it as acharpointer for SVr4 compatibility. So that's a deliberate choice, not a mistake, periodt π―
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. legends, fr fr π«‘
π SEE ALSO π
curses(3X)form(3X)
and that's the whole page, bestie!! this one is from ncurses 6.6, dated 2024-12-28 β go forth and store your little pointers, you absolute main character π§π
π¦ 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-2023,2024 Thomas E. Dickey
- Copyright 1998-2010,2015 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms