2006-05-30 12:15 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbver.h
* changed version number and ChangeLog entry
* harbour/make_tgz.sh
! fixed creating PP in DJGPP builds
* harbour/contrib/dot/pp.prg
! minor fix in parameter checking
* harbour/contrib/libmisc/hb_f.c
! fixed bug in record numbering after reaching EOF position and
backward skipping
* harbour/include/hbrdddel.h
* harbour/source/rdd/delim1.c
+ implemented DELIM RDD. It should be fully Clipper compatible
in comma files parsing. If you will find any difference, please
inform me and I'll update it. Unlike in Clipper in [x]Harbour
these RDD can be used also in direct import operations with
APPEND FROM ... VIA "DELIM"
These RDD also support whole record transfering between RDDs
if they support the same record format and field representation
and can translate extended field types like "I", "B", "V3", "V4",
etc.
* harbour/source/rtl/dbdelim.prg
* replaced old code of __dbDelim() function with simple calls to
__dbCopy()/__dbApp() - it should fix most of the reported
incompatibilities in DELIM import/export operations and
increase their speed many times
* harbour/include/hbrddsdf.h
* harbour/source/rdd/sdf1.c
+ implemented SDF RDD. It should be fully Clipper compatible
in SDF files parsing. If you will find any difference, please
inform me and I'll update it. Unlike in Clipper in [x]Harbour
these RDD can be used also in direct import operations with
APPEND FROM ... VIA "SDF"
These RDD also support whole record transfering between RDDs
if they support the same record format and field representation
and can translate extended field types like "I", "B", "V3", "V4",
etc.
* harbour/source/rtl/dbsdf.prg
* replaced old code of __dbSDF() function with simple calls to
__dbCopy()/__dbApp() - it should fix most of the reported
incompatibilities in SDF import/export operations and
increase their speed many times
* harbour/source/rdd/dbcmd.c
+ added support for table structure inheriting in transfer RDDs.
+ added eleventh parameter with delimiter to __dbCopy()/__dbApp()
* harbour/source/rdd/dbf1.c
* force 10 bytes size for memo fields in DBF and SMT memos.
* some minor clean-up.
* harbour/source/rdd/workarea.c
* added some dummy DBI_* actions in base RDD level
This commit is contained in:
@@ -8,6 +8,67 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2006-05-31 13:45 UTC+0200 Tomaz Zupan (tomaz.zupan at orpo.si)
|
||||
* harbour.spec
|
||||
* Added Mandriva to recognised distros
|
||||
* Sinchronised version with harbour/include/hbver.h
|
||||
|
||||
2006-05-30 18:15 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/rdd/sdf1.c
|
||||
* cleaned BCC warning
|
||||
* harbour/source/rdd/delim1.c
|
||||
! fixed BCC compilation (string initialization with dynamic
|
||||
values is forbidden by BCC)
|
||||
|
||||
2006-05-30 12:15 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbver.h
|
||||
* changed version number and ChangeLog entry
|
||||
|
||||
* harbour/make_tgz.sh
|
||||
! fixed creating PP in DJGPP builds
|
||||
|
||||
* harbour/contrib/dot/pp.prg
|
||||
! minor fix in parameter checking
|
||||
|
||||
* harbour/contrib/libmisc/hb_f.c
|
||||
! fixed bug in record numbering after reaching EOF position and
|
||||
backward skipping
|
||||
|
||||
* harbour/include/hbrdddel.h
|
||||
* harbour/source/rdd/delim1.c
|
||||
+ implemented DELIM RDD. It should be fully Clipper compatible
|
||||
in comma files parsing. If you will find any difference, please
|
||||
inform me and I'll update it. Unlike in Clipper in [x]Harbour
|
||||
these RDD can be used also in direct import operations with
|
||||
APPEND FROM ... VIA "DELIM"
|
||||
These RDD also support whole record transfering between RDDs
|
||||
if they support the same record format and field representation
|
||||
and can translate extended field types like "I", "B", "V3", "V4",
|
||||
etc.
|
||||
|
||||
* harbour/source/rtl/dbdelim.prg
|
||||
* replaced old code of __dbDelim() function with simple calls to
|
||||
__dbCopy()/__dbApp() - it should fix most of the reported
|
||||
incompatibilities in DELIM import/export operations and
|
||||
increase their speed many times
|
||||
|
||||
* harbour/include/hbrddsdf.h
|
||||
* harbour/source/rdd/sdf1.c
|
||||
+ implemented SDF RDD. It should be fully Clipper compatible
|
||||
in SDF files parsing. If you will find any difference, please
|
||||
inform me and I'll update it. Unlike in Clipper in [x]Harbour
|
||||
these RDD can be used also in direct import operations with
|
||||
APPEND FROM ... VIA "SDF"
|
||||
These RDD also support whole record transfering between RDDs
|
||||
if they support the same record format and field representation
|
||||
and can translate extended field types like "I", "B", "V3", "V4",
|
||||
etc.
|
||||
|
||||
* harbour/source/rtl/dbsdf.prg
|
||||
* replaced old code of __dbSDF() function with simple calls to
|
||||
__dbCopy()/__dbApp() - it should fix most of the reported
|
||||
incompatibilities in SDF import/export operations and
|
||||
increase their speed many times
|
||||
|
||||
* harbour/source/rdd/dbcmd.c
|
||||
+ added support for table structure inheriting in transfer RDDs.
|
||||
|
||||
@@ -439,7 +439,7 @@ STATIC s_aSwitchDefs := {}
|
||||
bCompile := .T.
|
||||
sSwitch := ""
|
||||
aParams := { p1, p2, p3, p4, p5, p6, p7, p8, p9 }
|
||||
aSize( aParams, PCount() )
|
||||
aSize( aParams, PCount() - 1 )
|
||||
endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@ HB_FUNC( HB_FGOBOTTOM )
|
||||
{
|
||||
int x;
|
||||
int len;
|
||||
long loc;
|
||||
long loc, last;
|
||||
|
||||
if ( last_rec[area] != 0 ) {
|
||||
recno[area] = last_rec[area];
|
||||
@@ -263,14 +263,15 @@ HB_FUNC( HB_FGOBOTTOM )
|
||||
|
||||
loc = 0L;
|
||||
|
||||
last = offset[area];
|
||||
do {
|
||||
|
||||
hb_fsSeek( handles[area], offset[area], SEEK_SET );
|
||||
len = hb_fsRead( handles[area], ( BYTE * ) c, c_size );
|
||||
for ( x = 0; x < len; x++ ) {
|
||||
if ( ((*(c + x) == 13) && (*(c + x + 1) == 10)) ||
|
||||
((*(c + x) == 10) && (*(c + x + 1) == 13)) ||
|
||||
( x - loc > b_size ) ) {
|
||||
last = offset[area] + loc;
|
||||
recno[area]++;
|
||||
x++;
|
||||
loc = x + 1;
|
||||
@@ -281,7 +282,7 @@ HB_FUNC( HB_FGOBOTTOM )
|
||||
} while ( len == c_size );
|
||||
|
||||
last_rec[area] = --recno[area];
|
||||
last_off[area] = offset[area];
|
||||
last_off[area] = last;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,6 +372,7 @@ HB_FUNC( HB_FREADANDSKIP )
|
||||
((*(b + x) == 10) && x < read-1 && (*(b + x + 1) == 13)) )
|
||||
{
|
||||
x += 2;
|
||||
bHasCRLF = TRUE;
|
||||
break;
|
||||
}
|
||||
x++;
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* DELIMITED RDD module
|
||||
* DELIM RDD
|
||||
*
|
||||
* Copyright 1999 Bruno Cantero <bruno@issnet.net>
|
||||
* Copyright 2006 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -57,109 +57,84 @@
|
||||
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/* DELIMITED default file extensions */
|
||||
#define DELIM_TABLEEXT ".txt"
|
||||
|
||||
|
||||
/*
|
||||
* -- DELIMITED METHODS --
|
||||
* DELIM WORKAREA
|
||||
* ------------
|
||||
* The Workarea Structure of DELIM RDD
|
||||
*
|
||||
*/
|
||||
|
||||
#define hb_delimBof NULL
|
||||
#define hb_delimEof NULL
|
||||
#define hb_delimFound NULL
|
||||
#define hb_delimGoBottom NULL
|
||||
#define hb_delimGoTo NULL
|
||||
#define hb_delimGoToId NULL
|
||||
#define hb_delimGoTop NULL
|
||||
#define hb_delimSeek NULL
|
||||
#define hb_delimSkip NULL
|
||||
#define hb_delimSkipFilter NULL
|
||||
#define hb_delimSkipRaw NULL
|
||||
#define hb_delimAddField NULL
|
||||
#define hb_delimAppend NULL
|
||||
#define hb_delimCreateFields NULL
|
||||
#define hb_delimDeleteRec NULL
|
||||
#define hb_delimDeleted NULL
|
||||
#define hb_delimFieldCount NULL
|
||||
#define hb_delimFieldDisplay NULL
|
||||
#define hb_delimFieldInfo NULL
|
||||
#define hb_delimFieldName NULL
|
||||
#define hb_delimFlush NULL
|
||||
#define hb_delimGetRec NULL
|
||||
#define hb_delimGetValue NULL
|
||||
#define hb_delimGetVarLen NULL
|
||||
#define hb_delimGoCold NULL
|
||||
#define hb_delimGoHot NULL
|
||||
#define hb_delimPutRec NULL
|
||||
#define hb_delimPutValue NULL
|
||||
#define hb_delimRecall NULL
|
||||
#define hb_delimRecCount NULL
|
||||
#define hb_delimRecInfo NULL
|
||||
#define hb_delimRecNo NULL
|
||||
#define hb_delimRecId NULL
|
||||
#define hb_delimSetFieldExtent NULL
|
||||
#define hb_delimAlias NULL
|
||||
#define hb_delimClose NULL
|
||||
#define hb_delimCreate NULL
|
||||
#define hb_delimInfo NULL
|
||||
#define hb_delimNewArea NULL
|
||||
#define hb_delimOpen NULL
|
||||
#define hb_delimRelease NULL
|
||||
#define hb_delimStructSize NULL
|
||||
#define hb_delimSysName NULL
|
||||
#define hb_delimEval NULL
|
||||
#define hb_delimPack NULL
|
||||
#define hb_delimPackRec NULL
|
||||
#define hb_delimSort NULL
|
||||
#define hb_delimTrans NULL
|
||||
#define hb_delimTransRec NULL
|
||||
#define hb_delimZap NULL
|
||||
#define hb_delimChildEnd NULL
|
||||
#define hb_delimChildStart NULL
|
||||
#define hb_delimChildSync NULL
|
||||
#define hb_delimSyncChildren NULL
|
||||
#define hb_delimClearRel NULL
|
||||
#define hb_delimForceRel NULL
|
||||
#define hb_delimRelArea NULL
|
||||
#define hb_delimRelEval NULL
|
||||
#define hb_delimRelText NULL
|
||||
#define hb_delimSetRel NULL
|
||||
#define hb_delimOrderListAdd NULL
|
||||
#define hb_delimOrderListClear NULL
|
||||
#define hb_delimOrderListDelete NULL
|
||||
#define hb_delimOrderListFocus NULL
|
||||
#define hb_delimOrderListRebuild NULL
|
||||
#define hb_delimOrderCondition NULL
|
||||
#define hb_delimOrderCreate NULL
|
||||
#define hb_delimOrderDestroy NULL
|
||||
#define hb_delimOrderInfo NULL
|
||||
#define hb_delimClearFilter NULL
|
||||
#define hb_delimClearLocate NULL
|
||||
#define hb_delimClearScope NULL
|
||||
#define hb_delimCountScope NULL
|
||||
#define hb_delimFilterText NULL
|
||||
#define hb_delimScopeInfo NULL
|
||||
#define hb_delimSetFilter NULL
|
||||
#define hb_delimSetLocate NULL
|
||||
#define hb_delimSetScope NULL
|
||||
#define hb_delimSkipScope NULL
|
||||
#define hb_delimLocate NULL
|
||||
#define hb_delimCompile NULL
|
||||
#define hb_delimError NULL
|
||||
#define hb_delimEvalBlock NULL
|
||||
#define hb_delimRawLock NULL
|
||||
#define hb_delimLock NULL
|
||||
#define hb_delimUnLock NULL
|
||||
#define hb_delimCloseMemFile NULL
|
||||
#define hb_delimCreateMemFile NULL
|
||||
#define hb_delimGetValueFile NULL
|
||||
#define hb_delimOpenMemFile NULL
|
||||
#define hb_delimPutValueFile NULL
|
||||
#define hb_delimReadDBHeader NULL
|
||||
#define hb_delimWriteDBHeader NULL
|
||||
#define hb_delimInit NULL
|
||||
#define hb_delimExit NULL
|
||||
#define hb_delimDrop NULL
|
||||
#define hb_delimExists NULL
|
||||
#define hb_delimRddInfo NULL
|
||||
#define hb_delimWhoCares NULL
|
||||
typedef struct _DELIMAREA
|
||||
{
|
||||
struct _RDDFUNCS * lprfsHost; /* Virtual method table for this workarea */
|
||||
USHORT uiArea; /* The number assigned to this workarea */
|
||||
void * atomAlias; /* Pointer to the alias symbol for this workarea */
|
||||
USHORT uiFieldExtent; /* Total number of fields allocated */
|
||||
USHORT uiFieldCount; /* Total number of fields used */
|
||||
LPFIELD lpFields; /* Pointer to an array of fields */
|
||||
void * lpFieldExtents; /* Void ptr for additional field properties */
|
||||
PHB_ITEM valResult; /* All purpose result holder */
|
||||
BOOL fTop; /* TRUE if "top" */
|
||||
BOOL fBottom; /* TRUE if "bottom" */
|
||||
BOOL fBof; /* TRUE if "bof" */
|
||||
BOOL fEof; /* TRUE if "eof" */
|
||||
BOOL fFound; /* TRUE if "found" */
|
||||
DBSCOPEINFO dbsi; /* Info regarding last LOCATE */
|
||||
DBFILTERINFO dbfi; /* Filter in effect */
|
||||
LPDBORDERCONDINFO lpdbOrdCondInfo;
|
||||
LPDBRELINFO lpdbRelations; /* Parent/Child relationships used */
|
||||
USHORT uiParents; /* Number of parents for this area */
|
||||
USHORT heap;
|
||||
USHORT heapSize;
|
||||
USHORT rddID;
|
||||
USHORT uiMaxFieldNameLength;
|
||||
PHB_CODEPAGE cdPage; /* Area's codepage pointer */
|
||||
|
||||
/*
|
||||
* DELIM's additions to the workarea structure
|
||||
*
|
||||
* Warning: The above section MUST match WORKAREA exactly! Any
|
||||
* additions to the structure MUST be added below, as in this
|
||||
* example.
|
||||
*/
|
||||
|
||||
FHANDLE hFile; /* Data file handle */
|
||||
char * szFileName; /* Name of data file */
|
||||
char * szEol; /* EOL marker */
|
||||
USHORT uiEolLen; /* Size of EOL marker */
|
||||
BOOL fDelim; /* Use character field delimiter? */
|
||||
char cDelim; /* Character field delimiter */
|
||||
char cSeparator; /* Field delimiter */
|
||||
USHORT uiRecordLen; /* Size of record */
|
||||
USHORT * pFieldOffset; /* Pointer to field offset array */
|
||||
BYTE * pRecord; /* Buffer of record data */
|
||||
BYTE * pBuffer; /* Read/Write */
|
||||
ULONG ulBufferSize; /* IO buffer size */
|
||||
ULONG ulBufferRead; /* Number of bytes in read buffer */
|
||||
ULONG ulBufferIndex; /* Index to read read buffer */
|
||||
HB_FOFFSET ulRecordOffset; /* Current record offest */
|
||||
HB_FOFFSET ulNextOffset; /* Next record offest */
|
||||
HB_FOFFSET ulFileSize; /* File table size in export mode */
|
||||
HB_FOFFSET ulBufferStart; /* Start offset of read buffer */
|
||||
ULONG ulRecNo; /* Current record */
|
||||
ULONG ulRecCount; /* Number of records (in export) */
|
||||
BOOL fTransRec; /* Can put whole records */
|
||||
BOOL fFlush; /* Data was written to table and not commited */
|
||||
BOOL fShared; /* Shared file */
|
||||
BOOL fReadonly; /* Read only file */
|
||||
BOOL fPositioned; /* Positioned record */
|
||||
BOOL fRecordChanged; /* Record changed */
|
||||
} DELIMAREA;
|
||||
|
||||
typedef DELIMAREA * LPDELIMAREA;
|
||||
|
||||
#ifndef DELIMAREAP
|
||||
#define DELIMAREAP LPDELIMAREA
|
||||
#endif
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* SDF RDD module
|
||||
* SDF RDD
|
||||
*
|
||||
* Copyright 1999 Bruno Cantero <bruno@issnet.net>
|
||||
* Copyright 2006 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -57,109 +57,76 @@
|
||||
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/* SDF default file extensions */
|
||||
#define SDF_TABLEEXT ".txt"
|
||||
|
||||
|
||||
/*
|
||||
* -- SDF METHODS --
|
||||
* SDF WORKAREA
|
||||
* ------------
|
||||
* The Workarea Structure of SDF RDD
|
||||
*
|
||||
*/
|
||||
|
||||
#define hb_sdfBof NULL
|
||||
#define hb_sdfEof NULL
|
||||
#define hb_sdfFound NULL
|
||||
#define hb_sdfGoBottom NULL
|
||||
#define hb_sdfGoTo NULL
|
||||
#define hb_sdfGoToId NULL
|
||||
#define hb_sdfGoTop NULL
|
||||
#define hb_sdfSeek NULL
|
||||
#define hb_sdfSkip NULL
|
||||
#define hb_sdfSkipFilter NULL
|
||||
#define hb_sdfSkipRaw NULL
|
||||
#define hb_sdfAddField NULL
|
||||
#define hb_sdfAppend NULL
|
||||
#define hb_sdfCreateFields NULL
|
||||
#define hb_sdfDeleteRec NULL
|
||||
#define hb_sdfDeleted NULL
|
||||
#define hb_sdfFieldCount NULL
|
||||
#define hb_sdfFieldDisplay NULL
|
||||
#define hb_sdfFieldInfo NULL
|
||||
#define hb_sdfFieldName NULL
|
||||
#define hb_sdfFlush NULL
|
||||
#define hb_sdfGetRec NULL
|
||||
#define hb_sdfGetValue NULL
|
||||
#define hb_sdfGetVarLen NULL
|
||||
#define hb_sdfGoCold NULL
|
||||
#define hb_sdfGoHot NULL
|
||||
#define hb_sdfPutRec NULL
|
||||
#define hb_sdfPutValue NULL
|
||||
#define hb_sdfRecall NULL
|
||||
#define hb_sdfRecCount NULL
|
||||
#define hb_sdfRecInfo NULL
|
||||
#define hb_sdfRecNo NULL
|
||||
#define hb_sdfRecId NULL
|
||||
#define hb_sdfSetFieldExtent NULL
|
||||
#define hb_sdfAlias NULL
|
||||
#define hb_sdfClose NULL
|
||||
#define hb_sdfCreate NULL
|
||||
#define hb_sdfInfo NULL
|
||||
#define hb_sdfNewArea NULL
|
||||
#define hb_sdfOpen NULL
|
||||
#define hb_sdfRelease NULL
|
||||
#define hb_sdfStructSize NULL
|
||||
#define hb_sdfSysName NULL
|
||||
#define hb_sdfEval NULL
|
||||
#define hb_sdfPack NULL
|
||||
#define hb_sdfPackRec NULL
|
||||
#define hb_sdfSort NULL
|
||||
#define hb_sdfTrans NULL
|
||||
#define hb_sdfTransRec NULL
|
||||
#define hb_sdfZap NULL
|
||||
#define hb_sdfChildEnd NULL
|
||||
#define hb_sdfChildStart NULL
|
||||
#define hb_sdfChildSync NULL
|
||||
#define hb_sdfSyncChildren NULL
|
||||
#define hb_sdfClearRel NULL
|
||||
#define hb_sdfForceRel NULL
|
||||
#define hb_sdfRelArea NULL
|
||||
#define hb_sdfRelEval NULL
|
||||
#define hb_sdfRelText NULL
|
||||
#define hb_sdfSetRel NULL
|
||||
#define hb_sdfOrderListAdd NULL
|
||||
#define hb_sdfOrderListClear NULL
|
||||
#define hb_sdfOrderListDelete NULL
|
||||
#define hb_sdfOrderListFocus NULL
|
||||
#define hb_sdfOrderListRebuild NULL
|
||||
#define hb_sdfOrderCondition NULL
|
||||
#define hb_sdfOrderCreate NULL
|
||||
#define hb_sdfOrderDestroy NULL
|
||||
#define hb_sdfOrderInfo NULL
|
||||
#define hb_sdfClearFilter NULL
|
||||
#define hb_sdfClearLocate NULL
|
||||
#define hb_sdfClearScope NULL
|
||||
#define hb_sdfCountScope NULL
|
||||
#define hb_sdfFilterText NULL
|
||||
#define hb_sdfScopeInfo NULL
|
||||
#define hb_sdfSetFilter NULL
|
||||
#define hb_sdfSetLocate NULL
|
||||
#define hb_sdfSetScope NULL
|
||||
#define hb_sdfSkipScope NULL
|
||||
#define hb_sdfLocate NULL
|
||||
#define hb_sdfCompile NULL
|
||||
#define hb_sdfError NULL
|
||||
#define hb_sdfEvalBlock NULL
|
||||
#define hb_sdfRawLock NULL
|
||||
#define hb_sdfLock NULL
|
||||
#define hb_sdfUnLock NULL
|
||||
#define hb_sdfCloseMemFile NULL
|
||||
#define hb_sdfCreateMemFile NULL
|
||||
#define hb_sdfGetValueFile NULL
|
||||
#define hb_sdfOpenMemFile NULL
|
||||
#define hb_sdfPutValueFile NULL
|
||||
#define hb_sdfReadDBHeader NULL
|
||||
#define hb_sdfWriteDBHeader NULL
|
||||
#define hb_sdfInit NULL
|
||||
#define hb_sdfExit NULL
|
||||
#define hb_sdfDrop NULL
|
||||
#define hb_sdfExists NULL
|
||||
#define hb_sdfRddInfo NULL
|
||||
#define hb_sdfWhoCares NULL
|
||||
typedef struct _SDFAREA
|
||||
{
|
||||
struct _RDDFUNCS * lprfsHost; /* Virtual method table for this workarea */
|
||||
USHORT uiArea; /* The number assigned to this workarea */
|
||||
void * atomAlias; /* Pointer to the alias symbol for this workarea */
|
||||
USHORT uiFieldExtent; /* Total number of fields allocated */
|
||||
USHORT uiFieldCount; /* Total number of fields used */
|
||||
LPFIELD lpFields; /* Pointer to an array of fields */
|
||||
void * lpFieldExtents; /* Void ptr for additional field properties */
|
||||
PHB_ITEM valResult; /* All purpose result holder */
|
||||
BOOL fTop; /* TRUE if "top" */
|
||||
BOOL fBottom; /* TRUE if "bottom" */
|
||||
BOOL fBof; /* TRUE if "bof" */
|
||||
BOOL fEof; /* TRUE if "eof" */
|
||||
BOOL fFound; /* TRUE if "found" */
|
||||
DBSCOPEINFO dbsi; /* Info regarding last LOCATE */
|
||||
DBFILTERINFO dbfi; /* Filter in effect */
|
||||
LPDBORDERCONDINFO lpdbOrdCondInfo;
|
||||
LPDBRELINFO lpdbRelations; /* Parent/Child relationships used */
|
||||
USHORT uiParents; /* Number of parents for this area */
|
||||
USHORT heap;
|
||||
USHORT heapSize;
|
||||
USHORT rddID;
|
||||
USHORT uiMaxFieldNameLength;
|
||||
PHB_CODEPAGE cdPage; /* Area's codepage pointer */
|
||||
|
||||
/*
|
||||
* SDFS's additions to the workarea structure
|
||||
*
|
||||
* Warning: The above section MUST match WORKAREA exactly! Any
|
||||
* additions to the structure MUST be added below, as in this
|
||||
* example.
|
||||
*/
|
||||
|
||||
FHANDLE hFile; /* Data file handle */
|
||||
char * szFileName; /* Name of data file */
|
||||
char * szEol; /* EOL marker */
|
||||
USHORT uiEolLen; /* Size of EOL marker */
|
||||
USHORT uiRecordLen; /* Size of record */
|
||||
USHORT * pFieldOffset; /* Pointer to field offset array */
|
||||
BYTE * pRecord; /* Buffer of record data */
|
||||
HB_FOFFSET ulRecordOffset; /* Current record offest */
|
||||
HB_FOFFSET ulNextOffset; /* Next record offest */
|
||||
HB_FOFFSET ulFileSize; /* File table size in export mode */
|
||||
ULONG ulRecNo; /* Current record */
|
||||
ULONG ulRecCount; /* Number of records (in export) */
|
||||
BOOL fTransRec; /* Can put whole records */
|
||||
BOOL fFlush; /* Data was written to SDF and not commited */
|
||||
BOOL fShared; /* Shared file */
|
||||
BOOL fReadonly; /* Read only file */
|
||||
BOOL fPositioned; /* Positioned record */
|
||||
BOOL fRecordChanged; /* Record changed */
|
||||
} SDFAREA;
|
||||
|
||||
typedef SDFAREA * LPSDFAREA;
|
||||
|
||||
#ifndef SDFAREAP
|
||||
#define SDFAREAP LPSDFAREA
|
||||
#endif
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
|
||||
@@ -62,13 +62,13 @@
|
||||
/* NOTE: One of these next three fields can be incremented by the hbverfix program */
|
||||
|
||||
#define HB_VER_MAJOR 0 /* Major version number */
|
||||
#define HB_VER_MINOR 46 /* Minor version number */
|
||||
#define HB_VER_MINOR 47 /* Minor version number */
|
||||
#define HB_VER_REVISION 0 /* Revision number */
|
||||
|
||||
/* NOTE: The next two fields are automatically updated by the hbverfix program */
|
||||
|
||||
#define HB_VER_LENTRY "2006-05-29 14:10 UTC+0100 Ryszard Glab"
|
||||
#define HB_VER_CHLCVS "ChangeLog,v 1.4894 2006/05/29 11:59:37 rglab"
|
||||
#define HB_VER_LENTRY "2006-05-30 12:09 UTC+0300 Chen Kedem"
|
||||
#define HB_VER_CHLCVS "ChangeLog,v 1.4896 2006/05/30 09:09:16 ckedem"
|
||||
|
||||
/* TOFIX: The next three fields need to get updated automatically */
|
||||
|
||||
|
||||
@@ -255,13 +255,14 @@ then
|
||||
fi
|
||||
|
||||
# Create and install PP
|
||||
pushd contrib/dot
|
||||
$HB_BIN_INSTALL/${hb_pref}mk pp -n -w -D_DEFAULT_INC_DIR=\"${_DEFAULT_INC_DIR}\"
|
||||
$INSTALL -m755 pp $HB_BIN_INSTALL/pp
|
||||
ln -s pp $HB_BIN_INSTALL/pprun
|
||||
(cd contrib/dot
|
||||
export PRG_USR="\"-D_DEFAULT_INC_DIR='${_DEFAULT_INC_DIR}'\""
|
||||
$HB_BIN_INSTALL/${hb_pref}mk pp -n -w
|
||||
strip pp${hb_exesuf}
|
||||
$INSTALL -m755 pp${hb_exesuf} $HB_BIN_INSTALL/pp${hb_exesuf}
|
||||
ln -s pp${hb_exesuf} $HB_BIN_INSTALL/pprun${hb_exesuf}
|
||||
$INSTALL -m644 rp_dot.ch $HB_INC_INSTALL/
|
||||
rm -f pp
|
||||
popd
|
||||
rm -f pp${hb_exesuf})
|
||||
|
||||
|
||||
CURDIR=$(pwd)
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
#include "hbapilng.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbrddwrk.h"
|
||||
#include "rddsys.ch"
|
||||
#if defined(__XHARBOUR__)
|
||||
#include "hbfast.h"
|
||||
#else
|
||||
@@ -1589,7 +1590,8 @@ HB_FUNC( DBCOMMITALL )
|
||||
static ERRCODE hb_rddOpenTable( char * szFileName, char * szDriver,
|
||||
USHORT uiArea, char *szAlias,
|
||||
BOOL fShared, BOOL fReadonly,
|
||||
char * szCpId, ULONG ulConnection )
|
||||
char * szCpId, ULONG ulConnection,
|
||||
PHB_ITEM pStruct )
|
||||
{
|
||||
char szDriverBuffer[ HARBOUR_MAX_RDD_DRIVERNAME_LENGTH + 1 ];
|
||||
DBOPENINFO pInfo;
|
||||
@@ -1642,13 +1644,25 @@ static ERRCODE hb_rddOpenTable( char * szFileName, char * szDriver,
|
||||
pInfo.ulConnection = ulConnection;
|
||||
pInfo.lpdbHeader = NULL;
|
||||
|
||||
/* Open file */
|
||||
errCode = SELF_OPEN( pArea, &pInfo );
|
||||
|
||||
if( errCode != SUCCESS )
|
||||
if( pStruct )
|
||||
{
|
||||
hb_rddReleaseCurrentArea();
|
||||
hb_rddSelectWorkAreaNumber( uiPrevArea );
|
||||
errCode = SELF_CREATEFIELDS( pArea, pStruct );
|
||||
}
|
||||
else
|
||||
{
|
||||
errCode = SUCCESS;
|
||||
}
|
||||
|
||||
if( errCode == SUCCESS )
|
||||
{
|
||||
/* Open file */
|
||||
errCode = SELF_OPEN( pArea, &pInfo );
|
||||
|
||||
if( errCode != SUCCESS )
|
||||
{
|
||||
hb_rddReleaseCurrentArea();
|
||||
hb_rddSelectWorkAreaNumber( uiPrevArea );
|
||||
}
|
||||
}
|
||||
|
||||
s_bNetError = errCode != SUCCESS;
|
||||
@@ -2247,7 +2261,7 @@ HB_FUNC( DBUSEAREA )
|
||||
hb_parl( 1 ) ? 0 : hb_rddGetCurrentWorkAreaNumber(),
|
||||
hb_parc( 4 ),
|
||||
ISLOG( 5 ) ? hb_parl( 5 ) : !hb_set.HB_SET_EXCLUSIVE,
|
||||
hb_parl( 6 ), hb_parc( 7 ), hb_parnl( 8 ) );
|
||||
hb_parl( 6 ), hb_parc( 7 ), hb_parnl( 8 ), NULL );
|
||||
}
|
||||
|
||||
HB_FUNC( __DBZAP )
|
||||
@@ -4282,11 +4296,13 @@ static ERRCODE hb_rddTransRecords( AREAP pArea,
|
||||
PHB_ITEM pCobWhile, PHB_ITEM pStrWhile,
|
||||
PHB_ITEM pNext, PHB_ITEM pRecID,
|
||||
PHB_ITEM pRest,
|
||||
char *szCpId )
|
||||
char *szCpId,
|
||||
PHB_ITEM pDelim )
|
||||
{
|
||||
AREAP lpaSource, lpaDest, lpaClose = NULL;
|
||||
AREAP lpaClose = NULL;
|
||||
PHB_ITEM pStruct = NULL;
|
||||
DBTRANSINFO dbTransInfo;
|
||||
USHORT uiPrevArea;
|
||||
USHORT uiPrevArea, uiCount, uiSwap;
|
||||
ERRCODE errCode;
|
||||
|
||||
memset( &dbTransInfo, 0, sizeof( DBTRANSINFO ) );
|
||||
@@ -4294,10 +4310,7 @@ static ERRCODE hb_rddTransRecords( AREAP pArea,
|
||||
|
||||
if( fExport )
|
||||
{
|
||||
PHB_ITEM pStruct = NULL;
|
||||
|
||||
lpaSource = pArea;
|
||||
errCode = hb_dbTransStruct( lpaSource, NULL, &dbTransInfo,
|
||||
errCode = hb_dbTransStruct( pArea, NULL, &dbTransInfo,
|
||||
&pStruct, pFields );
|
||||
if( errCode == SUCCESS )
|
||||
{
|
||||
@@ -4305,26 +4318,71 @@ static ERRCODE hb_rddTransRecords( AREAP pArea,
|
||||
TRUE, 0, "", szCpId, ulConnection );
|
||||
if( errCode == SUCCESS )
|
||||
{
|
||||
dbTransInfo.lpaDest = lpaClose = lpaDest =
|
||||
dbTransInfo.lpaDest = lpaClose =
|
||||
( AREAP ) hb_rddGetCurrentWorkAreaPointer();
|
||||
if( pDelim )
|
||||
{
|
||||
SELF_INFO( dbTransInfo.lpaDest, DBI_SETDELIMITER, pDelim );
|
||||
}
|
||||
}
|
||||
}
|
||||
if( pStruct )
|
||||
hb_itemRelease( pStruct );
|
||||
}
|
||||
else
|
||||
{
|
||||
lpaDest = pArea;
|
||||
errCode = hb_rddOpenTable( szFileName, szDriver, 0, "", TRUE, TRUE,
|
||||
szCpId, ulConnection );
|
||||
if( errCode == SUCCESS )
|
||||
LPRDDNODE pRddNode = hb_rddFindNode( szDriver, NULL );
|
||||
|
||||
if( !pRddNode )
|
||||
{
|
||||
lpaClose = lpaSource = ( AREAP ) hb_rddGetCurrentWorkAreaPointer();
|
||||
errCode = hb_dbTransStruct( lpaSource, lpaDest, &dbTransInfo,
|
||||
NULL, pFields );
|
||||
hb_errRT_DBCMD( EG_ARG, EDBCMD_USE_BADPARAMETER, NULL, "DBUSEAREA" );
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if( pRddNode->uiType == RDT_TRANSFER )
|
||||
{
|
||||
errCode = hb_dbTransStruct( pArea, NULL, &dbTransInfo,
|
||||
&pStruct, pFields );
|
||||
|
||||
/* revert area and items */
|
||||
dbTransInfo.lpaDest = dbTransInfo.lpaSource;
|
||||
for( uiCount = 0; uiCount < dbTransInfo.uiItemCount; ++uiCount )
|
||||
{
|
||||
uiSwap = dbTransInfo.lpTransItems[uiCount].uiSource;
|
||||
dbTransInfo.lpTransItems[uiCount].uiSource =
|
||||
dbTransInfo.lpTransItems[uiCount].uiDest;
|
||||
dbTransInfo.lpTransItems[uiCount].uiDest = uiSwap;
|
||||
}
|
||||
|
||||
if( errCode == SUCCESS )
|
||||
{
|
||||
errCode = hb_rddOpenTable( szFileName, szDriver, 0, "", TRUE, TRUE,
|
||||
szCpId, ulConnection, pStruct );
|
||||
if( errCode == SUCCESS )
|
||||
{
|
||||
lpaClose = dbTransInfo.lpaSource =
|
||||
( AREAP ) hb_rddGetCurrentWorkAreaPointer();
|
||||
if( pDelim )
|
||||
{
|
||||
SELF_INFO( dbTransInfo.lpaSource, DBI_SETDELIMITER, pDelim );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errCode = hb_rddOpenTable( szFileName, szDriver, 0, "", TRUE, TRUE,
|
||||
szCpId, ulConnection, NULL );
|
||||
if( errCode == SUCCESS )
|
||||
{
|
||||
lpaClose = ( AREAP ) hb_rddGetCurrentWorkAreaPointer();
|
||||
errCode = hb_dbTransStruct( lpaClose, pArea, &dbTransInfo,
|
||||
NULL, pFields );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( pStruct )
|
||||
hb_itemRelease( pStruct );
|
||||
|
||||
if( errCode == SUCCESS )
|
||||
{
|
||||
hb_rddSelectWorkAreaNumber( dbTransInfo.lpaSource->uiArea );
|
||||
@@ -4378,7 +4436,8 @@ HB_FUNC( __DBAPP )
|
||||
hb_param( 5, HB_IT_NUMERIC ), /* Next */
|
||||
ISNIL( 6 ) ? NULL : hb_param( 6, HB_IT_ANY ), /* RecID */
|
||||
hb_param( 7, HB_IT_LOGICAL ), /* Rest */
|
||||
hb_parc( 10 ) ); /* Codepage */
|
||||
hb_parc( 10 ), /* Codepage */
|
||||
hb_param( 11, HB_IT_STRING ) );/* Delimiter */
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4407,7 +4466,8 @@ HB_FUNC( __DBCOPY )
|
||||
hb_param( 5, HB_IT_NUMERIC ), /* Next */
|
||||
ISNIL( 6 ) ? NULL : hb_param( 6, HB_IT_ANY ), /* RecID */
|
||||
hb_param( 7, HB_IT_LOGICAL ), /* Rest */
|
||||
hb_parc( 10 ) ); /* Codepage */
|
||||
hb_parc( 10 ), /* Codepage */
|
||||
hb_param( 11, HB_IT_STRING ) );/* Delimiter */
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1098,6 +1098,11 @@ static ERRCODE hb_dbfAddField( DBFAREAP pArea, LPDBFIELDINFO pFieldInfo )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dbfAddField(%p, %p)", pArea, pFieldInfo));
|
||||
|
||||
if( pFieldInfo->uiType == HB_IT_MEMO && pArea->bMemoType == DB_MEMO_SMT )
|
||||
{
|
||||
pFieldInfo->uiLen = 10;
|
||||
}
|
||||
|
||||
/* Update field offset */
|
||||
pArea->pFieldOffset[ pArea->uiFieldCount ] = pArea->uiRecordLen;
|
||||
pArea->uiRecordLen += pFieldInfo->uiLen;
|
||||
@@ -1265,7 +1270,7 @@ static ERRCODE hb_dbfFlush( DBFAREAP pArea )
|
||||
}
|
||||
|
||||
/*
|
||||
* Replace the current record.
|
||||
* Retrieve current record buffer
|
||||
*/
|
||||
static ERRCODE hb_dbfGetRec( DBFAREAP pArea, BYTE ** pBuffer )
|
||||
{
|
||||
@@ -1420,18 +1425,16 @@ static ERRCODE hb_dbfGetValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
if( pField->uiDec )
|
||||
{
|
||||
hb_itemPutNDLen( pItem, fDbl ? dVal : ( double ) lVal,
|
||||
( int ) pField->uiLen - ( ( int ) pField->uiDec + 1 ),
|
||||
( int ) ( pField->uiLen - pField->uiDec - 1 ),
|
||||
( int ) pField->uiDec );
|
||||
}
|
||||
else if( pField->uiLen > 9 )
|
||||
else if( fDbl )
|
||||
{
|
||||
hb_itemPutNDLen( pItem, fDbl ? dVal : ( double ) lVal,
|
||||
( int ) pField->uiLen, 0 );
|
||||
hb_itemPutNDLen( pItem, dVal, ( int ) pField->uiLen, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_itemPutNLLen( pItem, ( LONG ) ( fDbl ? dVal : lVal ),
|
||||
( int ) pField->uiLen );
|
||||
hb_itemPutNIntLen( pItem, lVal, ( int ) pField->uiLen );
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1669,8 +1672,7 @@ static ERRCODE hb_dbfPutValue( DBFAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
memcpy( pArea->pRecord + pArea->pFieldOffset[ uiIndex ],
|
||||
hb_itemGetCPtr( pItem ), uiSize );
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
if( HB_IS_STRING( pItem ) )
|
||||
hb_cdpnTranslate( (char *) pArea->pRecord + pArea->pFieldOffset[ uiIndex ], hb_cdp_page, pArea->cdPage, uiSize );
|
||||
hb_cdpnTranslate( (char *) pArea->pRecord + pArea->pFieldOffset[ uiIndex ], hb_cdp_page, pArea->cdPage, uiSize );
|
||||
#endif
|
||||
memset( pArea->pRecord + pArea->pFieldOffset[ uiIndex ] + uiSize,
|
||||
' ', pField->uiLen - uiSize );
|
||||
@@ -1933,8 +1935,8 @@ static ERRCODE hb_dbfSetFieldExtent( DBFAREAP pArea, USHORT uiFieldExtent )
|
||||
/* Alloc field offsets array */
|
||||
if( uiFieldExtent )
|
||||
{
|
||||
pArea->pFieldOffset = ( USHORT * ) hb_xgrab( uiFieldExtent * sizeof( USHORT * ) );
|
||||
memset( pArea->pFieldOffset, 0, uiFieldExtent * sizeof( USHORT * ) );
|
||||
pArea->pFieldOffset = ( USHORT * ) hb_xgrab( uiFieldExtent * sizeof( USHORT ) );
|
||||
memset( pArea->pFieldOffset, 0, uiFieldExtent * sizeof( USHORT ) );
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
@@ -2096,9 +2098,6 @@ static ERRCODE hb_dbfCreate( DBFAREAP pArea, LPDBOPENINFO pCreateInfo )
|
||||
|
||||
pArea->szDataFileName = hb_strdup( ( char * ) szFileName );
|
||||
|
||||
/* Size for deleted flag */
|
||||
pArea->uiRecordLen = 1;
|
||||
|
||||
if( pArea->bTableType == 0 )
|
||||
{
|
||||
pItem = hb_itemPutNI( pItem, 0 );
|
||||
@@ -2162,6 +2161,9 @@ static ERRCODE hb_dbfCreate( DBFAREAP pArea, LPDBOPENINFO pCreateInfo )
|
||||
|
||||
pArea->fHasMemo = fError = FALSE;
|
||||
|
||||
/* Size for deleted flag */
|
||||
pArea->uiRecordLen = 1;
|
||||
|
||||
for( uiCount = 0; uiCount < pArea->uiFieldCount; uiCount++ )
|
||||
{
|
||||
LPFIELD pField = pArea->lpFields + uiCount;
|
||||
@@ -2196,7 +2198,7 @@ static ERRCODE hb_dbfCreate( DBFAREAP pArea, LPDBOPENINFO pCreateInfo )
|
||||
}
|
||||
pThisField->bLen = ( BYTE ) pField->uiLen;
|
||||
pThisField->bDec = 0;
|
||||
pArea->uiRecordLen += pThisField->bLen;
|
||||
pArea->uiRecordLen += pField->uiLen;
|
||||
pArea->fHasMemo = TRUE;
|
||||
break;
|
||||
|
||||
@@ -2228,14 +2230,14 @@ static ERRCODE hb_dbfCreate( DBFAREAP pArea, LPDBOPENINFO pCreateInfo )
|
||||
}
|
||||
pThisField->bLen = ( BYTE ) pField->uiLen;
|
||||
pThisField->bDec = 0;
|
||||
pArea->uiRecordLen += pThisField->bLen;
|
||||
pArea->uiRecordLen += pField->uiLen;
|
||||
break;
|
||||
|
||||
case HB_IT_LONG:
|
||||
pThisField->bType = 'N';
|
||||
pThisField->bLen = ( BYTE ) pField->uiLen;
|
||||
pThisField->bDec = ( BYTE ) pField->uiDec;
|
||||
pArea->uiRecordLen += pThisField->bLen;
|
||||
pArea->uiRecordLen += pField->uiLen;
|
||||
break;
|
||||
|
||||
case HB_IT_DOUBLE:
|
||||
@@ -2243,7 +2245,7 @@ static ERRCODE hb_dbfCreate( DBFAREAP pArea, LPDBOPENINFO pCreateInfo )
|
||||
pField->uiLen = 8;
|
||||
pThisField->bLen = ( BYTE ) pField->uiLen;
|
||||
pThisField->bDec = ( BYTE ) pField->uiDec;
|
||||
pArea->uiRecordLen += pThisField->bLen;
|
||||
pArea->uiRecordLen += pField->uiLen;
|
||||
break;
|
||||
|
||||
case HB_IT_INTEGER:
|
||||
@@ -2255,7 +2257,7 @@ static ERRCODE hb_dbfCreate( DBFAREAP pArea, LPDBOPENINFO pCreateInfo )
|
||||
}
|
||||
pThisField->bLen = ( BYTE ) pField->uiLen;
|
||||
pThisField->bDec = 0;
|
||||
pArea->uiRecordLen += pThisField->bLen;
|
||||
pArea->uiRecordLen += pField->uiLen;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -583,12 +583,13 @@ ERRCODE hb_waClose( AREAP pArea )
|
||||
ERRCODE hb_waInfo( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_waInfo(%p, %hu, %p)", pArea, uiIndex, pItem));
|
||||
HB_SYMBOL_UNUSED( pArea );
|
||||
|
||||
switch ( uiIndex )
|
||||
{
|
||||
case DBI_ISDBF:
|
||||
case DBI_CANPUTREC:
|
||||
case DBI_ISFLOCK:
|
||||
case DBI_SHARED:
|
||||
hb_itemPutL( pItem, FALSE );
|
||||
break;
|
||||
|
||||
@@ -601,6 +602,20 @@ ERRCODE hb_waInfo( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
hb_itemPutC( pItem, "" );
|
||||
return FAILURE;
|
||||
|
||||
case DBI_GETHEADERSIZE:
|
||||
case DBI_GETRECSIZE:
|
||||
case DBI_LOCKCOUNT:
|
||||
hb_itemPutNI( pItem, 0 );
|
||||
break;
|
||||
|
||||
case DBI_LASTUPDATE:
|
||||
hb_itemPutDL( pItem, 0 );
|
||||
break;
|
||||
|
||||
case DBI_GETLOCKARRAY:
|
||||
hb_arrayNew( pItem, 0 );
|
||||
break;
|
||||
|
||||
case DBI_CHILDCOUNT:
|
||||
{
|
||||
LPDBRELINFO lpdbRelations = pArea->lpdbRelations;
|
||||
@@ -648,6 +663,10 @@ ERRCODE hb_waInfo( AREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
break;
|
||||
}
|
||||
|
||||
case DBI_TABLEEXT:
|
||||
hb_itemClear( pItem );
|
||||
return SELF_RDDINFO( SELF_RDDNODE( pArea ), RDDI_TABLEEXT, 0, pItem );
|
||||
|
||||
case DBI_SCOPEDRELATION:
|
||||
{
|
||||
int iRelNo = hb_itemGetNI( pItem );
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
* www - http://www.harbour-project.org
|
||||
* APPEND FROM code submitted by Marco Braida <marcobra@elart.it>
|
||||
*
|
||||
* Copyright 2006 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
|
||||
* function __dbDelim() replaced by the new one which uses
|
||||
* DELIM RDD I've just created
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
@@ -52,6 +56,21 @@
|
||||
*
|
||||
*/
|
||||
|
||||
REQUEST DELIM
|
||||
|
||||
PROCEDURE __dbDelim( lExport, cFile, cDelimArg, aFields, bFor, bWhile, nNext, nRecord, lRest )
|
||||
|
||||
IF lExport
|
||||
__dbCopy( cFile, aFields, bFor, bWhile, nNext, nRecord, lRest, "DELIM", , , cDelimArg )
|
||||
ELSE
|
||||
__dbApp( cFile, aFields, bFor, bWhile, nNext, nRecord, lRest, "DELIM", , , cDelimArg )
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
#ifdef __DBDELIM_OLD_CODE__
|
||||
|
||||
#include "hbcommon.ch"
|
||||
#include "fileio.ch"
|
||||
#include "error.ch"
|
||||
@@ -368,3 +387,5 @@ for ii:=1 to nDBFfields
|
||||
FIELDPUT(ii,vRes)
|
||||
next
|
||||
return .T.
|
||||
|
||||
#endif /* __DBDELIM_OLD_CODE__ */
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
* Copyright 2001-2002 David G. Holm <dholm@jsd-llc.com>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* Copyright 2006 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
|
||||
* function __dbSDF() replaced by the new one which uses
|
||||
* SDF RDD I've just created
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
@@ -58,6 +62,21 @@
|
||||
|
||||
HB_FILE_VER( "$Id$" )
|
||||
|
||||
REQUEST SDF
|
||||
|
||||
PROCEDURE __dbSDF( lExport, cFile, aFields, bFor, bWhile, nNext, nRecord, lRest )
|
||||
|
||||
IF lExport
|
||||
__dbCopy( cFile, aFields, bFor, bWhile, nNext, nRecord, lRest, "SDF" )
|
||||
ELSE
|
||||
__dbApp( cFile, aFields, bFor, bWhile, nNext, nRecord, lRest, "SDF" )
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
#ifdef __DBSDF_OLD_CODE__
|
||||
|
||||
#define SkipEOL( handle ) FSEEK( handle, nEOLSize, FS_RELATIVE )
|
||||
#define AppendEOL( handle ) FWRITE( handle, HB_OSNewLine() )
|
||||
#define AppendEOF( handle ) FWRITE( handle, CHR( 26 ) )
|
||||
@@ -287,3 +306,4 @@ STATIC FUNCTION FindEOL(fh)
|
||||
endif
|
||||
RETURN cResult
|
||||
|
||||
#endif /* __DBSDF_OLD_CODE__ */
|
||||
|
||||
Reference in New Issue
Block a user