Imported Upstream version 0.1beta
[debian/yforth] / config.h
1 /* yForth? - Written by Luca Padovani (C) 1996/97
2  * ------------------------------------------------------------------------
3  * This software is FreeWare as long as it comes with this header in each
4  * source file, anyway you can use it or any part of it whatever
5  * you want. It comes without any warranty, so use it at your own risk.
6  * ------------------------------------------------------------------------
7  * Module name:     config.h
8  * Abstract:        configuration file. Before any compilation please check
9  *                  that actual configuration is consistent with your
10  *                  hardware AND your compiler.
11  */
12
13 /* module definition: 1 indicates that a module should be included in the
14  * base vocabulary, 0 excludes a module. Note however that some words in
15  * excluded word lists may be linked to final code if used by other words.
16  */
17
18 #define COREE_DEF           1L
19 #define DOUBLE_DEF          1L
20 #define DOUBLEE_DEF         1L
21 #define FLOAT_DEF           1L
22 #define FLOATE_DEF          1L
23 #define MEMALL_DEF          1L
24 #define MEMALLE_DEF         0L
25 #define SEARCH_DEF          1L
26 #define SEARCHE_DEF         1L
27 #define TOOLS_DEF           1L
28 #define TOOLSE_DEF          1L
29 #define LOCALS_DEF          1L
30 #define LOCALSE_DEF         1L
31 #define FACILITY_DEF        1L
32 #define FACILITYE_DEF       0L
33 #define BLOCK_DEF           1L
34 #define BLOCKE_DEF          1L
35 #define EXCEPTION_DEF       1L
36 #define EXCEPTIONE_DEF      0L
37 #define FILE_DEF            1L
38 #define FILEE_DEF           1L
39 #define STRING_DEF          1L
40 #define STRINGE_DEF         0L
41
42 #define VERSION_PATTERN     (COREE_DEF | (DOUBLE_DEF << 1) |\
43                                                          (DOUBLEE_DEF << 2) | (FLOAT_DEF << 3) |\
44                              (FLOATE_DEF << 4) | (MEMALL_DEF << 5) |\
45                              (MEMALLE_DEF << 6) | (SEARCH_DEF << 7) |\
46                              (SEARCHE_DEF << 8) | (TOOLS_DEF << 9) |\
47                              (TOOLSE_DEF << 10) | (LOCALS_DEF << 11) |\
48                              (LOCALSE_DEF << 12) | (FACILITY_DEF << 13) |\
49                              (FACILITYE_DEF << 14) | (BLOCK_DEF << 15) |\
50                              (BLOCKE_DEF << 16) | (EXCEPTION_DEF << 17) |\
51                              (EXCEPTIONE_DEF << 18) | (FILE_DEF << 19) |\
52                              (FILEE_DEF << 20) | (STRING_DEF << 21) |\
53                              (STRINGE_DEF << 22)\
54                             )
55
56 /************************************************************************/
57 /* compilation and machine dependent definitions                        */
58 /************************************************************************/
59
60 /* Define LITTLE_ENDIAN if you machine is little-endian (e.g. Intel), undefine
61  * it if your machine is big-endian (e.g. Motorola, Sparc...)
62  * Note that some compilers have LITTLE_ENDIAN yet defined.
63  */
64 #ifndef LITTLE_ENDIAN
65 #       define LITTLE_ENDIAN
66 #endif
67
68 /* When DCELL_MEM is defined, double cell transfer is realized by memory
69  * copy, if not defined shift and logical operators are used to combine
70  * or isolate cell values
71  */
72 #define DCELL_MEM
73  
74 /* DATA TYPES: please modify this list accordingly to your system. Note that
75  * sizeof(DCell) == 2 * sizeof(Cell) MUST BE satisfied.
76  * For example, using Borland C for DOS Cell may be "int" and DCell "long int".
77  * Under Linux, Cell may be "int" and DCell "long long".
78  */
79
80 #define Cell                            int
81 #define Char                            char
82 #define Real                            long double     
83
84 #define UCell                           unsigned Cell
85 #define DCell               long long
86 #define UDCell                          unsigned DCell
87 #define UChar                           unsigned Char
88
89 #define CellBits            (sizeof(Cell) * 8)
90 #define CellLog             (sizeof(Cell) - 1)
91 #define RealLog                         (sizeof(Real) - 1)
92
93 #define FFLAG(n)            (-(n))
94
95 /* Please modify this definitions accordingly with your data types */
96
97 #define MAX_CHAR                        UCHAR_MAX
98 #define MAX_D                           LONG_MAX
99 #define MAX_N                           INT_MAX
100 #define MAX_U                           UINT_MAX
101 #define MAX_UD                          ULONG_MAX
102 #define MAX_F                           0.0
103
104 /* Some compilers doesn't provide some functions in the standard library.
105  * If you don't have, undefine them
106  */ 
107 #define HAVE_ACOSH
108 #define HAVE_ASINH
109 #define HAVE_ATANH