From: <tw...@us...> - 2020-01-01 08:13:32
|
Revision: 3016 http://sourceforge.net/p/gexperts/code/3016 Author: twm Date: 2020-01-01 08:13:20 +0000 (Wed, 01 Jan 2020) Log Message: ----------- * {$INCLUDE 'dzlibjedi.inc'} -> {$INCLUDE 'dzlib.inc'} * Fixed compile errors and warnings in Delphi 2006 (this THandle garbage is driving me crazy) Modified Paths: -------------- trunk/ExternalSource/dzlib/u_dzConvertUtils.pas trunk/ExternalSource/dzlib/u_dzFileStreams.pas trunk/ExternalSource/dzlib/u_dzGraphicsUtils.pas trunk/ExternalSource/dzlib/u_dzOsUtils.pas trunk/ExternalSource/dzlib/u_dzTypes.pas trunk/ExternalSource/dzlib/u_dzVclUtils.pas Modified: trunk/ExternalSource/dzlib/u_dzConvertUtils.pas =================================================================== --- trunk/ExternalSource/dzlib/u_dzConvertUtils.pas 2020-01-01 08:09:57 UTC (rev 3015) +++ trunk/ExternalSource/dzlib/u_dzConvertUtils.pas 2020-01-01 08:13:20 UTC (rev 3016) @@ -5,7 +5,7 @@ /// which originally was a Delphi conversion of TwmStringFunc. </summary> unit u_dzConvertUtils; -{$I dzlibjedi.inc} +{$I dzlib.inc} interface Modified: trunk/ExternalSource/dzlib/u_dzFileStreams.pas =================================================================== --- trunk/ExternalSource/dzlib/u_dzFileStreams.pas 2020-01-01 08:09:57 UTC (rev 3015) +++ trunk/ExternalSource/dzlib/u_dzFileStreams.pas 2020-01-01 08:13:20 UTC (rev 3016) @@ -249,7 +249,7 @@ {$ELSE} THandleStreamHack = class(TStream) private - FHandle: DWORD; + FHandle: Integer; end; {$ENDIF} @@ -265,6 +265,9 @@ THandleCast = Integer; {$ENDIF} +const + INVALID_HANDLE_VALUE = -1; + class procedure TdzFile.CreateReadFree(const _fn: string; var _Buffer; _Size: Integer); var Stream: TdzFile; @@ -371,7 +374,7 @@ repeat ApiHandle := Windows.CreateFile(PChar(FFilename), Access, TheShareMode, FSecurityAttributes, Disposition, FFileAttributes or FFileFlags, 0); - Result := (ApiHandle <> INVALID_HANDLE_VALUE); + Result := (ApiHandle <> THandle(INVALID_HANDLE_VALUE)); if not Result and ResetReadOnly and not TriedResetReadonly then TFileSystem.SetReadonly(FFilename, False, ehReturnFalse); until Result or TriedResetReadonly or not ResetReadOnly or not (faWrite in AccessMode) and ResetReadOnly; Modified: trunk/ExternalSource/dzlib/u_dzGraphicsUtils.pas =================================================================== --- trunk/ExternalSource/dzlib/u_dzGraphicsUtils.pas 2020-01-01 08:09:57 UTC (rev 3015) +++ trunk/ExternalSource/dzlib/u_dzGraphicsUtils.pas 2020-01-01 08:13:20 UTC (rev 3016) @@ -1,5 +1,7 @@ unit u_dzGraphicsUtils; +{$INCLUDE 'dzlib.inc'} + {.$OPTIMIZATION ON} {$IFOPT O-} // Optimization @@ -560,6 +562,7 @@ RGN := CreateRectRgn(_Rect.Left, _Rect.Top, _Rect.Right, _Rect.Bottom); if RGN = 0 then raise Exception.Create(_('CreateRectRgn failed')); + try Res := SelectClipRgn(_Canvas.Handle, RGN); if Res = Error then Modified: trunk/ExternalSource/dzlib/u_dzOsUtils.pas =================================================================== --- trunk/ExternalSource/dzlib/u_dzOsUtils.pas 2020-01-01 08:09:57 UTC (rev 3015) +++ trunk/ExternalSource/dzlib/u_dzOsUtils.pas 2020-01-01 08:13:20 UTC (rev 3016) @@ -1,6 +1,8 @@ ///<summary> This unit contains operating system dependent functions, at least some of them. </summary> unit u_dzOsUtils; +{$INCLUDE 'dzlib.inc'} + interface uses @@ -1226,6 +1228,10 @@ end; function TryGetWindowsVersionFromRegistry(out _Values: TWinCurrentRec): Boolean; +{$IF not Defined(KEY_WOW64_64KEY)} +const + KEY_WOW64_64KEY = $0100; +{$IFEND} var Reg: TRegistry; begin Modified: trunk/ExternalSource/dzlib/u_dzTypes.pas =================================================================== --- trunk/ExternalSource/dzlib/u_dzTypes.pas 2020-01-01 08:09:57 UTC (rev 3015) +++ trunk/ExternalSource/dzlib/u_dzTypes.pas 2020-01-01 08:13:20 UTC (rev 3016) @@ -1,5 +1,7 @@ unit u_dzTypes; +{$INCLUDE 'dzlib.inc'} + interface uses @@ -18,6 +20,9 @@ TSingleArray = array of Single; TDoubleArray = array of Double; TExtendedArray = array of Extended; +{$IF not Declared(TBytes)} + TBytes = array of Byte; +{$IFEND} implementation Modified: trunk/ExternalSource/dzlib/u_dzVclUtils.pas =================================================================== --- trunk/ExternalSource/dzlib/u_dzVclUtils.pas 2020-01-01 08:09:57 UTC (rev 3015) +++ trunk/ExternalSource/dzlib/u_dzVclUtils.pas 2020-01-01 08:13:20 UTC (rev 3016) @@ -2132,6 +2132,13 @@ TEditHack = class(TCustomEdit) end; +{$IF NOT Declared(ECM_FIRST)} +const + ECM_FIRST = $1500; + EM_SETCUEBANNER = ECM_FIRST + 1; + EM_GETCUEBANNER = ECM_FIRST + 2; +{$IFEND} + procedure TEdit_SetCueBanner(_ed: TCustomEdit; const _Banner: WideString); begin SendMessage(_ed.Handle, EM_SETCUEBANNER, wParam(True), LParam(PWChar(_Banner))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |