form_post(3X)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… form_post(3X) β€” ok so we're posting forms now

hey bestie 🫢 welcome to the form_post(3X) page, straight out of the Library calls section of your friendly neighborhood manual. this one is short and sweet: it's all about putting a form on the screen and taking it back off. two little functions. one big slay. ✨


🌸 NAME 🌸

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

like, literally that. one puts the form up on its subwindow, the other wipes it away. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <form.h>

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

both take a FORM *form and both hand you back an int. iconic signature, no notes. πŸ‘‘


πŸŽ€ DESCRIPTION πŸŽ€

okay so. post_form β€” say it with me β€” displays a form to its associated subwindow. that's the whole job. it does not magically push pixels to your physical screen though, bestie, so don't come for it. 😭

if you want the actual physical display of that subwindow to happen, you gotta call refresh(3X) or some equivalent curses routine. and yes, the implicit doupdate that gets triggered by a curses input request counts too β€” it'll do the trick. ✨

then there's unpost_form, which is the opposite energy entirely: it erases form from its associated subwindow. poof. gone. πŸ«₯


πŸ”₯ RETURN VALUE πŸ”₯

both of these routines return one of the following, and you will check it, because ignoring return values is not the vibe:

  • E_OK β€” it worked. the routine succeeded. we love a success story. πŸ’–
  • E_BAD_ARGUMENT β€” the routine detected an incorrect or out-of-range argument. something you passed in was Not It. πŸ™ˆ
  • E_BAD_STATE β€” the routine was called from an initialization or termination function. wrong place, wrong time, bestie. 😭
  • E_NOT_POSTED β€” the form has not been posted. can't unpost what was never posted, babe. πŸ’€
  • E_NOT_CONNECTED β€” no items are connected to the form. an empty form is giving nothing. πŸ“
  • E_NO_ROOM β€” the form is too large for its window. it does not fit, and no amount of manifestation will change that. 🌸
  • E_SYSTEM_ERROR β€” a system error occurred. go check errno(3), it'll tell you what's up. πŸ”
  • E_POSTED β€” the form has already been posted. you already did that one, queen, we saw you. πŸ‘‘

🌈 PORTABILITY 🌈

these routines emulate the System V forms library. that's the whole point. they were not supported on Version 7 or BSD versions β€” so if you're time-traveling back to those, this page is not for you. πŸ•°οΈ


🧚 AUTHORS 🧚

Juergen Pfeifer. and the manual pages + adaptation for new curses? that's Eric S. Raymond. absolute legends, both of them. 🫢


⭐ SEE ALSO ⭐

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

go read those next, i'll wait. πŸ’œ


that's the whole page, bestie β€” brought to you by ncurses 6.5 and dated 2024-03-16. now go post that form. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from