home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / printing / ghostscrip / source / _gs / c / gconfig next >
Encoding:
Text File  |  1991-10-25  |  2.2 KB  |  73 lines

  1. /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises.  All rights reserved.
  2.    Distributed by Free Software Foundation, Inc.
  3.  
  4. This file is part of Ghostscript.
  5.  
  6. Ghostscript is distributed in the hope that it will be useful, but
  7. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. to anyone for the consequences of using it or for whether it serves any
  9. particular purpose or works at all, unless he says so in writing.  Refer
  10. to the Ghostscript General Public License for full details.
  11.  
  12. Everyone is granted permission to copy, modify and redistribute
  13. Ghostscript, but only under the conditions described in the Ghostscript
  14. General Public License.  A copy of this license is supposed to have been
  15. given to you along with Ghostscript so you can know your rights and
  16. responsibilities.  It should be in a file named COPYING.  Among other
  17. things, the copyright notice and this notice must be preserved on all
  18. copies.  */
  19.  
  20. /* gconfig.c */
  21. /* Installed device and language feature table for Ghostscript */
  22. #include "gs.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 "gsmatrix.h"            /* for gxdevice.h */
  30. #include "gxbitmap.h"
  31. #include "gxdevice.h"
  32.  
  33. /*
  34.  * The Ghostscript makefile generates the file gconfig.h, which consists of
  35.  * lines of the form
  36.  *    d(gs_xxx_device)
  37.  * for each installed device, and
  38.  *    f(gs_xxx_init)
  39.  * for each language option.  We include this file twice, once to declare
  40.  * the devices and procedures as extern, and once to generate the table
  41.  * of pointers and the initialization calls.
  42.  */
  43.  
  44. /* Here is where the library search path and the name of the */
  45. /* initialization file are defined. */
  46. char *gs_lib_default_path = GS_LIB_DEFAULT;
  47. char *gs_init_file = GS_INIT;
  48.  
  49. #define d(dev) extern gx_device dev;
  50. #define f(proc) extern void proc();
  51. #include "gconfig.h"
  52. #undef d
  53. #undef f
  54.  
  55. gx_device *gx_device_list[] = {
  56. #define d(dev) &dev,
  57. #define f(proc)
  58. #include "gconfig.h"
  59. #undef d
  60. #undef f
  61.     0
  62. };
  63.  
  64. void
  65. gs_init_features()
  66. {
  67. #define d(dev)
  68. #define f(proc) proc();
  69. #include "gconfig.h"
  70. #undef d
  71. #undef f
  72. }
  73.