form_variables(3X)
π form_variables(3X) β Library calls, bestie β¨
Okay so real talk, this is one of those pages from the ncurses form library crew, and the manual name on the tin is literally form_variables. It's short, it's sweet, it's giving "reference card energy" β let's go π
β¨ NAME β¨
TYPE_ALNUM, TYPE_ALPHA, TYPE_ENUM, TYPE_INTEGER, TYPE_IPV4, TYPE_NUMERIC, TYPE_REGEXP β these are the form system global variables, and yes they're all in caps because they're that 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 π¦
So these bad boys right here are the building blocks of the form library β¨ They define fields β like, the actual field types you can create using the form_fieldtype(3X) functions. Each one comes with its own little function squad for field-validation and character-validation, and it all depends on which datatype you're rolling with. No cap π«Ά
π TYPE_ALNUM
This one holds alphanumeric data. Letters AND numbers, the whole package π
π TYPE_ALPHA
This one holds alphabetic data. Just letters, keep it cute πΈ
β TYPE_ENUM
This one holds an enumerated type. iykyk π
π₯ TYPE_INTEGER
This one holds a decimal integer. Whole numbers only, bestie π
π TYPE_IPV4
This one holds an IPv4 internet address, e.g., "127.0.0.1". Localhost era π§
π« TYPE_NUMERIC
This one holds a decimal number, with optional sign and decimal point. Flexible queen behavior β¨
π¦ TYPE_REGEXP
This one holds a regular expression. Regex girlies rise π
π PORTABILITY π
Heads up, bestie: the TYPE_IPV4 variable is an extension β it is not provided by older implementations of the form library π So if you're on some ancient build, don't come for her when she's not there.
π SEE ALSO π
form(3X)β go read it, it's the main character π
That's the whole vibe, fr fr β page written by the ncurses girlies, version 6.5, dated 2024-03-16. Slay, go build some forms, and remember: validate your fields π«Άβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright 2020-2023,2024 Thomas E. Dickey
- Copyright 2010-2013,2017 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms