form_cursor(3X)

πŸ’– form_cursor(3X) β€” Library calls πŸ’–

okay bestie, pull up a chair πŸͺ‘ because this is a lil page from the ncurses manual, and it's literally all about putting a cursor back where it belongs. it's short. it's sweet. it's giving "small but mighty" energy. let's get into it ✨


🌸 NAME 🌸

pos_form_cursor β€” position a form window cursor 🎯

like. the whole job. right there in the name. iconic.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <form.h>

int pos_form_cursor(FORM *form);

that's it. that's the whole vibe. one include, one function call, one FORM * pointer. chef's kiss πŸ‘‘


✨ DESCRIPTION ✨

so pos_form_cursor does one very specific little thing and it does it well: it restores the cursor to the position required for the forms driver to continue processing requests. πŸ’…

and why would you even need that, you ask? great question, bestie. because sometimes you're out here calling curses routines to do some screen-painting in response to a form operation β€” and once you've done all that decorating 🎨, the cursor has wandered off to god knows where. this function is the "babe come back, the driver needs you at your post" of the forms library. fr fr.


🫢 RETURN VALUE 🫢

this routine returns one of the following, and you should absolutely check which one you got:

  • E_OK β€” the routine succeeded. slay!! πŸŽ‰ everything worked, go take a lil nap.
  • E_BAD_ARGUMENT β€” routine detected an incorrect or out-of-range argument. 😭 something you passed in was simply not it.
  • E_NOT_POSTED β€” the form has not been posted. you skipped a step, bestie. the form isn't out there yet.
  • E_SYSTEM_ERROR β€” system error occurred (see errno(3)). πŸ’€ not your fault, the system is just having a day.

🌈 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 back to an old-school system expecting this to work… it's not gonna. periodt. πŸ•°οΈ


πŸ’œ AUTHORS πŸ’œ

  • Juergen Pfeifer.
  • Manual pages and adaptation for new curses by Eric S. Raymond.

absolute legends, both of them. we love a credited icon πŸ‘‘βœ¨


πŸŽ€ SEE ALSO πŸŽ€

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

go read those too, bestie, they're part of the same lil universe πŸͺ


lowkey reminder: this page lives in the ncurses world, so if you're doing anything with forms at all, you're in the right place 🫢

and that's the whole page, bestie!! πŸ’– this manual page came to you from ncurses 6.6, dated 2024-03-16, and that's the source/version + date sign-off, so you know exactly which flavor of the docs you just read. mwah πŸ’…βœ¨

πŸ“¦ where this page comes from