a68g-level-3.h

You can download the current version of Algol 68 Genie and its documentation here.

   1 //! @file a68g-level-3.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-2023 J. Marcel van der Veer .
   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 .
  21 
  22 //! @section Synopsis
  23 //!
  24 //! Platform dependent definitions.
  25 
  26 #if !defined (__A68G_LEVEL_3_H__)
  27 #define __A68G_LEVEL_3_H__
  28 
  29 typedef long long int INT_T;
  30 typedef long long unt UNSIGNED_T;
  31 typedef UNSIGNED_T ADDR_T;
  32 typedef __float128 DOUBLE_T;
  33 typedef struct A68_DOUBLE A68_DOUBLE, A68_LONG_INT, A68_LONG_REAL, A68_LONG_BITS;
  34 typedef DOUBLE_T A68_ALIGN_T;
  35 
  36 typedef union QUAD_WORD_T QUAD_WORD_T;
  37 
  38 union QUAD_WORD_T
  39 {
  40   UNSIGNED_T u[2];
  41   DOUBLE_T f;
  42 };
  43 
  44 struct A68_DOUBLE
  45 {
  46   STATUS_MASK_T status;
  47   QUAD_WORD_T value;
  48 } ALIGNED;
  49 
  50 typedef A68_LONG_REAL A68_LONG_COMPLEX[2];
  51 #define DOUBLE_COMPLEX_T __complex128
  52 
  53 #define a68_strtoi strtoll
  54 #define a68_strtou strtoull
  55 
  56 #define A68_LD "%lld"
  57 #define A68_LU "%llu"
  58 #define A68_LX "%llx"
  59 
  60 #define A68_FRAME_ALIGN(s) (A68_ALIGN(s))
  61 #define SIGNQ(n) ((n) == 0.0q ? 0 : ((n) > 0 ? 1 : -1))
  62 
  63 extern void standardise_double (DOUBLE_T *, int, int, int *);
  64 extern DOUBLE_T ten_up_double (int);
  65 extern BOOL_T convert_radix_double (NODE_T *, QUAD_WORD_T, int, int);
  66 
  67 typedef __float80 MP_REAL_T;
  68 typedef INT_T MP_INT_T;
  69 typedef UNSIGNED_T MP_BITS_T;
  70 typedef INT_T MP_T;
  71 
  72 #define FLOOR_MP floorl
  73 
  74 #endif