Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-08-27 09:33:38

0001 /* Copyright (C) 2001-2023 Artifex Software, Inc.
0002    All Rights Reserved.
0003 
0004    This software is provided AS-IS with no warranty, either express or
0005    implied.
0006 
0007    This software is distributed under license and may not be copied,
0008    modified or distributed except as expressly authorized under the terms
0009    of the license contained in the file LICENSE in this distribution.
0010 
0011    Refer to licensing information at http://www.artifex.com or contact
0012    Artifex Software, Inc.,  39 Mesa Street, Suite 108A, San Francisco,
0013    CA 94129, USA, for further information.
0014 */
0015 
0016 
0017 /* Definition of error codes */
0018 
0019 #ifndef ierrors_INCLUDED
0020 #  define ierrors_INCLUDED
0021 
0022 #include "gserrors.h"
0023 
0024 /*
0025  * DO NOT USE THIS FILE IN THE GRAPHICS LIBRARY.
0026  * THIS FILE IS PART OF THE POSTSCRIPT INTERPRETER.
0027  * USE gserrors.h IN THE LIBRARY.
0028  */
0029 
0030 /*
0031  * A procedure that may return an error always returns
0032  * a non-negative value (zero, unless otherwise noted) for success,
0033  * or negative for failure.
0034  * We use ints rather than an enum to avoid a lot of casting.
0035  */
0036 
0037 /* Define the error name table */
0038 extern const char *const gs_error_names[];
0039 
0040                 /* ------ PostScript Level 1 errors ------ */
0041 
0042 #define LEVEL1_ERROR_NAMES\
0043  "unknownerror", "dictfull", "dictstackoverflow", "dictstackunderflow",\
0044  "execstackoverflow", "interrupt", "invalidaccess", "invalidexit",\
0045  "invalidfileaccess", "invalidfont", "invalidrestore", "ioerror",\
0046  "limitcheck", "nocurrentpoint", "rangecheck", "stackoverflow",\
0047  "stackunderflow", "syntaxerror", "timeout", "typecheck", "undefined",\
0048  "undefinedfilename", "undefinedresult", "unmatchedmark", "VMerror"
0049 
0050         /* ------ Additional Level 2 errors (also in DPS) ------ */
0051 
0052 #define LEVEL2_ERROR_NAMES\
0053  "configurationerror", "undefinedresource", "unregistered"
0054 
0055         /* ------ Additional DPS errors ------ */
0056 
0057 #define DPS_ERROR_NAMES\
0058  "invalidcontext", "invalidid"
0059 
0060 #define PDF_ERROR_NAMES\
0061  "pdf_stackoverflow", "pdf_circular_reference"
0062 
0063 #define ERROR_NAMES\
0064  LEVEL1_ERROR_NAMES, LEVEL2_ERROR_NAMES, DPS_ERROR_NAMES, PDF_ERROR_NAMES
0065 
0066 /*
0067  * Define which error codes require re-executing the current object.
0068  */
0069 #define GS_ERROR_IS_INTERRUPT(ecode)\
0070   ((ecode) == gs_error_interrupt || (ecode) == gs_error_timeout)
0071 
0072 #endif /* ierrors_INCLUDED */