File: gconfig.c

package info (click to toggle)
gs 3.33-7
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 7,436 kB
  • ctags: 15,511
  • sloc: ansic: 92,150; asm: 684; sh: 486; makefile: 91
file content (118 lines) | stat: -rw-r--r-- 3,669 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/* Copyright (C) 1989, 1995 Aladdin Enterprises.  All rights reserved.
  
  This file is part of GNU Ghostscript.
  
  GNU 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 GNU Ghostscript General Public License for full details.
  
*/

/* gconfig.c */
/* Configuration tables */
#include "gx.h"
#include "gscdefs.h"		/* interface */
/*
 * 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 "gxdevice.h"
#include "gxiodev.h"

/*
 * The makefile generates the file gconfig.h, which consists of
 * lines of the form
 *	device__(gs_xxx_device)
 * for each installed device;
 *	emulator_("emulator")
 * for each known emulator;
 *	io_device__(gs_iodev_xxx)
 * for each known IODevice;
 *	oper__(xxx_op_defs)
 * for each operator option;
 *	psfile__("gs_xxxx.ps")
 * for each optional initialization file.
 *
 * We include this file multiple times to generate various different
 * source structures.  (It's a hack, but we haven't come up with anything
 * more satisfactory.)
 */

/* Declare the devices as extern. */
#define device_(dev) extern far_data gx_device dev;
#define io_device_(iodev) extern gx_io_device iodev;
#include "gconfig.h"
#undef io_device_
#undef device_

/* Set up the device table. */
#define device_(dev) &dev,
gx_device *gx_device_list[] = {
#include "gconfig.h"
	0
};
#undef device_
uint gx_device_list_count = countof(gx_device_list) - 1;

/* Set up the IODevice table.  The first entry must be %os%, */
/* since it is the default for files with no explicit device specified. */
extern gx_io_device gs_iodev_os;
#define io_device_(iodev) &iodev,
gx_io_device *gx_io_device_table[] = {
	&gs_iodev_os,
#include "gconfig.h"
	0
};
#undef io_device_
uint gx_io_device_table_count = countof(gx_io_device_table) - 1;

/* Here is where the library search path, the name of the */
/* initialization file, and the doc directory are defined. */
const char *gs_doc_directory = GS_DOCDIR;
const char *gs_lib_default_path = GS_LIB_DEFAULT;
const char *gs_init_file = GS_INIT;

/* Define various parameters of this interpreter. */
/* All of these can be set in the makefile. */
/* They should all be const; see gscdefs.h for more information. */
#ifndef GS_BUILDTIME
#  define GS_BUILDTIME\
	0		/****** HOW TO SET THIS? ******/
#endif
long gs_buildtime = GS_BUILDTIME;
#ifndef GS_COPYRIGHT
#  define GS_COPYRIGHT\
	"Copyright (C) 1995 Aladdin Enterprises, Menlo Park, CA.  All rights reserved."
#endif
const char *gs_copyright = GS_COPYRIGHT;	
#ifndef GS_PRODUCT
#  define GS_PRODUCT\
	"Aladdin Ghostscript"
#endif
const char *gs_product = GS_PRODUCT;
#ifndef GS_REVISION
#  define GS_REVISION\
	333		/* primary release # x 100 + */\
			/* secondary release # x 10 + beta release #. */
#endif
long gs_revision = GS_REVISION;		/* should be const, see gscdefs.h */
#ifndef GS_REVISIONDATE
#  define GS_REVISIONDATE\
	19950410	/* year x 10000 + month x 100 + day. */
#endif
long gs_revisiondate = GS_REVISIONDATE;	/* should be const, see gscdefs.h */
#ifndef GS_SERIALNUMBER
#  define GS_SERIALNUMBER\
	42		/* a famous number */
#endif
long gs_serialnumber = GS_SERIALNUMBER;	/* should be const, see gscdefs.h */

/* Some C compilers insist on executable code here, so.... */
void
gconfig_dummy(void)
{
}