Browse Source

* fixed typos

peter 22 years ago
parent
commit
c97c827e09
2 changed files with 25 additions and 25 deletions
  1. 7 7
      fcl/win32/eventlog.inc
  2. 18 18
      fcl/win32/winreg.inc

+ 7 - 7
fcl/win32/eventlog.inc

@@ -4,7 +4,7 @@
     Copyright (c) 2003 by the Free Pascal development team
     Copyright (c) 2003 by the Free Pascal development team
 
 
     Win32 implementation part of event logging facility.
     Win32 implementation part of event logging facility.
-    
+
     See the file COPYING.FPC, included in this distribution,
     See the file COPYING.FPC, included in this distribution,
     for details about the copyright.
     for details about the copyright.
 
 
@@ -80,7 +80,7 @@ Const
 Var
 Var
   ELKey : String;
   ELKey : String;
   R : TRegistry;
   R : TRegistry;
-  
+
 begin
 begin
   CheckIdentification;
   CheckIdentification;
   If AFileName='' then
   If AFileName='' then
@@ -99,7 +99,7 @@ begin
       except
       except
         Result:=False;
         Result:=False;
       end
       end
-  Finally 
+  Finally
    R.Free;
    R.Free;
   end;
   end;
 end;
 end;
@@ -108,7 +108,7 @@ function TEventLog.MapTypeToCategory(EventType: TEventType): Word;
 begin
 begin
   If (EventType=ETCustom) then
   If (EventType=ETCustom) then
     DoGetCustomEventCategory(Result)
     DoGetCustomEventCategory(Result)
-  else  
+  else
     Result:=Ord(EventType);
     Result:=Ord(EventType);
   If Result=0 then
   If Result=0 then
     Result:=1;
     Result:=1;
@@ -119,12 +119,12 @@ function TEventLog.MapTypeToEventID(EventType: TEventType): DWord;
 begin
 begin
   If (EventType=ETCustom) then
   If (EventType=ETCustom) then
     DoGetCustomEventID(Result)
     DoGetCustomEventID(Result)
-  else  
+  else
     begin
     begin
     If (FEventIDOffset=0) then
     If (FEventIDOffset=0) then
       FEventIDOffset:=1000;
       FEventIDOffset:=1000;
     Result:=FEventIDOffset+Ord(EventType);
     Result:=FEventIDOffset+Ord(EventType);
-    end;  
+    end;
 end;
 end;
 
 
 function TEventLog.MapTypeToEvent(EventType: TEventType): DWord;
 function TEventLog.MapTypeToEvent(EventType: TEventType): DWord;
@@ -143,7 +143,7 @@ begin
     begin
     begin
     If CustomLogType=0 then
     If CustomLogType=0 then
       CustomLogType:=EVENTLOG_SUCCESS;
       CustomLogType:=EVENTLOG_SUCCESS;
-    Result:=CustomLogType
+    Result:=CustomLogType;
     DoGetCustomEvent(Result);
     DoGetCustomEvent(Result);
     end
     end
   else
   else

+ 18 - 18
fcl/win32/winreg.inc

@@ -31,7 +31,7 @@ end;
 function TRegistry.sysCreateKey(const Key: String): Boolean;
 function TRegistry.sysCreateKey(const Key: String): Boolean;
 Var
 Var
   P: PChar;
   P: PChar;
-  Disposition: Integer;
+  Disposition: Dword;
   Handle: HKEY;
   Handle: HKEY;
   SecurityAttributes: Pointer; //LPSECURITY_ATTRIBUTES;
   SecurityAttributes: Pointer; //LPSECURITY_ATTRIBUTES;
 
 
