form_userptr(3X)

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

πŸ¦‹ form_userptr(3X) β€” the bestie data-pocket era πŸ¦‹

okay so first things first: this is a library call situation, and the manual name is literally form_userptr(3X). no cap, it’s giving β€œlet me stash my app data on a form” energy. πŸ’…


🌸 NAME 🌸

set_form_userptr, form_userptr β€” associate application data with a form item. periodt.

✨ SYNOPSIS ✨

#include <form.h>

int set_form_userptr(FORM *form, void *userptr);
void* form_userptr(const FORM *form);

πŸ’– DESCRIPTION πŸ’–

okay so every form and every form item has a field that can be used to hold application-specific data (that is, the form-driver code leaves it alone). These functions get and set the form user pointer field. it’s literally a little pocket for your app data, and the form driver is not gonna mess with it. 🫢

πŸŽ€ RETURN VALUE πŸŽ€

  • form_userptr returns a pointer (which may be NULL). It does not set errno.
  • set_form_userptr returns E_OK (success). slay.

🧚 PORTABILITY 🧚

  • These routines emulate the System V forms library. They were not supported on Version 7 or BSD versions.
  • The user pointer is a void pointer. We chose not to leave it as a char pointer for SVr4 compatibility. iykyk.

πŸ‘‘ AUTHORS πŸ‘‘

Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. icons, honestly. ✨

🌈 SEE ALSO 🌈

  • curses(3X)
  • form(3X)

πŸ’– cute sign-off: this page is from ncurses 6.5, dated 2024-12-28, and it’s literally the form_userptr(3X) manual. stay hydrated, bestie. πŸ“
πŸ“¦ where this page comes from