summaryrefslogtreecommitdiff
path: root/psi/ierrors.h
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2013-07-23 16:24:19 +0100
committerChris Liddell <chris.liddell@artifex.com>2015-07-20 18:21:17 +0100
commit6948650efd3fb9e2a70b8cf16aca57e9d0b7eb0a (patch)
tree5c2a1c671c1d4521f8a770d1e69e3d4342718030 /psi/ierrors.h
parent7fd9e0be26e67c36f87733bc89ea07dc26d9f839 (diff)
downloadghostpdl-6948650efd3fb9e2a70b8cf16aca57e9d0b7eb0a.tar.gz
Commit of build_consolidation branch
Squashed into one commit (see branch for details of the evolution of the branch). This brings gpcl6 and gxps into the Ghostscript build system, and a shared set of graphics library object files for all the interpreters. Also, brings the same configuration options to the pcl and xps products as we have for Ghostscript.
Diffstat (limited to 'psi/ierrors.h')
-rw-r--r--psi/ierrors.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/psi/ierrors.h b/psi/ierrors.h
new file mode 100644
index 000000000..9480e11b0
--- /dev/null
+++ b/psi/ierrors.h
@@ -0,0 +1,69 @@
+/* Copyright (C) 2001-2012 Artifex Software, Inc.
+ All Rights Reserved.
+
+ This software is provided AS-IS with no warranty, either express or
+ implied.
+
+ This software is distributed under license and may not be copied,
+ modified or distributed except as expressly authorized under the terms
+ of the license contained in the file LICENSE in this distribution.
+
+ Refer to licensing information at http://www.artifex.com or contact
+ Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, San Rafael,
+ CA 94903, U.S.A., +1(415)492-9861, for further information.
+*/
+
+
+/* Definition of error codes */
+
+#ifndef ierrors_INCLUDED
+# define ierrors_INCLUDED
+
+#include "gserrors.h"
+
+/*
+ * DO NOT USE THIS FILE IN THE GRAPHICS LIBRARY.
+ * THIS FILE IS PART OF THE POSTSCRIPT INTERPRETER.
+ * USE gserrors.h IN THE LIBRARY.
+ */
+
+/*
+ * A procedure that may return an error always returns
+ * a non-negative value (zero, unless otherwise noted) for success,
+ * or negative for failure.
+ * We use ints rather than an enum to avoid a lot of casting.
+ */
+
+/* Define the error name table */
+extern const char *const gs_error_names[];
+
+ /* ------ PostScript Level 1 errors ------ */
+
+#define LEVEL1_ERROR_NAMES\
+ "unknownerror", "dictfull", "dictstackoverflow", "dictstackunderflow",\
+ "execstackoverflow", "interrupt", "invalidaccess", "invalidexit",\
+ "invalidfileaccess", "invalidfont", "invalidrestore", "ioerror",\
+ "limitcheck", "nocurrentpoint", "rangecheck", "stackoverflow",\
+ "stackunderflow", "syntaxerror", "timeout", "typecheck", "undefined",\
+ "undefinedfilename", "undefinedresult", "unmatchedmark", "VMerror"
+
+ /* ------ Additional Level 2 errors (also in DPS) ------ */
+
+#define LEVEL2_ERROR_NAMES\
+ "configurationerror", "undefinedresource", "unregistered"
+
+ /* ------ Additional DPS errors ------ */
+
+#define DPS_ERROR_NAMES\
+ "invalidcontext", "invalidid"
+
+#define ERROR_NAMES\
+ LEVEL1_ERROR_NAMES, LEVEL2_ERROR_NAMES, DPS_ERROR_NAMES
+
+/*
+ * Define which error codes require re-executing the current object.
+ */
+#define GS_ERROR_IS_INTERRUPT(ecode)\
+ ((ecode) == gs_error_interrupt || (ecode) == gs_error_timeout)
+
+#endif /* ierrors_INCLUDED */