form_opts(3X)

πŸ’– form_opts(3X) πŸ’–

okay bestie, welcome to the form_opts page β€” it lives in the Library calls section and it's literally all about setting and getting form options. yes we're doing form options today. it's giving administrative but honestly? slay. ✨


🌸 NAME 🌸

set_form_opts, form_opts_on, form_opts_off, form_opts β€” set and get form options πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <form.h>

int set_form_opts(FORM *form, Field_Options opts);
Field_Options form_opts(const FORM *form);

int form_opts_on(FORM *form, Field_Options opts);
int form_opts_off(FORM *form, Field_Options opts);

✨ DESCRIPTION ✨

okay so here's the tea, one function at a time πŸ“

  • set_form_opts β€” sets all the given form's option bits. and listen: form option bits can be logically "or"-ed together, so you can stack them, periodt. πŸ’…
  • form_opts_on β€” turns on the given option bits and leaves the others alone. not me being polite to the other bits πŸ™ˆ
  • form_opts_off β€” turns off the given option bits and leaves the others alone. same energy, opposite direction. iconic.
  • form_opts β€” just returns the form's current option bits. she's a getter, she doesn't judge, she just tells you. πŸ‘‘

The following options are defined β€” and all of them are on by default, so yes, you already have them, no cap:

  • O_NL_OVERLOAD β€” overloads the REQ_NEW_LINE forms driver request so that calling it at the end of a field goes to the next field. it's like the field is like "k bye, next" πŸ¦‹
  • O_BS_OVERLOAD β€” overloads the REQ_DEL_PREV forms driver request so that calling it at the beginning of a field goes to the previous field. going back bestie, we love a throwback πŸ’–

πŸŽ€ RETURN VALUE πŸŽ€

Except for form_opts, each routine returns one of the following:

  • E_OK β€” the routine succeeded. she ate. βœ…
  • E_SYSTEM_ERROR β€” system error occurred (see errno(3)). 😭 and yes, go check errno(3), that's where the details live.

🌈 PORTABILITY 🌈

These routines emulate the System V forms library. They were not supported on Version 7 or BSD versions. so if you're kicking it old school on those, she's not there, sorry babe πŸ’€


πŸ’œ AUTHORS πŸ’œ

Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. πŸ‘‘ shoutout to the OGs, fr fr.


πŸ‘‘ SEE ALSO πŸ‘‘

curses(3X), form(3X)


and that's the whole page bestie, no notes, go forth and set those options πŸ’–

this has been ncurses 6.6, dated 2025-01-18 β€” form_opts(3X), signing off, mwah 🫢✨

πŸ“¦ where this page comes from