ndbm.h(0P)
πΈ ndbm.h β the bestie of database headers πΎβ¨
okay so real talk β this page is from the POSIX Programmer's Manual (0P section, iykyk). Heads up bestie: the Linux implementation of this interface may differ from what's written here (so like, go check the corresponding Linux manual page for the actual Linux tea β), or honestly the interface might just not be implemented on Linux at all. π
β¨ NAME β¨
ndbm.h β definitions for ndbm database operations ποΈπ
π SYNOPSIS π
#include <ndbm.h>
π¦ DESCRIPTION π¦
So the <ndbm.h> header shall define the datum type as a structure, and that structure shall include at least these members:
void *dptr A pointer to the application's data.
size_t dsize The size of the object pointed to by dptr.
Like, dptr is the pointer to your data, and dsize is how big the thing that dptr points to actually is. slay. π
The <ndbm.h> header shall define the size_t type as described in <stddef.h>. π«Ά
The <ndbm.h> header shall define the DBM type. (iconic, no notes.)
The <ndbm.h> header shall define these symbolic constants as possible values for the store_mode argument to dbm_store():
DBM_INSERTβ insertion of new entries only. no replacing, we're just adding, periodt. β¨DBM_REPLACEβ allow replacing existing entries. out with the old, in with the new π
And these shall be declared as functions, and may also be defined as macros (yes bestie, either one). Function prototypes shall be provided:
int dbm_clearerr(DBM *);
void dbm_close(DBM *);
int dbm_delete(DBM *, datum);
int dbm_error(DBM *);
datum dbm_fetch(DBM *, datum);
datum dbm_firstkey(DBM *);
datum dbm_nextkey(DBM *);
DBM *dbm_open(const char *, int, mode_t);
int dbm_store(DBM *, datum, datum, int);
The <ndbm.h> header shall define the mode_t type through typedef, as described in <sys/types.h>. π§
The following sections are informative β so like, they're the vibes section, not the rules section. π
π APPLICATION USAGE π
None. literally nothing. we're all caught up bestie πβ¨
β RATIONALE β
None. again, nothing. the reasoning is giving mystery π΅οΈβοΈπ
π¦ FUTURE DIRECTIONS π¦
None. the future is lowkey unwritten, no cap. πΈ
π SEE ALSO π
<stddef.h><sys_types.h>- The System Interfaces volume of POSIX.1β2017,
dbm_clearerr()
π COPYRIGHT π
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 .
and that's the whole page bestie π«Ά β brought to you by IEEE/The Open Group, 2017, filed under ndbm.h(0P) (POSIX Programmer's Manual, section 0P). go forth and #include <ndbm.h> responsibly, mwah πβ¨π
π¦ 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