field_just(3FORM)

πŸ’– field_just(3FORM) πŸ’–

okay bestie, pull up a chair because we're talking about field_just(3FORM) from the forms library and honestly? it's giving "small but mighty." πŸŽ€


✨ NAME ✨

set_field_just, field_just β€” retrieve field characteristics πŸ‘‘


🌸 SYNOPSIS 🌸

#include <form.h>

int set_field_just(FIELD *field, int justification);
int field_just(const FIELD *field);

like yes, that's the whole vibe. two little functions. one sets, one gets. slay. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so set_field_just sets the justification attribute of a field, and field_just returns a field's justification attribute. that's it, that's the dynamic. πŸ”₯

and that attribute can be exactly one of these four besties:

  • NO_JUSTIFICATION
  • JUSTIFY_RIGHT
  • JUSTIFY_LEFT
  • JUSTIFY_CENTER

no cap, that's the whole list. pick one. 🌈


πŸ’œ RETURN VALUE πŸ’œ

field_just hands you back one of these:

  • NO_JUSTIFICATION
  • JUSTIFY_RIGHT
  • JUSTIFY_LEFT
  • JUSTIFY_CENTER

meanwhile set_field_just is out here returning one of the following:

  • E_OK β€” the routine succeeded, we love to see it, iconic behavior ✨
  • E_SYSTEM_ERROR β€” a system error occurred (go peek at errno(3), bestie, it knows what happened) 😭
  • E_BAD_ARGUMENT β€” the routine detected an incorrect or out-of-range argument πŸ™ˆ
fr fr, check that return value. it's not just decor.

🧚 PORTABILITY 🧚

these routines emulate the System V forms library. they were not supported on Version 7 or BSD versions. so if you're time-traveling back to those, this is not the moment. πŸ’€


πŸ‘‘ AUTHORS πŸ‘‘

Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. absolute legends, we stan. 🫢


⭐ SEE ALSO ⭐

ncurses(3NCURSES) and related pages whose names begin β€œform_” for detailed descriptions of the entry points. iykyk, go read the whole family. πŸ“


and that's the page!! this lil manual came from ncurses 6.6, dated 2024-03-16 β€” so when you're out here justifying your fields, just know the source said it first. bye bestie, go center something pretty πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from