@@ -70,13 +70,13 @@ function TRegistry.SysGetData(const Name: String; Buffer: Pointer;
 Var
 Var
   P: PChar;
   P: PChar;
   RD : DWord;
   RD : DWord;
-  
+
 begin
 begin
   P := @Name[1];
   P := @Name[1];
   If RegQueryValueEx(fCurrentKey,P,Nil,
   If RegQueryValueEx(fCurrentKey,P,Nil,
                      @RD,Buffer,@BufSize)<>ERROR_SUCCESS Then
                      @RD,Buffer,@BufSize)<>ERROR_SUCCESS Then
     Result:=-1
     Result:=-1
-  else                  
+  else
     begin
     begin
     If (RD=REG_SZ) then
     If (RD=REG_SZ) then
       RegData:=rdString
       RegData:=rdString
@@ -87,7 +87,7 @@ begin
     else if (RD=REG_BINARY) then
     else if (RD=REG_BINARY) then
       RegData:=rdBinary
       RegData:=rdBinary
     else
     else
-      RegData:=rdUnknown;  
+      RegData:=rdUnknown;
     Result:=BufSize;
     Result:=BufSize;
     end;
     end;
 end;
 end;
@@ -149,19 +149,19 @@ begin
   SecurityAttributes := Nil;
   SecurityAttributes := Nil;
   P:=PrepKey(Key);
   P:=PrepKey(Key);
   If CanCreate then
   If CanCreate then
-    begin 
+    begin
     Handle:=0;
     Handle:=0;
     Result:=RegCreateKeyEx(GetBaseKey(RelativeKey(Key)),P,0,'',
     Result:=RegCreateKeyEx(GetBaseKey(RelativeKey(Key)),P,0,'',
-    
+
                            REG_OPTION_NON_VOLATILE,
                            REG_OPTION_NON_VOLATILE,
                            fAccess,SecurityAttributes,Handle,
                            fAccess,SecurityAttributes,Handle,
-                           @Disposition)=ERROR_SUCCESS 
-                           
+                           @Disposition)=ERROR_SUCCESS
+
     end
     end
   else
   else
     Result:=RegOpenKeyEx(GetBaseKey(RelativeKey(Key)),
     Result:=RegOpenKeyEx(GetBaseKey(RelativeKey(Key)),
                          P,0,fAccess,Handle)=ERROR_SUCCESS;
                          P,0,fAccess,Handle)=ERROR_SUCCESS;
-  If Result then 
+  If Result then
     fCurrentKey:=Handle;
     fCurrentKey:=Handle;
 end;
 end;
 
 
@@ -174,7 +174,7 @@ Var
 begin
 begin
   P:=PrepKey(Key);
   P:=PrepKey(Key);
   Result := RegOpenKeyEx(GetBaseKey(RelativeKey(Key)),P,0,KEY_READ,Handle) = 0;
   Result := RegOpenKeyEx(GetBaseKey(RelativeKey(Key)),P,0,KEY_READ,Handle) = 0;
-  If Result Then 
+  If Result Then
     fCurrentKey := Handle;
     fCurrentKey := Handle;
 end;
 end;
 
 
@@ -217,7 +217,7 @@ begin
   If (CurrentKey<>0) then
   If (CurrentKey<>0) then
     begin
     begin
     if LazyWrite then
     if LazyWrite then
-      RegCloseKey(CurrentKey) 
+      RegCloseKey(CurrentKey)
     else
     else
       RegFlushKey(CurrentKey);
       RegFlushKey(CurrentKey);
     fCurrentKey:=0;
     fCurrentKey:=0;
@@ -236,7 +236,7 @@ Var
   I: Integer;
   I: Integer;
   Info: TRegKeyInfo;
   Info: TRegKeyInfo;
   P : PChar;
   P : PChar;
-  
+
 begin
 begin
    Strings.Clear;
    Strings.Clear;
    if GetKeyInfo(Info) then
    if GetKeyInfo(Info) then
@@ -251,7 +251,7 @@ begin
          Strings.Add(StrPas(P));
          Strings.Add(StrPas(P));
          end;
          end;
      Finally
      Finally
-       FreeMem(P);    
+       FreeMem(P);
      end;
      end;
      end;
      end;
 end;
 end;
@@ -263,7 +263,7 @@ Var
   I: Integer;
   I: Integer;
   Info: TRegKeyInfo;
   Info: TRegKeyInfo;
   P : PChar;
   P : PChar;
-  
+
 begin
 begin
    Strings.Clear;
    Strings.Clear;
    if GetKeyInfo(Info) then
    if GetKeyInfo(Info) then
@@ -278,7 +278,7 @@ begin
          Strings.Add(StrPas(P));
          Strings.Add(StrPas(P));
          end;
          end;
      Finally
      Finally
-       FreeMem(P);    
+       FreeMem(P);
      end;
      end;
      end;
      end;
 
 
@@ -310,9 +310,9 @@ var
   InfoO,InfoN : TRegDataInfo;
   InfoO,InfoN : TRegDataInfo;
   D : TRegDataType;
   D : TRegDataType;
   P: PChar;
   P: PChar;
-  
+
 begin
 begin
-  If GetDataInfo(OldName,InfoO) and Not GetDataInfo(NewName,InfoN) then 
+  If GetDataInfo(OldName,InfoO) and Not GetDataInfo(NewName,InfoN) then
     begin
     begin
     L:=InfoO.DataSize;
     L:=InfoO.DataSize;
     if L>0 then
     if L>0 then
@@ -326,7 +326,7 @@ begin
         FreeMem(P);
         FreeMem(P);
       end;
       end;
       end;
       end;
-    end;  
+    end;
 end;
 end;
 
 
 procedure TRegistry.SetCurrentKey(Value: HKEY);
 procedure TRegistry.SetCurrentKey(Value: HKEY);