form_variables(3X)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… 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