xref: /plan9/sys/src/cmd/gs/src/gscdefs.h (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1 /* Copyright (C) 1994, 1996, 1998, 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: gscdefs.h,v 1.6 2002/08/26 23:00:07 dan Exp $ */
18 /* Prototypes for configuration definitions in gconfig.c. */
19 
20 #ifndef gscdefs_INCLUDED
21 #  define gscdefs_INCLUDED
22 
23 #include "gconfigv.h"
24 
25 /*
26  * This file may be #included in places that don't even have stdpre.h,
27  * so it mustn't use any Ghostscript definitions in any code that is
28  * actually processed here (as opposed to being part of a macro
29  * definition).
30  */
31 
32 /* Miscellaneous system constants (read-only systemparams). */
33 /* They should all be const, but one application needs some of them */
34 /* to be writable.... */
35 
36 #if SYSTEM_CONSTANTS_ARE_WRITABLE
37 #  define CONFIG_CONST		/* */
38 #else
39 #  define CONFIG_CONST const
40 #endif
41 
42 extern CONFIG_CONST long gs_buildtime;
43 extern const char *CONFIG_CONST gs_copyright;
44 extern const char *CONFIG_CONST gs_product;
45 extern const char *CONFIG_CONST gs_productfamily;
46 extern CONFIG_CONST long gs_revision;
47 extern CONFIG_CONST long gs_revisiondate;
48 extern CONFIG_CONST long gs_serialnumber;
49 
50 /* Installation directories and files */
51 extern const char *const gs_doc_directory;
52 extern const char *const gs_lib_default_path;
53 extern const char *const gs_init_file;
54 
55 /* Resource tables.  In order to avoid importing a large number of types, */
56 /* we only provide macros for some externs, not the externs themselves. */
57 
58 #define extern_gx_device_halftone_list()\
59   typedef DEVICE_HALFTONE_RESOURCE_PROC((*gx_dht_proc));\
60   extern const gx_dht_proc gx_device_halftone_list[]
61 
62 #define extern_gx_image_class_table()\
63   extern const gx_image_class_t gx_image_class_table[]
64 extern const unsigned gx_image_class_table_count;
65 
66 #define extern_gx_image_type_table()\
67   extern const gx_image_type_t * const gx_image_type_table[]
68 extern const unsigned gx_image_type_table_count;
69 
70 /* We need the extra typedef so that the const will apply to the table. */
71 #define extern_gx_init_table()\
72   typedef init_proc((*gx_init_proc));\
73   extern const gx_init_proc gx_init_table[]
74 
75 #define extern_gx_io_device_table()\
76   extern const gx_io_device * const gx_io_device_table[]
77 extern const unsigned gx_io_device_table_count;
78 
79 /* Return the list of device prototypes, a NULL list of their structure */
80 /* descriptors (no longer used), and (as the value) the length of the lists. */
81 #define extern_gs_lib_device_list()\
82   int gs_lib_device_list(const gx_device * const **plist,\
83 			 gs_memory_struct_type_t **pst)
84 
85 /* find a compositor by name */
86 #define extern_gs_find_compositor() \
87   const gs_composite_type_t * gs_find_compositor(int comp_id)
88 
89 #endif /* gscdefs_INCLUDED */
90