home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sources / misc / 4250 / include.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-11  |  3.3 KB  |  133 lines

  1. //$$ include.h           include files required by various versions of C++
  2.  
  3. //#define Glock                         // for Glockenspiel on the PC
  4. //#define ATandT                        // for AT&T C++ on a Sun
  5.  
  6. //#define SETUP_C_SUBSCRIPTS              // allow element access via A[i][j]
  7.  
  8.  
  9. #define TEMPS_DESTROYED_QUICKLY         // for compiler that delete
  10.                     // temporaries too quickly
  11.  
  12. //#define DO_FREE_CHECK                   // check news and deletes balance
  13.  
  14. #define USING_DOUBLE                    // elements of type double
  15. //#define USING_FLOAT                   // elements of type float
  16.  
  17. #define Version21                       // version 2.1 or later
  18.  
  19.  
  20. #ifdef _MSC_VER                         // Microsoft
  21.    #include <stdlib.h>
  22.  
  23.    typedef int jmp_buf[9];
  24.    extern "C"
  25.    {
  26.       int __cdecl setjmp(jmp_buf);
  27.       void __cdecl longjmp(jmp_buf, int);
  28.    }
  29.  
  30.    #ifdef WANT_STREAM
  31.       #include <iostream.h>
  32.       #include <iomanip.h>
  33.    #endif
  34.    #ifdef WANT_MATH
  35.       #include <math.h>
  36.       #include <float.h>
  37.    #endif
  38. #endif
  39.  
  40. #ifdef __ZTC__                          // Zortech
  41.    #include <stdlib.h>
  42.    #ifdef WANT_STREAM
  43.       #include <stream.hpp>
  44.       #define flush ""                  // doesn't have io manipulators
  45.    #endif
  46.    #ifdef WANT_MATH
  47.       #include <math.h>
  48.       #include <float.h>
  49.    #endif
  50. #endif
  51.  
  52. #ifdef __BCPLUSPLUS__                   // Borland
  53.    #include <stdlib.h>
  54.    #ifdef WANT_STREAM
  55.       #include <iostream.h>
  56.       #include <iomanip.h>
  57.    #endif
  58.    #ifdef WANT_MATH
  59.       #include <math.h>
  60.       #define SystemV                   // optional in Borland
  61.       #include <values.h>               // Borland has both float and values
  62.    #endif
  63.    #undef __TURBOC__                    // also defined in Borland
  64. #endif
  65.  
  66. #ifdef __TURBOC__                       // Turbo
  67.    #include <stdlib.h>
  68.    #ifdef WANT_STREAM
  69.       #include <iostream.h>
  70.       #include <iomanip.h>
  71.    #endif
  72.    #ifdef WANT_MATH
  73.       #include <math.h>
  74.       #define SystemV                   // optional in Turbo
  75.       #include <values.h>
  76.    #endif
  77. #endif
  78.  
  79. #ifdef ATandT                           // AT&T
  80. #include <stdlib.h>
  81. #ifdef WANT_STREAM
  82. #include <iostream.h>
  83. #include <iomanip.h>
  84. #endif
  85. #ifdef WANT_MATH
  86. #include <math.h>
  87. #define SystemV                         // must use System V on my Sun
  88. #include <values.h>                     //    as float.h is not present
  89. #endif
  90. #endif
  91.  
  92. #ifdef __GNUG__                         // Gnu C++
  93.    #include <stdlib.h>
  94.    #ifdef WANT_STREAM
  95.       #include <stream.h>               // no iomanip in G++
  96.       #define flush ""
  97.    #endif
  98.    #ifdef WANT_MATH
  99.       #include <math.h>
  100.       #include <float.h>
  101.    #endif
  102.    #ifndef TEMPS_DESTROYED_QUICKLY
  103.       #define TEMPS_DESTROYED_QUICKLY
  104.    #endif
  105. #endif
  106.  
  107. #ifdef Glock                            // Glockenspiel
  108.    extern "C" { #include <stdlib.h> }
  109.    #ifdef WANT_STREAM
  110.       #include <stream.hxx>
  111.       #include <iomanip.hxx>
  112.    #endif
  113.    #ifdef WANT_MATH
  114.       extern "C" { #include <math.h> }
  115.       extern "C" { #include <float.h> }
  116.    #endif
  117.    #define NO_LONG_NAMES                // very long names don't work
  118. #endif
  119.  
  120.  
  121.  
  122. #ifdef USING_FLOAT                      // set precision type to float
  123. typedef float Real;
  124. typedef double long_Real;
  125. #endif
  126.  
  127. #ifdef USING_DOUBLE                     // set precision type to double
  128. typedef double Real;
  129. typedef long double long_Real;
  130. #endif
  131.  
  132.  
  133.