nl_types.h(0P)
π nl_types.h β data types π
okay bestie, so this one is a header from the POSIX Programmer's Manual β it's nl_types.h(0P) if you're keeping track β and it's literally just the little corner of POSIX that hands you the types and constants you need for message catalogs. no cap, it's short and it's cute. let's get into it. π¦
πΈ PROLOG πΈ
bestie, heads up: this page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ (so if you're on Linux, go consult the corresponding Linux manual page for the details on Linux behavior), or β plot twist β the interface might not even be implemented on Linux at all. π so vibe check your platform first.
β¨ NAME β¨
nl_types.h β data types. that's it. that's the whole name section. iconic, honestly. π
π SYNOPSIS π
#include <nl_types.h>
just the one include, we love a low-maintenance header. π«Ά
π DESCRIPTION π
okay so the <nl_types.h> header shall define at least the following types:
nl_catdβ used by the message catalog functionscatopen(),catgets(), andcatclose()to identify a catalog descriptor. think of it as the little name tag your open catalog wears. π·οΈnl_itemβ used bynl_langinfo()to identify items of langinfo data. the values of objects of typenl_itemare defined over in<langinfo.h>, so that's where you go lookin' when you need them. π
and <nl_types.h> shall define at least the following symbolic constants too:
NL_SETDβ used bygencatwhen no$setdirective is specified in a message text source file. you can pass this constant as the value of set_id on subsequent calls tocatgets()(that is, to retrieve messages from the default message set). the value ofNL_SETDis implementation-defined, so don't go assuming a number, bestie. πNL_CAT_LOCALEβ the value that must be passed as the oflag argument tocatopen()to make sure message catalog selection depends on theLC_MESSAGESlocale category, rather than directly on theLANGenvironment variable. yes, this matters. yes, it's the whole point. periodt. π
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);
ngl, "may also be defined as macros" is the kind of detail that will humble you at 3am when your function pointer doesn't link. just saying. π
the following sections are informative β aka the chill, non-normative part of the page.
π APPLICATION USAGE π
None.
literally nothing. the void. empty. we stan a section with zero homework. π
π§ RATIONALE π§
None.
again: nothing. no thoughts, head empty. π
β FUTURE DIRECTIONS β
None.
nothing's changing, bestie. it's giving stability. π
π₯ 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
go read those if you want the full lore, iykyk. π
π COPYRIGHT π
okay so legally speaking, 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. and if there's ever any discrepancy between this version and the original IEEE and The Open Group Standard β bestie, 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 hanging out 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 .
and that's the whole page, bestie!! this manual came to you from IEEE/The Open Group, 2017 β nl_types.h(0P), out. πβ¨ mwah, go read your catalogs, ily. ππ¦
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms