文档详情

dbf文件C、C++的操作库程序.doc

发布:2017-12-20约5.07万字共48页下载文档
文本预览下载声明
求: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 dbfop.hpp, ??and C++ resource file dbfop.cpp. ??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 ??isnt 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;itempi;i++) temp11= ; ? ? ? ? ? ? ? ? strcpy(
显示全部
相似文档