form_field_userptr(3X)
π form_field_userptr(3X) β the library-calls glow-up
okay so bestie, welcome to the form_field_userptr(3X) page, straight out of the library-calls lineup β¨ this one's short and sweet and it's literally just about stashing your own lil' data inside a form field. no cap.
π NAME π
set_field_userptr, field_userptr β associate application data with a form field π«Ά
β¨ SYNOPSIS β¨
#include <form.h>
int set_field_userptr(FIELD *field, void *userptr);
void *field_userptr(const FIELD *field);
like, that's it. two functions, one header, zero drama π
πΈ DESCRIPTION πΈ
okay so here's the vibe: every form field has a field in it that you can use to hold application-specific data β and by "application-specific" we mean yours, because the form-driver code literally leaves it alone π it does not touch it, it does not look at it, it's your little corner of the field, your main character closet.
These two functions get and set that field. that's the whole plot π₯
set_field_userptrβ sets it (the "put your stuff in here" one)field_userptrβ gets it (the "okay give it back" one)
π RETURN VALUE π
- The function
field_userptrreturns a pointer (which may beNULL, and that's totally valid, ngl). it does not seterrnoβ like, it's just not gonna bother, don't @ it. - The function
set_field_userptrreturnsE_OK(success). that's it. 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 π not available.
Also important: the user pointer is a void pointer. We chose not to leave it as a char pointer for SVr4 compatibility β so yeah, that was a deliberate choice, iykyk π
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. legends, honestly π«Ά
π SEE ALSO π
curses(3X)form(3X)
ok so that's the whole page, bestie β no secret bonus sections, no hidden flags, this one's a snack not a meal π
and that's a wrap, babe! brought to you by ncurses 6.5, dated 2024-12-28 β go forth and store your pointers, queen βπ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright 2018-2023,2024 Thomas E. Dickey
- Copyright 1998-2010,2015 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms