form_field(3X)

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

πŸ’– form_field β€” make and break connections between fields and forms πŸ’–

okay so bestie, this is the form_field(3X) library-calls page, and it's literally about hooking fields up to forms and unhooking them. no cap, every fact is still here β€” just with main-character energy. πŸ’…

✨ NAME ✨

form_field β€” make and break connections between fields and forms

🌸 SYNOPSIS 🌸

#include <form.h>

int set_form_fields(FORM *form, FIELD **fields);
FIELD **form_fields(const FORM *form);
int field_count(const FORM *form);
int move_field(FIELD *field, int frow, int fcol);

πŸ¦‹ DESCRIPTION πŸ¦‹

  • set_form_fields β€” changes the field pointer array of the given form. the array must be terminated by a NULL. periodt.
  • form_fields β€” returns the field array of the given form.
  • field_count β€” returns the count of fields in form.
  • move_field β€” moves the given field (which must be disconnected) to a specified location on the screen. iykyk, disconnected is the vibe check here.

πŸ‘‘ RETURN VALUE πŸ‘‘

  • form_fields returns a pointer (which may be NULL). it does not set errno. not me checking errno for no reason πŸ’€
  • field_count returns ERR if the form parameter is NULL.
  • set_form_fields and move_field return one of the following codes on error:
    • E_OK β€” the routine succeeded.
    • E_BAD_ARGUMENT β€” the routine detected an incorrect or out-of-range argument.
    • E_CONNECTED β€” the field is already connected to a form.
    • E_POSTED β€” the form is already posted.
    • E_SYSTEM_ERROR β€” a system error occurred (see errno(3)).

🌈 PORTABILITY 🌈

These routines emulate the System V forms library. they were not supported on Version 7 or BSD versions. fr fr, that's the lore.

The SVr4 forms library documentation specifies the field_count error value as -1 (which is the value of ERR). lowkey iconic. ✨

πŸ’œ AUTHORS πŸ’œ

Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. giving credit where credit is due 🫢

πŸŽ€ SEE ALSO πŸŽ€

curses(3X), form(3X)


🌸 xoxo, your form_field(3X) bestie β€” this page is from ncurses 6.5, dated 2024-12-28 πŸ’–

πŸ“¦ where this page comes from