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