1 /* Loglan82 Compiler&Interpreter
2 Copyright (C) 1993 Institute of Informatics, University of Warsaw
3 Copyright (C) 1993, 1994 LITA, Pau
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 contacts: Andrzej.Salwicki@univ-pau.fr
22 LITA Departement d'Informatique
24 Avenue de l'Universite
26 tel. ++33 59923154 fax. ++33 59841696
28 =======================================================================
39 #error Define one of MSDOS/OS2/UNIX
50 #error Define one of WORD_16BIT/DWORD_16BIT/WORD_32BIT
66 /* max(word, char *) but in every case was char* */
69 #define BINARYREAD "rb"
70 #define BINARYWRITE "wb"
71 #define DIRECTOLD "r+b"
72 #define DIRECTNEW "w+b"
82 extern char *calloc(int,int);
85 #define mallocate(n) ((memory) (char /*|||huge*/ *) calloc((n),sizeof(word)))
86 #define ballocate(n) ((char /*|||huge*/ *) calloc((n),1))
88 #define MAXINTEGER 0x7FFF
89 #define DEFMEMSIZE 0x7FF0 /* 32K words = 64K bytes */
90 #define MAXMEMSIZE 0x7FF0 /* 32K words = 64K bytes */
100 typedef word huge *memory;
104 extern char *calloc(int,int);
106 #define mallocate(n) (((n)<60000)?(memory) calloc((n),sizeof(word)):abort())
107 #define ballocate(n) (calloc((n),1))
109 #define MAXINTEGER 0x7FFFFFFFL
110 #define DEFMEMSIZE 0x13C00L /* 79K words = 316K bytes */
111 #define MAXMEMSIZE 0x400000L /* 4M words = 16M bytes */
115 extern char huge *halloc();
117 #define mallocate(n) ((memory) halloc((long) (n), sizeof(word)))
118 #define ballocate(n) (halloc((long) (n),1L))
120 #define MAXINTEGER 0x7FFFFFFFL
121 #define DEFMEMSIZE 0x13C00L /* 79K words = 316K bytes */
122 #define MAXMEMSIZE 0x400000L /* 4M words = 16M bytes */
124 #define INCL_DOSINFOSEG
128 #elif MSDOS && TURBOC
130 extern char far *farcalloc();
132 #define mallocate(n) ((memory) farcalloc((long) (n), (long) sizeof(word)))
133 #define ballocate(n) (farcalloc((long) (n),1L))
135 #define MAXINTEGER 0x7FFFFFFFL
136 #define DEFMEMSIZE 0x14000L /* 80K words = 320K bytes */
137 #define MAXMEMSIZE 0x28000L /* 160K words = 640K bytes */
141 extern void huge *halloc();
142 #define mallocate(n) ((memory) halloc((long) (n), sizeof(word)))
143 #define ballocate(n) (halloc((long) (n),1))
145 #define MAXINTEGER 0x7FFFFFFFL
146 #define DEFMEMSIZE 0xF000L /* 60K words = 120K bytes */
147 #define MAXMEMSIZE 0x28000L /* 160K words = 640K bytes */
150 #error Allocation macros not defined.
161 typedef word *memory;
163 #define mallocate(n) ((memory) (char *) calloc((n),sizeof(word)))
164 #define ballocate(n) ((char *) calloc((n),1))
166 /* printf("|%d*4|",(n)),getchar(),\ */
168 #define MAXINTEGER 0x7FFFFFFFL
169 #define DEFMEMSIZE 0x13C00L /* 79K words = 316K bytes */
170 #define MAXMEMSIZE 0x400000L /* 4M words = 16M bytes */