form_variables(3X)

✨ form_variables(3X) ✨

okay bestie, so this is a library calls page from the ncurses crew, and it's all about the form system's global variables. iykyk. let's get into it πŸ’–


🌸 NAME 🌸

TYPE_ALNUM, TYPE_ALPHA, TYPE_ENUM, TYPE_INTEGER, TYPE_IPV4, TYPE_NUMERIC, TYPE_REGEXP β€” these are the form system's global variables, and they are lowkey iconic πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <form.h>

FIELDTYPE * TYPE_ALNUM;
FIELDTYPE * TYPE_ALPHA;
FIELDTYPE * TYPE_ENUM;
FIELDTYPE * TYPE_INTEGER;
FIELDTYPE * TYPE_IPV4;
FIELDTYPE * TYPE_NUMERIC;
FIELDTYPE * TYPE_REGEXP;

πŸ’œ DESCRIPTION πŸ’œ

okay so these are literally the building blocks of the form library 🧱✨ they define the fields you can create using the form_fieldtype(3X) functions. each one brings its own lil validation squad β€” functions for field-validation AND character-validation β€” all according to the datatype it reps. no cap.


πŸ¦‹ TYPE_ALNUM

this one holds alphanumeric data. letters AND numbers, she's versatile. main character energy fr.


🌸 TYPE_ALPHA

this one holds alphabetic data. letters only bestie, no digits allowed at this party.


🌈 TYPE_ENUM

this one holds an enumerated type. pick from the list, periodt.


πŸ‘‘ TYPE_INTEGER

this one holds a decimal integer. whole numbers, zero drama.


🧚 TYPE_IPV4

this one holds an IPv4 internet address, e.g., "127.0.0.1". yes the localhost queen herself.


πŸ“ TYPE_NUMERIC

this one holds a decimal number, with optional sign and decimal point. so like, she can be negative, she can have decimals, she contains multitudes πŸ’–


⭐ TYPE_REGEXP

this one holds a regular expression. regex girlies rise πŸ™ˆ


πŸ’€ PORTABILITY πŸ’€

heads up bestie β€” the TYPE_IPV4 variable is an extension not provided by older implementations of the form library. so if you're on some ancient setup, don't come for her, she simply wasn't there yet 😭

πŸ”₯ SEE ALSO πŸ”₯

  • form(3X)

and that's the whole vibe check, bestie 🫢 go forth and validate those fields. this lil page came to you courtesy of ncurses 6.6, dated 2024-03-16 β€” slay, iconic, no notes πŸ’…βœ¨

πŸ“¦ where this page comes from