home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / sharewar / dos / program / gs300sr1 / gs300sr1.exe / OPER.H < prev    next >
C/C++ Source or Header  |  1994-07-27  |  2KB  |  50 lines

  1. /* Copyright (C) 1989, 1992 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of Aladdin Ghostscript.
  4.   
  5.   Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  6.   or distributor accepts any responsibility for the consequences of using it,
  7.   or for whether it serves any particular purpose or works at all, unless he
  8.   or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  9.   License (the "License") for full details.
  10.   
  11.   Every copy of Aladdin Ghostscript must include a copy of the License,
  12.   normally in a plain ASCII text file named PUBLIC.  The License grants you
  13.   the right to copy, modify and redistribute Aladdin Ghostscript, but only
  14.   under certain conditions described in the License.  Among other things, the
  15.   License requires that the copyright notice and this notice be preserved on
  16.   all copies.
  17. */
  18.  
  19. /* oper.h */
  20. /* Definitions for Ghostscript operators */
  21. #include "ostack.h"
  22. #include "opdef.h"
  23. #include "opcheck.h"
  24. #include "iutil.h"
  25.  
  26. /* Macro for as yet unimplemented operators. */
  27. /* The if ( 1 ) is to prevent the compiler from complaining about */
  28. /* unreachable code. */
  29. #define NYI(msg) if ( 1 ) return_error(e_undefined)
  30.  
  31. /*
  32.  * If an operator has popped or pushed something on the control stack,
  33.  * it must return o_pop_estack or o_push_estack respectively,
  34.  * rather than 0, to indicate success.
  35.  * It is OK to return o_pop_estack if nothing has been popped,
  36.  * but it is not OK to return o_push_estack if nothing has been pushed.
  37.  *
  38.  * If an operator has suspended the current context and wants the
  39.  * interpreter to call the scheduler, it must return o_reschedule.
  40.  * It may also have pushed or popped elements on the control stack.
  41.  * (This is only used when the Display PostScript option is included.)
  42.  *
  43.  * These values must be greater than 1, and far enough apart from zero and
  44.  * from each other not to tempt a compiler into implementing a 'switch'
  45.  * on them using indexing rather than testing.
  46.  */
  47. #define o_push_estack 5
  48. #define o_pop_estack 14
  49. #define o_reschedule 22
  50.