field(3FORM)
π field(3FORM) β Library calls π
okay bestie, we're doing form_field today and honestly? it's the friendship-manager of curses. it makes and breaks the connections between fields and forms. matchmaker era π«Ά
β¨ 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 πΈ
so like, four little functions, four little jobs. here's the tea β
set_form_fieldschanges the field pointer array of the given form. and babes, the array must be terminated by aNULLβ no cap, that's the rule. πform_fieldsreturns the field array of the given form. it's giving "here's your roster, bestie" πfield_countreturns the count of fields inform. math but make it cute β¨move_fieldmoves the given field to a specified location on the screen. but listen β that field must be disconnected first, okay? it's not available, it's not on the market, it's single and ready to mingle at a new spot π
π₯ RETURN VALUE π₯
form_fieldsreturns a pointer (which may beNULLπ). it does not seterrno.field_countreturnsERRif theformparameter isNULL. rude but true πset_form_fieldsandmove_fieldreturn one of the following codes on error:E_OKβ the routine succeeded. slay, we ate πE_BAD_ARGUMENTβ routine detected an incorrect or out-of-range argument. it's giving "bestie what is that number" πE_CONNECTEDβ the field is already connected to a form. taken. unavailable. blocked. π«E_POSTEDβ the form is already posted. it's busy being the main character rn πE_SYSTEM_ERRORβ system error occurred (seeerrno(3)). not our fault, blame the system π€
π PORTABILITY π
these routines emulate the System V forms library. they were not supported on Version 7 or BSD versions β so if you're time-traveling, lowkey watch out π°οΈ
also: the SVr4 forms library documentation specifies the field_count error value as -1 (which is the value of ERR). so same energy, different font β¨
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. icons, both of them π
π¦ SEE ALSO π¦
ncurses(3NCURSES), form(3FORM)
okay that's the whole vibe check, bestie β go forth and connect those fields responsibly π§π
this has been ncurses 6.6, dated 2024-12-28, signing off like the icon it is β
π¦ where this page comes from
- ubuntu resolute: ncurses-doc 6.6+20251231-1 Β· MIT/X11
- ubuntu stonking: ncurses-doc 6.6+20260608-2 Β· MIT/X11
- 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