home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved.
- Distributed by Free Software Foundation, Inc.
-
- This file is part of Ghostscript.
-
- Ghostscript is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
- to anyone for the consequences of using it or for whether it serves any
- particular purpose or works at all, unless he says so in writing. Refer
- to the Ghostscript General Public License for full details.
-
- Everyone is granted permission to copy, modify and redistribute
- Ghostscript, but only under the conditions described in the Ghostscript
- General Public License. A copy of this license is supposed to have been
- given to you along with Ghostscript so you can know your rights and
- responsibilities. It should be in a file named COPYING. Among other
- things, the copyright notice and this notice must be preserved on all
- copies. */
-
- /* gconfig.c */
- /* Installed device and language feature table for Ghostscript */
- #include "gs.h"
- /*
- * Since we only declare variables of type gx_device *,
- * it should be sufficient to define struct gx_device_s as
- * an abstract (undefined) structure. However, the VAX VMS compiler
- * isn't happy with this, so we have to include the full definition.
- */
- #include "gsmatrix.h" /* for gxdevice.h */
- #include "gxbitmap.h"
- #include "gxdevice.h"
-
- /*
- * The Ghostscript makefile generates the file gconfig.h, which consists of
- * lines of the form
- * d(gs_xxx_device)
- * for each installed device, and
- * f(gs_xxx_init)
- * for each language option. We include this file twice, once to declare
- * the devices and procedures as extern, and once to generate the table
- * of pointers and the initialization calls.
- */
-
- /* Here is where the library search path and the name of the */
- /* initialization file are defined. */
- char *gs_lib_default_path = GS_LIB_DEFAULT;
- char *gs_init_file = GS_INIT;
-
- #define d(dev) extern gx_device dev;
- #define f(proc) extern void proc();
- #include "gconfig.h"
- #undef d
- #undef f
-
- gx_device *gx_device_list[] = {
- #define d(dev) &dev,
- #define f(proc)
- #include "gconfig.h"
- #undef d
- #undef f
- 0
- };
-
- void
- gs_init_features()
- {
- #define d(dev)
- #define f(proc) proc();
- #include "gconfig.h"
- #undef d
- #undef f
- }
-