form_post(3X)

πŸ’– form_post β€” bestie edition πŸ’–

okay so this is form_post(3X), a library call from the ncurses family, and it's literally just two little functions that put a form on screen or take it back off. that's it. that's the whole vibe. two functions. we love a minimal era. ✨


🌸 NAME 🌸

post_form, unpost_form β€” write or erase forms from associated subwindows, no cap


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <form.h>

int post_form(FORM *form);
int unpost_form(FORM *form);

πŸ’… DESCRIPTION πŸ’…

so post_form displays a form to its associated subwindow. that's the whole thing, bestie. it's giving "make it visible."

but here's the tea β˜• β€” to actually trigger the physical display of that subwindow, you gotta use refresh(3X) or some equivalent curses routine. and ngl, the implicit doupdate that gets triggered by a curses input request will do the job too, so you have options. main character energy, honestly.

then unpost_form erases form from its associated subwindow. it's the breakup. it's the "we're done here." iconic. πŸ’€


✨ RETURN VALUE ✨

these routines return one of the following, and yes you have to read all of them, sorry not sorry:

  • E_OK β€” the routine succeeded. slay! πŸŽ‰
  • E_BAD_ARGUMENT β€” routine detected an incorrect or out-of-range argument. she's wrong, your honor.
  • E_BAD_STATE β€” routine was called from an initialization or termination function. wrong place, wrong time, bestie. 😭
  • E_NOT_POSTED β€” the form has not been posted. it's not even here yet?? πŸ™ˆ
  • E_NOT_CONNECTED β€” no items are connected to the form. empty. barren. no thoughts head empty. 🫢
  • E_NO_ROOM β€” form is too large for its window. she does not fit. it's giving "we're gonna need a bigger boat."
  • E_POSTED β€” the form has already been posted. she's already up there, girl. you can't double-post. πŸ’…
  • E_SYSTEM_ERROR β€” system error occurred, and you should go check errno(3) for the receipts.

🌈 PORTABILITY 🌈

these routines emulate the System V forms library. lowkey they were not supported on Version 7 or BSD versions. so if you're on those, no form posting for you. periodt.


πŸ‘‘ AUTHORS πŸ‘‘

Juergen Pfeifer. manual pages and adaptation for new curses by Eric S. Raymond. legends, fr fr. 🫢


πŸŽ€ SEE ALSO πŸŽ€

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

and that's the whole page, bestie πŸ’–

this came from ncurses 6.6, dated 2024-03-16 β€” go forth and post those forms, iykyk βœ¨πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from