Explorar el Código

--- Merging r19899 into '.':
U utils/h2pas/h2pas.pas
U utils/h2pas/h2pas.y
--- Merging r19904 into '.':
U packages/fcl-base/src/idea.pp
--- Merging r19905 into '.':
G packages/fcl-base/src/idea.pp
--- Merging r19928 into '.':
U packages/winunits-base/src/activex.pp
--- Merging r19947 into '.':
U packages/fcl-db/src/base/db.pas
--- Merging r19954 into '.':
U packages/libc/src/libc.pp

# revisions: 19899,19904,19905,19928,19947,19954
------------------------------------------------------------------------
r19899 | florian | 2011-12-28 18:49:08 +0100 (Wed, 28 Dec 2011) | 1 line
Changed paths:
M /trunk/utils/h2pas/h2pas.pas
M /trunk/utils/h2pas/h2pas.y

* translate short int into cshort, patch by barlone, resolves #20956
------------------------------------------------------------------------
------------------------------------------------------------------------
r19904 | michael | 2011-12-29 12:48:38 +0100 (Thu, 29 Dec 2011) | 1 line
Changed paths:
M /trunk/packages/fcl-base/src/idea.pp

* Make sure key is zero-padded if seed is smaller than key length (bug 20949, patch from Ilya Melnikov)
------------------------------------------------------------------------
------------------------------------------------------------------------
r19905 | michael | 2011-12-29 12:50:12 +0100 (Thu, 29 Dec 2011) | 1 line
Changed paths:
M /trunk/packages/fcl-base/src/idea.pp

* Patch from Ilya Melnikov to change var to out params (bug 20949)
------------------------------------------------------------------------
------------------------------------------------------------------------
r19928 | marco | 2011-12-30 17:25:51 +0100 (Fri, 30 Dec 2011) | 2 lines
Changed paths:
M /trunk/packages/winunits-base/src/activex.pp

* interface function declarations had no stdcall modifier, patch by Ludo #20987

------------------------------------------------------------------------
------------------------------------------------------------------------
r19947 | marco | 2012-01-02 00:54:07 +0100 (Mon, 02 Jan 2012) | 2 lines
Changed paths:
M /trunk/packages/fcl-db/src/base/db.pas

* Fixed typo reported on the maillist.

------------------------------------------------------------------------
------------------------------------------------------------------------
r19954 | marco | 2012-01-02 19:27:45 +0100 (Mon, 02 Jan 2012) | 2 lines
Changed paths:
M /trunk/packages/libc/src/libc.pp

* adding deprecated warning to libc to promote migration to portable units. Not related to short term removal of the unit.

------------------------------------------------------------------------

git-svn-id: branches/fixes_2_6@20022 -

marco hace 13 años
padre
commit
128f90c49a

+ 9 - 8
packages/fcl-base/src/idea.pp

@@ -64,9 +64,9 @@ TYPE
   IdeaCryptKey = TIdeaCryptKey;
   IdeaCryptData = TIdeaCryptData;
   
-PROCEDURE EnKeyIdea(UserKey: TIdeacryptkey; VAR z: TIDEAKey);
-PROCEDURE DeKeyIdea(z: TIDEAKey; VAR dk: TIDEAKey);
-PROCEDURE CipherIdea(Input: TIDEACryptData; VAR outdata: TIDEACryptData; z: TIDEAKey);
+PROCEDURE EnKeyIdea(UserKey: TIdeacryptkey; OUT z: TIDEAKey);
+PROCEDURE DeKeyIdea(z: TIDEAKey; OUT dk: TIDEAKey);
+PROCEDURE CipherIdea(Input: TIDEACryptData; OUT outdata: TIDEACryptData; z: TIDEAKey);
 
 Type
   EIDEAError = Class(EStreamError);
@@ -82,7 +82,7 @@ Type
   Protected
     function GetPosition: Int64; override;
     procedure InvalidSeek; override;
-    Procedure CreateCryptKey(Const S : String; Var Key : TIDEACryptKey);
+    Procedure CreateCryptKey(Const S : String; Out Key : TIDEACryptKey);
   Public
     Constructor Create(AKey : TIDEAKey; Dest: TStream); overload;
     Property Key : TIDEAKey Read FKey;
@@ -157,7 +157,7 @@ BEGIN
   inv := word(1-t1);
 END;
 
-PROCEDURE EnKeyIdea(userkey: ideacryptkey; VAR z: ideakey);
+PROCEDURE EnKeyIdea(userkey: ideacryptkey; OUT z: ideakey);
 VAR zi,i,j: integer;
 BEGIN
   FOR j := 0 TO 7 DO z[j] := userkey[j];
@@ -172,7 +172,7 @@ BEGIN
   FOR i := 0 TO 7 DO userkey[i] := 0;
 END;
 
-PROCEDURE DeKeyIdea(z: IDEAKey; VAR dk: ideakey);
+PROCEDURE DeKeyIdea(z: IDEAKey; OUT dk: ideakey);
 VAR j: Integer;
     t1,t2,t3: Word;
     p: IDEAKey;
@@ -218,7 +218,7 @@ BEGIN
   FOR j := 0 TO 51 DO z[j] := 0;
 END;
 
-PROCEDURE CipherIdea(input: ideacryptdata; VAR outdata: ideacryptdata; z:IDEAkey);
+PROCEDURE CipherIdea(input: ideacryptdata; OUT outdata: ideacryptdata; z:IDEAkey);
 VAR x1, x2, x3, x4, t1, t2: Word;
     r: Integer;
     zi: Integer;
