form_page(3X)

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

πŸ’– NAME πŸ’–

okay so welcome to form_page(3X), a Library calls page that is literally all about the set-and-get form page number vibe: form_page β€” set and get form page number. 🫢

✨ SYNOPSIS ✨

bestie, grab the header first, then it's giving:

#include <form.h>

int set_current_field(FORM *form, FIELD *field);
FIELD *current_field(const FORM *form);

int unfocus_current_field(FORM *form);

int set_form_page(FORM *form, int n);
int form_page(const FORM *form);

int field_index(const FIELD *field);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here’s the friend-group rundown, no cap:

  • set_current_field sets the current field of the given form; current_field returns the current field of the given form. iconic duo behavior, honestly. πŸ’…
  • unfocus_current_field removes the focus from the current field of the form. In such state, inquiries via current_field shall return a NULL pointer. yes, that’s the whole mood. πŸŽ€
  • set_form_page sets the form’s page number β€” it goes to page n of the form. slay.
  • form_page returns the form’s current page number. very main character energy. πŸ‘‘
  • field_index returns the index of the field in the field array of the form it is connected to. It returns ERR if the argument is the null pointer or the field is not connected. periodt. πŸ’€

πŸ’… RETURN VALUE πŸ’…

Except for form_page, each routine returns one of the following:

  • E_OK β€” the routine succeeded. yay bestie 🌸
  • E_BAD_ARGUMENT β€” routine detected an incorrect or out-of-range argument. rude, but ok 😭
  • E_BAD_STATE β€” routine was called from an initialization or termination function. wrong moment, babe.
  • E_INVALID_FIELD β€” contents of a field are not valid. vibe check failed πŸ’”
  • E_REQUEST_DENIED β€” the form driver could not process the request. denied, not today. πŸ™ˆ
  • E_SYSTEM_ERROR β€” system error occurred (see errno(3)). go check that, fr fr.

🌈 PORTABILITY 🌈

  • These routines emulate the System V forms library. old-school but make it cute.
  • They were not supported on Version 7 or BSD versions. ngl, not their era.
  • The unfocus_current_field function is an ncurses extension. special little ncurses exclusive ✨

πŸŽ€ AUTHORS πŸŽ€

Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. give them their flowers, honestly πŸ’

πŸ”₯ SEE ALSO πŸ”₯

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

go peek at those if you’re feeling curious, iykyk πŸ‘€


mwah πŸ’‹ β€” this adorable little page is from ncurses 6.5, dated 2024-12-28, and its page tag is form_page(3X). signing off, bestie πŸ¦‹πŸ’–

πŸ“¦ where this page comes from