From c97c827e0966321e8da491c6efa31e36f68c37fc Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 1 Apr 2003 15:56:58 +0000 Subject: [PATCH] * fixed typos --- fcl/win32/eventlog.inc | 14 +++++++------- fcl/win32/winreg.inc | 36 ++++++++++++++++++------------------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/fcl/win32/eventlog.inc b/fcl/win32/eventlog.inc index e35f885492..1d31a63cb3 100644 --- a/fcl/win32/eventlog.inc +++ b/fcl/win32/eventlog.inc @@ -4,7 +4,7 @@ Copyright (c) 2003 by the Free Pascal development team Win32 implementation part of event logging facility. - + See the file COPYING.FPC, included in this distribution, for details about the copyright. @@ -80,7 +80,7 @@ Const Var ELKey : String; R : TRegistry; - + begin CheckIdentification; If AFileName='' then @@ -99,7 +99,7 @@ begin except Result:=False; end - Finally + Finally R.Free; end; end; @@ -108,7 +108,7 @@ function TEventLog.MapTypeToCategory(EventType: TEventType): Word; begin If (EventType=ETCustom) then DoGetCustomEventCategory(Result) - else + else Result:=Ord(EventType); If Result=0 then Result:=1; @@ -119,12 +119,12 @@ function TEventLog.MapTypeToEventID(EventType: TEventType): DWord; begin If (EventType=ETCustom) then DoGetCustomEventID(Result) - else + else begin If (FEventIDOffset=0) then FEventIDOffset:=1000; Result:=FEventIDOffset+Ord(EventType); - end; + end; end; function TEventLog.MapTypeToEvent(EventType: TEventType): DWord; @@ -143,7 +143,7 @@ begin begin If CustomLogType=0 then CustomLogType:=EVENTLOG_SUCCESS; - Result:=CustomLogType + Result:=CustomLogType; DoGetCustomEvent(Result); end else diff --git a/fcl/win32/winreg.inc b/fcl/win32/winreg.inc index 2c1895ea5d..f95b7436b0 100644 --- a/fcl/win32/winreg.inc +++ b/fcl/win32/winreg.inc @@ -31,7 +31,7 @@ end; function TRegistry.sysCreateKey(const Key: String): Boolean; Var P: PChar; - Disposition: Integer; + Disposition: Dword; Handle: HKEY; SecurityAttributes: Pointer; //LPSECURITY_ATTRIBUTES; @@ -70,13 +70,13 @@ function TRegistry.SysGetData(const Name: String; Buffer: Pointer; Var P: PChar; RD : DWord; - + begin P := @Name[1]; If RegQueryValueEx(fCurrentKey,P,Nil, @RD,Buffer,@BufSize)<>ERROR_SUCCESS Then Result:=-1 - else + else begin If (RD=REG_SZ) then RegData:=rdString @@ -87,7 +87,7 @@ begin else if (RD=REG_BINARY) then RegData:=rdBinary else - RegData:=rdUnknown; + RegData:=rdUnknown; Result:=BufSize; end; end; @@ -149,19 +149,19 @@ begin SecurityAttributes := Nil; P:=PrepKey(Key); If CanCreate then - begin + begin Handle:=0; Result:=RegCreateKeyEx(GetBaseKey(RelativeKey(Key)),P,0,'', - + REG_OPTION_NON_VOLATILE, fAccess,SecurityAttributes,Handle, - @Disposition)=ERROR_SUCCESS - + @Disposition)=ERROR_SUCCESS + end else Result:=RegOpenKeyEx(GetBaseKey(RelativeKey(Key)), P,0,fAccess,Handle)=ERROR_SUCCESS; - If Result then + If Result then fCurrentKey:=Handle; end; @@ -174,7 +174,7 @@ Var begin P:=PrepKey(Key); Result := RegOpenKeyEx(GetBaseKey(RelativeKey(Key)),P,0,KEY_READ,Handle) = 0; - If Result Then + If Result Then fCurrentKey := Handle; end; @@ -217,7 +217,7 @@ begin If (CurrentKey<>0) then begin if LazyWrite then - RegCloseKey(CurrentKey) + RegCloseKey(CurrentKey) else RegFlushKey(CurrentKey); fCurrentKey:=0; @@ -236,7 +236,7 @@ Var I: Integer; Info: TRegKeyInfo; P : PChar; - + begin Strings.Clear; if GetKeyInfo(Info) then @@ -251,7 +251,7 @@ begin Strings.Add(StrPas(P)); end; Finally - FreeMem(P); + FreeMem(P); end; end; end; @@ -263,7 +263,7 @@ Var I: Integer; Info: TRegKeyInfo; P : PChar; - + begin Strings.Clear; if GetKeyInfo(Info) then @@ -278,7 +278,7 @@ begin Strings.Add(StrPas(P)); end; Finally - FreeMem(P); + FreeMem(P); end; end; @@ -310,9 +310,9 @@ var InfoO,InfoN : TRegDataInfo; D : TRegDataType; P: PChar; - + begin - If GetDataInfo(OldName,InfoO) and Not GetDataInfo(NewName,InfoN) then + If GetDataInfo(OldName,InfoO) and Not GetDataInfo(NewName,InfoN) then begin L:=InfoO.DataSize; if L>0 then @@ -326,7 +326,7 @@ begin FreeMem(P); end; end; - end; + end; end; procedure TRegistry.SetCurrentKey(Value: HKEY);