1
/* Copyright (C) 2001-2006 Artifex Software, Inc.
4
This software is provided AS-IS with no warranty, either express or
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.
14
/* $Id: main.h 9043 2008-08-28 22:48:19Z giles $ */
15
/* Backward-compatible interface to gsmain.c */
18
# define main_INCLUDED
25
* This file adds to imain.h some backward-compatible procedures and
26
* data elements that assume there is only a single instance of
30
/* conditional out the entire file */
34
/* ================ Data elements ================ */
36
/* Clients should never access these directly. */
38
#define gs_user_errors (gs_main_instance_default()->user_errors)
39
#define gs_lib_path (gs_main_instance_default()->lib_path)
40
/* gs_lib_paths removed in release 3.65 */
41
/* gs_lib_env_path removed in release 3.65 */
43
/* ================ Exported procedures from gsmain.c ================ */
45
/* ---------------- Initialization ---------------- */
47
#define gs_init0(in, out, err, mlp)\
48
gs_main_init0(gs_main_instance_default(), in, out, err, mlp)
51
gs_main_init1(gs_main_instance_default())
54
gs_main_init2(gs_main_instance_default())
56
#define gs_add_lib_path(path)\
57
gs_main_add_lib_path(gs_main_instance_default(), path)
59
#define gs_set_lib_paths()\
60
gs_main_set_lib_paths(gs_main_instance_default())
62
#define gs_lib_open(fname, pfile)\
63
gs_main_lib_open(gs_main_instance_default(), fname, pfile)
65
/* ---------------- Execution ---------------- */
67
#define gs_run_file(fn, ue, pec, peo)\
68
gs_main_run_file(gs_main_instance_default(), fn, ue, pec, peo)
70
#define gs_run_string(str, ue, pec, peo)\
71
gs_main_run_string(gs_main_instance_default(), str, ue, pec, peo)
73
#define gs_run_string_with_length(str, len, ue, pec, peo)\
74
gs_main_run_string_with_length(gs_main_instance_default(),\
75
str, len, ue, pec, peo)
77
#define gs_run_file_open(fn, pfref)\
78
gs_main_run_file_open(gs_main_instance_default(), fn, pfref)
80
#define gs_run_string_begin(ue, pec, peo)\
81
gs_main_run_string_begin(gs_main_instance_default(), ue, pec, peo)
83
#define gs_run_string_continue(str, len, ue, pec, peo)\
84
gs_main_run_string_continue(gs_main_instance_default(),\
85
str, len, ue, pec, peo)
87
#define gs_run_string_end(ue, pec, peo)\
88
gs_main_run_string_end(gs_main_instance_default(), ue, pec, peo)
90
/* ---------------- Debugging ---------------- */
93
* We should have the following definition:
95
#define gs_debug_dump_stack(code, peo)\
96
gs_main_dump_stack(gs_main_instance_default(), code, peo)
98
* but we make it a procedure instead so it can be called from debuggers.
100
void gs_debug_dump_stack(int code, ref * perror_object);
102
/* ---------------- Termination ---------------- */
105
#endif /* full file conditional */
107
#endif /* main_INCLUDED */