{ Copyright (c) 2000 by Bernhard R. Link (2:2476/841.64;brl@gmx.de)
****************************************************************************
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
****************************************************************************}
Unit ATypes;
{***********************************
 Provides several independent Types:
  Int1  8-bit signed Integer
  UInt1  8-bit unsigned Integer
  Int2 16-bit signed Integer
  UInt2 16-bit unsigned Integer
  UInt4 32-bit unsigned Integer (signed in BP and VP!!!)
  Int4 32-bit signed Integer
  uInt8 64-bit unsigned Integer
  aChar 8Bit char
 ***********************************
|--------|
|Warning:|
|--------|
Only calculate with uint4 after $I beginUDW.inc and before $I endUDW.inc
or you will get Runtime errors when using BP, that typically arrise half a
year after coding!
---------------------------------------------------------------------------}
interface
{$I platform.inc}
{$IFDEF PPC_VIRTUAL}
uses vpSysLow; {for tQuad}
{$ENDIF}

{Not yet found an exception:}
Type Int1=ShortInt;
     UInt1=Byte;
     Int4=Longint;
     aChar=Char;

{$IFDEF PPC_FPC}
Type uInt2=Word;
     uInt4=cardinal;
{$Note Here is cardinal, why does it generate 215?}
{$ELSE}
{$IFDEF PPC_VIRTUAL}
Type uInt2=System.Word;
     uInt4=Longint;
     Int8=TQuad;
{$ELSE}
{$IFDEF PPC_DELPHI2}
Type uInt2=Word;
     uInt4=cardinal;
{$ELSE}
Type uInt2=Word;
     uInt4=Longint;
{$ENDIF}
{$ENDIF}
{$ENDIF}

Type TFileOfs=Int4; {Signed, so -1 can show errors. Who wants more than 2GB?}
     TFileOfs4=Int4; {Several Stuctures use, that this Type needs four Bytes, so
                     if you anhance TFileOfs, keep TFileOfs4 intact}

implementation
end.

