admin 管理员组文章数量: 1184232
2024年3月13日发(作者:博乐达源码是什么)
dbf文件C/C++的操作库程序。
求:dbf文件C/C++的操作库程序。
/************************************************************************
DBFOP for C++ V1.00 ,1995.1.10
Develop by John,Liao
Modified by Zhanghao. 1998.05.18
This Module include the C++ headfile ,
and C++ resource file .
This module is develop for use DBF(DBASEIII,DBASEII,MFOXBASE,FOXPRO 2.x)
and IDX(MFOXBASE).but use IDX only allow read or change the field that
isn't key word.
Support netware share .flielock,fileunlock,recordlock,recordunlock.
*************************************************************************/
/* -----------------------------------------------------------------------
The class DBF is interface to custom,all function that given
can be invoked by use the class DBF.
------------------------------------------------------------------------
1995.7.29 Change file option fxxx to xxx like _fsopen replace with sopen
1995.7.31 Change dowith option when type='N'
1995.7.31 Add option DBF::append(),DBF::clear();
1998.5.18 Add Foxpro 2.x DBF process.
-------------------------------------------------------------------------*/
#include "stdafx.h"
#ifdef DEBUG
#define debugm AfxMessageBox
#define new DEBUG_NEW
#endif
static INT2 ccc(CHAR *,INT2,INT2);
INT2 ccc(CHAR * ptsr,INT2 len,INT2 bit)
{
CHAR temp1[30],temp11[30],i1;
CHAR temp2[30],temp22[30],i2;
INT2 tempi,i;
CHAR * ps,*ps1;
for(ps1=ptsr;(*ps1==' ')&&(*ps1!='x0');ps1++);
ps=strchr(ps1,'.');
if(ps==NULL){ // NOT HAVE '.'
strcpy(temp1,ps1);
temp2[0]='x0';
}else{
*ps='x0';
strcpy(temp1,ps1);
ps++;
strcpy(temp2,ps);
}
i1=len-(bit?(bit+1):0);
if((int)strlen(temp1)>;(int)i1){
strncpy(temp11,temp1,i1);
temp11[i1]='x0';
}else{
tempi=i1-strlen(temp1);
for(i=0;i strcpy(temp11+tempi,temp1); } // ------------------------------------------ if(bit>;0){ if((int)strlen(temp2)>;(int)bit){ strncpy(temp22,temp2,bit); temp22[bit]='x0'; }else{ i2=strlen(temp2); tempi=bit-strlen(temp2); strcpy(temp22,temp2); for(i=0;i temp22[bit]='x0'; } } strcpy(ptsr,temp11); if(bit!=0){ strcat(ptsr,"."; strcat(ptsr,temp22); } return 0; } INT2 IDX_BLOCK::skip() { if(curp>;=(INT2)items-1){ return -2; } curp++; // double return 0; } INT2 IDX_BLOCK::find(CHAR * key)
版权声明:本文标题:巨经典的DBF文件C++操作程序 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1710298231a566722.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论