form_new(3X)
π new_form β bestie edition π
okay so this is form_new(3X) from the Library calls section, and it's literally the page where you make forms and then un-make them. creation and destruction. main character arc fr fr β¨
πΈ NAME πΈ
new_form, free_form β create and destroy forms π
π¦ SYNOPSIS π¦
#include <form.h>
FORM *new_form(FIELD **fields);
int free_form(FORM *form);
β¨ DESCRIPTION β¨
okay so new_form is the one that creates a new form and connects it to a specified field pointer array. and bestie, listen β that array must be NULL-terminated. no cap. if you forget the NULL at the end, the vibe check fails and everything goes sideways π
and then free_form is the cleanup queen π she disconnects form from its field array and frees the storage that was allocated for the form. so it's giving β¨closureβ¨
π RETURN VALUE π
so new_form returns NULL on error π and it sets errno based on how the whole thing went:
E_OKβ the routine succeeded. slay!! πE_BAD_ARGUMENTβ routine detected an incorrect or out-of-range argument πE_CONNECTEDβ the field is already connected to a form. like... it's taken, bestie πE_SYSTEM_ERRORβ system error occurred, e.g.,mallocfailure π΅
and free_form returns one of these cuties:
E_OKβ the routine succeeded. periodt πE_BAD_ARGUMENTβ routine detected an incorrect or out-of-range argument π«E_POSTEDβ the form has already been posted. so you can't just free it like that, it's busy being iconic π₯
π PORTABILITY π
these routines emulate the System V forms library. they were not supported on Version 7 or BSD versions. so like, if you're time-travelling to old BSD, this is not the moment π§
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. absolute legends, we love them π
π SEE ALSO π
curses(3X)form(3X)
okay that's the whole page bestie, ily, go build some forms π«Άπ
ncurses 6.6 Β· 2024-12-28 β and that's the sign-off, dated and versioned like the icon it is. mwah π β¨πΈ
π¦ 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,2015 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms