2 Copyright (c) 1999-2012 OPEN CASCADE SAS
4 The content of this file is subject to the Open CASCADE Technology Public
5 License Version 6.5 (the "License"). You may not use the content of this file
6 except in compliance with the License. Please obtain a copy of the License
7 at http://www.opencascade.org and read it completely before using this file.
9 The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 The Original Code and all software distributed under the License is
13 distributed on an "AS IS" basis, without warranty of any kind, and the
14 Initial Developer hereby disclaims all such warranties, including without
15 limitation, any warranties of merchantability, fitness for a particular
16 purpose or non-infringement. Please see the License for the specific terms
17 and conditions governing the rights and limitations under the License.
24 /* Include the files on which this is dependent. */
40 /* Error function call */
42 Extern int CGMerror ( char*, int, Enum, char*);
44 Extern int CGMerror ();
49 Extern int CGMcounterr ( void );
51 Extern int CGMcounterr();
54 /* Macro to make life a little simpler */
56 #define CGMERROR (void) CGMerror
58 /* Error categories */
60 #define WARNING (Enum) 1
61 #define ERROR (Enum) 2
62 #define FATAL (Enum) 3
64 /* Return Codes - (System Dependent) */
67 #define RC_FILERR (Index) 28
70 #define RC_FATAL (Index) 99
72 #define RC_NULL (Index) 0
76 #define ERR_NOTFOUND -1
77 #define ERR_MANYERR 100
78 #define ERR_APNDTXT 101
79 #define ERR_BIGCELL 102
80 #define ERR_BIGEDGES 103
81 #define ERR_BIGINTS 104
82 #define ERR_BIGPATT 105
83 #define ERR_BIGPOINTS 106
84 #define ERR_BIGSTR 107
85 #define ERR_DIRCELL 108
86 #define ERR_DIRPATT 109
87 #define ERR_ELEMENT 110
88 #define ERR_ENCODING 111
90 #define ERR_FEWPNTS 113
91 #define ERR_FONTFILE 114
92 #define ERR_INTCHR 115
93 #define ERR_INVATT 116
94 #define ERR_INVCOLR 117
95 #define ERR_INVCONT 118
96 #define ERR_INVDELIM 119
97 #define ERR_INVELEM 120
98 #define ERR_INVENUM 121
99 #define ERR_INVESC 122
100 #define ERR_INVMFDESC 123
101 #define ERR_INVOPCODE 124
102 #define ERR_INVOUT 125
103 #define ERR_INVPDESC 126
104 #define ERR_INVPRIM 127
105 #define ERR_MAXCOLR 128
106 #define ERR_MENUFONT 129
107 #define ERR_MFOPEN 130
108 #define ERR_NOBACKSP 131
109 #define ERR_NOCLT 132
110 #define ERR_NOCODE 133
111 #define ERR_NOFONT 134
112 #define ERR_NOGDP 135
113 #define ERR_NOMEMORY 136
114 #define ERR_NOTAPNDTXT 137
115 #define ERR_NOTCGM 138
116 #define ERR_NOTERM 139
117 #define ERR_OPENFILE 140
118 #define ERR_PATINDEX 141
119 #define ERR_PATTABLE 142
120 #define ERR_PICOPEN 143
121 #define ERR_REDIRECT 144
122 #define ERR_SEEKEOF 145
123 #define ERR_VERSION 146
124 #define ERR_DIRCOL 147
125 #define ERR_HUFFMAN 148
126 #define ERR_STATE 149
127 #define ERR_NAME2LONG 150
128 #define ERR_INVARG 151
129 #define ERR_INVASF 152
130 #define ERR_RALGKS111 153
131 #define ERR_NOENDPIC 154
132 #define ERR_NODRIVER 155
133 #define ERR_RANDOM 156
134 #define ERR_INVOPT 157
135 #define ERR_NOFILE 158
136 #define ERR_CELL2SMALL 159
137 #define ERR_ELMNOTSUP 160
138 #define ERR_BADPENDEF 161
139 #define ERR_PICLGRPAP 162
140 #define ERR_GDIFAIL 163
142 /* General font system messages */
144 #define ERR_NOCSETS 200
145 #define ERR_BADCSETS 201
146 #define ERR_NOFAMS 202
147 #define ERR_BADFAMS 203
148 #define ERR_NOFAMSYN 204
149 #define ERR_BADFAMSYN 205
150 #define ERR_NODSN 206
151 #define ERR_BADDSN 207
152 #define ERR_CSETRANGE 208
153 #define ERR_CSETUNKNOWN 209
154 #define ERR_FONTRANGE 210
155 #define ERR_METHOD 211
156 #define ERR_NOMETHODS 212
157 #define ERR_METHRANGE 213
158 #define ERR_NOREQFONTS 214
159 #define ERR_PACKMISSING 215
160 #define ERR_NOFMATCH 216
161 #define ERR_NOFSETS 217
162 #define ERR_BADFSETS 218
163 #define ERR_XSFPERM 219
164 #define ERR_XSISOCSETS 220
165 #define ERR_XSISOFONTS 221
166 #define ERR_XSFAMILY 222
167 #define ERR_XSALIAS 223
168 #define ERR_XSDESIGN 224
169 #define ERR_XSSOURCE 225
170 #define ERR_XSSFONTS 226
171 #define ERR_XSRFONTS 227
172 #define ERR_NOFNTSPACE 228
173 #define ERR_XFONTLIST 229
174 #define ERR_XOPENDISP 230
176 /* Bezier font system messages */
178 #define ERR_BEZDIR 250
179 #define ERR_BEZDBAD 251
180 #define ERR_NOFONTS 252
181 #define ERR_BEZOPEN 253
182 #define ERR_BEZNODEF 254
183 #define ERR_DBUNAV 255
184 #define ERR_NPCINSTR 256
185 #define ERR_FNTNOTSUP 257
186 #define ERR_CURVE2BIG 258
187 #define ERR_FNTNOTOPEN 259
188 #define ERR_COMPZERO 260
189 #define ERR_FILCOR 261
191 /* Text and PostScript system messages */
193 #define ERR_NOPROLG 300
194 #define ERR_NOALIAS 301
195 #define ERR_TXTSYSNFND 302
196 #define ERR_2MANYFILES 303
197 #define ERR_CHBASEZERO 304
198 #define ERR_CHUPZERO 305
200 /* Polygon and Polygon Set messages */
202 #define ERR_NOMEMPSL 400
203 #define ERR_BADEDGETAB 401
215 struct errmessage cgmerrs[] =
218 ERR_2MANYFILES, RC_FATAL, "Too many metafiles in input file.",
219 ERR_APNDTXT, RC_NULL, "Append Text in wrong state",
220 ERR_BADCSETS, RC_NULL, "Character set file corrupt",
221 ERR_BADDSN, RC_NULL, "Design group file corrupt",
222 ERR_BADEDGETAB, RC_NULL, "Edge table corrupt",
223 ERR_BADFAMS, RC_NULL, "Font file corrupt",
224 ERR_BADFAMSYN, RC_NULL, "Font alias file corrupt",
225 ERR_BADFSETS, RC_NULL, "Fudge character set definition file corrupt",
226 ERR_BEZDBAD, RC_NULL, " ",
227 ERR_DBUNAV, RC_NULL, "Font database unavailable",
228 ERR_BEZDIR, RC_NULL, " ",
229 ERR_FILCOR, RC_NULL, "Bezier file corrupt",
230 ERR_BEZNODEF, RC_NULL, "No defined characters in font",
231 ERR_NOFONTS, RC_NULL, "No fonts in directory",
232 ERR_BEZOPEN, RC_NULL, " ",
233 ERR_BIGCELL, RC_NULL, "Cell Array too big",
234 ERR_BIGEDGES, RC_NULL, "Too many edges",
235 ERR_BIGINTS, RC_NULL, "Too many intersections",
236 ERR_BIGPATT, RC_NULL, "Patterns size too large",
237 ERR_BIGPOINTS, RC_NULL, "Too many points",
238 ERR_BIGSTR, RC_NULL, "String too long",
239 ERR_COMPZERO, RC_NULL, "Both character components are zero",
240 ERR_CSETRANGE, RC_NULL, "Character set index out of range",
241 ERR_CSETUNKNOWN, RC_NULL, "Character set index unknown",
242 ERR_CHBASEZERO, RC_NULL, "Character base vector zero",
243 ERR_CHUPZERO, RC_NULL, "Character up vector zero",
244 ERR_CURVE2BIG, RC_NULL, "Expanded curve too big for system",
245 ERR_DIRCELL, RC_NULL, "Direct Colour Cell arrays not supported",
246 ERR_DIRCOL, RC_FATAL, "Direct Colour not supported",
247 ERR_DIRPATT, RC_NULL, "Direct Colour Patterns not supported",
248 ERR_ELEMENT, RC_NULL, "Unknown Element",
249 ERR_ENCODING, RC_FATAL, "Unknown CGM encoding",
250 ERR_EOF, RC_NULL, "End of File reached",
251 ERR_FEWPNTS, RC_NULL, "Too few points",
252 ERR_FNTNOTOPEN, RC_NULL, "Font file could not be opened",
253 ERR_FNTNOTSUP, RC_NULL, "Font not supported",
254 ERR_FONTFILE, RC_NULL, "Supported fonts file invalid",
255 ERR_FONTRANGE, RC_NULL, "Font index outside CGM fontlist range",
256 ERR_GDIFAIL, RC_NULL, "Windows GDI function failed:",
257 ERR_HUFFMAN, RC_NULL, "Huffman points list not supported",
258 ERR_INTCHR, RC_NULL, "Invalid character in integer",
259 ERR_INVARG, RC_NULL, "Invalid argument",
260 ERR_INVASF, RC_NULL, "Invalid Aspect Source flag",
261 ERR_INVATT, RC_NULL, "Invalid Attribute",
262 ERR_INVCOLR, RC_NULL, "Invalid color type",
263 ERR_INVCONT, RC_NULL, "Invalid Control Element",
264 ERR_INVDELIM, RC_NULL, "Invalid Delimiter",
265 ERR_INVELEM, RC_NULL, "Invalid CGM Element",
266 ERR_INVENUM, RC_NULL, "Invalid Enumerated type",
267 ERR_INVESC, RC_NULL, "Invalid Escape Element",
268 ERR_INVMFDESC, RC_NULL, "Invalid Metafile Descriptor Element",
269 ERR_INVOPCODE, RC_NULL, "Invalid Opcode",
270 ERR_INVOPT, RC_NULL, "Invalid Option",
271 ERR_INVOUT, RC_NULL, "Invalid Output Element",
272 ERR_INVPDESC, RC_NULL, "Invalid Picture Descriptor Element",
273 ERR_INVPRIM, RC_NULL, "Invalid Graphics Primitive",
274 ERR_MANYERR, RC_FATAL, "Too many errors",
275 ERR_MAXCOLR, RC_NULL, "Maximum Colour Index Exceeded,",
276 ERR_MENUFONT, RC_NULL, "Menu font not supported",
277 ERR_METHOD, RC_NULL, "Text method outside allowed range",
278 ERR_METHRANGE, RC_NULL, "Text method outside allowed range",
279 ERR_MFOPEN, RC_NULL, "Metafile already open",
280 ERR_NAME2LONG, RC_NULL, "Illegal length in filename",
281 ERR_NOALIAS, RC_NULL, "No alias found in file alias.psd for font",
282 ERR_NOBACKSP, RC_NULL, "This input file cannot move backwards",
283 ERR_NOCLT, RC_NULL, "File is not a clear text metafile" ,
284 ERR_NOCODE, RC_FATAL, "Unknown Output Code",
285 ERR_NOCSETS, RC_NULL, "Character set file not opened",
286 ERR_NODRIVER, RC_FATAL, "Output driver not supported",
287 ERR_NODSN, RC_NULL, "Design group file not opened",
288 ERR_NOENDPIC, RC_NULL, "Missing ENDPIC",
289 ERR_NOFAMS, RC_NULL, "Font file not opened",
290 ERR_NOFAMSYN, RC_NULL, "Font alias file not opened",
291 ERR_NOFMATCH, RC_NULL, "No trace of requested font found",
292 ERR_NOFNTSPACE, RC_NULL, "No free memory for font system element",
293 ERR_NOFONT, RC_NULL, "Unable to obtain fontlist from X server",
294 ERR_NOFILE, RC_FATAL, "No file name specified",
295 ERR_CELL2SMALL, RC_NULL, "Cell array cells to small for this device",
296 ERR_ELMNOTSUP, RC_NULL, "Element not supported",
297 ERR_BADPENDEF, RC_NULL, "Bad HPGL pen definition",
298 ERR_PICLGRPAP, RC_FATAL, "Metric picture larger than page",
299 ERR_NOFSETS, RC_NULL, "Fudge character set definition file not opened",
300 ERR_NOGDP, RC_NULL, "Unknown GDP",
301 ERR_NOMEMORY, RC_FATAL, "Out of memory",
302 ERR_NOMEMPSL, RC_NULL, "Out of memory for Polygon Section List",
303 ERR_NOMETHODS, RC_NULL, "No text emulation methods supplied",
304 ERR_NOPROLG, RC_NULL, "PostScript prologue file not found",
305 ERR_NOREQFONTS, RC_NULL, "Cannot open requestable fonts list",
306 ERR_NOTAPNDTXT, RC_NULL, "Text not allowed in Append Text State",
307 ERR_NOTCGM, RC_FATAL, "Not a recognisable CGM",
308 ERR_NOTERM, RC_NULL, "Terminal address must be specified",
309 ERR_NPCINSTR, RC_NULL, "Non-printable character in string:",
310 ERR_OPENFILE, RC_FILERR, "Cannot open file",
311 ERR_PACKMISSING, RC_NULL, "Fonts specified but not found for package",
312 ERR_PATINDEX, RC_NULL, "Pattern Index too high",
313 ERR_PATTABLE, RC_NULL, "Pattern Table Full",
314 ERR_PICOPEN, RC_NULL, "Picture already open",
315 ERR_RALGKS111, RC_NULL, "RAL-GKS 1.11 CGM has invalid structure",
316 ERR_RANDOM, RC_FATAL, "Random frame access structure uninitialised",
317 ERR_REDIRECT, RC_FILERR, "Redirected input invalid for this encoding",
318 ERR_SEEKEOF, RC_NULL, "Seeking past end of file",
319 ERR_STATE, RC_NULL, "Element in wrong CGM state",
320 ERR_TXTSYSNFND, RC_NULL, "Did not find a valid text system",
321 ERR_VERSION, RC_FATAL, "Wrong Version number",
322 ERR_XFONTLIST, RC_NULL, "Inconsistency in X font list string",
323 ERR_XSALIAS, RC_NULL, "Too many aliases",
324 ERR_XSDESIGN, RC_NULL, "Too many design codes",
325 ERR_XSFAMILY, RC_NULL, "Too many type families",
326 ERR_XSFPERM, RC_NULL, "Too many fonts per implementation method for",
327 ERR_XSISOCSETS, RC_NULL, "Too many ISO character sets",
328 ERR_XSISOFONTS, RC_NULL, "Too many ISO fonts",
329 ERR_XOPENDISP, RC_FATAL, "Cannot open display",
330 ERR_XSRFONTS, RC_NULL, "Too many requestable fonts",
331 ERR_XSSFONTS, RC_NULL, "Too many special fonts",
332 ERR_XSSOURCE, RC_NULL, "Too many source codes",
334 /* NOTE: This code must be last */
336 ERR_NOTFOUND, RC_NULL, "Unknown error message"
338 #endif /* end of CGMERR_C */
340 #endif /* end of cgmerr.h */