summaryrefslogtreecommitdiff
path: root/src/libstddjb/cdb_p.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-07-23 16:43:57 +0000
committerLaurent Bercot <ska@appnovation.com>2021-07-23 16:43:57 +0000
commitdd6bb6c6b8298ebeff2d1882becb36580b969d6f (patch)
tree3d922a5791e7e34e2b041ea5f3489360bfa798e1 /src/libstddjb/cdb_p.c
parent122f9363682e5de8ce4056c4c05c1eaf8935cf19 (diff)
downloadskalibs-dd6bb6c6b8298ebeff2d1882becb36580b969d6f.tar.xz
New 2.11.0.0 branch with several modifications
- libbiguint removed - cdb_make changed to cdbmake (because different ui) - cdb redesigned Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libstddjb/cdb_p.c')
-rw-r--r--src/libstddjb/cdb_p.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libstddjb/cdb_p.c b/src/libstddjb/cdb_p.c
new file mode 100644
index 0000000..9e46292
--- /dev/null
+++ b/src/libstddjb/cdb_p.c
@@ -0,0 +1,9 @@
+/* ISC license. */
+
+#include <skalibs/cdb.h>
+#include "cdb-internal.h"
+
+char const *cdb_p (cdb const *c, uint32_t len, uint32_t pos)
+{
+ return pos <= c->size && len <= c->size - pos ? c->map + pos : 0 ;
+}