nl_types.h(7POSIX)

πŸ’– PROLOG πŸ’–

okay bestie, quick heads up before we dive in: this page is part of the POSIX Programmer's Manual (it's the nl_types.h(7POSIX) page, if you're keeping track). The Linux implementation of this interface may differ β€” so if you're on Linux and something's giving weird, go consult the corresponding Linux manual page for the deets on Linux behavior. And lowkey? The interface might not even be implemented on Linux at all. πŸ™ˆ Just so you know.


✨ NAME ✨

nl_types.h β€” data types πŸ’…


🌸 SYNOPSIS 🌸

#include <nl_types.h>

πŸ¦‹ DESCRIPTION πŸ¦‹

So the <nl_types.h> header shall define at least these types, bestie:

  • nl_catd β€” this one gets used by the message catalog functions catopen(), catgets(), and catclose() to identify a catalog descriptor. it's the little ID badge for your catalog, fr fr. πŸŽ€
  • nl_item β€” this one is used by nl_langinfo() to identify items of langinfo data. Values of objects of type nl_item are defined in <langinfo.h>. iykyk. ✨

The <nl_types.h> header shall also define at least these symbolic constants:

  • NL_SETD β€” used by gencat when no $set directive is specified in a message text source file. This constant can be passed as the value of set_id on subsequent calls to catgets() (that is, to retrieve messages from the default message set). The value of NL_SETD is implementation-defined. so don't go assuming a number, okay? πŸ‘‘
  • NL_CAT_LOCALE β€” the value that must be passed as the oflag argument to catopen() to ensure that message catalog selection depends on the LC_MESSAGES locale category, rather than directly on the LANG environment variable. yes queen, locale-aware behavior. 🌈

The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided. πŸ“œ

int       catclose(nl_catd);
char     *catgets(nl_catd, int, int, const char *);
nl_catd   catopen(const char *, int);

The following sections are informative. πŸ’œ


πŸ’… APPLICATION USAGE πŸ’…

None. literally nothing. moving on bestie. 🫢


πŸŽ€ RATIONALE πŸŽ€

None. nope, not a crumb. πŸ“


⭐ FUTURE DIRECTIONS ⭐

None. the future is looking… uneventful. πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

  • <langinfo.h>
  • The System Interfaces volume of POSIX.1‐2017, catclose(), catgets(), catopen(), nl_langinfo()
  • The Shell and Utilities volume of POSIX.1‐2017, gencat

Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.

In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. 🫑

The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .

Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .


aaaand that's the whole page, bestie! πŸŽ‰ this little icon was brought to you by IEEE/The Open Group, dated 2017 β€” so when you see nl_types.h(7POSIX) in the wild, you know exactly whose name is on it. slay, stay safe, and may your catalogs always open. πŸ’–βœ¨πŸŒΈ