* fcl-db/dbase: cosmetic: more file structure annotations, clarify comments

git-svn-id: trunk@24150 -
This commit is contained in:
reiniero 2013-04-04 13:16:41 +00:00
parent 210434e937
commit f4f128e1d5
2 changed files with 12 additions and 12 deletions

View File

@ -646,7 +646,7 @@ begin
// init field ptr
lFieldDescPtr := @lFieldDescIII;
end;
// begin writing fields
// begin writing field definitions
FFieldDefs.Clear;
// deleted mark 1 byte
lFieldOffset := 1;
@ -1083,7 +1083,7 @@ begin
PChar(pNormal)^ := '*';
WriteRecord(iNormal, pNormal);
end else begin
// Cannot found a record after iDel so iDel must be deleted
// Cannot find a record after iDel so iDel must be deleted
dec(iDel);
break;
end;
@ -1286,7 +1286,7 @@ begin
else
GetMem(pDestBuff, DestDbfFile.RecordSize);
// let the games begin!
// Go through record data:
try
{$ifdef USE_CACHE}
BufferAhead := true;
@ -1297,7 +1297,7 @@ begin
begin
// read record from original dbf
ReadRecord(lRecNo, pBuff);
// copy record?
// copy record unless (deleted or user wants packing)
if (ansichar(pBuff^) <> '*') or not Pack then
begin
// if restructure, initialize dest

View File

@ -19,20 +19,20 @@ type
PDbfHdr = ^rDbfHdr;
rDbfHdr = packed record
VerDBF : Byte; // 0
Year : Byte; // 1
Month : Byte; // 2
Day : Byte; // 3
RecordCount : Integer; // 4-7
Year : Byte; // 1 year last updated
Month : Byte; // 2 month last updated
Day : Byte; // 3 day last updated
RecordCount : Integer; // 4-7 number of records in file
FullHdrSize : Word; // 8-9
RecordSize : Word; // 10-11
RecordSize : Word; // 10-11 sum of all field sizes, including delete flag
Dummy1 : Word; // 12-13
IncTrans : Byte; // 14
Encrypt : Byte; // 15
Encrypt : Byte; // 15 DBase encryption flag
MultiUse : Integer; // 16-19
LastUserID : Integer; // 20-23
Dummy2 : array[24..27] of Byte;
MDXFlag : Byte; // 28
Language : Byte; // 29
Language : Byte; // 29 code page mark
Dummy3 : Word; // 30-31
end;
//====================================================================
@ -61,7 +61,7 @@ type
WorkAreaID : Byte; // 20
// WorkAreaID only for DBase III, is always $01
Reserved2 : array[21..30] of Byte;
MDXIndexField : Byte; //31
MDXIndexField : Byte; //31
// DBase IV:
// $00: no key for this field;
// $01: key exists for this field in MDX index file