form_variables(3FORM)
π form_variables β the form library's glowy little global besties π
okay so this is form_variables(3FORM), a Library calls page, and it's literally just the iconic lineup of global variables that the form library hands you. no cap, they're the moment. β¨
πΈ NAME πΈ
TYPE_ALNUM, TYPE_ALPHA, TYPE_ENUM, TYPE_INTEGER, TYPE_IPV4, TYPE_NUMERIC, TYPE_REGEXP β the form system's global variables, aka the field-type girlies π
β¨ 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 π¦
so these are the building blocks of the form library, bestie. they define the fields you can create with the fieldtype(3FORM) functions. each one comes with its own little set of functions for validating fields and validating characters, all according to whatever datatype it's repping. it's giving very much "pick your fighter." π
π TYPE_ALNUM
holds alphanumeric data. letters AND numbers, she contains multitudes. π₯
π TYPE_ALPHA
holds alphabetic data. just letters, no digits invited to this party. πΈ
π TYPE_ENUM
holds an enumerated type. pick from the list, periodt. π
π TYPE_INTEGER
holds a decimal integer. whole numbers only, no decimals sneaking in. β
π TYPE_IPV4
holds an IPv4 internet address, e.g., "127.0.0.1". yes, localhost is that girl. π π
π TYPE_NUMERIC
holds a decimal number, with an optional sign and an optional decimal point. flexible queen. π
π TYPE_REGEXP
holds a regular expression. regex girlies rise, iykyk π
π«Ά PORTABILITY π«Ά
lowkey important: the TYPE_IPV4 variable is an extension that the older implementations of the form library did NOT provide. so if you're out here on some ancient build, don't be surprised when she doesn't show up. π
π SEE ALSO π
form(3FORM)
and that's the whole vibe check, bestie β go forth and validate those fields πβ¨
this was brought to you by ncurses 6.6, dated 2024-03-16, and honestly? she ate. ππ¦π
π¦ 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 2020-2023,2024 Thomas E. Dickey
- Copyright 2010-2013,2017 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms