2 |
- |
1 |
/* Copyright (C) 1992, 1995, 1996, 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: main.h,v 1.8 2004/10/26 03:41:41 giles Exp $ */
|
|
|
18 |
/* Backward-compatible interface to gsmain.c */
|
|
|
19 |
|
|
|
20 |
#ifndef main_INCLUDED
|
|
|
21 |
# define main_INCLUDED
|
|
|
22 |
|
|
|
23 |
#include "iapi.h"
|
|
|
24 |
#include "imain.h"
|
|
|
25 |
#include "iminst.h"
|
|
|
26 |
|
|
|
27 |
/*
|
|
|
28 |
* This file adds to imain.h some backward-compatible procedures and
|
|
|
29 |
* data elements that assume there is only a single instance of
|
|
|
30 |
* the interpreter.
|
|
|
31 |
*/
|
|
|
32 |
|
|
|
33 |
/* conditional out the entire file */
|
|
|
34 |
#if 0
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
/* ================ Data elements ================ */
|
|
|
38 |
|
|
|
39 |
/* Clients should never access these directly. */
|
|
|
40 |
|
|
|
41 |
#define gs_user_errors (gs_main_instance_default()->user_errors)
|
|
|
42 |
#define gs_lib_path (gs_main_instance_default()->lib_path)
|
|
|
43 |
/* gs_lib_paths removed in release 3.65 */
|
|
|
44 |
/* gs_lib_env_path removed in release 3.65 */
|
|
|
45 |
|
|
|
46 |
/* ================ Exported procedures from gsmain.c ================ */
|
|
|
47 |
|
|
|
48 |
/* ---------------- Initialization ---------------- */
|
|
|
49 |
|
|
|
50 |
#define gs_init0(in, out, err, mlp)\
|
|
|
51 |
gs_main_init0(gs_main_instance_default(), in, out, err, mlp)
|
|
|
52 |
|
|
|
53 |
#define gs_init1()\
|
|
|
54 |
gs_main_init1(gs_main_instance_default())
|
|
|
55 |
|
|
|
56 |
#define gs_init2()\
|
|
|
57 |
gs_main_init2(gs_main_instance_default())
|
|
|
58 |
|
|
|
59 |
#define gs_add_lib_path(path)\
|
|
|
60 |
gs_main_add_lib_path(gs_main_instance_default(), path)
|
|
|
61 |
|
|
|
62 |
#define gs_set_lib_paths()\
|
|
|
63 |
gs_main_set_lib_paths(gs_main_instance_default())
|
|
|
64 |
|
|
|
65 |
#define gs_lib_open(fname, pfile)\
|
|
|
66 |
gs_main_lib_open(gs_main_instance_default(), fname, pfile)
|
|
|
67 |
|
|
|
68 |
/* ---------------- Execution ---------------- */
|
|
|
69 |
|
|
|
70 |
#define gs_run_file(fn, ue, pec, peo)\
|
|
|
71 |
gs_main_run_file(gs_main_instance_default(), fn, ue, pec, peo)
|
|
|
72 |
|
|
|
73 |
#define gs_run_string(str, ue, pec, peo)\
|
|
|
74 |
gs_main_run_string(gs_main_instance_default(), str, ue, pec, peo)
|
|
|
75 |
|
|
|
76 |
#define gs_run_string_with_length(str, len, ue, pec, peo)\
|
|
|
77 |
gs_main_run_string_with_length(gs_main_instance_default(),\
|
|
|
78 |
str, len, ue, pec, peo)
|
|
|
79 |
|
|
|
80 |
#define gs_run_file_open(fn, pfref)\
|
|
|
81 |
gs_main_run_file_open(gs_main_instance_default(), fn, pfref)
|
|
|
82 |
|
|
|
83 |
#define gs_run_string_begin(ue, pec, peo)\
|
|
|
84 |
gs_main_run_string_begin(gs_main_instance_default(), ue, pec, peo)
|
|
|
85 |
|
|
|
86 |
#define gs_run_string_continue(str, len, ue, pec, peo)\
|
|
|
87 |
gs_main_run_string_continue(gs_main_instance_default(),\
|
|
|
88 |
str, len, ue, pec, peo)
|
|
|
89 |
|
|
|
90 |
#define gs_run_string_end(ue, pec, peo)\
|
|
|
91 |
gs_main_run_string_end(gs_main_instance_default(), ue, pec, peo)
|
|
|
92 |
|
|
|
93 |
/* ---------------- Debugging ---------------- */
|
|
|
94 |
|
|
|
95 |
/*
|
|
|
96 |
* We should have the following definition:
|
|
|
97 |
|
|
|
98 |
#define gs_debug_dump_stack(code, peo)\
|
|
|
99 |
gs_main_dump_stack(gs_main_instance_default(), code, peo)
|
|
|
100 |
|
|
|
101 |
* but we make it a procedure instead so it can be called from debuggers.
|
|
|
102 |
*/
|
|
|
103 |
void gs_debug_dump_stack(int code, ref * perror_object);
|
|
|
104 |
|
|
|
105 |
/* ---------------- Termination ---------------- */
|
|
|
106 |
|
|
|
107 |
|
|
|
108 |
#endif /* full file conditional */
|
|
|
109 |
|
|
|
110 |
#endif /* main_INCLUDED */
|