File: cdb_read.3

package info (click to toggle)
libowfat 0.34-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,288 kB
  • sloc: ansic: 20,181; makefile: 16
file content (24 lines) | stat: -rw-r--r-- 724 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.TH cdb_read 3
.SH NAME
cdb_read \- read bytes from a constant database
.SH SYNTAX
.B #include <libowfat/cdb.h>
.br
.B #include <libowfat/uint32.h>

int cdb_read(struct cdb *\fIc\fR, char *\fIbuf\fR, size_t \fIlen\fR, uint32 \fIposition\fR);

.SH DESCRIPTION
\fBcdb_read\fR reads \fIlen\fR bytes starting at \fIposition\fR from
\fIc\fR to buf.  You can use cdb_datapos or cdb_keypos to get
\fIposition\fR and cdb_datalen and cdb_keylen to get \fIlen\fR.

\fIbuf\fR needs to point to a memory region large enough to hold
\fIlen\fR bytes.

.SH "RETURN VALUE"
\fBcdb_read\fR returns 0 if everything went well, or -1 on error
(setting \fIerrno\fR appropriately.

.SH "SEE ALSO"
cdb_find(3), cdb_init(3), cdb_free(3), cdbmake(1)