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 typedef char *lword; /* max(word, char *) but in every case was char* */
68 #define BINARYREAD "rb"
69 #define BINARYWRITE "wb"
70 #define DIRECTOLD "r+b"
71 #define DIRECTNEW "w+b"
81 extern char *calloc(int,int);
84 #define mallocate(n) ((memory) (char /*|||huge*/ *) calloc((n),sizeof(word)))
85 #define ballocate(n) ((char /*|||huge*/ *) calloc((n),1))
87 #define MAXINTEGER 0x7FFF
88 #define DEFMEMSIZE 0x7FF0 /* 32K words = 64K bytes */
89 #define MAXMEMSIZE 0x7FF0 /* 32K words = 64K bytes */
99 typedef word huge *memory;
103 extern char *calloc(int,int);
105 #define mallocate(n) (((n)<60000)?(memory) calloc((n),sizeof(word)):abort())
106 #define ballocate(n) (calloc((n),1))
108 #define MAXINTEGER 0x7FFFFFFFL
109 #define DEFMEMSIZE 0x13C00L /* 79K words = 316K bytes */
110 #define MAXMEMSIZE 0x400000L /* 4M words = 16M bytes */
114 extern char huge *halloc();
116 #define mallocate(n) ((memory) halloc((long) (n), sizeof(word)))
117 #define ballocate(n) (halloc((long) (n),1L))
119 #define MAXINTEGER 0x7FFFFFFFL
120 #define DEFMEMSIZE 0x13C00L /* 79K words = 316K bytes */
121 #define MAXMEMSIZE 0x400000L /* 4M words = 16M bytes */
123 #define INCL_DOSINFOSEG
127 #elif MSDOS && TURBOC
129 extern char far *farcalloc();
131 #define mallocate(n) ((memory) farcalloc((long) (n), (long) sizeof(word)))
132 #define ballocate(n) (farcalloc((long) (n),1L))
134 #define MAXINTEGER 0x7FFFFFFFL
135 #define DEFMEMSIZE 0x14000L /* 80K words = 320K bytes */
136 #define MAXMEMSIZE 0x28000L /* 160K words = 640K bytes */
140 extern void huge *halloc();
141 #define mallocate(n) ((memory) halloc((long) (n), sizeof(word)))
142 #define ballocate(n) (halloc((long) (n),1))
144 #define MAXINTEGER 0x7FFFFFFFL
145 #define DEFMEMSIZE 0xF000L /* 60K words = 120K bytes */
146 #define MAXMEMSIZE 0x28000L /* 160K words = 640K bytes */
149 #error Allocation macros not defined.
160 typedef word *memory;
162 #define mallocate(n) ((memory) (char *) calloc((n),sizeof(word)))
163 #define ballocate(n) ((char *) calloc((n),1))
165 /* printf("|%d*4|",(n)),getchar(),\ */
167 #define MAXINTEGER 0x7FFFFFFFL
168 #define DEFMEMSIZE 0x13C00L /* 79K words = 316K bytes */
169 #define MAXMEMSIZE 0x400000L /* 4M words = 16M bytes */