"Fossies" - the Fresh Open Source Software Archive

Member "epstool-3.08/src/errors.h" (10 Jun 2005, 4818 Bytes) of package /linux/misc/old/ghost/ghostgum/epstool-3.08-os2.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /* Copyright (C) 1989, 1995, 1998, 1999 Aladdin Enterprises.  All rights reserved.
    2   
    3   This software is provided AS-IS with no warranty, either express or
    4   implied.
    5   
    6   This software is distributed under license and may not be copied,
    7   modified or distributed except as expressly authorized under the terms
    8   of the license contained in the file LICENSE in this distribution.
    9   
   10   For more information about licensing, please refer to
   11   http://www.ghostscript.com/licensing/. For information on
   12   commercial licensing, go to http://www.artifex.com/licensing/ or
   13   contact Artifex Software, Inc., 101 Lucas Valley Road #110,
   14   San Rafael, CA  94903, U.S.A., +1(415)492-9861.
   15 */
   16 
   17 /*$Id: errors.h,v 1.1 2002/05/22 10:52:31 ghostgum Exp $ */
   18 /* Definition of error codes */
   19 
   20 #ifndef errors_INCLUDED
   21 #  define errors_INCLUDED
   22 
   23 /*
   24  * A procedure that may return an error always returns
   25  * a non-negative value (zero, unless otherwise noted) for success,
   26  * or negative for failure.
   27  * We use ints rather than an enum to avoid a lot of casting.
   28  */
   29 
   30 /* Define the error name table */
   31 extern const char *const gs_error_names[];
   32 
   33         /* ------ PostScript Level 1 errors ------ */
   34 
   35 #define e_unknownerror (-1) /* unknown error */
   36 #define e_dictfull (-2)
   37 #define e_dictstackoverflow (-3)
   38 #define e_dictstackunderflow (-4)
   39 #define e_execstackoverflow (-5)
   40 #define e_interrupt (-6)
   41 /* We also need to define gs_error_interrupt, for gpcheck.h. */
   42 #undef gs_error_interrupt
   43 #define gs_error_interrupt e_interrupt
   44 #define e_invalidaccess (-7)
   45 #define e_invalidexit (-8)
   46 #define e_invalidfileaccess (-9)
   47 #define e_invalidfont (-10)
   48 #define e_invalidrestore (-11)
   49 #define e_ioerror (-12)
   50 #define e_limitcheck (-13)
   51 #define e_nocurrentpoint (-14)
   52 #define e_rangecheck (-15)
   53 #define e_stackoverflow (-16)
   54 #define e_stackunderflow (-17)
   55 #define e_syntaxerror (-18)
   56 #define e_timeout (-19)
   57 #define e_typecheck (-20)
   58 #define e_undefined (-21)
   59 #define e_undefinedfilename (-22)
   60 #define e_undefinedresult (-23)
   61 #define e_unmatchedmark (-24)
   62 #define e_VMerror (-25)
   63 
   64 #define LEVEL1_ERROR_NAMES\
   65  "unknownerror", "dictfull", "dictstackoverflow", "dictstackunderflow",\
   66  "execstackoverflow", "interrupt", "invalidaccess", "invalidexit",\
   67  "invalidfileaccess", "invalidfont", "invalidrestore", "ioerror",\
   68  "limitcheck", "nocurrentpoint", "rangecheck", "stackoverflow",\
   69  "stackunderflow", "syntaxerror", "timeout", "typecheck", "undefined",\
   70  "undefinedfilename", "undefinedresult", "unmatchedmark", "VMerror"
   71 
   72         /* ------ Additional Level 2 and DPS errors ------ */
   73 
   74 #define e_configurationerror (-26)
   75 #define e_invalidcontext (-27)
   76 #define e_undefinedresource (-28)
   77 #define e_unregistered (-29)
   78 /* invalidid is for the NeXT DPS extension. */
   79 #define e_invalidid (-30)
   80 
   81 #define LEVEL2_ERROR_NAMES\
   82  "configurationerror", "invalidcontext", "undefinedresource",\
   83  "unregistered", "invalidid"
   84 
   85 #define ERROR_NAMES   LEVEL1_ERROR_NAMES, LEVEL2_ERROR_NAMES
   86 
   87         /* ------ Pseudo-errors used internally ------ */
   88 
   89 /*
   90  * Internal code for a fatal error.
   91  * gs_interpret also returns this for a .quit with a positive exit code.
   92  */
   93 #define e_Fatal (-100)
   94 
   95 /*
   96  * Internal code for the .quit operator.
   97  * The real quit code is an integer on the operand stack.
   98  * gs_interpret returns this only for a .quit with a zero exit code.
   99  */
  100 #define e_Quit (-101)
  101 
  102 /*
  103  * Internal code for a normal exit from the interpreter.
  104  * Do not use outside of interp.c.
  105  */
  106 #define e_InterpreterExit (-102)
  107 
  108 /*
  109  * Internal code that indicates that a procedure has been stored in the
  110  * remap_proc of the graphics state, and should be called before retrying
  111  * the current token.  This is used for color remapping involving a call
  112  * back into the interpreter -- inelegant, but effective.
  113  */
  114 #define e_RemapColor (-103)
  115 
  116 /*
  117  * Internal code to indicate we have underflowed the top block
  118  * of the e-stack.
  119  */
  120 #define e_ExecStackUnderflow (-104)
  121 
  122 /*
  123  * Internal code for the vmreclaim operator with a positive operand.
  124  * We need to handle this as an error because otherwise the interpreter
  125  * won't reload enough of its state when the operator returns.
  126  */
  127 #define e_VMreclaim (-105)
  128 
  129 /*
  130  * Internal code for requesting more input from run_string.
  131  */
  132 #define e_NeedInput (-106)
  133 
  134 /*
  135  * Internal code for stdin callout.
  136  */
  137 #define e_NeedStdin (-107)
  138 
  139 /*
  140  * Internal code for stdout callout.
  141  */
  142 #define e_NeedStdout (-108)
  143 
  144 /*
  145  * Internal code for stderr callout.
  146  */
  147 #define e_NeedStderr (-109)
  148 
  149 /*
  150  * Internal code for a normal exit when usage info is displayed.
  151  * This allows Window versions of Ghostscript to pause until
  152  * the message can be read.
  153  */
  154 #define e_Info (-110)
  155 
  156 /*
  157  * Define which error codes require re-executing the current object.
  158  */
  159 #define ERROR_IS_INTERRUPT(ecode)\
  160   ((ecode) == e_interrupt || (ecode) == e_timeout)
  161 
  162 #endif /* errors_INCLUDED */