rts-enquiries.c

     
   1  //! @file rts-enquiries.c
   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  //! Environment enquiries.
  25  
  26  #include "a68g.h"
  27  #include "a68g-genie.h"
  28  #include "a68g-prelude.h"
  29  #include "a68g-numbers.h"
  30  #include "a68g-mp.h"
  31  
  32  A68_ENV_INT (genie_int_lengths, 3);
  33  A68_ENV_INT (genie_int_shorths, 1);
  34  A68_ENV_INT (genie_real_lengths, 3);
  35  A68_ENV_INT (genie_real_shorths, 1);
  36  A68_ENV_INT (genie_complex_lengths, 3);
  37  A68_ENV_INT (genie_complex_shorths, 1);
  38  #if (A68_LEVEL >= 3)
  39  A68_ENV_INT (genie_bits_lengths, 2);
  40  #else
  41  A68_ENV_INT (genie_bits_lengths, 3);
  42  #endif
  43  A68_ENV_INT (genie_bits_shorths, 1);
  44  A68_ENV_INT (genie_bytes_lengths, 2);
  45  A68_ENV_INT (genie_bytes_shorths, 1);
  46  A68_ENV_INT (genie_int_width, A68_INT_WIDTH);
  47  A68_ENV_INT (genie_long_int_width, A68_LONG_INT_WIDTH);
  48  A68_ENV_INT (genie_long_mp_int_width, A68_LONG_LONG_INT_WIDTH);
  49  A68_ENV_INT (genie_real_width, A68_REAL_WIDTH);
  50  A68_ENV_INT (genie_long_real_width, A68_LONG_REAL_WIDTH);
  51  A68_ENV_INT (genie_long_mp_real_width, A68_LONG_LONG_REAL_WIDTH);
  52  A68_ENV_INT (genie_exp_width, A68_EXP_WIDTH);
  53  A68_ENV_INT (genie_long_exp_width, A68_LONG_EXP_WIDTH);
  54  A68_ENV_INT (genie_long_mp_exp_width, A68_LONG_LONG_EXP_WIDTH);
  55  A68_ENV_INT (genie_bits_width, A68_BITS_WIDTH);
  56  #if (A68_LEVEL >= 3)
  57  A68_ENV_INT (genie_long_bits_width, A68_LONG_BITS_WIDTH);
  58  #else
  59  A68_ENV_INT (genie_long_bits_width, get_mp_bits_width (M_LONG_BITS));
  60  A68_ENV_INT (genie_long_mp_bits_width, get_mp_bits_width (M_LONG_LONG_BITS));
  61  #endif
  62  A68_ENV_INT (genie_bytes_width, A68_BYTES_WIDTH);
  63  A68_ENV_INT (genie_long_bytes_width, A68_LONG_BYTES_WIDTH);
  64  A68_ENV_INT (genie_max_abs_char, UCHAR_MAX);
  65  A68_ENV_INT (genie_max_int, A68_MAX_INT);
  66  A68_ENV_INT (genie_mp_radix, MP_RADIX);
  67  A68_ENV_INT (genie_stack_pointer, A68_SP);
  68  A68_ENV_INT (genie_system_stack_size, A68 (stack_size));
  69  A68_ENV_REAL (genie_cputime, seconds () - A68 (cputime_0));
  70  A68_ENV_REAL (genie_max_real, A68_REAL_MAX);
  71  A68_ENV_REAL (genie_min_real, A68_REAL_MIN);
  72  A68_ENV_REAL (genie_pi, CONST_PI);
  73  A68_ENV_REAL (genie_small_real, A68_REAL_EPS);
     


© 2002-2024 J.M. van der Veer (jmvdveer@xs4all.nl)