post(3FORM)

πŸ’– post(3FORM) β€” the library calls girlies call "post_form" and "unpost_form" πŸ’–

okay bestie, sit down, we're talking about post_form and unpost_form from the forms library. yes, THAT manual, the one in section 3FORM. it's giving "put the form on the screen" and "take the form off the screen" and honestly? iconic. πŸŽ€


✨ NAME ✨

post_form, unpost_form β€” write or erase forms from associated subwindows. that's it, that's the whole vibe. one writes, one erases, they're a duo fr fr. πŸ¦‹


✨ SYNOPSIS ✨

#include <form.h>

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

no cap, that's the entire thing. two functions, one header, we move. πŸ’…


✨ DESCRIPTION ✨

okay so first up: post_form displays a form to its associated subwindow. that's the whole job, she shows up and shows out. ✨

BUT β€” and this is the part everyone forgets β€” to trigger the physical display of the subwindow, you gotta use refresh(3NCURSES) or some equivalent curses routine. lowkey the implicit doupdate that gets triggered by a curses input request will also do the trick, so you're not totally stranded. 🫢

then we have unpost_form, whose whole personality is erasing form from its associated subwindow. she's the cleanup crew. the closer. the "we're done here" text. 😭


✨ RETURN VALUE ✨

these routines return one of the following, and bestie, you WILL be checking them:

  • E_OK β€” the routine succeeded. slay. the good ending. πŸ’–
  • E_BAD_ARGUMENT β€” routine detected an incorrect or out-of-range argument. she said "what is this" πŸ™ˆ
  • E_BAD_STATE β€” routine was called from an initialization or termination function. wrong place, wrong time, read the room. πŸ’€
  • E_NOT_POSTED β€” the form has not been posted. you can't unpost what was never posted, babe. 🧚
  • E_NOT_CONNECTED β€” no items are connected to the form. she's alone. she's unmoored. 😭
  • E_NO_ROOM β€” form is too large for its window. the form said "I need space" and the window said no. 🌸
  • E_POSTED β€” the form has already been posted. double posting is not the move. πŸŽ€
  • E_SYSTEM_ERROR β€” system error occurred (see errno(3)). not us, it's the system. πŸ”₯
fr fr, check these return values. do not just vibe past them.

✨ PORTABILITY ✨

these routines emulate the System V forms library. they were NOT supported on Version 7 or BSD versions. so if you're on some ancient BSD situation... nope, not happening, no form for you. πŸ’…


✨ AUTHORS ✨

Juergen Pfeifer. and manual pages + adaptation for new curses by Eric S. Raymond. kings, honestly. πŸ‘‘


✨ SEE ALSO ✨

  • ncurses(3NCURSES)
  • form(3FORM)

and that's the whole page bestie!! this was ncurses 6.6, dated 2024-03-16, and it lives in post(3FORM). go post a form, go unpost a form, go call refresh(3NCURSES). periodt. πŸ’…βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from