@@ -278,7 +278,7 @@ begin
   Raise EIDEAError.Create(SNoSeekAllowed);
 end;
 
-procedure TIDEAStream.CreateCryptKey(const S: String; var Key: TIDEACryptKey);
+procedure TIDEAStream.CreateCryptKey(const S: String; out Key: TIDEACryptKey);
 
 Var
   KLen : Integer;
@@ -289,6 +289,7 @@ begin
     Raise EIDEAError.Create(SErrEmptyKey);
   If (Length(S)>SizeOf(Key)) then
     KLen:=SizeOf(Key);
+  FillChar(Key,SizeOf(Key),0);
   Move(S[1],Key,KLen);
 end;
 

+ 1 - 1
packages/fcl-db/src/base/db.pas

@@ -91,7 +91,7 @@ type
     Destructor Destroy; override;
     property Context : String read FContext;
     property ErrorCode : integer read FErrorcode;
-    property OriginalExcaption : Exception read FOriginalException;
+    property OriginalException : Exception read FOriginalException;
     property PreviousError : Integer read FPreviousError;
   end;
   

+ 1 - 1
packages/libc/src/libc.pp

@@ -6,7 +6,7 @@
   {$error The KernelDefs unit is a legacy Kylix-compatibility unit that is only supported on Linux/i386. It is known not to work in various ways on other OSes and architectures (including Linux/x86_64). }
 {$endif}
 
-unit libc;
+unit libc deprecated 'Unportable Kylix legacy unit that only exists on Linux/x86. see http://wiki.freepascal.org/libc_unit ';
 
 Interface
 

+ 8 - 8
packages/winunits-base/src/activex.pp

@@ -3333,9 +3333,9 @@ type
 
    IOleInPlaceSite = interface(IOleWindow)
       ['{00000119-0000-0000-C000-000000000046}']
-      function CanInPlaceActivate : HResult;
-      function OnInPlaceActivate : HResult;
-      function OnUIActivate : HResult;
+      function CanInPlaceActivate : HResult;stdcall;
+      function OnInPlaceActivate : HResult;stdcall;
+      function OnUIActivate : HResult;stdcall;
       function GetWindowContext(out ppframe:IOleInPlaceFrame;out ppdoc:IOleInPlaceUIWindow;lprcposrect:LPRECT;lprccliprect:LPRECT;lpframeinfo:LPOLEINPLACEFRAMEINFO):hresult; stdcall;
       function Scroll(scrollExtant:TSIZE):hresult; stdcall;
       function OnUIDeactivate(fUndoable:BOOL):hresult; stdcall;
@@ -3347,10 +3347,10 @@ type
 
     IOleInPlaceObject = interface(IOleWindow)
       ['{00000113-0000-0000-C000-000000000046}']
-      function InPlaceDeactivate : HResult;
-      function UIDeactivate : HResult;
+      function InPlaceDeactivate : HResult;stdcall;
+      function UIDeactivate : HResult;stdcall;
       function SetObjectRects(lprcPosRect:LPRect;lprcClipRect:LPRect):hresult; stdcall;
-      function ReactivateAndUndo : HResult;
+      function ReactivateAndUndo : HResult;stdcall;
      end;
 
     IOleDocumentView = interface(IUnknown)
@@ -3362,12 +3362,12 @@ type
         function Getrect(prcView:LPRect):hresult; stdcall;
         function SetRectComplex(prcview:LPRect;prcHScroll:LPRect;prcVScroll:LPRect;prcSizeBox:LPRect):hresult; stdcall;
         function Show(fshow:Bool) :hresult; stdcall;
-        function UIActivate(fUIActive :BOOL): HResult;
+        function UIActivate(fUIActive :BOOL): HResult;stdcall;
         function Open :hresult; stdcall;
         function Closeview(dwreserved:DWORD):hresult; stdcall;
         function SaveViewState(pstm:IStream):hresult; stdcall;
         function ApplyViewState(pstm:IStream):hresult; stdcall;
-        function Clone(pipsitenew: IOleInPlaceSite;out ppviewNew:IOleDocumentView):HResult;
+        function Clone(pipsitenew: IOleInPlaceSite;out ppviewNew:IOleDocumentView):HResult;stdcall;
         end;
 
     IEnumOleDocumentViews = Interface(IUnknown)

+ 2 - 2
utils/h2pas/h2pas.pas

@@ -657,7 +657,7 @@ program h2pas;
                    write(outfile,'args:array of const');
                    (* if variable number of args we must allways pop *)
                    no_pop:=false;
-                   (* Needs 2 declarations, also one without args, because
+                   (* Needs 2 declarations, also one without args, becuase
                       in C you can omit the second parameter. Default parameter
                       doesn't help as that isn't possible with array of const *)
                    NeedEllipsisOverload:=true;
@@ -2535,7 +2535,7 @@ begin
   73 : begin
          
          if UseCTypesUnit then
-         yyval:=new(presobject,init_id(csint_STR))
+         yyval:=new(presobject,init_id(cshort_STR))
          else
          yyval:=new(presobject,init_intid(SMALL_STR));
          

+ 1 - 1
utils/h2pas/h2pas.y

@@ -2431,7 +2431,7 @@ special_type_name :
      SHORT INT
      {
      if UseCTypesUnit then
-       $$:=new(presobject,init_id(csint_STR))
+       $$:=new(presobject,init_id(cshort_STR))
      else
        $$:=new(presobject,init_intid(SMALL_STR));
      } |