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