home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 116.lha / SmallTalk / Sources / env.h < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-20  |  3.0 KB  |  154 lines

  1. /*
  2.     Little Smalltalk, version two
  3.     Written by Tim Budd, Oregon State University, July 1987
  4.  
  5.     environmental factors
  6.  
  7.     This include file gathers together environmental factors that
  8.     are likely to change from one C compiler to another, or from
  9.     one system to another.    Please refer to the installation
  10.     notes for more information.
  11. */
  12.  
  13. /* ### the following two define statements should be edit to conform
  14. to your specific system, and should be the only changes most installations
  15. need to make ### */
  16.  
  17. /*============= define the kind of system you are on ===========*/
  18. #ifndef AMIGA
  19. # define AMIGA
  20. #endif
  21.  
  22. # define INITIALIMAGE "imageFile"
  23.  
  24. /*=============== rules for various systems ====================*/
  25.  
  26. # ifdef B42
  27.     /* Berkeley 4.2, 4.3 and compatible, which include: */
  28.         /* sequent balance */
  29.         /* Harris HCX-7 */
  30.         /* sun workstations */
  31.  
  32. typedef unsigned char byte;
  33.  
  34. # define byteToInt(b) (b)
  35.  
  36. # define longCanBeInt(l) (l == (l & 037777))
  37.  
  38. # define STRING
  39. # define SIGNALS
  40.  
  41. # endif
  42.  
  43. # ifdef SYSV
  44.     /* system V systems including: */
  45.     /*    HP-UX for the HP-9000 series */
  46.     /*    TEK 4404 with some modifications (see install.ms) */
  47.  
  48. typedef unsigned char byte;
  49.  
  50. # define byteToInt(b) (b)
  51.  
  52. # define longCanBeInt(l) (l == (l & 037777))
  53.  
  54. # define STRING
  55. # define SIGNALS
  56.  
  57. # endif
  58.  
  59. # ifdef TURBOC
  60.     /* IBM PC and compatiables using the TURBO C compiler */
  61.  
  62.     /* there are also changes that have to be made to the
  63.         smalltalk source; see installation notes for
  64.         details */
  65.  
  66. typedef unsigned char byte;
  67.  
  68. # define byteToInt(b) (b)
  69.  
  70. # define longCanBeInt(l) (l == (l & 037777))
  71.  
  72. # define STRING
  73. # define SSIGNALS
  74. # define ALLOC
  75. # define BINREADWRITE
  76. # define PROTO
  77.  
  78. #endif
  79.  
  80. /*============= Commodore Amiga / Lattice C v4.0    */
  81.  
  82. # ifdef AMIGA
  83.  
  84. typedef unsigned char byte;
  85.  
  86. # define byteToInt(b) (b)
  87.  
  88. # define longCanBeInt(l) (l == (l & 037777))
  89.  
  90. # define STRING
  91. # define SIGNALS
  92. #include <stdlib.h>
  93.  
  94. # endif
  95.  
  96.  
  97. /* ======== various defines that should work on all systems ==== */
  98.  
  99. # define true 1
  100. # define false 0
  101.  
  102.     /* define the datatype boolean */
  103. # ifdef NOTYPEDEF
  104. # define boolean int
  105. # endif
  106. # ifndef NOTYPEDEF
  107. typedef int boolean;
  108. # endif
  109.  
  110.     /* define a bit of lint silencing */
  111.     /*  ignore means ``i know this function returns something,
  112.         but I really, really do mean to ignore it */
  113. # ifdef NOVOID
  114. # define ignore
  115. # define noreturn
  116. # define void int
  117. # endif
  118. # ifndef NOVOID
  119. # define ignore (void)
  120. # define noreturn void
  121. # endif
  122.  
  123. /* prototypes are another problem.  If they are available, they should be
  124. used; but if they are not available their use will cause compiler errors.
  125. To get around this we define a lot of symbols which become nothing if
  126. prototypes aren't available */
  127. # ifdef PROTO
  128.  
  129. # define X ,
  130. # define OBJ object
  131. # define OBJP object *
  132. # define INT int
  133. # define BOOL boolean
  134. # define STR char *
  135. # define FLOAT double
  136. # define NOARGS void
  137. # define FILEP FILE *
  138.  
  139. # endif
  140.  
  141. # ifndef PROTO
  142.  
  143. # define X
  144. # define OBJ
  145. # define OBJP
  146. # define INT
  147. # define BOOL
  148. # define STR
  149. # define FLOAT
  150. # define NOARGS
  151. # define FILEP
  152.  
  153. # endif
  154.