ndbm.h(7POSIX)
β¨ ndbm.h β bestie edition πΎπ
okay so this is the ndbm.h page from the POSIX Programmer's Manual (yes, section 7POSIX, we love a niche header). buckle up π
πΈ PROLOG πΈ
so like, this manual page is part of the POSIX Programmer's Manual, bestie. but heads up π β the Linux implementation of this interface may differ (so pls consult the corresponding Linux manual page for the tea on Linux behavior), or honestly the interface may not even be implemented on Linux at all. it's giving "results may vary" π
π NAME π
ndbm.h β definitions for ndbm database operations. iconic, no notes. β¨
π¦ SYNOPSIS π¦
#include <ndbm.h>
that's it. that's the whole vibe. include it and you're in. π«
π DESCRIPTION π
okay so the <ndbm.h> header shall define the datum type as a structure, and that structure shall include at least these members, periodt:
void *dptr A pointer to the application's data.
size_t dsize The size of the object pointed to by dptr.
like, dptr is a pointer to the application's data, and dsize is the size of the object that dptr points to. slay. π«Ά
the <ndbm.h> header shall also define the size_t type as described in <stddef.h>. yes bestie, same size_t as always, no new lore. π
and the <ndbm.h> header shall define the DBM type. it's a type, it's mysterious, it's the moment. β¨
the 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 touching what's already there, we respect boundaries πDBM_REPLACEβ allow replacing existing entries. out with the old, in with the new π₯
the following shall be declared as functions, and may also be defined as macros. function prototypes shall be provided. (so yes, macros are allowed to exist, but you still get real prototypes β the way that POSIX does both, honestly obsessed π)
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);
copy that exactly, character for character, bestie. do not freestyle the prototypes. π
the <ndbm.h> header shall define the mode_t type through typedef, as described in <sys/types.h>. (look at dbm_open up there β that third arg is a mode_t, iykyk π)
also lowkey important: the following sections are informative. so like, the tea below is context, not requirements. π
π APPLICATION USAGE π
None.
literally nothing. empty. a void. she said nothing and left πβ¨
π RATIONALE π
None.
no reasoning given, no thoughts, head empty, still iconic π
π§ FUTURE DIRECTIONS π§
None.
the future is... unchanged. no cap. π
π₯ SEE ALSO π₯
go read these next bestie, they're all connected:
<stddef.h><sys_types.h>- The System Interfaces volume of POSIX.1β2017,
dbm_clearerr()
π COPYRIGHT π
okay legal moment, stay with me, this part matters and we keep it exactly:
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 β every flag, every prototype, every "None." preserved with love. no cap. π
that's a wrap from your girl at IEEE/The Open Group, 2017 β ndbm.h(7POSIX), signing off πΈβ¨π
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms