?? cdb.3
字號:
.TH cdb 3.SH NAMEcdb \- read from a constant database.SH SYNTAX.B #include <cdb.h>int \fBcdb_seek(\fP\fIfd,key,len,dlen\fR\fB)\fP;int \fIfd\fR;.brchar *\fIkey\fR;.brunsigned int \fIlen\fR;.bruint32 *\fIdlen\fR;.SH DESCRIPTION.B cdb_seeklooks up.I keyin a constant database.It returns 1 if .I keyis present,0 if .I keyis not present,or \-1 if there was a read error..I keyis an array of.I lencharacters..B cdb_seekneeds an open file descriptor,.IR fd ,pointing to the database.If.B cdb_seekreturns 1,it points.I fdat the beginning of the data portion of the first recordindexed by.IR key ,and it stores the data length in.IR dlen..B cdb_seekdoes not provide a way to read subsequent records with the same key.It's fine to do several.B cdb_seeklookups with the same open file descriptor.Beware, however, that two simultaneous.B cdb_seeklookups can fail horribly;separate processes should not share the same database descriptor.Furthermore, any updates after the database was openedwill be invisible.It's rarely a good idea for a long-running programto hold a database open..SH "SEE ALSO"cdbget(1)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -