xref: /plan9/sys/src/cmd/gs/src/imainarg.h (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1 /* Copyright (C) 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: imainarg.h,v 1.6 2002/06/16 04:47:10 lpd Exp $ */
18 /* argv/argc interface to imainarg.c */
19 
20 #ifndef imainarg_INCLUDED
21 #  define imainarg_INCLUDED
22 
23 /* Define an opaque type for an interpreter instance.  See imain.h. */
24 #ifndef gs_main_instance_DEFINED
25 #  define gs_main_instance_DEFINED
26 typedef struct gs_main_instance_s gs_main_instance;
27 #endif
28 
29 /*
30  * As a shortcut for very high-level clients, we define a single call
31  * that does the equivalent of command line invocation, passing argc
32  * and argv.  This call includes calling init0 through init2.
33  * argv should really be const char *[], but ANSI C requires writable
34  * strings (which, however, it forbids the callee to modify!).
35  */
36 int gs_main_init_with_args(gs_main_instance * minst, int argc, char *argv[]);
37 
38 /*
39  * Run the 'start' procedure (after processing the command line).
40  */
41 int gs_main_run_start(gs_main_instance * minst);
42 
43 #endif /* imainarg_INCLUDED */
44