a68g-generic.h

     
   1  //! @file a68g-generic.h
   2  //! @author J. Marcel van der Veer
   3  
   4  //! @section Copyright
   5  //!
   6  //! This file is part of Algol68G - an Algol 68 compiler-interpreter.
   7  //! Copyright 2001-2024 J. Marcel van der Veer [algol68g@xs4all.nl].
   8  
   9  //! @section License
  10  //!
  11  //! This program is free software; you can redistribute it and/or modify it 
  12  //! under the terms of the GNU General Public License as published by the 
  13  //! Free Software Foundation; either version 3 of the License, or 
  14  //! (at your option) any later version.
  15  //!
  16  //! This program is distributed in the hope that it will be useful, but 
  17  //! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
  18  //! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 
  19  //! more details. You should have received a copy of the GNU General Public 
  20  //! License along with this program. If not, see [http://www.gnu.org/licenses/].
  21  
  22  //! @section Synopsis
  23  //!
  24  //! Platform dependent definitions.
  25  
  26  #if !defined (__A68G_LEGACY_H__)
  27  #define __A68G_LEGACY_H__
  28  
  29  typedef int INT_T;
  30  typedef unt UNSIGNED_T;
  31  typedef UNSIGNED_T ADDR_T;
  32  typedef REAL_T A68_LONG_COMPLEX[2];
  33  typedef REAL_T DOUBLE_T;
  34  
  35  typedef int *A68_ALIGN_T;
  36  
  37  #define A68_LD "%d"
  38  #define A68_LU "%u"
  39  #define A68_LX "%x"
  40  
  41  #define a68_strtoi strtol
  42  #define a68_strtou strtoul
  43  
  44  #define A68_FRAME_ALIGN(s) ((int) ((s) % 8) == 0 ? (s) : ((s) - (s) % 8 + 8))
  45  
  46  typedef REAL_T MP_REAL_T;
  47  typedef int MP_INT_T;
  48  typedef unt MP_BITS_T;
  49  typedef MP_REAL_T MP_T;
  50  
  51  #define FLOOR_MP floor
  52  
  53  extern void stand_longlong_bits (void);
  54  
  55  #endif