386BSD 0.1 development
[unix-history] / usr / othersrc / public / ghostscript-2.4.1 / gconfig.c
CommitLineData
dc513490
WJ
1/* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved.
2 Distributed by Free Software Foundation, Inc.
3
4This file is part of Ghostscript.
5
6Ghostscript is distributed in the hope that it will be useful, but
7WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
8to anyone for the consequences of using it or for whether it serves any
9particular purpose or works at all, unless he says so in writing. Refer
10to the Ghostscript General Public License for full details.
11
12Everyone is granted permission to copy, modify and redistribute
13Ghostscript, but only under the conditions described in the Ghostscript
14General Public License. A copy of this license is supposed to have been
15given to you along with Ghostscript so you can know your rights and
16responsibilities. It should be in a file named COPYING. Among other
17things, the copyright notice and this notice must be preserved on all
18copies. */
19
20/* gconfig.c */
21/* Installed device table for Ghostscript */
22#include "ghost.h"
23/*
24 * Since we only declare variables of type gx_device *,
25 * it should be sufficient to define struct gx_device_s as
26 * an abstract (undefined) structure. However, the VAX VMS compiler
27 * isn't happy with this, so we have to include the full definition.
28 */
29#include "gxdevice.h"
30/*
31 * We generate an array of strings as a static structure:
32 */
33#define ref_(t) struct { struct tas_s tas; t value; }
34#define string_v(n,s)\
35 { {(t_string<<r_type_shift)+a_read+a_execute, n}, s }
36
37/*
38 * The Ghostscript makefile generates the file gconfig.h, which consists of
39 * lines of the form
40 * device_(gs_xxx_device)
41 * for each installed device,
42 * oper_(zxxx_op_defs)
43 * for each operator option, and
44 * psfile_("gs_xxxx.ps")
45 * for each optional initialization file.
46 *
47 * We include this file multiple times to generate various different
48 * source structures. (It's a hack, but we haven't come up with anything
49 * more satisfactory.)
50 */
51
52/* Here is where the library search path and the name of the */
53/* initialization file are defined. We supply defaults just in case */
54/* someone compiles the file without the proper command line flags. */
55#ifndef GS_LIB_DEFAULT
56# define GS_LIB_DEFAULT ""
57#endif
58#ifndef GS_INIT
59# define GS_INIT "gs_init.ps"
60#endif
61const char *gs_lib_default_path = GS_LIB_DEFAULT;
62const char *gs_init_file = GS_INIT;
63
64/* Optional operators are handled in iinit.c. */
65#define oper_(defs)
66
67#define psfile_(fns)
68
69/* Declare the devices as extern. */
70#define device_(dev) extern gx_device dev;
71#include "gconfig.h"
72#undef device_
73
74/* Set up the device table. */
75#define device_(dev) &dev,
76gx_device *gx_device_list[] = {
77#include "gconfig.h"
78 0
79};
80#undef device_
81#define device_(dev)
82
83/* Set up the .ps file name string array. */
84/* We fill in the lengths at initialization time. */
85#define ref_(t) struct { struct tas_s tas; t value; }
86#define string_(s)\
87 { {(t_string<<r_type_shift)+a_read+a_execute, 0}, s },
88#undef psfile_
89#define psfile_(fns) string_(fns)
90ref_(const char *) gs_init_file_array[] = {
91#include "gconfig.h"
92 string_(0)
93};
94
95/* Some C compilers insist on executable code here, so.... */
96void
97gconfig_dummy()
98{
99}