home *** CD-ROM | disk | FTP | other *** search
/ Really Useful CD 1 / ReallyUsefulCD1.iso / extras / languages / smalltalk / _smalltalk / parser / h / env < prev    next >
Encoding:
Text File  |  1989-11-19  |  6.5 KB  |  225 lines

  1. /*
  2. Little Smalltalk
  3.  
  4. execution environment definitions.
  5.  
  6. The Little Smalltalk system is tailored to various machines by
  7. changing defined constants.  These constants, and their meanings,
  8. are as follows:
  9.  
  10. CURSES     defined if the curses(3) library is available and the primitive
  11.            graphics it provides is desired
  12.  
  13. GAMMA      defined if gamma() is part of the math library
  14.  
  15. ENVSAVE    defined if it is required to save environ during fast load
  16.  
  17. FACTMAX    maximum integer value for which a factorial can be computed by
  18.            repeated multiplication without overflow.
  19.  
  20. FASTDEFAULT defined if the default behavior should be to do a fast load
  21.  
  22. FLUSHREQ   if defined a fflush is given after every call to printf
  23.            or fprintf
  24.  
  25. INLINE    generate inline code for increments or decrements -
  26.           produces larger, but faster, code.
  27.  
  28. MDWINDOWS defined if the maryland windows package is used
  29.  
  30. NOSYSTEM  defined if the system() call is NOT provided
  31.           (seriously limits functionality)
  32.  
  33. OPEN3ARG  defined if 3 argument style opens are used
  34.  
  35. PLOT3     defined if you have a device for which the plot(3) routines work
  36.           directly on the terminal (without a filter)
  37.           provides many of these routines as primitive operations
  38.           (see class PEN in /prelude)
  39.  
  40. SMALLDATA if defined various means are used to reduce the size of the
  41.           data segment, at the expense of some functionality.
  42.  
  43. SIGS      define in the signal system call is available
  44.           for trapping user interrupt signals
  45.  
  46. SETJUMP   defined if the setjump facility is available 
  47.  
  48. In addition to defining constants, the identifier type ``unsigned
  49. character'' needs to be defined.  Bytecodes are stored using this datatype.
  50. On machines which do not support this datatype directly, macros need to be
  51. defined that convert normal chars into unsigned chars.  unsigned chars are
  52. defined by a typedef for ``uchar'' and a pair of macros that convert an int
  53. into a uchar and vice-versa.
  54.  
  55. In order to simplify installation on systems to which the
  56. Little Smalltalk system has already been ported, various ``meta-defines''
  57. are recognized.  By defining one of these symbols, the correct definitions
  58. for other symbols will automatically be generated.  The currently
  59. recognized meta-defines are as follows:
  60.  
  61. BERK42      Vax Berkeley 4.2
  62. DECPRO      Dec Professional 350 running Venix
  63. HP9000      Hewlett Packard 9000
  64. PDP1170     PdP 11/70 (also other PDP 11 machines)
  65. PERKELM     Perken Elmer 8/32
  66. RIDGE       Ridge ROS 3.1
  67. IBMPC       IBM PC/AT with MSDOS, Microsoft C v4.0
  68. ARM         Acorn Archimedes
  69.  
  70. Finally, a few path names have to be compiled into the code.
  71. These path names are the following:
  72.  
  73. TEMPFILE - a temporary file name in mktemp format
  74. PARSER   - the location of the parser
  75. PRELUDE  - the location of the standard prelude in ascii format
  76. FAST     - the location of the standard prelude in saved format
  77. LIBLOC   - the location of the directory for additional libraries
  78.  
  79. */
  80.  
  81. #define ARM
  82.  
  83. #ifndef ARM
  84. # define TEMPFILE "/usr/tmp/stXXXXXX"
  85. # define PARSER   "/users/budd/Projects/smalltalk/bin/parse"
  86. # define PRELUDE  "/users/budd/Projects/smalltalk/prelude/standard"
  87. # define FAST     "/users/budd/Projects/smalltalk/prelude/stdsave"
  88. # define LIBLOC  "/users/budd/Projects/smalltalk/prelude"
  89. #endif
  90.  
  91. /* ------------------ ARM directory names */
  92.  
  93. #ifdef ARM
  94. # define TEMPFILE "<lst$Dir>.stXXXXXX"
  95. # define PARSER   "<lst$Dir>.lstparse"  /* only if in library or on Run$Path! */
  96. # define PRELUDE  "<lst$Dir>.prelude.standard"
  97. # define FAST     "<lst$Dir>.prelude.stdsave"
  98. # define LIBLOC   "<lst$Dir>.prelude"
  99. #endif
  100.  
  101. /* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>meta-define <<<<<<<<<<<<<<<*/
  102.  
  103. /*------------------------------ Acorn Archimedes */
  104.  
  105. #ifdef ARM
  106.  
  107. #define FACTMAX    12
  108. #define FLUSHREQ        /* Flush after every print */
  109. #define SIGS
  110. #define SETJUMP
  111. #define PLOT3
  112. typedef unsigned char uchar;
  113. #define itouc(x) ((uchar) x)
  114. #define uctoi(x) ((int) x)
  115.  
  116. #endif  /* ARM Definitions */
  117.  
  118.  
  119.  
  120. /*------------------------------  IBM PC with MSDOS, Microsoft C v4.0 */
  121.  
  122. # ifdef IBMPC
  123.  
  124. # define FACTMAX 8
  125. # define SIGS
  126. # define SETJUMP
  127. typedef unsigned char uchar;
  128. # define itouc(x) ((uchar) x)
  129. # define uctoi(x) ((int) x)
  130.  
  131. # endif /* end of IBM PC definition */
  132.  
  133. /*------------------------------  VAX Berkeley 4.2 definition */
  134. # ifdef BERK42
  135.  
  136. # define GAMMA/* gamma value is known */
  137. # define FACTMAX 12
  138. # define FLUSHREQ/* flush after every printf */
  139. # define SIGS
  140. # define SETJUMP
  141. typedef unsigned char uchar;
  142. # define itouc(x) ((uchar) x)
  143. # define uctoi(x) ((int) x)
  144. /* # define MDWINDOWS */
  145. /* FASTLOADING DOES work, and should eventually be defined to be standard*/
  146. /*# define FASTDEFAULT*//* default to fast-loading */
  147.  
  148. # endif/* BERK42 definition */
  149.  
  150. /*------------------------------  HP 9000 / HP - UX definition */
  151. # ifdef HP9000
  152.  
  153. # define GAMMA/* gamma value is known */
  154. # define FACTMAX 12
  155. # define FLUSHREQ/* flush after every printf */
  156. # define SIGS
  157. # define SETJUMP
  158. typedef unsigned char uchar;
  159. # define itouc(x) ((uchar) x)
  160. # define uctoi(x) ((int) x)
  161.  
  162. # endif/* HP 9000 definition */
  163.  
  164. /* ---------------------------------------RIDGE ROS 3.1 definition */
  165. # ifdef RIDGE
  166.  
  167. # define GAMMA/* gamma value is known */
  168. # define FACTMAX 12
  169. typedef unsigned char uchar;
  170. # define itouc(x) ((uchar) x)
  171. # define uctoi(x) ((int) x)
  172.  
  173. # endif/* RIDGE definition */
  174.  
  175. /* --------------------------------------------DEC PRO definitions */
  176. # ifdef DECPRO
  177.  
  178. /* GAMMA, OPEN3ARG not defined */
  179. # define ENVSAVE
  180. # define FACTMAX 8
  181. # define SMALLDATA
  182. /* unsigned characters not supported, but can be simulated */
  183. typedef char uchar;
  184. # define itouc(x) ((uchar) x)
  185. # define uctoi(x) (unsigned) (x >= 0 ? x : x + 256)
  186.  
  187. # endif/* DECPRO definition */
  188.  
  189. /* --------------------------------------------PDP11/70 definitions */
  190. # ifdef PDP1170
  191.  
  192. /* GAMMA, OPEN3ARG not defined */
  193. # define ENVSAVE
  194. # define FACTMAX 8
  195. # define FLUSHREQ
  196. # define SIGS
  197. # define SETJUMP
  198. /* unsigned characters not supported, but can be simulated */
  199. typedef char uchar;
  200. # define itouc(x) ((uchar) x)
  201. # define uctoi(x) (unsigned) (x >= 0 ? x : x + 256)
  202.  
  203. # endif/* PDP1170 definition */
  204.  
  205. /*------------------------------  Perkin Elmer 8/32 definitions */
  206. # ifdef PERKELM
  207.  
  208. # define ENVSAVE
  209. # define FACTMAX 12
  210. # define FLUSHREQ/* flush after every printf */
  211. typedef unsigned char uchar;
  212. # define itouc(x) ((uchar) x)
  213. # define uctoi(x) ((int) x)
  214.  
  215. # endif/* PERKELM definition */
  216.  
  217. /******************************************************************/
  218. /*
  219. the following are pretty much independent of any system
  220. */
  221.  
  222. # define INLINE       /* produce in line code for incs and decs */
  223. /* # define CURSES*/
  224. /* # define PLOT3 */
  225.