form_field(3X)
π form_field β bestie, let's talk field-to-form connections π
okay so this is a page from the Library calls girlies, and it's literally all about making and breaking the connections between fields and forms. lowkey iconic.
β¨ 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 π¦
okay so let's go one by one, no cap.
The function set_form_fields changes the field pointer array of the given form. and bestie, listen β the array must be terminated by a NULL. like, that's non-negotiable. it's giving "last one to leave turns off the lights" but the lights are a NULL pointer. π
The function form_fields returns the field array of the given form. that's it, that's the whole job, she's simple and she's serving. β¨
The function field_count returns the count of fields in form. slay, we love a headcount. π’
The function move_field moves the given field to a specified location on the screen. and the field must be disconnected β like, she has to be single before she can relocate. no messy attachments, periodt. π
π RETURN VALUE π
The function form_fields returns a pointer (which may be NULL). and no, she does not set errno. she minds her own business. π
The function field_count returns ERR if the form parameter is NULL. yeah, if you hand her nothing, she's gonna give you ERR. fair. π
The functions set_form_fields and move_field return one of the following codes on error:
E_OKβ the routine succeeded. we love a win. πE_BAD_ARGUMENTβ routine detected an incorrect or out-of-range argument. something was giving wrong-number energy. πE_CONNECTEDβ the field is already connected to a form. she's taken, bestie, back off. π₯E_POSTEDβ the form is already posted. it's up, it's out there, it's living its main character life. βE_SYSTEM_ERRORβ system error occurred (seeerrno(3)). not our fault, the system is being messy. π
π PORTABILITY π
These routines emulate the System V forms library. they were not supported on Version 7 or BSD versions β so if you're on those, bestie, you're on your own. π«Ά
The SVr4 forms library documentation specifies the field_count error value as -1 (which is the value of ERR). so like, same energy, different font. iykyk. β¨
π§ AUTHORS π§
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. absolute legends, we stan. π
π SEE ALSO π
curses(3X)form(3X)
and that's the whole vibe, bestie β go forth and connect those fields responsibly π¦πΈπ
this page came to you courtesy of ncurses 6.6, dated 2024-12-28 β mwah, no notes, slay πβ¨
π¦ 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,2012 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms