Integration of OCCT 6.5.0 from SVN
[occt.git] / src / CGM / cgmmach.h
CommitLineData
7fd59977 1/* Get local machine id, operating system, compiler and/or library */
2
3#ifndef CGMMACH_H
4#define CGMMACH_H
5
6/* C Library routines needed in standard include files */
7
8#include <stdio.h>
9#include <string.h>
10#include <stdlib.h>
11#include <math.h>
12#include <ctype.h>
13#include <time.h>
14
15/* Current CGM version */
16#define CGMVERSION 1
17
18#define const
19#define volatile
20#define FREE(x) free ( (char *) x )
21
22#ifndef NULL /* Null Pointer */
23#define NULL (int *) 0
24#endif
25
26/* Define anything that has not been explicitly set **************/
27
28#ifndef SignChar
29#define SignChar signed char
30#endif
31#ifndef Int16
32#define Int16 short
33#endif
34#ifndef Char
35#define Char char
36#endif
37#ifndef Int
38#define Int int
39#endif
40#ifndef Long
41#define Long long
42#endif
43#ifndef Float
44#define Float float
45#endif
46#ifndef Double
47#define Double double
48#endif
49
50/* Define macros for some maths routines which may cause problems */
51
52#ifndef SQRT
53#define SQRT(x) sqrt( (double) (x) )
54#endif
55#ifndef FABS
56#define FABS(x) fabs( (double) (x) )
57#endif
58#ifndef MALLOC
59#define MALLOC(n,s) malloc( (size_t) ((n)*(s)) )
60#endif
61
62/* Define if font system needed */
63
64#ifdef XW
65#define FONTSYSTEM
66#else
67#ifdef POSTSCRIPT
68#define FONTSYSTEM
69#else
70#ifdef IGL
71#define FONTSYSTEM
72#endif
73#endif
74#endif
75
76
77#ifndef FIXED_BUFFER /* Use variable communications Area by default */
78#define VAR_BUFFER
79#endif
80
81#ifndef ARRAY_MAX /* Maximum Sizes for Interface buffer */
82#define ARRAY_MAX 1024
83#endif
84
85#ifndef STRING_MAX /* Maximum String length */
86#define STRING_MAX 1024
87#endif
88
89#ifndef DEFOUT /* Default Standard Output type */
90#define DEFOUT 'T'
91#endif
92
93#ifndef ERROR_MAX /* Maximum Number of errors */
94#define ERROR_MAX 16
95#endif
96
97#ifndef DEFVERBOSE /* Default Verbose mode flag */
98#define DEFVERBOSE FALSE
99#endif
100
101#ifndef DEFQUIET /* Default quiet output flag */
102#define DEFQUIET FALSE
103#endif
104
105#ifndef DEFMOVIE /* Default Continuous play mode */
106#define DEFMOVIE FALSE
107#endif
108
109#ifndef DEFDOUBLE /* Default Double buffer mode */
110#define DEFDOUBLE FALSE
111#endif
112
113#ifndef DEFFULLSCRN /* Default Full screen mode */
114#define DEFFULLSCRN TRUE
115#endif
116
117#ifndef DEFRALGKSGDP /* RAL-GKS GDPs recognised */
118#define DEFRALGKSGDP FALSE
119#endif
120
121#ifndef LPOINT /* Define default LPOINT commands */
122#define Lpoint Point
123
124#define LPOINT(p) Lpoint *p
125#define BEGINLIST(p)
126#define STOREPOINT(p,q) (*p).x = q.x; (*p++).y = q.y
127#define STOREVALUE(p,q,r) (*p).x = q; (*p++).y = r
128#define CLOSELIST(p)
129#define NEWSUBLIST(p)
130#define ENDLIST(p)
131#endif
132
133#ifndef MAXFNSIZE /* Maximum font name size */
134#define MAXFNSIZE 40
135#endif
136
137#ifndef DATADIR /* Directory for font & data files */
138#define DATADIR ""
139#endif
140
141#ifndef FILESEP /* File seperator */
142#define FILESEP "."
143#endif
144
145#ifndef PATHDELIM /* Path seperator */
146#define PATHDELIM '/'
147#endif
148
149#ifndef MAXFLSIZE /* Maximum length of filename - whole tree */
150#define MAXFLSIZE 80
151#endif
152
153#ifndef NAMELGTH /* Maximum length of filename - name only */
154#define NAMELGTH 8
155#endif
156
157#ifndef EXTLGTH /* Maximum length of filename - extension */
158#define EXTLGTH 3
159#endif
160
161#ifndef LFILEDEF /* Maximum length of filename extra data */
162#define LFILEDEF 0
163#endif
164
165#ifndef F_READ /* Read file mode */
166#define F_READ 'r'
167#endif
168
169#ifndef F_WRITE /* Write file mode */
170#define F_WRITE 'w'
171#endif
172
173#ifndef BUFF_LEN /* CGM output record length */
174#define BUFF_LEN (size_t) 80
175#endif
176
177#ifndef OBUFF_LEN /* CGM output buffer size */
178#define OBUFF_LEN (size_t) 512
179#endif
180
181#ifndef NFRAME /* Maximum number of frames */
182#define NFRAME 100
183#endif
184
185#ifndef NMETA /* Maximum number of metafiles */
186#define NMETA 10
187#endif
188
189#ifndef MAXPTS /* Maximum storage for fill area processing */
190#define MAXPTS 4096
191#endif
192
193#ifndef SET_MAX /* Maximum number of Polygon sets ?? */
194#define SET_MAX 50
195#endif
196
197#ifndef COLOUR_TAB /* Colour table size */
198#define COLOUR_TAB 256
199#endif
200
201#ifndef COLOUR_BITS /* Number of bit planes */
202#define COLOUR_BITS 8
203#endif
204
205#ifndef PATT_TAB /* Pattern table size */
206#define PATT_TAB 1024
207#endif
208
209#ifndef PATTERNS /* Maximum number of Patterns */
210#define PATTERNS 40
211#endif
212
213#ifndef NPOWER /* No of entries in power-of-two table */
214#define NPOWER 32
215#endif
216
217#ifndef HASHSIZE /* No of entries in Code hash table */
218#if CGMVERSION == 1
219#define HASHSIZE 280
220#endif
221#if CGMVERSION == 2
222#define HASHSIZE 512
223#endif
224#if CGMVERSION == 3
225#define HASHSIZE 1024
226#endif
227#endif
228
229#ifndef NULLSTR /* Null string pointer */
230#define NULLSTR (char *) NULL
231#endif
232
233#ifdef DEBUG /* turn on extra debugging in font package */
234#define CSETNAMES
235#define DESNAMES
236#endif
237
238 /* All the following definitions provide limits for the number
239 | of values that can be read in by the font utility; they do
240 | not cause any permanent memory to be allocated, so can be
241 | set high for safety.
242 */
243
244#ifndef MAXCSET /* maximum number of ISO character sets */
245#define MAXCSET 1000
246#endif
247
248#ifndef MAXFUDGE /* maximum number of fudge character sets */
249#define MAXFUDGE 25
250#endif
251
252#ifndef MAXFAMILY /* maximum number of typeface family definitions */
253#define MAXFAMILY 2000
254#endif
255
256#ifndef MAXALIAS /* maximum number of family aliases */
257#define MAXALIAS 200
258#endif
259
260#ifndef MAXSFONT /* maximum number of specific fonts */
261#define MAXFONT 2000
262#endif
263
264#ifndef MAXSOURCE /* maximum number of typeface sources */
265#define MAXSOURCE 100
266#endif
267
268#ifndef MAXDESIGN /* maximum number of ISO design groups */
269#define MAXDESIGN 200
270#endif
271
272#ifndef MAXMETHOD /* maximum number of output methods */
273#define MAXMETHOD 5
274#endif
275
276#ifndef MAXFPERM /* maximum number of fonts per method */
277#define MAXFPERM 1000
278#endif
279
280#ifndef MAXREQ /* maximum number of fonts per method */
281#define MAXREQ 1000
282#endif
283
284#endif /* end of cgmmach.h */