git-svn-id: https://svn.code.sf.net/p/kolmck/code@106 91bb2d04-0c0c-4d2d-88a5-bbb6f4c1fa07

This commit is contained in:
dkolmck
2011-08-09 05:08:58 +00:00
parent e0a481375c
commit 27c37729b6
6 changed files with 2668 additions and 6823 deletions

View File

@ -34,7 +34,7 @@ const
DBF_FoxBASE_ = $FB; DBF_FoxBASE_ = $FB;
DBF_dBaseIIIplus = $03; DBF_dBaseIIIplus = $03;
DBF_dBaseIIIplusMemo = $83; DBF_dBaseIIIplusMemo = $83;
DBF_dBaseIV = $04; DBF_dBaseIV = $03;
DBF_dBaseIVSQLtable = $43; DBF_dBaseIVSQLtable = $43;
DBF_dBaseIVSQLsystem = $63; DBF_dBaseIVSQLsystem = $63;
DBF_dBaseIVSQLtableMemo = $CB; DBF_dBaseIVSQLtableMemo = $CB;
@ -326,6 +326,8 @@ function NewmdvDBF(AFileName: String; AutoUpdate: Boolean; ReadOnly: Boolean = F
implementation implementation
{$RANGECHECKS OFF}
function NewmdvDBF(AFileName: String; AutoUpdate: Boolean; ReadOnly: Boolean = False): TKOLmdvDBF; function NewmdvDBF(AFileName: String; AutoUpdate: Boolean; ReadOnly: Boolean = False): TKOLmdvDBF;
begin begin
New(Result, Create); New(Result, Create);
@ -1015,6 +1017,7 @@ end;
procedure TmdvDBF.PackDBF; procedure TmdvDBF.PackDBF;
var ReadPos, WritePos, Rec, RecCount: DWord; var ReadPos, WritePos, Rec, RecCount: DWord;
S:string;
begin begin
if FReadOnly then Exit; if FReadOnly then Exit;
Post; Post;
@ -1038,7 +1041,9 @@ begin
FDBFHeader.RecordCount := RecCount; FDBFHeader.RecordCount := RecCount;
FDBFStream.Seek(0, spBegin); FDBFStream.Seek(0, spBegin);
FDBFStream.Write(FDBFHeader, SizeOf(TDBFHeader)); FDBFStream.Write(FDBFHeader, SizeOf(TDBFHeader));
FDBFStream.Seek(0, spEnd);
S:= #$1A;
FDBFStream.Write(S[1], 1);
CurrentRecord:= 0; CurrentRecord:= 0;
end; end;
@ -1265,13 +1270,12 @@ begin
NextFree:= 512 div _BlockSize + Ord(512 mod _BlockSize > 0); NextFree:= 512 div _BlockSize + Ord(512 mod _BlockSize > 0);
BlockSize:= _BlockSize; BlockSize:= _BlockSize;
end; end;
Stream:= NewWriteFileStream(ChangeFileExt(AFileName, '.dbt'));
Stream.Size:= 0;
Stream.Write(_DBTHeader , SizeOf(_DBTHeader));
Stream.Size:= _DBTHeader.NextFree*_DBTHeader.BlockSize;
Stream.Free;
end; end;
Stream:= NewWriteFileStream(ChangeFileExt(AFileName, '.dbt'));
Stream.Size:= 0;
Stream.Write(_DBTHeader , SizeOf(_DBTHeader));
Stream.Size:= _DBTHeader.NextFree*_DBTHeader.BlockSize;
Stream.Free;
finally finally
FreeMem(_DBFFields); FreeMem(_DBFFields);
end; end;

View File

@ -597,7 +597,9 @@ end;
function TTCPClient.ReceiveLength: Integer; function TTCPClient.ReceiveLength: Integer;
begin begin
ioctlsocket(fhandle,FIONREAD,result); if fhandle<>SOCKET_ERROR then
ioctlsocket(fhandle,FIONREAD,result)
else result:=0;
end; end;
function TTCPClient.Send(var Buf; const Count: Integer): Integer; function TTCPClient.Send(var Buf; const Count: Integer): Integer;

8466
KOL.pas

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,7 @@ type
TKOLMainMenu = PMenu; TKOLMainMenu = PMenu;
TKOLPopupMenu = PMenu; TKOLPopupMenu = PMenu;
TKOLOpenSaveDialog = POpenSaveDialog; TKOLOpenSaveDialog = POpenSaveDialog;
//TKOLOpenDirDialog = POpenDirDialog; TKOLOpenDirDialog = POpenDirDialog;
TKOLTrayIcon = PTrayIcon; TKOLTrayIcon = PTrayIcon;
TKOLColorDialog = PColorDialog; TKOLColorDialog = PColorDialog;
//TKOLActionList = PActionList; //TKOLActionList = PActionList;

View File

@ -19,7 +19,7 @@ mmmmm mmmmm mmmmm cccccccccccc kkkkk kkkkk
Key Objects Library (C) 1999 by Kladov Vladimir. Key Objects Library (C) 1999 by Kladov Vladimir.
KOL Mirror Classes Kit (C) 2000 by Kladov Vladimir. KOL Mirror Classes Kit (C) 2000 by Kladov Vladimir.
******************************************************** ********************************************************
* VERSION 3.1415926 * VERSION 3.1415926535897
******************************************************** ********************************************************
} }
unit mirror; unit mirror;
@ -13073,11 +13073,17 @@ begin
RptDetailed( 'tagmsg found in line ' + Int2Str(I+1), CYAN ); RptDetailed( 'tagmsg found in line ' + Int2Str(I+1), CYAN );
for J := Length(S)-5 downto 1 do for J := Length(S)-5 downto 1 do
begin begin
if StrLComp_NoCase( PChar(@S[J]), 'tagmsg', 6 ) = 0 then if AnsiCompareText( Copy(S, J, 6), 'tagmsg' ) = 0 then
begin begin
{$IFDEF _D2009orHigher}
if ( (J = 1) or not CharInSet(S[J-1], ['A'..'Z','a'..'z','_']) )
and ( (J = Length(S)-5) or not CharInSet(S[J+6],
['0'..'9','A'..'Z','a'..'z','_']) ) then
{$ELSE}
if ( (J = 1) or not(S[J-1] in ['A'..'Z','a'..'z','_']) ) if ( (J = 1) or not(S[J-1] in ['A'..'Z','a'..'z','_']) )
and ( (J = Length(S)-5) or not(S[J+6] in and ( (J = Length(S)-5) or not(S[J+6] in
['0'..'9','A'..'Z','a'..'z','_']) ) then ['0'..'9','A'..'Z','a'..'z','_']) ) then
{$ENDIF}
begin begin
RptDetailed( 'tagmsg replaced with TMsg in line ' + Int2Str(I+1), CYAN ); RptDetailed( 'tagmsg replaced with TMsg in line ' + Int2Str(I+1), CYAN );
S := Copy( S, 1, J-1 ) + 'TMsg' + Copy( S, J+6, MaxInt ); S := Copy( S, 1, J-1 ) + 'TMsg' + Copy( S, J+6, MaxInt );
@ -18277,6 +18283,9 @@ begin
end;} end;}
inc( FormFunArrayIdx ); inc( FormFunArrayIdx );
Rpt( 'Adding Result.Form.FormExecuteCommands( @ Result.Form, ' +
'@ FormControlsArray' + IntToStr( FormFunArrayIdx ) + '[0]);' +
'// flush: ' + IntToStr( FormIndexFlush ), RED );
SL.Add( ' Result.Form.FormExecuteCommands( @ Result.Form, ' + SL.Add( ' Result.Form.FormExecuteCommands( @ Result.Form, ' +
'@ FormControlsArray' + IntToStr( FormFunArrayIdx ) + '[0]);' + '@ FormControlsArray' + IntToStr( FormFunArrayIdx ) + '[0]);' +
'// flush: ' + IntToStr( FormIndexFlush ) ); '// flush: ' + IntToStr( FormIndexFlush ) );
@ -18311,6 +18320,9 @@ begin
AL.Free; AL.Free;
END; END;
end else
begin
Rpt( 'not FileExists: ' + s, RED );
end; end;
{if CL.Count = 0 then {if CL.Count = 0 then