Browse Source

* fixes for delphi mode

nils 22 years ago
parent
commit
5bde2bc849
35 changed files with 804 additions and 398 deletions
  1. 22 16
      packages/extra/amunits/units/amigados.pas
  2. 8 2
      packages/extra/amunits/units/amigaguide.pas
  3. 25 18
      packages/extra/amunits/units/asl.pas
  4. 11 2
      packages/extra/amunits/units/audio.pas
  5. 6 2
      packages/extra/amunits/units/bullet.pas
  6. 8 2
      packages/extra/amunits/units/colorwheel.pas
  7. 11 4
      packages/extra/amunits/units/commodities.pas
  8. 21 15
      packages/extra/amunits/units/conunit.pas
  9. 12 5
      packages/extra/amunits/units/datatypes.pas
  10. 8 2
      packages/extra/amunits/units/diskfont.pas
  11. 20 12
      packages/extra/amunits/units/exec.pp
  12. 4 1
      packages/extra/amunits/units/expansion.pas
  13. 11 4
      packages/extra/amunits/units/gadtools.pas
  14. 72 65
      packages/extra/amunits/units/graphics.pas
  15. 2 2
      packages/extra/amunits/units/hardware.pas
  16. 12 6
      packages/extra/amunits/units/icon.pas
  17. 8 2
      packages/extra/amunits/units/iffparse.pas
  18. 3 3
      packages/extra/amunits/units/inputevent.pas
  19. 79 73
      packages/extra/amunits/units/intuition.pas
  20. 7 3
      packages/extra/amunits/units/keymap.pas
  21. 11 4
      packages/extra/amunits/units/layers.pas
  22. 8 2
      packages/extra/amunits/units/locale.pas
  23. 95 33
      packages/extra/amunits/units/lowlevel.pas
  24. 79 21
      packages/extra/amunits/units/nonvolatile.pas
  25. 10 4
      packages/extra/amunits/units/prefs.pas
  26. 83 24
      packages/extra/amunits/units/realtime.pas
  27. 16 9
      packages/extra/amunits/units/rexx.pas
  28. 68 13
      packages/extra/amunits/units/translator.pas
  29. 14 7
      packages/extra/amunits/units/workbench.pas
  30. 20 14
      packages/extra/amunits/utilunits/consoleio.pas
  31. 8 2
      packages/extra/amunits/utilunits/doublebuffer.pas
  32. 12 5
      packages/extra/amunits/utilunits/pcq.pas
  33. 13 8
      packages/extra/amunits/utilunits/systemvartags.pas
  34. 5 7
      packages/extra/amunits/utilunits/tagsarray.pas
  35. 12 6
      packages/extra/amunits/utilunits/wbargs.pas

+ 22 - 16
packages/extra/amunits/units/amigados.pas

@@ -38,6 +38,9 @@
     Added some const.
     26 Jan 2003.
     
+    Changed integer > smallint.
+    09 Feb 2003.
+    
     [email protected]
 }
 
@@ -401,7 +404,7 @@ Type
 
        pAnchorPath = ^tAnchorPath;
        tAnchorPath = record
-        case integer of
+        case smallint of
         0 : (
         ap_First      : pAChain;
         ap_Last       : pAChain;
@@ -413,7 +416,7 @@ Type
         ap_FoundBreak : Longint;    { Bits we broke on. Also returns ERROR_BREAK }
         ap_Flags      : Shortint;       { New use for extra Integer. }
         ap_Reserved   : Shortint;
-        ap_Strlen     : Integer;       { This is what ap_Length used to be }
+        ap_Strlen     : smallint;       { This is what ap_Length used to be }
         ap_Info       : tFileInfoBlock;
         ap_Buf        : Array[0..0] of Char;     { Buffer for path name, allocated by user !! }
         { FIX! }
@@ -537,13 +540,13 @@ Type
 
 { All DOS processes have this structure }
 { Create and Device Proc returns pointer to the MsgPort in this structure }
-{ dev_proc = Address(Integer(DeviceProc()) - SizeOf(Task)) }
+{ dev_proc = Address(smallint(DeviceProc()) - SizeOf(Task)) }
 
     pProcess = ^tProcess;
     tProcess = record
         pr_Task         : tTask;
         pr_MsgPort      : tMsgPort;     { This is BPTR address from DOS functions  }
-        pr_Pad          : Integer;         { Remaining variables on 4 byte boundaries }
+        pr_Pad          : smallint;         { Remaining variables on 4 byte boundaries }
         pr_SegList      : BPTR;         { Array of seg lists used by this process  }
         pr_StackSize    : Longint;      { Size of process stack in bytes            }
         pr_GlobVec      : Pointer;      { Global vector for this process (BCPL)    }
@@ -588,7 +591,7 @@ CONST
  PRF_FREEARGS          =  32;
 
 
-{ The long Integer address (BPTR) of this structure is returned by
+{ The long smallint address (BPTR) of this structure is returned by
  * Open() and other routines that return a file.  You need only worry
  * about this struct to do async io's via PutMsg() instead of
  * standard file system calls }
@@ -618,7 +621,7 @@ Type
         dp_Link : pMessage;     { EXEC message        }
         dp_Port : pMsgPort;     { Reply port for the packet }
                                 { Must be filled in each send. }
-        case integer of
+        case smallint of
         0 : (
         dp_Action : Longint;
         dp_Status : Longint;
@@ -797,7 +800,7 @@ CONST
 Type
     pDosInfo = ^tDosInfo;
     tDosInfo = record
-        case integer of
+        case smallint of
         0 : (
         di_ResList : BPTR;
         );
@@ -922,7 +925,7 @@ Type
     dol_Type            : Longint;        {    see DLT below }
     dol_Task            : pMsgPort;       {    ptr to handler task }
     dol_Lock            : BPTR;
-    case integer of
+    case smallint of
     0 : (
         dol_Handler : record
           dol_Handler    : BSTR;      {    file name to load IF seglist is null }
@@ -1132,7 +1135,7 @@ Type
                                         * 0X444F5300 is old filesystem,
                                         * 0X444F5301 is fast file system }
         de_Baud           : ULONG;      {     Baud rate for serial handler }
-        de_Control        : ULONG;      {     Control Integer for handler/filesystem }
+        de_Control        : ULONG;      {     Control smallint for handler/filesystem }
         de_BootBlocks     : ULONG;      {     Number of blocks containing boot code }
     end;
 
@@ -1162,7 +1165,7 @@ Const
                                  * 0X444F5300 is old filesystem,
                                  * 0X444F5301 is fast file system }
     DE_BAUD             = 17;   {     Baud rate for serial handler }
-    DE_CONTROL          = 18;   {     Control Integer for handler/filesystem }
+    DE_CONTROL          = 18;   {     Control smallint for handler/filesystem }
     DE_BOOTBLOCKS       = 19;   {     Number of blocks containing boot code }
 
 
@@ -1238,7 +1241,7 @@ Type
             nr_UserData : ULONG;
             nr_Flags : ULONG;
             nr_stuff : record
-                case integer of
+                case smallint of
                    0 : ( nr_Msg : record
                         nr_Port : pMsgPort;
                      end );
@@ -1720,7 +1723,7 @@ FUNCTION SetPrompt(const name : pCHAR) : BOOLEAN;
 FUNCTION SetProtection(const name : pCHAR; protect : LONGINT) : BOOLEAN;
 FUNCTION SetVar(const name : pCHAR; buffer : pCHAR; size : LONGINT; flags : LONGINT) : BOOLEAN;
 FUNCTION SetVBuf(fh : LONGINT; buff : pCHAR; type_ : LONGINT; size : LONGINT) : BOOLEAN;
-FUNCTION SplitName(const name : pCHAR; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : INTEGER;
+FUNCTION SplitName(const name : pCHAR; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : smallint;
 FUNCTION StartNotify(notify : pNotifyRequest) : BOOLEAN;
 FUNCTION StrToDate(datetime : pDateTime) : BOOLEAN;
 FUNCTION StrToLong(const string_ : pCHAR; VAR value : LONGINT) : LONGINT;
@@ -1817,7 +1820,7 @@ FUNCTION SetProgramName(const name : string) : BOOLEAN;
 FUNCTION SetPrompt(const name : string) : BOOLEAN;
 FUNCTION SetProtection(const name : string; protect : LONGINT) : BOOLEAN;
 FUNCTION SetVar(const name : string; buffer : pCHAR; size : LONGINT; flags : LONGINT) : BOOLEAN;
-FUNCTION SplitName(const name : string; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : INTEGER;
+FUNCTION SplitName(const name : string; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : smallint;
 FUNCTION StrToLong(const string_ : string; VAR value : LONGINT) : LONGINT;
 FUNCTION SystemTagList(const command : string;const tags : pTagItem) : LONGINT;
 FUNCTION DOSSystem(const command : string;const tags : pTagItem) : LONGINT;
@@ -3884,7 +3887,7 @@ BEGIN
   END;
 END;
 
-FUNCTION SplitName(const name : pCHAR; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : INTEGER;
+FUNCTION SplitName(const name : pCHAR; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : smallint;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -4493,7 +4496,7 @@ begin
      SetVar := SetVar(pas2c(name),buffer,size,flags);
 end;
 
-FUNCTION SplitName(const name : string; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : INTEGER;
+FUNCTION SplitName(const name : string; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : smallint;
 begin
      SplitName := SplitName(pas2c(name), seperator,buf,oldpos,size);
 end;
@@ -4518,7 +4521,10 @@ END. (* UNIT DOS *)
 
 {
    $Log$
-   Revision 1.6  2003-02-07 20:45:08  nils
+   Revision 1.7  2003-02-10 17:59:46  nils
+   *  fixes for delphi mode
+   
+   Revision 1.6  2003/02/07 20:45:08  nils
    * update for amigaos 3.9
    
    Revision 1.5  2003/01/13 18:14:56  nils

+ 8 - 2
packages/extra/amunits/units/amigaguide.pas

@@ -30,6 +30,9 @@
     Added a const and a member to record tXRef;
     Changed startupcode for library.
     26 Jan 2003.
+    
+    Changed cardinal to longword.
+    09 Feb 2003.
 
     [email protected]
 }
@@ -512,7 +515,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 {$ifdef use_init_openlib}
   {$Info Compiling initopening of amigaguide.library}
@@ -595,7 +598,10 @@ END. (* UNIT AMIGAGUIDE *)
 
 {
    $Log$
-   Revision 1.4  2003-02-07 20:48:36  nils
+   Revision 1.5  2003-02-10 17:59:46  nils
+   *  fixes for delphi mode
+   
+   Revision 1.4  2003/02/07 20:48:36  nils
    * update for amigaos 3.9
    
    * changed startcode for library

+ 25 - 18
packages/extra/amunits/units/asl.pas

@@ -42,6 +42,10 @@
     Changed start code for library.
     25 Jan 2003.
 
+    Changed integer > smallint.
+            cardinal > longword.
+    09 Feb 2003.
+    
     [email protected]
 }
 
@@ -86,10 +90,10 @@ Type
            rf_File        : STRPTR;        { Filename pointer             }
            rf_Dir         : STRPTR;        { Directory name pointer       }
            rf_Reserved1   : Array[0..9] Of Byte;
-           rf_LeftEdge    : Integer;
-           rf_TopEdge     : Integer;          { Preferred window pos }
-           rf_Width       : Integer;
-           rf_Height      : Integer;          { Preferred window size  }
+           rf_LeftEdge    : smallint;
+           rf_TopEdge     : smallint;          { Preferred window pos }
+           rf_Width       : smallint;
+           rf_Height      : smallint;          { Preferred window size  }
            rf_Reserved2   : Array[0..1] Of Byte;
            rf_NumArgs     : LongInt;       { A-la WB Args, FOR multiselects }
            rf_ArgList     : pWBArgList;
@@ -213,10 +217,10 @@ Type
        fo_DrawMode         : Byte;                 { Returned drawing mode            }
        fo_Reserved1        : Byte;
        fo_UserData         : Pointer;              { You can store your own data here }
-       fo_LeftEdge         : Integer;                 { Coordinates Of requester on Exit }
-       fo_TopEdge          : Integer;
-       fo_Width            : Integer;
-       fo_Height           : Integer;
+       fo_LeftEdge         : smallint;                 { Coordinates Of requester on Exit }
+       fo_TopEdge          : smallint;
+       fo_Width            : smallint;
+       fo_Height           : smallint;
        fo_TAttr            : tTTextAttr;           { Returned TTextAttr               }
     end;
 
@@ -322,16 +326,16 @@ Type
     sm_BitMapWidth      : ULONG;    { Used TO create your own BitMap   }
     sm_BitMapHeight     : ULONG;
 
-    sm_LeftEdge         : Integer;     { Coordinates OF requester on Exit }
-    sm_TopEdge          : Integer;
-    sm_Width            : Integer;
-    sm_Height           : Integer;
+    sm_LeftEdge         : smallint;     { Coordinates OF requester on Exit }
+    sm_TopEdge          : smallint;
+    sm_Width            : smallint;
+    sm_Height           : smallint;
 
     sm_InfoOpened       : Boolean;  { Info window opened on exit?      }
-    sm_InfoLeftEdge     : Integer;     { Last coordinates OF Info window  }
-    sm_InfoTopEdge      : Integer;
-    sm_InfoWidth        : Integer;
-    sm_InfoHeight       : Integer;
+    sm_InfoLeftEdge     : smallint;     { Last coordinates OF Info window  }
+    sm_InfoTopEdge      : smallint;
+    sm_InfoWidth        : smallint;
+    sm_InfoHeight       : smallint;
 
     sm_UserData         : Pointer;     { You can store your own data here }
  END;
@@ -679,7 +683,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 {$ifdef use_init_openlib}
   {$Info Compiling initopening of asl.library}
@@ -761,7 +765,10 @@ END. (* UNIT ASL *)
 
 {
   $Log$
-  Revision 1.4  2003-02-07 20:48:36  nils
+  Revision 1.5  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.4  2003/02/07 20:48:36  nils
   * update for amigaos 3.9
 
   * changed startcode for library

+ 11 - 2
packages/extra/amunits/units/audio.pas

@@ -2,7 +2,7 @@
     This file is part of the Free Pascal run time library.
 
     A file in Amiga system run time library.
-    Copyright (c) 1998 by Nils Sjoholm
+    Copyright (c) 1998-2003 by Nils Sjoholm
     member of the Amiga RTL development team.
 
     See the file COPYING.FPC, included in this distribution,
@@ -14,6 +14,15 @@
 
  **********************************************************************}
 
+{
+    History:
+    
+    Changed integer > smallint.
+    09 Feb 2003.
+
+    [email protected]
+}
+    
 unit audio;
 
 INTERFACE
@@ -56,7 +65,7 @@ type
     pIOAudio = ^tIOAudio;
     tIOAudio = record
         ioa_Request     : tIORequest;
-        ioa_AllocKey    : Integer;
+        ioa_AllocKey    : smallint;
         ioa_Data        : Pointer;
         ioa_Length      : ULONG;
         ioa_Period      : Word;

+ 6 - 2
packages/extra/amunits/units/bullet.pas

@@ -25,6 +25,10 @@
     Changed startcode for library.
     1 Feb 2003.
     
+    Changed integer > smallint,
+            cardinal > longword.
+    09 Feb 2003.
+
     [email protected] Nils Sjoholm
 }
 
@@ -65,7 +69,7 @@ type
     glm_X0,                     { approximation of XOrigin in whole pixels }
     glm_Y0,                     { approximation of YOrigin in whole pixels }
     glm_X1,                     { approximation of XOrigin + Width }
-    glm_Y1          : Integer;  { approximation of YOrigin + Width }
+    glm_Y1          : smallint;  { approximation of YOrigin + Width }
     glm_Width       : FIXED;    { character advance, as fraction of em width }
     glm_BitMap      : Pointer;  { actual glyph bitmap }
  end;
@@ -468,7 +472,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 {$ifdef use_init_openlib}
   {$Info Compiling initopening of bullet.library}

+ 8 - 2
packages/extra/amunits/units/colorwheel.pas

@@ -21,6 +21,9 @@
     of the library.
     13 Jan 2003.
 
+    Changed cardinal > longword.
+    09 Feb 2003.
+    
     [email protected] Nils Sjoholm
 }
 
@@ -132,7 +135,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 begin
     ColorWheelBase := nil;
@@ -158,7 +161,10 @@ END. (* UNIT COLORWHEEL *)
 
 {
   $Log$
-  Revision 1.3  2003-01-14 18:46:04  nils
+  Revision 1.4  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.3  2003/01/14 18:46:04  nils
   * added defines use_amia_smartlink and use_auto_openlib
 
   * implemented autoopening of library

+ 11 - 4
packages/extra/amunits/units/commodities.pas

@@ -24,6 +24,10 @@
     of the library.
     13 Jan 2003.
     
+    changed integer > smallint,
+            cardinal > longword.
+    09 Feb 2003.
+    
     [email protected]
 }
 
@@ -67,11 +71,11 @@ Type
    nb_Title,
    nb_Descr     : STRPTR;
    nb_Unique,
-   nb_Flags     : Integer;
+   nb_Flags     : smallint;
    nb_Pri       : Shortint;
    {     new in V5   }
    nb_Port      : pMsgPort;
-   nb_ReservedChannel  : Integer;  {     plans for later port sharing     }
+   nb_ReservedChannel  : smallint;  {     plans for later port sharing     }
   END;
 
 CONST
@@ -621,7 +625,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 begin
     CxBase := nil;
@@ -647,7 +651,10 @@ END. (* UNIT COMMODITIES *)
 
 {
   $Log$
-  Revision 1.3  2003-01-14 18:46:04  nils
+  Revision 1.4  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.3  2003/01/14 18:46:04  nils
   * added defines use_amia_smartlink and use_auto_openlib
 
   * implemented autoopening of library

+ 21 - 15
packages/extra/amunits/units/conunit.pas

@@ -13,7 +13,13 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
  **********************************************************************}
-
+{
+    History:
+    
+    Changed integer > smallint.
+    09 Feb 2003.
+}
+    
 unit conunit;
 
 INTERFACE
@@ -48,20 +54,20 @@ type
         cu_MP   : tMsgPort;
         { ---- read only variables }
         cu_Window       : Pointer;      { (WindowPtr) intuition window bound to this unit }
-        cu_XCP          : Integer;        { character position }
-        cu_YCP          : Integer;
-        cu_XMax         : Integer;        { max character position }
-        cu_YMax         : Integer;
-        cu_XRSize       : Integer;        { character raster size }
-        cu_YRSize       : Integer;
-        cu_XROrigin     : Integer;        { raster origin }
-        cu_YROrigin     : Integer;
-        cu_XRExtant     : Integer;        { raster maxima }
-        cu_YRExtant     : Integer;
-        cu_XMinShrink   : Integer;        { smallest area intact from resize process }
-        cu_YMinShrink   : Integer;
-        cu_XCCP         : Integer;        { cursor position }
-        cu_YCCP         : Integer;
+        cu_XCP          : smallint;        { character position }
+        cu_YCP          : smallint;
+        cu_XMax         : smallint;        { max character position }
+        cu_YMax         : smallint;
+        cu_XRSize       : smallint;        { character raster size }
+        cu_YRSize       : smallint;
+        cu_XROrigin     : smallint;        { raster origin }
+        cu_YROrigin     : smallint;
+        cu_XRExtant     : smallint;        { raster maxima }
+        cu_YRExtant     : smallint;
+        cu_XMinShrink   : smallint;        { smallest area intact from resize process }
+        cu_YMinShrink   : smallint;
+        cu_XCCP         : smallint;        { cursor position }
+        cu_YCCP         : smallint;
 
    { ---- read/write variables (writes must must be protected) }
    { ---- storage for AskKeyMap and SetKeyMap }

+ 12 - 5
packages/extra/amunits/units/datatypes.pas

@@ -39,6 +39,10 @@
     Changed startcode for library.
     28 Jan 2003.
 
+    Changed integer > smallint,
+            cardinal > longword.
+    09 Feb 2003.
+    	    
     [email protected]
 }
 
@@ -73,7 +77,7 @@ Type
     dth_GroupID,                                      { Group that the DataType is in }
     dth_ID   : ULONG;                                 { ID for DataType (same as IFF FORM type) }
     dth_MaskLen,                                      { Length of comparision mask }
-    dth_Pad   : Integer;                              { Unused at present (must be 0) }
+    dth_Pad   : smallint;                              { Unused at present (must be 0) }
     dth_Flags,                                        { Flags }
     dth_Priority  : WORD;                             { Priority }
  end;
@@ -830,7 +834,7 @@ Type
     bmh_Width,                         { Width in pixels }
     bmh_Height   : Word;               { Height in pixels }
     bmh_Left,                          { Left position }
-    bmh_Top      : Integer;            { Top position }
+    bmh_Top      : smallint;            { Top position }
     bmh_Depth,                         { Number of planes }
     bmh_Masking,                       { Masking type }
     bmh_Compression,                   { Compression type }
@@ -839,7 +843,7 @@ Type
     bmh_XAspect,
     bmh_YAspect     : Byte;
     bmh_PageWidth,
-    bmh_PageHeight  : Integer;
+    bmh_PageHeight  : smallint;
  end;
 
 {***************************************************************************}
@@ -1564,7 +1568,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 {$ifdef use_init_openlib}
   {$Info Compiling initopening of datatypes.library}
@@ -1647,7 +1651,10 @@ END. (* UNIT DATATYPES *)
 
 {
   $Log$
-  Revision 1.4  2003-02-07 20:48:36  nils
+  Revision 1.5  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.4  2003/02/07 20:48:36  nils
   * update for amigaos 3.9
 
   * changed startcode for library

+ 8 - 2
packages/extra/amunits/units/diskfont.pas

@@ -29,6 +29,9 @@
     Changed startup for library.
     01 Feb 2003.
 
+    Changed cardinal > longword.
+    09 Feb 2003.
+    
     [email protected] Nils Sjoholm
 }
 
@@ -259,7 +262,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 {$ifdef use_init_openlib}
   {$Info Compiling initopening of diskfont.library}
@@ -341,7 +344,10 @@ END. (* UNIT DISKFONT *)
 
 {
   $Log$
-  Revision 1.4  2003-02-07 20:48:36  nils
+  Revision 1.5  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.4  2003/02/07 20:48:36  nils
   * update for amigaos 3.9
 
   * changed startcode for library

+ 20 - 12
packages/extra/amunits/units/exec.pp

@@ -65,6 +65,10 @@
 
     05 Feb 2003.
     
+    Changed integer > smallint.
+    Retyped ULONG to longword
+    09 Feb 2003.
+    
     [email protected]
 }
 
@@ -81,7 +85,7 @@ INTERFACE
 {
     History:
 
-    Added BOOL = Integer, some libraries need that define
+    Added BOOL = smallint, some libraries need that define
     (read triton, wizard)
     25 Oct 1998
 
@@ -96,20 +100,21 @@ INTERFACE
 TYPE
 
        STRPTR   = PChar;
-       ULONG    = Longint;
+       ULONG    = Longword;
        LONG     = longint;
        APTR     = Pointer;
        BPTR     = Longint;
        BSTR     = Longint;
-       BOOL     = Integer;
+       BOOL     = smallint;
        UWORD    = Word;
        WORDBITS = Word;
-       LONGBITS = ULONG;
+       LONGBITS = longword;
        PLONGBITS = ^LONGBITS;
        UBYTE    = Byte;
-       PULONG   = ^ULONG;
+       PULONG   = ^longword;
        PAPTR    = ^APTR;
        PLONG    = ^LONG;
+       psmallint = ^smallint;
 
 const
        {There is a problem with boolean
@@ -129,7 +134,7 @@ TYPE
     ln_Type  : Byte;
     ln_Pri   : Shortint;        { * Priority, for sorting * }
     ln_Name  : STRPTR;      { * ID string, null terminated * }
-  End;  { * Note: Integer aligned * }
+  End;  { * Note: smallint aligned * }
 
 
 { * minimal node -- no type checking possible * }
@@ -523,7 +528,7 @@ CONST
 type
     pResident = ^tResident;
     tResident =  record
-    rt_MatchWord  : Word;        { Integer to match on (ILLEGAL)  }
+    rt_MatchWord  : Word;        { smallint to match on (ILLEGAL)  }
     rt_MatchTag   : pResident;    { pointer to the above        }
     rt_EndSkip    : Pointer;      { address to continue scan    }
     rt_Flags      : Byte;        { various tag flags           }
@@ -810,7 +815,7 @@ type
     pSemaphore = ^tSemaphore;
     tSemaphore =  record
         sm_MsgPort : tMsgPort;
-        sm_Bids    : Integer;
+        sm_Bids    : smallint;
     end;
 
 {  This is the structure used to request a signal semaphore }
@@ -826,11 +831,11 @@ type
     pSignalSemaphore = ^tSignalSemaphore;
     tSignalSemaphore =  record
         ss_Link         : tNode;
-        ss_NestCount    : Integer;
+        ss_NestCount    : smallint;
         ss_WaitQueue    : tMinList;
         ss_MultipleLink : tSemaphoreRequest;
         ss_Owner        : pTask;
-        ss_QueueCount   : Integer;
+        ss_QueueCount   : smallint;
     end;
 
 
@@ -986,7 +991,7 @@ tExecBase =  Record
 { ******* Static System Variables ******* }
 
         SoftVer      : Word;   {  kickstart release number (obs.)  }
-        LowMemChkSum : Integer;    {  checksum of 68000 trap vectors  }
+        LowMemChkSum : smallint;    {  checksum of 68000 trap vectors  }
         ChkBase      : ULONG;   {  system base pointer complement  }
         ColdCapture,            {  coldstart soft capture vector  }
         CoolCapture,            {  coolstart soft capture vector  }
@@ -2947,7 +2952,10 @@ END. (* UNIT EXEC *)
 
 {
   $Log$
-  Revision 1.2  2003-02-07 20:45:08  nils
+  Revision 1.3  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.2  2003/02/07 20:45:08  nils
   * update for amigaos 3.9
 
   Revision 1.1.2.2  2001/07/24 07:34:30  pierre

+ 4 - 1
packages/extra/amunits/units/expansion.pas

@@ -25,6 +25,9 @@
     Changed start code for unit.
     01 Feb 2003.
     
+    Changed cardinal > longword.
+    09 Feb 2003.
+    
     [email protected] Nils Sjoholm
 }
 
@@ -351,7 +354,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 {$ifdef use_init_openlib}
   {$Info Compiling initopening of expansion.library}

+ 11 - 4
packages/extra/amunits/units/gadtools.pas

@@ -37,6 +37,10 @@
     Changed startup code for the unit.
     01 Feb 2003.
     
+    Changed integer > smallint,
+            cardinal > longword.
+    09 Feb 2003.
+    	     
     [email protected]
 
 }
@@ -113,8 +117,8 @@ CONST
 Type
    pNewGadget = ^tNewGadget;
    tNewGadget = record
-    ng_LeftEdge, ng_TopEdge : Integer;     {  gadget position }
-    ng_Width, ng_Height     : Integer;     {  gadget size }
+    ng_LeftEdge, ng_TopEdge : smallint;     {  gadget position }
+    ng_Width, ng_Height     : smallint;     {  gadget size }
     ng_GadgetText           : STRPTR;      {  gadget label }
     ng_TextAttr             : pTextAttr;   {  desired font for gadget label }
     ng_GadgetID             : Word;        {  gadget ID }
@@ -770,7 +774,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 {$ifdef use_init_openlib}
   {$Info Compiling initopening of gadtools.library}
@@ -853,7 +857,10 @@ END. (* UNIT GADTOOLS *)
 
 {
   $Log$
-  Revision 1.4  2003-02-07 20:48:36  nils
+  Revision 1.5  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.4  2003/02/07 20:48:36  nils
   * update for amigaos 3.9
 
   * changed startcode for library

+ 72 - 65
packages/extra/amunits/units/graphics.pas

@@ -48,6 +48,10 @@
     LoadRGB4 and PolyDraw, fixed.
     01 Feb 2003.
 
+    Changed integer > smallint,
+            cardinal > longword.
+    09 Feb 2003.
+    	    
     [email protected]
 
 }
@@ -166,7 +170,7 @@ type
         ClipRegion      : Pointer;
         saveClipRects   : Pointer;      { used to back out when in trouble}
         Width,
-        Height          : Integer;
+        Height          : smallint;
         reserved2       : Array [0..17] of Byte;
         { this must stay here }
         DamageList      : Pointer;      { list of rectangles to refresh
@@ -374,9 +378,9 @@ type
 
     pCopIns = ^tCopIns;
     tCopIns = record
-        OpCode  : Integer; { 0 = move, 1 = wait }
-        VWaitAddr : Integer; { vertical or horizontal wait position }
-        HWaitData : Integer; { destination Pointer or data to send }
+        OpCode  : smallint; { 0 = move, 1 = wait }
+        VWaitAddr : smallint; { vertical or horizontal wait position }
+        HWaitData : smallint; { destination Pointer or data to send }
     end;
 
 { structure of cprlist that points to list that hardware actually executes }
@@ -384,8 +388,8 @@ type
     pcprlist = ^tcprlist;
     tcprlist = record
         Next    : pcprlist;
-        start   : pInteger;       { start of copper list }
-        MaxCount : Integer;       { number of long instructions }
+        start   : psmallint;       { start of copper list }
+        MaxCount : smallint;       { number of long instructions }
     end;
 
     pCopList = ^tCopList;
@@ -395,11 +399,11 @@ type
         ViewPort : Pointer;    { system use }
         CopIns  : pCopIns;    { start of this block }
         CopPtr  : pCopIns;    { intermediate ptr }
-        CopLStart : pInteger;     { mrgcop fills this in for Long Frame}
-        CopSStart : pInteger;     { mrgcop fills this in for Longint Frame}
-        Count   : Integer;        { intermediate counter }
-        MaxCount : Integer;       { max # of copins for this block }
-        DyOffset : Integer;       { offset this copper list vertical waits }
+        CopLStart : psmallint;     { mrgcop fills this in for Long Frame}
+        CopSStart : psmallint;     { mrgcop fills this in for Longint Frame}
+        Count   : smallint;        { intermediate counter }
+        MaxCount : smallint;       { max # of copins for this block }
+        DyOffset : smallint;       { offset this copper list vertical waits }
         SLRepeat : Word;
         Flags    : Word;
     end;
@@ -435,10 +439,10 @@ type
         VctrPtr : Pointer;      { ptr to current vertex }
         FlagTbl : Pointer;      { ptr to start of vector flag table }
         FlagPtr : Pointer;      { ptrs to areafill flags }
-        Count   : Integer;        { number of vertices in list }
-        MaxCount : Integer;       { AreaMove/Draw will not allow Count>MaxCount}
+        Count   : smallint;        { number of vertices in list }
+        MaxCount : smallint;       { AreaMove/Draw will not allow Count>MaxCount}
         FirstX,
-        FirstY  : Integer;        { first point for this polygon }
+        FirstY  : smallint;        { first point for this polygon }
     end;
 
     pTmpRas = ^tTmpRas;
@@ -468,7 +472,7 @@ type
         leftmost,
         rightmost,
         topmost,
-        bottommost      : Integer;
+        bottommost      : smallint;
         firstBlissObj,
         lastBlissObj    : Pointer;    { system use only }
     end;
@@ -492,17 +496,17 @@ type
         Flags           : Word;        { miscellaneous control bits }
         LinePtrn        : Word;        { 16 bits for textured lines }
         cp_x,
-        cp_y            : Integer;        { current pen position }
+        cp_y            : smallint;        { current pen position }
         minterms        : Array [0..7] of Byte;
-        PenWidth        : Integer;
-        PenHeight       : Integer;
+        PenWidth        : smallint;
+        PenHeight       : smallint;
         Font            : pTextFont;      { (TextFontPtr) current font Pointer }
         AlgoStyle       : Byte;         { the algorithmically generated style }
         TxFlags         : Byte;         { text specific flags }
         TxHeight        : Word;        { text height }
         TxWidth         : Word;        { text nominal width }
         TxBaseline      : Word;        { text baseline }
-        TxSpacing       : Integer;        { text spacing (per character) }
+        TxSpacing       : smallint;        { text spacing (per character) }
         RP_User         : Pointer;
         longreserved    : Array [0..1] of ULONG;
         wordreserved    : Array [0..6] of Word;        { used to be a node }
@@ -621,9 +625,9 @@ const
 
 type
 
-    VUserStuff  = Integer;        { Sprite user stuff }
-    BUserStuff  = Integer;        { Bob user stuff }
-    AUserStuff  = Integer;        { AnimOb user stuff }
+    VUserStuff  = smallint;        { Sprite user stuff }
+    BUserStuff  = smallint;        { Bob user stuff }
+    AUserStuff  = smallint;        { AnimOb user stuff }
 
 {********************** GEL STRUCTURES **********************************}
 
@@ -648,11 +652,11 @@ type
  *  sorting easier, since (y,x) as a long Longint
  }
 
-        OldY, OldX      : Integer;        { previous position }
+        OldY, OldX      : smallint;        { previous position }
 
 { --------------------- COMMON VARIABLES --------------------------------- }
 
-        Flags           : Integer;        { VSprite flags }
+        Flags           : smallint;        { VSprite flags }
 
 
 { --------------------- USER VARIABLES ----------------------------------- }
@@ -660,14 +664,14 @@ type
  *  sorting easier, since (y,x) as a long Longint
  }
 
-        Y, X            : Integer;        { screen position }
+        Y, X            : smallint;        { screen position }
 
-        Height  : Integer;
-        Width   : Integer;        { number of words per row of image data }
-        Depth   : Integer;        { number of planes of data }
+        Height  : smallint;
+        Width   : smallint;        { number of words per row of image data }
+        Depth   : smallint;        { number of planes of data }
 
-        MeMask  : Integer;        { which types can collide with this VSprite}
-        HitMask : Integer;        { which types this VSprite can collide with}
+        MeMask  : smallint;        { which types can collide with this VSprite}
+        HitMask : smallint;        { which types this VSprite can collide with}
 
         ImageData       : Pointer;      { pointer to VSprite image }
 
@@ -734,7 +738,7 @@ type
 
 { --------------------- COMMON VARIABLES --------------------------------- }
 
-        Flags   : Integer; { general purpose flags (see definitions below) }
+        Flags   : smallint; { general purpose flags (see definitions below) }
 
 { --------------------- USER VARIABLES ----------------------------------- }
 
@@ -766,19 +770,19 @@ type
 
 { --------------------- COMMON VARIABLES --------------------------------- }
 
-        Flags   : Integer;        { AnimComp flags for system & user }
+        Flags   : smallint;        { AnimComp flags for system & user }
 
 { timer defines how long to keep this component active:
  *  if set non-zero, timer decrements to zero then switches to nextSeq
  *  if set to zero, AnimComp never switches
  }
 
-        Timer   : Integer;
+        Timer   : smallint;
 
 { --------------------- USER VARIABLES ----------------------------------- }
 { initial value for timer when the AnimComp is activated by the system }
 
-        TimeSet : Integer;
+        TimeSet : smallint;
 
 { pointer to next and previous components of animation object }
 
@@ -792,8 +796,8 @@ type
 
         AnimCRoutine : Pointer; { Pointer of special animation procedure }
 
-        YTrans  : Integer; { initial y translation (if this is a component) }
-        XTrans  : Integer; { initial x translation (if this is a component) }
+        YTrans  : smallint; { initial y translation (if this is a component) }
+        XTrans  : smallint; { initial x translation (if this is a component) }
 
         HeadOb  : Pointer; { AnimObPtr }
 
@@ -813,22 +817,22 @@ type
         Clock   : Longint;
 
         AnOldY,
-        AnOldX  : Integer;        { old y,x coordinates }
+        AnOldX  : smallint;        { old y,x coordinates }
 
 { --------------------- COMMON VARIABLES --------------------------------- }
 
         AnY,
-        AnX     : Integer;        { y,x coordinates of the AnimOb }
+        AnX     : smallint;        { y,x coordinates of the AnimOb }
 
 { --------------------- USER VARIABLES ----------------------------------- }
 
         YVel,
-        XVel    : Integer;        { velocities of this object }
+        XVel    : smallint;        { velocities of this object }
         YAccel,
-        XAccel  : Integer;        { accelerations of this object }
+        XAccel  : smallint;        { accelerations of this object }
 
         RingYTrans,
-        RingXTrans      : Integer;        { ring translation values }
+        RingXTrans      : smallint;        { ring translation values }
 
         AnimORoutine    : Pointer;      { Pointer of special animation
                                           procedure }
@@ -1077,7 +1081,7 @@ Type
         Next    : pRasInfo;     { used for dualpf }
         BitMap  : pBitMap;
         RxOffset,
-        RyOffset : Integer;       { scroll offsets in this BitMap }
+        RyOffset : smallint;       { scroll offsets in this BitMap }
     end;
 
 
@@ -1087,7 +1091,7 @@ Type
         LOFCprList      : pcprlist;   { used for interlaced and noninterlaced }
         SHFCprList      : pcprlist;   { only used during interlace }
         DyOffset,
-        DxOffset        : Integer;        { for complete View positioning }
+        DxOffset        : smallint;        { for complete View positioning }
                                 { offsets are +- adjustments to standard #s }
         Modes           : WORD;        { such as INTERLACE, GENLOC }
     end;
@@ -1114,9 +1118,9 @@ Type
         ClrIns  : pCopList;   { used by sprite stuff }
         UCopIns : pUCopList;  { User copper list }
         DWidth,
-        DHeight : Integer;
+        DHeight : smallint;
         DxOffset,
-        DyOffset : Integer;
+        DyOffset : smallint;
         Modes   : Word;
         SpritePriorities : Byte;        { used by makevp }
         reserved : Byte;
@@ -1841,7 +1845,7 @@ Type
   TotalRows,                       { display height in scanlines       }
   TotalColorClocks,                { scanline width in 280 ns units    }
   MinRow        : Word;            { absolute minimum active scanline  }
-  Compatibility : Integer;           { how this coexists with others     }
+  Compatibility : smallint;           { how this coexists with others     }
   pad : Array[0..31] of Byte;
   MouseTicks    : tPoint;
   DefaultViewPosition : tPoint;
@@ -2096,13 +2100,13 @@ type
         Modes           : Word;        { copy of current first bplcon0 }
         VBlank          : Shortint;
         Debug           : Shortint;
-        BeamSync        : Integer;
-        system_bplcon0  : Integer; { it is ored into each bplcon0 for display }
+        BeamSync        : smallint;
+        system_bplcon0  : smallint; { it is ored into each bplcon0 for display }
         SpriteReserved  : Byte;
         bytereserved    : Byte;
         Flags           : Word;
-        BlitLock        : Integer;
-        BlitNest        : Integer;
+        BlitLock        : smallint;
+        BlitNest        : smallint;
 
         BlitWaitQ       : tList;
         BlitOwner       : pTask;      { TaskPtr }
@@ -2132,9 +2136,9 @@ type
         hedley  : Array[0..7] of ULONG;
         hedley_sprites  : Array[0..7] of ULONG;     { sprite ptrs for intuition mouse }
         hedley_sprites1 : Array[0..7] of ULONG;            { sprite ptrs for intuition mouse }
-        hedley_count    : Integer;
+        hedley_count    : smallint;
         hedley_flags    : Word;
-        hedley_tmp      : Integer;
+        hedley_tmp      : smallint;
         hash_table      : Pointer;
         current_tot_rows : Word;
         current_tot_cclks : Word;
@@ -2313,7 +2317,7 @@ FUNCTION GetOutlinePen(rp : pRastPort) : ULONG;
 PROCEDURE GetRGB32(const cm : pColorMap; firstcolor : ULONG; ncolors : ULONG; table : pulong);
 FUNCTION GetRGB4(colorMap : pColorMap; entry : LONGINT) : ULONG;
 PROCEDURE GetRPAttrsA(const rp : pRastPort;const tags : pTagItem);
-FUNCTION GetSprite(sprite : pSimpleSprite; num : LONGINT) : INTEGER;
+FUNCTION GetSprite(sprite : pSimpleSprite; num : LONGINT) : smallint;
 FUNCTION GetVPModeID(const vp : pViewPort) : LONGINT;
 PROCEDURE GfxAssociate(const associateNode : POINTER; gfxNodePtr : POINTER);
 PROCEDURE GfxFree(gfxNodePtr : POINTER);
@@ -2382,9 +2386,9 @@ PROCEDURE SortGList(rp : pRastPort);
 PROCEDURE StripFont(font : pTextFont);
 PROCEDURE SyncSBitMap(layer : pLayer);
 FUNCTION GText(rp : pRastPort;const string_ : pCHAR; count : ULONG) : LONGINT;
-FUNCTION TextExtent(rp : pRastPort;const string_ : pCHAR; count : LONGINT; _textExtent : pTextExtent) : INTEGER;
+FUNCTION TextExtent(rp : pRastPort;const string_ : pCHAR; count : LONGINT; _textExtent : pTextExtent) : smallint;
 FUNCTION TextFit(rp : pRastPort;const string_ : pCHAR; strLen : ULONG; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LONGINT; constrainingBitWidth : ULONG; constrainingBitHeight : ULONG) : ULONG;
-FUNCTION TextLength(rp : pRastPort;const string_ : pCHAR; count : ULONG) : INTEGER;
+FUNCTION TextLength(rp : pRastPort;const string_ : pCHAR; count : ULONG) : smallint;
 FUNCTION UCopperListInit(uCopList : pUCopList; n : LONGINT) : pCopList;
 PROCEDURE UnlockLayerRom(layer : pLayer);
 FUNCTION VBeamPos : LONGINT;
@@ -2392,7 +2396,7 @@ FUNCTION VideoControl(colorMap : pColorMap; tagarray : pTagItem) : BOOLEAN;
 PROCEDURE WaitBlit;
 PROCEDURE WaitBOVP(vp : pViewPort);
 PROCEDURE WaitTOF;
-FUNCTION WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : pTagItem) : INTEGER;
+FUNCTION WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : pTagItem) : smallint;
 PROCEDURE WriteChunkyPixels(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; bytesperrow : LONGINT);
 FUNCTION WritePixel(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
 FUNCTION WritePixelArray8(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; temprp : pRastPort) : LONGINT;
@@ -2410,7 +2414,7 @@ PROCEDURE SetOPen(w: pRastPort;c: Byte);
 PROCEDURE SetWrMsk(w: pRastPort; m: Byte);
 
 PROCEDURE SafeSetOutlinePen(w : pRastPort; c : byte);
-PROCEDURE SafeSetWriteMask( w : pRastPort ; m : Integer ) ;
+PROCEDURE SafeSetWriteMask( w : pRastPort ; m : smallint ) ;
 
 PROCEDURE OFF_DISPLAY (cust: pCustom);
 PROCEDURE ON_DISPLAY (cust: pCustom);
@@ -2495,8 +2499,8 @@ begin
     END;
 END;
 
-PROCEDURE SafeSetWriteMask( w : pRastPort ; m : Integer ) ;
-  VAR x : INTEGER ;
+PROCEDURE SafeSetWriteMask( w : pRastPort ; m : smallint ) ;
+  VAR x : smallint ;
 BEGIN
   IF pGfxBase(GfxBase)^.LibNode.Lib_Version < 39 THEN w^.Mask := BYTE(m)
   ELSE x := SetWriteMask( w, m );
@@ -3554,7 +3558,7 @@ BEGIN
   END;
 END;
 
-FUNCTION GetSprite(sprite : pSimpleSprite; num : LONGINT) : INTEGER;
+FUNCTION GetSprite(sprite : pSimpleSprite; num : LONGINT) : smallint;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -4445,7 +4449,7 @@ BEGIN
   END;
 END;
 
-FUNCTION TextExtent(rp : pRastPort;const string_ : pCHAR; count : LONGINT; _textExtent : pTextExtent) : INTEGER;
+FUNCTION TextExtent(rp : pRastPort;const string_ : pCHAR; count : LONGINT; _textExtent : pTextExtent) : smallint;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -4479,7 +4483,7 @@ BEGIN
   END;
 END;
 
-FUNCTION TextLength(rp : pRastPort;const string_ : pCHAR; count : ULONG) : INTEGER;
+FUNCTION TextLength(rp : pRastPort;const string_ : pCHAR; count : ULONG) : smallint;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -4575,7 +4579,7 @@ BEGIN
   END;
 END;
 
-FUNCTION WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : pTagItem) : INTEGER;
+FUNCTION WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : pTagItem) : smallint;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -4691,7 +4695,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 {$ifdef use_init_openlib}
   {$Info Compiling initopening of graphics.library}
@@ -4773,7 +4777,10 @@ END. (* UNIT GRAPHICS *)
 
 {
   $Log$
-  Revision 1.4  2003-02-07 20:48:36  nils
+  Revision 1.5  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.4  2003/02/07 20:48:36  nils
   * update for amigaos 3.9
 
   * changed startcode for library

+ 2 - 2
packages/extra/amunits/units/hardware.pas

@@ -497,8 +497,8 @@ Const
        n         : pbltnode;
        _function : Pointer;
        stat      : Byte;
-       blitsize  : Integer;
-       beamsync  : Integer;
+       blitsize  : smallint;
+       beamsync  : smallint;
        cleanup   : Pointer;
     end;
 

+ 12 - 6
packages/extra/amunits/units/icon.pas

@@ -45,6 +45,9 @@
     Changed start code for unit.
     02 Feb 2003.
     
+    Changed cardinal > longword.
+    09 Feb 2003.
+    
     [email protected]
 }
 
@@ -365,8 +368,8 @@ FUNCTION PutDiskObject(const name : pCHAR;const diskobj : pDiskObject) : BOOLEAN
 
 { version 44 }
 FUNCTION DupDiskObjectA(CONST diskObject : pDiskObject; CONST tags : pTagItem) : pDiskObject;
-FUNCTION IconControlA(icon : pDiskObject; CONST tags : pTagItem) : CARDINAL;
-PROCEDURE DrawIconStateA(rp : pRastPort; CONST icon : pDiskObject; CONST label_ : pCHAR; leftOffset : LONGINT; topOffset : LONGINT; state : CARDINAL; CONST tags : pTagItem);
+FUNCTION IconControlA(icon : pDiskObject; CONST tags : pTagItem) : longword;
+PROCEDURE DrawIconStateA(rp : pRastPort; CONST icon : pDiskObject; CONST label_ : pCHAR; leftOffset : LONGINT; topOffset : LONGINT; state : longword; CONST tags : pTagItem);
 FUNCTION GetIconRectangleA(rp : pRastPort; CONST icon : pDiskObject; CONST label_ : pCHAR; rect : pRectangle; CONST tags : pTagItem) : BOOLEAN;
 FUNCTION NewDiskObject(type_ : LONGINT) : pDiskObject;
 FUNCTION GetIconTagList(CONST name : pCHAR; CONST tags : pTagItem) : pDiskObject;
@@ -595,7 +598,7 @@ BEGIN
   END;
 END;
 
-FUNCTION IconControlA(icon : pDiskObject; CONST tags : pTagItem) : CARDINAL;
+FUNCTION IconControlA(icon : pDiskObject; CONST tags : pTagItem) : longword;
 BEGIN
   ASM
 	MOVE.L	A6,-(A7)
@@ -608,7 +611,7 @@ BEGIN
   END;
 END;
 
-PROCEDURE DrawIconStateA(rp : pRastPort; CONST icon : pDiskObject; CONST label_ : pCHAR; leftOffset : LONGINT; topOffset : LONGINT; state : CARDINAL; CONST tags : pTagItem);
+PROCEDURE DrawIconStateA(rp : pRastPort; CONST icon : pDiskObject; CONST label_ : pCHAR; leftOffset : LONGINT; topOffset : LONGINT; state : longword; CONST tags : pTagItem);
 BEGIN
   ASM
 	MOVE.L	A6,-(A7)
@@ -783,7 +786,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 {$ifdef use_init_openlib}
   {$Info Compiling initopening of icon.library}
@@ -865,7 +868,10 @@ END. (* UNIT ICON *)
 
 {
   $Log$
-  Revision 1.4  2003-02-07 20:48:36  nils
+  Revision 1.5  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.4  2003/02/07 20:48:36  nils
   * update for amigaos 3.9
 
   * changed startcode for library

+ 8 - 2
packages/extra/amunits/units/iffparse.pas

@@ -28,6 +28,9 @@
     Changed start code for unit.
     01 Feb 2003.
 
+    Changed cardinal > longword.
+    09 Feb 2003.
+    
     [email protected] Nils Sjoholm
 }
 
@@ -835,7 +838,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 {$ifdef use_init_openlib}
   {$Info Compiling initopening of iffparse.library}
@@ -918,7 +921,10 @@ END. (* UNIT IFFPARSE *)
 
 {
   $Log$
-  Revision 1.5  2003-02-07 20:48:36  nils
+  Revision 1.6  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.5  2003/02/07 20:48:36  nils
   * update for amigaos 3.9
 
   * changed startcode for library

+ 3 - 3
packages/extra/amunits/units/inputevent.pas

@@ -99,7 +99,7 @@ Type
    tIEPointerPixel = record
     iepp_Screen : Pointer;   { pointer to an open screen }
     iepp_Position : record
-       x,y : Integer;
+       x,y : smallint;
     end;
    END;
 
@@ -266,8 +266,8 @@ CONST
             ie_position : record
                 case longint of
                    0 : ( ie_xy : record
-                        ie_x : Integer;
-                        ie_y : Integer;
+                        ie_x : smallint;
+                        ie_y : smallint;
                      end );
                    1 : ( ie_addr : APTR );
                    2 : ( ie_dead : record

+ 79 - 73
packages/extra/amunits/units/intuition.pas

@@ -39,6 +39,9 @@
    New consts and new records.
    04 Feb 2003.
 
+   Changed integer > smallint.
+   09 Feb 2003.
+   
    [email protected] Nils Sjoholm
 
 }
@@ -72,8 +75,8 @@ Type
         FrontPen,
         BackPen         : Byte;         { the pen numbers for the rendering }
         DrawMode        : Byte;         { the mode for rendering the text }
-        LeftEdge        : Integer;        { relative start location for the text }
-        TopEdge         : Integer;        { relative start location for the text }
+        LeftEdge        : smallint;        { relative start location for the text }
+        TopEdge         : smallint;        { relative start location for the text }
         ITextFont       : pTextAttr;  { if NULL, you accept the default }
         IText           : STRPTR;       { pointer to null-terminated text }
         NextText        : pIntuiText;   { continuation to TxWrite another text }
@@ -97,7 +100,7 @@ Type
     pBorder = ^tBorder;
     tBorder = record
         LeftEdge,
-        TopEdge         : Integer;        { initial offsets from the origin }
+        TopEdge         : smallint;        { initial offsets from the origin }
         FrontPen,
         BackPen         : Byte;         { pens numbers for rendering }
         DrawMode        : Byte;         { mode for rendering }
@@ -116,9 +119,9 @@ Type
     tMenuItem = record
         NextItem        : pMenuItem;    { pointer to next in chained list }
         LeftEdge,
-        TopEdge         : Integer;        { position of the select box }
+        TopEdge         : smallint;        { position of the select box }
         Width,
-        Height          : Integer;        { dimensions of the select box }
+        Height          : smallint;        { dimensions of the select box }
         Flags           : Word;        { see the defines below }
 
         MutualExclude   : Longint;      { set bits mean this item excludes that }
@@ -177,9 +180,9 @@ Type
     tMenu = record
         NextMenu        : pMenu;        { same level }
         LeftEdge,
-        TopEdge         : Integer;        { position of the select box }
+        TopEdge         : smallint;        { position of the select box }
         Width,
-        Height          : Integer;        { dimensions of the select box }
+        Height          : smallint;        { dimensions of the select box }
         Flags           : Word;        { see flag definitions below }
         MenuName        : STRPTR;       { text for this Menu Header }
         FirstItem       : pMenuItem;  { pointer to first in chain }
@@ -189,7 +192,7 @@ Type
         JazzX,
         JazzY,
         BeatX,
-        BeatY           : Integer;
+        BeatY           : smallint;
     end;
 
 CONST
@@ -213,9 +216,9 @@ Type
         NextGadget      : pGadget;      { next gadget in the list }
 
         LeftEdge,
-        TopEdge         : Integer;        { "hit box" of gadget }
+        TopEdge         : smallint;        { "hit box" of gadget }
         Width,
-        Height          : Integer;        { "hit box" of gadget }
+        Height          : smallint;        { "hit box" of gadget }
 
         Flags           : Word;        { see below for list of defines }
 
@@ -266,7 +269,7 @@ Type
     { The first fields match struct Gadget exactly }
     NextGadget     : pExtGadget;  { Matches struct Gadget }
     LeftEdge, TopEdge,            { Matches struct Gadget }
-    Width, Height  : Integer;     { Matches struct Gadget }
+    Width, Height  : smallint;     { Matches struct Gadget }
     Flags,                        { Matches struct Gadget }
     Activation,                   { Matches struct Gadget }
     GadgetType     : WORD;        { Matches struct Gadget }
@@ -283,7 +286,7 @@ Type
     BoundsLeftEdge,             { Bounding extent for gadget, valid   }
     BoundsTopEdge,              { only if GMORE_BOUNDS is set.  The   }
     BoundsWidth,                { GFLG_RELxxx flags affect these      }
-    BoundsHeight   : Integer;      { coordinates as well.        }
+    BoundsHeight   : smallint;      { coordinates as well.        }
  end;
 
 
@@ -610,17 +613,17 @@ Type
     { you initialize these variables, and then Intuition maintains them }
         Buffer          : STRPTR;       { the buffer containing the start and final string }
         UndoBuffer      : STRPTR;       { optional buffer for undoing current entry }
-        BufferPos       : Integer;        { character position in Buffer }
-        MaxChars        : Integer;        { max number of chars in Buffer (including NULL) }
-        DispPos         : Integer;        { Buffer position of first displayed character }
+        BufferPos       : smallint;        { character position in Buffer }
+        MaxChars        : smallint;        { max number of chars in Buffer (including NULL) }
+        DispPos         : smallint;        { Buffer position of first displayed character }
 
     { Intuition initializes and maintains these variables for you }
 
-        UndoPos         : Integer;        { character position in the undo buffer }
-        NumChars        : Integer;        { number of characters currently in Buffer }
-        DispCount       : Integer;        { number of whole characters visible in Container }
+        UndoPos         : smallint;        { character position in the undo buffer }
+        NumChars        : smallint;        { number of characters currently in Buffer }
+        DispCount       : smallint;        { number of whole characters visible in Container }
         CLeft,
-        CTop            : Integer;        { topleft offset of the container }
+        CTop            : smallint;        { topleft offset of the container }
 
     { you can initialize this variable before the gadget is submitted to
      * Intuition, and then examine it later to discover what Longint
@@ -651,11 +654,11 @@ Type
     { the ClipRect and BitMap and used for rendering the requester }
         OlderRequest    : pRequester;
         LeftEdge,
-        TopEdge         : Integer;        { dimensions of the entire box }
+        TopEdge         : smallint;        { dimensions of the entire box }
         Width,
-        Height          : Integer;        { dimensions of the entire box }
+        Height          : smallint;        { dimensions of the entire box }
         RelLeft,
-        RelTop          : Integer;        { for Pointer relativity offsets }
+        RelTop          : smallint;        { for Pointer relativity offsets }
 
         ReqGadget       : pGadget;    { pointer to a list of Gadgets }
         ReqBorder       : pBorder;    { the box's border }
@@ -724,11 +727,11 @@ Const
 Type
     pImage = ^tImage;
     tImage = record
-        LeftEdge        : Integer;        { starting offset relative to some origin }
-        TopEdge         : Integer;        { starting offsets relative to some origin }
-        Width           : Integer;        { pixel size (though data is word-aligned) }
+        LeftEdge        : smallint;        { starting offset relative to some origin }
+        TopEdge         : smallint;        { starting offsets relative to some origin }
+        Width           : smallint;        { pixel size (though data is word-aligned) }
         Height,
-        Depth           : Integer;        { pixel sizes }
+        Depth           : smallint;        { pixel sizes }
         ImageData       : Pointer;      { pointer to the actual word-aligned bits }
 
     { the PlanePick and PlaneOnOff variables work much the same way as the
@@ -957,7 +960,7 @@ Type
      }
 
         MouseX,
-        MouseY          : Integer;
+        MouseY          : smallint;
 
     { the time values are copies of the current system clock time.  Micros
      * are in units of microseconds, Seconds in seconds.
@@ -1077,7 +1080,7 @@ Type
     Left,
     Top,
     Width,
-    Height : Integer;
+    Height : smallint;
    END;
 
 
@@ -1092,17 +1095,17 @@ Type
         NextWindow      : pWindow;      { for the linked list in a screen }
 
         LeftEdge,
-        TopEdge         : Integer;        { screen dimensions of window }
+        TopEdge         : smallint;        { screen dimensions of window }
         Width,
-        Height          : Integer;        { screen dimensions of window }
+        Height          : smallint;        { screen dimensions of window }
 
         MouseY,
-        MouseX          : Integer;        { relative to upper-left of window }
+        MouseX          : smallint;        { relative to upper-left of window }
 
         MinWidth,
-        MinHeight       : Integer;        { minimum sizes }
+        MinHeight       : smallint;        { minimum sizes }
         MaxWidth,
-        MaxHeight       : Integer;        { maximum sizes }
+        MaxHeight       : smallint;        { maximum sizes }
 
         Flags           : ULONG;      { see below for defines }
 
@@ -1114,7 +1117,7 @@ Type
 
         DMRequest       : pRequester; { double-click Requester }
 
-        ReqCount        : Integer;        { count of reqs blocking Window }
+        ReqCount        : smallint;        { count of reqs blocking Window }
 
         WScreen         : Pointer;      { this Window's Screen }
         RPort           : pRastPort;  { this Window's very own RastPort }
@@ -1185,15 +1188,15 @@ Type
      * notwithstanding
      }
 
-        GZZMouseX       : Integer;
-        GZZMouseY       : Integer;
+        GZZMouseX       : smallint;
+        GZZMouseY       : smallint;
 
     { these variables contain the width and height of the inner-Window of
      * GIMMEZEROZERO Windows
      }
 
-        GZZWidth        : Integer;
-        GZZHeight       : Integer;
+        GZZWidth        : smallint;
+        GZZHeight       : smallint;
 
         ExtData         : Pointer;
 
@@ -1288,9 +1291,9 @@ Type
     pNewWindow = ^tNewWindow;
     tNewWindow = record
         LeftEdge,
-        TopEdge         : Integer;        { screen dimensions of window }
+        TopEdge         : smallint;        { screen dimensions of window }
         Width,
-        Height          : Integer;        { screen dimensions of window }
+        Height          : smallint;        { screen dimensions of window }
 
         DetailPen,
         BlockPen        : Byte;         { for bar/border/gadget rendering }
@@ -1345,9 +1348,9 @@ Type
      }
 
         MinWidth,
-        MinHeight       : Integer;        { minimums }
+        MinHeight       : smallint;        { minimums }
         MaxWidth,
-        MaxHeight       : Integer;        { maximums }
+        MaxHeight       : smallint;        { maximums }
 
     { the type variable describes the Screen in which you want this Window to
      * open.  The type value can either be CUSTOMSCREEN or one of the
@@ -1368,8 +1371,8 @@ Type
  }
    pExtNewWindow = ^tExtNewWindow;
    tExtNewWindow = record
-    LeftEdge, TopEdge : Integer;
-    Width, Height : Integer;
+    LeftEdge, TopEdge : smallint;
+    Width, Height : smallint;
 
     DetailPen, BlockPen : Byte;
     IDCMPFlags    : ULONG;
@@ -1382,7 +1385,7 @@ Type
     WScreen       : Pointer;
     WBitMap       : pBitMap;
 
-    MinWidth, MinHeight : Integer;
+    MinWidth, MinHeight : smallint;
     MaxWidth, MaxHeight : Word;
 
     { the type variable describes the Screen in which you want this Window to
@@ -1647,7 +1650,7 @@ Type
 
   pColorSpec = ^tColorSpec;
   tColorSpec = record
-    ColorIndex  : Integer;     { -1 terminates an array of ColorSpec  }
+    ColorIndex  : smallint;     { -1 terminates an array of ColorSpec  }
     Red         : Word;     { only the _bottom_ 4 bits recognized }
     Green       : Word;     { only the _bottom_ 4 bits recognized }
     Blue        : Word;     { only the _bottom_ 4 bits recognized }
@@ -1855,12 +1858,12 @@ Type
         FirstWindow     : pWindow;      { linked list Screen's Windows }
 
         LeftEdge,
-        TopEdge         : Integer;        { parameters of the screen }
+        TopEdge         : smallint;        { parameters of the screen }
         Width,
-        Height          : Integer;        { parameters of the screen }
+        Height          : smallint;        { parameters of the screen }
 
         MouseY,
-        MouseX          : Integer;        { position relative to upper-left }
+        MouseX          : smallint;        { position relative to upper-left }
 
         Flags           : Word;        { see definitions below }
 
@@ -2198,7 +2201,7 @@ Type
         TopEdge,
         Width,
         Height,
-        Depth           : Integer;        { screen dimensions }
+        Depth           : smallint;        { screen dimensions }
 
         DetailPen,
         BlockPen        : Byte;         { for bar/border/gadget rendering }
@@ -2228,7 +2231,7 @@ type
 
  pExtNewScreen = ^tExtNewScreen;
  tExtNewScreen = record
-  LeftEdge, TopEdge, Width, Height, Depth : Integer;
+  LeftEdge, TopEdge, Width, Height, Depth : smallint;
   DetailPen, BlockPen : Byte;
   ViewModes : Word;
   ens_Type : Word;     { Type in C-Includes }
@@ -2266,8 +2269,8 @@ Type
     psn_Node    : tNode;       { ln_Name is screen name }
     psn_Screen  : pScreen;
     psn_Flags   : Word;      { below                }
-    psn_Size    : Integer;      { includes name buffer }
-    psn_VisitorCount  : Integer; { how many visitor windows }
+    psn_Size    : smallint;      { includes name buffer }
+    psn_VisitorCount  : smallint; { how many visitor windows }
     psn_SigTask : pTask;    { who to signal when visitors gone }
     psn_SigBit  : Byte;     { which signal }
    END;
@@ -2432,7 +2435,7 @@ Type
         ViewXOffset     : Shortint;         { Offset for top lefthand corner  }
         ViewYOffset     : Shortint;         { X and Y dimensions           }
         ViewInitX,
-        ViewInitY       : Integer;        { View initial offset values      }
+        ViewInitY       : smallint;        { View initial offset values      }
 
         EnableCLI       : Boolean;      { CLI availability switch }
 
@@ -2450,7 +2453,7 @@ Type
         PrintImage      : Word;        { positive or negative         }
         PrintAspect     : Word;        { horizontal or vertical      }
         PrintShade      : Word;        { b&w, half-tone, or color    }
-        PrintThreshold  : Integer;        { darkness ctrl for b/w dumps      }
+        PrintThreshold  : smallint;        { darkness ctrl for b/w dumps      }
 
     { print paper descriptors }
         PaperSize       : Word;        { paper size               }
@@ -2674,7 +2677,7 @@ Type
 
         Flags           : ULONG;      { see definitions below }
         MouseY,
-        MouseX          : Integer;        { mouse position relative to View }
+        MouseX          : smallint;        { mouse position relative to View }
 
         Seconds         : ULONG;      { timestamp of most current input event }
         Micros          : ULONG;      { timestamp of most current input event }
@@ -3242,8 +3245,8 @@ type
     MethodID  : ULONG;
     gpht_GInfo : pGadgetInfo;
     gpht_Mouse : record
-             x : Integer;
-             y : Integer;
+             x : smallint;
+             y : smallint;
                  end;
   END;
 
@@ -3294,8 +3297,8 @@ Type
     gpi_IEvent : pInputEvent;
     gpi_Termination : Pointer;
     gpi_Mouse : record
-            x : Integer;
-            y : Integer;
+            x : smallint;
+            y : smallint;
                 end;
     {* (V39) Pointer to TabletData structure, if this event originated
      * from a tablet which sends IESUBCLASS_NEWTABLET events, or NULL if
@@ -3914,8 +3917,8 @@ Type
     { modified for each input event    }
     IEvent     : pInputEvent;    { actual event: do not change  }
     Code       : Word;            { character code, IF one byte  }
-    BufferPos  : Integer;            { cursor position              }
-    NumChars   : Integer;
+    BufferPos  : smallint;            { cursor position              }
+    NumChars   : smallint;
     Actions    : ULONG;          { what Intuition will do       }
     LongInt_   : Longint;          { temp storage for longint     }
 
@@ -4099,7 +4102,7 @@ PROCEDURE FreeRemember(VAR rememberKey : pRemember; reallyForget : LONGINT);
 PROCEDURE FreeScreenBuffer(sc : pScreen; sb : pScreenBuffer);
 PROCEDURE FreeScreenDrawInfo(screen : pScreen; drawInfo : pDrawInfo);
 PROCEDURE FreeSysRequest(window : pWindow);
-PROCEDURE GadgetMouse(gadget : pGadget; gInfo : pGadgetInfo; mousePoint : pInteger);
+PROCEDURE GadgetMouse(gadget : pGadget; gInfo : pGadgetInfo; mousePoint : psmallint);
 FUNCTION GetAttr(attrID : ULONG; obj : POINTER; storagePtr : pULONG) : ULONG;
 PROCEDURE GetDefaultPubScreen(nameBuffer : pCHAR);
 FUNCTION GetDefPrefs(preferences : pPreferences; size : LONGINT) : pPreferences;
@@ -4191,10 +4194,10 @@ function BASEOBJECT (o: p_Object): Pointer;
 function _OBJ(o: p_Object): p_Object;
 function __OBJECT (o: Pointer): p_Object;
 function OCLASS (o: Pointer): pIClass;
-function SHIFTITEM (n: integer): word;
-function SHIFTMENU (n: integer): word;
-function SHIFTSUB (n: integer): word;
-function FULLMENUNUM (menu, item, sub: integer): word;
+function SHIFTITEM (n: smallint): word;
+function SHIFTMENU (n: smallint): word;
+function SHIFTSUB (n: smallint): word;
+function FULLMENUNUM (menu, item, sub: smallint): word;
 function IM_BGPEN (im: pImage): byte;
 function IM_BOX (im: pImage): pIBox;
 function IM_FGPEN (im: pImage): byte;
@@ -4254,22 +4257,22 @@ begin
     OCLASS := obj^.o_Class;
 end;
 
-function SHIFTITEM (n: integer): word;
+function SHIFTITEM (n: smallint): word;
 begin
     SHIFTITEM := (n and $3f) shl 5
 end;
 
-function SHIFTMENU (n: integer): word;
+function SHIFTMENU (n: smallint): word;
 begin
     SHIFTMENU := n and $1f
 end;
 
-function SHIFTSUB (n: integer): word;
+function SHIFTSUB (n: smallint): word;
 begin
     SHIFTSUB := (n and $1f) shl 11
 end;
 
-function FULLMENUNUM (menu, item, sub: integer): word;
+function FULLMENUNUM (menu, item, sub: smallint): word;
 begin
     FULLMENUNUM := ((sub and $1f) shl 11) or
                     ((item and $3f) shl 5) or
@@ -4830,7 +4833,7 @@ BEGIN
   END;
 END;
 
-PROCEDURE GadgetMouse(gadget : pGadget; gInfo : pGadgetInfo; mousePoint : pInteger);
+PROCEDURE GadgetMouse(gadget : pGadget; gInfo : pGadgetInfo; mousePoint : psmallint);
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -6000,7 +6003,10 @@ END. (* UNIT INTUITION *)
 
 {
   $Log$
-  Revision 1.4  2003-02-07 20:45:08  nils
+  Revision 1.5  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.4  2003/02/07 20:45:08  nils
   * update for amigaos 3.9
 
   Revision 1.3  2003/01/13 20:34:19  nils

+ 7 - 3
packages/extra/amunits/units/keymap.pas

@@ -26,6 +26,10 @@
     of the library.
     14 Jan 2003.
     
+    Changed integer > smallint,
+            cardinal > longword.
+    09 Feb 2003.
+    	    
     [email protected] Nils Sjoholm
 }
 
@@ -112,7 +116,7 @@ const
 
 FUNCTION AskKeyMapDefault : pKeyMap;
 FUNCTION MapANSI(thestring : pCHAR; count : LONGINT; buffer : pCHAR; length : LONGINT; keyMap : pKeyMap) : LONGINT;
-FUNCTION MapRawKey(event : pInputEvent; buffer : pCHAR; length : LONGINT; keyMap : pKeyMap) : INTEGER;
+FUNCTION MapRawKey(event : pInputEvent; buffer : pCHAR; length : LONGINT; keyMap : pKeyMap) : smallint;
 PROCEDURE SetKeyMapDefault(keyMap : pKeyMap);
 
 IMPLEMENTATION
@@ -146,7 +150,7 @@ BEGIN
   END;
 END;
 
-FUNCTION MapRawKey(event : pInputEvent; buffer : pCHAR; length : LONGINT; keyMap : pKeyMap) : INTEGER;
+FUNCTION MapRawKey(event : pInputEvent; buffer : pCHAR; length : LONGINT; keyMap : pKeyMap) : smallint;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -192,7 +196,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 begin
     KeymapBase := nil;

+ 11 - 4
packages/extra/amunits/units/layers.pas

@@ -25,6 +25,10 @@
     Changed start code for unit.
     06 Feb 2003.
     
+    Changed integer > smallint,
+            cardinal > longword.
+    09 Feb 2003.
+    	    
     [email protected]
 }
 
@@ -62,12 +66,12 @@ type
     PrivateReserve2     : Longint;              { !! Private !! }
     Lock                : tSignalSemaphore;      { !! Private !! }
     gs_Head             : tMinList;              { !! Private !! }
-    PrivateReserve3     : Integer;                 { !! Private !! }
+    PrivateReserve3     : smallint;                 { !! Private !! }
     PrivateReserve4     : Pointer;              { !! Private !! }
     Flags               : WORD;
     fatten_count        : Shortint;                 { !! Private !! }
     LockLayersCount     : Shortint;                 { !! Private !! }
-    PrivateReserve5     : Integer;                 { !! Private !! }
+    PrivateReserve5     : smallint;                 { !! Private !! }
     BlankHook,                                  { !! Private !! }
     LayerInfo_extra     : Pointer;              { !! Private !! }
  end;
@@ -569,7 +573,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 {$ifdef use_init_openlib}
   {$Info Compiling initopening of layers.library}
@@ -651,7 +655,10 @@ END. (* UNIT LAYERS *)
 
 {
   $Log$
-  Revision 1.4  2003-02-07 20:48:36  nils
+  Revision 1.5  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.4  2003/02/07 20:48:36  nils
   * update for amigaos 3.9
 
   * changed startcode for library

+ 8 - 2
packages/extra/amunits/units/locale.pas

@@ -29,6 +29,9 @@
     Changed the start code for unit.
     01 Feb 2003.
 
+    Changed integer > smallint.
+    09 Feb 2003.
+    
     [email protected]
 }
 
@@ -671,7 +674,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 {$ifdef use_init_openlib}
   {$Info Compiling initopening of locale.library}
@@ -753,7 +756,10 @@ END. (* UNIT LOCALE *)
 
 {
   $Log$
-  Revision 1.4  2003-02-07 20:49:54  nils
+  Revision 1.5  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.4  2003/02/07 20:49:54  nils
   * changed startcode for library
 
   Revision 1.3  2003/01/14 18:46:04  nils

+ 95 - 33
packages/extra/amunits/units/lowlevel.pas

@@ -24,6 +24,11 @@
     Added the defines use_amiga_smartlink and
     use_auto_openlib.
     13 Jan 2003.
+    
+    Update for AmigaOS 3.9.
+    Changed startcode for unit.
+    09 Feb 2003.
+    
     [email protected]
 }
 
@@ -262,9 +267,9 @@ Const
 
 VAR LowLevelBase : pLibrary;
 
-FUNCTION AddKBInt(intRoutine : POINTER; intData : POINTER) : POINTER;
-FUNCTION AddTimerInt(intRoutine : POINTER; intData : POINTER) : POINTER;
-FUNCTION AddVBlankInt(intRoutine : POINTER; intData : POINTER) : POINTER;
+FUNCTION AddKBInt(const intRoutine : POINTER;const intData : POINTER) : POINTER;
+FUNCTION AddTimerInt(const intRoutine : POINTER;const intData : POINTER) : POINTER;
+FUNCTION AddVBlankInt(const intRoutine : POINTER;const intData : POINTER) : POINTER;
 FUNCTION ElapsedTime(context : pEClockVal) : ULONG;
 FUNCTION GetKey : ULONG;
 FUNCTION GetLanguageSelection : BYTE;
@@ -273,17 +278,30 @@ FUNCTION ReadJoyPort(port : ULONG) : ULONG;
 PROCEDURE RemKBInt(intHandle : POINTER);
 PROCEDURE RemTimerInt(intHandle : POINTER);
 PROCEDURE RemVBlankInt(intHandle : POINTER);
-FUNCTION SetJoyPortAttrsA(portNumber : ULONG; tagList : pTagItem) : BOOLEAN;
+FUNCTION SetJoyPortAttrsA(portNumber : ULONG;const tagList : pTagItem) : BOOLEAN;
 PROCEDURE StartTimerInt(intHandle : POINTER; timeInterval : ULONG; continuous : LONGINT);
 PROCEDURE StopTimerInt(intHandle : POINTER);
-FUNCTION SystemControlA(tagList : pTagItem) : ULONG;
+FUNCTION SystemControlA(const tagList : pTagItem) : ULONG;
 
 
+{Here we read how to compile this unit}
+{You can remove this include and use a define instead}
+{$I useautoopenlib.inc}
+{$ifdef use_init_openlib}
+procedure InitLOWLEVELLibrary;
+{$endif use_init_openlib}
+
+{This is a variable that knows how the unit is compiled}
+var
+    LOWLEVELIsCompiledHow : longint;
+
 IMPLEMENTATION
 
+{$ifndef dont_use_openlib}
 uses msgbox;
+{$endif dont_use_openlib}
 
-FUNCTION AddKBInt(intRoutine : POINTER; intData : POINTER) : POINTER;
+FUNCTION AddKBInt(const intRoutine : POINTER;const intData : POINTER) : POINTER;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -296,7 +314,7 @@ BEGIN
   END;
 END;
 
-FUNCTION AddTimerInt(intRoutine : POINTER; intData : POINTER) : POINTER;
+FUNCTION AddTimerInt(const intRoutine : POINTER;const  intData : POINTER) : POINTER;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -309,7 +327,7 @@ BEGIN
   END;
 END;
 
-FUNCTION AddVBlankInt(intRoutine : POINTER; intData : POINTER) : POINTER;
+FUNCTION AddVBlankInt(const intRoutine : POINTER;const intData : POINTER) : POINTER;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -413,7 +431,7 @@ BEGIN
   END;
 END;
 
-FUNCTION SetJoyPortAttrsA(portNumber : ULONG; tagList : pTagItem) : BOOLEAN;
+FUNCTION SetJoyPortAttrsA(portNumber : ULONG;const tagList : pTagItem) : BOOLEAN;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -453,7 +471,7 @@ BEGIN
   END;
 END;
 
-FUNCTION SystemControlA(tagList : pTagItem) : ULONG;
+FUNCTION SystemControlA(const tagList : pTagItem) : ULONG;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -465,52 +483,96 @@ BEGIN
   END;
 END;
 
-{$I useautoopenlib.inc}
-{$ifdef use_auto_openlib}
-   {$Info Compiling autoopening of lowlevel.library}
+const
+    { Change VERSION and LIBVERSION to proper values }
+
+    VERSION : string[2] = '0';
+    LIBVERSION : longword = 0;
+
+{$ifdef use_init_openlib}
+  {$Info Compiling initopening of lowlevel.library}
+  {$Info don't forget to use InitLOWLEVELLibrary in the beginning of your program}
 
 var
-    lowlevel_exit : pointer;
+    lowlevel_exit : Pointer;
 
-procedure CloseLowLevelLibrary;
+procedure CloselowlevelLibrary;
 begin
-    ExitProc := LowLevel_exit;
+    ExitProc := lowlevel_exit;
     if LowLevelBase <> nil then begin
-       CloseLibrary(LowLevelBase);
-       LowLevelBase := nil;
+        CloseLibrary(LowLevelBase);
+        LowLevelBase := nil;
     end;
 end;
 
-const
-    VERSION : string[2] = '37';
+procedure InitLOWLEVELLibrary;
+begin
+    LowLevelBase := nil;
+    LowLevelBase := OpenLibrary(LOWLEVELNAME,LIBVERSION);
+    if LowLevelBase <> nil then begin
+        lowlevel_exit := ExitProc;
+        ExitProc := @CloselowlevelLibrary;
+    end else begin
+        MessageBox('FPC Pascal Error',
+        'Can''t open lowlevel.library version ' + VERSION + #10 +
+        'Deallocating resources and closing down',
+        'Oops');
+        halt(20);
+    end;
+end;
+
+begin
+    LOWLEVELIsCompiledHow := 2;
+{$endif use_init_openlib}
+
+{$ifdef use_auto_openlib}
+  {$Info Compiling autoopening of lowlevel.library}
+
+var
+    lowlevel_exit : Pointer;
+
+procedure CloselowlevelLibrary;
+begin
+    ExitProc := lowlevel_exit;
+    if LowLevelBase <> nil then begin
+        CloseLibrary(LowLevelBase);
+        LowLevelBase := nil;
+    end;
+end;
 
 begin
     LowLevelBase := nil;
-    LowLevelBase := OpenLibrary(LOWLEVELNAME,37);
+    LowLevelBase := OpenLibrary(LOWLEVELNAME,LIBVERSION);
     if LowLevelBase <> nil then begin
-       LowLevel_exit := ExitProc;
-       ExitProc := @CloseLowLevelLibrary;
+        lowlevel_exit := ExitProc;
+        ExitProc := @CloselowlevelLibrary;
+        LOWLEVELIsCompiledHow := 1;
     end else begin
         MessageBox('FPC Pascal Error',
-                   'Can''t open LowLevel.library version ' +
-                   VERSION +
-                   chr(10) + 
-                   'Deallocating resources and closing down',
-                   'Oops');
-       halt(20);
+        'Can''t open lowlevel.library version ' + VERSION + #10 +
+        'Deallocating resources and closing down',
+        'Oops');
+        halt(20);
     end;
 
-{$else}
-   {$Warning No autoopening of lowlevel.library compiled}
-   {$Info Make sure you open lowlevel.library yourself}
 {$endif use_auto_openlib}
 
+{$ifdef dont_use_openlib}
+begin
+    LOWLEVELIsCompiledHow := 3;
+   {$Warning No autoopening of lowlevel.library compiled}
+   {$Warning Make sure you open lowlevel.library yourself}
+{$endif dont_use_openlib}
+
 END. (* UNIT LOWLEVEL *)
 
 
 {
   $Log$
-  Revision 1.3  2003-01-13 20:36:00  nils
+  Revision 1.4  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.3  2003/01/13 20:36:00  nils
   * added the defines use_amiga_smartlink
   * and use_auto_openlib
 

+ 79 - 21
packages/extra/amunits/units/nonvolatile.pas

@@ -21,6 +21,10 @@
     of the library.
     14 Jan 2003.
     
+    Update for Amigaos 3.9
+    Changed startcode for unit.
+    09 Feb 2003.
+    
     [email protected] Nils Sjoholm
 }
 
@@ -82,19 +86,32 @@ VAR NVBase : pLibrary;
 const
     NONVOLATILENAME : PChar = 'nonvolatile.library';
 
-FUNCTION DeleteNV(appName : pCHAR; itemName : pCHAR; killRequesters : LONGINT) : BOOLEAN;
+FUNCTION DeleteNV(const appName : pCHAR;const itemName : pCHAR; killRequesters : LONGINT) : BOOLEAN;
 PROCEDURE FreeNVData(data : POINTER);
-FUNCTION GetCopyNV(appName : pCHAR; itemName : pCHAR; killRequesters : LONGINT) : POINTER;
+FUNCTION GetCopyNV(const appName : pCHAR;const itemName : pCHAR; killRequesters : LONGINT) : POINTER;
 FUNCTION GetNVInfo(killRequesters : LONGINT) : pNVInfo;
-FUNCTION GetNVList(appName : pCHAR; killRequesters : LONGINT) : pMinList;
-FUNCTION SetNVProtection(appName : pCHAR; itemName : pCHAR; mask : LONGINT; killRequesters : LONGINT) : BOOLEAN;
-FUNCTION StoreNV(appName : pCHAR; itemName : pCHAR; data : POINTER; length : ULONG; killRequesters : LONGINT) : WORD;
+FUNCTION GetNVList(const appName : pCHAR; killRequesters : LONGINT) : pMinList;
+FUNCTION SetNVProtection(const appName : pCHAR;const itemName : pCHAR; mask : LONGINT; killRequesters : LONGINT) : BOOLEAN;
+FUNCTION StoreNV(const appName : pCHAR;const itemName : pCHAR;const data : POINTER; length : ULONG; killRequesters : LONGINT) : WORD;
+
+{Here we read how to compile this unit}
+{You can remove this include and use a define instead}
+{$I useautoopenlib.inc}
+{$ifdef use_init_openlib}
+procedure InitNONVOLATILELibrary;
+{$endif use_init_openlib}
+
+{This is a variable that knows how the unit is compiled}
+var
+    NONVOLATILEIsCompiledHow : longint;
 
 IMPLEMENTATION
 
+{$ifndef dont_use_openlib}
 uses msgbox;
+{$endif dont_use_openlib}
 
-FUNCTION DeleteNV(appName : pCHAR; itemName : pCHAR; killRequesters : LONGINT) : BOOLEAN;
+FUNCTION DeleteNV(const appName : pCHAR;const itemName : pCHAR; killRequesters : LONGINT) : BOOLEAN;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -122,7 +139,7 @@ BEGIN
   END;
 END;
 
-FUNCTION GetCopyNV(appName : pCHAR; itemName : pCHAR; killRequesters : LONGINT) : POINTER;
+FUNCTION GetCopyNV(const appName : pCHAR;const itemName : pCHAR; killRequesters : LONGINT) : POINTER;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -148,7 +165,7 @@ BEGIN
   END;
 END;
 
-FUNCTION GetNVList(appName : pCHAR; killRequesters : LONGINT) : pMinList;
+FUNCTION GetNVList(const appName : pCHAR; killRequesters : LONGINT) : pMinList;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -161,7 +178,7 @@ BEGIN
   END;
 END;
 
-FUNCTION SetNVProtection(appName : pCHAR; itemName : pCHAR; mask : LONGINT; killRequesters : LONGINT) : BOOLEAN;
+FUNCTION SetNVProtection(const appName : pCHAR;const itemName : pCHAR; mask : LONGINT; killRequesters : LONGINT) : BOOLEAN;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -179,7 +196,7 @@ BEGIN
   END;
 END;
 
-FUNCTION StoreNV(appName : pCHAR; itemName : pCHAR; data : POINTER; length : ULONG; killRequesters : LONGINT) : WORD;
+FUNCTION StoreNV(const appName : pCHAR;const itemName : pCHAR;const data : POINTER; length : ULONG; killRequesters : LONGINT) : WORD;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -195,9 +212,15 @@ BEGIN
   END;
 END;
 
-{$I useautoopenlib.inc}
-{$ifdef use_auto_openlib}
-  {$Info Compiling autoopening of nonvolatile.library}
+const
+    { Change VERSION and LIBVERSION to proper values }
+
+    VERSION : string[2] = '0';
+    LIBVERSION : longword = 0;
+
+{$ifdef use_init_openlib}
+  {$Info Compiling initopening of nonvolatile.library}
+  {$Info don't forget to use InitNONVOLATILELibrary in the beginning of your program}
 
 var
     nonvolatile_exit : Pointer;
@@ -211,18 +234,48 @@ begin
     end;
 end;
 
-const
-    { Change VERSION and LIBVERSION to proper values }
+procedure InitNONVOLATILELibrary;
+begin
+    NVBase := nil;
+    NVBase := OpenLibrary(NONVOLATILENAME,LIBVERSION);
+    if NVBase <> nil then begin
+        nonvolatile_exit := ExitProc;
+        ExitProc := @ClosenonvolatileLibrary;
+    end else begin
+        MessageBox('FPC Pascal Error',
+        'Can''t open nonvolatile.library version ' + VERSION + #10 +
+        'Deallocating resources and closing down',
+        'Oops');
+        halt(20);
+    end;
+end;
 
-    VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+begin
+    NONVOLATILEIsCompiledHow := 2;
+{$endif use_init_openlib}
+
+{$ifdef use_auto_openlib}
+  {$Info Compiling autoopening of nonvolatile.library}
+
+var
+    nonvolatile_exit : Pointer;
+
+procedure ClosenonvolatileLibrary;
+begin
+    ExitProc := nonvolatile_exit;
+    if NVBase <> nil then begin
+        CloseLibrary(NVBase);
+        NVBase := nil;
+    end;
+end;
 
 begin
     NVBase := nil;
     NVBase := OpenLibrary(NONVOLATILENAME,LIBVERSION);
     if NVBase <> nil then begin
         nonvolatile_exit := ExitProc;
-        ExitProc := @ClosenonvolatileLibrary
+        ExitProc := @ClosenonvolatileLibrary;
+        NONVOLATILEIsCompiledHow := 1;
     end else begin
         MessageBox('FPC Pascal Error',
         'Can''t open nonvolatile.library version ' + VERSION + #10 +
@@ -231,10 +284,15 @@ begin
         halt(20);
     end;
 
-{$else}
-   {$Warning No autoopening of nonvolatile.library compiled}
-   {$Info Make sure you open nonvolatile.library yourself}
 {$endif use_auto_openlib}
 
+{$ifdef dont_use_openlib}
+begin
+    NONVOLATILEIsCompiledHow := 3;
+   {$Warning No autoopening of nonvolatile.library compiled}
+   {$Warning Make sure you open nonvolatile.library yourself}
+{$endif dont_use_openlib}
+
+
 
 END. (* UNIT NONVOLATILE *)

+ 10 - 4
packages/extra/amunits/units/prefs.pas

@@ -21,6 +21,9 @@
     Added reaction and workbench.
     31 Jan 2003.
     
+    Changed integer > smallint.
+    09 Feb 2003.
+    
     [email protected] Nils Sjoholm
     
 }
@@ -99,7 +102,7 @@ Type
  tIControlPrefs = record
     ic_Reserved     : Array[0..3] Of Longint;       { System reserved              }
     ic_TimeOut      : WORD;                         { Verify timeout               }
-    ic_MetaDrag     : Integer;                      { Meta drag mouse event        }
+    ic_MetaDrag     : smallint;                      { Meta drag mouse event        }
     ic_Flags        : ULONG;                        { IControl flags (see below)   }
     ic_WBtoFront,                                   { CKey: WB to front            }
     ic_FrontToBack,                                 { CKey: front screen to back   }
@@ -139,7 +142,7 @@ Type
     ip_DoubleClick,
     ip_KeyRptDelay,
     ip_KeyRptSpeed : tTimeVal;
-    ip_MouseAccel  : Integer;
+    ip_MouseAccel  : smallint;
  end;
 
  {      File format for locale preferences }
@@ -328,7 +331,7 @@ Type
     pg_Aspect,
     pg_Shade,
     pg_Image        : Word;
-    pg_Threshold    : Integer;
+    pg_Threshold    : smallint;
     pg_ColorCorrect,
     pg_Dimensions,
     pg_Dithering    : Byte;
@@ -816,7 +819,10 @@ END.
 
 {
   $Log$
-  Revision 1.3  2003-02-07 20:45:08  nils
+  Revision 1.4  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.3  2003/02/07 20:45:08  nils
   * update for amigaos 3.9
 
   Revision 1.2  2002/11/19 18:48:39  nils

+ 83 - 24
packages/extra/amunits/units/realtime.pas

@@ -26,6 +26,11 @@
     library.
     14 Jan 2003.
 
+    Changed integer > smallint,
+            cardinal > longword.
+    Changed startcode for unit.
+    09 Feb 2003.
+    	    
     [email protected]
 }
 
@@ -220,7 +225,7 @@ Type
     rtb_Time,                      { current time                         }
     rtb_TimeFrac    : ULONG;       { fixed-point fraction part of time    }
     rtb_Reserved1   : WORD;
-    rtb_TickErr     : Integer;     { nanosecond error from ideal Tick     }
+    rtb_TickErr     : smallint;     { nanosecond error from ideal Tick     }
  end;                              { length to real tick length           }
 
 { Actual tick length is: 1/TICK_FREQ + rtb_TickErr/1e9 }
@@ -236,23 +241,34 @@ VAR RealTimeBase : pRealTimeBase;
 const
     REALTIMENAME : PChar = 'realtime.library';
 
-FUNCTION CreatePlayerA(tagList : pTagItem) : pPlayer;
+FUNCTION CreatePlayerA(const tagList : pTagItem) : pPlayer;
 PROCEDURE DeletePlayer(player : pPlayer);
 FUNCTION ExternalSync(player : pPlayer; minTime : LONGINT; maxTime : LONGINT) : BOOLEAN;
-FUNCTION FindConductor(name : pCHAR) : pConductor;
-FUNCTION GetPlayerAttrsA(player : pPlayer; tagList : pTagItem) : ULONG;
+FUNCTION FindConductor(const name : pCHAR) : pConductor;
+FUNCTION GetPlayerAttrsA(const player : pPlayer;const tagList : pTagItem) : ULONG;
 FUNCTION LockRealTime(lockType : ULONG) : POINTER;
-FUNCTION NextConductor(previousConductor : pConductor) : pConductor;
+FUNCTION NextConductor(const previousConductor : pConductor) : pConductor;
 FUNCTION SetConductorState(player : pPlayer; state : ULONG; time : LONGINT) : LONGINT;
-FUNCTION SetPlayerAttrsA(player : pPlayer; tagList : pTagItem) : BOOLEAN;
+FUNCTION SetPlayerAttrsA(player : pPlayer;const tagList : pTagItem) : BOOLEAN;
 PROCEDURE UnlockRealTime(lock : POINTER);
 
+{You can remove this include and use a define instead}
+{$I useautoopenlib.inc}
+{$ifdef use_init_openlib}
+procedure InitREALTIMELibrary;
+{$endif use_init_openlib}
+
+{This is a variable that knows how the unit is compiled}
+var
+    REALTIMEIsCompiledHow : longint;
 
 IMPLEMENTATION
 
+{$ifndef dont_use_openlib}
 uses msgbox;
+{$endif dont_use_openlib}
 
-FUNCTION CreatePlayerA(tagList : pTagItem) : pPlayer;
+FUNCTION CreatePlayerA(const tagList : pTagItem) : pPlayer;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -292,7 +308,7 @@ BEGIN
   END;
 END;
 
-FUNCTION FindConductor(name : pCHAR) : pConductor;
+FUNCTION FindConductor(const name : pCHAR) : pConductor;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -304,7 +320,7 @@ BEGIN
   END;
 END;
 
-FUNCTION GetPlayerAttrsA(player : pPlayer; tagList : pTagItem) : ULONG;
+FUNCTION GetPlayerAttrsA(const player : pPlayer;const tagList : pTagItem) : ULONG;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -329,7 +345,7 @@ BEGIN
   END;
 END;
 
-FUNCTION NextConductor(previousConductor : pConductor) : pConductor;
+FUNCTION NextConductor(const previousConductor : pConductor) : pConductor;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -355,7 +371,7 @@ BEGIN
   END;
 END;
 
-FUNCTION SetPlayerAttrsA(player : pPlayer; tagList : pTagItem) : BOOLEAN;
+FUNCTION SetPlayerAttrsA(player : pPlayer;const tagList : pTagItem) : BOOLEAN;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -382,9 +398,15 @@ BEGIN
   END;
 END;
 
-{$I useautoopenlib.inc}
-{$ifdef use_auto_openlib}
-  {$Info Compiling autoopening of realtime.library}
+const
+    { Change VERSION and LIBVERSION to proper values }
+
+    VERSION : string[2] = '0';
+    LIBVERSION : longword = 0;
+
+{$ifdef use_init_openlib}
+  {$Info Compiling initopening of realtime.library}
+  {$Info don't forget to use InitREALTIMELibrary in the beginning of your program}
 
 var
     realtime_exit : Pointer;
@@ -398,18 +420,48 @@ begin
     end;
 end;
 
-const
-    { Change VERSION and LIBVERSION to proper values }
+procedure InitREALTIMELibrary;
+begin
+    RealTimeBase := nil;
+    RealTimeBase := pRealTimeBase(OpenLibrary(REALTIMENAME,LIBVERSION));
+    if RealTimeBase <> nil then begin
+        realtime_exit := ExitProc;
+        ExitProc := @CloserealtimeLibrary;
+    end else begin
+        MessageBox('FPC Pascal Error',
+        'Can''t open realtime.library version ' + VERSION + #10 +
+        'Deallocating resources and closing down',
+        'Oops');
+        halt(20);
+    end;
+end;
 
-    VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+begin
+    REALTIMEIsCompiledHow := 2;
+{$endif use_init_openlib}
+
+{$ifdef use_auto_openlib}
+  {$Info Compiling autoopening of realtime.library}
+
+var
+    realtime_exit : Pointer;
+
+procedure CloserealtimeLibrary;
+begin
+    ExitProc := realtime_exit;
+    if RealTimeBase <> nil then begin
+        CloseLibrary(pLibrary(RealTimeBase));
+        RealTimeBase := nil;
+    end;
+end;
 
 begin
     RealTimeBase := nil;
     RealTimeBase := pRealTimeBase(OpenLibrary(REALTIMENAME,LIBVERSION));
     if RealTimeBase <> nil then begin
         realtime_exit := ExitProc;
-        ExitProc := @CloserealtimeLibrary
+        ExitProc := @CloserealtimeLibrary;
+        REALTIMEIsCompiledHow := 1;
     end else begin
         MessageBox('FPC Pascal Error',
         'Can''t open realtime.library version ' + VERSION + #10 +
@@ -418,17 +470,24 @@ begin
         halt(20);
     end;
 
-{$else}
-   {$Warning No autoopening of realtime.library compiled}
-   {$Info Make sure you open realtime.library yourself}
 {$endif use_auto_openlib}
 
+{$ifdef dont_use_openlib}
+begin
+    REALTIMEIsCompiledHow := 3;
+   {$Warning No autoopening of realtime.library compiled}
+   {$Warning Make sure you open realtime.library yourself}
+{$endif dont_use_openlib}
+
 
 END. (* UNIT REALTIME *)
 
 {
   $Log$
-  Revision 1.3  2003-01-14 18:46:04  nils
+  Revision 1.4  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.3  2003/01/14 18:46:04  nils
   * added defines use_amia_smartlink and use_auto_openlib
 
   * implemented autoopening of library
@@ -438,4 +497,4 @@ END. (* UNIT REALTIME *)
 
 }
 
-  
+

+ 16 - 9
packages/extra/amunits/units/rexx.pas

@@ -27,6 +27,10 @@
     the library.
     14 Jan 2003.
 
+    Changed integer > smallint,
+            cardinal > longword.
+    09 Feb 2003.
+    	    
     [email protected]
 }
 
@@ -199,7 +203,7 @@ Type
     pRexxRsrc = ^tRexxRsrc;
     tRexxRsrc = record
     rr_Node     : tNode;
-    rr_Func     : Integer;    { "auto-delete" offset          }
+    rr_Func     : smallint;    { "auto-delete" offset          }
     rr_Base     : Pointer;  { "auto-delete" base            }
     rr_Size     : Longint;  { total size of node            }
     rr_Arg1     : Longint;  { available ...                 }
@@ -419,18 +423,18 @@ Type
     rl_ReadLock : Word;    { lock count                    }
     rl_TraceFH  : Longint;  { global trace console          }
     rl_TaskList : tList;     { REXX task list                }
-    rl_NumTask  : Integer;    { task count                    }
+    rl_NumTask  : smallint;    { task count                    }
     rl_LibList  : tList;     { Library List header           }
-    rl_NumLib   : Integer;    { library count                 }
+    rl_NumLib   : smallint;    { library count                 }
     rl_ClipList : tList;     { ClipList header               }
-    rl_NumClip  : Integer;    { clip node count               }
+    rl_NumClip  : smallint;    { clip node count               }
     rl_MsgList  : tList;     { pending messages              }
-    rl_NumMsg   : Integer;    { pending count                 }
+    rl_NumMsg   : smallint;    { pending count                 }
     rl_PgmList  : tList;     { cached programs               }
-    rl_NumPgm   : Integer;    { program count                 }
+    rl_NumPgm   : smallint;    { program count                 }
 
     rl_TraceCnt : Word;    { usage count for trace console }
-    rl_avail    : Integer;
+    rl_avail    : smallint;
     end;
 
 Const
@@ -683,7 +687,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 {$ifdef use_init_openlib}
   {$Info Compiling initopening of rexxsyslib.library}
@@ -765,7 +769,10 @@ END. (* UNIT REXXSYSLIB *)
 
 {
   $Log$
-  Revision 1.5  2003-02-07 20:48:36  nils
+  Revision 1.6  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.5  2003/02/07 20:48:36  nils
   * update for amigaos 3.9
 
   * changed startcode for library

+ 68 - 13
packages/extra/amunits/units/translator.pas

@@ -21,6 +21,7 @@
     of the library.
     14 Jan 2003.
     
+    Changed startcode for unit.
     [email protected] Nils Sjoholm
 }
 
@@ -45,13 +46,26 @@ VAR TranslatorBase : pLibrary;
 const
     TRANSLATORNAME : PChar = 'translator.library';
 
-FUNCTION Translate(inputString : pCHAR; inputLength : LONGINT; outputBuffer : pCHAR; bufferSize : LONGINT) : LONGINT;
+FUNCTION Translate(const inputString : pCHAR; inputLength : LONGINT; outputBuffer : pCHAR; bufferSize : LONGINT) : LONGINT;
+
+{Here we read how to compile this unit}
+{You can remove this include and use a define instead}
+{$I useautoopenlib.inc}
+{$ifdef use_init_openlib}
+procedure InitTRANSLATORLibrary;
+{$endif use_init_openlib}
+
+{This is a variable that knows how the unit is compiled}
+var
+    TRANSLATORIsCompiledHow : longint;
 
 IMPLEMENTATION
 
+{$ifndef dont_use_openlib}
 uses msgbox;
+{$endif dont_use_openlib}
 
-FUNCTION Translate(inputString : pCHAR; inputLength : LONGINT; outputBuffer : pCHAR; bufferSize : LONGINT) : LONGINT;
+FUNCTION Translate(const inputString : pCHAR; inputLength : LONGINT; outputBuffer : pCHAR; bufferSize : LONGINT) : LONGINT;
 BEGIN
   ASM
     MOVE.L  A6,-(A7)
@@ -66,9 +80,15 @@ BEGIN
   END;
 END;
 
-{$I useautoopenlib.inc}
-{$ifdef use_auto_openlib}
-  {$Info Compiling autoopening of translator.library}
+const
+    { Change VERSION and LIBVERSION to proper values }
+
+    VERSION : string[2] = '0';
+    LIBVERSION : longword = 0;
+
+{$ifdef use_init_openlib}
+  {$Info Compiling initopening of translator.library}
+  {$Info don't forget to use InitTRANSLATORLibrary in the beginning of your program}
 
 var
     translator_exit : Pointer;
@@ -82,18 +102,48 @@ begin
     end;
 end;
 
-const
-    { Change VERSION and LIBVERSION to proper values }
+procedure InitTRANSLATORLibrary;
+begin
+    TranslatorBase := nil;
+    TranslatorBase := OpenLibrary(TRANSLATORNAME,LIBVERSION);
+    if TranslatorBase <> nil then begin
+        translator_exit := ExitProc;
+        ExitProc := @ClosetranslatorLibrary;
+    end else begin
+        MessageBox('FPC Pascal Error',
+        'Can''t open translator.library version ' + VERSION + #10 +
+        'Deallocating resources and closing down',
+        'Oops');
+        halt(20);
+    end;
+end;
 
-    VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+begin
+    TRANSLATORIsCompiledHow := 2;
+{$endif use_init_openlib}
+
+{$ifdef use_auto_openlib}
+  {$Info Compiling autoopening of translator.library}
+
+var
+    translator_exit : Pointer;
+
+procedure ClosetranslatorLibrary;
+begin
+    ExitProc := translator_exit;
+    if TranslatorBase <> nil then begin
+        CloseLibrary(TranslatorBase);
+        TranslatorBase := nil;
+    end;
+end;
 
 begin
     TranslatorBase := nil;
     TranslatorBase := OpenLibrary(TRANSLATORNAME,LIBVERSION);
     if TranslatorBase <> nil then begin
         translator_exit := ExitProc;
-        ExitProc := @ClosetranslatorLibrary
+        ExitProc := @ClosetranslatorLibrary;
+        TRANSLATORIsCompiledHow := 1;
     end else begin
         MessageBox('FPC Pascal Error',
         'Can''t open translator.library version ' + VERSION + #10 +
@@ -102,9 +152,14 @@ begin
         halt(20);
     end;
 
-{$else}
-   {$Warning No autoopening of translator.library compiled}
-   {$Info Make sure you open translator.library yourself}
 {$endif use_auto_openlib}
 
+{$ifdef dont_use_openlib}
+begin
+    TRANSLATORIsCompiledHow := 3;
+   {$Warning No autoopening of translator.library compiled}
+   {$Warning Make sure you open translator.library yourself}
+{$endif dont_use_openlib}
+
+
 END. (* UNIT TRANSLATOR *)

+ 14 - 7
packages/extra/amunits/units/workbench.pas

@@ -52,6 +52,10 @@
     Varargs functions are in systemvartags.
     02 Feb 2003.
 
+    Changed integer > smallint,
+            cardinal > longword.
+    09 Feb 2003.
+    	    
     [email protected]
 }
 
@@ -180,7 +184,7 @@ Const
 Type
     pFreeList = ^tFreeList;
     tFreeList = record
-        fl_NumFree      : Integer;
+        fl_NumFree      : smallint;
         fl_MemList      : tList;
     end;
 
@@ -236,8 +240,8 @@ Type
     am_ArgList       : pWBArgList;       {    the arguements themselves }
     am_Version       : Word;              {    will be AM_VERSION }
     am_Class         : Word;              {    message class }
-    am_MouseX        : Integer;              {    mouse x position of event }
-    am_MouseY        : Integer;              {    mouse y position of event }
+    am_MouseX        : smallint;              {    mouse x position of event }
+    am_MouseY        : smallint;              {    mouse y position of event }
     am_Seconds       : ULONG;            {    current system clock time }
     am_Micros        : ULONG;            {    current system clock time }
     am_Reserved      : Array[0..7] of ULONG;       {    avoid recompilation }
@@ -859,7 +863,7 @@ FUNCTION RemoveAppMenuItem(appMenuItem : pAppMenuItem) : BOOLEAN;
 FUNCTION RemoveAppWindow(appWindow : pAppWindow) : BOOLEAN;
 PROCEDURE WBInfo(lock : BPTR; name : pCHAR; screen : pScreen);
 
-FUNCTION AddAppWindowDropZoneA(aw : pAppWindow; id : CARDINAL; userdata : CARDINAL;const tags : pTagItem) : pAppWindowDropZone;
+FUNCTION AddAppWindowDropZoneA(aw : pAppWindow; id : longword; userdata : longword;const tags : pTagItem) : pAppWindowDropZone;
 FUNCTION ChangeWorkbenchSelectionA(name : pCHAR; hook : pHook;const tags : pTagItem) : BOOLEAN;
 FUNCTION CloseWorkbenchObjectA(name : pCHAR;const tags : pTagItem) : BOOLEAN;
 FUNCTION MakeWorkbenchObjectVisibleA(name : pCHAR;const tags : pTagItem) : BOOLEAN;
@@ -1005,7 +1009,7 @@ BEGIN
   END;
 END;
 
-FUNCTION AddAppWindowDropZoneA(aw : pAppWindow; id : CARDINAL; userdata : CARDINAL;const tags : pTagItem) : pAppWindowDropZone;
+FUNCTION AddAppWindowDropZoneA(aw : pAppWindow; id : longword; userdata : longword;const tags : pTagItem) : pAppWindowDropZone;
 BEGIN
   ASM
 	MOVE.L	A6,-(A7)
@@ -1162,7 +1166,7 @@ const
     { Change VERSION and LIBVERSION to proper values }
 
     VERSION : string[2] = '0';
-    LIBVERSION : Cardinal = 0;
+    LIBVERSION : longword = 0;
 
 {$ifdef use_init_openlib}
   {$Info Compiling initopening of workbench.library}
@@ -1244,7 +1248,10 @@ END. (* UNIT WB *)
 
 {
   $Log$
-  Revision 1.4  2003-02-07 20:48:36  nils
+  Revision 1.5  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.4  2003/02/07 20:48:36  nils
   * update for amigaos 3.9
 
   * changed startcode for library

+ 20 - 14
packages/extra/amunits/utilunits/consoleio.pas

@@ -2,7 +2,7 @@
     This file is part of the Free Pascal run time library.
 
     A file in Amiga system run time library.
-    Copyright (c) 1998-2002 by Nils Sjoholm
+    Copyright (c) 1998-2003 by Nils Sjoholm
     member of the Amiga RTL development team.
 
     See the file COPYING.FPC, included in this distribution,
@@ -27,6 +27,9 @@ unit consoleio;
     Added the define use_amiga_smartlink.
     13 Jan 2003.
     
+    Changed integer > smallint.
+    10 Feb 2003.
+    
     [email protected]
 
 }
@@ -71,10 +74,10 @@ Function ReadKey(con : pConsoleSet) : Char;
 Function KeyPressed(con : pConsoleSet) : Boolean;
 Procedure WriteString(con : pConsoleSet; Str : Pchar);
 Procedure WriteString(con : pConsoleSet; Str : string);
-Function MaxX(con : pConsoleSet) : integer;
-Function MaxY(con : pConsoleSet) : integer;
-Function WhereX(con : pConsoleSet) : integer;
-Function WhereY(con : pConsoleSet) : integer;
+Function MaxX(con : pConsoleSet) : smallint;
+Function MaxY(con : pConsoleSet) : smallint;
+Function WhereX(con : pConsoleSet) : smallint;
+Function WhereY(con : pConsoleSet) : smallint;
 Procedure TextColor(con : pConsoleSet; pen : Byte);
 Procedure TextBackground(con : pConsoleSet; pen : Byte);
 Procedure DetachConsole(con : pConsoleSet);
@@ -83,8 +86,8 @@ Procedure ClrScr(con : pConsoleSet);
 Procedure CursOff(con : pConsoleSet);
 Procedure CursOn(con : pConsoleSet);
 Procedure DelLine(con : pConsoleSet);
-Function LongToStr (I : integer) : String;
-Procedure GotoXY(con : pConsoleSet; x,y : integer);
+Function LongToStr (I : smallint) : String;
+Procedure GotoXY(con : pConsoleSet; x,y : smallint);
 Procedure InsLine(con : pConsoleSet);
 Procedure OpenConsoleDevice;
 Procedure CloseConsoleDevice;
@@ -229,7 +232,7 @@ begin
     ConPutStr(con^.WriteRequest, @temp[1]);
 end;
 
-Function MaxX(con : pConsoleSet) : integer;
+Function MaxX(con : pConsoleSet) : smallint;
 var
     CU : pConUnit;
 begin
@@ -237,7 +240,7 @@ begin
     MaxX := CU^.cu_XMax;
 end;
 
-Function MaxY(con : pConsoleSet) : integer;
+Function MaxY(con : pConsoleSet) : smallint;
 var
     CU : pConUnit;
 begin
@@ -245,7 +248,7 @@ begin
     MaxY := CU^.cu_YMax;
 end;
 
-Function WhereX(con : pConsoleSet) : integer;
+Function WhereX(con : pConsoleSet) : smallint;
 var
     CU : pConUnit;
 begin
@@ -253,7 +256,7 @@ begin
     WhereX := CU^.cu_XCP;
 end;
 
-Function WhereY(con : pConsoleSet) : integer;
+Function WhereY(con : pConsoleSet) : smallint;
 var
     CU : pConUnit;
 begin
@@ -340,7 +343,7 @@ begin
     WriteString(con, CSI + 'M');
 end;
 
-Function LongToStr (I : integer) : String;
+Function LongToStr (I : smallint) : String;
 Var
     S : String;
 begin
@@ -348,7 +351,7 @@ begin
     LongToStr:=S;
 end;
 
-Procedure GotoXY(con : pConsoleSet; x,y : integer);
+Procedure GotoXY(con : pConsoleSet; x,y : smallint);
 {
     Move the text cursor to the x,y position.  This routine uses
     the ANSI CUP command.
@@ -410,7 +413,10 @@ end.
 
 {
   $Log$
-  Revision 1.2  2003-01-13 18:14:56  nils
+  Revision 1.3  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.2  2003/01/13 18:14:56  nils
   * added the define use_amiga_smartlink
 
   Revision 1.1  2002/11/22 21:34:59  nils

+ 8 - 2
packages/extra/amunits/utilunits/doublebuffer.pas

@@ -59,6 +59,9 @@ unit doublebuffer;
      Added the define use_amiga_smartlink.
      13 Jan 2003.
 
+     Changed integer > smallint.
+     10 Feb 2003.
+     
      [email protected]
 }
 
@@ -102,7 +105,7 @@ var
     s : pScreen;
     w : pWindow;
     bm : pBitMap;
-    i,j : Integer;
+    i,j : smallint;
     nw : tNewWindow;
     rp : pRastPort;
 begin
@@ -242,7 +245,10 @@ end.
 
 {
   $Log$
-  Revision 1.2  2003-01-13 18:14:56  nils
+  Revision 1.3  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.2  2003/01/13 18:14:56  nils
   * added the define use_amiga_smartlink
 
   Revision 1.1  2002/11/22 21:34:59  nils

+ 12 - 5
packages/extra/amunits/utilunits/pcq.pas

@@ -49,6 +49,10 @@ unit pcq;
 
      Added the define use_amiga_smartlink.
      13 Jan 2003.
+     
+     Changed integer > smallint.
+     10 Feb 2003.
+     
      Nils Sjoholm < [email protected]
 
 }
@@ -174,13 +178,13 @@ Procedure strcpy(s1, s2 : pchar);
     Copies s2 into s1, appending a trailing zero.  This is the same
     as C, but opposite from 1.0.  
 }
-Procedure strncpy(s1, s2 : pchar; n : integer);    
+Procedure strncpy(s1, s2 : pchar; n : smallint);    
 {
     Copies s2 into s1, with a maximum of n characters.  Appends a
     trailing zero.
 }
 
-Procedure strncat(s1, s2 : pchar; n : integer);   
+Procedure strncat(s1, s2 : pchar; n : smallint);   
 {
     Appends at most n characters from s2 onto s1.
 }
@@ -372,12 +376,12 @@ begin
     strcopy(s1,s2)
 end;
 
-Procedure strncpy(s1, s2 : pchar; n : integer);    
+Procedure strncpy(s1, s2 : pchar; n : smallint);    
 begin
     strlcopy(s1,s2,n);
 end;
 
-Procedure strncat(s1, s2 : pchar; n : integer);   
+Procedure strncat(s1, s2 : pchar; n : smallint);
 begin
     strlcat(s1,s2,n);
 end;
@@ -454,7 +458,10 @@ end.
 
 {
   $Log$
-  Revision 1.2  2003-01-13 18:14:56  nils
+  Revision 1.3  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.2  2003/01/13 18:14:56  nils
   * added the define use_amiga_smartlink
 
   Revision 1.1  2002/11/22 21:34:59  nils

+ 13 - 8
packages/extra/amunits/utilunits/systemvartags.pas

@@ -2,7 +2,7 @@
     This file is part of the Free Pascal run time library.
 
     A file in Amiga system run time library.
-    Copyright (c) 1998-2002 by Nils Sjoholm
+    Copyright (c) 1998-2003 by Nils Sjoholm
     member of the Amiga RTL development team.
 
     See the file COPYING.FPC, included in this distribution,
@@ -35,12 +35,14 @@ uses exec,amigados, amigaguide, asl, bullet, intuition, datatypes ,
      
      Added the define use_amiga_smartlink.
      13 Jan 2003.
+     
+     Changed integer > smallint.
+     Moved ltrue and lfalse to exec.
+     10 Feb 2003.
+
      [email protected]
 }
-          
-const
-     ltrue  : longint = 1;
-     lfalse : longint = 0;
+
 
 {
      This is functions and procedures with array of const.
@@ -101,7 +103,7 @@ PROCEDURE GetRPAttrs(rp : pRastPort; Const argv : Array Of Const);
 FUNCTION ObtainBestPen(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG; Const argv : Array Of Const) : LONGINT;
 PROCEDURE SetRPAttrs(rp : pRastPort; Const argv : Array Of Const);
 FUNCTION VideoControlTags(colorMap : pColorMap; Const argv : Array Of Const) : BOOLEAN;
-FUNCTION WeighTAMatchTags(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; Const argv : Array Of Const) : INTEGER;
+FUNCTION WeighTAMatchTags(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; Const argv : Array Of Const) : smallint;
 
 { functions from intuition. }
 FUNCTION OpenScreenTags(newScreen : pNewScreen; tagList : array of const) : pScreen;
@@ -357,7 +359,7 @@ begin
     VideoControlTags := VideoControl(colorMap,readintags(argv));
 end;
 
-FUNCTION WeighTAMatchTags(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; Const argv : Array Of Const) : INTEGER;
+FUNCTION WeighTAMatchTags(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; Const argv : Array Of Const) : smallint;
 begin
     WeighTAMatchTags := WeighTAMatch(reqTextAttr,targetTextAttr,readintags(argv));
 end;
@@ -413,7 +415,10 @@ end.
 
 {
   $Log$
-  Revision 1.2  2003-01-13 18:14:56  nils
+  Revision 1.3  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.2  2003/01/13 18:14:56  nils
   * added the define use_amiga_smartlink
 
   Revision 1.1  2002/11/22 21:34:59  nils

+ 5 - 7
packages/extra/amunits/utilunits/tagsarray.pas

@@ -19,8 +19,7 @@
 
      First version of this unit.
      Just use this unit when you want to
-     use taglist. Remember that you have
-     to use $mode objfpc in your programs.
+     use taglist.
 
      09 Nov 2002
 
@@ -35,10 +34,6 @@ interface
 
 uses Exec, Utility;
 
-const
-    ltrue : longint = 1;
-    lfalse : longint = 0;
-
 
 function readintags(const args : array of const): pTagItem;
 
@@ -77,7 +72,10 @@ end.
 
 {
   $Log$
-  Revision 1.1  2002-11-22 21:34:59  nils
+  Revision 1.2  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.1  2002/11/22 21:34:59  nils
 
     * initial release
 

+ 12 - 6
packages/extra/amunits/utilunits/wbargs.pas

@@ -23,6 +23,9 @@
      Added the define use_amiga_smartlink.
      13 Jan 2003.
      
+     Changed integer > smallint.
+     10 Feb 2003.
+     
      [email protected] Nils Sjoholm
 }
 
@@ -39,8 +42,8 @@ uses workbench,amigados;
 
 function GetStartupMsg: pWBStartup;
 function ProgramName: string;
-function WBArgCount: integer;
-function GetWBArg(num : Integer): STRING;
+function WBArgCount: smallint;
+function GetWBArg(num : smallint): STRING;
 
 implementation
 
@@ -69,7 +72,7 @@ begin
     end;
 end;
 
-function WBArgCount: integer;
+function WBArgCount: smallint;
 var
    WBMsg : pWBStartup;
 begin
@@ -79,10 +82,10 @@ begin
    else WBArgCount := 0;
 end;
 
-function GetWBArg(num : Integer): string;
+function GetWBArg(num : smallint): string;
 var
     WBMsg : pWBStartup;
-    param : Integer;
+    param : smallint;
 begin
     WBMsg := GetStartupMsg;
     if WBMsg <> nil then begin
@@ -101,7 +104,10 @@ end.
 
 {
   $Log$
-  Revision 1.2  2003-01-13 18:14:56  nils
+  Revision 1.3  2003-02-10 17:59:46  nils
+  *  fixes for delphi mode
+
+  Revision 1.2  2003/01/13 18:14:56  nils
   * added the define use_amiga_smartlink
 
   Revision 1.1  2002/11/22 21:34:59  nils