summaryrefslogtreecommitdiff
path: root/gs/psi/iestack.h
diff options
context:
space:
mode:
Diffstat (limited to 'gs/psi/iestack.h')
-rw-r--r--gs/psi/iestack.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/gs/psi/iestack.h b/gs/psi/iestack.h
new file mode 100644
index 000000000..d8d38c84a
--- /dev/null
+++ b/gs/psi/iestack.h
@@ -0,0 +1,36 @@
+/* Copyright (C) 2001-2006 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 that
+ license. 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.
+*/
+
+/* $Id$ */
+/* Generic execution stack API */
+
+#ifndef iestack_INCLUDED
+# define iestack_INCLUDED
+
+#include "iesdata.h"
+#include "istack.h"
+
+/* Define pointers into the execution stack. */
+typedef s_ptr es_ptr;
+typedef const_s_ptr const_es_ptr;
+
+/* Manage the current_file cache. */
+#define estack_clear_cache(pes) ((pes)->current_file = 0)
+#define estack_set_cache(pes,pref) ((pes)->current_file = (pref))
+#define estack_check_cache(pes)\
+ BEGIN\
+ if (r_has_type_attrs((pes)->stack.p, t_file, a_executable))\
+ estack_set_cache(pes, (pes)->stack.p);\
+ END
+
+#endif /* iestack_INCLUDED */