1 /* Copyright (C) 2001-2006 Artifex Software, Inc. 2 All Rights Reserved. 3 4 This software is provided AS-IS with no warranty, either express or 5 implied. 6 7 This software is distributed under license and may not be copied, modified 8 or distributed except as expressly authorized under the terms of that 9 license. Refer to licensing information at http://www.artifex.com/ 10 or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134, 11 San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information. 12 */ 13 14 /* $Id: icstate.h 9043 2008-08-28 22:48:19Z giles $ */ 15 /* Externally visible context state */ 16 17 #ifndef icstate_INCLUDED 18 # define icstate_INCLUDED 19 20 #include "imemory.h" 21 #include "iref.h" 22 #include "idsdata.h" 23 #include "iesdata.h" 24 #include "iosdata.h" 25 26 /* 27 * Define the externally visible state of an interpreter context. 28 * If we aren't supporting Display PostScript features, there is only 29 * a single context. 30 */ 31 #ifndef gs_context_state_t_DEFINED 32 # define gs_context_state_t_DEFINED 33 typedef struct gs_context_state_s gs_context_state_t; 34 #endif 35 36 #ifndef gs_file_path_ptr_DEFINED 37 # define gs_file_path_ptr_DEFINED 38 typedef struct gs_file_path_s *gs_file_path_ptr; 39 #endif 40 41 42 struct gs_context_state_s { 43 gs_state *pgs; 44 gs_dual_memory_t memory; 45 int language_level; 46 ref array_packing; /* t_boolean */ 47 ref binary_object_format; /* t_integer */ 48 long rand_state; /* (not in Red Book) */ 49 long usertime_total; /* total accumulated usertime, */ 50 /* not counting current time if running */ 51 bool keep_usertime; /* true if context ever executed usertime */ 52 int in_superexec; /* # of levels of superexec */ 53 /* View clipping is handled in the graphics state. */ 54 ref error_object; /* t__invalid or error object from operator */ 55 ref userparams; /* t_dictionary */ 56 int scanner_options; /* derived from userparams */ 57 bool LockFilePermissions; /* accessed from userparams */ 58 bool starting_arg_file; /* starting a file specified in command line. */ 59 bool RenderTTNotdef; /* accessed from userparams */ 60 gs_file_path_ptr lib_path; /* library search list (GS_LIB) */ 61 ref stdio[3]; /* t_file */ 62 /* Put the stacks at the end to minimize other offsets. */ 63 dict_stack_t dict_stack; 64 exec_stack_t exec_stack; 65 op_stack_t op_stack; 66 struct i_plugin_holder_s *plugin_list; 67 }; 68 extern const long rand_state_initial; /* in zmath.c */ 69 70 /* 71 * We make st_context_state public because zcontext.c must subclass it. 72 */ 73 /*extern_st(st_context_state); *//* in icontext.h */ 74 #define public_st_context_state() /* in icontext.c */\ 75 gs_public_st_complex_only(st_context_state, gs_context_state_t,\ 76 "gs_context_state_t", context_state_clear_marks,\ 77 context_state_enum_ptrs, context_state_reloc_ptrs, 0) 78 79 #endif /* icstate_INCLUDED */ 80