opts(3FORM)
β¨ opts(3FORM) β¨
okay bestie, so this is the opts page from the forms library (that's section 3, the library-calls girlies) π
and it's literally all about flipping form option bits on and off. let's get into it π«Ά
πΈ NAME πΈ
set_form_opts, form_opts_on, form_opts_off, form_opts β the little squad that sets and gets your 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 on all four of these functions, they're honestly so simple once you see it:
set_form_optsβ sets all of the given form's option bits. and yes, you can logically βorβ those form option bits together, so stack 'em up if you want πform_opts_onβ turns on the option bits you pass, and leaves all the other bits exactly where they were. no touching, no drama β¨form_opts_offβ turns off the option bits you pass, and again leaves the others alone. polite queen behavior πform_optsβ just hands you back the form's current option bits. that's it, that's the whole job, and we love her for it π
now for the options themselves, bestie β and hear me when I say all of these are on by default, no cap:
O_NL_OVERLOADβ overloads theREQ_NEW_LINEforms driver request so that calling it at the end of a field slides you on over to the next field π¦O_BS_OVERLOADβ overloads theREQ_DEL_PREVforms driver request so that calling it at the beginning of a field bounces you back to the previous field πΈ
π₯ RETURN VALUE π₯
so every one of these routines returns one of the following β except form_opts, she's built different, she gives you bits not status codes π
E_OKβ the routine succeeded. slay β¨E_SYSTEM_ERRORβ a system error happened (go peek aterrno(3), iykyk) π
π PORTABILITY π
ngl these routines are emulating the System V forms library. they were not supported on Version 7 or BSD versions, so if you're time-traveling to those, adjust your expectations bestie π
π AUTHORS π
Juergen Pfeifer. manual pages and adaptation for new curses by Eric S. Raymond. iconic work, fr fr π
β SEE ALSO β
ncurses(3NCURSES), form(3FORM) π«Ά
and that's the whole page, bestie!! π this was ncurses 6.6 from 2025-01-18, mwah, go forth and toggle those option bits responsibly ππ
β¨
π¦ where this page comes from
- ubuntu resolute: ncurses-doc 6.6+20251231-1 Β· MIT/X11
- ubuntu stonking: ncurses-doc 6.6+20260608-2 Β· MIT/X11
- Copyright 2018-2024,2025 Thomas E. Dickey
- Copyright 1998-2010,2015 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms