📄 depot.xs
字号:
/************************************************************************************************* * Depot.c * Copyright (C) 2000-2003 Mikio Hirabayashi * This file is part of QDBM, Quick Database Manager. * QDBM is free software; you can redistribute it and/or modify it under the terms of the GNU * Lesser General Public License as published by the Free Software Foundation; either version * 2.1 of the License or any later version. QDBM is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * You should have received a copy of the GNU Lesser General Public License along with QDBM; if * not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA. *************************************************************************************************/#include "EXTERN.h"#include "perl.h"#include "XSUB.h"#include <depot.h>#include <stdlib.h>MODULE = Depot PACKAGE = Depot##================================================================================================## public objects##================================================================================================char *pldperrmsg()CODE: RETVAL = (char *)dperrmsg(dpecode);OUTPUT: RETVALvoid *pldpopen(name, omode, bnum) char * name int omode int bnumCODE: RETVAL = dpopen(name, omode, bnum);OUTPUT: RETVALintpldpclose(depot) void *depotCODE: RETVAL = dpclose(depot);OUTPUT: RETVALintpldpput(depot, kbuf, ksiz, vbuf, vsiz, dmode) void * depot char * kbuf int ksiz char * vbuf int vsiz int dmodeCODE: RETVAL = dpput(depot, kbuf, ksiz, vbuf, vsiz, dmode);OUTPUT: RETVALintpldpout(depot, kbuf, ksiz) void * depot char * kbuf int ksizCODE: RETVAL = dpout(depot, kbuf, ksiz);OUTPUT: RETVALchar *pldpget(depot, kbuf, ksiz, start, max) void * depot char * kbuf int ksiz int start int maxPPCODE: char *vbuf; int vsiz; SV *sv; vbuf = dpget(depot, kbuf, ksiz, start, max, &vsiz); if(!vbuf) XSRETURN_UNDEF; sv = sv_2mortal(newSVpv(vbuf, vsiz)); free(vbuf); sv_setsv(ST(0), sv); XSRETURN(1);intpldpvsiz(depot, kbuf, ksiz) void * depot char * kbuf int ksizCODE: RETVAL = dpvsiz(depot, kbuf, ksiz);OUTPUT: RETVALintpldpiterinit(depot) void * depotCODE: RETVAL = dpiterinit(depot);OUTPUT: RETVALchar *pldpiternext(depot) void * depotPPCODE: char *kbuf; int ksiz; SV *sv; kbuf = dpiternext(depot, &ksiz); if(!kbuf) XSRETURN_UNDEF; sv = sv_2mortal(newSVpv(kbuf, ksiz)); free(kbuf); sv_setsv(ST(0), sv); XSRETURN(1);intpldpsetalign(depot, align) void * depot int alignCODE: RETVAL = dpsetalign(depot, align);OUTPUT: RETVALintpldpsync(depot) void * depotCODE: RETVAL = dpsync(depot);OUTPUT: RETVALintpldpoptimize(depot, bnum) void * depot int bnumCODE: RETVAL = dpoptimize(depot, bnum);OUTPUT: RETVALintpldpfsiz(depot) void * depotCODE: RETVAL = dpfsiz(depot);OUTPUT: RETVALintpldpbnum(depot) void * depotCODE: RETVAL = dpbnum(depot);OUTPUT: RETVALintpldprnum(depot) void * depotCODE: RETVAL = dprnum(depot);OUTPUT: RETVALintpldpwritable(depot) void * depotCODE: RETVAL = dpwritable(depot);OUTPUT: RETVALintpldpfatalerror(depot) void * depotCODE: RETVAL = dpfatalerror(depot);OUTPUT: RETVAL## END OF FILE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -