1 /* Copyright (C) 1998, 2000 artofcode LLC. All rights reserved. 2 3 This program is free software; you can redistribute it and/or modify it 4 under the terms of the GNU General Public License as published by the 5 Free Software Foundation; either version 2 of the License, or (at your 6 option) any later version. 7 8 This program is distributed in the hope that it will be useful, but 9 WITHOUT ANY WARRANTY; without even the implied warranty of 10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 General Public License for more details. 12 13 You should have received a copy of the GNU General Public License along 14 with this program; if not, write to the Free Software Foundation, Inc., 15 59 Temple Place, Suite 330, Boston, MA, 02111-1307. 16 17 */ 18 19 /*$Id: icstate.h,v 1.4.6.2.2.1 2003/01/17 00:49:04 giles Exp $ */ 20 /* Externally visible context state */ 21 22 #ifndef icstate_INCLUDED 23 # define icstate_INCLUDED 24 25 #include "imemory.h" 26 #include "iref.h" 27 #include "idsdata.h" 28 #include "iesdata.h" 29 #include "iosdata.h" 30 31 /* 32 * Define the externally visible state of an interpreter context. 33 * If we aren't supporting Display PostScript features, there is only 34 * a single context. 35 */ 36 #ifndef gs_context_state_t_DEFINED 37 # define gs_context_state_t_DEFINED 38 typedef struct gs_context_state_s gs_context_state_t; 39 #endif 40 struct gs_context_state_s { 41 gs_state *pgs; 42 gs_dual_memory_t memory; 43 int language_level; 44 ref array_packing; /* t_boolean */ 45 ref binary_object_format; /* t_integer */ 46 long rand_state; /* (not in Red Book) */ 47 long usertime_total; /* total accumulated usertime, */ 48 /* not counting current time if running */ 49 bool keep_usertime; /* true if context ever executed usertime */ 50 int in_superexec; /* # of levels of superexec */ 51 /* View clipping is handled in the graphics state. */ 52 ref userparams; /* t_dictionary */ 53 int scanner_options; /* derived from userparams */ 54 bool LockFilePermissions; /* accessed from userparams */ 55 byte *filearg; /* null terminated string of file being run */ 56 ref stdio[3]; /* t_file */ 57 /* Put the stacks at the end to minimize other offsets. */ 58 dict_stack_t dict_stack; 59 exec_stack_t exec_stack; 60 op_stack_t op_stack; 61 }; 62 extern const long rand_state_initial; /* in zmath.c */ 63 64 /* 65 * We make st_context_state public because zcontext.c must subclass it. 66 */ 67 /*extern_st(st_context_state); *//* in icontext.h */ 68 #define public_st_context_state() /* in icontext.c */\ 69 gs_public_st_complex_only(st_context_state, gs_context_state_t,\ 70 "gs_context_state_t", context_state_clear_marks,\ 71 context_state_enum_ptrs, context_state_reloc_ptrs, 0) 72 73 #endif /* icstate_INCLUDED */ 74