home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
ghostscript-2.6.2-diffs.gz
/
ghostscript-2.6.2-diffs
Wrap
Text File
|
1996-10-13
|
356KB
|
12,208 lines
This file contains patches that transform the baseline version into
the amiga version. Assuming that you have unarchived the baseline
version in the current directory, just run the command:
patch -p1 -E -b .pbak <diff-file
where 'diff-file' is this patch file. After running patch you should
remove all the generated *.pbak files, and look for any *.rej files
that indicate a problem patching the baseline source.
diff -rup --new-file baseline/fsf/ghostscript/Makefile.in amiga/fsf/ghostscript/Makefile.in
--- baseline/fsf/ghostscript/Makefile.in Wed Dec 31 17:00:00 1969
+++ amiga/fsf/ghostscript/Makefile.in Sat Sep 28 00:00:00 1996
@@ -0,0 +1,1886 @@
+# Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved.
+#
+# 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.
+
+#### Start of system configuration section. ####
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+# Common prefix for machine-independent installed files.
+prefix = /ade
+# Common prefix for machine-dependent installed files.
+exec_prefix = $(prefix)
+
+# Directory to install executables in.
+bindir = $(exec_prefix)/bin
+# Directory to install libraries in.
+libdir = $(exec_prefix)/lib
+# Directory to install the Info files in.
+infodir = $(prefix)/info
+# Directory to install the man page in.
+mandir = $(prefix)/man/man$(manext)
+# Number to put on the man page filename.
+manext = 1
+
+# Program to install executables.
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+# Program to install data like man pages.
+INSTALL_DATA = @INSTALL_DATA@
+# Generic install program.
+INSTALL = @INSTALL@
+
+CC = @CC@
+#FPU_FLAG =-Dm68881
+#CPU_FLAG =-Dm68030
+DEFS = @DEFS@ $(FPU_FLAG) $(CPU_FLAG) -DUSG
+CFLAGS = @CFLAGS@
+
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+
+EXTRALIBS = -lamiga
+#### End of system configuration section. ####
+
+.c.o:
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $< $(OUTPUT_OPTION)
+
+
+# Define the default directories for the runtime
+# initialization and font files. Separate multiple directories with a ','.
+
+datadir = $(prefix)/lib
+gsdatadir = $(libdir)/ghostscript
+gsfontdir = $(gsdatadir)/fonts
+GS_LIB_DEFAULT=$(gsdatadir),$(gsfontdir)
+
+# Define the name of the Ghostscript initialization file.
+# (There is no reason to change this.)
+
+GS_INIT=gs_init.ps
+
+# Define the name of the executable file.
+
+GS=gs
+
+# Choose the language feature(s) to include. See gs.mak for details.
+
+FEATURE_DEVS=filter.dev dps.dev level2.dev
+
+# Choose the device(s) to include. See devs.mak for details.
+
+DEVICE_DEVS=amiga_.dev amiga.dev amiga_low.dev amiga_high.dev amiga_super.dev
+DEVICE_DEVS1=amiga_a2024.dev amiga_picassoii.dev amiga_printer.dev
+DEVICE_DEVS2=amiga_ilbm.dev amiga_custom.dev
+
+# Define the name of the makefile -- used in dependencies.
+
+MAKEFILE=Makefile
+
+# Define the ANSI-to-K&R dependency. (gcc accepts ANSI syntax.)
+
+AK=
+
+# Define the platform name. For a "stock" System V platform,
+# use sysv_ instead of unix_.
+
+PLATFORM=amiga
+
+# Define the extensions for the object and executable files.
+
+OBJ=o
+XE=
+
+# Define the source directory prefix, shell quote string, and shell names.
+
+EXP=$(srcdir)/
+QQ=\"
+SHELL=/bin/sh
+SH=$(SHELL)
+SHP=$(SH) $(EXP)
+
+# GS - the name of the executable (without the extension, if any).
+# GS_LIB_DEFAULT - the default directory/ies for searching for the
+# initialization and font files at run time.
+# DEVICE_DEVS - the devices to include in the executable.
+# See devs.mak for details.
+# DEVICE_DEVS1...DEVICE_DEVS9 - additional devices, if the definition of
+# DEVICE_DEVS doesn't fit on one line.
+# See devs.mak for details.
+# FEATURE_DEVS - the optional features to include in the
+# executable. Current features are:
+# dps - (partial) support for Display PostScript extensions:
+# see language.doc for details.
+# level2 - (partial) support for PostScript Level 2
+# extensions: see language.doc for details.
+# compfont - support for composite (type 0) fonts.
+# *** NOT IMPLEMENTED YET. ***
+# filter - support for Level 2 filters (other than eexec,
+# ASCIIHexEncode/Decode, NullEncode, PFBDecode,
+# and SubFileDecode, which are always included).
+# ccfonts - precompile fonts into C, and link them
+# with the executable. In the standard makefiles,
+# this is only implemented for a very few fonts:
+# see fonts.doc for details.
+# It is very unlikely that anyone would want to edit the remaining
+# symbols, but we describe them here for completeness:
+# GS_INIT - the name of the initialization file for Ghostscript,
+# normally gs_init.ps.
+# PLATFORM - a "device" name for the platform, so that platforms can
+# add various kinds of resources like devices and features.
+# QQ - a " preceded by whatever escape characters are needed to
+# persuade the shell to pass a " to a program (" on MS-DOS,
+# \" on Unix).
+# XE - the extension for executable files (e.g., null or .exe).
+# OBJ - the extension for relocatable object files (e.g., o or obj).
+# BEGINFILES - the list of files that `make begin' should delete.
+# CCBEGIN - the compilation command for `make begin', normally
+# $(CC) -c $(CFLAGS) $(DEFS) *.c.
+# CCC - the C invocation for normal compilation.
+# CCD - the C invocation for files that store into frame buffers or
+# device registers. Needed because some optimizing compilers
+# will eliminate necessary stores.
+# CCCF - the C invocation for compiled fonts and other large,
+# self-contained data modules. Needed because MS-DOS
+# requires using the 'huge' memory model for these.
+# CCINT - the C invocation for compiling the main interpreter module,
+# normally the same as CCC: this is needed because the
+# Borland compiler generates *worse* code for this module
+# (but only this module) when optimization (-O) is turned on.
+# AK - if source files must be converted from ANSI to K&R syntax,
+# this is ansi2knr$(XE); if not, it is null.
+# If a particular platform requires other utility programs
+# to be built, AK must include them too.
+# SHP - the prefix for invoking a shell script in the current directory
+# (null for MS-DOS, $(SH) ./ for Unix).
+# EXPP, EXP - the prefix for invoking an executable program in the
+# current directory (null for MS-DOS, ./ for Unix).
+# SH - the shell for scripts (null on MS-DOS, sh on Unix).
+# The platform-specific makefiles must also include rules for creating
+# ansi2knr$(XE), genarch$(XE), and genconf$(XE) from the corresponding
+# .c files -- this is needed because Turbo C and Unix C treat the -o
+# switch slightly differently (Turbo C requires no following space,
+# Unix C requires a following space), and I haven't found a way to capture
+# the difference in a macro.
+
+all default: $(GS)$(XE)
+
+distclean realclean: clean
+ rm -f $(MAKEFILE)
+
+clean mostlyclean:
+ rm -f *.$(OBJ) *.a core gmon.out
+ rm -f *.dev *.d_* arch.h gconfig*.h o*.tr l*.tr
+ rm -f t _temp_* _temp_*.* *.map *.sym
+ rm -f ansi2knr$(XE) echogs$(XE) genarch$(XE) genconf$(XE)
+ rm -f $(GS)$(XE) $(BEGINFILES)
+
+# A rule to do a quick and dirty compilation attempt when first installing
+# Ghostscript. Many of the compilations will fail: follow this with 'make'.
+
+begin:
+ rm -f arch.h genarch$(XE) $(GS)$(XE) $(BEGINFILES)
+ make arch.h
+ - $(CCBEGIN)
+ rm -f gconfig.$(OBJ) gdev*.$(OBJ) gp_*.$(OBJ) gsmisc.$(OBJ)
+ rm -f iccfont.$(OBJ) iinit.$(OBJ) interp.$(OBJ) zfiledev.$(OBJ)
+
+# Auxiliary programs
+
+arch.h: genarch$(XE)
+ genarch$(XE) arch.h
+
+# Define the inter-dependencies of the .h files.
+# Since not all versions of `make' defer expansion of macros,
+# we must list these in bottom-to-top order.
+
+# Generic files
+
+arch_h=arch.h
+std_h=std.h $(arch_h)
+
+# Platform interfaces
+
+gp_h=gp.h
+gpcheck_h=gpcheck.h
+
+# C library interfaces
+
+# Because of variations in the "standard" header files between systems, and
+# because we must include std.h before any file that includes sys/types.h,
+# we define local include files named *_.h to substitute for <*.h>.
+
+vmsmath_h=vmsmath.h
+
+dos__h=dos_.h
+ctype__h=ctype_.h $(std_h)
+errno__h=errno_.h
+malloc__h=malloc_.h $(std_h)
+math__h=math_.h $(std_h) $(vmsmath_h)
+memory__h=memory_.h $(std_h)
+stat__h=stat_.h $(std_h)
+stdio__h=stdio_.h $(std_h)
+string__h=string_.h $(std_h)
+time__h=time_.h $(std_h)
+windows__h=windows_.h
+
+# Miscellaneous
+
+gdebug_h=gdebug.h
+gsio_h=gsio.h
+gstypes_h=gstypes.h
+gs_h=gs.h $(stdio__h) $(gsio_h) $(gstypes_h)
+gx_h=gx.h $(gs_h) $(gdebug_h)
+gconfig_h=gconfig.h gsconfig.h
+gserrors_h=gserrors.h
+
+GX=$(AK) $(gx_h)
+GXERR=$(GX) $(gserrors_h)
+
+###### Low-level facilities and utilities
+
+### Include files
+
+gsccode_h=gsccode.h
+gschar_h=gschar.h $(gsccode_h)
+gscie_h=gscie.h
+gscolor_h=gscolor.h
+gscolor2_h=gscolor2.h
+gscoord_h=gscoord.h
+gscrypt1_h=gscrypt1.h
+gscspace_h=gscspace.h
+gsfont_h=gsfont.h
+gsimage_h=gsimage.h
+gsmatrix_h=gsmatrix.h
+gspaint_h=gspaint.h
+gspath_h=gspath.h
+gsprops_h=gsprops.h
+gsstate_h=gsstate.h $(gscolor_h)
+gstype1_h=gstype1.h
+gsuid_h=gsuid.h
+gsutil_h=gsutil.h
+gsxfont_h=gsxfont.h
+
+gxarith_h=gxarith.h
+gxbitmap_h=gxbitmap.h
+gxcache_h=gxcache.h $(gsuid_h) $(gsxfont_h)
+gxcdir_h=gxcdir.h
+gxchar_h=gxchar.h $(gschar_h)
+gxclist_h=gxclist.h
+# gxcldev is out of order because it include gxclist.
+gxcldev_h=gxcldev.h $(gxclist_h)
+gxcpath_h=gxcpath.h
+gxdevice_h=gxdevice.h $(gsmatrix_h) $(gsxfont_h) $(gxbitmap_h)
+gxdevmem_h=gxdevmem.h
+gxfdir_h=gxfdir.h $(gxcdir_h)
+gxfixed_h=gxfixed.h
+gxfont_h=gxfont.h $(gsfont_h) $(gsuid_h)
+gxfrac_h=gxfrac.h
+gximage_h=gximage.h $(gscspace_h) $(gsimage_h)
+gxlum_h=gxlum.h
+gxmatrix_h=gxmatrix.h $(gsmatrix_h)
+gxop1_h=gxop1.h
+gxpath_h=gxpath.h
+gxrefct_h=gxrefct.h
+gxtype1_h=gxtype1.h $(gscrypt1_h) $(gstype1_h)
+gxxfont_h=gxxfont.h $(gsccode_h) $(gsmatrix_h) $(gsuid_h) $(gsxfont_h)
+# gxcolor and gxfmap are out of order because they include other files.
+gxcolor_h=gxcolor.h $(gxfrac_h) $(gsuid_h)
+gxfmap_h=gxfmap.h $(gxfrac_h) $(gxrefct_h)
+
+gzcolor_h=gzcolor.h $(gscolor_h) $(gxfmap_h) $(gxlum_h)
+gzdevice_h=gzdevice.h $(gxdevice_h)
+gzht_h=gzht.h
+gzline_h=gzline.h
+gzpath_h=gzpath.h $(gxpath_h)
+gzstate_h=gzstate.h $(gsstate_h) $(gxfixed_h) $(gxmatrix_h)
+
+### Executable code
+
+gp_nofb.$(OBJ): gp_nofb.c $(AK) \
+ $(gx_h) $(gp_h) $(gxdevice_h)
+
+gsutil.$(OBJ): gsutil.c $(AK) \
+ $(std_h) $(gsprops_h) $(gsutil_h)
+
+gxccache.$(OBJ): gxccache.c $(GXERR) $(gpcheck_h) \
+ $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gzcolor_h) \
+ $(gxcpath_h) $(gxdevmem_h) $(gxfont_h) $(gxfdir_h) $(gxchar_h) \
+ $(gxcache_h) $(gxxfont_h) $(gzstate_h) $(gzpath_h) \
+ $(gscspace_h) $(gsimage_h)
+
+gxccman.$(OBJ): gxccman.c $(GXERR) $(gpcheck_h) \
+ $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gzcolor_h) \
+ $(gxcpath_h) $(gxdevmem_h) $(gxfont_h) $(gxfdir_h) $(gxchar_h) \
+ $(gxcache_h) $(gxxfont_h) $(gzstate_h) $(gzpath_h)
+
+gxclist.$(OBJ): gxclist.c $(GXERR) $(gpcheck_h) \
+ $(gsmatrix_h) $(gxbitmap_h) $(gxcldev_h) $(gxdevice_h) $(gxdevmem_h)
+
+gxclread.$(OBJ): gxclread.c $(GXERR) $(gpcheck_h) \
+ $(gsmatrix_h) $(gxbitmap_h) $(gxcldev_h) $(gxdevice_h) $(gxdevmem_h)
+
+gxcmap.$(OBJ): gxcmap.c $(GXERR) \
+ $(gscspace_h) \
+ $(gxcolor_h) $(gxdevice_h) $(gxfrac_h) $(gxlum_h) \
+ $(gzcolor_h) $(gzstate_h)
+
+gxcpath.$(OBJ): gxcpath.c $(GXERR) \
+ $(gxdevice_h) $(gxfixed_h) $(gzcolor_h) $(gzpath_h) $(gxcpath_h)
+
+gxdither.$(OBJ): gxdither.c $(GX) \
+ $(gxfixed_h) $(gxlum_h) $(gxmatrix_h) $(gzstate_h) $(gzdevice_h) $(gzcolor_h) $(gzht_h)
+
+gxdraw.$(OBJ): gxdraw.c $(GXERR) $(gpcheck_h) \
+ $(gxfixed_h) $(gxmatrix_h) $(gxbitmap_h) $(gzcolor_h) $(gzdevice_h) $(gzstate_h)
+
+gxfill.$(OBJ): gxfill.c $(GXERR) \
+ $(gxfixed_h) $(gxmatrix_h) $(gxdevice_h) $(gzcolor_h) $(gzpath_h) $(gzstate_h) $(gxcpath_h)
+
+gxhint1.$(OBJ): gxhint1.c $(GXERR) \
+ $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gxdevmem_h) $(gxchar_h) $(gxfont_h) $(gxtype1_h) \
+ $(gzdevice_h) $(gzstate_h)
+
+gxhint2.$(OBJ): gxhint2.c $(GXERR) \
+ $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gxdevmem_h) $(gxchar_h) $(gxfont_h) $(gxtype1_h) $(gxop1_h) \
+ $(gzdevice_h) $(gzstate_h)
+
+gxht.$(OBJ): gxht.c $(GXERR) \
+ $(gxfixed_h) $(gxmatrix_h) $(gxbitmap_h) $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h)
+
+gxpath.$(OBJ): gxpath.c $(GXERR) \
+ $(gxfixed_h) $(gzpath_h)
+
+gxpath2.$(OBJ): gxpath2.c $(GXERR) \
+ $(gxfixed_h) $(gxarith_h) $(gzpath_h)
+
+gxpcopy.$(OBJ): gxpcopy.c $(GXERR) \
+ $(gxfixed_h) $(gxarith_h) $(gzpath_h)
+
+gxstroke.$(OBJ): gxstroke.c $(GXERR) $(gpcheck_h) \
+ $(gscoord_h) $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) \
+ $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzline_h) $(gzpath_h)
+
+###### High-level facilities
+
+gschar.$(OBJ): gschar.c $(GXERR) \
+ $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gzdevice_h) $(gxdevmem_h) $(gxfont_h) $(gxchar_h) $(gxcache_h) $(gstype1_h) $(gspath_h) $(gzpath_h) $(gzcolor_h) $(gzstate_h)
+
+gscolor.$(OBJ): gscolor.c $(GXERR) \
+ $(gscspace_h) $(gxcolor_h) $(gxdevice_h) $(gxrefct_h) \
+ $(gzstate_h) $(gzcolor_h)
+
+gscoord.$(OBJ): gscoord.c $(GXERR) \
+ $(gsccode_h) $(gxarith_h) $(gxfixed_h) $(gxfont_h) $(gxmatrix_h) \
+ $(gzdevice_h) $(gzstate_h) $(gscoord_h)
+
+gsdevice.$(OBJ): gsdevice.c $(GXERR) \
+ $(gxarith_h) $(gsprops_h) $(gsutil_h) $(gxbitmap_h) $(gxdevmem_h) \
+ $(gzstate_h) $(gzdevice_h)
+
+gsfile.$(OBJ): gsfile.c $(GXERR) \
+ $(gsmatrix_h) $(gxdevice_h) $(gxdevmem_h)
+
+gsfont.$(OBJ): gsfont.c $(GXERR) \
+ $(gxdevice_h) $(gxfixed_h) $(gxmatrix_h) $(gxfont_h) $(gxfdir_h) \
+ $(gzstate_h)
+
+gsht.$(OBJ): gsht.c $(GXERR) \
+ $(gzht_h) $(gzstate_h)
+
+gsimage.$(OBJ): gsimage.c $(GXERR) $(gpcheck_h) \
+ $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gspaint_h) \
+ $(gzcolor_h) $(gzdevice_h) $(gzpath_h) $(gzstate_h) \
+ $(gxcolor_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
+
+gsimage1.$(OBJ): gsimage1.c $(GXERR) $(gpcheck_h) \
+ $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gscspace_h) $(gspaint_h) \
+ $(gzcolor_h) $(gzdevice_h) $(gzpath_h) $(gzstate_h) \
+ $(gxcolor_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
+
+gsimage2.$(OBJ): gsimage2.c $(GXERR) $(gpcheck_h) \
+ $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gscspace_h) $(gspaint_h) \
+ $(gzcolor_h) $(gzdevice_h) $(gzpath_h) $(gzstate_h) \
+ $(gxcolor_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
+
+gsimpath.$(OBJ): gsimpath.c $(GXERR) \
+ $(gsmatrix_h) $(gsstate_h) $(gspath_h)
+
+gsline.$(OBJ): gsline.c $(GXERR) \
+ $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gzline_h)
+
+gsmatrix.$(OBJ): gsmatrix.c $(GXERR) \
+ $(gxfixed_h) $(gxarith_h) $(gxmatrix_h)
+
+gsmisc.$(OBJ): gsmisc.c $(GX) $(errno__h) $(malloc__h) $(memory__h) $(MAKEFILE)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DUSE_ASM=0$(USE_ASM) $(srcdir)/gsmisc.c
+
+gspaint.$(OBJ): gspaint.c $(GXERR) $(gpcheck_h) \
+ $(gxfixed_h) $(gxmatrix_h) $(gspaint_h) $(gzpath_h) $(gzstate_h) $(gzdevice_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
+
+gspath.$(OBJ): gspath.c $(GXERR) \
+ $(gxfixed_h) $(gxmatrix_h) $(gxpath_h) $(gzstate_h)
+
+gspath2.$(OBJ): gspath2.c $(GXERR) \
+ $(gspath_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gzpath_h) $(gzdevice_h)
+
+gsstate.$(OBJ): gsstate.c $(GXERR) \
+ $(gscie_h) $(gscolor2_h) $(gscspace_h) $(gxcolor_h) $(gxrefct_h) \
+ $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h) $(gzline_h) $(gzpath_h)
+
+gstdev.$(OBJ): gstdev.c $(GXERR) \
+ $(gxbitmap_h) $(gxdevice_h) $(gxfixed_h) $(gxmatrix_h)
+
+gstype1.$(OBJ): gstype1.c $(GXERR) \
+ $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gxchar_h) $(gxdevmem_h) $(gxop1_h) $(gxtype1_h) \
+ $(gzstate_h) $(gzdevice_h) $(gzpath_h)
+
+###### The internal devices
+
+gdevmem_h=gdevmem.h
+
+gdevemap.$(OBJ): gdevemap.c $(AK) $(std_h)
+
+gdevmem1.$(OBJ): gdevmem1.c $(AK) \
+ $(gx_h) $(gserrors_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h)
+
+gdevmem2.$(OBJ): gdevmem2.c $(AK) \
+ $(gx_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h)
+
+gdevmem3.$(OBJ): gdevmem3.c $(AK) \
+ $(gx_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h)
+
+###### Files dependent on the installed devices, features, and platform.
+# Generating gconfig.h also generates o*.tr and l*.tr.
+
+# gconfig.h shouldn't have to depend on ALL_DEVS, but that would
+# involve rewriting gsconfig to only save the device name, not the
+# contents of the <device>.D_# files.
+
+ALL_DEVS=$(FEATURE_DEVS) $(PLATFORM).dev \
+ $(DEVICE_DEVS) $(DEVICE_DEVS1) \
+ $(DEVICE_DEVS2) $(DEVICE_DEVS3) $(DEVICE_DEVS4) $(DEVICE_DEVS5)\
+ $(DEVICE_DEVS6) $(DEVICE_DEVS7) $(DEVICE_DEVS8) $(DEVICE_DEVS9)
+
+gconfig.h obj.tr objw.tr ld.tr lib.tr: \
+ devs.mak $(MAKEFILE) echogs$(XE) genconf$(XE) $(ALL_DEVS)
+ echogs -w t.cfg - $(FEATURE_DEVS) $(PLATFORM).dev
+ echogs -a t.cfg - $(DEVICE_DEVS)
+ echogs -a t.cfg - $(DEVICE_DEVS1)
+ echogs -a t.cfg - $(DEVICE_DEVS2)
+ echogs -a t.cfg - $(DEVICE_DEVS3)
+ echogs -a t.cfg - $(DEVICE_DEVS4)
+ echogs -a t.cfg - $(DEVICE_DEVS5)
+ echogs -a t.cfg - $(DEVICE_DEVS6)
+ echogs -a t.cfg - $(DEVICE_DEVS7)
+ echogs -a t.cfg - $(DEVICE_DEVS8)
+ echogs -a t.cfg - $(DEVICE_DEVS9)
+ genconf @t.cfg -h gconfig.h -l lib.tr -o obj.tr -u ld.tr -w objw.tr
+ rm t.cfg
+ echogs -a gconfig.h -x 23 define GS_LIB_DEFAULT -x 2022 $(GS_LIB_DEFAULT) -x 22
+ echogs -a gconfig.h -x 23 define GS_INIT -x 2022 $(GS_INIT) -x 22
+
+gconfig.$(OBJ): gconfig.c $(AK) $(gconfig_h) $(MAKEFILE)
+
+###### On Unix, we pre-link all of the library except the back end.
+###### On MS-DOS, we have to do the whole thing at once.
+
+LIBGS=gschar.$(OBJ) gscolor.$(OBJ) gscoord.$(OBJ) \
+ gsdevice.$(OBJ) gsfile.$(OBJ) gsfont.$(OBJ) gsht.$(OBJ) \
+ gsimage.$(OBJ) gsimage1.$(OBJ) gsimage2.$(OBJ) \
+ gsimpath.$(OBJ) gsline.$(OBJ) gsmatrix.$(OBJ) gsmisc.$(OBJ) \
+ gspaint.$(OBJ) gspath.$(OBJ) gspath2.$(OBJ) \
+ gsstate.$(OBJ) gstdev.$(OBJ) gstype1.$(OBJ) gsutil.$(OBJ) \
+ gxccache.$(OBJ) gxccman.$(OBJ) gxclist.$(OBJ) gxclread.$(OBJ) \
+ gxcmap.$(OBJ) gxcpath.$(OBJ) \
+ gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \
+ gxhint1.$(OBJ) gxhint2.$(OBJ) gxht.$(OBJ) \
+ gxpath.$(OBJ) gxpath2.$(OBJ) gxpcopy.$(OBJ) gxstroke.$(OBJ) \
+ gdevmem1.$(OBJ) gdevmem2.$(OBJ) gdevmem3.$(OBJ) gconfig.$(OBJ)
+
+# ------------------------------ Interpreter ------------------------------ #
+
+###### Include files
+
+alloc_h=alloc.h
+astate_h=astate.h
+ccfont_h=ccfont.h
+dict_h=dict.h
+dparam_h=dparam.h
+dstack_h=dstack.h
+errors_h=errors.h
+estack_h=estack.h
+filedev_h=filedev.h
+files_h=files.h
+font_h=font.h
+ilevel_h=ilevel.h
+iname_h=iname.h
+iref_h=iref.h
+iscan_h=iscan.h
+ivmspace_h=ivmspace.h
+iutil_h=iutil.h
+main_h=main.h
+opdef_h=opdef.h
+ostack_h=ostack.h
+overlay_h=overlay.h
+packed_h=packed.h
+save_h=save.h
+scanchar_h=scanchar.h
+sbits_h=sbits.h
+shc_h=shc.h
+state_h=state.h
+store_h=store.h
+stream_h=stream.h
+# Nested include files
+bfont_h=bfont.h $(font_h)
+ghost_h=ghost.h $(gx_h) $(iref_h)
+oper_h=oper.h $(gsutil_h) $(iutil_h) $(opdef_h) $(ostack_h)
+scf_h=scf.h $(shc_h)
+sdct_h=sdct.h $(shc_h)
+# Include files for optional features
+bnum_h=bnum.h
+bseq_h=bseq.h
+btoken_h=btoken.h
+
+comp1_h=comp1.h $(ghost_h) $(oper_h) $(gserrors_h) $(gxfixed_h) $(gxop1_h)
+
+gdevprn_h=gdevprn.h $(memory__h) $(string__h) $(gx_h) \
+ $(gserrors_h) $(gsmatrix_h) $(gxdevice_h) $(gxdevmem_h) $(gxclist_h)
+
+###### Utilities
+
+GH=$(AK) $(ghost_h)
+
+ialloc.$(OBJ): ialloc.c $(AK) $(gx_h) $(alloc_h) $(astate_h) $(ivmspace_h)
+
+iccfont.$(OBJ): iccfont.c $(GH) gconfigf.h \
+ $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) \
+ $(font_h) $(iutil_h) $(iname_h) $(oper_h) $(save_h) $(store_h)
+
+idebug.$(OBJ): idebug.c $(GH) \
+ $(iutil_h) $(dict_h) $(iname_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h)
+
+idict.$(OBJ): idict.c $(GH) \
+ $(alloc_h) $(errors_h) $(ivmspace_h) $(iname_h) $(packed_h) \
+ $(save_h) $(store_h) $(iutil_h) $(dict_h) $(dstack_h)
+
+idparam.$(OBJ): idparam.c $(GH) \
+ $(gsmatrix_h) $(dict_h) $(dparam_h) $(errors_h) $(iutil_h)
+
+iinit.$(OBJ): iinit.c $(GH) $(gconfig_h) \
+ $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) $(ilevel_h) $(iname_h) $(oper_h) $(store_h)
+
+iname.$(OBJ): iname.c $(GH) $(alloc_h) $(errors_h) $(ivmspace_h) $(iname_h) $(store_h)
+
+isave.$(OBJ): isave.c $(GH) $(alloc_h) $(astate_h) $(errors_h) $(iname_h) $(packed_h) $(save_h) $(store_h)
+
+iscan.$(OBJ): iscan.c $(GH) $(ctype__h) \
+ $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) \
+ $(ilevel_h) $(iutil_h) $(iscan_h) $(ivmspace_h) \
+ $(iname_h) $(ostack_h) $(packed_h) $(store_h) $(stream_h) $(scanchar_h)
+
+iutil.$(OBJ): iutil.c $(GH) \
+ $(errors_h) $(alloc_h) $(dict_h) $(iutil_h) $(ivmspace_h) \
+ $(iname_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h) \
+ $(gsmatrix_h) $(gxdevice_h) $(gzcolor_h)
+
+sfilter.$(OBJ): sfilter.c $(AK) $(stdio__h) \
+ $(scanchar_h) $(stream_h) $(gscrypt1_h)
+
+stream.$(OBJ): stream.c $(AK) $(stdio__h) $(memory__h) \
+ $(gpcheck_h) $(scanchar_h) $(stream_h)
+
+###### Operators
+
+OP=$(GH) $(errors_h) $(oper_h)
+
+### Non-graphics operators
+
+zarith.$(OBJ): zarith.c $(OP) $(store_h)
+
+zarray.$(OBJ): zarray.c $(OP) $(alloc_h) $(packed_h) $(store_h)
+
+zcontrol.$(OBJ): zcontrol.c $(OP) $(estack_h) $(iutil_h) $(store_h)
+
+zdict.$(OBJ): zdict.c $(OP) $(dict_h) $(dstack_h) $(iname_h) $(store_h)
+
+zfile.$(OBJ): zfile.c $(OP) $(gp_h) \
+ $(alloc_h) $(estack_h) $(filedev_h) $(files_h) $(ilevel_h) $(iutil_h) \
+ $(save_h) $(stream_h) $(store_h)
+
+zfiledev.$(OBJ): zfiledev.c $(OP) $(string__h) $(gp_h) $(gconfig_h) \
+ $(filedev_h) $(files_h) $(stream_h)
+
+zfileio.$(OBJ): zfileio.c $(OP) $(gp_h) \
+ $(estack_h) $(files_h) $(iscan_h) $(store_h) $(stream_h) \
+ $(gsmatrix_h) $(gxdevice_h) $(gxdevmem_h)
+
+zfilter.$(OBJ): zfilter.c $(OP) $(alloc_h) $(stream_h)
+
+zgeneric.$(OBJ): zgeneric.c $(OP) \
+ $(dict_h) $(estack_h) $(ivmspace_h) $(iname_h) $(packed_h) $(store_h)
+
+zmath.$(OBJ): zmath.c $(OP) $(store_h)
+
+zmisc.$(OBJ): zmisc.c $(OP) $(gp_h) $(errno__h) $(memory__h) $(string__h) \
+ $(alloc_h) $(dict_h) $(dstack_h) $(iname_h) $(ivmspace_h) $(packed_h) $(store_h) \
+ $(gscrypt1_h)
+
+zpacked.$(OBJ): zpacked.c $(OP) \
+ $(alloc_h) $(dict_h) $(ivmspace_h) $(iname_h) $(packed_h) $(save_h) $(store_h)
+
+zprops.$(OBJ): zprops.c $(OP) \
+ $(alloc_h) $(dict_h) $(iname_h) $(state_h) $(store_h) \
+ $(gsprops_h) $(gsmatrix_h) $(gxdevice_h) $(gsstate_h)
+
+zrelbit.$(OBJ): zrelbit.c $(OP) $(store_h) $(dict_h)
+
+zstack.$(OBJ): zstack.c $(OP) $(store_h)
+
+zstring.$(OBJ): zstring.c $(OP) \
+ $(alloc_h) $(iscan_h) $(iutil_h) $(iname_h) $(store_h) $(stream_h)
+
+ztype.$(OBJ): ztype.c $(OP) \
+ $(dict_h) $(iscan_h) $(iutil_h) $(iname_h) $(stream_h) $(store_h)
+
+zvmem.$(OBJ): zvmem.c $(OP) $(alloc_h) $(dict_h) $(dstack_h) $(estack_h) $(save_h) $(state_h) $(store_h) \
+ $(gsmatrix_h) $(gsstate_h)
+
+###### Graphics operators
+
+zchar.$(OBJ): zchar.c $(OP) $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) \
+ $(gschar_h) $(gxtype1_h) $(gxdevice_h) $(gxfont_h) $(gzpath_h) $(gzstate_h) \
+ $(alloc_h) $(dict_h) $(font_h) $(estack_h) $(ilevel_h) $(iname_h) $(state_h) $(store_h)
+
+zcolor.$(OBJ): zcolor.c $(OP) $(alloc_h) $(estack_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gxdevice_h) $(gzcolor_h) $(iutil_h) $(state_h) $(store_h)
+
+zdevice.$(OBJ): zdevice.c $(OP) $(alloc_h) $(state_h) $(gsmatrix_h) $(gsstate_h) $(gxdevice_h) $(store_h)
+
+zfont.$(OBJ): zfont.c $(OP) \
+ $(gsmatrix_h) $(gxdevice_h) $(gxfont_h) $(gxfdir_h) $(gxcache_h) \
+ $(alloc_h) $(bfont_h) $(dict_h) $(iname_h) $(packed_h) $(save_h) $(state_h) $(store_h)
+
+zfont1.$(OBJ): zfont1.c $(OP) $(gsmatrix_h) $(gxdevice_h) $(gschar_h) $(gxfixed_h) $(gxfont_h) \
+ $(bfont_h) $(dict_h) $(dparam_h) $(iname_h) $(store_h)
+
+zfont2.$(OBJ): zfont2.c $(OP) $(gsmatrix_h) $(gxdevice_h) $(gschar_h) $(gxfixed_h) $(gxfont_h) \
+ $(alloc_h) $(bfont_h) $(dict_h) $(dparam_h) $(ilevel_h) $(iname_h) \
+ $(packed_h) $(save_h) $(store_h)
+
+zgstate.$(OBJ): zgstate.c $(OP) $(alloc_h) $(gsmatrix_h) $(gsstate_h) $(state_h) $(store_h)
+
+zht.$(OBJ): zht.c $(OP) $(alloc_h) $(estack_h) $(gsmatrix_h) $(gsstate_h) $(state_h) $(store_h)
+
+zmatrix.$(OBJ): zmatrix.c $(OP) $(gsmatrix_h) $(state_h) $(gscoord_h) $(store_h)
+
+zpaint.$(OBJ): zpaint.c $(OP) \
+ $(alloc_h) $(estack_h) $(ilevel_h) $(state_h) $(store_h) $(stream_h) \
+ $(gsimage_h) $(gsmatrix_h) $(gspaint_h)
+
+zpath.$(OBJ): zpath.c $(OP) $(gsmatrix_h) $(gspath_h) $(state_h) $(store_h)
+
+zpath2.$(OBJ): zpath2.c $(OP) $(alloc_h) $(estack_h) $(gspath_h) $(state_h) $(store_h)
+
+###### Linking
+
+INT=ialloc.$(OBJ) idebug.$(OBJ) idict.$(OBJ) idparam.$(OBJ) \
+ iinit.$(OBJ) iname.$(OBJ) \
+ interp.$(OBJ) isave.$(OBJ) iscan.$(OBJ) iutil.$(OBJ) \
+ sfilter.$(OBJ) stream.$(OBJ) \
+ zarith.$(OBJ) zarray.$(OBJ) zcontrol.$(OBJ) zdict.$(OBJ) \
+ zfile.$(OBJ) zfiledev.$(OBJ) zfileio.$(OBJ) zfilter.$(OBJ) zgeneric.$(OBJ) \
+ zmath.$(OBJ) zmisc.$(OBJ) zpacked.$(OBJ) zprops.$(OBJ) zrelbit.$(OBJ) \
+ zstack.$(OBJ) zstring.$(OBJ) ztype.$(OBJ) zvmem.$(OBJ) \
+ zchar.$(OBJ) zcolor.$(OBJ) zfont.$(OBJ) zfont1.$(OBJ) zfont2.$(OBJ) \
+ zdevice.$(OBJ) zgstate.$(OBJ) zht.$(OBJ) zmatrix.$(OBJ) \
+ zpaint.$(OBJ) zpath.$(OBJ) zpath2.$(OBJ)
+
+# -------------------------- Optional features ---------------------------- #
+
+### Additions common to Display PostScript and Level 2
+
+# We have to split up the module list because of limitations
+# on the number of arguments to a DOS batch file.
+dpsand2a_=gsdps1.$(OBJ) ibnum.$(OBJ) iscan2.$(OBJ)
+dpsand2b_=zbseq.$(OBJ) zchar2.$(OBJ) zdps1.$(OBJ) zupath.$(OBJ) zvmem2.$(OBJ)
+dpsand2_=$(dpsand2a_) $(dpsand2b_)
+dpsand2.dev: $(dpsand2_) gssetmod gsaddmod
+ $(SHP)gssetmod dpsand2 $(dpsand2a_)
+ $(SHP)gsaddmod dpsand2 -obj $(dpsand2b_)
+ $(SHP)gsaddmod dpsand2 -oper2 zbseq zchar2 zdps1 zupath zvmem2
+ $(SHP)gsaddmod dpsand2 -ps gs_dps1
+
+gsdps1.$(OBJ): gsdps1.c $(GXERR) $(gxfixed_h) $(gxmatrix_h) $(gzpath_h) $(gzstate_h)
+
+ibnum.$(OBJ): ibnum.c $(GH) $(errors_h) $(stream_h) $(bnum_h) $(btoken_h)
+
+iscan2.$(OBJ): iscan2.c $(GH) $(errors_h) \
+ $(alloc_h) $(dict_h) $(dstack_h) $(iscan_h) $(iutil_h) $(ivmspace_h) \
+ $(iname_h) $(ostack_h) $(save_h) $(store_h) $(stream_h) \
+ $(bseq_h) $(btoken_h) $(bnum_h)
+
+zbseq.$(OBJ): zbseq.c $(OP) $(save_h) $(store_h) $(stream_h) $(files_h) $(iname_h) $(bnum_h) $(btoken_h) $(bseq_h)
+
+zchar2.$(OBJ): zchar2.c $(OP) $(gschar_h) $(gsmatrix_h) $(gxfixed_h) $(gxfont_h) \
+ $(alloc_h) $(estack_h) $(font_h) $(iname_h) $(state_h) $(store_h) $(stream_h) $(bnum_h)
+
+zdps1.$(OBJ): zdps1.c $(OP) $(gsmatrix_h) $(gspath_h) $(gsstate_h) \
+ $(alloc_h) $(ivmspace_h) $(state_h) $(store_h) $(stream_h) $(bnum_h)
+
+zupath.$(OBJ): zupath.c $(OP) \
+ $(dict_h) $(dstack_h) $(iutil_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) \
+ $(gscoord_h) $(gsmatrix_h) $(gspaint_h) $(gspath_h) $(gsstate_h) \
+ $(gxfixed_h) $(gxdevice_h) $(gxpath_h)
+
+zvmem2.$(OBJ): zvmem2.c $(OP) \
+ $(ivmspace_h) $(store_h)
+
+### Display PostScript
+# We should include zcontext, but it isn't in good enough shape yet:
+# $(SHP)gsaddmod dps -oper2 zcontext
+
+dps_=
+dps.dev: dpsand2.dev $(dps_) gssetmod gsaddmod
+ $(SHP)gssetmod dps $(dps_)
+ $(SHP)gsaddmod dps -include dpsand2
+
+zcontext.$(OBJ): zcontext.c $(OP) \
+ $(alloc_h) $(dict_h) $(dstack_h) $(estack_h) $(state_h) $(store_h)
+
+### Composite font support
+
+gschar0.$(OBJ): gschar0.c $(GXERR) \
+ $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gxdevmem_h) $(gxfont_h) $(gxchar_h) $(gzstate_h)
+
+zfont0.$(OBJ): zfont0.c $(OP) $(gsmatrix_h) $(gxdevice_h) $(gxfont_h) \
+ $(alloc_h) $(bfont_h) $(dict_h) $(iname_h) $(state_h) $(store_h)
+
+compfont_=zchar2.$(OBJ) zfont0.$(OBJ) gschar0.$(OBJ)
+compfont.dev: $(compfont_) gssetmod gsaddmod
+ $(SHP)gssetmod compfont $(compfont_)
+ $(SHP)gsaddmod compfont -oper zfont0 zchar2
+ $(SHP)gsaddmod compfont -ps gs_type0
+
+### Level 2 additions
+
+# We have to split up the module list because of limitations
+# on the number of arguments to a DOS batch file.
+level2a_=gscie.$(OBJ) gscolor2.$(OBJ) zcie.$(OBJ) zcolor2.$(OBJ)
+level2b_=zcspace2.$(OBJ) zht2.$(OBJ) zimage2.$(OBJ) zmisc2.$(OBJ)
+level2_=$(level2a_) $(level2b_)
+level2.dev: compfont.dev dpsand2.dev filter.dev $(level2_) gssetmod gsaddmod
+ $(SHP)gssetmod level2 $(level2a_)
+ $(SHP)gsaddmod level2 -obj $(level2b_)
+ $(SHP)gsaddmod level2 -include compfont dpsand2 filter
+ $(SHP)gsaddmod level2 -oper zmisc2_level
+ $(SHP)gsaddmod level2 -oper2 zcie zcolor2 zcspace2
+ $(SHP)gsaddmod level2 -oper2 zht2 zimage2 zmisc2
+ $(SHP)gsaddmod level2 -ps gs_lev2
+
+gscie.$(OBJ): gscie.c $(GXERR) \
+ $(gscspace_h) $(gscie_h) $(gscolor2_h) \
+ $(gxarith_h) $(gxcolor_h) $(gxdevice_h) $(gxrefct_h) \
+ $(gzcolor_h) $(gzstate_h)
+
+gscolor2.$(OBJ): gscolor2.c $(GXERR) \
+ $(gscie_h) $(gscolor2_h) $(gscspace_h) \
+ $(gxcolor_h) $(gxdevice_h) $(gxfixed_h) $(gxmatrix_h) $(gxrefct_h) \
+ $(gzcolor_h) $(gzstate_h)
+
+zcie.$(OBJ): zcie.c $(OP) \
+ $(gscspace_h) $(gscolor2_h) $(gscie_h) $(gxcolor_h) $(gxrefct_h) \
+ $(alloc_h) $(dict_h) $(dparam_h) $(estack_h) $(save_h) $(state_h) $(store_h)
+
+zcolor2.$(OBJ): zcolor2.c $(OP) \
+ $(gscolor_h) $(gxcolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) \
+ $(dict_h) $(dparam_h) $(iname_h) $(state_h) $(store_h)
+
+zcspace2.$(OBJ): zcspace2.c $(OP) \
+ $(gscolor_h) $(gxcolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) \
+ $(dict_h) $(dparam_h) $(estack_h) $(iname_h) $(state_h) $(store_h)
+
+zht2.$(OBJ): zht2.c $(OP) \
+ $(dict_h) $(dparam_h) $(iname_h) $(state_h) $(store_h)
+
+zimage2.$(OBJ): zimage2.c $(OP) \
+ $(gscolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) $(gxcolor_h) \
+ $(dict_h) $(dparam_h) $(ilevel_h) $(state_h)
+
+zmisc2.$(OBJ): zmisc2.c $(OP) \
+ $(gsfont_h) \
+ $(dict_h) $(dparam_h) $(dstack_h) $(estack_h) $(ilevel_h) $(iname_h) $(store_h)
+
+### Filters other than the ones in sfilter.c
+
+sbits.$(OBJ): sbits.c $(AK) $(stdio__h) $(sbits_h) $(stream_h)
+
+scftab.$(OBJ): scftab.c $(AK) $(std_h) $(scf_h)
+
+scfdtab.$(OBJ): scfdtab.c $(AK) $(std_h) $(scf_h)
+
+scfd.$(OBJ): scfd.c $(AK) $(stdio__h) $(gdebug_h)\
+ $(sbits_h) $(scf_h) $(stream_h)
+
+scfe.$(OBJ): scfe.c $(AK) $(stdio__h) $(gdebug_h)\
+ $(sbits_h) $(scf_h) $(stream_h)
+
+sdctd.$(OBJ): sdctd.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
+
+sdcte.$(OBJ): sdcte.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
+
+sfilter2.$(OBJ): sfilter2.c $(AK) $(stdio__h) $(scanchar_h) $(stream_h)
+
+slzwd.$(OBJ): slzwd.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
+
+slzwe.$(OBJ): slzwe.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
+
+zfilter2.$(OBJ): zfilter2.c $(OP) $(alloc_h) $(dict_h) $(dparam_h) $(sdct_h) $(stream_h)
+
+# Because of size limits on the DOS command line,
+# we have to break this up into two parts.
+filter_1=zfilter2.$(OBJ) sfilter2.$(OBJ) sbits.$(OBJ)
+filter_2=scfdtab.$(OBJ) scftab.$(OBJ) scfd.$(OBJ) scfe.$(OBJ)
+filter_3=sdctd.$(OBJ) sdcte.$(OBJ) slzwd.$(OBJ) slzwe.$(OBJ)
+filter.dev: $(filter_1) $(filter_2) $(filter_3) gssetmod gsaddmod
+ $(SHP)gssetmod filter $(filter_1)
+ $(SHP)gsaddmod filter -obj $(filter_2)
+ $(SHP)gsaddmod filter -obj $(filter_3)
+ $(SHP)gsaddmod filter -oper zfilter2
+
+### Precompiled fonts. See fonts.doc for more information.
+
+CCFONT=$(OP) $(ccfont_h)
+
+# List the fonts we are going to compile.
+# Because of intrinsic limitations in `make', we have to list
+# the object file names and the font names separately.
+ccfonts1_=uglyr.$(OBJ)
+ccfonts1=uglyr
+
+ccfonts.dev: $(MAKEFILE) gs.mak iccfont.$(OBJ) gssetmod gsaddmod \
+ $(ccfonts1_) $(ccfonts2_) $(ccfonts3_) $(ccfonts4_) $(ccfonts5_)
+ $(SHP)gssetmod ccfonts iccfont.$(OBJ)
+ $(SHP)gsaddmod ccfonts -obj $(ccfonts1_)
+ $(SHP)gsaddmod ccfonts -obj $(ccfonts2_)
+ $(SHP)gsaddmod ccfonts -obj $(ccfonts3_)
+ $(SHP)gsaddmod ccfonts -obj $(ccfonts4_)
+ $(SHP)gsaddmod ccfonts -obj $(ccfonts5_)
+ $(SHP)gsaddmod ccfonts -oper ccfonts
+
+gconfigf.h: $(MAKEFILE) gs.mak genconf$(XE) gssetmod gsaddmod
+ $(SHP)gssetmod ccfonts_
+ $(SHP)gsaddmod ccfonts_ -font $(ccfonts1)
+ $(SHP)gsaddmod ccfonts_ -font $(ccfonts2)
+ $(SHP)gsaddmod ccfonts_ -font $(ccfonts3)
+ $(SHP)gsaddmod ccfonts_ -font $(ccfonts4)
+ $(SHP)gsaddmod ccfonts_ -font $(ccfonts5)
+ $(EXP)genconf ccfonts_.dev -f gconfigf.h
+
+uglyr.$(OBJ): uglyr.c $(CCFONT)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/uglyr.c
+
+ncrr.$(OBJ): ncrr.c $(CCFONT)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/ncrr.c
+
+pagk.$(OBJ): pagk.c $(CCFONT)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/pagk.c
+
+psyr.$(OBJ): psyr.c $(CCFONT)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/psyr.c
+
+ptmr.$(OBJ): ptmr.c $(CCFONT)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/ptmr.c
+
+pzdr.$(OBJ): pzdr.c $(CCFONT)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/pzdr.c
+
+# ----------------------------- Main program ------------------------------ #
+
+# Interpreter main program
+
+gs.$(OBJ): gs.c $(GH) $(ctype__h) \
+ $(gxdevice_h) $(gxdevmem_h) \
+ $(alloc_h) $(errors_h) $(estack_h) $(files_h) $(iscan_h) $(main_h) $(ostack_h) $(store_h) $(stream_h)
+
+gsmain.$(OBJ): gsmain.c $(GH) \
+ $(gp_h) $(gsmatrix_h) $(gxdevice_h) $(gserrors_h) \
+ $(estack_h) $(files_h) $(iscan_h) $(main_h) $(ostack_h) $(store_h)
+
+interp.$(OBJ): interp.c $(GH) \
+ $(errors_h) $(estack_h) $(iname_h) $(dict_h) $(dstack_h) $(iscan_h) $(oper_h) $(ostack_h) $(packed_h) $(save_h) $(store_h) $(stream_h)
+ $(CC) -c -I. -I$(srcdir) $(CFLAGS) $(DEFS) $(srcdir)/interp.c
+
+# It is possible to build Ghostscript with an arbitrary collection of
+# device drivers, although some drivers are supported only on a subset
+# of the target platforms. The currently available drivers are:
+
+# Displays:
+# MS-DOS EGA and VGA:
+# ega EGA (640x350, 16-color)
+# vga VGA (640x480, 16-color)
+# MS-DOS SuperVGA:
+# + atiw ATI Wonder SuperVGA, 256-color modes
+# + atiw16 ATI Wonder SuperVGA in 800x600, 16-color mode
+# s3vga SuperVGA with S3 86C911 chip (e.g., Diamond Stealth board)
+# tseng SuperVGA using Tseng Labs ET3000/4000 chips, 256-color modes
+# tseng16 Tseng Labs SuperVGA in 800x600, 16-color mode (256K memory)
+# + tvga Trident SuperVGA, 256-color modes
+# + tvga16 Trident SuperVGA in 800x600, 16-color mode (256K memory)
+# ****** NOTE: The vesa device does not work with the Watcom (32-bit MS-DOS)
+# ****** compiler or executable.
+# vesa SuperVGA with VESA standard API driver
+# MS-DOS other:
+# bgi Borland Graphics Interface (CGA) [MS-DOS only]
+# * herc Hercules Graphics display [MS-DOS only]
+# mswin Microsoft Windows 3.0, 3.1 [MS Windows only]
+# mswinprn Microsoft Windows 3.0, 3.1 printer [MS Windows only]
+# * pe Private Eye display
+# Unix and VMS:
+# ****** NOTE: For direct frame buffer addressing under SCO Unix or Xenix,
+# ****** edit the definition of EGAVGA below.
+# * att3b1 AT&T 3b1/Unixpc monochrome display [3b1 only]
+# * sonyfb Sony Microsystems monochrome display [Sony only]
+# * sunview SunView window system [SunOS only]
+# x11 X Windows version 11, release >=4 [Unix and VMS only]
+# Printers:
+# * appledmp Apple Dot Matrix Printer (should also work with Imagewriter)
+# bj10e Canon BubbleJet BJ10e
+# * bj200 Canon BubbleJet BJ200
+# * cdeskjet H-P DeskJet 500C with 1 bit/pixel color
+# * cdjcolor H-P DeskJet 500C with 24 bit/pixel color and
+# high-quality color (Floyd-Steinberg) dithering
+# * cdjmono H-P DeskJet 500C printing black only
+# * cdj500 H-P DeskJet 500C (same as cdjcolor)
+# * cdj550 H-P DeskJet 550C
+# * declj250 alternate DEC LJ250 driver
+# + deskjet H-P DeskJet and DeskJet Plus
+# * dfaxhigh DigiBoard, Inc.'s DigiFAX software format (high resolution)
+# * dfaxlow DigiFAX low (normal) resolution
+# djet500 H-P DeskJet 500
+# * djet500c H-P DeskJet 500C
+# epson Epson-compatible dot matrix printers (9- or 24-pin)
+# + eps9high Epson-compatible 9-pin, interleaved lines
+# (triple resolution)
+# * epsonc Epson LQ-2550 and Fujitsu 3400/2400/1200 color printers
+# * escp2 Epson ESC/P 2 language printers, including Stylus 800
+# + ibmpro IBM 9-pin Proprinter
+# * jetp3852 IBM Jetprinter ink-jet color printer (Model #3852)
+# + laserjet H-P LaserJet
+# * la50 DEC LA50 printer
+# * la75 DEC LA75 printer
+# * lbp8 Canon LBP-8II laser printer
+# * ln03 DEC LN03 printer
+# * lj250 DEC LJ250 Companion color printer
+# + ljet2p H-P LaserJet IId/IIp/III* with TIFF compression
+# + ljet3 H-P LaserJet III* with Delta Row compression
+# + ljet4 H-P LaserJet 4 (defaults to 600 dpi)
+# + ljetplus H-P LaserJet Plus
+# * m8510 C.Itoh M8510 printer
+# * necp6 NEC P6/P6+/P60 printers at 360 x 360 DPI resolution
+# * nwp533 Sony Microsystems NWP533 laser printer [Sony only]
+# * oki182 Okidata MicroLine 182
+# paintjet H-P PaintJet color printer
+# * pj alternate PaintJet XL driver
+# * pjxl H-P PaintJet XL color printer
+# * pjxl300 H-P PaintJet XL300 color printer
+# * r4081 Ricoh 4081 laser printer
+# * sparc SPARCprinter
+# * t4693d2 Tektronix 4693d color printer, 2 bits per R/G/B component
+# * t4693d4 Tektronix 4693d color printer, 4 bits per R/G/B component
+# * t4693d8 Tektronix 4693d color printer, 8 bits per R/G/B component
+# * tek4696 Tektronix 4695/4696 inkjet plotter
+# * trufax TruFax facsimile driver [Unix only]
+# File formats and others:
+# bit A plain "bit bucket" device
+# bmpmono Monochrome MS Windows .BMP file format
+# bmp16 4-bit (EGA/VGA) .BMP file format
+# bmp256 8-bit (256-color) .BMP file format
+# bmp16m 24-bit .BMP file format
+# gifmono Monochrome GIF file format
+# gif8 8-bit color GIF file format
+# pcxmono Monochrome PCX file format
+# pcxgray 8-bit gray scale PCX file format
+# pcx16 Older color PCX file format (EGA/VGA, 16-color)
+# pcx256 Newer color PCX file format (256-color)
+# pbm Portable Bitmap (plain format)
+# pbmraw Portable Bitmap (raw format)
+# pgm Portable Graymap (plain format)
+# pgmraw Portable Graymap (raw format)
+# ppm Portable Pixmap (plain format)
+# ppmraw Portable Pixmap (raw format)
+# * tiffg3 TIFF/F (G3 fax)
+
+# User-contributed drivers marked with * require hardware or software
+# that is not available to Aladdin Enterprises. Please contact the
+# original contributors, not Aladdin Enterprises, if you have questions.
+# Contact information appears in the driver entry below.
+#
+# Drivers marked with a + are maintained by Aladdin Enterprises with
+# the assistance of users, since Aladdin Enterprises doesn't have access to
+# the hardware for these either.
+
+# If you add drivers, it would be nice if you kept each list
+# in alphabetical order.
+
+# Each platform-specific makefile contains a line of the form
+# DEVICE_DEVS=<dev1>.dev ... <devn>.dev
+# where dev1 ... devn are the devices to be included in the build.
+# You may edit this line to select any desired set of devices.
+# dev1 will be used as the default device (unless overridden from
+# the command line with -sDEVICE=xxx, of course.) If you can't fit all the
+# devices on a single line, you may add lines defining
+# DEVICE_DEVS2=<dev21>.dev ... <dev2n>.dev
+# DEVICE_DEVS3=<dev31>.dev ... <dev3n>.dev
+# etc. up to DEVICE_DEVS9.
+# Don't use continuation lines, since this may break the MS-DOS command
+# processor.
+
+# ---------------------------- End of catalog ---------------------------- #
+
+# If you want to add a new device driver, the examples below should be
+# enough of a guide to the correct form for the makefile rules.
+
+# All device drivers depend on the following:
+GDEV=$(AK) echogs$(XE) $(gserrors_h) $(gx_h) $(gxdevice_h)
+
+# Define the header files for device drivers. Every header file used by
+# more than one device driver must be listed here.
+gdevpccm_h=gdevpccm.h
+gdevpcfb_h=gdevpcfb.h $(dos__h)
+gdevpcl_h=gdevpcl.h
+gdevsvga_h=gdevsvga.h
+gdevx_h=gdevx.h
+
+###### ------------------- MS-DOS display devices ------------------- ######
+
+# There are really only three drivers: an EGA/VGA driver (4 bit-planes,
+# plane-addressed), a SuperVGA driver (8 bit-planes, byte addressed),
+# and a special driver for the S3 chip.
+# To make A4 paper the default, change the compilation line from
+# $(CC) $(CFLAGS) $(DEFS) -c ...
+# to
+# $(CC) $(CFLAGS) $(DEFS) -c -DA4
+
+### ----------------------- EGA and VGA displays ----------------------- ###
+
+gdevegaa.$(OBJ): gdevegaa.asm
+
+ETEST=ega.$(OBJ) $(ega_) gdevpcfb.$(OBJ) gdevegaa.$(OBJ)
+ega.exe: $(ETEST) libc$(MM).tr
+ $(COMPDIR)\tlink $(LCT) $(LO) $(LIBDIR)\c0$(MM) @ega.tr @libc$(MM).tr
+
+ega.$(OBJ): ega.c $(GDEV)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -v $(srcdir)/ega.c
+
+# The shared MS-DOS makefile defines PCFBASM as either gdevegaa.$(OBJ)
+# or an empty string.
+
+# NOTE: for direct frame buffer addressing under SCO Unix or Xenix,
+# change gdevevga to gdevsco in the following line.
+EGAVGA=gdevevga.$(OBJ) gdevpcfb.$(OBJ) $(PCFBASM)
+
+gdevevga.$(OBJ): gdevevga.c $(GDEV) $(gdevpcfb_h)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gdevevga.c
+
+gdevsco.$(OBJ): gdevsco.c $(GDEV) $(gdevpcfb_h)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gdevsco.c
+
+# Common code for MS-DOS and SCO.
+gdevpcfb.$(OBJ): gdevpcfb.c $(GDEV) $(MAKEFILE) $(gdevpcfb_h)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DUSE_ASM=0$(USE_ASM) $(srcdir)/gdevpcfb.c
+
+# The EGA/VGA family includes: EGA, VGA, and
+# the ATI Wonder, Tseng ET3000/4000, and Trident SuperVGA in 16-color mode.
+
+ega.dev: $(EGAVGA) gssetdev
+ $(SHP)gssetdev ega $(EGAVGA)
+
+vga.dev: $(EGAVGA) gssetdev
+ $(SHP)gssetdev vga $(EGAVGA)
+
+atiw16.dev: $(EGAVGA) gssetdev
+ $(SHP)gssetdev atiw16 $(EGAVGA)
+
+tseng16.dev: $(EGAVGA) gssetdev
+ $(SHP)gssetdev tseng16 $(EGAVGA)
+
+tvga16.dev: $(EGAVGA) gssetdev
+ $(SHP)gssetdev tvga16 $(EGAVGA)
+
+### ------------------------- SuperVGA displays ------------------------ ###
+
+SVGA=gdevsvga.$(OBJ) $(PCFBASM)
+
+gdevsvga.$(OBJ): gdevsvga.c $(GDEV) $(MAKEFILE) \
+ $(gdevpcfb_h) $(gdevsvga_h)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DUSE_ASM=0$(USE_ASM) $(srcdir)/gdevsvga.c
+
+# The SuperVGA family includes: ATI Wonder, S3, Trident, Tseng ET3000/4000,
+# and VESA.
+
+atiw.dev: $(SVGA) gssetdev
+ $(SHP)gssetdev atiw $(SVGA)
+
+tseng.dev: $(SVGA) gssetdev
+ $(SHP)gssetdev tseng $(SVGA)
+
+tvga.dev: $(SVGA) gssetdev
+ $(SHP)gssetdev tvga $(SVGA)
+
+vesa.dev: $(SVGA) gssetdev
+ $(SHP)gssetdev vesa $(SVGA)
+
+# The S3 driver doesn't share much code with the others.
+
+s3vga_=$(SVGA) gdevs3ga.$(OBJ)
+s3vga.dev: $(s3vga_) gssetdev
+ $(SHP)gssetdev s3vga $(s3vga_)
+
+gdevs3ga.$(OBJ): gdevs3ga.c $(GDEV) $(MAKEFILE) $(gdevpcfb_h) $(gdevsvga_h)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gdevs3ga.c
+
+### ------------ The BGI (Borland Graphics Interface) device ----------- ###
+
+cgaf.$(OBJ): $(BGIDIR)\cga.bgi
+ $(BGIDIR)\bgiobj /F $(BGIDIR)\cga
+
+egavgaf.$(OBJ): $(BGIDIR)\egavga.bgi
+ $(BGIDIR)\bgiobj /F $(BGIDIR)\egavga
+
+# Include egavgaf.$(OBJ) for debugging only.
+bgi_=gdevbgi.$(OBJ) cgaf.$(OBJ)
+bgi.dev: $(bgi_) gssetdev gsaddmod
+ $(SHP)gssetdev bgi $(bgi_)
+ $(SHP)gsaddmod bgi -lib $(LIBDIR)\graphics
+
+gdevbgi.$(OBJ): gdevbgi.c $(GDEV) $(MAKEFILE) $(gxxfont_h)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DBGI_LIB=$(QQ)$(BGIDIRSTR)$(QQ) $(srcdir)/gdevbgi.c
+
+### ------------------- The Hercules Graphics display ------------------- ###
+
+herc_=gdevherc.$(OBJ)
+herc.dev: $(herc_) gssetdev
+ $(SHP)gssetdev herc $(herc_)
+
+gdevherc.$(OBJ): gdevherc.c $(GDEV)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gdevherc.c
+
+###### ------------------- The Private Eye display ------------------- ######
+### Note: this driver was contributed by a user: ###
+### please contact narf@media-lab.media.mit.edu if you have questions. ###
+
+pe_=gdevpe.$(OBJ)
+pe.dev: $(pe_) gssetdev
+ $(SHP)gssetdev pe $(pe_)
+
+gdevpe.$(OBJ): gdevpe.c $(GDEV)
+
+###### ----------------- The MS-Windows 3.n display ------------------ ######
+
+gdevmswn_h=gdevmswn.h $(GDEV) gp_mswin.h
+
+# Choose one of gdevwddb or gdevwdib here.
+mswin_=gdevmswn.$(OBJ) gdevmsxf.$(OBJ) gdevwdib.$(OBJ) \
+ gdevemap.$(OBJ) gdevpccm.$(OBJ)
+mswin.dev: $(mswin_) gssetdev
+ $(SHP)gssetdev mswin $(mswin_)
+
+gdevmswn.$(OBJ): gdevmswn.c $(gdevmswn_h) $(gp_h) $(gpcheck_h) \
+ $(gsprops_h) $(gdevpccm_h)
+
+gdevmsxf.$(OBJ): gdevmsxf.c $(ctype__h) $(math__h) $(memory__h) \
+ $(gdevmswn_h) $(gsutil_h) $(gxxfont_h)
+
+# An implementation using a device-dependent bitmap.
+gdevwddb.$(OBJ): gdevwddb.c $(gdevmswn_h)
+
+# An implementation using a DIB filled by an image device.
+gdevwdib.$(OBJ): gdevwdib.c $(dos__h) $(gdevmswn_h)
+
+###### ----------------- The MS-Windows 3.n printer ------------------ ######
+
+mswinprn_=gdevwprn.$(OBJ) gdevmsxf.$(OBJ)
+mswinprn.dev: $(mswinprn_) gssetdev
+ $(SHP)gssetdev mswinprn $(mswinprn_)
+
+gdevwprn.$(OBJ): gdevwprn.c $(gdevmswn_h) $(gp_h) $(gpcheck_h) \
+ $(gsprops_h) $(gdevpccm_h)
+
+### ---------------- Amiga display/printer/file devices ---------------- ###
+### Note: this driver was contributed by a user: please contact ###
+### Olaf Barthel (olsen@sourcery.han.de) if you have questions. ###
+### He would also like to hear from anyone using the driver. ###
+### Please consult the source code for additional documentation. ###
+
+amiga_=gdevamiga.$(OBJ)
+
+amiga.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga $(amiga_)
+
+amiga_low.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_low $(amiga_)
+
+amiga_high.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_high $(amiga_)
+
+amiga_super.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_super $(amiga_)
+
+amiga_a2024.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_a2024 $(amiga_)
+
+amiga_picassoii.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_picassoii $(amiga_)
+
+amiga_custom.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_custom $(amiga_)
+
+amiga_printer.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_printer $(amiga_)
+
+amiga_ilbm.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_ilbm $(amiga_)
+
+gdevamiga.$(OBJ): gdevamiga.c $(GDEV) $(arch_h)
+
+###### ----------- The AT&T 3b1 Unixpc monochrome display ------------ ######
+### Note: this driver was contributed by a user: please contact ###
+### Andy Fyfe (andy@cs.caltech.edu) if you have questions. ###
+
+att3b1_=gdev3b1.$(OBJ)
+att3b1.dev: $(att3b1_) gssetdev
+ $(SHP)gssetdev att3b1 $(att3b1_)
+
+gdev3b1.$(OBJ): gdev3b1.c
+
+###### --------------- Memory-buffered printer devices --------------- ######
+
+# The dependency list for printers includes devs.mak because
+# you can specify -DA4 to make A4 paper the default.
+# See below under, e.g., gdevdjet.c.
+PDEVH=$(GDEV) $(gdevprn_h) devs.mak
+
+gdevprn.$(OBJ): gdevprn.c $(PDEVH) $(gp_h) $(gsprops_h)
+
+### ------------------- The Apple DMP printer device ------------------- ###
+
+appledmp_=gdevadmp.$(OBJ) gdevprn.$(OBJ)
+
+appledmp.dev: $(appledmp_) gssetdev
+ $(SHP)gssetdev appledmp $(appledmp_)
+
+### ------------ The Canon BubbleJet BJ10e and BJ200 devices ------------ ###
+
+bj10e_=gdevbj10.$(OBJ) gdevprn.$(OBJ)
+
+bj10e.dev: $(bj10e_) gssetdev
+ $(SHP)gssetdev bj10e $(bj10e_)
+
+bj200.dev: $(bj10e_) gssetdev
+ $(SHP)gssetdev bj200 $(bj10e_)
+
+gdevbj10.$(OBJ): gdevbj10.c $(PDEVH)
+
+### -------------------------- The DigiFAX device ----------------------- ###
+### This driver outputs images in a format suitable for use with ###
+### DigiBoard, Inc.'s DigiFAX software. Use -sDEVICE=dfaxhigh for ###
+### high resolution output, -sDEVICE=dfaxlow for normal output. ###
+### Note: this driver was contributed by a user: please contact ###
+### Rick Richardson (rick@digibd.com) if you have questions. ###
+
+digifax_=gdevdfax.$(OBJ) gdevprn.$(OBJ)
+dfaxhigh.dev: $(digifax_) gssetdev
+ $(SHP)gssetdev dfaxhigh $(digifax_)
+
+dfaxlow.dev: $(digifax_) gssetdev
+ $(SHP)gssetdev dfaxlow $(digifax_)
+
+gdevdfax.$(OBJ): gdevdfax.c $(GDEV) $(gdevprn_h) gdevdfg3.h
+
+### ----------- The H-P DeskJet and LaserJet printer devices ----------- ###
+
+### These are essentially the same device.
+### You can make A4 paper the default: see below.
+### NOTE: printing at full resolution (300 DPI) requires a printer
+### with at least 1.5 Mb of memory. 150 DPI only requires .5 Mb.
+
+HPPCL=gdevprn.$(OBJ) gdevpcl.$(OBJ)
+HPMONO=gdevdjet.$(OBJ) $(HPPCL)
+
+gdevpcl.$(OBJ): gdevpcl.c $(PDEVH) $(gdevpcl_h)
+
+# To make A4 paper the default, change the second line below this to
+# $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DA4 gdevdjet.c
+gdevdjet.$(OBJ): gdevdjet.c $(PDEVH) $(gdevpcl_h)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gdevdjet.c
+
+deskjet.dev: $(HPMONO) gssetdev
+ $(SHP)gssetdev deskjet $(HPMONO)
+
+djet500.dev: $(HPMONO) gssetdev
+ $(SHP)gssetdev djet500 $(HPMONO)
+
+laserjet.dev: $(HPMONO) gssetdev
+ $(SHP)gssetdev laserjet $(HPMONO)
+
+ljetplus.dev: $(HPMONO) gssetdev
+ $(SHP)gssetdev ljetplus $(HPMONO)
+
+### Selecting ljet2p provides TIFF (mode 2) compression on LaserJet III,
+### IIIp, IIId, IIIsi, IId, and IIp.
+
+ljet2p.dev: $(HPMONO) gssetdev
+ $(SHP)gssetdev ljet2p $(HPMONO)
+
+### Selecting ljet3 provides Delta Row (mode 3) compression on LaserJet III,
+### IIIp, IIId, IIIsi.
+
+ljet3.dev: $(HPMONO) gssetdev
+ $(SHP)gssetdev ljet3 $(HPMONO)
+
+### Selecting ljet4 also provides Delta Row compression on LaserJet IV series.
+
+ljet4.dev: $(HPMONO) gssetdev
+ $(SHP)gssetdev ljet4 $(HPMONO)
+
+###- The H-P DeskJet 500C/550C and PaintJet family color printer devices -###
+### Note: there are two different 500C drivers, both contributed by users.###
+### If you have questions about the djet500c driver, ###
+### please contact AKayser@et.tudelft.nl. ###
+### If you have questions about the cdj* drivers, ###
+### please contact g.cameron@biomed.abdn.ac.uk. ###
+
+cdeskjet_=gdevcdj.$(OBJ) $(HPPCL)
+
+cdeskjet.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev cdeskjet $(cdeskjet_)
+
+cdjcolor.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev cdjcolor $(cdeskjet_)
+
+cdjmono.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev cdjmono $(cdeskjet_)
+
+cdj500.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev cdj500 $(cdeskjet_)
+
+cdj550.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev cdj550 $(cdeskjet_)
+
+declj250.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev declj250 $(cdeskjet_)
+
+pj.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev pj $(cdeskjet_)
+
+pjxl.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev pjxl $(cdeskjet_)
+
+pjxl300.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev pjxl300 $(cdeskjet_)
+
+# NB: you can also customise the build if required, using -DA4 (for A4 paper)
+# and -DBitsPerPixel=<number> if you wish the default to be other than 24
+# for the generic drivers (cdj500, cdj550, pjxl300, pjtest, pjxltest).
+# E.g,. to make A4 paper the default, change the second line below this to
+# $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DA4 gdevdjet.c
+gdevcdj.$(OBJ): gdevcdj.c $(PDEVH) $(gdevpcl_h)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gdevcdj.c
+
+djet500c_=gdevdjtc.$(OBJ) $(HPPCL)
+djet500c.dev: $(djet500c_) gssetdev
+ $(SHP)gssetdev djet500c $(djet500c_)
+
+gdevdjtc.$(OBJ): gdevdjtc.c $(PDEVH) $(gdevpcl_h)
+
+### ----------------- The generic Epson printer device ----------------- ###
+
+epson_=gdevepsn.$(OBJ) gdevprn.$(OBJ)
+
+epson.dev: $(epson_) gssetdev
+ $(SHP)gssetdev epson $(epson_)
+
+eps9high.dev: $(epson_) gssetdev
+ $(SHP)gssetdev eps9high $(epson_)
+
+gdevepsn.$(OBJ): gdevepsn.c $(PDEVH)
+
+### ----------------- The IBM Proprinter printer device ---------------- ###
+
+ibmpro.dev: $(epson_) gssetdev
+ $(SHP)gssetdev ibmpro $(epson_)
+
+### -------------- The Epson LQ-2550 color printer device -------------- ###
+### Note: this driver was contributed by users: please contact ###
+### Dave St. Clair (dave@exlog.com) if you have questions. ###
+
+epsonc_=gdevepsc.$(OBJ) gdevprn.$(OBJ)
+epsonc.dev: $(epsonc_) gssetdev
+ $(SHP)gssetdev epsonc $(epsonc_)
+
+gdevepsc.$(OBJ): gdevepsc.c $(PDEVH)
+
+### -------------- The Epson ESC/P 2 language printer device ----------- ###
+### Note: this driver was contributed by a user: if you have questions, ###
+### please contact Richard Brown (rab@tauon.ph.unimelb.edu.au). ###
+
+escp2_=gdevescp.$(OBJ) gdevprn.$(OBJ)
+escp2.dev: $(escp2_) gssetdev
+ $(SHP)gssetdev escp2 $(escp2_)
+
+gdevescp.$(OBJ): gdevescp.c $(PDEVH)
+
+### ------------ The H-P PaintJet color printer device ----------------- ###
+### Note: this driver also supports the DEC LJ250 color printer, which ###
+### has a PaintJet-compatible mode, and the PaintJet XL. ###
+### If you have questions about the XL, please contact Rob Reiss ###
+### (rob@moray.berkeley.edu). ###
+
+PJET=gdevpjet.$(OBJ) $(HPPCL)
+
+gdevpjet.$(OBJ): gdevpjet.c $(PDEVH) $(gdevpcl_h)
+
+lj250.dev: $(PJET) gssetdev
+ $(SHP)gssetdev lj250 $(PJET)
+
+paintjet.dev: $(PJET) gssetdev
+ $(SHP)gssetdev paintjet $(PJET)
+
+pjetxl.dev: $(PJET) gssetdev
+ $(SHP)gssetdev pjetxl $(PJET)
+
+### ------- The IBM 3852 JetPrinter color inkjet printer device -------- ###
+### Note: this driver was contributed by users: please contact ###
+### Kevin Gift (kgift@draper.com) if you have questions. ###
+### Note that the paper size that can be addressed by the graphics mode ###
+### used in this driver is fixed at 7-1/2 inches wide (the printable ###
+### width of the jetprinter itself.) ###
+
+jetp3852_=gdev3852.$(OBJ) gdevprn.$(OBJ)
+jetp3852.dev: $(jetp3852_) gssetdev
+ $(SHP)gssetdev jetp3852 $(jetp3852_)
+
+gdevjetp.$(OBJ): gdevjetp.c $(PDEVH) $(gdevpcl_h)
+
+### ----------------- The Canon LBP-8II printer device ----------------- ###
+### Note: this driver was contributed by users: please contact ###
+### Tom Quinn (trq@prg.oxford.ac.uk) if you have questions. ###
+### Note that the standard paper size for this driver is the European ###
+### A4 size, not the American 8.5" x 11" size. ###
+
+lbp8_=gdevlbp8.$(OBJ) gdevprn.$(OBJ)
+lbp8.dev: $(lbp8_) gssetdev
+ $(SHP)gssetdev lbp8 $(lbp8_)
+
+gdevlbp8.$(OBJ): gdevlbp8.c $(PDEVH)
+
+### -------------- The DEC LN03/LA50/LA75 printer devices -------------- ###
+### Note: this driver was contributed by users: please contact ###
+### Ulrich Mueller (ulm@vsnhd1.cern.ch) if you have questions. ###
+### For questions about LA50 and LA75: please contact ###
+### Ian MacPhedran (macphed@dvinci.USask.CA). ###
+### For the LN03, you can make A4 paper the default: see below. ###
+
+ln03_=gdevln03.$(OBJ) gdevprn.$(OBJ)
+ln03.dev: $(ln03_) gssetdev
+ $(SHP)gssetdev ln03 $(ln03_)
+
+la50.dev: $(ln03_) gssetdev
+ $(SHP)gssetdev la50 $(ln03_)
+
+la75.dev: $(ln03_) gssetdev
+ $(SHP)gssetdev la75 $(ln03_)
+
+# To make A4 paper the default, change the second line below this to
+# $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DA4 gdevln03.c
+gdevln03.$(OBJ): gdevln03.c $(PDEVH)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gdevln03.c
+
+### -------------- The C.Itoh M8510 printer device --------------------- ###
+### Note: this driver was contributed by a user: please contact Bob ###
+### Smith <bob@snuffy.penfield.ny.us> if you have questions. ###
+
+m8510_=gdev8510.$(OBJ) gdevprn.$(OBJ)
+m8510.dev: $(m8510_) gssetdev
+ $(SHP)gssetdev m8510 $(m8510_)
+
+gdev8510.$(OBJ): gdev8510.c $(PDEVH)
+
+### --------------------- The NEC P6 family devices -------------------- ###
+
+necp6_=gdevnp6.$(OBJ) gdevprn.$(OBJ)
+necp6.dev: $(necp6_) gssetdev
+ $(SHP)gssetdev necp6 $(necp6_)
+
+gdevnp6.$(OBJ): gdevnp6.c $(PDEVH)
+
+### ----------------- The Okidata MicroLine 182 device ----------------- ###
+### Note: this driver was contributed by a user: please contact ###
+### Maarten Koning (smeg@bnr.ca) if you have questions. ###
+
+oki182_=gdevo182.$(OBJ) gdevprn.$(OBJ)
+oki182.dev: $(oki182_) gssetdev
+ $(SHP)gssetdev oki182 $(oki182_)
+
+gdevo182.$(OBJ): gdevo182.c $(PDEVH)
+
+### ------------- The Ricoh 4081 laser printer device ------------------ ###
+### Note: this driver was contributed by users: ###
+### please contact kdw@oasis.icl.co.uk if you have questions. ###
+
+r4081_=gdev4081.$(OBJ) gdevprn.$(OBJ)
+r4081.dev: $(r4081_) gssetdev
+ $(SHP)gssetdev r4081 $(r4081_)
+
+gdev4081.$(OBJ): gdev4081.c $(PDEVH)
+
+###### ------------------------ Sony devices ------------------------ ######
+### Note: these drivers were contributed by users: please contact ###
+### Mike Smolenski (mike@intertech.com) if you have questions. ###
+
+### ------------------- Sony NeWS frame buffer device ------------------ ###
+
+sonyfb_=gdevsnfb.$(OBJ) gdevprn.$(OBJ)
+sonyfb.dev: $(sonyfb_) gssetdev
+ $(SHP)gssetdev sonyfb $(sonyfb_)
+
+gdevsnfb.$(OBJ): gdevsnfb.c $(PDEVH)
+
+### -------------------- Sony NWP533 printer device -------------------- ###
+### Note: this driver was contributed by a user: please contact Tero ###
+### Kivinen (kivinen@joker.cs.hut.fi) if you have questions. ###
+
+nwp533_=gdevn533.$(OBJ) gdevprn.$(OBJ)
+nwp533.dev: $(nwp533_) gssetdev
+ $(SHP)gssetdev nwp533 $(nwp533_)
+
+gdevn533.$(OBJ): gdevn533.c $(PDEVH)
+
+### ------------------------- The SPARCprinter ------------------------- ###
+### Note: this driver was contributed by users: please contact Martin ###
+### Schulte (schulte@thp.uni-koeln.de) if you have questions. ###
+### He would also like to hear from anyone using the driver. ###
+### Please consult the source code for additional documentation. ###
+
+sparc_=gdevsppr.$(OBJ) gdevprn.$(OBJ)
+sparc.dev: $(sparc_) gssetdev
+ $(SHP)gssetdev sparc $(sparc_)
+
+gdevsppr.$(OBJ): gdevsppr.c $(PDEVH)
+
+###### --------------------- The SunView device --------------------- ######
+### Note: this driver is maintained by a user: if you have questions, ###
+### please contact Andreas Stolcke (stolcke@icsi.berkeley.edu). ###
+
+sunview_=gdevsun.$(OBJ)
+sunview.dev: $(sunview_) gssetdev gsaddmod
+ $(SHP)gssetdev sunview $(sunview_)
+ $(SHP)gsaddmod sunview -lib suntool sunwindow pixrect
+
+gdevsun.$(OBJ): gdevsun.c $(GDEV) $(arch_h)
+
+### ----------------- Tektronix 4396d color printer -------------------- ###
+### Note: this driver was contributed by a user: please contact ###
+### Karl Hakimian (hakimian@haney.eecs.wsu.edu) ###
+### if you have questions. ###
+
+t4693d_=gdev4693.$(OBJ) gdevprn.$(OBJ)
+t4693d2.dev: $(t4693d_) gssetdev
+ $(SHP)gssetdev t4693d2 $(t4693d_)
+
+t4693d4.dev: $(t4693d_) gssetdev
+ $(SHP)gssetdev t4693d4 $(t4693d_)
+
+t4693d8.dev: $(t4693d_) gssetdev
+ $(SHP)gssetdev t4693d8 $(t4693d_)
+
+gdev4693.$(OBJ): gdev4693.c $(GDEV)
+
+### -------------------- Tektronix ink-jet printers -------------------- ###
+### Note: this driver was contributed by a user: please contact ###
+### Karsten Spang (spang@nbivax.nbi.dk) if you have questions. ###
+
+tek4696_=gdevtknk.$(OBJ) gdevprn.$(OBJ)
+tek4696.dev: $(tek4696_) gssetdev
+ $(SHP)gssetdev tek4696 $(tek4696_)
+
+gdevtknk.$(OBJ): gdevtknk.c $(PDEVH)
+
+### ----------------- The TruFax facsimile device ---------------------- ###
+### Note: this driver was contributed by users: please contact ###
+### Neil Ostroff (nao@maestro.bellcore.com) if you have questions. ###
+### Note that the driver requires a file encode_l.o supplied by the ###
+### makers of the TruFax product. ###
+
+trufax_=gdevtrfx.$(OBJ) gdevprn.$(OBJ) encode_l.$(OBJ)
+trufax.dev: $(trufax_) gssetdev
+ $(SHP)gssetdev trufax $(trufax_)
+
+gdevtrfx.$(OBJ): gdevtrfx.c $(GDEV)
+
+###### ----------------------- The X11 device ----------------------- ######
+
+# Aladdin Enterprises does not support Ghostview. For more information
+# about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu).
+
+x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ)
+x11.dev: $(x11_) gssetdev gsaddmod
+ $(SHP)gssetdev x11 $(x11_)
+ $(SHP)gsaddmod x11 -lib Xt X11 Xext
+
+# See the main makefile for the definition of XINCLUDE.
+GDEVX=$(GDEV) x_.h gdevx.h $(MAKEFILE)
+gdevx.$(OBJ): gdevx.c $(GDEVX) $(gsprops_h) $(gsutil_h)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(XINCLUDE) $(srcdir)/gdevx.c
+
+gdevxini.$(OBJ): gdevxini.c $(GDEVX) $(ctype__h)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(XINCLUDE) $(srcdir)/gdevxini.c
+
+gdevxxf.$(OBJ): gdevxxf.c $(GDEVX) $(gsutil_h) $(gxxfont_h)
+ $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(XINCLUDE) $(srcdir)/gdevxxf.c
+
+### ---------------------- The bit bucket device ----------------------- ###
+
+bit_=gdevbit.$(OBJ) gdevprn.$(OBJ)
+bit.dev: $(bit_) gssetdev
+ $(SHP)gssetdev bit $(bit_)
+
+gdevbit.$(OBJ): gdevbit.c $(PDEVH)
+
+###### ----------------------- PC file formats ---------------------- ######
+
+gdevpccm.$(OBJ): gdevpccm.c $(AK) \
+ $(gs_h) $(gsmatrix_h) $(gxdevice_h) $(gdevpccm_h)
+
+### ------------------------- .BMP file formats ------------------------- ###
+
+bmp_=gdevbmp.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
+
+gdevbmp.$(OBJ): gdevbmp.c $(PDEVH) $(gdevpccm_h)
+
+bmpmono.dev: $(bmp_) gssetdev
+ $(SHP)gssetdev bmpmono $(bmp_)
+
+bmp16.dev: $(bmp_) gssetdev
+ $(SHP)gssetdev bmp16 $(bmp_)
+
+bmp256.dev: $(bmp_) gssetdev
+ $(SHP)gssetdev bmp256 $(bmp_)
+
+bmp16m.dev: $(bmp_) gssetdev
+ $(SHP)gssetdev bmp16m $(bmp_)
+
+### ------------------------- GIF file formats ------------------------- ###
+
+GIF=gdevgif.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
+
+gdevgif.$(OBJ): gdevgif.c $(PDEVH) $(gdevpccm_h)
+
+gifmono.dev: $(GIF) gssetdev
+ $(SHP)gssetdev gifmono $(GIF)
+
+gif8.dev: $(GIF) gssetdev
+ $(SHP)gssetdev gif8 $(GIF)
+
+### ------------------------- PCX file formats ------------------------- ###
+
+pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
+
+gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) $(gxlum_h)
+
+pcxmono.dev: $(pcx_) gssetdev
+ $(SHP)gssetdev pcxmono $(pcx_)
+
+pcxgray.dev: $(pcx_) gssetdev
+ $(SHP)gssetdev pcxgray $(pcx_)
+
+pcx16.dev: $(pcx_) gssetdev
+ $(SHP)gssetdev pcx16 $(pcx_)
+
+pcx256.dev: $(pcx_) gssetdev
+ $(SHP)gssetdev pcx256 $(pcx_)
+
+###### ------------------- Portable Bitmap devices ------------------ ######
+### For more information, see the pbm(5), pgm(5), and ppm(5) man pages. ###
+
+pxm_=gdevpbm.$(OBJ) gdevprn.$(OBJ)
+
+gdevpbm.$(OBJ): gdevpbm.c $(PDEVH) $(gxlum_h)
+
+### Portable Bitmap (PBM, plain or raw format, magic numbers "P1" or "P4")
+
+pbm.dev: $(pxm_) gssetdev
+ $(SHP)gssetdev pbm $(pxm_)
+
+pbmraw.dev: $(pxm_) gssetdev
+ $(SHP)gssetdev pbmraw $(pxm_)
+
+### Portable Graymap (PGM, plain or raw format, magic numbers "P2" or "P5")
+
+pgm.dev: $(pxm_) gssetdev
+ $(SHP)gssetdev pgm $(pxm_)
+
+pgmraw.dev: $(pxm_) gssetdev
+ $(SHP)gssetdev pgmraw $(pxm_)
+
+### Portable Pixmap (PPM, plain or raw format, magic numbers "P3" or "P6")
+
+ppm.dev: $(pxm_) gssetdev
+ $(SHP)gssetdev ppm $(pxm_)
+
+ppmraw.dev: $(pxm_) gssetdev
+ $(SHP)gssetdev ppmraw $(pxm_)
+
+### -------------------------- TIFF/F device ---------------------------- ###
+### This driver outputs images in a TIFF format ###
+### Use -sDEVICE=tiffg3 and ###
+### -r204x98 for low resolution output, or ###
+### -r204x196 for high resolution output ###
+### Note also that 3 page sizes are understood: letter, A4, and B4 ###
+### Note: this driver was contributed by a user: please contact ###
+### Sam Leffler (sam@sgi.com) if you have questions. ###
+
+tiffg3_=gdevtiff.$(OBJ) gdevprn.$(OBJ)
+tiffg3.dev: $(tiffg3_) gssetdev
+ $(SHP)gssetdev tiffg3 $(tiffg3_)
+gdevtiff.$(OBJ): gdevtiff.c $(GDEV) $(gdevprn_h) gdevdfg3.h gdevtiff.h
+# Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved.
+#
+# 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.
+
+# Partial makefile for Ghostscript, common to all Unix configurations.
+
+# This is the last part of the makefile for Unix configurations.
+# Since Unix make doesn't have an 'include' facility, we concatenate
+# the various parts of the makefile together by brute force (in tar_cat).
+
+# The following prevents GNU make from constructing argument lists that
+# include all environment variables, which can easily be longer than
+# brain-damaged system V allows.
+
+.NOEXPORT:
+
+# -------------------------------- Library -------------------------------- #
+
+## The Commodore Amiga
+
+amiga__=gp_nofb.$(OBJ) gp_amiga.$(OBJ) gdevpipe.$(OBJ)
+amiga_.dev: $(amiga__) gssetmod gsaddmod
+ $(SHP)gssetmod amiga_ $(amiga__)
+ $(SHP)gsaddmod amiga_ -fdev pipe
+
+gp_amiga.$(OBJ): gp_amiga.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
+
+## The Unix platforms
+
+# We have to include a test for the existence of sys/time.h,
+# because some System V platforms don't have it.
+
+# All reasonable Unix platforms.
+unix__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gdevpipe.$(OBJ)
+unix_.dev: $(unix__) gssetmod gsaddmod
+ $(SHP)gssetmod unix_ $(unix__)
+ $(SHP)gsaddmod unix_ -fdev pipe
+
+gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
+ $(gsutil_h) $(stat__h) $(time__h)
+ if ( test -f /ade/include/sys/time.h ) then $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gp_unix.c;\
+ else $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DNOSYSTIME $(srcdir)/gp_unix.c; fi
+
+gdevpipe.$(OBJ): gdevpipe.c $(AK) $(stdio__h) $(gstypes_h) \
+ $(filedev_h) $(stream_h)
+
+# Brain-damaged System V platforms.
+sysv__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gp_sysv.$(OBJ)
+sysv_.dev: $(sysv__) gssetmod
+ $(SHP)gssetmod sysv_ $(sysv__)
+
+gp_sysv.$(OBJ): gp_sysv.c $(time__h) $(AK)
+ if ( test -f /ade/include/sys/time.h ) then $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gp_sysv.c;\
+ else $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DNOSYSTIME $(srcdir)/gp_sysv.c; fi
+
+# -------------------------- Auxiliary programs --------------------------- #
+
+ansi2knr$(XE): ansi2knr.c $(stdio__h) $(string__h) $(malloc__h)
+ $(CC) -o ansi2knr$(XE) $(CFLAGS) $(srcdir)/ansi2knr.c
+
+echogs$(XE): echogs.c
+ $(CC) -o echogs$(XE) $(CFLAGS) $(srcdir)/echogs.c
+
+# On the RS/6000 (at least), compiling genarch.c with gcc with -O
+# produces a buggy executable.
+genarch$(XE): genarch.c
+ $(CC) -o genarch$(XE) $(srcdir)/genarch.c
+
+genconf$(XE): genconf.c
+ $(CC) -o genconf$(XE) $(srcdir)/genconf.c
+
+# ----------------------------- Main program ------------------------------ #
+
+BEGINFILES=
+CCBEGIN=$(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) *.c
+
+# Interpreter main program
+
+GSAMIGA=gs.$(OBJ) gsmain.$(OBJ) $(INT) $(LIBGS)
+
+# The second call on echogs writes a \. This is the only
+# way to do it that works with all flavors of shell!
+$(GS)$(XE): $(GSAMIGA) ld.tr echogs $(ALL_DEVS)
+ echogs -n - $(CC) $(LDFLAGS) $(XLIBDIRS) -o gs $(GSAMIGA) >_temp_
+ echogs -x 205c >>_temp_
+ cat ld.tr >>_temp_
+ echogs - $(EXTRALIBS) -lm >>_temp_
+ $(SH) <_temp_
+
+# Installation
+
+TAGS:
+ etags -t *.c *.h
+
+docdir=$(gsdatadir)/doc
+exdir=$(gsdatadir)/examples
+
+install: $(GS)
+ if [ -d $(bindir) ]; then true; else mkdir $(bindir); fi
+ if [ -d $(libdir) ]; then true; else mkdir $(libdir); fi
+ if [ -d $(gsdatadir) ]; then true; else mkdir $(gsdatadir); fi
+ if [ -d $(gsdatadir)/fonts ]; then true; else mkdir $(gsdatadir)/fonts; fi
+ if [ -d $(docdir) ]; then true; else mkdir $(docdir); fi
+ if [ -d $(exdir) ]; then true; else mkdir $(exdir); fi
+ for f in $(GS) ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done
+ for f in gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $(srcdir)/$$f $(bindir)/$$f ; done
+ for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_dbt_e.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $(srcdir)/$$f $(gsdatadir)/$$f ; done
+ for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $(srcdir)/$$f $(docdir)/$$f ; done
+ for f in chess.ps cheq.ps colorcir.ps golfer.ps escher.ps snowflak.ps tiger.ps ; do $(INSTALL_DATA) $(srcdir)/$$f $(exdir)/$$f ; done
+
+Makefile: config.status $(srcdir)/Makefile.in
+ $(SHELL) config.status
diff -rup --new-file baseline/fsf/ghostscript/NEWS amiga/fsf/ghostscript/NEWS
--- baseline/fsf/ghostscript/NEWS Wed Apr 19 16:35:44 1995
+++ amiga/fsf/ghostscript/NEWS Sat Sep 28 00:00:00 1996
@@ -1211,7 +1211,7 @@ recognized) for setting the output file
For Unix systems, changes the directories in GS_LIB_DEFAULT from
`pwd` to $(gsdatadir), i.e., normally $(datadir)/ghostscript, where
-datadir is normally /usr/local/lib.
+datadir is normally /ade/lib.
Adds a note in the header file to the effect that the X Windows
driver expects to find header files in $(XINCLUDE)/X11, not in
diff -rup --new-file baseline/fsf/ghostscript/Product-Info amiga/fsf/ghostscript/Product-Info
--- baseline/fsf/ghostscript/Product-Info Wed Dec 31 17:00:00 1969
+++ amiga/fsf/ghostscript/Product-Info Sat Sep 28 00:00:00 1996
@@ -0,0 +1,26 @@
+.name
+ghostscript
+.fullname
+Ghostscript language interpreter and library
+.type
+Miscellaneous
+.short
+GNU postscript interpreter
+.description
+Ghostscript is the name of a set of software that provides an
+interpreter for the PostScript (TM) language, and a set of C
+procedures (the Ghostscript library) that implement the graphics
+capabilities that appear as primitive operations in the PostScript
+language.
+.version
+2.6.2
+.author
+L. Peter Deutsch
+.requirements
+Amiga binaries require ixemul.library.
+.distribution
+Ghostscript General Public License
+.email
+ghost@aladdin.com
+.described-by
+Fred Fish (fnf@amigalib.com)
diff -rup --new-file baseline/fsf/ghostscript/amiga-gcc.mak amiga/fsf/ghostscript/amiga-gcc.mak
--- baseline/fsf/ghostscript/amiga-gcc.mak Wed Dec 31 17:00:00 1969
+++ amiga/fsf/ghostscript/amiga-gcc.mak Sat Sep 28 00:00:00 1996
@@ -0,0 +1,2010 @@
+# Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved.
+#
+# 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.
+
+# makefile for Ghostscript, Unix/gcc/X11 configuration.
+# Note: this makefile assumes you are using gcc in ANSI mode.
+
+# ------------------------------- Options ------------------------------- #
+
+####### The following are the only parts of the file you should need to edit.
+
+# ------ Generic options ------ #
+
+# Define the installation commands and target directories for
+# executables and files. Only relevant to `make install'.
+
+INSTALL = install -c
+INSTALL_PROGRAM = $(INSTALL) -m 775
+INSTALL_DATA = $(INSTALL) -m 664
+
+prefix = /ade
+exec_prefix = $(prefix)
+bindir = $(exec_prefix)/bin
+datadir = $(prefix)/lib
+gsdatadir = $(datadir)/ghostscript
+
+# Define the default directory/ies for the runtime
+# initialization and font files. Separate multiple directories with a ','.
+
+GS_LIB_DEFAULT=$(gsdatadir),$(gsdatadir)/fonts
+
+# Define the name of the Ghostscript initialization file.
+# (There is no reason to change this.)
+
+GS_INIT=gs_init.ps
+
+# Choose generic configuration options.
+
+# -DDEBUG
+# includes debugging features (-Z switch) in the code.
+# Code runs substantially slower even if no debugging switches
+# are set.
+# -DNOPRIVATE
+# makes private (static) procedures and variables public,
+# so they are visible to the debugger and profiler.
+# No execution time or space penalty.
+
+GENOPT=
+
+# Define the name of the executable file.
+
+GS=gs
+
+# ------ Platform-specific options ------ #
+
+# Define the name of the C compiler.
+
+CC=gcc
+
+# Define the other compilation flags.
+# Add -DBSD4_2 for 4.2bsd systems.
+# Add -DUSG (GNU convention) or -DSYSV for System V or DG/UX.
+# Add -DSYSV -D__SVR3 for SCO ODT, ISC Unix 2.2 or before,
+# or any System III Unix, or System V release 3-or-older Unix.
+# Add -DSVR4 (not -DSYSV) for System V release 4.
+# XCFLAGS can be set from the command line.
+# We don't include -ansi, because this gets in the way of the platform-
+# specific stuff that <math.h> typically needs; nevertheless, we expect
+# gcc to accept ANSI-style function prototypes and function definitions.
+
+#FPU_FLAG =-Dm68881
+#CPU_FLAG =-Dm68030
+XCFLAGS = -O6 $(FPU_FLAG) $(CPU_FLAG)
+CFLAGS=-DUSG $(XCFLAGS)
+
+# Define platform flags for ld.
+# SunOS and some others want -X; Ultrix wants -x.
+# SunOS 4.n may need -Bstatic.
+# XLDFLAGS can be set from the command line.
+
+LDFLAGS=$(XLDFLAGS)
+
+# Define any extra libraries to link into the executable.
+# ISC Unix 2.2 wants -linet.
+# SCO Unix needs -lsocket if you aren't including the X11 driver.
+# (Libraries required by individual drivers are handled automatically.)
+
+EXTRALIBS=
+
+# Define the include switch(es) for the X11 header files.
+# This can be null if handled in some other way (e.g., the files are
+# in /ade/include, or the directory is supplied by an environment variable).
+# Note that x_.h expects to find the header files in $(XINCLUDE)/X11,
+# not in $(XINCLUDE).
+
+#XINCLUDE=-I/ade/X/include
+
+# Define the directory/ies for the X11 library files.
+# This can be null if these files are in the default linker search path.
+
+#XLIBDIRS=-L/ade/X/lib
+
+# ------ Devices and features ------ #
+
+# Choose the language feature(s) to include. See gs.mak for details.
+
+FEATURE_DEVS=filter.dev dps.dev level2.dev
+
+# Choose the device(s) to include. See devs.mak for details.
+
+DEVICE_DEVS=amiga_.dev amiga.dev amiga_low.dev amiga_high.dev amiga_super.dev
+DEVICE_DEVS1=amiga_a2024.dev amiga_picassoii.dev amiga_printer.dev
+DEVICE_DEVS2=amiga_ilbm.dev amiga_custom.dev
+
+# ---------------------------- End of options --------------------------- #
+
+# Define the name of the makefile -- used in dependencies.
+
+MAKEFILE=amiga-gcc.mak
+
+# Define the ANSI-to-K&R dependency. (gcc accepts ANSI syntax.)
+
+AK=
+
+# Define the compilation rules and flags.
+
+CCC=$(CC) $(CCFLAGS) -c
+
+# --------------------------- Generic makefile ---------------------------- #
+
+# The remainder of the makefile (unixhead.mak, gs.mak, devs.mak, unixtail.mak)
+# is generic. tar_cat concatenates all these together.
+# Copyright (C) 1990, 1991, 1993 Aladdin Enterprises. All rights reserved.
+#
+# 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.
+
+# Partial makefile for Ghostscript, common to all Unix configurations.
+
+# This part of the makefile gets inserted after the compiler-specific part
+# (xxx-head.mak) and before gs.mak and devs.mak.
+
+# ----------------------------- Generic stuff ----------------------------- #
+
+# Define the platform name. For a "stock" System V platform,
+# use sysv_ instead of unix_.
+
+PLATFORM=amiga
+
+# Define the extensions for the object and executable files.
+
+OBJ=o
+XE=
+
+# Define the current directory prefix, shell quote string, and shell names.
+
+EXP=
+QQ=\"
+SHELL=/bin/sh
+SH=$(SHELL)
+SHP=$(SH) $(EXP)
+
+# Define the compilation rules and flags.
+
+CCFLAGS=$(GENOPT) $(CFLAGS)
+
+.c.o: $(AK)
+ $(CCC) $*.c
+
+CCCF=$(CCC)
+CCD=$(CCC)
+CCINT=$(CCC)
+# Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved.
+#
+# 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.
+
+# Generic makefile for Ghostscript.
+# The platform-specific makefiles `include' this file.
+# They define the following symbols:
+# GS - the name of the executable (without the extension, if any).
+# GS_LIB_DEFAULT - the default directory/ies for searching for the
+# initialization and font files at run time.
+# DEVICE_DEVS - the devices to include in the executable.
+# See devs.mak for details.
+# DEVICE_DEVS1...DEVICE_DEVS9 - additional devices, if the definition of
+# DEVICE_DEVS doesn't fit on one line.
+# See devs.mak for details.
+# FEATURE_DEVS - the optional features to include in the
+# executable. Current features are:
+# dps - (partial) support for Display PostScript extensions:
+# see language.doc for details.
+# level2 - (partial) support for PostScript Level 2
+# extensions: see language.doc for details.
+# compfont - support for composite (type 0) fonts.
+# *** NOT IMPLEMENTED YET. ***
+# filter - support for Level 2 filters (other than eexec,
+# ASCIIHexEncode/Decode, NullEncode, PFBDecode,
+# and SubFileDecode, which are always included).
+# ccfonts - precompile fonts into C, and link them
+# with the executable. In the standard makefiles,
+# this is only implemented for a very few fonts:
+# see fonts.doc for details.
+# It is very unlikely that anyone would want to edit the remaining
+# symbols, but we describe them here for completeness:
+# GS_INIT - the name of the initialization file for Ghostscript,
+# normally gs_init.ps.
+# PLATFORM - a "device" name for the platform, so that platforms can
+# add various kinds of resources like devices and features.
+# QQ - a " preceded by whatever escape characters are needed to
+# persuade the shell to pass a " to a program (" on MS-DOS,
+# \" on Unix).
+# XE - the extension for executable files (e.g., null or .exe).
+# OBJ - the extension for relocatable object files (e.g., o or obj).
+# BEGINFILES - the list of files that `make begin' should delete.
+# CCBEGIN - the compilation command for `make begin', normally
+# $(CCC) *.c.
+# CCC - the C invocation for normal compilation.
+# CCD - the C invocation for files that store into frame buffers or
+# device registers. Needed because some optimizing compilers
+# will eliminate necessary stores.
+# CCCF - the C invocation for compiled fonts and other large,
+# self-contained data modules. Needed because MS-DOS
+# requires using the 'huge' memory model for these.
+# CCINT - the C invocation for compiling the main interpreter module,
+# normally the same as CCC: this is needed because the
+# Borland compiler generates *worse* code for this module
+# (but only this module) when optimization (-O) is turned on.
+# AK - if source files must be converted from ANSI to K&R syntax,
+# this is ansi2knr$(XE); if not, it is null.
+# If a particular platform requires other utility programs
+# to be built, AK must include them too.
+# SHP - the prefix for invoking a shell script in the current directory
+# (null for MS-DOS, $(SH) ./ for Unix).
+# EXPP, EXP - the prefix for invoking an executable program in the
+# current directory (null for MS-DOS, ./ for Unix).
+# SH - the shell for scripts (null on MS-DOS, sh on Unix).
+# The platform-specific makefiles must also include rules for creating
+# ansi2knr$(XE), genarch$(XE), and genconf$(XE) from the corresponding
+# .c files -- this is needed because Turbo C and Unix C treat the -o
+# switch slightly differently (Turbo C requires no following space,
+# Unix C requires a following space), and I haven't found a way to capture
+# the difference in a macro.
+
+all default: $(GS)$(XE)
+
+distclean realclean: clean
+ rm -f makefile
+
+clean mostlyclean:
+ rm -f *.$(OBJ) *.a core gmon.out
+ rm -f *.dev *.d_* arch.h gconfig*.h o*.tr l*.tr
+ rm -f t _temp_* _temp_*.* *.map *.sym
+ rm -f ansi2knr$(XE) echogs$(XE) genarch$(XE) genconf$(XE)
+ rm -f $(GS)$(XE) $(BEGINFILES)
+
+# A rule to do a quick and dirty compilation attempt when first installing
+# Ghostscript. Many of the compilations will fail: follow this with 'make'.
+
+begin:
+ rm -f arch.h genarch$(XE) $(GS)$(XE) $(BEGINFILES)
+ make arch.h
+ - $(CCBEGIN)
+ rm -f gconfig.$(OBJ) gdev*.$(OBJ) gp_*.$(OBJ) gsmisc.$(OBJ)
+ rm -f iccfont.$(OBJ) iinit.$(OBJ) interp.$(OBJ) zfiledev.$(OBJ)
+
+# Auxiliary programs
+
+arch.h: genarch$(XE)
+ $(EXPP) $(EXP)genarch arch.h
+
+# -------------------------------- Library -------------------------------- #
+
+# Define the inter-dependencies of the .h files.
+# Since not all versions of `make' defer expansion of macros,
+# we must list these in bottom-to-top order.
+
+# Generic files
+
+arch_h=arch.h
+std_h=std.h $(arch_h)
+
+# Platform interfaces
+
+gp_h=gp.h
+gpcheck_h=gpcheck.h
+
+# C library interfaces
+
+# Because of variations in the "standard" header files between systems, and
+# because we must include std.h before any file that includes sys/types.h,
+# we define local include files named *_.h to substitute for <*.h>.
+
+vmsmath_h=vmsmath.h
+
+dos__h=dos_.h
+ctype__h=ctype_.h $(std_h)
+errno__h=errno_.h
+malloc__h=malloc_.h $(std_h)
+math__h=math_.h $(std_h) $(vmsmath_h)
+memory__h=memory_.h $(std_h)
+stat__h=stat_.h $(std_h)
+stdio__h=stdio_.h $(std_h)
+string__h=string_.h $(std_h)
+time__h=time_.h $(std_h)
+windows__h=windows_.h
+
+# Miscellaneous
+
+gdebug_h=gdebug.h
+gsio_h=gsio.h
+gstypes_h=gstypes.h
+gs_h=gs.h $(stdio__h) $(gsio_h) $(gstypes_h)
+gx_h=gx.h $(gs_h) $(gdebug_h)
+gconfig_h=gconfig.h gsconfig.h
+gserrors_h=gserrors.h
+
+GX=$(AK) $(gx_h)
+GXERR=$(GX) $(gserrors_h)
+
+###### Low-level facilities and utilities
+
+### Include files
+
+gsccode_h=gsccode.h
+gschar_h=gschar.h $(gsccode_h)
+gscie_h=gscie.h
+gscolor_h=gscolor.h
+gscolor2_h=gscolor2.h
+gscoord_h=gscoord.h
+gscrypt1_h=gscrypt1.h
+gscspace_h=gscspace.h
+gsfont_h=gsfont.h
+gsimage_h=gsimage.h
+gsmatrix_h=gsmatrix.h
+gspaint_h=gspaint.h
+gspath_h=gspath.h
+gsprops_h=gsprops.h
+gsstate_h=gsstate.h $(gscolor_h)
+gstype1_h=gstype1.h
+gsuid_h=gsuid.h
+gsutil_h=gsutil.h
+gsxfont_h=gsxfont.h
+
+gxarith_h=gxarith.h
+gxbitmap_h=gxbitmap.h
+gxcache_h=gxcache.h $(gsuid_h) $(gsxfont_h)
+gxcdir_h=gxcdir.h
+gxchar_h=gxchar.h $(gschar_h)
+gxclist_h=gxclist.h
+# gxcldev is out of order because it include gxclist.
+gxcldev_h=gxcldev.h $(gxclist_h)
+gxcpath_h=gxcpath.h
+gxdevice_h=gxdevice.h $(gsmatrix_h) $(gsxfont_h) $(gxbitmap_h)
+gxdevmem_h=gxdevmem.h
+gxfdir_h=gxfdir.h $(gxcdir_h)
+gxfixed_h=gxfixed.h
+gxfont_h=gxfont.h $(gsfont_h) $(gsuid_h)
+gxfrac_h=gxfrac.h
+gximage_h=gximage.h $(gscspace_h) $(gsimage_h)
+gxlum_h=gxlum.h
+gxmatrix_h=gxmatrix.h $(gsmatrix_h)
+gxop1_h=gxop1.h
+gxpath_h=gxpath.h
+gxrefct_h=gxrefct.h
+gxtype1_h=gxtype1.h $(gscrypt1_h) $(gstype1_h)
+gxxfont_h=gxxfont.h $(gsccode_h) $(gsmatrix_h) $(gsuid_h) $(gsxfont_h)
+# gxcolor and gxfmap are out of order because they include other files.
+gxcolor_h=gxcolor.h $(gxfrac_h) $(gsuid_h)
+gxfmap_h=gxfmap.h $(gxfrac_h) $(gxrefct_h)
+
+gzcolor_h=gzcolor.h $(gscolor_h) $(gxfmap_h) $(gxlum_h)
+gzdevice_h=gzdevice.h $(gxdevice_h)
+gzht_h=gzht.h
+gzline_h=gzline.h
+gzpath_h=gzpath.h $(gxpath_h)
+gzstate_h=gzstate.h $(gsstate_h) $(gxfixed_h) $(gxmatrix_h)
+
+### Executable code
+
+gp_nofb.$(OBJ): gp_nofb.c $(AK) \
+ $(gx_h) $(gp_h) $(gxdevice_h)
+
+gsutil.$(OBJ): gsutil.c $(AK) \
+ $(std_h) $(gsprops_h) $(gsutil_h)
+
+gxccache.$(OBJ): gxccache.c $(GXERR) $(gpcheck_h) \
+ $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gzcolor_h) \
+ $(gxcpath_h) $(gxdevmem_h) $(gxfont_h) $(gxfdir_h) $(gxchar_h) \
+ $(gxcache_h) $(gxxfont_h) $(gzstate_h) $(gzpath_h) \
+ $(gscspace_h) $(gsimage_h)
+
+gxccman.$(OBJ): gxccman.c $(GXERR) $(gpcheck_h) \
+ $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gzcolor_h) \
+ $(gxcpath_h) $(gxdevmem_h) $(gxfont_h) $(gxfdir_h) $(gxchar_h) \
+ $(gxcache_h) $(gxxfont_h) $(gzstate_h) $(gzpath_h)
+
+gxclist.$(OBJ): gxclist.c $(GXERR) $(gpcheck_h) \
+ $(gsmatrix_h) $(gxbitmap_h) $(gxcldev_h) $(gxdevice_h) $(gxdevmem_h)
+
+gxclread.$(OBJ): gxclread.c $(GXERR) $(gpcheck_h) \
+ $(gsmatrix_h) $(gxbitmap_h) $(gxcldev_h) $(gxdevice_h) $(gxdevmem_h)
+
+gxcmap.$(OBJ): gxcmap.c $(GXERR) \
+ $(gscspace_h) \
+ $(gxcolor_h) $(gxdevice_h) $(gxfrac_h) $(gxlum_h) \
+ $(gzcolor_h) $(gzstate_h)
+
+gxcpath.$(OBJ): gxcpath.c $(GXERR) \
+ $(gxdevice_h) $(gxfixed_h) $(gzcolor_h) $(gzpath_h) $(gxcpath_h)
+
+gxdither.$(OBJ): gxdither.c $(GX) \
+ $(gxfixed_h) $(gxlum_h) $(gxmatrix_h) $(gzstate_h) $(gzdevice_h) $(gzcolor_h) $(gzht_h)
+
+gxdraw.$(OBJ): gxdraw.c $(GXERR) $(gpcheck_h) \
+ $(gxfixed_h) $(gxmatrix_h) $(gxbitmap_h) $(gzcolor_h) $(gzdevice_h) $(gzstate_h)
+
+gxfill.$(OBJ): gxfill.c $(GXERR) \
+ $(gxfixed_h) $(gxmatrix_h) $(gxdevice_h) $(gzcolor_h) $(gzpath_h) $(gzstate_h) $(gxcpath_h)
+
+gxhint1.$(OBJ): gxhint1.c $(GXERR) \
+ $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gxdevmem_h) $(gxchar_h) $(gxfont_h) $(gxtype1_h) \
+ $(gzdevice_h) $(gzstate_h)
+
+gxhint2.$(OBJ): gxhint2.c $(GXERR) \
+ $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gxdevmem_h) $(gxchar_h) $(gxfont_h) $(gxtype1_h) $(gxop1_h) \
+ $(gzdevice_h) $(gzstate_h)
+
+gxht.$(OBJ): gxht.c $(GXERR) \
+ $(gxfixed_h) $(gxmatrix_h) $(gxbitmap_h) $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h)
+
+gxpath.$(OBJ): gxpath.c $(GXERR) \
+ $(gxfixed_h) $(gzpath_h)
+
+gxpath2.$(OBJ): gxpath2.c $(GXERR) \
+ $(gxfixed_h) $(gxarith_h) $(gzpath_h)
+
+gxpcopy.$(OBJ): gxpcopy.c $(GXERR) \
+ $(gxfixed_h) $(gxarith_h) $(gzpath_h)
+
+gxstroke.$(OBJ): gxstroke.c $(GXERR) $(gpcheck_h) \
+ $(gscoord_h) $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) \
+ $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzline_h) $(gzpath_h)
+
+###### High-level facilities
+
+gschar.$(OBJ): gschar.c $(GXERR) \
+ $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gzdevice_h) $(gxdevmem_h) $(gxfont_h) $(gxchar_h) $(gxcache_h) $(gstype1_h) $(gspath_h) $(gzpath_h) $(gzcolor_h) $(gzstate_h)
+
+gscolor.$(OBJ): gscolor.c $(GXERR) \
+ $(gscspace_h) $(gxcolor_h) $(gxdevice_h) $(gxrefct_h) \
+ $(gzstate_h) $(gzcolor_h)
+
+gscoord.$(OBJ): gscoord.c $(GXERR) \
+ $(gsccode_h) $(gxarith_h) $(gxfixed_h) $(gxfont_h) $(gxmatrix_h) \
+ $(gzdevice_h) $(gzstate_h) $(gscoord_h)
+
+gsdevice.$(OBJ): gsdevice.c $(GXERR) \
+ $(gxarith_h) $(gsprops_h) $(gsutil_h) $(gxbitmap_h) $(gxdevmem_h) \
+ $(gzstate_h) $(gzdevice_h)
+
+gsfile.$(OBJ): gsfile.c $(GXERR) \
+ $(gsmatrix_h) $(gxdevice_h) $(gxdevmem_h)
+
+gsfont.$(OBJ): gsfont.c $(GXERR) \
+ $(gxdevice_h) $(gxfixed_h) $(gxmatrix_h) $(gxfont_h) $(gxfdir_h) \
+ $(gzstate_h)
+
+gsht.$(OBJ): gsht.c $(GXERR) \
+ $(gzht_h) $(gzstate_h)
+
+gsimage.$(OBJ): gsimage.c $(GXERR) $(gpcheck_h) \
+ $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gspaint_h) \
+ $(gzcolor_h) $(gzdevice_h) $(gzpath_h) $(gzstate_h) \
+ $(gxcolor_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
+
+gsimage1.$(OBJ): gsimage1.c $(GXERR) $(gpcheck_h) \
+ $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gscspace_h) $(gspaint_h) \
+ $(gzcolor_h) $(gzdevice_h) $(gzpath_h) $(gzstate_h) \
+ $(gxcolor_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
+
+gsimage2.$(OBJ): gsimage2.c $(GXERR) $(gpcheck_h) \
+ $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gscspace_h) $(gspaint_h) \
+ $(gzcolor_h) $(gzdevice_h) $(gzpath_h) $(gzstate_h) \
+ $(gxcolor_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
+
+gsimpath.$(OBJ): gsimpath.c $(GXERR) \
+ $(gsmatrix_h) $(gsstate_h) $(gspath_h)
+
+gsline.$(OBJ): gsline.c $(GXERR) \
+ $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gzline_h)
+
+gsmatrix.$(OBJ): gsmatrix.c $(GXERR) \
+ $(gxfixed_h) $(gxarith_h) $(gxmatrix_h)
+
+gsmisc.$(OBJ): gsmisc.c $(GX) $(errno__h) $(malloc__h) $(memory__h) $(MAKEFILE)
+ $(CCC) -DUSE_ASM=0$(USE_ASM) gsmisc.c
+
+gspaint.$(OBJ): gspaint.c $(GXERR) $(gpcheck_h) \
+ $(gxfixed_h) $(gxmatrix_h) $(gspaint_h) $(gzpath_h) $(gzstate_h) $(gzdevice_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
+
+gspath.$(OBJ): gspath.c $(GXERR) \
+ $(gxfixed_h) $(gxmatrix_h) $(gxpath_h) $(gzstate_h)
+
+gspath2.$(OBJ): gspath2.c $(GXERR) \
+ $(gspath_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gzpath_h) $(gzdevice_h)
+
+gsstate.$(OBJ): gsstate.c $(GXERR) \
+ $(gscie_h) $(gscolor2_h) $(gscspace_h) $(gxcolor_h) $(gxrefct_h) \
+ $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h) $(gzline_h) $(gzpath_h)
+
+gstdev.$(OBJ): gstdev.c $(GXERR) \
+ $(gxbitmap_h) $(gxdevice_h) $(gxfixed_h) $(gxmatrix_h)
+
+gstype1.$(OBJ): gstype1.c $(GXERR) \
+ $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gxchar_h) $(gxdevmem_h) $(gxop1_h) $(gxtype1_h) \
+ $(gzstate_h) $(gzdevice_h) $(gzpath_h)
+
+###### The internal devices
+
+gdevmem_h=gdevmem.h
+
+gdevemap.$(OBJ): gdevemap.c $(AK) $(std_h)
+
+gdevmem1.$(OBJ): gdevmem1.c $(AK) \
+ $(gx_h) $(gserrors_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h)
+
+gdevmem2.$(OBJ): gdevmem2.c $(AK) \
+ $(gx_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h)
+
+gdevmem3.$(OBJ): gdevmem3.c $(AK) \
+ $(gx_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h)
+
+###### Files dependent on the installed devices, features, and platform.
+# Generating gconfig.h also generates o*.tr and l*.tr.
+
+# gconfig.h shouldn't have to depend on ALL_DEVS, but that would
+# involve rewriting gsconfig to only save the device name, not the
+# contents of the <device>.D_# files.
+
+ALL_DEVS=$(FEATURE_DEVS) $(PLATFORM).dev \
+ $(DEVICE_DEVS) $(DEVICE_DEVS1) \
+ $(DEVICE_DEVS2) $(DEVICE_DEVS3) $(DEVICE_DEVS4) $(DEVICE_DEVS5)\
+ $(DEVICE_DEVS6) $(DEVICE_DEVS7) $(DEVICE_DEVS8) $(DEVICE_DEVS9)
+
+gconfig.h obj.tr objw.tr ld.tr lib.tr: \
+ devs.mak $(MAKEFILE) echogs$(XE) genconf$(XE) $(ALL_DEVS)
+ $(EXP)echogs -w t.cfg - $(FEATURE_DEVS) $(PLATFORM).dev
+ $(EXP)echogs -a t.cfg - $(DEVICE_DEVS)
+ $(EXP)echogs -a t.cfg - $(DEVICE_DEVS1)
+ $(EXP)echogs -a t.cfg - $(DEVICE_DEVS2)
+ $(EXP)echogs -a t.cfg - $(DEVICE_DEVS3)
+ $(EXP)echogs -a t.cfg - $(DEVICE_DEVS4)
+ $(EXP)echogs -a t.cfg - $(DEVICE_DEVS5)
+ $(EXP)echogs -a t.cfg - $(DEVICE_DEVS6)
+ $(EXP)echogs -a t.cfg - $(DEVICE_DEVS7)
+ $(EXP)echogs -a t.cfg - $(DEVICE_DEVS8)
+ $(EXP)echogs -a t.cfg - $(DEVICE_DEVS9)
+ $(EXP)genconf @t.cfg -h gconfig.h -l lib.tr -o obj.tr -u ld.tr -w objw.tr
+ rm t.cfg
+ $(EXP)echogs -a gconfig.h -x 23 define GS_LIB_DEFAULT -x 2022 $(GS_LIB_DEFAULT) -x 22
+ $(EXP)echogs -a gconfig.h -x 23 define GS_INIT -x 2022 $(GS_INIT) -x 22
+
+gconfig.$(OBJ): gconfig.c $(AK) $(gconfig_h) $(MAKEFILE)
+
+###### On Unix, we pre-link all of the library except the back end.
+###### On MS-DOS, we have to do the whole thing at once.
+
+LIBGS=gschar.$(OBJ) gscolor.$(OBJ) gscoord.$(OBJ) \
+ gsdevice.$(OBJ) gsfile.$(OBJ) gsfont.$(OBJ) gsht.$(OBJ) \
+ gsimage.$(OBJ) gsimage1.$(OBJ) gsimage2.$(OBJ) \
+ gsimpath.$(OBJ) gsline.$(OBJ) gsmatrix.$(OBJ) gsmisc.$(OBJ) \
+ gspaint.$(OBJ) gspath.$(OBJ) gspath2.$(OBJ) \
+ gsstate.$(OBJ) gstdev.$(OBJ) gstype1.$(OBJ) gsutil.$(OBJ) \
+ gxccache.$(OBJ) gxccman.$(OBJ) gxclist.$(OBJ) gxclread.$(OBJ) \
+ gxcmap.$(OBJ) gxcpath.$(OBJ) \
+ gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \
+ gxhint1.$(OBJ) gxhint2.$(OBJ) gxht.$(OBJ) \
+ gxpath.$(OBJ) gxpath2.$(OBJ) gxpcopy.$(OBJ) gxstroke.$(OBJ) \
+ gdevmem1.$(OBJ) gdevmem2.$(OBJ) gdevmem3.$(OBJ) gconfig.$(OBJ)
+
+# ------------------------------ Interpreter ------------------------------ #
+
+###### Include files
+
+alloc_h=alloc.h
+astate_h=astate.h
+ccfont_h=ccfont.h
+dict_h=dict.h
+dparam_h=dparam.h
+dstack_h=dstack.h
+errors_h=errors.h
+estack_h=estack.h
+filedev_h=filedev.h
+files_h=files.h
+font_h=font.h
+ilevel_h=ilevel.h
+iname_h=iname.h
+iref_h=iref.h
+iscan_h=iscan.h
+ivmspace_h=ivmspace.h
+iutil_h=iutil.h
+main_h=main.h
+opdef_h=opdef.h
+ostack_h=ostack.h
+overlay_h=overlay.h
+packed_h=packed.h
+save_h=save.h
+scanchar_h=scanchar.h
+sbits_h=sbits.h
+shc_h=shc.h
+state_h=state.h
+store_h=store.h
+stream_h=stream.h
+# Nested include files
+bfont_h=bfont.h $(font_h)
+ghost_h=ghost.h $(gx_h) $(iref_h)
+oper_h=oper.h $(gsutil_h) $(iutil_h) $(opdef_h) $(ostack_h)
+scf_h=scf.h $(shc_h)
+sdct_h=sdct.h $(shc_h)
+# Include files for optional features
+bnum_h=bnum.h
+bseq_h=bseq.h
+btoken_h=btoken.h
+
+comp1_h=comp1.h $(ghost_h) $(oper_h) $(gserrors_h) $(gxfixed_h) $(gxop1_h)
+
+gdevprn_h=gdevprn.h $(memory__h) $(string__h) $(gx_h) \
+ $(gserrors_h) $(gsmatrix_h) $(gxdevice_h) $(gxdevmem_h) $(gxclist_h)
+
+###### Utilities
+
+GH=$(AK) $(ghost_h)
+
+ialloc.$(OBJ): ialloc.c $(AK) $(gx_h) $(alloc_h) $(astate_h) $(ivmspace_h)
+
+iccfont.$(OBJ): iccfont.c $(GH) gconfigf.h \
+ $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) \
+ $(font_h) $(iutil_h) $(iname_h) $(oper_h) $(save_h) $(store_h)
+
+idebug.$(OBJ): idebug.c $(GH) \
+ $(iutil_h) $(dict_h) $(iname_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h)
+
+idict.$(OBJ): idict.c $(GH) \
+ $(alloc_h) $(errors_h) $(ivmspace_h) $(iname_h) $(packed_h) \
+ $(save_h) $(store_h) $(iutil_h) $(dict_h) $(dstack_h)
+
+idparam.$(OBJ): idparam.c $(GH) \
+ $(gsmatrix_h) $(dict_h) $(dparam_h) $(errors_h) $(iutil_h)
+
+iinit.$(OBJ): iinit.c $(GH) $(gconfig_h) \
+ $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) $(ilevel_h) $(iname_h) $(oper_h) $(store_h)
+
+iname.$(OBJ): iname.c $(GH) $(alloc_h) $(errors_h) $(ivmspace_h) $(iname_h) $(store_h)
+
+isave.$(OBJ): isave.c $(GH) $(alloc_h) $(astate_h) $(errors_h) $(iname_h) $(packed_h) $(save_h) $(store_h)
+
+iscan.$(OBJ): iscan.c $(GH) $(ctype__h) \
+ $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) \
+ $(ilevel_h) $(iutil_h) $(iscan_h) $(ivmspace_h) \
+ $(iname_h) $(ostack_h) $(packed_h) $(store_h) $(stream_h) $(scanchar_h)
+
+iutil.$(OBJ): iutil.c $(GH) \
+ $(errors_h) $(alloc_h) $(dict_h) $(iutil_h) $(ivmspace_h) \
+ $(iname_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h) \
+ $(gsmatrix_h) $(gxdevice_h) $(gzcolor_h)
+
+sfilter.$(OBJ): sfilter.c $(AK) $(stdio__h) \
+ $(scanchar_h) $(stream_h) $(gscrypt1_h)
+
+stream.$(OBJ): stream.c $(AK) $(stdio__h) $(memory__h) \
+ $(gpcheck_h) $(scanchar_h) $(stream_h)
+
+###### Operators
+
+OP=$(GH) $(errors_h) $(oper_h)
+
+### Non-graphics operators
+
+zarith.$(OBJ): zarith.c $(OP) $(store_h)
+
+zarray.$(OBJ): zarray.c $(OP) $(alloc_h) $(packed_h) $(store_h)
+
+zcontrol.$(OBJ): zcontrol.c $(OP) $(estack_h) $(iutil_h) $(store_h)
+
+zdict.$(OBJ): zdict.c $(OP) $(dict_h) $(dstack_h) $(iname_h) $(store_h)
+
+zfile.$(OBJ): zfile.c $(OP) $(gp_h) \
+ $(alloc_h) $(estack_h) $(filedev_h) $(files_h) $(ilevel_h) $(iutil_h) \
+ $(save_h) $(stream_h) $(store_h)
+
+zfiledev.$(OBJ): zfiledev.c $(OP) $(string__h) $(gp_h) $(gconfig_h) \
+ $(filedev_h) $(files_h) $(stream_h)
+
+zfileio.$(OBJ): zfileio.c $(OP) $(gp_h) \
+ $(estack_h) $(files_h) $(iscan_h) $(store_h) $(stream_h) \
+ $(gsmatrix_h) $(gxdevice_h) $(gxdevmem_h)
+
+zfilter.$(OBJ): zfilter.c $(OP) $(alloc_h) $(stream_h)
+
+zgeneric.$(OBJ): zgeneric.c $(OP) \
+ $(dict_h) $(estack_h) $(ivmspace_h) $(iname_h) $(packed_h) $(store_h)
+
+zmath.$(OBJ): zmath.c $(OP) $(store_h)
+
+zmisc.$(OBJ): zmisc.c $(OP) $(gp_h) $(errno__h) $(memory__h) $(string__h) \
+ $(alloc_h) $(dict_h) $(dstack_h) $(iname_h) $(ivmspace_h) $(packed_h) $(store_h) \
+ $(gscrypt1_h)
+
+zpacked.$(OBJ): zpacked.c $(OP) \
+ $(alloc_h) $(dict_h) $(ivmspace_h) $(iname_h) $(packed_h) $(save_h) $(store_h)
+
+zprops.$(OBJ): zprops.c $(OP) \
+ $(alloc_h) $(dict_h) $(iname_h) $(state_h) $(store_h) \
+ $(gsprops_h) $(gsmatrix_h) $(gxdevice_h) $(gsstate_h)
+
+zrelbit.$(OBJ): zrelbit.c $(OP) $(store_h) $(dict_h)
+
+zstack.$(OBJ): zstack.c $(OP) $(store_h)
+
+zstring.$(OBJ): zstring.c $(OP) \
+ $(alloc_h) $(iscan_h) $(iutil_h) $(iname_h) $(store_h) $(stream_h)
+
+ztype.$(OBJ): ztype.c $(OP) \
+ $(dict_h) $(iscan_h) $(iutil_h) $(iname_h) $(stream_h) $(store_h)
+
+zvmem.$(OBJ): zvmem.c $(OP) $(alloc_h) $(dict_h) $(dstack_h) $(estack_h) $(save_h) $(state_h) $(store_h) \
+ $(gsmatrix_h) $(gsstate_h)
+
+###### Graphics operators
+
+zchar.$(OBJ): zchar.c $(OP) $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) \
+ $(gschar_h) $(gxtype1_h) $(gxdevice_h) $(gxfont_h) $(gzpath_h) $(gzstate_h) \
+ $(alloc_h) $(dict_h) $(font_h) $(estack_h) $(ilevel_h) $(iname_h) $(state_h) $(store_h)
+
+zcolor.$(OBJ): zcolor.c $(OP) $(alloc_h) $(estack_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gxdevice_h) $(gzcolor_h) $(iutil_h) $(state_h) $(store_h)
+
+zdevice.$(OBJ): zdevice.c $(OP) $(alloc_h) $(state_h) $(gsmatrix_h) $(gsstate_h) $(gxdevice_h) $(store_h)
+
+zfont.$(OBJ): zfont.c $(OP) \
+ $(gsmatrix_h) $(gxdevice_h) $(gxfont_h) $(gxfdir_h) $(gxcache_h) \
+ $(alloc_h) $(bfont_h) $(dict_h) $(iname_h) $(packed_h) $(save_h) $(state_h) $(store_h)
+
+zfont1.$(OBJ): zfont1.c $(OP) $(gsmatrix_h) $(gxdevice_h) $(gschar_h) $(gxfixed_h) $(gxfont_h) \
+ $(bfont_h) $(dict_h) $(dparam_h) $(iname_h) $(store_h)
+
+zfont2.$(OBJ): zfont2.c $(OP) $(gsmatrix_h) $(gxdevice_h) $(gschar_h) $(gxfixed_h) $(gxfont_h) \
+ $(alloc_h) $(bfont_h) $(dict_h) $(dparam_h) $(ilevel_h) $(iname_h) \
+ $(packed_h) $(save_h) $(store_h)
+
+zgstate.$(OBJ): zgstate.c $(OP) $(alloc_h) $(gsmatrix_h) $(gsstate_h) $(state_h) $(store_h)
+
+zht.$(OBJ): zht.c $(OP) $(alloc_h) $(estack_h) $(gsmatrix_h) $(gsstate_h) $(state_h) $(store_h)
+
+zmatrix.$(OBJ): zmatrix.c $(OP) $(gsmatrix_h) $(state_h) $(gscoord_h) $(store_h)
+
+zpaint.$(OBJ): zpaint.c $(OP) \
+ $(alloc_h) $(estack_h) $(ilevel_h) $(state_h) $(store_h) $(stream_h) \
+ $(gsimage_h) $(gsmatrix_h) $(gspaint_h)
+
+zpath.$(OBJ): zpath.c $(OP) $(gsmatrix_h) $(gspath_h) $(state_h) $(store_h)
+
+zpath2.$(OBJ): zpath2.c $(OP) $(alloc_h) $(estack_h) $(gspath_h) $(state_h) $(store_h)
+
+###### Linking
+
+INT=ialloc.$(OBJ) idebug.$(OBJ) idict.$(OBJ) idparam.$(OBJ) \
+ iinit.$(OBJ) iname.$(OBJ) \
+ interp.$(OBJ) isave.$(OBJ) iscan.$(OBJ) iutil.$(OBJ) \
+ sfilter.$(OBJ) stream.$(OBJ) \
+ zarith.$(OBJ) zarray.$(OBJ) zcontrol.$(OBJ) zdict.$(OBJ) \
+ zfile.$(OBJ) zfiledev.$(OBJ) zfileio.$(OBJ) zfilter.$(OBJ) zgeneric.$(OBJ) \
+ zmath.$(OBJ) zmisc.$(OBJ) zpacked.$(OBJ) zprops.$(OBJ) zrelbit.$(OBJ) \
+ zstack.$(OBJ) zstring.$(OBJ) ztype.$(OBJ) zvmem.$(OBJ) \
+ zchar.$(OBJ) zcolor.$(OBJ) zfont.$(OBJ) zfont1.$(OBJ) zfont2.$(OBJ) \
+ zdevice.$(OBJ) zgstate.$(OBJ) zht.$(OBJ) zmatrix.$(OBJ) \
+ zpaint.$(OBJ) zpath.$(OBJ) zpath2.$(OBJ)
+
+# -------------------------- Optional features ---------------------------- #
+
+### Additions common to Display PostScript and Level 2
+
+# We have to split up the module list because of limitations
+# on the number of arguments to a DOS batch file.
+dpsand2a_=gsdps1.$(OBJ) ibnum.$(OBJ) iscan2.$(OBJ)
+dpsand2b_=zbseq.$(OBJ) zchar2.$(OBJ) zdps1.$(OBJ) zupath.$(OBJ) zvmem2.$(OBJ)
+dpsand2_=$(dpsand2a_) $(dpsand2b_)
+dpsand2.dev: $(dpsand2_) gssetmod gsaddmod
+ $(SHP)gssetmod dpsand2 $(dpsand2a_)
+ $(SHP)gsaddmod dpsand2 -obj $(dpsand2b_)
+ $(SHP)gsaddmod dpsand2 -oper2 zbseq zchar2 zdps1 zupath zvmem2
+ $(SHP)gsaddmod dpsand2 -ps gs_dps1
+
+gsdps1.$(OBJ): gsdps1.c $(GXERR) $(gxfixed_h) $(gxmatrix_h) $(gzpath_h) $(gzstate_h)
+
+ibnum.$(OBJ): ibnum.c $(GH) $(errors_h) $(stream_h) $(bnum_h) $(btoken_h)
+
+iscan2.$(OBJ): iscan2.c $(GH) $(errors_h) \
+ $(alloc_h) $(dict_h) $(dstack_h) $(iscan_h) $(iutil_h) $(ivmspace_h) \
+ $(iname_h) $(ostack_h) $(save_h) $(store_h) $(stream_h) \
+ $(bseq_h) $(btoken_h) $(bnum_h)
+
+zbseq.$(OBJ): zbseq.c $(OP) $(save_h) $(store_h) $(stream_h) $(files_h) $(iname_h) $(bnum_h) $(btoken_h) $(bseq_h)
+
+zchar2.$(OBJ): zchar2.c $(OP) $(gschar_h) $(gsmatrix_h) $(gxfixed_h) $(gxfont_h) \
+ $(alloc_h) $(estack_h) $(font_h) $(iname_h) $(state_h) $(store_h) $(stream_h) $(bnum_h)
+
+zdps1.$(OBJ): zdps1.c $(OP) $(gsmatrix_h) $(gspath_h) $(gsstate_h) \
+ $(alloc_h) $(ivmspace_h) $(state_h) $(store_h) $(stream_h) $(bnum_h)
+
+zupath.$(OBJ): zupath.c $(OP) \
+ $(dict_h) $(dstack_h) $(iutil_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) \
+ $(gscoord_h) $(gsmatrix_h) $(gspaint_h) $(gspath_h) $(gsstate_h) \
+ $(gxfixed_h) $(gxdevice_h) $(gxpath_h)
+
+zvmem2.$(OBJ): zvmem2.c $(OP) \
+ $(ivmspace_h) $(store_h)
+
+### Display PostScript
+# We should include zcontext, but it isn't in good enough shape yet:
+# $(SHP)gsaddmod dps -oper2 zcontext
+
+dps_=
+dps.dev: dpsand2.dev $(dps_) gssetmod gsaddmod
+ $(SHP)gssetmod dps $(dps_)
+ $(SHP)gsaddmod dps -include dpsand2
+
+zcontext.$(OBJ): zcontext.c $(OP) \
+ $(alloc_h) $(dict_h) $(dstack_h) $(estack_h) $(state_h) $(store_h)
+
+### Composite font support
+
+gschar0.$(OBJ): gschar0.c $(GXERR) \
+ $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gxdevmem_h) $(gxfont_h) $(gxchar_h) $(gzstate_h)
+
+zfont0.$(OBJ): zfont0.c $(OP) $(gsmatrix_h) $(gxdevice_h) $(gxfont_h) \
+ $(alloc_h) $(bfont_h) $(dict_h) $(iname_h) $(state_h) $(store_h)
+
+compfont_=zchar2.$(OBJ) zfont0.$(OBJ) gschar0.$(OBJ)
+compfont.dev: $(compfont_) gssetmod gsaddmod
+ $(SHP)gssetmod compfont $(compfont_)
+ $(SHP)gsaddmod compfont -oper zfont0 zchar2
+ $(SHP)gsaddmod compfont -ps gs_type0
+
+### Level 2 additions
+
+# We have to split up the module list because of limitations
+# on the number of arguments to a DOS batch file.
+level2a_=gscie.$(OBJ) gscolor2.$(OBJ) zcie.$(OBJ) zcolor2.$(OBJ)
+level2b_=zcspace2.$(OBJ) zht2.$(OBJ) zimage2.$(OBJ) zmisc2.$(OBJ)
+level2_=$(level2a_) $(level2b_)
+level2.dev: compfont.dev dpsand2.dev filter.dev $(level2_) gssetmod gsaddmod
+ $(SHP)gssetmod level2 $(level2a_)
+ $(SHP)gsaddmod level2 -obj $(level2b_)
+ $(SHP)gsaddmod level2 -include compfont dpsand2 filter
+ $(SHP)gsaddmod level2 -oper zmisc2_level
+ $(SHP)gsaddmod level2 -oper2 zcie zcolor2 zcspace2
+ $(SHP)gsaddmod level2 -oper2 zht2 zimage2 zmisc2
+ $(SHP)gsaddmod level2 -ps gs_lev2
+
+gscie.$(OBJ): gscie.c $(GXERR) \
+ $(gscspace_h) $(gscie_h) $(gscolor2_h) \
+ $(gxarith_h) $(gxcolor_h) $(gxdevice_h) $(gxrefct_h) \
+ $(gzcolor_h) $(gzstate_h)
+
+gscolor2.$(OBJ): gscolor2.c $(GXERR) \
+ $(gscie_h) $(gscolor2_h) $(gscspace_h) \
+ $(gxcolor_h) $(gxdevice_h) $(gxfixed_h) $(gxmatrix_h) $(gxrefct_h) \
+ $(gzcolor_h) $(gzstate_h)
+
+zcie.$(OBJ): zcie.c $(OP) \
+ $(gscspace_h) $(gscolor2_h) $(gscie_h) $(gxcolor_h) $(gxrefct_h) \
+ $(alloc_h) $(dict_h) $(dparam_h) $(estack_h) $(save_h) $(state_h) $(store_h)
+
+zcolor2.$(OBJ): zcolor2.c $(OP) \
+ $(gscolor_h) $(gxcolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) \
+ $(dict_h) $(dparam_h) $(iname_h) $(state_h) $(store_h)
+
+zcspace2.$(OBJ): zcspace2.c $(OP) \
+ $(gscolor_h) $(gxcolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) \
+ $(dict_h) $(dparam_h) $(estack_h) $(iname_h) $(state_h) $(store_h)
+
+zht2.$(OBJ): zht2.c $(OP) \
+ $(dict_h) $(dparam_h) $(iname_h) $(state_h) $(store_h)
+
+zimage2.$(OBJ): zimage2.c $(OP) \
+ $(gscolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) $(gxcolor_h) \
+ $(dict_h) $(dparam_h) $(ilevel_h) $(state_h)
+
+zmisc2.$(OBJ): zmisc2.c $(OP) \
+ $(gsfont_h) \
+ $(dict_h) $(dparam_h) $(dstack_h) $(estack_h) $(ilevel_h) $(iname_h) $(store_h)
+
+### Filters other than the ones in sfilter.c
+
+sbits.$(OBJ): sbits.c $(AK) $(stdio__h) $(sbits_h) $(stream_h)
+
+scftab.$(OBJ): scftab.c $(AK) $(std_h) $(scf_h)
+
+scfdtab.$(OBJ): scfdtab.c $(AK) $(std_h) $(scf_h)
+
+scfd.$(OBJ): scfd.c $(AK) $(stdio__h) $(gdebug_h)\
+ $(sbits_h) $(scf_h) $(stream_h)
+
+scfe.$(OBJ): scfe.c $(AK) $(stdio__h) $(gdebug_h)\
+ $(sbits_h) $(scf_h) $(stream_h)
+
+sdctd.$(OBJ): sdctd.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
+
+sdcte.$(OBJ): sdcte.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
+
+sfilter2.$(OBJ): sfilter2.c $(AK) $(stdio__h) $(scanchar_h) $(stream_h)
+
+slzwd.$(OBJ): slzwd.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
+
+slzwe.$(OBJ): slzwe.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
+
+zfilter2.$(OBJ): zfilter2.c $(OP) $(alloc_h) $(dict_h) $(dparam_h) $(sdct_h) $(stream_h)
+
+# Because of size limits on the DOS command line,
+# we have to break this up into two parts.
+filter_1=zfilter2.$(OBJ) sfilter2.$(OBJ) sbits.$(OBJ)
+filter_2=scfdtab.$(OBJ) scftab.$(OBJ) scfd.$(OBJ) scfe.$(OBJ)
+filter_3=sdctd.$(OBJ) sdcte.$(OBJ) slzwd.$(OBJ) slzwe.$(OBJ)
+filter.dev: $(filter_1) $(filter_2) $(filter_3) gssetmod gsaddmod
+ $(SHP)gssetmod filter $(filter_1)
+ $(SHP)gsaddmod filter -obj $(filter_2)
+ $(SHP)gsaddmod filter -obj $(filter_3)
+ $(SHP)gsaddmod filter -oper zfilter2
+
+### Precompiled fonts. See fonts.doc for more information.
+
+CCFONT=$(OP) $(ccfont_h)
+
+# List the fonts we are going to compile.
+# Because of intrinsic limitations in `make', we have to list
+# the object file names and the font names separately.
+ccfonts1_=uglyr.$(OBJ)
+ccfonts1=uglyr
+
+ccfonts.dev: $(MAKEFILE) gs.mak iccfont.$(OBJ) gssetmod gsaddmod \
+ $(ccfonts1_) $(ccfonts2_) $(ccfonts3_) $(ccfonts4_) $(ccfonts5_)
+ $(SHP)gssetmod ccfonts iccfont.$(OBJ)
+ $(SHP)gsaddmod ccfonts -obj $(ccfonts1_)
+ $(SHP)gsaddmod ccfonts -obj $(ccfonts2_)
+ $(SHP)gsaddmod ccfonts -obj $(ccfonts3_)
+ $(SHP)gsaddmod ccfonts -obj $(ccfonts4_)
+ $(SHP)gsaddmod ccfonts -obj $(ccfonts5_)
+ $(SHP)gsaddmod ccfonts -oper ccfonts
+
+gconfigf.h: $(MAKEFILE) gs.mak genconf$(XE) gssetmod gsaddmod
+ $(SHP)gssetmod ccfonts_
+ $(SHP)gsaddmod ccfonts_ -font $(ccfonts1)
+ $(SHP)gsaddmod ccfonts_ -font $(ccfonts2)
+ $(SHP)gsaddmod ccfonts_ -font $(ccfonts3)
+ $(SHP)gsaddmod ccfonts_ -font $(ccfonts4)
+ $(SHP)gsaddmod ccfonts_ -font $(ccfonts5)
+ $(EXP)genconf ccfonts_.dev -f gconfigf.h
+
+uglyr.$(OBJ): uglyr.c $(CCFONT)
+ $(CCCF) uglyr.c
+
+ncrr.$(OBJ): ncrr.c $(CCFONT)
+ $(CCCF) ncrr.c
+
+pagk.$(OBJ): pagk.c $(CCFONT)
+ $(CCCF) pagk.c
+
+psyr.$(OBJ): psyr.c $(CCFONT)
+ $(CCCF) psyr.c
+
+ptmr.$(OBJ): ptmr.c $(CCFONT)
+ $(CCCF) ptmr.c
+
+pzdr.$(OBJ): pzdr.c $(CCFONT)
+ $(CCCF) pzdr.c
+
+# ----------------------------- Main program ------------------------------ #
+
+# Interpreter main program
+
+gs.$(OBJ): gs.c $(GH) $(ctype__h) \
+ $(gxdevice_h) $(gxdevmem_h) \
+ $(alloc_h) $(errors_h) $(estack_h) $(files_h) $(iscan_h) $(main_h) $(ostack_h) $(store_h) $(stream_h)
+
+gsmain.$(OBJ): gsmain.c $(GH) \
+ $(gp_h) $(gsmatrix_h) $(gxdevice_h) $(gserrors_h) \
+ $(estack_h) $(files_h) $(iscan_h) $(main_h) $(ostack_h) $(store_h)
+
+interp.$(OBJ): interp.c $(GH) \
+ $(errors_h) $(estack_h) $(iname_h) $(dict_h) $(dstack_h) $(iscan_h) $(oper_h) $(ostack_h) $(packed_h) $(save_h) $(store_h) $(stream_h)
+ $(CCINT) interp.c
+# Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved.
+#
+# 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.
+
+# makefile for Ghostscript device drivers.
+
+# -------------------------------- Catalog ------------------------------- #
+
+# It is possible to build Ghostscript with an arbitrary collection of
+# device drivers, although some drivers are supported only on a subset
+# of the target platforms. The currently available drivers are:
+
+# Displays:
+# MS-DOS EGA and VGA:
+# ega EGA (640x350, 16-color)
+# vga VGA (640x480, 16-color)
+# MS-DOS SuperVGA:
+# + atiw ATI Wonder SuperVGA, 256-color modes
+# + atiw16 ATI Wonder SuperVGA in 800x600, 16-color mode
+# s3vga SuperVGA with S3 86C911 chip (e.g., Diamond Stealth board)
+# tseng SuperVGA using Tseng Labs ET3000/4000 chips, 256-color modes
+# tseng16 Tseng Labs SuperVGA in 800x600, 16-color mode (256K memory)
+# + tvga Trident SuperVGA, 256-color modes
+# + tvga16 Trident SuperVGA in 800x600, 16-color mode (256K memory)
+# ****** NOTE: The vesa device does not work with the Watcom (32-bit MS-DOS)
+# ****** compiler or executable.
+# vesa SuperVGA with VESA standard API driver
+# MS-DOS other:
+# bgi Borland Graphics Interface (CGA) [MS-DOS only]
+# * herc Hercules Graphics display [MS-DOS only]
+# mswin Microsoft Windows 3.0, 3.1 [MS Windows only]
+# mswinprn Microsoft Windows 3.0, 3.1 printer [MS Windows only]
+# * pe Private Eye display
+# Unix and VMS:
+# ****** NOTE: For direct frame buffer addressing under SCO Unix or Xenix,
+# ****** edit the definition of EGAVGA below.
+# * att3b1 AT&T 3b1/Unixpc monochrome display [3b1 only]
+# * sonyfb Sony Microsystems monochrome display [Sony only]
+# * sunview SunView window system [SunOS only]
+# x11 X Windows version 11, release >=4 [Unix and VMS only]
+# Printers:
+# * appledmp Apple Dot Matrix Printer (should also work with Imagewriter)
+# bj10e Canon BubbleJet BJ10e
+# * bj200 Canon BubbleJet BJ200
+# * cdeskjet H-P DeskJet 500C with 1 bit/pixel color
+# * cdjcolor H-P DeskJet 500C with 24 bit/pixel color and
+# high-quality color (Floyd-Steinberg) dithering
+# * cdjmono H-P DeskJet 500C printing black only
+# * cdj500 H-P DeskJet 500C (same as cdjcolor)
+# * cdj550 H-P DeskJet 550C
+# * declj250 alternate DEC LJ250 driver
+# + deskjet H-P DeskJet and DeskJet Plus
+# * dfaxhigh DigiBoard, Inc.'s DigiFAX software format (high resolution)
+# * dfaxlow DigiFAX low (normal) resolution
+# djet500 H-P DeskJet 500
+# * djet500c H-P DeskJet 500C
+# epson Epson-compatible dot matrix printers (9- or 24-pin)
+# + eps9high Epson-compatible 9-pin, interleaved lines
+# (triple resolution)
+# * epsonc Epson LQ-2550 and Fujitsu 3400/2400/1200 color printers
+# * escp2 Epson ESC/P 2 language printers, including Stylus 800
+# + ibmpro IBM 9-pin Proprinter
+# * jetp3852 IBM Jetprinter ink-jet color printer (Model #3852)
+# + laserjet H-P LaserJet
+# * la50 DEC LA50 printer
+# * la75 DEC LA75 printer
+# * lbp8 Canon LBP-8II laser printer
+# * ln03 DEC LN03 printer
+# * lj250 DEC LJ250 Companion color printer
+# + ljet2p H-P LaserJet IId/IIp/III* with TIFF compression
+# + ljet3 H-P LaserJet III* with Delta Row compression
+# + ljet4 H-P LaserJet 4 (defaults to 600 dpi)
+# + ljetplus H-P LaserJet Plus
+# * m8510 C.Itoh M8510 printer
+# * necp6 NEC P6/P6+/P60 printers at 360 x 360 DPI resolution
+# * nwp533 Sony Microsystems NWP533 laser printer [Sony only]
+# * oki182 Okidata MicroLine 182
+# paintjet H-P PaintJet color printer
+# * pj alternate PaintJet XL driver
+# * pjxl H-P PaintJet XL color printer
+# * pjxl300 H-P PaintJet XL300 color printer
+# * r4081 Ricoh 4081 laser printer
+# * sparc SPARCprinter
+# * t4693d2 Tektronix 4693d color printer, 2 bits per R/G/B component
+# * t4693d4 Tektronix 4693d color printer, 4 bits per R/G/B component
+# * t4693d8 Tektronix 4693d color printer, 8 bits per R/G/B component
+# * tek4696 Tektronix 4695/4696 inkjet plotter
+# * trufax TruFax facsimile driver [Unix only]
+# File formats and others:
+# bit A plain "bit bucket" device
+# bmpmono Monochrome MS Windows .BMP file format
+# bmp16 4-bit (EGA/VGA) .BMP file format
+# bmp256 8-bit (256-color) .BMP file format
+# bmp16m 24-bit .BMP file format
+# gifmono Monochrome GIF file format
+# gif8 8-bit color GIF file format
+# pcxmono Monochrome PCX file format
+# pcxgray 8-bit gray scale PCX file format
+# pcx16 Older color PCX file format (EGA/VGA, 16-color)
+# pcx256 Newer color PCX file format (256-color)
+# pbm Portable Bitmap (plain format)
+# pbmraw Portable Bitmap (raw format)
+# pgm Portable Graymap (plain format)
+# pgmraw Portable Graymap (raw format)
+# ppm Portable Pixmap (plain format)
+# ppmraw Portable Pixmap (raw format)
+# * tiffg3 TIFF/F (G3 fax)
+
+# User-contributed drivers marked with * require hardware or software
+# that is not available to Aladdin Enterprises. Please contact the
+# original contributors, not Aladdin Enterprises, if you have questions.
+# Contact information appears in the driver entry below.
+#
+# Drivers marked with a + are maintained by Aladdin Enterprises with
+# the assistance of users, since Aladdin Enterprises doesn't have access to
+# the hardware for these either.
+
+# If you add drivers, it would be nice if you kept each list
+# in alphabetical order.
+
+# Each platform-specific makefile contains a line of the form
+# DEVICE_DEVS=<dev1>.dev ... <devn>.dev
+# where dev1 ... devn are the devices to be included in the build.
+# You may edit this line to select any desired set of devices.
+# dev1 will be used as the default device (unless overridden from
+# the command line with -sDEVICE=xxx, of course.) If you can't fit all the
+# devices on a single line, you may add lines defining
+# DEVICE_DEVS2=<dev21>.dev ... <dev2n>.dev
+# DEVICE_DEVS3=<dev31>.dev ... <dev3n>.dev
+# etc. up to DEVICE_DEVS9.
+# Don't use continuation lines, since this may break the MS-DOS command
+# processor.
+
+# ---------------------------- End of catalog ---------------------------- #
+
+# If you want to add a new device driver, the examples below should be
+# enough of a guide to the correct form for the makefile rules.
+
+# All device drivers depend on the following:
+GDEV=$(AK) echogs$(XE) $(gserrors_h) $(gx_h) $(gxdevice_h)
+
+# Define the header files for device drivers. Every header file used by
+# more than one device driver must be listed here.
+gdevpccm_h=gdevpccm.h
+gdevpcfb_h=gdevpcfb.h $(dos__h)
+gdevpcl_h=gdevpcl.h
+gdevsvga_h=gdevsvga.h
+gdevx_h=gdevx.h
+
+###### ------------------- MS-DOS display devices ------------------- ######
+
+# There are really only three drivers: an EGA/VGA driver (4 bit-planes,
+# plane-addressed), a SuperVGA driver (8 bit-planes, byte addressed),
+# and a special driver for the S3 chip.
+# To make A4 paper the default, change the compilation line from
+# $(CCD) ...
+# to
+# $(CCD) -DA4
+
+### ----------------------- EGA and VGA displays ----------------------- ###
+
+gdevegaa.$(OBJ): gdevegaa.asm
+
+ETEST=ega.$(OBJ) $(ega_) gdevpcfb.$(OBJ) gdevegaa.$(OBJ)
+ega.exe: $(ETEST) libc$(MM).tr
+ $(COMPDIR)\tlink $(LCT) $(LO) $(LIBDIR)\c0$(MM) @ega.tr @libc$(MM).tr
+
+ega.$(OBJ): ega.c $(GDEV)
+ $(CCC) -v ega.c
+
+# The shared MS-DOS makefile defines PCFBASM as either gdevegaa.$(OBJ)
+# or an empty string.
+
+# NOTE: for direct frame buffer addressing under SCO Unix or Xenix,
+# change gdevevga to gdevsco in the following line.
+EGAVGA=gdevevga.$(OBJ) gdevpcfb.$(OBJ) $(PCFBASM)
+
+gdevevga.$(OBJ): gdevevga.c $(GDEV) $(gdevpcfb_h)
+ $(CCD) gdevevga.c
+
+gdevsco.$(OBJ): gdevsco.c $(GDEV) $(gdevpcfb_h)
+ $(CCD) gdevsco.c
+
+# Common code for MS-DOS and SCO.
+gdevpcfb.$(OBJ): gdevpcfb.c $(GDEV) $(MAKEFILE) $(gdevpcfb_h)
+ $(CCD) -DUSE_ASM=0$(USE_ASM) gdevpcfb.c
+
+# The EGA/VGA family includes: EGA, VGA, and
+# the ATI Wonder, Tseng ET3000/4000, and Trident SuperVGA in 16-color mode.
+
+ega.dev: $(EGAVGA) gssetdev
+ $(SHP)gssetdev ega $(EGAVGA)
+
+vga.dev: $(EGAVGA) gssetdev
+ $(SHP)gssetdev vga $(EGAVGA)
+
+atiw16.dev: $(EGAVGA) gssetdev
+ $(SHP)gssetdev atiw16 $(EGAVGA)
+
+tseng16.dev: $(EGAVGA) gssetdev
+ $(SHP)gssetdev tseng16 $(EGAVGA)
+
+tvga16.dev: $(EGAVGA) gssetdev
+ $(SHP)gssetdev tvga16 $(EGAVGA)
+
+### ------------------------- SuperVGA displays ------------------------ ###
+
+SVGA=gdevsvga.$(OBJ) $(PCFBASM)
+
+gdevsvga.$(OBJ): gdevsvga.c $(GDEV) $(MAKEFILE) \
+ $(gdevpcfb_h) $(gdevsvga_h)
+ $(CCD) -DUSE_ASM=0$(USE_ASM) gdevsvga.c
+
+# The SuperVGA family includes: ATI Wonder, S3, Trident, Tseng ET3000/4000,
+# and VESA.
+
+atiw.dev: $(SVGA) gssetdev
+ $(SHP)gssetdev atiw $(SVGA)
+
+tseng.dev: $(SVGA) gssetdev
+ $(SHP)gssetdev tseng $(SVGA)
+
+tvga.dev: $(SVGA) gssetdev
+ $(SHP)gssetdev tvga $(SVGA)
+
+vesa.dev: $(SVGA) gssetdev
+ $(SHP)gssetdev vesa $(SVGA)
+
+# The S3 driver doesn't share much code with the others.
+
+s3vga_=$(SVGA) gdevs3ga.$(OBJ)
+s3vga.dev: $(s3vga_) gssetdev
+ $(SHP)gssetdev s3vga $(s3vga_)
+
+gdevs3ga.$(OBJ): gdevs3ga.c $(GDEV) $(MAKEFILE) $(gdevpcfb_h) $(gdevsvga_h)
+ $(CCD) gdevs3ga.c
+
+### ------------ The BGI (Borland Graphics Interface) device ----------- ###
+
+cgaf.$(OBJ): $(BGIDIR)\cga.bgi
+ $(BGIDIR)\bgiobj /F $(BGIDIR)\cga
+
+egavgaf.$(OBJ): $(BGIDIR)\egavga.bgi
+ $(BGIDIR)\bgiobj /F $(BGIDIR)\egavga
+
+# Include egavgaf.$(OBJ) for debugging only.
+bgi_=gdevbgi.$(OBJ) cgaf.$(OBJ)
+bgi.dev: $(bgi_) gssetdev gsaddmod
+ $(SHP)gssetdev bgi $(bgi_)
+ $(SHP)gsaddmod bgi -lib $(LIBDIR)\graphics
+
+gdevbgi.$(OBJ): gdevbgi.c $(GDEV) $(MAKEFILE) $(gxxfont_h)
+ $(CCC) -DBGI_LIB=$(QQ)$(BGIDIRSTR)$(QQ) gdevbgi.c
+
+### ------------------- The Hercules Graphics display ------------------- ###
+
+herc_=gdevherc.$(OBJ)
+herc.dev: $(herc_) gssetdev
+ $(SHP)gssetdev herc $(herc_)
+
+gdevherc.$(OBJ): gdevherc.c $(GDEV)
+ $(CCC) gdevherc.c
+
+###### ------------------- The Private Eye display ------------------- ######
+### Note: this driver was contributed by a user: ###
+### please contact narf@media-lab.media.mit.edu if you have questions. ###
+
+pe_=gdevpe.$(OBJ)
+pe.dev: $(pe_) gssetdev
+ $(SHP)gssetdev pe $(pe_)
+
+gdevpe.$(OBJ): gdevpe.c $(GDEV)
+
+###### ----------------- The MS-Windows 3.n display ------------------ ######
+
+gdevmswn_h=gdevmswn.h $(GDEV) gp_mswin.h
+
+# Choose one of gdevwddb or gdevwdib here.
+mswin_=gdevmswn.$(OBJ) gdevmsxf.$(OBJ) gdevwdib.$(OBJ) \
+ gdevemap.$(OBJ) gdevpccm.$(OBJ)
+mswin.dev: $(mswin_) gssetdev
+ $(SHP)gssetdev mswin $(mswin_)
+
+gdevmswn.$(OBJ): gdevmswn.c $(gdevmswn_h) $(gp_h) $(gpcheck_h) \
+ $(gsprops_h) $(gdevpccm_h)
+
+gdevmsxf.$(OBJ): gdevmsxf.c $(ctype__h) $(math__h) $(memory__h) \
+ $(gdevmswn_h) $(gsutil_h) $(gxxfont_h)
+
+# An implementation using a device-dependent bitmap.
+gdevwddb.$(OBJ): gdevwddb.c $(gdevmswn_h)
+
+# An implementation using a DIB filled by an image device.
+gdevwdib.$(OBJ): gdevwdib.c $(dos__h) $(gdevmswn_h)
+
+###### ----------------- The MS-Windows 3.n printer ------------------ ######
+
+mswinprn_=gdevwprn.$(OBJ) gdevmsxf.$(OBJ)
+mswinprn.dev: $(mswinprn_) gssetdev
+ $(SHP)gssetdev mswinprn $(mswinprn_)
+
+gdevwprn.$(OBJ): gdevwprn.c $(gdevmswn_h) $(gp_h) $(gpcheck_h) \
+ $(gsprops_h) $(gdevpccm_h)
+
+### ---------------- Amiga display/printer/file devices ---------------- ###
+### Note: this driver was contributed by a user: please contact ###
+### Olaf Barthel (olsen@sourcery.han.de) if you have questions. ###
+### He would also like to hear from anyone using the driver. ###
+### Please consult the source code for additional documentation. ###
+
+amiga_=gdevamiga.$(OBJ)
+
+amiga.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga $(amiga_)
+
+amiga_low.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_low $(amiga_)
+
+amiga_high.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_high $(amiga_)
+
+amiga_super.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_super $(amiga_)
+
+amiga_a2024.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_a2024 $(amiga_)
+
+amiga_picassoii.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_picassoii $(amiga_)
+
+amiga_custom.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_custom $(amiga_)
+
+amiga_printer.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_printer $(amiga_)
+
+amiga_ilbm.dev: $(amiga_) gssetdev
+ $(SHP)gssetdev amiga_ilbm $(amiga_)
+
+gdevamiga.$(OBJ): gdevamiga.c $(GDEV) $(arch_h)
+
+###### ----------- The AT&T 3b1 Unixpc monochrome display ------------ ######
+### Note: this driver was contributed by a user: please contact ###
+### Andy Fyfe (andy@cs.caltech.edu) if you have questions. ###
+
+att3b1_=gdev3b1.$(OBJ)
+att3b1.dev: $(att3b1_) gssetdev
+ $(SHP)gssetdev att3b1 $(att3b1_)
+
+gdev3b1.$(OBJ): gdev3b1.c
+
+###### --------------- Memory-buffered printer devices --------------- ######
+
+# The dependency list for printers includes devs.mak because
+# you can specify -DA4 to make A4 paper the default.
+# See below under, e.g., gdevdjet.c.
+PDEVH=$(GDEV) $(gdevprn_h) devs.mak
+
+gdevprn.$(OBJ): gdevprn.c $(PDEVH) $(gp_h) $(gsprops_h)
+
+### ------------------- The Apple DMP printer device ------------------- ###
+
+appledmp_=gdevadmp.$(OBJ) gdevprn.$(OBJ)
+
+appledmp.dev: $(appledmp_) gssetdev
+ $(SHP)gssetdev appledmp $(appledmp_)
+
+### ------------ The Canon BubbleJet BJ10e and BJ200 devices ------------ ###
+
+bj10e_=gdevbj10.$(OBJ) gdevprn.$(OBJ)
+
+bj10e.dev: $(bj10e_) gssetdev
+ $(SHP)gssetdev bj10e $(bj10e_)
+
+bj200.dev: $(bj10e_) gssetdev
+ $(SHP)gssetdev bj200 $(bj10e_)
+
+gdevbj10.$(OBJ): gdevbj10.c $(PDEVH)
+
+### -------------------------- The DigiFAX device ----------------------- ###
+### This driver outputs images in a format suitable for use with ###
+### DigiBoard, Inc.'s DigiFAX software. Use -sDEVICE=dfaxhigh for ###
+### high resolution output, -sDEVICE=dfaxlow for normal output. ###
+### Note: this driver was contributed by a user: please contact ###
+### Rick Richardson (rick@digibd.com) if you have questions. ###
+
+digifax_=gdevdfax.$(OBJ) gdevprn.$(OBJ)
+dfaxhigh.dev: $(digifax_) gssetdev
+ $(SHP)gssetdev dfaxhigh $(digifax_)
+
+dfaxlow.dev: $(digifax_) gssetdev
+ $(SHP)gssetdev dfaxlow $(digifax_)
+
+gdevdfax.$(OBJ): gdevdfax.c $(GDEV) $(gdevprn_h) gdevdfg3.h
+
+### ----------- The H-P DeskJet and LaserJet printer devices ----------- ###
+
+### These are essentially the same device.
+### You can make A4 paper the default: see below.
+### NOTE: printing at full resolution (300 DPI) requires a printer
+### with at least 1.5 Mb of memory. 150 DPI only requires .5 Mb.
+
+HPPCL=gdevprn.$(OBJ) gdevpcl.$(OBJ)
+HPMONO=gdevdjet.$(OBJ) $(HPPCL)
+
+gdevpcl.$(OBJ): gdevpcl.c $(PDEVH) $(gdevpcl_h)
+
+# To make A4 paper the default, change the second line below this to
+# $(CCC) -DA4 gdevdjet.c
+gdevdjet.$(OBJ): gdevdjet.c $(PDEVH) $(gdevpcl_h)
+ $(CCC) gdevdjet.c
+
+deskjet.dev: $(HPMONO) gssetdev
+ $(SHP)gssetdev deskjet $(HPMONO)
+
+djet500.dev: $(HPMONO) gssetdev
+ $(SHP)gssetdev djet500 $(HPMONO)
+
+laserjet.dev: $(HPMONO) gssetdev
+ $(SHP)gssetdev laserjet $(HPMONO)
+
+ljetplus.dev: $(HPMONO) gssetdev
+ $(SHP)gssetdev ljetplus $(HPMONO)
+
+### Selecting ljet2p provides TIFF (mode 2) compression on LaserJet III,
+### IIIp, IIId, IIIsi, IId, and IIp.
+
+ljet2p.dev: $(HPMONO) gssetdev
+ $(SHP)gssetdev ljet2p $(HPMONO)
+
+### Selecting ljet3 provides Delta Row (mode 3) compression on LaserJet III,
+### IIIp, IIId, IIIsi.
+
+ljet3.dev: $(HPMONO) gssetdev
+ $(SHP)gssetdev ljet3 $(HPMONO)
+
+### Selecting ljet4 also provides Delta Row compression on LaserJet IV series.
+
+ljet4.dev: $(HPMONO) gssetdev
+ $(SHP)gssetdev ljet4 $(HPMONO)
+
+###- The H-P DeskJet 500C/550C and PaintJet family color printer devices -###
+### Note: there are two different 500C drivers, both contributed by users.###
+### If you have questions about the djet500c driver, ###
+### please contact AKayser@et.tudelft.nl. ###
+### If you have questions about the cdj* drivers, ###
+### please contact g.cameron@biomed.abdn.ac.uk. ###
+
+cdeskjet_=gdevcdj.$(OBJ) $(HPPCL)
+
+cdeskjet.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev cdeskjet $(cdeskjet_)
+
+cdjcolor.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev cdjcolor $(cdeskjet_)
+
+cdjmono.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev cdjmono $(cdeskjet_)
+
+cdj500.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev cdj500 $(cdeskjet_)
+
+cdj550.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev cdj550 $(cdeskjet_)
+
+declj250.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev declj250 $(cdeskjet_)
+
+pj.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev pj $(cdeskjet_)
+
+pjxl.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev pjxl $(cdeskjet_)
+
+pjxl300.dev: $(cdeskjet_) gssetdev
+ $(SHP)gssetdev pjxl300 $(cdeskjet_)
+
+# NB: you can also customise the build if required, using -DA4 (for A4 paper)
+# and -DBitsPerPixel=<number> if you wish the default to be other than 24
+# for the generic drivers (cdj500, cdj550, pjxl300, pjtest, pjxltest).
+# E.g,. to make A4 paper the default, change the second line below this to
+# $(CCC) -DA4 gdevdjet.c
+gdevcdj.$(OBJ): gdevcdj.c $(PDEVH) $(gdevpcl_h)
+ $(CCC) gdevcdj.c
+
+djet500c_=gdevdjtc.$(OBJ) $(HPPCL)
+djet500c.dev: $(djet500c_) gssetdev
+ $(SHP)gssetdev djet500c $(djet500c_)
+
+gdevdjtc.$(OBJ): gdevdjtc.c $(PDEVH) $(gdevpcl_h)
+
+### ----------------- The generic Epson printer device ----------------- ###
+
+epson_=gdevepsn.$(OBJ) gdevprn.$(OBJ)
+
+epson.dev: $(epson_) gssetdev
+ $(SHP)gssetdev epson $(epson_)
+
+eps9high.dev: $(epson_) gssetdev
+ $(SHP)gssetdev eps9high $(epson_)
+
+gdevepsn.$(OBJ): gdevepsn.c $(PDEVH)
+
+### ----------------- The IBM Proprinter printer device ---------------- ###
+
+ibmpro.dev: $(epson_) gssetdev
+ $(SHP)gssetdev ibmpro $(epson_)
+
+### -------------- The Epson LQ-2550 color printer device -------------- ###
+### Note: this driver was contributed by users: please contact ###
+### Dave St. Clair (dave@exlog.com) if you have questions. ###
+
+epsonc_=gdevepsc.$(OBJ) gdevprn.$(OBJ)
+epsonc.dev: $(epsonc_) gssetdev
+ $(SHP)gssetdev epsonc $(epsonc_)
+
+gdevepsc.$(OBJ): gdevepsc.c $(PDEVH)
+
+### -------------- The Epson ESC/P 2 language printer device ----------- ###
+### Note: this driver was contributed by a user: if you have questions, ###
+### please contact Richard Brown (rab@tauon.ph.unimelb.edu.au). ###
+
+escp2_=gdevescp.$(OBJ) gdevprn.$(OBJ)
+escp2.dev: $(escp2_) gssetdev
+ $(SHP)gssetdev escp2 $(escp2_)
+
+gdevescp.$(OBJ): gdevescp.c $(PDEVH)
+
+### ------------ The H-P PaintJet color printer device ----------------- ###
+### Note: this driver also supports the DEC LJ250 color printer, which ###
+### has a PaintJet-compatible mode, and the PaintJet XL. ###
+### If you have questions about the XL, please contact Rob Reiss ###
+### (rob@moray.berkeley.edu). ###
+
+PJET=gdevpjet.$(OBJ) $(HPPCL)
+
+gdevpjet.$(OBJ): gdevpjet.c $(PDEVH) $(gdevpcl_h)
+
+lj250.dev: $(PJET) gssetdev
+ $(SHP)gssetdev lj250 $(PJET)
+
+paintjet.dev: $(PJET) gssetdev
+ $(SHP)gssetdev paintjet $(PJET)
+
+pjetxl.dev: $(PJET) gssetdev
+ $(SHP)gssetdev pjetxl $(PJET)
+
+### ------- The IBM 3852 JetPrinter color inkjet printer device -------- ###
+### Note: this driver was contributed by users: please contact ###
+### Kevin Gift (kgift@draper.com) if you have questions. ###
+### Note that the paper size that can be addressed by the graphics mode ###
+### used in this driver is fixed at 7-1/2 inches wide (the printable ###
+### width of the jetprinter itself.) ###
+
+jetp3852_=gdev3852.$(OBJ) gdevprn.$(OBJ)
+jetp3852.dev: $(jetp3852_) gssetdev
+ $(SHP)gssetdev jetp3852 $(jetp3852_)
+
+gdevjetp.$(OBJ): gdevjetp.c $(PDEVH) $(gdevpcl_h)
+
+### ----------------- The Canon LBP-8II printer device ----------------- ###
+### Note: this driver was contributed by users: please contact ###
+### Tom Quinn (trq@prg.oxford.ac.uk) if you have questions. ###
+### Note that the standard paper size for this driver is the European ###
+### A4 size, not the American 8.5" x 11" size. ###
+
+lbp8_=gdevlbp8.$(OBJ) gdevprn.$(OBJ)
+lbp8.dev: $(lbp8_) gssetdev
+ $(SHP)gssetdev lbp8 $(lbp8_)
+
+gdevlbp8.$(OBJ): gdevlbp8.c $(PDEVH)
+
+### -------------- The DEC LN03/LA50/LA75 printer devices -------------- ###
+### Note: this driver was contributed by users: please contact ###
+### Ulrich Mueller (ulm@vsnhd1.cern.ch) if you have questions. ###
+### For questions about LA50 and LA75: please contact ###
+### Ian MacPhedran (macphed@dvinci.USask.CA). ###
+### For the LN03, you can make A4 paper the default: see below. ###
+
+ln03_=gdevln03.$(OBJ) gdevprn.$(OBJ)
+ln03.dev: $(ln03_) gssetdev
+ $(SHP)gssetdev ln03 $(ln03_)
+
+la50.dev: $(ln03_) gssetdev
+ $(SHP)gssetdev la50 $(ln03_)
+
+la75.dev: $(ln03_) gssetdev
+ $(SHP)gssetdev la75 $(ln03_)
+
+# To make A4 paper the default, change the second line below this to
+# $(CCC) -DA4 gdevln03.c
+gdevln03.$(OBJ): gdevln03.c $(PDEVH)
+ $(CCC) gdevln03.c
+
+### -------------- The C.Itoh M8510 printer device --------------------- ###
+### Note: this driver was contributed by a user: please contact Bob ###
+### Smith <bob@snuffy.penfield.ny.us> if you have questions. ###
+
+m8510_=gdev8510.$(OBJ) gdevprn.$(OBJ)
+m8510.dev: $(m8510_) gssetdev
+ $(SHP)gssetdev m8510 $(m8510_)
+
+gdev8510.$(OBJ): gdev8510.c $(PDEVH)
+
+### --------------------- The NEC P6 family devices -------------------- ###
+
+necp6_=gdevnp6.$(OBJ) gdevprn.$(OBJ)
+necp6.dev: $(necp6_) gssetdev
+ $(SHP)gssetdev necp6 $(necp6_)
+
+gdevnp6.$(OBJ): gdevnp6.c $(PDEVH)
+
+### ----------------- The Okidata MicroLine 182 device ----------------- ###
+### Note: this driver was contributed by a user: please contact ###
+### Maarten Koning (smeg@bnr.ca) if you have questions. ###
+
+oki182_=gdevo182.$(OBJ) gdevprn.$(OBJ)
+oki182.dev: $(oki182_) gssetdev
+ $(SHP)gssetdev oki182 $(oki182_)
+
+gdevo182.$(OBJ): gdevo182.c $(PDEVH)
+
+### ------------- The Ricoh 4081 laser printer device ------------------ ###
+### Note: this driver was contributed by users: ###
+### please contact kdw@oasis.icl.co.uk if you have questions. ###
+
+r4081_=gdev4081.$(OBJ) gdevprn.$(OBJ)
+r4081.dev: $(r4081_) gssetdev
+ $(SHP)gssetdev r4081 $(r4081_)
+
+gdev4081.$(OBJ): gdev4081.c $(PDEVH)
+
+###### ------------------------ Sony devices ------------------------ ######
+### Note: these drivers were contributed by users: please contact ###
+### Mike Smolenski (mike@intertech.com) if you have questions. ###
+
+### ------------------- Sony NeWS frame buffer device ------------------ ###
+
+sonyfb_=gdevsnfb.$(OBJ) gdevprn.$(OBJ)
+sonyfb.dev: $(sonyfb_) gssetdev
+ $(SHP)gssetdev sonyfb $(sonyfb_)
+
+gdevsnfb.$(OBJ): gdevsnfb.c $(PDEVH)
+
+### -------------------- Sony NWP533 printer device -------------------- ###
+### Note: this driver was contributed by a user: please contact Tero ###
+### Kivinen (kivinen@joker.cs.hut.fi) if you have questions. ###
+
+nwp533_=gdevn533.$(OBJ) gdevprn.$(OBJ)
+nwp533.dev: $(nwp533_) gssetdev
+ $(SHP)gssetdev nwp533 $(nwp533_)
+
+gdevn533.$(OBJ): gdevn533.c $(PDEVH)
+
+### ------------------------- The SPARCprinter ------------------------- ###
+### Note: this driver was contributed by users: please contact Martin ###
+### Schulte (schulte@thp.uni-koeln.de) if you have questions. ###
+### He would also like to hear from anyone using the driver. ###
+### Please consult the source code for additional documentation. ###
+
+sparc_=gdevsppr.$(OBJ) gdevprn.$(OBJ)
+sparc.dev: $(sparc_) gssetdev
+ $(SHP)gssetdev sparc $(sparc_)
+
+gdevsppr.$(OBJ): gdevsppr.c $(PDEVH)
+
+###### --------------------- The SunView device --------------------- ######
+### Note: this driver is maintained by a user: if you have questions, ###
+### please contact Andreas Stolcke (stolcke@icsi.berkeley.edu). ###
+
+sunview_=gdevsun.$(OBJ)
+sunview.dev: $(sunview_) gssetdev gsaddmod
+ $(SHP)gssetdev sunview $(sunview_)
+ $(SHP)gsaddmod sunview -lib suntool sunwindow pixrect
+
+gdevsun.$(OBJ): gdevsun.c $(GDEV) $(arch_h)
+
+### ----------------- Tektronix 4396d color printer -------------------- ###
+### Note: this driver was contributed by a user: please contact ###
+### Karl Hakimian (hakimian@haney.eecs.wsu.edu) ###
+### if you have questions. ###
+
+t4693d_=gdev4693.$(OBJ) gdevprn.$(OBJ)
+t4693d2.dev: $(t4693d_) gssetdev
+ $(SHP)gssetdev t4693d2 $(t4693d_)
+
+t4693d4.dev: $(t4693d_) gssetdev
+ $(SHP)gssetdev t4693d4 $(t4693d_)
+
+t4693d8.dev: $(t4693d_) gssetdev
+ $(SHP)gssetdev t4693d8 $(t4693d_)
+
+gdev4693.$(OBJ): gdev4693.c $(GDEV)
+
+### -------------------- Tektronix ink-jet printers -------------------- ###
+### Note: this driver was contributed by a user: please contact ###
+### Karsten Spang (spang@nbivax.nbi.dk) if you have questions. ###
+
+tek4696_=gdevtknk.$(OBJ) gdevprn.$(OBJ)
+tek4696.dev: $(tek4696_) gssetdev
+ $(SHP)gssetdev tek4696 $(tek4696_)
+
+gdevtknk.$(OBJ): gdevtknk.c $(PDEVH)
+
+### ----------------- The TruFax facsimile device ---------------------- ###
+### Note: this driver was contributed by users: please contact ###
+### Neil Ostroff (nao@maestro.bellcore.com) if you have questions. ###
+### Note that the driver requires a file encode_l.o supplied by the ###
+### makers of the TruFax product. ###
+
+trufax_=gdevtrfx.$(OBJ) gdevprn.$(OBJ) encode_l.$(OBJ)
+trufax.dev: $(trufax_) gssetdev
+ $(SHP)gssetdev trufax $(trufax_)
+
+gdevtrfx.$(OBJ): gdevtrfx.c $(GDEV)
+
+###### ----------------------- The X11 device ----------------------- ######
+
+# Aladdin Enterprises does not support Ghostview. For more information
+# about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu).
+
+x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ)
+x11.dev: $(x11_) gssetdev gsaddmod
+ $(SHP)gssetdev x11 $(x11_)
+ $(SHP)gsaddmod x11 -lib Xt X11 Xext
+
+# See the main makefile for the definition of XINCLUDE.
+GDEVX=$(GDEV) x_.h gdevx.h $(MAKEFILE)
+gdevx.$(OBJ): gdevx.c $(GDEVX) $(gsprops_h) $(gsutil_h)
+ $(CCC) $(XINCLUDE) gdevx.c
+
+gdevxini.$(OBJ): gdevxini.c $(GDEVX) $(ctype__h)
+ $(CCC) $(XINCLUDE) gdevxini.c
+
+gdevxxf.$(OBJ): gdevxxf.c $(GDEVX) $(gsutil_h) $(gxxfont_h)
+ $(CCC) $(XINCLUDE) gdevxxf.c
+
+### ---------------------- The bit bucket device ----------------------- ###
+
+bit_=gdevbit.$(OBJ) gdevprn.$(OBJ)
+bit.dev: $(bit_) gssetdev
+ $(SHP)gssetdev bit $(bit_)
+
+gdevbit.$(OBJ): gdevbit.c $(PDEVH)
+
+###### ----------------------- PC file formats ---------------------- ######
+
+gdevpccm.$(OBJ): gdevpccm.c $(AK) \
+ $(gs_h) $(gsmatrix_h) $(gxdevice_h) $(gdevpccm_h)
+
+### ------------------------- .BMP file formats ------------------------- ###
+
+bmp_=gdevbmp.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
+
+gdevbmp.$(OBJ): gdevbmp.c $(PDEVH) $(gdevpccm_h)
+
+bmpmono.dev: $(bmp_) gssetdev
+ $(SHP)gssetdev bmpmono $(bmp_)
+
+bmp16.dev: $(bmp_) gssetdev
+ $(SHP)gssetdev bmp16 $(bmp_)
+
+bmp256.dev: $(bmp_) gssetdev
+ $(SHP)gssetdev bmp256 $(bmp_)
+
+bmp16m.dev: $(bmp_) gssetdev
+ $(SHP)gssetdev bmp16m $(bmp_)
+
+### ------------------------- GIF file formats ------------------------- ###
+
+GIF=gdevgif.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
+
+gdevgif.$(OBJ): gdevgif.c $(PDEVH) $(gdevpccm_h)
+
+gifmono.dev: $(GIF) gssetdev
+ $(SHP)gssetdev gifmono $(GIF)
+
+gif8.dev: $(GIF) gssetdev
+ $(SHP)gssetdev gif8 $(GIF)
+
+### ------------------------- PCX file formats ------------------------- ###
+
+pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
+
+gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) $(gxlum_h)
+
+pcxmono.dev: $(pcx_) gssetdev
+ $(SHP)gssetdev pcxmono $(pcx_)
+
+pcxgray.dev: $(pcx_) gssetdev
+ $(SHP)gssetdev pcxgray $(pcx_)
+
+pcx16.dev: $(pcx_) gssetdev
+ $(SHP)gssetdev pcx16 $(pcx_)
+
+pcx256.dev: $(pcx_) gssetdev
+ $(SHP)gssetdev pcx256 $(pcx_)
+
+###### ------------------- Portable Bitmap devices ------------------ ######
+### For more information, see the pbm(5), pgm(5), and ppm(5) man pages. ###
+
+pxm_=gdevpbm.$(OBJ) gdevprn.$(OBJ)
+
+gdevpbm.$(OBJ): gdevpbm.c $(PDEVH) $(gxlum_h)
+
+### Portable Bitmap (PBM, plain or raw format, magic numbers "P1" or "P4")
+
+pbm.dev: $(pxm_) gssetdev
+ $(SHP)gssetdev pbm $(pxm_)
+
+pbmraw.dev: $(pxm_) gssetdev
+ $(SHP)gssetdev pbmraw $(pxm_)
+
+### Portable Graymap (PGM, plain or raw format, magic numbers "P2" or "P5")
+
+pgm.dev: $(pxm_) gssetdev
+ $(SHP)gssetdev pgm $(pxm_)
+
+pgmraw.dev: $(pxm_) gssetdev
+ $(SHP)gssetdev pgmraw $(pxm_)
+
+### Portable Pixmap (PPM, plain or raw format, magic numbers "P3" or "P6")
+
+ppm.dev: $(pxm_) gssetdev
+ $(SHP)gssetdev ppm $(pxm_)
+
+ppmraw.dev: $(pxm_) gssetdev
+ $(SHP)gssetdev ppmraw $(pxm_)
+
+### -------------------------- TIFF/F device ---------------------------- ###
+### This driver outputs images in a TIFF format ###
+### Use -sDEVICE=tiffg3 and ###
+### -r204x98 for low resolution output, or ###
+### -r204x196 for high resolution output ###
+### Note also that 3 page sizes are understood: letter, A4, and B4 ###
+### Note: this driver was contributed by a user: please contact ###
+### Sam Leffler (sam@sgi.com) if you have questions. ###
+
+tiffg3_=gdevtiff.$(OBJ) gdevprn.$(OBJ)
+tiffg3.dev: $(tiffg3_) gssetdev
+ $(SHP)gssetdev tiffg3 $(tiffg3_)
+gdevtiff.$(OBJ): gdevtiff.c $(GDEV) $(gdevprn_h) gdevdfg3.h gdevtiff.h
+# Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved.
+#
+# 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.
+
+# Partial makefile for Ghostscript, common to all Unix configurations.
+
+# This is the last part of the makefile for Unix configurations.
+# Since Unix make doesn't have an 'include' facility, we concatenate
+# the various parts of the makefile together by brute force (in tar_cat).
+
+# The following prevents GNU make from constructing argument lists that
+# include all environment variables, which can easily be longer than
+# brain-damaged system V allows.
+
+.NOEXPORT:
+
+# -------------------------------- Library -------------------------------- #
+
+## The Commodore Amiga
+
+amiga__=gp_nofb.$(OBJ) gp_amiga.$(OBJ) gdevpipe.$(OBJ)
+amiga_.dev: $(amiga__) gssetmod gsaddmod
+ $(SHP)gssetmod amiga_ $(amiga__)
+ $(SHP)gsaddmod amiga_ -fdev pipe
+
+gp_amiga.$(OBJ): gp_amiga.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
+
+## The Unix platforms
+
+# We have to include a test for the existence of sys/time.h,
+# because some System V platforms don't have it.
+
+# All reasonable Unix platforms.
+unix__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gdevpipe.$(OBJ)
+unix_.dev: $(unix__) gssetmod gsaddmod
+ $(SHP)gssetmod unix_ $(unix__)
+ $(SHP)gsaddmod unix_ -fdev pipe
+
+gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
+ $(gsutil_h) $(stat__h) $(time__h)
+ if ( test -f /ade/include/sys/time.h ) then $(CCC) gp_unix.c;\
+ else $(CCC) -DNOSYSTIME gp_unix.c; fi
+
+gdevpipe.$(OBJ): gdevpipe.c $(AK) $(stdio__h) $(gstypes_h) \
+ $(filedev_h) $(stream_h)
+
+# Brain-damaged System V platforms.
+sysv__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gp_sysv.$(OBJ)
+sysv_.dev: $(sysv__) gssetmod
+ $(SHP)gssetmod sysv_ $(sysv__)
+
+gp_sysv.$(OBJ): gp_sysv.c $(time__h) $(AK)
+ if ( test -f /ade/include/sys/time.h ) then $(CCC) gp_sysv.c;\
+ else $(CCC) -DNOSYSTIME gp_sysv.c; fi
+
+# -------------------------- Auxiliary programs --------------------------- #
+
+ansi2knr$(XE): ansi2knr.c $(stdio__h) $(string__h) $(malloc__h)
+ $(CC) -o ansi2knr$(XE) $(CFLAGS) ansi2knr.c
+
+echogs$(XE): echogs.c
+ $(CC) -o echogs$(XE) $(CFLAGS) echogs.c
+
+# On the RS/6000 (at least), compiling genarch.c with gcc with -O
+# produces a buggy executable.
+genarch$(XE): genarch.c
+ $(CC) -o genarch$(XE) genarch.c
+
+genconf$(XE): genconf.c
+ $(CC) -o genconf$(XE) genconf.c
+
+# ----------------------------- Main program ------------------------------ #
+
+BEGINFILES=
+CCBEGIN=$(CCC) *.c
+
+# Interpreter main program
+
+GSAMIGA=gs.$(OBJ) gsmain.$(OBJ) $(INT) $(LIBGS)
+
+# The second call on echogs writes a \. This is the only
+# way to do it that works with all flavors of shell!
+$(GS)$(XE): $(GSAMIGA) ld.tr echogs $(ALL_DEVS)
+ ./echogs -n - $(CC) $(LDFLAGS) $(XLIBDIRS) -o gs $(GSAMIGA) >_temp_
+ ./echogs -x 205c >>_temp_
+ cat ld.tr >>_temp_
+ ./echogs - $(EXTRALIBS) -lm >>_temp_
+ $(SH) <_temp_
+
+# Installation
+
+TAGS:
+ etags -t *.c *.h
+
+docdir=$(gsdatadir)/doc
+exdir=$(gsdatadir)/examples
+
+install: $(GS)
+ if [ -d $(bindir) ]; then true; else mkdir $(bindir); fi
+ if [ -d $(datadir) ]; then true; else mkdir $(datadir); fi
+ if [ -d $(gsdatadir) ]; then true; else mkdir $(gsdatadir); fi
+ if [ -d $(gsdatadir)/fonts ]; then true; else mkdir $(gsdatadir)/fonts; fi
+ if [ -d $(docdir) ]; then true; else mkdir $(docdir); fi
+ if [ -d $(exdir) ]; then true; else mkdir $(exdir); fi
+ for f in $(GS) gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done
+ for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_dbt_e.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done
+ for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done
+ for f in chess.ps cheq.ps colorcir.ps golfer.ps escher.ps snowflak.ps tiger.ps ; do $(INSTALL_DATA) $$f $(exdir)/$$f ; done
diff -rup --new-file baseline/fsf/ghostscript/amiga.doc amiga/fsf/ghostscript/amiga.doc
--- baseline/fsf/ghostscript/amiga.doc Wed Dec 31 17:00:00 1969
+++ amiga/fsf/ghostscript/amiga.doc Sat Sep 28 00:00:00 1996
@@ -0,0 +1,318 @@
+GNU Ghostscript 2.6.1 Amiga port, revised 29 January 1994
+=========================================================
+This port requires:
+
+- An Amiga equipped with an '020 CPU or any successor CPU model and and
+ Kickstart 2.04 or higher.
+
+- Approx. 4.7 MBytes of hard disk space available.
+
+- A minimum of 1 MByte of chip memory, depending on what you will want to
+ do with the interpreter. Printer output requires at least 2 MBytes of
+ contiguous memory (any memory, not necessarily chip memory).
+
+- ixemul.library and a bunch of Postscript/Ghostscript fonts.
+
+
+New features in the revised v2.6.1 release
+------------------------------------------
+By public request I have recompiled the program to use the built-in math
+library, so you no longer need an FPU to run the program. I also took a
+closer look at the code which tries to determine the printer page
+resolution: you will no longer have trouble with printers featuring
+built-in paper tractors. I tried all printer drivers to be found on the
+Workbench disk to make sure the printer support code really works. Good
+luck! Some small bugs were ironed out and I also took the time to add
+support for another two display drivers (the Picasso II driver which
+requires the Picasso monitor driver v2.14 to work correctly and the
+`custom' driver which requires asl.library v38 to be installed). The entire
+program was recompiled using GCC 2.4.5.
+
+
+New Amiga features in release v2.6.1
+------------------------------------
+The v2.6.0 port used to implement only monochrome drivers, the v2.6.1 port
+supports colour output on most devices, exceptions where noted. You don't
+need a special brand of graphics hardware expansion, colour output will
+work on any Amiga model, provided there is enough memory available. All
+devices capable of doing colour output will reduce the number of colours to
+be displayed if in dire need of memory. As for the display oriented devices
+this will go mostly unnoticed as the Ghostscript halftoning algorithms will
+compensate for any colour reductions. However, printer output quality is
+very likely to suffer from colour reduction. So, watch out!
+ As the display oriented devices start up in colour output mode, black &
+white rendering may be slightly slowed. The printer device is configured
+according to the Preferences settings; `Black & white' will result in
+monochrome output, `Grayscale 1' and `Grayscale 2' will also produce
+monochrome output but will internally use a true colour representation of
+the page, so does `Color'. Please note that `true colour' refers to the
+Amiga 12 bit colour model, at this time of writing 24 bit colour printing
+is not yet implemented.
+ The default output device (a super-bitmap window to opened on the
+default public screen, such as Workbench) will take advantage of the
+Kickstart 3.0 pen sharing feature if enough colours (eight or more)
+are available.
+
+The v2.6.0 port used to rely on printer drivers to initialize their maximum
+page size information upon startup. Several users reported problems with
+certain drivers which would make this information available only after
+having been asked to do so. The v2.6.1 port now follows the programmers'
+guidelines how to determine the maximum page size closely. The driver may
+still complain if configured for `Grayscale 1', `Grayscale 2' or `Color'
+output and there is not enough memory available for the page to be
+displayed.
+
+
+Installation
+------------
+Enter the command line interpreter, Create a directory on your hard disk
+drive, label it "ghostscript". Let's assume that the fully qualified name
+of this directory will be "Work:ghostscript". Enter this directory and
+unpack the archive "gs-2.6.1-amiga.lha". This will create the directory
+"doc" which contains the Ghostscript documentation files, and the directory
+"examples" which is to hold some Postscript example files. To add the fonts
+from the Ghostscript distribution (not included in this release) create a
+directory called "Fonts" in the directory "Work:ghostscript" and copy all
+the font files into it. You also need the `ixemul.library' included in the
+Amiga GCC distribution which should be copied to the `Libs:' directory. Now
+edit your `S:User-Startup' file, adding the following lines:
+
+ Assign ghostscript: "Work:ghostscript"
+ Path ghostscript: add
+
+Save the file back to disk and reboot your machine.
+
+
+Running the interpreter
+-----------------------
+Enter the command line interpreter, type "gs" and press return. The
+interpreter will be loaded and will try to initialize itself. If
+successfully initialized, a window should have been opened on the Workbench
+screen. The Shell window now should display the following text:
+
+ Initializing... done.
+ Ghostscript 2.6.1 (5/28/93)
+ Copyright (C) 1990-1993 Aladdin Enterprises, Menlo Park, CA.
+ All rights reserved.
+ Ghostscript comes with NO WARRANTY: see the file COPYING for details.
+ GS>
+
+At the command prompt, enter "(ghostscript:examples/golfer.ps) run" and
+press return. Click on the `Zoom' button in the top right corner of the
+window to bring it to full screen size, move the scrollers and watch what
+will happen. When rendering is finished, the Shell window will display the
+following text:
+
+ >>showpage, press <return> to continue<<
+
+Press return to erase the contents of the window and to continue. The
+interpreter will be in interactive mode again, enter "quit" and press
+return to end this session.
+
+For more information refer to the documentation in the "ghostscript:doc"
+drawer.
+
+
+How to print a document
+-----------------------
+As the corresponding Ghostscript device will always keep the entire page in
+memory the printer need not be capable of strip-printing. The bad news is
+that the entire page will consume *a lot* of memory. This Amiga port will
+keep the page in any public memory area, so it will not necessarily eat up
+precious chip memory. This should make it possible to print pages on Amigas
+with only 1 MByte of chip memory or less, provided enough fast memory is
+available.
+
+Enter the command line interpreter, type "gs -sDEVICE=amiga_printer" and
+press return. This will invoke the Ghostscript interpreter with the
+"amiga_printer" device driver selected as the startup device. When the
+command prompt appears, enter "(ghostscript:examples/butterfly.ps) run" and
+press return. The rendered image will be sent to the printer. When printing
+is finished, press return and enter "quit" to end this session.
+
+Note: unless you want Ghostscript to prompt you to press return after each
+page is printed and ejected you should include "-dNOPAUSE" on the command
+line.
+
+
+Available device drivers
+------------------------
+This port implements the following nine device drivers:
+
+ amiga
+
+ (This is the default output device)
+
+ Rendering takes place in a super-bitmap window to be opened on the
+ Workbench screen. This window contains scroller handles to move
+ around in the bitmap. Usually, the bitmap will be four times as large
+ as the screen the window opens upon.
+
+ amiga_low
+
+ Renders into a low-resolution custom screen.
+
+ amiga_high
+
+ Renders into a high-resolution custom screen.
+
+ amiga_super
+
+ Renders into a super-high-resolution custom screen.
+
+ amiga_a2024¹
+
+ Renders into an A2024 resolution custom screen.
+
+ amiga_picassoii
+
+ Renders into a Picasso II custom screen (note: a plain Intuition
+ custom screen will be opened, this driver will not directly access
+ the Picasso II hardware). The Picasso monitor driver v2.14 is
+ required for this driver to work.
+
+ amiga_custom
+
+ Unlike the other display drivers which will open screens in
+ predefined resolutions and modes the `amiga_custom' driver will let
+ you select the display mode to use. On first invocation of the driver
+ a screen mode requester will be opened for you to select the display
+ mode to use. The name of the display mode selected will be stored in
+ a local environment variable called "GSCUSTOMMODE". The next time you
+ run the GhostScript interpreter with the `amiga_custom' device
+ selected the device will try to read the contents of the
+ "GSCUSTOMMODE" variable. The list of screen display modes available
+ will be scanned for a mode which name matches the variable. Wildcard
+ patterns are supported, so setting "GSCUSTOMMODE" to "#?lowres#?"
+ will match any screen display mode with the string "lowres" in it,
+ such as "NTSC:LowRes", "PAL:LowRes", etc. If you wish, you could set
+ the global environment variable "GSCUSTOMMODE" to a special value
+ which the `amiga_custom' device will always use. Please note that the
+ screen mode requester will only be opened if no local or global
+ environment variable "GSCUSTOMMODE" is defined.
+
+ amiga_printer
+
+ Outputs pages on the currently configured preferences printer.
+ Respects density and resolution settings. Requires a lot of memory to
+ run.
+
+ amiga_ilbm¹
+
+ Will prompt for a file name to save the current page contents to. The
+ page will be saved as a standard IFF-ILBM picture, including DPI
+ information, suitable for postprocessing using standard image
+ processing and editing software.
+
+
+ ¹) Monochrome output only
+
+
+Properties
+----------
+With Ghostscript 2.6.1 one can specify several driver specific options on
+the command line. As for the Amiga drivers, they support the following
+properties:
+
+- PageWidth and PageHeight
+
+ The dimensions of the page to render into. The physical page size
+ Ghostscript will use for rendering is limited by these dimensions. On
+ startup The Amiga drivers will default to a page size roughly equivalent
+ to A4 unless different dimensions are specified. The size definitions may
+ include measuring units (e.g. "-sPageWidth=21cm"), the following units
+ are supported: pt (points, the default if no unit is given), pc (picas),
+ in (inches), cm (centimeters), mm (millimeters), dd (didôt points), cc
+ (ciceros).
+
+- OutputFile
+
+ The amiga_ilbm device pays attention to this property, which it will use
+ to construct the output file names for pages to be saved with. Thus,
+ `-sOutputFile="ram:page"' yields the files "ram:page0001.ilbm",
+ "ram:page0002.ilbm", etc.
+
+
+Not all devices will pay attention to DPI page resolutions.
+
+
+Installing fonts
+----------------
+The Ghostscript distribution includes a number of public-domain or
+otherwise freely distributable fonts. However, these are mostly of poor
+quality. In order to install a new font or to replace a font with a
+different one, the following steps are required:
+
+1. The font must be converted to Ghostscript format. For font files in
+ BDF-format (such as the fonts included in the X-Windows distribution)
+ this requires processing with the "bdftops" script file (syntax is
+ "bdftops <Source file> <Destination file>"). Fonts in standard ASCII text
+ format (".PFA" format) or packed binary file format (".PFB" format), such
+ as most Adobe-Type-1 hinted outline fonts to be purchased from various
+ vendors, need not be converted as this is the native format Ghostscript
+ expects.
+
+2. Copy the resulting output file to the "ghostscript:fonts" drawer, choose
+ a suitable name (see the file "ghostscript:fontmap" for more
+ information).
+
+3. Edit the file "ghostscript:fontmap" to include the font which will make
+ it visible to the interpreter. Read this file carefully as it gives basic
+ hints how to name a font file and how to edit the corresponding font
+ entry.
+
+
+The Workbench window
+--------------------
+The default output device (the Workbench window) can be controlled both by
+mouse and by keyboard:
+
+ Cursor keys will move the currently visible area of the page, holding
+ down a Shift or Control key will increase the size of the scrolling
+ steps.
+
+ Control+C and Escape will send the interpreter a signal to terminate
+ processing, so does clicking the window close button.
+
+By default the page size will always be four times as large as the
+currently visible portion of the Workbench screen, see the section entitled
+"Page sizes and resolutions" for more information.
+
+
+Troubleshooting
+---------------
+This interpreter implementation requires a lot of chip memory to run. In
+order to assure that enough memory will be available, close any Workbench
+drawers or Shell windows which are not necessarily require to run the
+interpreter.
+
+Most Postscript documents use hard-coded document page sizes, i.e. the
+output page size will not be scaled to fit the currently set output page
+size. In these cases you may want to make use of the Postscript "scale"
+operator. Say, you wish to preview the file "butterfly.ps" in just half its
+size. Enter "0.5 dup scale" and press return, now enter "(butterfly.ps)
+run" and press return; et voilà: the butterfly will be rendered just half
+as large as usual.
+
+Some documents, such as "porsche.ps", contain no "showpage" command to
+finish the batch job. In this case, type "showpage" and press return or
+enter "erasepage" and press return to clear the page.
+
+
+About the Amiga port
+--------------------
+This port is based on Ghostscript 2.6.1. It was implemented using GCC
+2.4.5, so you will have to refer to the file "COPYING" for copying and
+licensing information.
+
+ This Amiga port was created by:
+
+ Olaf `Olsen' Barthel
+ Brabeckstrasse 35
+ D-30559 Hannover
+
+ Federal Republic of Germany
+
+ eMail: olsen@sourcery.han.de
+
+The source code is included in the "amiga-src" drawer.
diff -rup --new-file baseline/fsf/ghostscript/bdftops amiga/fsf/ghostscript/bdftops
--- baseline/fsf/ghostscript/bdftops Tue Oct 22 00:12:14 1991
+++ amiga/fsf/ghostscript/bdftops Sat Sep 28 00:00:00 1996
@@ -1 +1,4 @@
-gs -q -dNODISPLAY -- bdftops.ps $*
+.key ARGS/F
+.bra {
+.ket }
+gs -q -dNODISPLAY -- bdftops.ps {ARGS}
diff -rup --new-file baseline/fsf/ghostscript/configure amiga/fsf/ghostscript/configure
--- baseline/fsf/ghostscript/configure Wed Dec 31 17:00:00 1969
+++ amiga/fsf/ghostscript/configure Mon Sep 30 22:44:58 1996
@@ -0,0 +1,1055 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.10
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+guidedir='${prefix}/guide'
+psdir='${prefix}/ps'
+dvidir='${prefix}/dvi'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+
+ac_prev=
+for ac_option
+do
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ case "$ac_option" in
+ -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) ac_optarg= ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case "$ac_option" in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir="$ac_optarg" ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build="$ac_optarg" ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file="$ac_optarg" ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir="$ac_optarg" ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ eval "enable_${ac_feature}=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+ fi
+ ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix="$ac_optarg" ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he)
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+ --cache-file=FILE cache test results in FILE
+ --help print this message
+ --no-create do not create output files
+ --quiet, --silent do not print \`checking...' messages
+ --version print the version of autoconf that created configure
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [same as prefix]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
+ --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
+ --infodir=DIR info documentation in DIR [PREFIX/info]
+ --guidedir=DIR Amigaguide documentation in DIR [PREFIX/guide]
+ --psdir=DIR postscript documentation in DIR [PREFIX/ps]
+ --dvidir=DIR TeX dvi documentation in DIR [PREFIX/dvi]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM
+ run sed PROGRAM on installed program names
+EOF
+ cat << EOF
+Host type:
+ --build=BUILD configure for building on BUILD [BUILD=HOST]
+ --host=HOST configure for HOST [guessed]
+ --target=TARGET configure for TARGET [TARGET=HOST]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+EOF
+ if test -n "$ac_help"; then
+ echo "--enable and --with options recognized:$ac_help"
+ fi
+ exit 0 ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host="$ac_optarg" ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir="$ac_optarg" ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir="$ac_optarg" ;;
+
+ -guidedir | --guidedir | --guidedi | --guided | --guide | --gui)
+ ac_prev=guidedir ;;
+ -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+ guidedir="$ac_optarg" ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+ psdir="$ac_optarg" ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+ dvidir="$ac_optarg" ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir="$ac_optarg" ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir="$ac_optarg" ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir="$ac_optarg" ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir="$ac_optarg" ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir="$ac_optarg" ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix="$ac_optarg" ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix="$ac_optarg" ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix="$ac_optarg" ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name="$ac_optarg" ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir="$ac_optarg" ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir="$ac_optarg" ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site="$ac_optarg" ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir="$ac_optarg" ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir="$ac_optarg" ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target="$ac_optarg" ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers)
+ echo "configure generated by autoconf version 2.10"
+ exit 0 ;;
+
+ -with-* | --with-*)
+ ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case "$ac_option" in
+ *=*) ;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_${ac_package}='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+ { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+ fi
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ eval "with_${ac_package}=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes="$ac_optarg" ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries="$ac_optarg" ;;
+
+ -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ ;;
+
+ *)
+ if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+ echo "configure: warning: $ac_option: invalid host type" 1>&2
+ fi
+ if test "x$nonopt" != xNONE; then
+ { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+ fi
+ nonopt="$ac_option"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+ exec 6>/dev/null
+else
+ exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+ case "$ac_arg" in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c) ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+ ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ esac
+done
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=gs.h
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_prog=$0
+ ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+ test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ else
+ { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ echo "loading site script $ac_site_file"
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ echo "loading cache $cache_file"
+ . $cache_file
+else
+ echo "creating cache $cache_file"
+ > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ac_n= ac_c='
+' ac_t=' '
+ else
+ ac_n=-n ac_c= ac_t=
+ fi
+else
+ ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+# We want these before the checks, so the checks can modify their values.
+test -z "$CFLAGS" && CFLAGS= auto_cflags=1
+test -z "$LDFLAGS" && LDFLAGS=
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ ac_prog_rejected=no
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+ ac_cv_prog_gcc=yes
+else
+ ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+ if test "${CFLAGS+set}" != set; then
+ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_gcc_g=yes
+else
+ ac_cv_prog_gcc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
+ if test $ac_cv_prog_gcc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
+test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
+
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 682 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 697 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_pattern="Autoconf.*'x'"
+ cat > conftest.$ac_ext <<EOF
+#line 730 "configure"
+#include "confdefs.h"
+#include <sgtty.h>
+Autoconf TIOCGETP
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "$ac_pattern" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=yes
+else
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+
+ if test $ac_cv_prog_gcc_traditional = no; then
+ cat > conftest.$ac_ext <<EOF
+#line 748 "configure"
+#include "confdefs.h"
+#include <termio.h>
+Autoconf TCGETA
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "$ac_pattern" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+ fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
+ if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
+ fi
+fi
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /c/install
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ for ac_prog in ginstall installbsd scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ # OSF/1 installbsd also uses dspmsg, but is usable.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_ifs"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
+ >> confcache
+if cmp -s $cache_file confcache; then
+ :
+else
+ if test -w $cache_file; then
+ echo "updating cache $cache_file"
+ cat confcache > $cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+cat > conftest.defs <<\EOF
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
+s%\[%\\&%g
+s%\]%\\&%g
+s%\$%$$%g
+EOF
+DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+rm -f conftest.defs
+
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+# Some systems, like AmigaOS, won't allow you to remove a script that is
+# being executed, so just move it out of the way instead.
+if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+ case "\$ac_option" in
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+ exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+ -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+ echo "$CONFIG_STATUS generated by autoconf version 2.10"
+ exit 0 ;;
+ -help | --help | --hel | --he | --h)
+ echo "\$ac_cs_usage"; exit 0 ;;
+ *) echo "\$ac_cs_usage"; exit 1 ;;
+ esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@guidedir@%$guidedir%g
+s%@psdir@%$psdir%g
+s%@dvidir@%$dvidir%g
+s%@mandir@%$mandir%g
+s%@CC@%$CC%g
+s%@CPP@%$CPP%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+
+CEOF
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+ # Support "outfile[:infile]", defaulting infile="outfile.in".
+ case "$ac_file" in
+ *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
+ ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ *) ac_file_in="${ac_file}.in" ;;
+ esac
+
+ # Adjust relative srcdir, etc. for subdirectories.
+
+ # Remove last slash and all that follows it. Not all systems have dirname.
+ ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+ if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+ # The file is in a subdirectory.
+ test ! -d "$ac_dir" && mkdir "$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ else
+ ac_dir_suffix= ac_dots=
+ fi
+
+ case "$ac_given_srcdir" in
+ .) srcdir=.
+ if test -z "$ac_dots"; then top_srcdir=.
+ else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+ *) # Relative path.
+ srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+ top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ case "$ac_given_INSTALL" in
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+ echo creating "$ac_file"
+ rm -f "$ac_file"
+ configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+ case "$ac_file" in
+ *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+ *) ac_comsub= ;;
+ esac
+ sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
+fi; done
+rm -f conftest.subs
+
+
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -f CONFIG.STATUS.old
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff -rup --new-file baseline/fsf/ghostscript/configure.in amiga/fsf/ghostscript/configure.in
--- baseline/fsf/ghostscript/configure.in Wed Dec 31 17:00:00 1969
+++ amiga/fsf/ghostscript/configure.in Sat Sep 28 00:00:00 1996
@@ -0,0 +1,20 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(gs.h)
+
+# We want these before the checks, so the checks can modify their values.
+test -z "$CFLAGS" && CFLAGS= auto_cflags=1
+test -z "$LDFLAGS" && LDFLAGS=
+
+AC_PROG_CC
+
+# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
+test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
+
+AC_SUBST(CFLAGS)dnl
+AC_SUBST(LDFLAGS)dnl
+
+AC_PROG_CPP
+AC_GCC_TRADITIONAL
+AC_PROG_INSTALL
+
+AC_OUTPUT(Makefile)
diff -rup --new-file baseline/fsf/ghostscript/font2c amiga/fsf/ghostscript/font2c
--- baseline/fsf/ghostscript/font2c Tue Feb 25 03:24:34 1992
+++ amiga/fsf/ghostscript/font2c Sat Sep 28 00:00:00 1996
@@ -1 +1,4 @@
-gs -q -dNODISPLAY -dWRITESYSTEMDICT -- font2c.ps $*
+.key ARGS/F
+.bra {
+.ket }
+gs -q -dNODISPLAY -dWRITESYSTEMDICT -- font2c.ps {ARGS}
diff -rup --new-file baseline/fsf/ghostscript/fonts/Makefile.in amiga/fsf/ghostscript/fonts/Makefile.in
--- baseline/fsf/ghostscript/fonts/Makefile.in Wed Dec 31 17:00:00 1969
+++ amiga/fsf/ghostscript/fonts/Makefile.in Sat Sep 28 00:00:00 1996
@@ -0,0 +1,43 @@
+# Ghostscript fonts Makefile.
+
+#### Start of system configuration section. ####
+
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+# Common prefix for machine-independent installed files.
+prefix = /ade
+# Common prefix for machine-dependent installed files.
+exec_prefix = $(prefix)
+
+# Directory to install libraries in.
+libdir = $(exec_prefix)/lib
+
+# Program to install data like man pages.
+INSTALL_DATA = @INSTALL_DATA@
+# Generic install program.
+INSTALL = @INSTALL@
+
+#### End of system configuration section. ####
+
+# Define the default directories for the runtime
+# initialization and font files. Separate multiple directories with a ','.
+
+gsdatadir = $(libdir)/ghostscript
+gsfontsdir = $(gsdatadir)/fonts
+
+# Installation
+
+all:
+
+clean:
+
+clobber:
+
+install:
+ if [ -d $(libdir) ]; then true; else mkdir $(libdir); fi
+ if [ -d $(gsfontsdir) ]; then true; else mkdir $(gsfontsdir); fi
+ for f in `(cd $(srcdir)/fonts ; find . -type f -print)` ; do $(INSTALL_DATA) $(srcdir)/fonts/$$f $(gsfontsdir)/$$f ; done
+
+Makefile: config.status $(srcdir)/Makefile.in
+ $(SHELL) config.status
diff -rup --new-file baseline/fsf/ghostscript/gdevamiga.c amiga/fsf/ghostscript/gdevamiga.c
--- baseline/fsf/ghostscript/gdevamiga.c Wed Dec 31 17:00:00 1969
+++ amiga/fsf/ghostscript/gdevamiga.c Sat Sep 28 00:00:00 1996
@@ -0,0 +1,5537 @@
+/* Copyright (C) 1992 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. */
+
+/* gdevamiga.c */
+/* Amiga driver for Ghostscript library, requires Kickstart 2.04 or higher */
+
+/* Written by Olaf `Olsen' Barthel, last change 29 January 1994
+ *
+ * My address: Olaf Barthel
+ * Brabeckstrasse 35
+ * D-30559 Hannover
+ *
+ * eMail: olsen@sourcery.han.de
+ */
+
+#define CheckIO foo123
+#define ushort foo
+
+#include <intuition/intuitionbase.h>
+#include <intuition/gadgetclass.h>
+#include <intuition/imageclass.h>
+#include <intuition/icclass.h>
+#include <graphics/displayinfo.h>
+#include <libraries/iffparse.h>
+#include <graphics/gfxbase.h>
+#include <devices/printer.h>
+#include <devices/prtbase.h>
+#include <devices/prtgfx.h>
+#include <libraries/asl.h>
+#include <exec/memory.h>
+#include <clib/macros.h>
+#include <dos/dostags.h>
+#include <dos/rdargs.h>
+#include <dos/var.h>
+#include <dos/dos.h>
+
+#include <clib/intuition_protos.h>
+#include <clib/graphics_protos.h>
+#include <clib/iffparse_protos.h>
+#include <clib/utility_protos.h>
+#include <clib/layers_protos.h>
+#include <clib/exec_protos.h>
+#include <clib/dos_protos.h>
+#include <clib/asl_protos.h>
+
+/*
+#include <inline/stubs.h>
+#include <inline/iffparse.h>
+#include <inline/utility.h>
+#include <inline/exec.h>
+#include <inline/dos.h>
+*/
+
+#include <string.h>
+#include <signal.h>
+
+#undef ushort
+#undef CheckIO
+
+struct IORequest *CheckIO(struct IORequest *);
+
+#include "gx.h" /* for gx_bitmap; includes std.h */
+#include "gsmatrix.h" /* needed for gxdevice.h */
+#include "gxdevice.h"
+#include "gserrors.h"
+#include "gsprops.h"
+
+ /* Here is how to select a default page size format:
+ *
+ * Either enter include a line such as
+ *
+ * #define AMIGA_PAGE_A4 1
+ *
+ * Somewhere above in this module, or edit the makefile
+ * to feature the option
+ *
+ * -dAMIGA_PAGE_A4
+ *
+ * among the device specific flags. Available default page
+ * size formats are:
+ *
+ * AMIGA_PAGE_A4 European A4 page size (default)
+ * AMIGA_PAGE_A3 European A3 page size
+ * AMIGA_PAGE_LETTER US letter page size
+ * AMIGA_PAGE_LEGAL US legal page size
+ * AMIGA_PAGE_LEDGER US ledger paper size
+ * AMIGA_PAGE_TABLOID US tabloid paper size
+ */
+
+ /* Select the default paper size if none specified. */
+
+#if !defined(AMIGA_PAGE_A4) && !defined(AMIGA_PAGE_A3) && !defined(AMIGA_PAGE_LETTER) && !defined(AMIGA_PAGE_LEGAL) && !defined(AMIGA_PAGE_LEDGER) && !defined(AMIGA_PAGE_TABLOID)
+/*#define AMIGA_PAGE_A4 1*/
+#define AMIGA_PAGE_A3 1
+#endif /* PAGE SIZE */
+
+ /* A4 page size (in inches!) */
+
+#ifdef AMIGA_PAGE_A4
+#define DEFAULT_WIDTH 8.2
+#define DEFAULT_HEIGHT 11.6
+#endif /* AMIGA_PAGE_A4 */
+
+ /* A3 page size */
+
+#ifdef AMIGA_PAGE_A3
+#define DEFAULT_WIDTH 11.6
+#define DEFAULT_HEIGHT 16.5
+#endif /* AMIGA_PAGE_A4 */
+
+ /* US letter page size */
+
+#ifdef AMIGA_PAGE_LETTER
+#define DEFAULT_WIDTH 8.5
+#define DEFAULT_HEIGHT 11.0
+#endif /* AMIGA_PAGE_LETTER */
+
+ /* US legal page size */
+
+#ifdef AMIGA_PAGE_LEGAL
+#define DEFAULT_WIDTH 8.5
+#define DEFAULT_HEIGHT 14.0
+#endif /* AMIGA_PAGE_LEGAL */
+
+ /* US ledger page size */
+
+#ifdef AMIGA_PAGE_LEDGER
+#define DEFAULT_WIDTH 16.0
+#define DEFAULT_HEIGHT 11.0
+#endif /* AMIGA_PAGE_LEDGER */
+
+ /* US tabloid page size */
+
+#ifdef AMIGA_PAGE_TABLOID
+#define DEFAULT_WIDTH 11.0
+#define DEFAULT_HEIGHT 17.0
+#endif /* AMIGA_PAGE_LEDGER */
+
+ /* Default output file name. */
+
+#define DEFAULT_FILENAME "gs_page"
+
+ /* Turn a byte into a 24 bit colour value. */
+
+#define SPREAD(i) ((ULONG)(i) << 24 | (ULONG)(i) << 16 | (ULONG)(i) << 8 | (i))
+
+ /* Scroller gadget IDs. */
+
+enum { VERTICAL_SCROLLER, HORIZONTAL_SCROLLER,
+ UP_ARROW, DOWN_ARROW,
+ LEFT_ARROW, RIGHT_ARROW,
+
+ GADGET_COUNT };
+
+ /* Scroller arrow IDs. */
+
+enum { UP_IMAGE, DOWN_IMAGE,
+ LEFT_IMAGE, RIGHT_IMAGE,
+
+ IMAGE_COUNT };
+
+ /* Codes for the MoveAround() routine. */
+
+enum { MOVE_MIN,MOVE_FAR_DOWN,MOVE_DOWN,MOVE_UP,MOVE_FAR_UP,MOVE_MAX };
+
+ /* Some handy bit masks. */
+
+#define SIG_KILL SIGBREAKF_CTRL_C
+#define SIG_HANDSHAKE SIGF_SINGLE
+
+ /* Static dimensions of scroller arrows. */
+
+#define ARROW_WIDTH 16
+#define ARROW_HEIGHT 11
+
+ /* The `Help' key raw code. */
+
+#define HELP_CODE 95
+
+ /* Minimum window inner area dimension. */
+
+#define MINIMUM_WIDTH 64
+#define MINIMUM_HEIGHT 32
+
+ /* Handy superbitmap window macros. */
+
+#define LAYERXOFFSET(w) ((w) -> RPort -> Layer -> Scroll_X)
+#define LAYERYOFFSET(w) ((w) -> RPort -> Layer -> Scroll_Y)
+
+ /* User input to listen to. */
+
+#define IDCMP_FLAGS (IDCMP_IDCMPUPDATE | IDCMP_GADGETUP | IDCMP_GADGETDOWN | IDCMP_MOUSEMOVE | IDCMP_NEWSIZE | IDCMP_CLOSEWINDOW | IDCMP_VANILLAKEY | IDCMP_RAWKEY)
+
+ /* Chunk IDs. */
+
+#define ID_ILBM MAKE_ID('I','L','B','M')
+#define ID_BMHD MAKE_ID('B','M','H','D')
+#define ID_CMAP MAKE_ID('C','M','A','P')
+#define ID_CAMG MAKE_ID('C','A','M','G')
+#define ID_ANNO MAKE_ID('A','N','N','O')
+#define ID_DPI MAKE_ID('D','P','I',' ')
+#define ID_BODY MAKE_ID('B','O','D','Y')
+
+ /* Chunk contents definitions. */
+
+typedef struct
+{
+ UWORD w,h; /* raster width & height in pixels */
+ WORD x,y; /* position for this image */
+ UBYTE nPlanes; /* # source bitplanes */
+ UBYTE masking; /* masking technique */
+ UBYTE compression; /* compression algoithm */
+ UBYTE pad1; /* UNUSED. For consistency, put 0 here.*/
+ UWORD transparentColor; /* transparent "color number" */
+ UBYTE xAspect,yAspect; /* aspect ratio, a rational number x/y */
+ WORD pageWidth,pageHeight; /* source "page" size in pixels */
+} BitMapHeader;
+
+typedef struct
+{
+ UWORD dpi_x;
+ UWORD dpi_y;
+} DPIHeader;
+
+ /* Packer modes. */
+
+#define DUMP 0
+#define RUN 1
+
+ /* Minimum data run size, maximum data run size and maximum cache size. */
+
+#define MINRUN 3
+#define MAXRUN 128
+#define MAXDAT 128
+
+ /* This module actually implements four different Amiga based
+ * devices. As the rendering operations are all the same,
+ * one single device definition is sufficient.
+ */
+
+typedef struct gx_device_amiga
+{
+ gx_device_common;
+
+ struct Screen *screen; /* Any screen */
+ struct Window *window; /* Some window to be opened on the Workbench screen */
+
+ LONG super_width, /* Superbitmap width */
+ super_height; /* Superbitmap height */
+
+ struct BitMap *super_bitmap; /* Window superbitmap area */
+ struct Gadget **gadget; /* Scroller gadgets */
+ struct Image **image; /* Scroller arrow images */
+
+ struct Task *dispatcher; /* Slider dispatch task */
+ struct Process *main; /* Main program */
+
+ struct RastPort *rport; /* Rendering area */
+
+ struct IODRPReq *printer; /* Printer interface data */
+ struct MsgPort *port; /* Printer io data */
+
+ struct ColorMap *colormap; /* A black/white colour map */
+ struct BitMap *bitmap; /* Rendering bitmap data */
+ PLANEPTR bitplane; /* Rendering raster */
+
+ gx_color_index last_pen; /* The last colour set */
+
+ float page_width, /* The page width */
+ page_height; /* The page height */
+ char file_name[256];/* The output file name */
+ int page_count; /* The page number counter */
+
+ int cube_size; /* Colour cube size, 0 for b/w */
+ struct RastPort *temp_rport; /* Temporary raster port for pixmap imaging. */
+ UBYTE *temp_array; /* Temporary colour manipulation array. */
+ LONG *pens;
+} gx_device_amiga;
+
+ /* Function prototypes */
+
+VOID set_mono_device(gx_device_amiga *dev);
+VOID set_colour_device(gx_device_amiga *dev,int cube_size,LONG *pens);
+VOID set_colour_printer_device(gx_device_amiga *dev,LONG CubeSize);
+VOID DeleteBitMap(struct BitMap *BitMap,BOOL Private);
+struct BitMap * CreateBitMap(LONG Width,LONG Height,LONG Depth,ULONG Flags,struct BitMap *Friend,BOOL Private);
+VOID DeleteTempRPort(struct RastPort *Temp);
+struct RastPort * CreateTempRPort(struct RastPort *Source);
+LONG Euclid(LONG a,LONG b);
+BYTE * PutDump(register BYTE *Destination,register LONG Count);
+BYTE * PutRun(register BYTE *Destination,LONG Count,WORD Char);
+LONG PackRow(PLANEPTR *SourcePtr,register BYTE *Destination,LONG RowSize);
+BOOL PutBODY(struct IFFHandle *Handle,struct BitMap *BitMap);
+BOOL PutANNO(struct IFFHandle *Handle);
+BOOL PutCAMG(struct IFFHandle *Handle);
+BOOL PutCMAP(struct IFFHandle *Handle);
+BOOL PutDPI(struct IFFHandle *Handle,UWORD X_DPI,UWORD Y_DPI);
+BOOL PutBMHD(struct IFFHandle *Handle,LONG Width,LONG Height,UWORD X_DPI,UWORD Y_DPI);
+BOOL SaveBitMap(STRPTR Name,struct BitMap *BitMap,LONG Width,LONG Height,UWORD X_DPI,UWORD Y_DPI);
+float GetInches(STRPTR Buffer);
+VOID DispatchTask(VOID);
+VOID DeleteScrollers(gx_device *dev);
+BOOL CreateScrollers(gx_device *dev,struct Screen *Screen);
+VOID WindowResize(gx_device *dev);
+VOID WindowUpdate(struct Gadget *Gadget,gx_device *dev);
+VOID MoveAround(struct Gadget *Gadget,LONG How,gx_device *dev);
+VOID DispatchSuperWindow(gx_device *dev);
+void devcleanup(VOID);
+gx_color_index amiga_map_rgb_color(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue);
+int amiga_map_color_rgb(gx_device *dev,gx_color_index color,gx_color_value rgb[3]);
+LONG * AllocatePens(struct ViewPort *VPort,LONG CubeSize);
+int amiga_open_default(gx_device *dev);
+int amiga_open_low(gx_device *dev);
+int amiga_open_high(gx_device *dev);
+int amiga_open_super(gx_device *dev);
+int amiga_open_a2024(gx_device *dev);
+int amiga_open_picassoii(gx_device *dev);
+int amiga_open_custom(gx_device *dev);
+int amiga_open_printer(gx_device *dev);
+int amiga_output_page_printer(gx_device *dev,int num_copies,int flush);
+int amiga_close_printer(gx_device *dev);
+int amiga_get_bits(gx_device *dev,int y,byte *str,byte **actual_data);
+int amiga_open(gx_device *dev,ULONG Mode);
+int amiga_output_page(gx_device *dev,int num_copies,int flush);
+int amiga_close(gx_device *dev);
+int amiga_fill_rectangle(gx_device *dev,int x,int y,int w,int h,gx_color_index color);
+int amiga_copy_mono(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h,gx_color_index zero,gx_color_index one);
+int amiga_copy_color(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h);
+int amiga_draw_line(gx_device *dev,int x0,int y0,int x1,int y1,gx_color_index color);
+int amiga_copy_mono_raw(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h,gx_color_index zero,gx_color_index one);
+int amiga_copy_color_raw(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h);
+int amiga_fill_rectangle_raw(gx_device *dev,int x,int y,int w,int h,gx_color_index color);
+int amiga_draw_line_raw(gx_device *dev,int x,int y,int x1,int y1,gx_color_index color);
+int amiga_open_ilbm(gx_device *dev);
+int amiga_output_page_ilbm(gx_device *dev,int num_copies,int flush);
+int amiga_close_ilbm(gx_device *dev);
+int amiga_get_props(gx_device *dev,gs_prop_item *plist);
+int amiga_put_props(gx_device *dev,gs_prop_item *plist,int count);
+gx_color_index amiga_color_map_rgb_color(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue);
+int amiga_color_map_color_rgb(gx_device *dev,gx_color_index color,gx_color_value rgb[3]);
+gx_color_index amiga_color_map_rgb_color_pen(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue);
+int amiga_color_map_color_rgb_pen(gx_device *dev,gx_color_index color,gx_color_value rgb[3]);
+int amiga_copy_color8(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h);
+int amiga_copy_mono_raw_color(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h,gx_color_index zero,gx_color_index one);
+int amiga_copy_color_raw_color16(gx_device *dev,const UBYTE *data,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h);
+int amiga_fill_rectangle_raw_color(gx_device *dev,int x,int y,int w,int h,gx_color_index color);
+int amiga_draw_line_raw_color(gx_device *dev,int x,int y,int x1,int y1,gx_color_index color);
+
+ /* External reference to some libraries, required for version checking, etc. */
+
+extern struct GfxBase *GfxBase;
+extern struct Library *AslBase;
+
+ /* Number of packed bytes and pack buffer. */
+
+LONG PackedBytes;
+BYTE Buffer[MAXDAT + 1];
+
+ /* Bit masks. */
+
+STATIC UBYTE shift[8] = { 128, 64, 32, 16, 8, 4, 2, 1 },
+ masks[8] = { 127,191,223,239,247,251,253,254 };
+
+ /* Device routine jump tables */
+
+STATIC gx_device_procs amiga_default_procs =
+{
+ amiga_open_default,
+ gx_default_get_initial_matrix,
+ gx_default_sync_output,
+ amiga_output_page,
+ amiga_close,
+ amiga_map_rgb_color,
+ amiga_map_color_rgb,
+ amiga_fill_rectangle,
+ gx_default_tile_rectangle,
+ amiga_copy_mono,
+ amiga_copy_color,
+ amiga_draw_line,
+ gx_default_get_bits,
+ amiga_get_props,
+ amiga_put_props
+};
+
+STATIC gx_device_procs amiga_low_procs =
+{
+ amiga_open_low,
+ gx_default_get_initial_matrix,
+ gx_default_sync_output,
+ amiga_output_page,
+ amiga_close,
+ amiga_map_rgb_color,
+ amiga_map_color_rgb,
+ amiga_fill_rectangle,
+ gx_default_tile_rectangle,
+ amiga_copy_mono,
+ amiga_copy_color,
+ amiga_draw_line,
+ gx_default_get_bits,
+ amiga_get_props,
+ amiga_put_props
+};
+
+STATIC gx_device_procs amiga_high_procs =
+{
+ amiga_open_high,
+ gx_default_get_initial_matrix,
+ gx_default_sync_output,
+ amiga_output_page,
+ amiga_close,
+ amiga_map_rgb_color,
+ amiga_map_color_rgb,
+ amiga_fill_rectangle,
+ gx_default_tile_rectangle,
+ amiga_copy_mono,
+ amiga_copy_color,
+ amiga_draw_line,
+ gx_default_get_bits,
+ amiga_get_props,
+ amiga_put_props
+};
+
+STATIC gx_device_procs amiga_super_procs =
+{
+ amiga_open_super,
+ gx_default_get_initial_matrix,
+ gx_default_sync_output,
+ amiga_output_page,
+ amiga_close,
+ amiga_map_rgb_color,
+ amiga_map_color_rgb,
+ amiga_fill_rectangle,
+ gx_default_tile_rectangle,
+ amiga_copy_mono,
+ amiga_copy_color,
+ amiga_draw_line,
+ gx_default_get_bits,
+ amiga_get_props,
+ amiga_put_props
+};
+
+STATIC gx_device_procs amiga_a2024_procs =
+{
+ amiga_open_a2024,
+ gx_default_get_initial_matrix,
+ gx_default_sync_output,
+ amiga_output_page,
+ amiga_close,
+ amiga_map_rgb_color,
+ amiga_map_color_rgb,
+ amiga_fill_rectangle,
+ gx_default_tile_rectangle,
+ amiga_copy_mono,
+ amiga_copy_color,
+ amiga_draw_line,
+ gx_default_get_bits,
+ amiga_get_props,
+ amiga_put_props
+};
+
+STATIC gx_device_procs amiga_picassoii_procs =
+{
+ amiga_open_picassoii,
+ gx_default_get_initial_matrix,
+ gx_default_sync_output,
+ amiga_output_page,
+ amiga_close,
+ amiga_map_rgb_color,
+ amiga_map_color_rgb,
+ amiga_fill_rectangle,
+ gx_default_tile_rectangle,
+ amiga_copy_mono,
+ amiga_copy_color,
+ amiga_draw_line,
+ gx_default_get_bits,
+ amiga_get_props,
+ amiga_put_props
+};
+
+STATIC gx_device_procs amiga_custom_procs =
+{
+ amiga_open_custom,
+ gx_default_get_initial_matrix,
+ gx_default_sync_output,
+ amiga_output_page,
+ amiga_close,
+ amiga_map_rgb_color,
+ amiga_map_color_rgb,
+ amiga_fill_rectangle,
+ gx_default_tile_rectangle,
+ amiga_copy_mono,
+ amiga_copy_color,
+ amiga_draw_line,
+ gx_default_get_bits,
+ amiga_get_props,
+ amiga_put_props
+};
+
+STATIC gx_device_procs amiga_printer_procs =
+{
+ amiga_open_printer,
+ gx_default_get_initial_matrix,
+ gx_default_sync_output,
+ amiga_output_page_printer,
+ amiga_close_printer,
+ amiga_map_rgb_color,
+ amiga_map_color_rgb,
+ amiga_fill_rectangle_raw,
+ gx_default_tile_rectangle,
+ amiga_copy_mono_raw,
+ amiga_copy_color_raw,
+ amiga_draw_line_raw,
+ amiga_get_bits,
+ amiga_get_props,
+ amiga_put_props
+};
+
+STATIC gx_device_procs amiga_ilbm_procs =
+{
+ amiga_open_ilbm,
+ gx_default_get_initial_matrix,
+ gx_default_sync_output,
+ amiga_output_page_ilbm,
+ amiga_close_ilbm,
+ amiga_map_rgb_color,
+ amiga_map_color_rgb,
+ amiga_fill_rectangle_raw,
+ gx_default_tile_rectangle,
+ amiga_copy_mono_raw,
+ amiga_copy_color_raw,
+ amiga_draw_line_raw,
+ amiga_get_bits,
+ amiga_get_props,
+ amiga_put_props
+};
+
+ /* Default device: opens a window on the Workbench screen and renders into it */
+
+gx_device_amiga gs_amiga_device =
+{
+ sizeof(gx_device_amiga), /* params_size */
+ &amiga_default_procs, /* procs */
+ "amiga", /* dname */
+ 0, 0, /* width, height */
+ 72.27, 72.27, /* xdpi, ydpi */
+ no_margins, /* margins */
+ dci_black_and_white, /* color info */
+ 0, /* is_open */
+
+ NULL, /* screen */
+ NULL, /* window */
+
+ 0, /* super_width */
+ 0, /* super_height */
+ NULL, /* super_bitmap */
+ NULL, /* gadget */
+ NULL, /* image */
+
+ NULL, /* dispatcher */
+ NULL, /* main */
+
+ NULL, /* rport */
+
+ NULL, /* printer */
+ NULL, /* port */
+ NULL, /* colormap */
+ NULL, /* bitmap */
+ NULL, /* bitplane */
+
+ 1, /* last_pen */
+
+ DEFAULT_WIDTH, /* page width */
+ DEFAULT_HEIGHT, /* page height */
+ DEFAULT_FILENAME, /* output file */
+ 1, /* page counter */
+
+ 0, /* cube_size */
+ NULL, /* temp_rport */
+ NULL, /* temp_array */
+ NULL /* pens */
+};
+
+ /* Low resolution device: opens a lores custom screen and renders into it */
+
+gx_device_amiga gs_amiga_low_device =
+{
+ sizeof(gx_device_amiga), /* params_size */
+ &amiga_low_procs, /* procs */
+ "amiga_low", /* dname */
+ 0, 0, /* width, height */
+ 72.27, 72.27, /* xdpi, ydpi */
+ no_margins, /* margins */
+ dci_black_and_white, /* color info */
+ 0, /* is_open */
+
+ NULL, /* screen */
+ NULL, /* window */
+
+ 0, /* super_width */
+ 0, /* super_height */
+ NULL, /* super_bitmap */
+ NULL, /* gadget */
+ NULL, /* image */
+
+ NULL, /* dispatcher */
+ NULL, /* main */
+
+ NULL, /* rport */
+
+ NULL, /* printer */
+ NULL, /* port */
+ NULL, /* colormap */
+ NULL, /* bitmap */
+ NULL, /* bitplane */
+
+ 1, /* last_pen */
+
+ DEFAULT_WIDTH, /* page width */
+ DEFAULT_HEIGHT, /* page height */
+ DEFAULT_FILENAME, /* output file */
+ 1, /* page counter */
+
+ 0, /* cube_size */
+ NULL, /* temp_rport */
+ NULL, /* temp_array */
+ NULL /* pens */
+};
+
+ /* High resolution device: opens a highres-interlaced custom screen */
+
+gx_device_amiga gs_amiga_high_device =
+{
+ sizeof(gx_device_amiga), /* params_size */
+ &amiga_high_procs, /* procs */
+ "amiga_high", /* dname */
+ 0, 0, /* width, height */
+ 72.27, 72.27, /* xdpi, ydpi */
+ no_margins, /* margins */
+ dci_black_and_white, /* color info */
+ 0, /* is_open */
+
+ NULL, /* screen */
+ NULL, /* window */
+
+ 0, /* super_width */
+ 0, /* super_height */
+ NULL, /* super_bitmap */
+ NULL, /* gadget */
+ NULL, /* image */
+
+ NULL, /* dispatcher */
+ NULL, /* main */
+
+ NULL, /* rport */
+
+ NULL, /* printer */
+ NULL, /* port */
+ NULL, /* colormap */
+ NULL, /* bitmap */
+ NULL, /* bitplane */
+
+ 1, /* last_pen */
+
+ DEFAULT_WIDTH, /* page width */
+ DEFAULT_HEIGHT, /* page height */
+ DEFAULT_FILENAME, /* output file */
+ 1, /* page counter */
+
+ 0, /* cube_size */
+ NULL, /* temp_rport */
+ NULL, /* temp_array */
+ NULL /* pens */
+};
+
+ /* Super high resolution device: opens a super-highres-interlaced custom screen */
+
+gx_device_amiga gs_amiga_super_device =
+{
+ sizeof(gx_device_amiga), /* params_size */
+ &amiga_super_procs, /* procs */
+ "amiga_super", /* dname */
+ 0, 0, /* width, height */
+ 72.27, 72.27, /* xdpi, ydpi */
+ no_margins, /* margins */
+ dci_black_and_white, /* color info */
+ 0, /* is_open */
+
+ NULL, /* screen */
+ NULL, /* window */
+
+ 0, /* super_width */
+ 0, /* super_height */
+ NULL, /* super_bitmap */
+ NULL, /* gadget */
+ NULL, /* image */
+
+ NULL, /* dispatcher */
+ NULL, /* main */
+
+ NULL, /* rport */
+
+ NULL, /* printer */
+ NULL, /* port */
+ NULL, /* colormap */
+ NULL, /* bitmap */
+ NULL, /* bitplane */
+
+ 1, /* last_pen */
+
+ DEFAULT_WIDTH, /* page width */
+ DEFAULT_HEIGHT, /* page height */
+ DEFAULT_FILENAME, /* output file */
+ 1, /* page counter */
+
+ 0, /* cube_size */
+ NULL, /* temp_rport */
+ NULL, /* temp_array */
+ NULL /* pens */
+};
+
+ /* A2024 device: opens an A2024 custom screen */
+
+gx_device_amiga gs_amiga_a2024_device =
+{
+ sizeof(gx_device_amiga), /* params_size */
+ &amiga_a2024_procs, /* procs */
+ "amiga_a2024", /* dname */
+ 0, 0, /* width, height */
+ 72.27, 72.27, /* xdpi, ydpi */
+ no_margins, /* margins */
+ dci_black_and_white, /* color info */
+ 0, /* is_open */
+
+ NULL, /* screen */
+ NULL, /* window */
+
+ 0, /* super_width */
+ 0, /* super_height */
+ NULL, /* super_bitmap */
+ NULL, /* gadget */
+ NULL, /* image */
+
+ NULL, /* dispatcher */
+ NULL, /* main */
+
+ NULL, /* rport */
+
+ NULL, /* printer */
+ NULL, /* port */
+ NULL, /* colormap */
+ NULL, /* bitmap */
+ NULL, /* bitplane */
+
+ 1, /* last_pen */
+
+ DEFAULT_WIDTH, /* page width */
+ DEFAULT_HEIGHT, /* page height */
+ DEFAULT_FILENAME, /* output file */
+ 1, /* page counter */
+
+ 0, /* cube_size */
+ NULL, /* temp_rport */
+ NULL, /* temp_array */
+ NULL /* pens */
+};
+
+ /* Picasso II device: opens a Picasso II custom screen */
+
+gx_device_amiga gs_amiga_picassoii_device =
+{
+ sizeof(gx_device_amiga), /* params_size */
+ &amiga_picassoii_procs, /* procs */
+ "amiga_picassoii", /* dname */
+ 0, 0, /* width, height */
+ 72.27, 72.27, /* xdpi, ydpi */
+ no_margins, /* margins */
+ dci_black_and_white, /* color info */
+ 0, /* is_open */
+
+ NULL, /* screen */
+ NULL, /* window */
+
+ 0, /* super_width */
+ 0, /* super_height */
+ NULL, /* super_bitmap */
+ NULL, /* gadget */
+ NULL, /* image */
+
+ NULL, /* dispatcher */
+ NULL, /* main */
+
+ NULL, /* rport */
+
+ NULL, /* printer */
+ NULL, /* port */
+ NULL, /* colormap */
+ NULL, /* bitmap */
+ NULL, /* bitplane */
+
+ 1, /* last_pen */
+
+ DEFAULT_WIDTH, /* page width */
+ DEFAULT_HEIGHT, /* page height */
+ DEFAULT_FILENAME, /* output file */
+ 1, /* page counter */
+
+ 0, /* cube_size */
+ NULL, /* temp_rport */
+ NULL, /* temp_array */
+ NULL /* pens */
+};
+
+ /* Custom device: opens a custom screen, will ask for screen mode or check env variable. */
+
+gx_device_amiga gs_amiga_custom_device =
+{
+ sizeof(gx_device_amiga), /* params_size */
+ &amiga_custom_procs, /* procs */
+ "amiga_custom", /* dname */
+ 0, 0, /* width, height */
+ 72.27, 72.27, /* xdpi, ydpi */
+ no_margins, /* margins */
+ dci_black_and_white, /* color info */
+ 0, /* is_open */
+
+ NULL, /* screen */
+ NULL, /* window */
+
+ 0, /* super_width */
+ 0, /* super_height */
+ NULL, /* super_bitmap */
+ NULL, /* gadget */
+ NULL, /* image */
+
+ NULL, /* dispatcher */
+ NULL, /* main */
+
+ NULL, /* rport */
+
+ NULL, /* printer */
+ NULL, /* port */
+ NULL, /* colormap */
+ NULL, /* bitmap */
+ NULL, /* bitplane */
+
+ 1, /* last_pen */
+
+ DEFAULT_WIDTH, /* page width */
+ DEFAULT_HEIGHT, /* page height */
+ DEFAULT_FILENAME, /* output file */
+ 1, /* page counter */
+
+ 0, /* cube_size */
+ NULL, /* temp_rport */
+ NULL, /* temp_array */
+ NULL /* pens */
+};
+
+ /* Printer device: renders the imagery and sends it to the printer */
+
+gx_device_amiga gs_amiga_printer_device =
+{
+ sizeof(gx_device_amiga), /* params_size */
+ &amiga_printer_procs, /* procs */
+ "amiga_printer", /* dname */
+ 0, 0, /* width, height */
+ 72.27, 72.27, /* xdpi, ydpi */
+ no_margins, /* margins */
+ dci_black_and_white, /* color info */
+ 0, /* is_open */
+
+ NULL, /* screen */
+ NULL, /* window */
+
+ 0, /* super_width */
+ 0, /* super_height */
+ NULL, /* super_bitmap */
+ NULL, /* gadget */
+ NULL, /* image */
+
+ NULL, /* dispatcher */
+ NULL, /* main */
+
+ NULL, /* rport */
+
+ NULL, /* printer */
+ NULL, /* port */
+ NULL, /* colormap */
+ NULL, /* bitmap */
+ NULL, /* bitplane */
+
+ 1, /* last_pen */
+
+ DEFAULT_WIDTH, /* page width */
+ DEFAULT_HEIGHT, /* page height */
+ DEFAULT_FILENAME, /* output file */
+ 1, /* page counter */
+
+ 0, /* cube_size */
+ NULL, /* temp_rport */
+ NULL, /* temp_array */
+ NULL /* pens */
+};
+
+ /* ILBM device: renders the imagery and saves it to an IFF-ILBM file. */
+
+gx_device_amiga gs_amiga_ilbm_device =
+{
+ sizeof(gx_device_amiga), /* params_size */
+ &amiga_ilbm_procs, /* procs */
+ "amiga_ilbm", /* dname */
+ 0, 0, /* width, height */
+ 72.27, 72.27, /* xdpi, ydpi */
+ no_margins, /* margins */
+ dci_black_and_white, /* color info */
+ 0, /* is_open */
+
+ NULL, /* screen */
+ NULL, /* window */
+
+ 0, /* super_width */
+ 0, /* super_height */
+ NULL, /* super_bitmap */
+ NULL, /* gadget */
+ NULL, /* image */
+
+ NULL, /* dispatcher */
+ NULL, /* main */
+
+ NULL, /* rport */
+
+ NULL, /* printer */
+ NULL, /* port */
+ NULL, /* colormap */
+ NULL, /* bitmap */
+ NULL, /* bitplane */
+
+ 1, /* last_pen */
+
+ DEFAULT_WIDTH, /* page width */
+ DEFAULT_HEIGHT, /* page height */
+ DEFAULT_FILENAME, /* output file */
+ 1, /* page counter */
+
+ 0, /* cube_size */
+ NULL, /* temp_rport */
+ NULL, /* temp_array */
+ NULL /* pens */
+};
+
+ /* Dark (black) and light (white) rendering colours; the default device
+ * determines the actual colours to be used by looking into the screen
+ * colour lookup table, the other device drivers leave these values
+ * untouched.
+ */
+
+STATIC UBYTE DarkPen = 0,
+ LightPen = 1;
+
+ /* Cheap, but effective ;-) */
+
+#define xdev ((gx_device_amiga *)dev)
+
+ /* set_mono_device(gx_device_amiga *dev,int cube_size,LONG *pens):
+ *
+ * Reconfigure a device for monochrome output.
+ */
+
+VOID
+set_mono_device(gx_device_amiga *dev)
+{
+ xdev -> color_info . depth = 1;
+ xdev -> color_info . num_components = 1;
+ xdev -> color_info . max_gray = 1;
+ xdev -> color_info . max_rgb = 0;
+ xdev -> color_info . dither_gray = 2;
+ xdev -> color_info . dither_rgb = 0;
+
+ xdev -> procs -> copy_color = amiga_copy_color;
+ xdev -> procs -> map_rgb_color = amiga_map_rgb_color;
+ xdev -> procs -> map_color_rgb = amiga_map_color_rgb;
+
+ xdev -> cube_size = 0;
+}
+
+ /* set_colour_device(gx_device_amiga *dev,int cube_size,LONG *pens):
+ *
+ * Reconfigure a device for colour output.
+ */
+
+VOID
+set_colour_device(gx_device_amiga *dev,int cube_size,LONG *pens)
+{
+ xdev -> color_info . depth = 8;
+ xdev -> color_info . num_components = 3;
+ xdev -> color_info . max_gray = cube_size - 1;
+ xdev -> color_info . max_rgb = cube_size - 1;
+ xdev -> color_info . dither_gray = cube_size;
+ xdev -> color_info . dither_rgb = cube_size;
+
+ xdev -> procs -> copy_color = amiga_copy_color8;
+
+ /* Any colours to be remapped? */
+
+ if(pens)
+ {
+ xdev -> procs -> map_rgb_color = amiga_color_map_rgb_color_pen;
+ xdev -> procs -> map_color_rgb = amiga_color_map_color_rgb_pen;
+ xdev -> pens = pens;
+ }
+ else
+ {
+ xdev -> procs -> map_rgb_color = amiga_color_map_rgb_color;
+ xdev -> procs -> map_color_rgb = amiga_color_map_color_rgb;
+ }
+
+ /* Remember the size of the RGB cube. */
+
+ xdev -> cube_size = cube_size;
+}
+
+ /* set_colour_printer_device(gx_device_amiga *dev,LONG CubeSize):
+ *
+ * Configure the printer device for colour output.
+ */
+
+VOID
+set_colour_printer_device(gx_device_amiga *dev,LONG CubeSize)
+{
+ xdev -> color_info . depth = 16;
+ xdev -> color_info . num_components = 3;
+ xdev -> color_info . max_gray = CubeSize - 1;
+ xdev -> color_info . max_rgb = CubeSize - 1;
+ xdev -> color_info . dither_gray = CubeSize;
+ xdev -> color_info . dither_rgb = CubeSize;
+
+ xdev -> procs -> fill_rectangle = amiga_fill_rectangle_raw_color;
+ xdev -> procs -> copy_mono = amiga_copy_mono_raw_color;
+ xdev -> procs -> copy_color = amiga_copy_color_raw_color16;
+ xdev -> procs -> draw_line = amiga_draw_line_raw_color;
+ xdev -> procs -> get_bits = gx_default_get_bits;
+ xdev -> procs -> map_rgb_color = amiga_color_map_rgb_color;
+ xdev -> procs -> map_color_rgb = amiga_color_map_color_rgb;
+ xdev -> cube_size = CubeSize;
+}
+
+ /* DeleteBitMap(struct BitMap *BitMap,BOOL Private):
+ *
+ * Free memory associated with a custom rendering bitmap.
+ */
+
+VOID
+DeleteBitMap(struct BitMap *BitMap,BOOL Private)
+{
+ if(GfxBase -> LibNode . lib_Version >= 39 && !Private)
+ FreeBitMap(BitMap);
+ else
+ {
+ LONG i;
+
+ for(i = 0 ; i < BitMap -> Depth ; i++)
+ {
+ if(BitMap -> Planes[i])
+ FreeVec(BitMap -> Planes[i]);
+ }
+
+ FreeVec(BitMap);
+ }
+}
+
+ /* CreateBitMap(LONG Width,LONG Height,LONG Depth,ULONG Flags,struct BitMap *Friend,BOOL Private):
+ *
+ * Create a custom rendering bitmap.
+ */
+
+struct BitMap *
+CreateBitMap(LONG Width,LONG Height,LONG Depth,ULONG Flags,struct BitMap *Friend,BOOL Private)
+{
+ if(GfxBase -> LibNode . lib_Version >= 39 && !Private)
+ return(AllocBitMap(Width,Height,Depth,Flags,Friend));
+ else
+ {
+ struct BitMap *BitMap;
+ LONG Plus;
+ ULONG MemType;
+
+ /* Bitmap structure needs to be padded if more
+ * than the standard eight bitplanes are to be
+ * allocated.
+ */
+
+ if(Depth > 8)
+ Plus = (Depth - 8) * sizeof(PLANEPTR);
+ else
+ Plus = 0;
+
+ if(Private)
+ MemType = MEMF_ANY;
+ else
+ MemType = MEMF_CHIP;
+
+ if(BitMap = (struct BitMap *)AllocVec(sizeof(struct BitMap) + Plus,MEMF_ANY | MEMF_CLEAR))
+ {
+ LONG i,PageSize;
+
+ InitBitMap(BitMap,Depth,Width,Height);
+
+ PageSize = BitMap -> BytesPerRow * BitMap -> Rows;
+
+ for(i = 0 ; i < BitMap -> Depth ; i++)
+ {
+ if(!(BitMap -> Planes[i] = (PLANEPTR)AllocVec(PageSize,MemType)))
+ {
+ LONG j;
+
+ for(j = 0 ; j < i ; j++)
+ FreeVec(BitMap -> Planes[j]);
+
+ FreeVec(BitMap);
+
+ return(NULL);
+ }
+ }
+
+ return(BitMap);
+ }
+ }
+}
+
+ /* DeleteTempRPort(struct RastPort *Temp):
+ *
+ * Free memory associated with a temporary raster port.
+ */
+
+VOID
+DeleteTempRPort(struct RastPort *Temp)
+{
+ DeleteBitMap(Temp -> BitMap,FALSE);
+
+ FreeVec(Temp);
+}
+
+ /* CreateTempRPort(struct RastPort *Source):
+ *
+ * Allocate memory for temporary raster port (one line high).
+ */
+
+struct RastPort *
+CreateTempRPort(struct RastPort *Source)
+{
+ struct RastPort *Temp;
+
+ if(Temp = (struct RastPort *)AllocVec(sizeof(struct RastPort),MEMF_ANY))
+ {
+ LONG Width,Depth;
+
+ CopyMem(Source,Temp,sizeof(struct RastPort));
+
+ Temp -> Layer = NULL;
+
+ if(GfxBase -> LibNode . lib_Version >= 39)
+ {
+ Width = GetBitMapAttr(Source -> BitMap,BMA_WIDTH);
+ Depth = GetBitMapAttr(Source -> BitMap,BMA_DEPTH);
+ }
+ else
+ {
+ Width = Source -> BitMap -> BytesPerRow * 8;
+ Depth = Source -> BitMap -> Depth;
+ }
+
+ if(Temp -> BitMap = CreateBitMap(Width,1,Depth,NULL,Source -> BitMap,FALSE))
+ return(Temp);
+ else
+ FreeVec(Temp);
+ }
+
+ return(NULL);
+}
+
+ /* Euclid(LONG a,LONG b):
+ *
+ * Compute the greatest common divisor of two integers.
+ */
+
+LONG
+Euclid(LONG a,LONG b)
+{
+ do
+ {
+ if(a < b)
+ {
+ LONG t;
+
+ t = a;
+ a = b;
+ b = t;
+ }
+
+ a = a % b;
+ }
+ while(a);
+
+ return(b);
+}
+
+ /* PutDump(register BYTE *Destination,register LONG Count):
+ *
+ * Store a byte dump.
+ */
+
+BYTE *
+PutDump(register BYTE *Destination,register LONG Count)
+{
+ register BYTE *Source = Buffer;
+
+ *Destination++ = Count - 1;
+ PackedBytes += Count + 1;
+
+ while(Count--)
+ *Destination++ = *Source++;
+
+ return(Destination);
+}
+
+ /* PutRun(register BYTE *Destination,LONG Count,WORD Char):
+ *
+ * Store a byte run.
+ */
+
+BYTE *
+PutRun(register BYTE *Destination,LONG Count,WORD Char)
+{
+ *Destination++ = -(Count - 1);
+ *Destination++ = Char;
+ PackedBytes += 2;
+
+ return(Destination);
+}
+
+ /* PackRow(PLANEPTR *SourcePtr,register BYTE *Destination,LONG RowSize):
+ *
+ * Pack a raster line using the CmpByteRun1 algorithm.
+ */
+
+LONG
+PackRow(PLANEPTR *SourcePtr,register BYTE *Destination,LONG RowSize)
+{
+ register BYTE *Source = *SourcePtr;
+
+ WORD Buffered = 1,
+ RunStart = 0;
+ BYTE Mode = DUMP,
+ LastChar,
+ Char;
+
+ PackedBytes = 0;
+
+ Buffer[0] = LastChar = Char = *Source++;
+
+ RowSize--;
+
+ while(RowSize--)
+ {
+ Buffer[Buffered++] = Char = *Source++;
+
+ if(Mode)
+ {
+ if((Char != LastChar) || (Buffered - RunStart > MAXRUN))
+ {
+ Destination = PutRun(Destination,Buffered - 1 - RunStart,LastChar);
+ Buffer[0] = Char;
+ Buffered = 1;
+ RunStart = 0;
+ Mode = DUMP;
+ }
+ }
+ else
+ {
+ if(Buffered > MAXDAT)
+ {
+ Destination = PutDump(Destination,Buffered - 1);
+ Buffer[0] = Char;
+ Buffered = 1;
+ RunStart = 0;
+ }
+ else
+ {
+ if(Char == LastChar)
+ {
+ if(Buffered - RunStart >= MINRUN)
+ {
+ if(RunStart)
+ Destination = PutDump(Destination,RunStart);
+
+ Mode = RUN;
+ }
+ else
+ {
+ if(!RunStart)
+ Mode = RUN;
+ }
+ }
+ else
+ RunStart = Buffered - 1;
+ }
+ }
+
+ LastChar = Char;
+ }
+
+ if(Mode)
+ PutRun(Destination,Buffered - RunStart,LastChar);
+ else
+ PutDump(Destination,Buffered);
+
+ *SourcePtr = Source;
+
+ return(PackedBytes);
+}
+
+ /* PutBODY(struct IFFHandle *Handle,struct BitMap *BitMap):
+ *
+ * Store a bitmap in a BODY chunk.
+ */
+
+BOOL
+PutBODY(struct IFFHandle *Handle,struct BitMap *BitMap)
+{
+ PLANEPTR *Planes;
+ BYTE *PackBuffer;
+ BOOL Success = FALSE;
+ LONG PackedBytes,
+ i,j;
+
+ /* Allocate the bitplane information. */
+
+ if(Planes = (PLANEPTR *)AllocVec(BitMap -> Depth * sizeof(PLANEPTR *),MEMF_ANY | MEMF_CLEAR))
+ {
+ /* Allocate the compression buffer. */
+
+ if(PackBuffer = (BYTE *)AllocVec(BitMap -> BytesPerRow * 2,MEMF_ANY))
+ {
+ /* Copy the planes over. */
+
+ for(i = 0 ; i < BitMap -> Depth ; i++)
+ Planes[i] = BitMap -> Planes[i];
+
+ if(!PushChunk(Handle,0,ID_BODY,IFFSIZE_UNKNOWN))
+ {
+ Success = TRUE;
+
+ /* Run down the rows. */
+
+ for(i = 0 ; Success && i < BitMap -> Rows ; i++)
+ {
+ for(j = 0 ; Success && j < BitMap -> Depth ; j++)
+ {
+ /* Pack the data. */
+
+ PackedBytes = PackRow(&Planes[j],PackBuffer,BitMap -> BytesPerRow);
+
+ /* Write it to disk. */
+
+ if(WriteChunkRecords(Handle,PackBuffer,PackedBytes,1) != 1)
+ Success = FALSE;
+ }
+ }
+
+ if(PopChunk(Handle))
+ Success = FALSE;
+ }
+
+ FreeVec(PackBuffer);
+ }
+
+ FreeVec(Planes);
+ }
+
+ return(Success);
+}
+
+ /* PutANNO(struct IFFHandle *Handle):
+ *
+ * Store annotation chunk.
+ */
+
+BOOL
+PutANNO(struct IFFHandle *Handle)
+{
+ STATIC STRPTR Note = "Rendered by GNU Ghostscript 2.6.0";
+
+ if(!PushChunk(Handle,0,ID_ANNO,strlen(Note)))
+ {
+ if(WriteChunkRecords(Handle,Note,strlen(Note),1) == 1)
+ {
+ if(!PopChunk(Handle))
+ return(TRUE);
+ }
+ }
+
+ return(FALSE);
+}
+
+ /* PutCAMG(struct IFFHandle *Handle):
+ *
+ * Store display mode chunk.
+ */
+
+BOOL
+PutCAMG(struct IFFHandle *Handle)
+{
+ ULONG ViewModes = HIRESLACE_KEY;
+
+ if(!PushChunk(Handle,0,ID_CAMG,sizeof(ULONG)))
+ {
+ if(WriteChunkRecords(Handle,&ViewModes,sizeof(ULONG),1) == 1)
+ {
+ if(!PopChunk(Handle))
+ return(TRUE);
+ }
+ }
+
+ return(FALSE);
+}
+
+ /* PutCMAP(struct IFFHandle *Handle):
+ *
+ * Store colour map chunk.
+ */
+
+BOOL
+PutCMAP(struct IFFHandle *Handle)
+{
+ STATIC UBYTE Colours[2][3] =
+ {
+ 0x00,0x00,0x00,
+ 0xFF,0xFF,0xFF
+ };
+
+ if(!PushChunk(Handle,0,ID_CMAP,sizeof(Colours)))
+ {
+ if(WriteChunkRecords(Handle,Colours,2,3) == 3)
+ {
+ if(!PopChunk(Handle))
+ return(TRUE);
+ }
+ }
+
+ return(FALSE);
+}
+
+ /* PutDPI(struct IFFHandle *Handle,UWORD X_DPI,UWORD Y_DPI):
+ *
+ * Store DPI chunk.
+ */
+
+BOOL
+PutDPI(struct IFFHandle *Handle,UWORD X_DPI,UWORD Y_DPI)
+{
+ DPIHeader Header;
+
+ Header . dpi_x = X_DPI;
+ Header . dpi_y = Y_DPI;
+
+ if(!PushChunk(Handle,0,ID_DPI,sizeof(Header)))
+ {
+ if(WriteChunkRecords(Handle,&Header,sizeof(Header),1) == 1)
+ {
+ if(!PopChunk(Handle))
+ return(TRUE);
+ }
+ }
+
+ return(FALSE);
+}
+
+ /* PutBMHD(struct IFFHandle *Handle,LONG Width,LONG Height,UWORD X_DPI,UWORD Y_DPI):
+ *
+ * Store BMHD chunk.
+ */
+
+BOOL
+PutBMHD(struct IFFHandle *Handle,LONG Width,LONG Height,UWORD X_DPI,UWORD Y_DPI)
+{
+ /* Valid parameters? */
+
+ if(X_DPI > 0 && Y_DPI > 0 && Width > 0 && Height > 0)
+ {
+ BitMapHeader Header;
+ UWORD gcd;
+
+ /* So we can store neat & small
+ * aspect ration values.
+ */
+
+ gcd = Euclid(X_DPI,Y_DPI);
+
+ Header . w = Width;
+ Header . h = Height;
+ Header . pageWidth = Width;
+ Header . pageHeight = Height;
+ Header . x = 0;
+ Header . y = 0;
+ Header . nPlanes = 1;
+ Header . masking = 0;
+ Header . compression = 1;
+ Header . pad1 = 0;
+ Header . transparentColor = 0;
+ Header . xAspect = X_DPI / gcd;
+ Header . yAspect = Y_DPI / gcd;
+
+ if(!PushChunk(Handle,0,ID_BMHD,sizeof(Header)))
+ {
+ if(WriteChunkRecords(Handle,&Header,sizeof(Header),1) == 1)
+ {
+ if(!PopChunk(Handle))
+ return(TRUE);
+ }
+ }
+ }
+
+ return(FALSE);
+}
+
+ /* SaveBitMap(STRPTR Name,struct BitMap *BitMap,LONG Width,LONG Height,UWORD X_DPI,UWORD Y_DPI):
+ *
+ * Store a bitmap in an IFF-ILBM file.
+ */
+
+BOOL
+SaveBitMap(STRPTR Name,struct BitMap *BitMap,LONG Width,LONG Height,UWORD X_DPI,UWORD Y_DPI)
+{
+ struct IFFHandle *Handle;
+ BOOL Success = FALSE;
+
+ if(Handle = AllocIFF())
+ {
+ if(Handle -> iff_Stream = Open(Name,MODE_NEWFILE))
+ {
+ InitIFFasDOS(Handle);
+
+ if(!OpenIFF(Handle,IFFF_WRITE))
+ {
+ if(!PushChunk(Handle,ID_ILBM,ID_FORM,IFFSIZE_UNKNOWN))
+ {
+ if(PutBMHD(Handle,Width,Height,X_DPI,Y_DPI))
+ {
+ if(PutANNO(Handle))
+ {
+ if(PutCMAP(Handle))
+ {
+ if(PutCAMG(Handle))
+ {
+ if(PutDPI(Handle,X_DPI,Y_DPI))
+ {
+ if(PutBODY(Handle,BitMap))
+ Success = TRUE;
+ }
+ }
+ }
+ }
+ }
+
+ if(PopChunk(Handle))
+ Success = FALSE;
+ }
+
+ CloseIFF(Handle);
+ }
+
+ Close(Handle -> iff_Stream);
+
+ if(!Success)
+ DeleteFile(Name);
+ }
+
+ FreeIFF(Handle);
+ }
+
+ return(Success);
+}
+
+ /* GetInches(STRPTR Buffer):
+ *
+ * Turn a parameter string into a number representing
+ * a certain number of inches.
+ */
+
+float
+GetInches(STRPTR Buffer)
+{
+ STATIC struct { STRPTR Unit; float Factor; } Units[7] =
+ {
+ "pt", 1.0, /* Point */
+ "pc", 12.0, /* Pica */
+ "in", 72.72, /* Inch */
+ "cm", 72.72 / 2.54, /* Centimeter */
+ "mm", 727.2 / 2.54, /* Millimeter */
+ "dd", 1157.0 / 1238.0, /* Didot point */
+ "cc", 1157.0 / 103.0 /* Cicero */
+ };
+
+ UBYTE Temp[40];
+ float Value;
+ LONG i;
+
+ i = 0;
+
+ /* Strip the numeric part. */
+
+ while((Buffer[i] >= '0' && Buffer[i] <= '9') || Buffer[i] == '.' || Buffer[i] == '+' || Buffer[i] == '-' || Buffer[i] == 'e')
+ {
+ Temp[i] = Buffer[i];
+
+ i++;
+ }
+
+ /* Provide null-termination. */
+
+ Temp[i] = 0;
+
+ /* atof() appears to be broken in ixemul.library 39.45. */
+
+ sscanf(Temp,"%f",&Value);
+
+ Buffer += i;
+
+ /* Which measuring unit? */
+
+ for(i = 0 ; i < 7 ; i++)
+ {
+ /* Return the result in inches. */
+
+ if(!Stricmp(Buffer,Units[i] . Unit))
+ return(Value * Units[i] . Factor / 72.27);
+ }
+
+ /* Return the result in inches. */
+
+ return(Value / 72.27);
+}
+
+ /* DispatchTask():
+ *
+ * Asynchronous window message dispatcher.
+ */
+
+VOID
+DispatchTask()
+{
+ struct Task *me;
+ gx_device *dev;
+
+ /* Set up global data area base register. */
+
+ ix_geta4();
+
+ /* Who am I? */
+
+ me = FindTask(NULL);
+
+ /* Wait for wakeup call. */
+
+ Wait(SIG_HANDSHAKE);
+
+ /* Obtain device pointer. */
+
+ dev = me -> tc_UserData;
+
+ /* Enable user input. */
+
+ if(ModifyIDCMP(xdev -> window,IDCMP_FLAGS))
+ {
+ ULONG Mask = 1 << xdev -> window -> UserPort -> mp_SigBit,
+ Set;
+ BOOL Done = FALSE;
+
+ /* Fill in the dispatcher entry. */
+
+ xdev -> dispatcher = me;
+
+ /* Ring back. */
+
+ Signal((struct Task *)xdev -> main,SIG_HANDSHAKE);
+
+ /* Wait for input... */
+
+ do
+ {
+ Set = Wait(Mask | SIG_KILL);
+
+ if(Set & Mask)
+ DispatchSuperWindow(dev);
+
+ if(Set & SIG_KILL)
+ Done = TRUE;
+ }
+ while(!Done);
+
+ /* Disable user input. */
+
+ ModifyIDCMP(xdev -> window,NULL);
+ }
+
+ /* Disable task switching. */
+
+ Forbid();
+
+ /* Clear the dispatcher entry. */
+
+ xdev -> dispatcher = NULL;
+
+ /* Signal the main process that we are done. */
+
+ Signal((struct Task *)xdev -> main,SIG_HANDSHAKE);
+
+ /* Remove ourselves. */
+
+ RemTask(NULL);
+}
+
+ /* DeleteScrollers(gx_device *dev):
+ *
+ * Delete the window border scrollers.
+ */
+
+VOID
+DeleteScrollers(gx_device *dev)
+{
+ if(xdev -> gadget)
+ {
+ if(xdev -> gadget[HORIZONTAL_SCROLLER])
+ DisposeObject(xdev -> gadget[HORIZONTAL_SCROLLER]);
+
+ if(xdev -> gadget[VERTICAL_SCROLLER])
+ DisposeObject(xdev -> gadget[VERTICAL_SCROLLER]);
+
+ if(xdev -> gadget[UP_ARROW])
+ DisposeObject(xdev -> gadget[UP_ARROW]);
+
+ if(xdev -> gadget[DOWN_ARROW])
+ DisposeObject(xdev -> gadget[DOWN_ARROW]);
+
+ if(xdev -> gadget[LEFT_ARROW])
+ DisposeObject(xdev -> gadget[LEFT_ARROW]);
+
+ if(xdev -> gadget[RIGHT_ARROW])
+ DisposeObject(xdev -> gadget[RIGHT_ARROW]);
+
+ FreeVec(xdev -> gadget);
+
+ xdev -> gadget = NULL;
+ }
+
+ if(xdev -> image)
+ {
+ if(xdev -> image[UP_IMAGE])
+ DisposeObject(xdev -> image[UP_IMAGE]);
+
+ if(xdev -> image[DOWN_IMAGE])
+ DisposeObject(xdev -> image[DOWN_IMAGE]);
+
+ if(xdev -> image[LEFT_IMAGE])
+ DisposeObject(xdev -> image[LEFT_IMAGE]);
+
+ if(xdev -> image[RIGHT_IMAGE])
+ DisposeObject(xdev -> image[RIGHT_IMAGE]);
+
+ FreeVec(xdev -> image);
+
+ xdev -> image = NULL;
+ }
+}
+
+ /* CreateScrollers(gx_device *dev,struct Screen *Screen):
+ *
+ * Create the window border scroller handles.
+ */
+
+BOOL
+CreateScrollers(gx_device *dev,struct Screen *Screen)
+{
+ BOOL Result = FALSE;
+
+ if(xdev -> gadget = (struct Gadget **)AllocVec(sizeof(struct Gadget *) * GADGET_COUNT,MEMF_ANY | MEMF_CLEAR | MEMF_PUBLIC))
+ {
+ if(xdev -> image = (struct Image **)AllocVec(sizeof(struct Image *) * IMAGE_COUNT,MEMF_ANY | MEMF_CLEAR | MEMF_PUBLIC))
+ {
+ struct DrawInfo *DrawInfo;
+
+ if(DrawInfo = GetScreenDrawInfo(Screen))
+ {
+ LONG SizeWidth,
+ SizeHeight;
+ UWORD SizeType;
+
+ if(Screen -> Flags & SCREENHIRES)
+ {
+ SizeWidth = 18;
+ SizeHeight = 10;
+
+ SizeType = SYSISIZE_MEDRES;
+ }
+ else
+ {
+ SizeWidth = 13;
+ SizeHeight = 11;
+
+ SizeType = SYSISIZE_LOWRES;
+ }
+
+ if(xdev -> image[UP_IMAGE] = (struct Image *)NewObject(NULL,"sysiclass",
+ SYSIA_Size, SizeType,
+ SYSIA_Which, UPIMAGE,
+ SYSIA_DrawInfo, DrawInfo,
+ TAG_DONE))
+ {
+ if(xdev -> image[DOWN_IMAGE] = (struct Image *)NewObject(NULL,"sysiclass",
+ SYSIA_Size, SizeType,
+ SYSIA_Which, DOWNIMAGE,
+ SYSIA_DrawInfo, DrawInfo,
+ TAG_DONE))
+ {
+ if(xdev -> image[LEFT_IMAGE] = (struct Image *)NewObject(NULL,"sysiclass",
+ SYSIA_Size, SizeType,
+ SYSIA_Which, LEFTIMAGE,
+ SYSIA_DrawInfo, DrawInfo,
+ TAG_DONE))
+ {
+ if(xdev -> image[RIGHT_IMAGE] = (struct Image *)NewObject(NULL,"sysiclass",
+ SYSIA_Size, SizeType,
+ SYSIA_Which, RIGHTIMAGE,
+ SYSIA_DrawInfo, DrawInfo,
+ TAG_DONE))
+ {
+ if(xdev -> gadget[VERTICAL_SCROLLER] = NewObject(NULL,"propgclass",
+ GA_ID, VERTICAL_SCROLLER,
+
+ GA_Top, Screen -> WBorTop + Screen -> Font -> ta_YSize + 2,
+ GA_RelHeight, -(Screen -> WBorTop + Screen -> Font -> ta_YSize + 2 + SizeHeight + 1 + 2 * ARROW_HEIGHT),
+ GA_Width, SizeWidth - 8,
+ GA_RelRight, -(SizeWidth - 5),
+
+ GA_GZZGadget, TRUE,
+ GA_Immediate, TRUE,
+ GA_FollowMouse, TRUE,
+ GA_RelVerify, TRUE,
+ GA_RightBorder, TRUE,
+
+ PGA_Freedom, FREEVERT,
+ PGA_NewLook, TRUE,
+ PGA_Borderless, TRUE,
+
+ PGA_Visible, 1,
+ PGA_Total, 1,
+ TAG_DONE))
+ {
+ if(xdev -> gadget[HORIZONTAL_SCROLLER] = NewObject(NULL,"propgclass",
+ GA_ID, HORIZONTAL_SCROLLER,
+ GA_Previous, xdev -> gadget[VERTICAL_SCROLLER],
+
+ GA_Height, SizeHeight - 4,
+ GA_RelBottom, -(SizeHeight - 4 + 1),
+ GA_Left, 4,
+ GA_RelWidth, -(2 + SizeWidth + 4 + 2 * ARROW_WIDTH),
+
+ GA_GZZGadget, TRUE,
+ GA_Immediate, TRUE,
+ GA_FollowMouse, TRUE,
+ GA_RelVerify, TRUE,
+ GA_BottomBorder,TRUE,
+
+ PGA_Freedom, FREEHORIZ,
+ PGA_NewLook, TRUE,
+ PGA_Borderless, TRUE,
+
+ PGA_Visible, 1,
+ PGA_Total, 1,
+ TAG_DONE))
+ {
+ STATIC struct TagItem ArrowMappings[] = { GA_ID, GA_ID, TAG_END };
+
+ if(xdev -> gadget[UP_ARROW] = NewObject(NULL,"buttongclass",
+ GA_ID, UP_ARROW,
+ GA_Previous, xdev -> gadget[HORIZONTAL_SCROLLER],
+
+ GA_GZZGadget, TRUE,
+ GA_Image, xdev -> image[UP_IMAGE],
+ GA_RelRight, -(SizeWidth - 1),
+ GA_RelBottom, -(SizeHeight - 1 + 2 * ARROW_HEIGHT),
+ GA_Height, ARROW_HEIGHT,
+ GA_Width, SizeWidth,
+ GA_Immediate, TRUE,
+ GA_RelVerify, TRUE,
+ GA_RightBorder, TRUE,
+
+ ICA_TARGET, ICTARGET_IDCMP,
+ ICA_MAP, ArrowMappings,
+ TAG_DONE))
+ {
+ if(xdev -> gadget[DOWN_ARROW] = NewObject(NULL,"buttongclass",
+ GA_ID, DOWN_ARROW,
+ GA_Previous, xdev -> gadget[UP_ARROW],
+
+ GA_GZZGadget, TRUE,
+ GA_Image, xdev -> image[DOWN_IMAGE],
+ GA_RelRight, -(SizeWidth - 1),
+ GA_RelBottom, -(SizeHeight - 1 + ARROW_HEIGHT),
+ GA_Height, ARROW_HEIGHT,
+ GA_Width, SizeWidth,
+ GA_Immediate, TRUE,
+ GA_RelVerify, TRUE,
+ GA_RightBorder, TRUE,
+
+ ICA_TARGET, ICTARGET_IDCMP,
+ ICA_MAP, ArrowMappings,
+ TAG_DONE))
+ {
+ if(xdev -> gadget[LEFT_ARROW] = NewObject(NULL,"buttongclass",
+ GA_ID, LEFT_ARROW,
+ GA_Previous, xdev -> gadget[DOWN_ARROW],
+
+ GA_GZZGadget, TRUE,
+ GA_Image, xdev -> image[LEFT_IMAGE],
+ GA_RelRight, -(SizeWidth - 1 + 2 * ARROW_WIDTH),
+ GA_RelBottom, -(SizeHeight - 1),
+ GA_Height, SizeHeight,
+ GA_Width, ARROW_WIDTH,
+ GA_Immediate, TRUE,
+ GA_RelVerify, TRUE,
+ GA_BottomBorder,TRUE,
+
+ ICA_TARGET, ICTARGET_IDCMP,
+ ICA_MAP, ArrowMappings,
+ TAG_DONE))
+ {
+ if(xdev -> gadget[RIGHT_ARROW] = NewObject(NULL,"buttongclass",
+ GA_ID, RIGHT_ARROW,
+ GA_Previous, xdev -> gadget[LEFT_ARROW],
+
+ GA_GZZGadget, TRUE,
+ GA_Image, xdev -> image[RIGHT_IMAGE],
+ GA_RelRight, -(SizeWidth - 1 + ARROW_WIDTH),
+ GA_RelBottom, -(SizeHeight - 1),
+ GA_Height, SizeHeight,
+ GA_Width, ARROW_WIDTH,
+ GA_Immediate, TRUE,
+ GA_RelVerify, TRUE,
+ GA_BottomBorder,TRUE,
+
+ ICA_TARGET, ICTARGET_IDCMP,
+ ICA_MAP, ArrowMappings,
+ TAG_DONE))
+ Result = TRUE;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ FreeScreenDrawInfo(Screen,DrawInfo);
+ }
+ }
+ }
+
+ return(Result);
+}
+
+ /* WindowResize(gx_device *dev):
+ *
+ * Update the slider sizes and positions after the window
+ * was resized.
+ */
+
+VOID
+WindowResize(gx_device *dev)
+{
+ LONG DeltaX,
+ DeltaY,
+ Temp;
+
+ /* Query the current horizontal slider position. */
+
+ if((Temp = LAYERXOFFSET(xdev -> window) + xdev -> window -> GZZWidth) > xdev -> super_width)
+ DeltaX = xdev -> super_width - Temp;
+ else
+ DeltaX = 0;
+
+ /* Query the current vertical slider position. */
+
+ if((Temp = LAYERYOFFSET(xdev -> window) + xdev -> window -> GZZHeight) > xdev -> super_height)
+ DeltaY = xdev -> super_height - Temp;
+ else
+ DeltaY = 0;
+
+ /* Move the currently displayed window area around. */
+
+ if(DeltaX || DeltaY)
+ ScrollLayer(NULL,xdev -> window -> RPort -> Layer,DeltaX,DeltaY);
+
+ /* Update the new horizontal slider position and size. */
+
+ SetGadgetAttrs(xdev -> gadget[HORIZONTAL_SCROLLER],xdev -> window,NULL,
+ PGA_Top, LAYERXOFFSET(xdev -> window),
+ PGA_Visible, xdev -> window -> GZZWidth,
+ PGA_Total, xdev -> super_width,
+ TAG_DONE);
+
+ /* Update the new vertical slider position and size. */
+
+ SetGadgetAttrs(xdev -> gadget[VERTICAL_SCROLLER],xdev -> window,NULL,
+ PGA_Top, LAYERYOFFSET(xdev -> window),
+ PGA_Visible, xdev -> window -> GZZHeight,
+ PGA_Total, xdev -> super_height,
+ TAG_DONE);
+}
+
+ /* WindowUpdate(struct Gadget *Gadget,gx_device *dev):
+ *
+ * Move the currently visible portion of the
+ * window according to the current slider
+ * position.
+ */
+
+VOID
+WindowUpdate(struct Gadget *Gadget,gx_device *dev)
+{
+ LONG Storage;
+
+ switch(Gadget -> GadgetID)
+ {
+ case HORIZONTAL_SCROLLER:
+
+ if(GetAttr(PGA_Top,Gadget,&Storage))
+ ScrollLayer(NULL,xdev -> window -> RPort -> Layer,Storage - LAYERXOFFSET(xdev -> window),0);
+
+ break;
+
+ case VERTICAL_SCROLLER:
+
+ if(GetAttr(PGA_Top,Gadget,&Storage))
+ ScrollLayer(NULL,xdev -> window -> RPort -> Layer,0,Storage - LAYERYOFFSET(xdev -> window));
+
+ break;
+ }
+}
+
+ /* MoveAround(struct Gadget *Gadget,int How,gx_device *dev):
+ *
+ * Move the currently visible window area according to
+ * user input.
+ */
+
+VOID
+MoveAround(struct Gadget *Gadget,LONG How,gx_device *dev)
+{
+ LONG Storage;
+
+ if(GetAttr(PGA_Top,Gadget,&Storage))
+ {
+ LONG Max;
+
+ switch(Gadget -> GadgetID)
+ {
+ case HORIZONTAL_SCROLLER:
+
+ Max = xdev -> super_width - xdev -> window -> GZZWidth;
+ break;
+
+ case VERTICAL_SCROLLER:
+
+ Max = xdev -> super_height - xdev -> window -> GZZHeight;
+ break;
+ }
+
+ switch(How)
+ {
+ case MOVE_MIN:
+
+ Storage = 0;
+ break;
+
+ case MOVE_MAX:
+
+ Storage = Max;
+ break;
+
+ case MOVE_DOWN:
+
+ if(Storage > xdev -> super_height / 100)
+ Storage -= xdev -> super_height / 100;
+ else
+ Storage = 0;
+
+ break;
+
+ case MOVE_FAR_DOWN:
+
+ if(Storage > xdev -> super_height / 10)
+ Storage -= xdev -> super_height / 10;
+ else
+ Storage = 0;
+
+ break;
+
+ case MOVE_FAR_UP:
+
+ if(Storage + xdev -> super_width / 10 < Max)
+ Storage += xdev -> super_width / 10;
+ else
+ Storage = Max;
+
+ break;
+
+ case MOVE_UP:
+
+ if(Storage + xdev -> super_width / 100 < Max)
+ Storage += xdev -> super_width / 100;
+ else
+ Storage = Max;
+
+ break;
+ }
+
+ switch(Gadget -> GadgetID)
+ {
+ case HORIZONTAL_SCROLLER:
+
+ if(LAYERXOFFSET(xdev -> window) != Storage)
+ {
+ ScrollLayer(NULL,xdev -> window -> RPort -> Layer,Storage - LAYERXOFFSET(xdev -> window),0);
+
+ SetGadgetAttrs(Gadget,xdev -> window,NULL,
+ PGA_Top,Storage,
+ TAG_DONE);
+ }
+
+ break;
+
+ case VERTICAL_SCROLLER:
+
+ if(LAYERYOFFSET(xdev -> window) != Storage)
+ {
+ ScrollLayer(NULL,xdev -> window -> RPort -> Layer,0,Storage - LAYERYOFFSET(xdev -> window));
+
+ SetGadgetAttrs(Gadget,xdev -> window,NULL,
+ PGA_Top,Storage,
+ TAG_DONE);
+ }
+
+ break;
+ }
+ }
+}
+
+ /* DispatchSuperWindow(gx_device *dev):
+ *
+ * Dispatch user window input.
+ */
+
+VOID
+DispatchSuperWindow(gx_device *dev)
+{
+ STATIC struct Gadget *CurrentGadget = NULL;
+
+ struct IntuiMessage *IntuiMessage;
+ ULONG MsgClass,
+ MsgCode,
+ MsgQualifier;
+ struct Gadget *MsgGadget;
+
+ while(IntuiMessage = (struct IntuiMessage *)GetMsg(xdev -> window -> UserPort))
+ {
+ MsgClass = IntuiMessage -> Class;
+ MsgCode = IntuiMessage -> Code;
+ MsgQualifier = IntuiMessage -> Qualifier;
+ MsgGadget = IntuiMessage -> IAddress;
+
+ ReplyMsg((struct Message *)IntuiMessage);
+
+ switch(MsgClass)
+ {
+ case IDCMP_VANILLAKEY:
+
+ if(MsgCode == '\033' || MsgCode == '\003')
+ Signal((struct Task *)xdev -> main,SIG_KILL);
+
+ break;
+
+ case IDCMP_RAWKEY:
+
+ switch(MsgCode)
+ {
+ case HELP_CODE:
+
+ DisplayBeep(xdev -> window -> WScreen);
+
+ break;
+
+ case CURSORUP:
+
+ if(MsgQualifier & IEQUALIFIER_CONTROL)
+ MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_MIN,dev);
+ else
+ {
+ if(MsgQualifier & (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT))
+ MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_FAR_DOWN,dev);
+ else
+ MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_DOWN,dev);
+ }
+
+ break;
+
+ case CURSORLEFT:
+
+ if(MsgQualifier & IEQUALIFIER_CONTROL)
+ MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_MIN,dev);
+ else
+ {
+ if(MsgQualifier & (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT))
+ MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_FAR_DOWN,dev);
+ else
+ MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_DOWN,dev);
+ }
+
+ break;
+
+ case CURSORRIGHT:
+
+ if(MsgQualifier & IEQUALIFIER_CONTROL)
+ MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_MAX,dev);
+ else
+ {
+ if(MsgQualifier & (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT))
+ MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_FAR_UP,dev);
+ else
+ MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_UP,dev);
+ }
+
+ break;
+
+ case CURSORDOWN:
+
+ if(MsgQualifier & IEQUALIFIER_CONTROL)
+ MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_MAX,dev);
+ else
+ {
+ if(MsgQualifier & (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT))
+ MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_FAR_UP,dev);
+ else
+ MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_UP,dev);
+ }
+
+ break;
+
+ default:
+
+ break;
+ }
+
+ break;
+
+ case IDCMP_CLOSEWINDOW:
+
+ Signal((struct Task *)xdev -> main,SIG_KILL);
+
+ break;
+
+ case IDCMP_GADGETDOWN:
+
+ CurrentGadget = MsgGadget;
+
+ WindowUpdate(MsgGadget,dev);
+
+ break;
+
+ case IDCMP_GADGETUP:
+
+ CurrentGadget = NULL;
+
+ WindowUpdate(MsgGadget,dev);
+
+ break;
+
+ case IDCMP_MOUSEMOVE:
+
+ if(CurrentGadget)
+ WindowUpdate(CurrentGadget,dev);
+
+ break;
+
+ case IDCMP_IDCMPUPDATE:
+
+ switch(GetTagData(GA_ID,0,(struct TagItem *)MsgGadget))
+ {
+ case UP_ARROW:
+
+ MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_DOWN,dev);
+ break;
+
+ case DOWN_ARROW:
+
+ MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_UP,dev);
+ break;
+
+ case LEFT_ARROW:
+
+ MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_DOWN,dev);
+ break;
+
+ case RIGHT_ARROW:
+
+ MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_UP,dev);
+ break;
+
+ default:
+
+ break;
+ }
+
+ break;
+
+ case IDCMP_NEWSIZE:
+
+ WindowResize(dev);
+
+ break;
+
+ default:
+
+ break;
+ }
+ }
+}
+
+ /* Simple routine to call the cleanup routine of a device,
+ * all devices are smart enough to handle shutdown in
+ * case they have not been opened yet.
+ */
+
+STATIC void __inline
+close_device(gx_device_amiga *dev)
+{
+ (*xdev -> procs -> close_device)((gx_device *)dev);
+}
+
+ /* devcleanup():
+ *
+ * Clean up all devices, free all resources.
+ */
+
+void
+devcleanup()
+{
+ close_device(&gs_amiga_device);
+ close_device(&gs_amiga_low_device);
+ close_device(&gs_amiga_high_device);
+ close_device(&gs_amiga_super_device);
+ close_device(&gs_amiga_a2024_device);
+ close_device(&gs_amiga_picassoii_device);
+ close_device(&gs_amiga_custom_device);
+ close_device(&gs_amiga_printer_device);
+ close_device(&gs_amiga_ilbm_device);
+}
+
+ /* amiga_set_pen(gx_device *dev,gx_color_index color):
+ *
+ * Sets the rendering pen and remembers the current
+ * settings.
+ */
+
+STATIC VOID __inline
+amiga_set_pen(gx_device *dev,gx_color_index color)
+{
+ if(xdev -> last_pen != color)
+ SetAPen(xdev -> rport,xdev -> last_pen = color);
+}
+
+ /* amiga_map_rgb_color(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue):
+ *
+ * Map a colour either to the black or the light rendering pen.
+ */
+
+gx_color_index
+amiga_map_rgb_color(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue)
+{
+ if((red | green | blue) > gx_max_color_value / 2)
+ return(LightPen);
+ else
+ return(DarkPen);
+}
+
+ /* amiga_map_color_rgb(gx_device *dev,gx_color_index color,gx_color_value rgb[3]):
+ *
+ * Map the light/dark rendering pen to RGB values.
+ */
+
+int
+amiga_map_color_rgb(gx_device *dev,gx_color_index color,gx_color_value rgb[3])
+{
+ int i;
+
+ if(color == LightPen)
+ {
+ for(i = 0 ; i < 3 ; i++)
+ rgb[i] = gx_max_color_value;
+ }
+ else
+ {
+ for(i = 0 ; i < 3 ; i++)
+ rgb[i] = 0;
+ }
+
+ return(0);
+}
+
+ /* AllocatePens(struct ViewPort *VPort,LONG CubeSize):
+ *
+ * Allocate shareable viewport pens.
+ */
+
+LONG *
+AllocatePens(struct ViewPort *VPort,LONG CubeSize)
+{
+ if(GfxBase -> LibNode . lib_Version >= 39)
+ {
+ LONG Total = CubeSize * CubeSize * CubeSize,*Pens;
+
+ if(Pens = (LONG *)AllocVec(sizeof(LONG) * Total,MEMF_ANY))
+ {
+ LONG i,r,g,b,max = CubeSize - 1;
+
+ for(i = 0 ; i < Total ; i++)
+ Pens[i] = -1;
+
+ i = 0;
+
+ for(r = 0 ; r < CubeSize ; r++)
+ {
+ for(g = 0 ; g < CubeSize ; g++)
+ {
+ for(b = 0 ; b < CubeSize ; b++)
+ {
+ if((Pens[i++] = ObtainBestPen(VPort -> ColorMap,SPREAD((255 * r) / max),SPREAD((255 * g) / max),SPREAD((255 * b) / max),
+ OBP_FailIfBad, TRUE,
+ OBP_Precision, PRECISION_IMAGE,
+ TAG_DONE)) == -1)
+ {
+ FreeVec(Pens);
+
+ return(NULL);
+ }
+ }
+ }
+ }
+
+ return(Pens);
+ }
+ }
+
+ return(NULL);
+}
+
+ /* amiga_open_default(gx_device *dev):
+ *
+ * Open the default device, i.e. a window on the Workbench screen.
+ */
+
+int
+amiga_open_default(gx_device *dev)
+{
+ struct Screen *DefaultScreen;
+
+ /* Get a lock on the default public screen. */
+
+ if(DefaultScreen = LockPubScreen(NULL))
+ {
+ struct DisplayInfo DisplayInfo;
+ ULONG Mode;
+
+ /* Get the default public screen display mode. */
+
+ Mode = GetVPModeID(&DefaultScreen -> ViewPort);
+
+ /* Inquire display mode information. */
+
+ if(GetDisplayInfoData(NULL,(APTR)&DisplayInfo,sizeof(struct DisplayInfo),DTAG_DISP,Mode))
+ {
+ LONG ScreenWidth,
+ ScreenHeight;
+ LONG i;
+ float Width,
+ Height;
+ LONG Depth;
+
+ if(GfxBase -> LibNode . lib_Version >= 39)
+ Depth = GetBitMapAttr(DefaultScreen -> RastPort . BitMap,BMA_DEPTH);
+ else
+ Depth = DefaultScreen -> RastPort . BitMap -> Depth;
+
+ /* Determine screen view dimensions. */
+
+ if(DefaultScreen -> ViewPort . ColorMap -> cm_vpe)
+ {
+ struct ViewPortExtra *Extra = DefaultScreen -> ViewPort . ColorMap -> cm_vpe;
+
+ ScreenWidth = Extra -> DisplayClip . MaxX - Extra -> DisplayClip . MinX + 1;
+ ScreenHeight = Extra -> DisplayClip . MaxY - Extra -> DisplayClip . MinY + 1;
+ }
+ else
+ {
+ struct ViewPortExtra *Extra;
+
+ if(Extra = (struct ViewPortExtra *)GfxLookUp(&DefaultScreen -> ViewPort))
+ {
+ ScreenWidth = Extra -> DisplayClip . MaxX - Extra -> DisplayClip . MinX + 1;
+ ScreenHeight = Extra -> DisplayClip . MaxY - Extra -> DisplayClip . MinY + 1;
+ }
+ else
+ {
+ ScreenWidth = DefaultScreen -> Width;
+ ScreenHeight = DefaultScreen -> Height;
+ }
+ }
+
+ /* Use the best guess, we will take the standard
+ * low resolution x-dpi value and scale it by
+ * the pixel speed.
+ */
+
+ if(DisplayInfo . PixelSpeed)
+ {
+ xdev -> x_pixels_per_inch = (35.0 * 140.0) / (float)DisplayInfo . PixelSpeed;
+ xdev -> y_pixels_per_inch = (xdev -> x_pixels_per_inch * (float)DisplayInfo . Resolution . x) / (float)DisplayInfo . Resolution . y;
+ }
+ else
+ {
+ xdev -> x_pixels_per_inch = 72.27;
+ xdev -> y_pixels_per_inch = 72.27;
+ }
+
+ if(xdev -> width > 0 && xdev -> height > 0)
+ {
+ xdev -> super_width = xdev -> width;
+ xdev -> super_height = xdev -> height;
+ }
+ else
+ {
+ if(xdev -> page_width > 0.0)
+ xdev -> super_width = (LONG)(xdev -> page_width * xdev -> x_pixels_per_inch);
+ else
+ xdev -> super_width = 640;
+
+ if(xdev -> page_height > 0.0)
+ xdev -> super_height = (LONG)(xdev -> page_height * xdev -> y_pixels_per_inch);
+ else
+ xdev -> super_height = 512;
+ }
+
+ /* Allocate a bitmap ready to be used for
+ * rendering.
+ */
+
+ if(xdev -> super_bitmap = CreateBitMap(xdev -> super_width,xdev -> super_height,Depth,BMF_DISPLAYABLE,DefaultScreen -> RastPort . BitMap,FALSE))
+ {
+ /* Clear the bitplanes. */
+
+ BltBitMap(xdev -> super_bitmap,0,0,xdev -> super_bitmap,0,0,xdev -> super_width,xdev -> super_height,0x00,(1 << xdev -> super_bitmap -> Depth) - 1,NULL);
+
+ /* Create the scroller handles. */
+
+ if(CreateScrollers(dev,DefaultScreen))
+ {
+ struct IBox ZoomBox;
+
+ /* Set up the window alternate
+ * position.
+ */
+
+ ZoomBox . Left = 0;
+ ZoomBox . Top = DefaultScreen -> BarHeight + 1;
+ ZoomBox . Width = ScreenWidth;
+ ZoomBox . Height = ScreenHeight - ZoomBox . Top;
+
+ /* Eventually, open the display window. */
+
+ if(xdev -> window = OpenWindowTags(NULL,
+ WA_InnerWidth, MIN(DefaultScreen -> Width / 2,xdev -> super_width),
+ WA_InnerHeight, MIN(DefaultScreen -> Height / 2,xdev -> super_height),
+ WA_CloseGadget, TRUE,
+ WA_DepthGadget, TRUE,
+ WA_SizeGadget, TRUE,
+ WA_SizeBRight, TRUE,
+ WA_SizeBBottom, TRUE,
+ WA_Zoom, &ZoomBox,
+ WA_DragBar, TRUE,
+ WA_NoCareRefresh, TRUE,
+ WA_GimmeZeroZero, TRUE,
+ WA_RMBTrap, TRUE,
+ WA_SuperBitMap, xdev -> super_bitmap,
+ WA_Gadgets, xdev -> gadget[VERTICAL_SCROLLER],
+ WA_CustomScreen, DefaultScreen,
+ WA_Title, "Ghostscript Amiga output window",
+ TAG_DONE))
+ {
+ if(xdev -> temp_rport = CreateTempRPort(xdev -> window -> RPort))
+ {
+ if(xdev -> temp_array = (UBYTE *)AllocVec((xdev -> window -> WScreen -> Width + 15) & ~15,MEMF_ANY))
+ {
+ struct Task *Task;
+
+ /* Bring the window dispatcher task
+ * to life...
+ */
+
+ if(Task = (struct Task *)CreateTask("Ghostscript window dispatcher",5,DispatchTask,8192))
+ {
+ const sigset_t trapped = sigmask(SIGINT);
+
+ /* Cheap... */
+
+ Task -> tc_UserData = dev;
+
+ /* Who's calling? */
+
+ xdev -> main = (struct Process *)FindTask(NULL);
+
+ /* Don't let anybody interrupt us! */
+
+ sigprocmask(SIG_BLOCK,&trapped,NULL);
+
+ Forbid();
+
+ /* Wake it up. */
+
+ Signal(Task,SIG_HANDSHAKE);
+
+ /* Clear the handshake bit. */
+
+ SetSignal(0,SIG_HANDSHAKE);
+
+ /* Wait for the report. */
+
+ Wait(SIG_HANDSHAKE);
+
+ Permit();
+
+ /* Get the result. */
+
+ Task = xdev -> dispatcher;
+
+ /* Unblock signals. */
+
+ sigprocmask(SIG_UNBLOCK,&trapped,NULL);
+ }
+
+ /* Did we succeed in creating
+ * the dispatcher task?
+ */
+
+ if(Task)
+ {
+ UWORD MaxValue = 0,
+ MinValue = 15000,
+ Value,
+ R,G,B;
+
+ /* Set the window limits. */
+
+ WindowLimits(xdev -> window,xdev -> window -> BorderLeft + MINIMUM_WIDTH + xdev -> window -> BorderRight,xdev -> window -> BorderTop + MINIMUM_HEIGHT + xdev -> window -> BorderBottom,xdev -> window -> BorderLeft + xdev -> super_width + xdev -> window -> BorderRight,xdev -> window -> BorderTop + xdev -> super_height + xdev -> window -> BorderBottom);
+
+ /* Update the sliders. */
+
+ WindowResize(dev);
+
+ /* Look for the darkest and the lightest screen colours. */
+
+ for(i = 0 ; i < MIN(xdev -> window -> WScreen -> ViewPort . ColorMap -> Count,(1 << Depth)) ; i++)
+ {
+ Value = GetRGB4(xdev -> window -> WScreen -> ViewPort . ColorMap,i);
+
+ R = (Value >> 8) & 0xF;
+ G = (Value >> 4) & 0xF;
+ B = Value & 0xF;
+
+ /* Luminance conversion included */
+
+ Value = R * 299 + G * 588 + B * 113;
+
+ if(Value > MaxValue)
+ {
+ MaxValue = Value;
+
+ LightPen = i;
+ }
+
+ if(Value < MinValue)
+ {
+ MinValue = Value;
+
+ DarkPen = i;
+ }
+ }
+
+ /* Fill in the rest. */
+
+ xdev -> width = xdev -> super_width;
+ xdev -> height = xdev -> super_height;
+ xdev -> rport = xdev -> window -> RPort;
+
+ /* Does the display support
+ * at least eight colours?
+ */
+
+ if(Depth >= 3)
+ {
+ LONG cube_size,max;
+
+ /* Set up a fitting colour cube. */
+
+ for(cube_size = 6 ; cube_size >= 2 ; cube_size--)
+ {
+ if((max = cube_size * cube_size * cube_size) <= 1 << Depth)
+ break;
+ }
+
+ /* Got enough colours? */
+
+ if(cube_size != 1)
+ {
+ LONG *Pens;
+
+ /* Try to grab the cube colours,
+ * making a colour display.
+ */
+
+ if(Pens = AllocatePens(&xdev -> window -> WScreen -> ViewPort,cube_size))
+ set_colour_device((gx_device_amiga *)dev,cube_size,Pens);
+ }
+ }
+
+ SetBPen(xdev -> rport,0);
+ SetDrMd(xdev -> rport,JAM2);
+
+ amiga_set_pen(dev,DarkPen);
+
+ UnlockPubScreen(NULL,DefaultScreen);
+
+ return(0);
+ }
+ else
+ perror("Ghostscript: failed to create dispatcher task");
+ }
+ else
+ perror("Ghostscript: failed to create temporary line buffer.");
+ }
+ else
+ perror("Ghostscript: failed to create temporary raster port");
+ }
+ else
+ perror("Ghostscript: failed to open window");
+ }
+ else
+ perror("Ghostscript: failed to allocate scrollers");
+ }
+ else
+ perror("Ghostscript: failed to allocate bitmap");
+ }
+ else
+ perror("Ghostscript: failed to get display mode information");
+
+ UnlockPubScreen(NULL,DefaultScreen);
+ }
+ else
+ perror("Ghostscript: failed to lock default public screen");
+
+ return(-1);
+}
+
+ /* amiga_open_low(gx_device *dev):
+ *
+ * Open the low resolution device.
+ */
+
+int
+amiga_open_low(gx_device *dev)
+{
+ return(amiga_open(dev,LORES_KEY));
+}
+
+ /* amiga_open_high(gx_device *dev):
+ *
+ * Open the high resolution device.
+ */
+
+int
+amiga_open_high(gx_device *dev)
+{
+ return(amiga_open(dev,HIRESLACE_KEY));
+}
+
+ /* amiga_open_super(gx_device *dev):
+ *
+ * Open the super high resolution device.
+ */
+
+int
+amiga_open_super(gx_device *dev)
+{
+ /* Fall back to the default if not available. */
+
+ if(ModeNotAvailable(SUPERLACE_KEY))
+ return(amiga_open_high(dev));
+ else
+ return(amiga_open(dev,SUPERLACE_KEY));
+}
+
+ /* amiga_open_a2024(gx_device *dev):
+ *
+ * Open the A2024 device.
+ */
+
+int
+amiga_open_a2024(gx_device *dev)
+{
+ /* Fall back to the default if not available. */
+
+ if(ModeNotAvailable(A2024TENHERTZ_KEY))
+ return(amiga_open_super(dev));
+ else
+ return(amiga_open(dev,A2024TENHERTZ_KEY));
+}
+
+ /* amiga_open_picassoii(gx_device *dev):
+ *
+ * Open the Picasso II device.
+ */
+
+int
+amiga_open_picassoii(gx_device *dev)
+{
+ /* Fall back to the default if not available. */
+
+ if(ModeNotAvailable(0x40020002))
+ return(amiga_open_super(dev));
+ else
+ return(amiga_open(dev,0x40020002));
+}
+
+int
+amiga_open_custom(gx_device *dev)
+{
+ UBYTE Buffer[256];
+ ULONG ScreenID = INVALID_ID;
+ BOOL DontTouch = FALSE;
+
+ /* First step: check for an environment variable to give
+ * the name of the display mode to use.
+ */
+
+ if(GetVar("GSCUSTOMMODE",Buffer,256,NULL) != -1)
+ {
+ UBYTE PatternBuffer[516];
+
+ /* Set up the search pattern. */
+
+ if(ParsePatternNoCase(Buffer,PatternBuffer,516) >= 0)
+ {
+ ULONG CurrentID = INVALID_ID,ID;
+
+ /* Scan the entire list. */
+
+ while((CurrentID = NextDisplayInfo(CurrentID)) != INVALID_ID)
+ {
+ /* Valid mode? */
+
+ if(!ModeNotAvailable(CurrentID))
+ {
+ struct NameInfo NameInfo;
+
+ /* Get the name information. */
+
+ if(GetDisplayInfoData(NULL,&NameInfo,sizeof(struct NameInfo),DTAG_NAME,CurrentID))
+ {
+ /* Does the mode name match the pattern given? */
+
+ if(MatchPatternNoCase(PatternBuffer,NameInfo . Name))
+ {
+ ScreenID = CurrentID;
+
+ /* Don't overwrite the variable contents. */
+
+ DontTouch = TRUE;
+
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if(ScreenID == INVALID_ID && AslBase)
+ {
+ struct ScreenModeRequester *ScreenModeRequester;
+
+ if(ScreenModeRequester = (struct ScreenModeRequester *)AllocAslRequestTags(ASL_ScreenModeRequest,TAG_DONE))
+ {
+ if(AslRequestTags(ScreenModeRequester,
+ ASLSM_TitleText, "Select GhostScript screen display mode",
+ ASLSM_MinDepth, 1,
+ ASLSM_MaxDepth, 8,
+ TAG_DONE))
+ ScreenID = ScreenModeRequester -> sm_DisplayID;
+
+ FreeAslRequest(ScreenModeRequester);
+ }
+ }
+
+ /* Fall back to the default if not available. */
+
+ if(ModeNotAvailable(ScreenID))
+ return(amiga_open_default(dev));
+ else
+ {
+ int result = amiga_open(dev,ScreenID);
+
+ /* If successful store the name of the
+ * screen mode selected.
+ */
+
+ if(!result && !DontTouch)
+ {
+ struct NameInfo NameInfo;
+
+ if(GetDisplayInfoData(NULL,&NameInfo,sizeof(struct NameInfo),DTAG_NAME,ScreenID))
+ SetVar("GSCUSTOMMODE",NameInfo . Name,-1,NULL);
+ }
+
+ return(result);
+ }
+}
+
+ /* amiga_open_printer(gx_device *dev):
+ *
+ * Open the printer device.
+ */
+
+int
+amiga_open_printer(gx_device *dev)
+{
+ if(xdev -> port = CreateMsgPort())
+ {
+ if(xdev -> printer = (struct IODRPReq *)CreateIORequest(xdev -> port,sizeof(struct IODRPReq)))
+ {
+ if(!OpenDevice("printer.device",0,(struct IORequest *)xdev -> printer,0))
+ {
+ if(xdev -> rport = (struct RastPort *)AllocVec(sizeof(struct RastPort),MEMF_ANY))
+ {
+ const sigset_t trapped = sigmask(SIGINT);
+ struct BitMap DummyBitMap;
+ UWORD DummyLine[12];
+
+ InitRastPort(xdev -> rport);
+
+ /* Cook up a dummy bitmap to keep
+ * `smart' drivers from complaining.
+ */
+
+ InitBitMap(&DummyBitMap,12,16,16);
+
+ DummyBitMap . Planes[0] = (PLANEPTR)&DummyLine;
+
+ xdev -> rport -> BitMap = &DummyBitMap;
+
+ /* Query page size requirements. */
+
+ xdev -> printer -> io_Command = PRD_DUMPRPORT;
+ xdev -> printer -> io_RastPort = xdev -> rport;
+ xdev -> printer -> io_SrcWidth = 16;
+ xdev -> printer -> io_SrcHeight = 16;
+ xdev -> printer -> io_Modes = LORES_KEY;
+
+ xdev -> printer -> io_Special |= SPECIAL_FULLCOLS | SPECIAL_FULLROWS | SPECIAL_NOPRINT;
+
+ /* Don't let them stop us now! */
+
+ sigprocmask(SIG_BLOCK,&trapped,NULL);
+
+ /* Ask for it... */
+
+ if(!DoIO((struct IORequest *)xdev -> printer))
+ {
+ struct PrinterExtendedData *PED;
+ struct PrinterData *PD;
+ struct Preferences *Prefs;
+ LONG Depth,
+ NumColours,
+ CubeSize;
+ LONG PageWidth,
+ PageHeight;
+
+ /* Unblock ^C signal. */
+
+ sigprocmask(SIG_UNBLOCK,&trapped,NULL);
+
+ xdev -> printer -> io_Special &= ~(SPECIAL_FULLCOLS | SPECIAL_FULLROWS | SPECIAL_NOPRINT);
+
+ /* Get the printer internal data. */
+
+ PD = (struct PrinterData *)xdev -> printer -> io_Device;
+ PED = &PD -> pd_SegmentData -> ps_PED;
+ Prefs = &PD -> pd_Preferences;
+
+ /* Calculate the printer page size. */
+
+ PageWidth = PED -> ped_XDotsInch * (Prefs -> PrintRightMargin - Prefs -> PrintLeftMargin + 1);
+ PageHeight = PED -> ped_YDotsInch * Prefs -> PaperLength;
+
+ switch(Prefs -> PrintPitch)
+ {
+ case PICA:
+
+ PageWidth /= 10;
+ break;
+
+ case ELITE:
+
+ PageWidth /= 12;
+ break;
+
+ case FINE:
+
+ PageWidth /= 15;
+ break;
+ }
+
+ switch(Prefs -> PrintSpacing)
+ {
+ case SIX_LPI:
+
+ PageHeight /= 6;
+ break;
+
+ case EIGHT_LPI:
+
+ PageHeight /= 8;
+ break;
+ }
+
+ if(PageWidth > PED -> ped_MaxXDots)
+ PageWidth = PED -> ped_MaxXDots;
+
+ if(PageHeight > PED -> ped_MaxYDots && PED -> ped_MaxYDots)
+ PageHeight = PED -> ped_MaxYDots;
+
+ /* Set up the default colour values. */
+
+ if(Prefs -> PrintShade == SHADE_BW)
+ {
+ Depth = 1;
+ NumColours = 2;
+ CubeSize = 0;
+ }
+ else
+ {
+ Depth = 12;
+ NumColours = 4096;
+ CubeSize = 16;
+ }
+
+ /* Get the page size */
+
+ if(xdev -> width > 0 && xdev -> height > 0)
+ {
+ if(PageWidth < xdev -> width)
+ xdev -> width = PageWidth;
+
+ if(PageHeight < xdev -> height)
+ xdev -> height = PageHeight;
+ }
+ else
+ {
+ xdev -> width = PageWidth;
+ xdev -> height = PageHeight;
+ }
+
+ /* Get the DPI values */
+
+ xdev -> x_pixels_per_inch = (float)PED -> ped_XDotsInch;
+ xdev -> y_pixels_per_inch = (float)PED -> ped_YDotsInch;
+
+ /* Try to allocate a suitable bitmap.
+ * If an allocation fails, rescale the
+ * colour cube and bitmap depth and
+ * retry. Minimum are eight colours.
+ */
+
+ do
+ {
+ /* Try to allocate the raster... */
+
+ if(!(xdev -> bitmap = CreateBitMap(xdev -> width,xdev -> height,Depth,NULL,NULL,TRUE)))
+ {
+ /* Any chance to rescale the cube? */
+
+ if(Depth < 2)
+ break;
+ else
+ {
+ /* One plane less... */
+
+ Depth--;
+
+ /* Rescale the cube. */
+
+ while(CubeSize >= 2)
+ {
+ if((NumColours = CubeSize * CubeSize * CubeSize) <= (1 << Depth))
+ break;
+ else
+ CubeSize--;
+ }
+
+ /* Less than eight colours? */
+
+ if(CubeSize < 2)
+ break;
+ }
+ }
+ }
+ while(!xdev -> bitmap);
+
+ /* Got the bitmap? */
+
+ if(xdev -> bitmap)
+ {
+ /* Allocate a suitable colour map. */
+
+ if(xdev -> colormap = GetColorMap(NumColours))
+ {
+ /* Black & white only? */
+
+ if(NumColours == 2)
+ {
+ SetRGB4CM(xdev -> colormap,0,0x0,0x0,0x0);
+ SetRGB4CM(xdev -> colormap,1,0xF,0xF,0xF);
+ }
+ else
+ {
+ LONG i = 0,r,g,b,max = CubeSize - 1;
+
+ /* Fill in the colour cube. */
+
+ for(r = 0 ; r < CubeSize ; r++)
+ {
+ for(g = 0 ; g < CubeSize ; g++)
+ {
+ for(b = 0 ; b < CubeSize ; b++)
+ SetRGB4CM(xdev -> colormap,i++,(15 * r) / max,(15 * g) / max,(15 * b) / max);
+ }
+ }
+
+ set_colour_printer_device((gx_device_amiga *)dev,CubeSize);
+ }
+
+ xdev -> printer -> io_ColorMap = xdev -> colormap;
+ xdev -> rport -> BitMap = xdev -> bitmap;
+
+ return(0);
+ }
+ else
+ perror("Ghostscript: failed to allocate colour map");
+ }
+ else
+ {
+ char buffer[256];
+
+ sprintf(buffer,"Ghostscript: failed to allocate raster (wanted %ld, largest %ld)",(xdev -> width + 15) / 8 * xdev -> height * Depth,AvailMem(MEMF_ANY | MEMF_LARGEST));
+
+ perror(buffer);
+ }
+ }
+ else
+ {
+ char buffer[256];
+
+ sigprocmask(SIG_UNBLOCK,&trapped,NULL);
+
+ sprintf(buffer,"Ghostscript: failed to query printer page size (error code #%ld)",xdev -> printer -> io_Error);
+
+ perror(buffer);
+ }
+ }
+ else
+ perror("Ghostscript: failed to allocate raster port");
+ }
+ else
+ {
+ char buffer[256];
+
+ sprintf(buffer,"Ghostscript: failed to open printer.device (error code #%ld)",xdev -> printer -> io_Error);
+
+ perror(buffer);
+ }
+ }
+ else
+ perror("Ghostscript: failed to allocate device driver");
+ }
+ else
+ perror("Ghostscript: failed to create io port");
+
+ return(-1);
+}
+
+ /* amiga_output_page_printer(gx_device *dev,int,int):
+ *
+ * Send a bitmap to the printer.
+ */
+
+int
+amiga_output_page_printer(gx_device *dev,int num_copies,int flush)
+{
+ const sigset_t trapped = sigmask(SIGINT);
+ int result,i;
+ ULONG Signals;
+
+ xdev -> printer -> io_Command = PRD_DUMPRPORT;
+ xdev -> printer -> io_SrcWidth = xdev -> width;
+ xdev -> printer -> io_SrcHeight = xdev -> height;
+ xdev -> printer -> io_DestCols = xdev -> width;
+ xdev -> printer -> io_DestRows = xdev -> height;
+
+ /* We cannot possibly allow being interrupted in the middle
+ * of a raster dump!
+ */
+
+ sigprocmask(SIG_BLOCK,&trapped,NULL);
+
+ for(i = 0 ; i < num_copies ; i++)
+ {
+ SetSignal(0,SIGBREAKF_CTRL_C | (1L << xdev -> port -> mp_SigBit));
+
+ SendIO((struct IORequest *)xdev -> printer);
+
+ Signals = Wait(SIGBREAKF_CTRL_C | (1L << xdev -> port -> mp_SigBit));
+
+ if(Signals & SIGBREAKF_CTRL_C)
+ {
+ char buffer[256];
+
+ if(!CheckIO((struct IORequest *)xdev -> printer))
+ AbortIO((struct IORequest *)xdev -> printer);
+
+ WaitIO((struct IORequest *)xdev -> printer);
+
+ sprintf(buffer,"Ghostscript: printing aborted");
+
+ perror(buffer);
+
+ result = -1;
+
+ sigprocmask(SIG_UNBLOCK,&trapped,NULL);
+
+ break;
+ }
+
+ if(Signals & (1L << xdev -> port -> mp_SigBit))
+ {
+ if(WaitIO((struct IORequest *)xdev -> printer))
+ {
+ char buffer[256];
+
+ sprintf(buffer,"Ghostscript: failed to print raster (error code #%ld)",xdev -> printer -> io_Error);
+
+ perror(buffer);
+
+ result = -1;
+
+ sigprocmask(SIG_UNBLOCK,&trapped,NULL);
+
+ break;
+ }
+ else
+ result = 0;
+ }
+ }
+
+ sigprocmask(SIG_UNBLOCK,&trapped,NULL);
+
+ return(result);
+}
+
+ /* amiga_close_printer(gx_device *dev):
+ *
+ * Close the printer driver.
+ */
+
+int
+amiga_close_printer(gx_device *dev)
+{
+ if(xdev -> bitmap)
+ {
+ DeleteBitMap(xdev -> bitmap,TRUE);
+
+ xdev -> bitmap = NULL;
+ }
+
+ if(xdev -> rport)
+ {
+ FreeVec(xdev -> rport);
+
+ xdev -> rport = NULL;
+ }
+
+ if(xdev -> colormap)
+ {
+ FreeColorMap(xdev -> colormap);
+
+ xdev -> colormap = NULL;
+ }
+
+ if(xdev -> printer)
+ {
+ if(xdev -> printer -> io_Device)
+ CloseDevice((struct IORequest *)xdev -> printer);
+
+ DeleteIORequest(xdev -> printer);
+
+ xdev -> printer = NULL;
+ }
+
+ if(xdev -> port)
+ {
+ DeleteMsgPort(xdev -> port);
+
+ xdev -> port = NULL;
+ }
+
+ xdev -> width = xdev -> height = 0;
+/* xdev -> x_pixels_per_inch = x_pixels_per_inch = 72.72;*/
+
+ return(0);
+}
+
+ /* amiga_get_bits(gx_device *dev,int y,byte *str,byte **actual_data):
+ *
+ * Read the raster bits into a buffer.
+ */
+
+int
+amiga_get_bits(gx_device *dev,int y,byte *str,byte **actual_data)
+{
+ if(y < 0 || y > xdev -> height)
+ return(-1);
+ else
+ {
+ if(actual_data)
+ *actual_data = (byte *)(xdev -> bitmap -> Planes[0] + xdev -> bitmap -> BytesPerRow * y);
+ else
+ memcpy(str,xdev -> bitmap -> Planes[0] + xdev -> bitmap -> BytesPerRow * y,xdev -> bitmap -> BytesPerRow);
+
+ return(0);
+ }
+}
+
+ /* amiga_open(gx_device *dev,ULONG Mode):
+ *
+ * Open a custom screen.
+ */
+
+int
+amiga_open(gx_device *dev,ULONG Mode)
+{
+ struct DisplayInfo DisplayInfo;
+ struct DimensionInfo DimensionInfo;
+
+ /* Get the display dimensions. */
+
+ if(GetDisplayInfoData(NULL,(APTR)&DisplayInfo,sizeof(struct DisplayInfo),DTAG_DISP,Mode) && GetDisplayInfoData(NULL,(APTR)&DimensionInfo,sizeof(struct DimensionInfo),DTAG_DIMS,Mode))
+ {
+ /* Two shades only, black & white */
+
+ STATIC struct ColorSpec Colours[] =
+ {
+ 0, 0x0000, 0x0000, 0x0000,
+ 1, 0xFFFF, 0xFFFF, 0xFFFF,
+
+ -1
+ };
+
+ float Width,
+ Height;
+ LONG i,cube_size,max;
+ LONG ScreenWidth,
+ ScreenHeight,
+ ScreenDepth;
+
+ /* Start up with a maximum depth display. */
+
+ ScreenDepth = DimensionInfo . MaxDepth;
+
+ /* Check to see whether we will be able to
+ * build a colour display or not.
+ */
+
+ for(cube_size = 6 ; cube_size >= 2 ; cube_size--)
+ {
+ if((max = cube_size * cube_size * cube_size) <= 1 << ScreenDepth)
+ break;
+ }
+
+ /* Got enough colours? */
+
+ if(cube_size != 1)
+ set_colour_device((gx_device_amiga *)dev,cube_size,NULL);
+ else
+ {
+ ScreenDepth = 1;
+
+ set_mono_device((gx_device_amiga *)dev);
+ }
+
+ if(xdev -> width > 0 && xdev -> height > 0)
+ {
+ Width = xdev -> width;
+ Height = xdev -> height;
+ }
+ else
+ {
+ if(xdev -> page_width > 0.0)
+ Width = xdev -> page_width;
+ else
+ Width = 0.0;
+
+ if(xdev -> page_height > 0.0)
+ Height = xdev -> page_height;
+ else
+ Height = 0.0;
+ }
+
+ /* Use the best guess, we will take the standard
+ * low resolution x-dpi value and scale it by
+ * the pixel speed.
+ */
+
+ if(DisplayInfo . PixelSpeed)
+ {
+ xdev -> x_pixels_per_inch = (35.0 * 140.0) / (float)DisplayInfo . PixelSpeed;
+ xdev -> y_pixels_per_inch = (xdev -> x_pixels_per_inch * (float)DisplayInfo . Resolution . x) / (float)DisplayInfo . Resolution . y;
+ }
+ else
+ {
+ xdev -> x_pixels_per_inch = 72.27;
+ xdev -> y_pixels_per_inch = 72.27;
+ }
+
+ if(Width > 0.0)
+ ScreenWidth = (LONG)(Width * xdev -> x_pixels_per_inch);
+ else
+ ScreenWidth = 0;
+
+ if(Height > 0.0)
+ ScreenHeight = (LONG)(Height * xdev -> y_pixels_per_inch);
+ else
+ ScreenHeight = 0;
+
+ if(ScreenWidth < DimensionInfo . MinRasterWidth || ScreenWidth > DimensionInfo . MaxRasterWidth)
+ ScreenWidth = 0;
+
+ if(ScreenHeight < DimensionInfo . MinRasterHeight || ScreenHeight > DimensionInfo . MaxRasterHeight)
+ ScreenHeight = 0;
+
+ /* Try to open a custom screen; if this fails, try to
+ * rescale the colour cube and retry.
+ */
+
+ do
+ {
+ if(!(xdev -> screen = OpenScreenTags(NULL,
+ SA_Depth, ScreenDepth,
+ SA_Overscan, OSCAN_TEXT,
+ SA_Quiet, TRUE,
+ SA_Behind, TRUE,
+ SA_DisplayID, Mode,
+ SA_Colors, Colours,
+ SA_AutoScroll, TRUE,
+ SA_ShowTitle, FALSE,
+ SA_Title, "Ghostscript Amiga output screen",
+
+ ScreenWidth > 0 ? SA_Width : TAG_IGNORE, ScreenWidth,
+ ScreenHeight > 0 ? SA_Height : TAG_IGNORE, ScreenHeight,
+ TAG_DONE)))
+ {
+ if(ScreenDepth < 2)
+ break;
+ else
+ {
+ ScreenDepth--;
+
+ /* Check to see whether we will be able to
+ * build a colour display or not.
+ */
+
+ while(cube_size >= 2)
+ {
+ if((max = cube_size * cube_size * cube_size) <= 1 << ScreenDepth)
+ break;
+ else
+ cube_size--;
+ }
+
+ /* Got enough colours? */
+
+ if(cube_size == 1 || ScreenDepth == 1)
+ {
+ /* Obviously not. */
+
+ ScreenDepth = 1;
+
+ set_mono_device((gx_device_amiga *)dev);
+ }
+ }
+ }
+ }
+ while(!xdev -> screen);
+
+ /* Did we succeed in opening the screen? */
+
+ if(xdev -> screen)
+ {
+ if(xdev -> window = OpenWindowTags(NULL,
+ WA_Left, 0,
+ WA_Top, 0,
+ WA_Width, xdev -> screen -> Width,
+ WA_Height, xdev -> screen -> Height,
+ WA_Backdrop, TRUE,
+ WA_RMBTrap, TRUE,
+ WA_Borderless, TRUE,
+ WA_CustomScreen,xdev -> screen,
+ TAG_DONE))
+ {
+ xdev -> rport = xdev -> window -> RPort;
+ xdev -> width = xdev -> screen -> Width;
+ xdev -> height = xdev -> screen -> Height;
+ }
+ else
+ {
+ xdev -> rport = &xdev -> screen -> RastPort;
+ xdev -> width = xdev -> screen -> Width;
+ xdev -> height = xdev -> screen -> Height;
+ }
+
+ /* Establish defaults. */
+
+ DarkPen = 0;
+ LightPen = 1;
+
+ SetBPen(xdev -> rport,0);
+ SetDrMd(xdev -> rport,JAM2);
+
+ /* Create the temporary drawing area. */
+
+ if(xdev -> temp_rport = CreateTempRPort(xdev -> rport))
+ {
+ if(xdev -> temp_array = (UBYTE *)AllocVec((xdev -> screen -> Width + 15) & ~15,MEMF_ANY))
+ {
+ /* Colour output enabled? */
+
+ if(xdev -> cube_size > 0)
+ {
+ LONG r,g,b,max = xdev -> cube_size - 1;
+
+ i = 0;
+
+ /* Build a suitable colour map. */
+
+ if(GfxBase -> LibNode . lib_Version >= 39)
+ {
+ for(r = 0 ; r < xdev -> cube_size ; r++)
+ {
+ for(g = 0 ; g < xdev -> cube_size ; g++)
+ {
+ for(b = 0 ; b < xdev -> cube_size ; b++)
+ SetRGB32(&xdev -> screen -> ViewPort,i++,SPREAD((255 * r) / max),SPREAD((255 * g) / max),SPREAD((255 * b) / max));
+ }
+ }
+ }
+ else
+ {
+ for(r = 0 ; r < xdev -> cube_size ; r++)
+ {
+ for(g = 0 ; g < xdev -> cube_size ; g++)
+ {
+ for(b = 0 ; b < xdev -> cube_size ; b++)
+ SetRGB4(&xdev -> screen -> ViewPort,i++,(15 * r) / max,(15 * g) / max,(15 * b) / max);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ perror("Ghostscript: failed to allocate temporary line");
+
+ return(-1);
+ }
+ }
+ else
+ {
+ perror("Ghostscript: failed to allocate temporary raster");
+
+ return(-1);
+ }
+
+ amiga_set_pen(dev,DarkPen);
+
+ return(0);
+ }
+ else
+ perror("Ghostscript: failed to open screen");
+ }
+ else
+ perror("Ghostscript: failed to get display mode information");
+
+ return(-1);
+}
+
+ /* amiga_output_page(gx_device *dev,int,int):
+ *
+ * Page is not `buffered', just bring screen/window
+ * to the front.
+ */
+
+int
+amiga_output_page(gx_device *dev,int num_copies,int flush)
+{
+ if(xdev -> screen)
+ ScreenToFront(xdev -> screen);
+ else
+ {
+ if(xdev -> window)
+ WindowToFront(xdev -> window);
+ }
+
+ return(0);
+}
+
+ /* amiga_close(gx_device *dev):
+ *
+ * Close the screen and free associated resources.
+ */
+
+int
+amiga_close(gx_device *dev)
+{
+ if(xdev -> dispatcher)
+ {
+ const sigset_t trapped = sigmask(SIGINT);
+
+ sigprocmask(SIG_BLOCK,&trapped,NULL);
+
+ Forbid();
+
+ Signal(xdev -> dispatcher,SIG_KILL);
+
+ SetSignal(0,SIG_HANDSHAKE);
+
+ Wait(SIG_HANDSHAKE);
+
+ Permit();
+
+ sigprocmask(SIG_UNBLOCK,&trapped,NULL);
+ }
+
+ if(xdev -> temp_array)
+ {
+ FreeVec(xdev -> temp_array);
+
+ xdev -> temp_array = NULL;
+ }
+
+ if(xdev -> pens)
+ {
+ LONG i;
+
+ for(i = 0 ; i < xdev -> cube_size * xdev -> cube_size * xdev -> cube_size ; i++)
+ {
+ if(xdev -> pens[i] != -1)
+ ReleasePen(xdev -> window -> WScreen -> ViewPort . ColorMap,xdev -> pens[i]);
+ }
+
+ FreeVec(xdev -> pens);
+
+ xdev -> pens = NULL;
+ }
+
+ if(xdev -> temp_rport)
+ {
+ DeleteTempRPort(xdev -> temp_rport);
+
+ xdev -> temp_rport = NULL;
+ }
+
+ if(xdev -> window)
+ {
+ CloseWindow(xdev -> window);
+
+ xdev -> window = NULL;
+ }
+
+ DeleteScrollers(dev);
+
+ if(xdev -> super_bitmap)
+ {
+ DeleteBitMap(xdev -> super_bitmap,FALSE);
+
+ xdev -> super_bitmap = NULL;
+ }
+
+ if(xdev -> screen)
+ {
+ CloseScreen(xdev -> screen);
+
+ xdev -> screen = NULL;
+ }
+
+ xdev -> width = xdev -> height = 0;
+/* xdev -> x_pixels_per_inch = x_pixels_per_inch = 72.72;*/
+
+ return(0);
+}
+
+ /* amiga_fill_rectangle(gx_device *dev,int x,int y,int w,int h,gx_color_index color):
+ *
+ * Fill a rectangle with a given colour. This one is simple as it can
+ * be done with the Amiga graphics primitives.
+ */
+
+int
+amiga_fill_rectangle(gx_device *dev,int x,int y,int w,int h,gx_color_index color)
+{
+ if(x < 0 || x > xdev -> width - w || y < 0 || y > xdev -> height - h)
+ return(-1);
+ else
+ {
+ if(w > 0 && h > 0 && color != gx_no_color_index)
+ {
+ amiga_set_pen(dev,color);
+
+ RectFill(xdev -> rport,x,y,x + w - 1,y + h - 1);
+ }
+
+ return(0);
+ }
+}
+
+ /* amiga_copy_mono():
+ *
+ * Copy a monochrome image. This operation requires a bit of work as
+ * we cannot simply blit the image into the bitmap.
+ */
+
+int
+amiga_copy_mono(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h,gx_color_index zero,gx_color_index one)
+{
+ if(y < 0 || x < 0 || w < 0 || h < 0)
+ return(-1);
+ else
+ {
+ if(w > 0 && h > 0)
+ {
+ LONG i,j;
+
+ if(zero == gx_no_color_index)
+ {
+ if(one != gx_no_color_index)
+ {
+ do
+ {
+ ReadPixelLine8(xdev -> rport,x,y,w,xdev -> temp_array,xdev -> temp_rport);
+
+ for(i = sourcex, j = 0 ; i < sourcex + w ; i++, j++)
+ {
+ if(base[i >> 3] & shift[i & 7])
+ xdev -> temp_array[j] = one;
+ }
+
+ WritePixelLine8(xdev -> rport,x,y,w,xdev -> temp_array,xdev -> temp_rport);
+
+ base += raster;
+
+ y++;
+ }
+ while(--h);
+ }
+ }
+ else
+ {
+ if(one == gx_no_color_index)
+ {
+ do
+ {
+ ReadPixelLine8(xdev -> rport,x,y,w,xdev -> temp_array,xdev -> temp_rport);
+
+ for(i = sourcex, j = 0 ; i < w + sourcex ; i++, j++)
+ {
+ if(!(base[i >> 3] & shift[i & 7]))
+ xdev -> temp_array[j] = zero;
+ }
+
+ WritePixelLine8(xdev -> rport,x,y,w,xdev -> temp_array,xdev -> temp_rport);
+
+ base += raster;
+
+ y++;
+ }
+ while(--h);
+ }
+ else
+ {
+ do
+ {
+ for(i = sourcex, j = 0 ; i < w + sourcex ; i++, j++)
+ {
+ if(base[i >> 3] & shift[i & 7])
+ xdev -> temp_array[j] = one;
+ else
+ xdev -> temp_array[j] = zero;
+ }
+
+ WritePixelLine8(xdev -> rport,x,y,w,xdev -> temp_array,xdev -> temp_rport);
+
+ base += raster;
+
+ y++;
+ }
+ while(--h);
+ }
+ }
+ }
+
+ return(0);
+ }
+}
+
+ /* amiga_copy_color():
+ *
+ * Copy a color image (oh well...). This is just the same as the
+ * copy_mono() routine.
+ */
+
+int
+amiga_copy_color(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h)
+{
+ if(y < 0 || x < 0 || w < 0 || h < 0)
+ return(-1);
+ else
+ {
+ if(w > 0 && h > 0)
+ {
+ LONG i,j;
+
+ do
+ {
+ for(i = sourcex, j = 0 ; i < w + sourcex ; i++, j++)
+ {
+ if(base[i >> 3] & shift[i & 7])
+ xdev -> temp_array[j] = DarkPen;
+ else
+ xdev -> temp_array[j] = LightPen;
+ }
+
+ WritePixelLine8(xdev -> rport,x,y,w,xdev -> temp_array,xdev -> temp_rport);
+
+ base += raster;
+
+ y++;
+ }
+ while(--h);
+ }
+
+ return(0);
+ }
+}
+
+ /* amiga_draw_line(gx_device *dev,int x0,int y0,int x1,int y1,gx_color_index color):
+ *
+ * Draw a line between two points. This one is easy as it can be done
+ * with the Amiga graphics primitives, the only glitch is having to reset
+ * the last dot to its original colour.
+ */
+
+int
+amiga_draw_line(gx_device *dev,int x0,int y0,int x1,int y1,gx_color_index color)
+{
+ if(color != gx_no_color_index && (x0 != x1 || y0 != y1))
+ {
+ LONG pen;
+
+ pen = ReadPixel(xdev -> rport,x1,y1);
+
+ amiga_set_pen(dev,color);
+
+ Move(xdev -> rport,x0,y0);
+ Draw(xdev -> rport,x1,y1);
+
+ if(pen == color)
+ {
+ amiga_set_pen(dev,pen);
+
+ WritePixel(xdev -> rport,x1,y1);
+ }
+ }
+
+ return(0);
+}
+
+ /* amiga_copy_mono_raw():
+ *
+ * Copy a monochrome image to a bitmap. Just watch the
+ * astounding number of case switches.
+ */
+
+int
+amiga_copy_mono_raw(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h,gx_color_index zero,gx_color_index one)
+{
+ if(y < 0 || x < 0 || w < 0 || h < 0)
+ return(-1);
+ else
+ {
+ if(w > 0 && h > 0)
+ {
+ LONG i,j,modulo = xdev -> rport -> BitMap -> BytesPerRow;
+ UBYTE *line;
+
+ w += sourcex;
+
+ line = xdev -> rport -> BitMap -> Planes[0] + y * xdev -> rport -> BitMap -> BytesPerRow;
+
+ if(zero == gx_no_color_index)
+ {
+ if(one != gx_no_color_index)
+ {
+ if(one)
+ {
+ do
+ {
+ for(i = sourcex, j = x ; i < w ; i++, j++)
+ {
+ if(base[i >> 3] & shift[i & 7])
+ line[j >> 3] |= shift[j & 7];
+ }
+
+ base += raster;
+
+ line += modulo;
+ }
+ while(--h);
+ }
+ else
+ {
+ do
+ {
+ for(i = sourcex, j = x ; i < w ; i++, j++)
+ {
+ if(base[i >> 3] & shift[i & 7])
+ line[j >> 3] &= masks[j & 7];
+ }
+
+ base += raster;
+
+ line += modulo;
+ }
+ while(--h);
+ }
+ }
+ }
+ else
+ {
+ if(one == gx_no_color_index)
+ {
+ if(zero)
+ {
+ do
+ {
+ for(i = sourcex, j = x ; i < w ; i++, j++)
+ {
+ if(!(base[i >> 3] & shift[i & 7]))
+ line[j >> 3] |= shift[j & 7];
+ }
+
+ base += raster;
+
+ line += modulo;
+ }
+ while(--h);
+ }
+ else
+ {
+ do
+ {
+ for(i = sourcex, j = x ; i < w ; i++, j++)
+ {
+ if(!(base[i >> 3] & shift[i & 7]))
+ line[j >> 3] &= masks[j & 7];
+ }
+
+ base += raster;
+
+ line += modulo;
+ }
+ while(--h);
+ }
+ }
+ else
+ {
+ if(one)
+ {
+ do
+ {
+ for(i = sourcex, j = x ; i < w ; i++, j++)
+ {
+ if(base[i >> 3] & shift[i & 7])
+ line[j >> 3] |= shift[j & 7];
+ else
+ line[j >> 3] &= masks[j & 7];
+ }
+
+ base += raster;
+
+ line += modulo;
+ }
+ while(--h);
+ }
+ else
+ {
+ do
+ {
+ for(i = sourcex, j = x ; i < w ; i++, j++)
+ {
+ if(base[i >> 3] & shift[i & 7])
+ line[j >> 3] &= masks[j & 7];
+ else
+ line[j >> 3] |= shift[j & 7];
+ }
+
+ base += raster;
+
+ line += modulo;
+ }
+ while(--h);
+ }
+ }
+ }
+ }
+
+ return(0);
+ }
+}
+
+ /* amiga_copy_color_raw():
+ *
+ * Copy a color image (oh well...). This is just the same as the
+ * copy_mono() routine.
+ */
+
+int
+amiga_copy_color_raw(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h)
+{
+ if(y < 0 || x < 0 || w < 0 || h < 0)
+ return(-1);
+ else
+ {
+ if(w > 0 && h > 0)
+ {
+ LONG i,j,modulo = xdev -> rport -> BitMap -> BytesPerRow;
+ UBYTE *line;
+
+ line = xdev -> rport -> BitMap -> Planes[0] + y * xdev -> rport -> BitMap -> BytesPerRow;
+
+ w += sourcex;
+
+ do
+ {
+ for(i = sourcex, j = x ; i < w ; i++, j++)
+ {
+ if(base[i >> 3] & shift[i & 7])
+ line[j >> 3] |= shift[j & 7];
+ else
+ line[j >> 3] &= masks[j & 7];
+ }
+
+ base += raster;
+
+ line += modulo;
+ }
+ while(--h);
+ }
+
+ return(0);
+ }
+}
+
+ /* amiga_fill_rectangle_raw():
+ *
+ * Fill a rectangular area in a bitmap.
+ */
+
+int
+amiga_fill_rectangle_raw(gx_device *dev,int x,int y,int w,int h,gx_color_index color)
+{
+ if(x < 0 || x > xdev -> width - w || y < 0 || y > xdev -> height - h)
+ return(-1);
+ else
+ {
+ if(w > 0 && h > 0 && color != gx_no_color_index)
+ {
+ UBYTE *line,startmask,endmask;
+ LONG right,mid,modulo = xdev -> rport -> BitMap -> BytesPerRow;
+
+ right = x + w;
+ mid = (right >> 3) - (x >> 3);
+ line = xdev -> rport -> BitMap -> Planes[0] + y * xdev -> rport -> BitMap -> BytesPerRow + (x >> 3);
+
+ x &= 7;
+ right &= 7;
+
+ if(color)
+ {
+ startmask = 0xFF >> x;
+ endmask = ~(0xFF >> right);
+
+ if(mid)
+ {
+ UBYTE *ptr;
+ int i;
+
+ do
+ {
+ ptr = line;
+
+ *ptr++ |= startmask;
+
+ i = mid;
+
+ while(--i > 0)
+ *ptr++ = 0xFF;
+
+ *ptr |= endmask;
+
+ line += modulo;
+ }
+ while(--h);
+ }
+ else
+ {
+ startmask &= endmask;
+
+ do
+ {
+ *line |= startmask;
+
+ line += modulo;
+ }
+ while(--h);
+ }
+ }
+ else
+ {
+ startmask = ~(0xFF >> x);
+ endmask = 0xFF >> right;
+
+ if(mid)
+ {
+ UBYTE *ptr;
+ LONG i;
+
+ do
+ {
+ ptr = line;
+
+ *ptr++ &= startmask;
+
+ i = mid;
+
+ while(--i > 0)
+ *ptr++ = 0x00;
+
+ *ptr &= endmask;
+
+ line += modulo;
+ }
+ while(--h);
+ }
+ else
+ {
+ startmask |= endmask;
+
+ do
+ {
+ *line &= startmask;
+
+ line += modulo;
+ }
+ while(--h);
+ }
+ }
+ }
+
+ return(0);
+ }
+}
+
+ /* amiga_draw_line_raw():
+ *
+ * Draw a hair line, your basic DDA algorithm;
+ * keep your fingers crossed.
+ */
+
+int
+amiga_draw_line_raw(gx_device *dev,int x,int y,int x1,int y1,gx_color_index color)
+{
+ if(color != gx_no_color_index && (x != x1 || y != y1))
+ {
+ short xstep,ystep,dx,dy,diff,modulo;
+ UBYTE *line,*plane,pen;
+ LONG last;
+
+ modulo = xdev -> rport -> BitMap -> BytesPerRow;
+ plane = xdev -> rport -> BitMap -> Planes[0];
+
+ line = &plane[y1 * modulo];
+ last = y1;
+ pen = line[x1 >> 3] & (x1 & 7);
+
+ dx = x1 - x;
+ dy = y1 - y;
+
+ if(dx < 0)
+ {
+ dx = -dx;
+ dy = -dy;
+
+ x = x1;
+ y = y1;
+ }
+
+ if(y != last)
+ line = &plane[(last = y) * modulo];
+
+ if(color)
+ {
+ line[x >> 3] |= shift[x & 7];
+
+ xstep = ystep = 0;
+
+ if(dy < 0)
+ {
+ if(dx > -dy)
+ {
+ diff = -dx / 2;
+
+ do
+ {
+ xstep++;
+
+ if(diff > 0)
+ {
+ ystep--;
+
+ diff = diff - dy - dx;
+ }
+ else
+ diff -= dy;
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] |= shift[x1 & 7];
+ }
+ }
+ while(xstep < dx);
+ }
+ else
+ {
+ if(dx == -dy)
+ diff = 0;
+ else
+ diff = -dy / 2;
+
+ do
+ {
+ ystep--;
+
+ if(diff > 0)
+ diff -= dx;
+ else
+ {
+ xstep++;
+
+ diff = diff - dy - dx;
+ }
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] |= shift[x1 & 7];
+ }
+ }
+ while(ystep > dy);
+ }
+ }
+ else
+ {
+ if(dx > dy)
+ {
+ diff = -dx / 2;
+
+ do
+ {
+ xstep++;
+
+ if(diff > 0)
+ {
+ ystep++;
+
+ diff = diff + dy - dx;
+ }
+ else
+ diff += dy;
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] |= shift[x1 & 7];
+ }
+ }
+ while(xstep < dx);
+ }
+ else
+ {
+ if(dx == dy)
+ diff = 0;
+ else
+ diff = dy / 2;
+
+ do
+ {
+ ystep++;
+
+ if(diff > 0)
+ diff -= dx;
+ else
+ {
+ xstep++;
+
+ diff = diff + dy - dx;
+ }
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] |= shift[x1 & 7];
+ }
+ }
+ while(ystep < dy);
+ }
+ }
+
+ if(!pen)
+ {
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] &= masks[x1 & 7];
+ }
+ }
+ else
+ {
+ line[x >> 3] &= masks[x & 7];
+
+ xstep = ystep = 0;
+
+ if(dy < 0)
+ {
+ if(dx > -dy)
+ {
+ diff = -dx / 2;
+
+ do
+ {
+ xstep++;
+
+ if(diff > 0)
+ {
+ ystep--;
+
+ diff = diff - dy - dx;
+ }
+ else
+ diff -= dy;
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] &= masks[x1 & 7];
+ }
+ }
+ while(xstep < dx);
+ }
+ else
+ {
+ if(dx == -dy)
+ diff = 0;
+ else
+ diff = -dy / 2;
+
+ do
+ {
+ ystep--;
+
+ if(diff > 0)
+ diff -= dx;
+ else
+ {
+ xstep++;
+
+ diff = diff - dy - dx;
+ }
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] &= masks[x1 & 7];
+ }
+ }
+ while(ystep > dy);
+ }
+ }
+ else
+ {
+ if(dx > dy)
+ {
+ diff = -dx / 2;
+
+ do
+ {
+ xstep++;
+
+ if(diff > 0)
+ {
+ ystep++;
+
+ diff = diff + dy - dx;
+ }
+ else
+ diff += dy;
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] &= masks[x1 & 7];
+ }
+ }
+ while(xstep < dx);
+ }
+ else
+ {
+ if(dx == dy)
+ diff = 0;
+ else
+ diff = dy / 2;
+
+ do
+ {
+ ystep++;
+
+ if(diff > 0)
+ diff -= dx;
+ else
+ {
+ xstep++;
+
+ diff = diff + dy - dx;
+ }
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] &= masks[x1 & 7];
+ }
+ }
+ while(ystep < dy);
+ }
+ }
+
+ if(pen)
+ {
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] |= pen;
+ }
+ }
+ }
+
+ return(0);
+}
+
+ /* amiga_open_ilbm(gx_device *dev):
+ *
+ * Open the ilbm device.
+ */
+
+int
+amiga_open_ilbm(gx_device *dev)
+{
+ if(xdev -> width <= 0 || xdev -> height <= 0)
+ {
+ if(xdev -> page_width > 0.0)
+ xdev -> width = (int)(xdev -> x_pixels_per_inch * xdev -> page_width);
+ else
+ xdev -> width = 640;
+
+ if(xdev -> page_height > 0.0)
+ xdev -> height = (int)(xdev -> y_pixels_per_inch * xdev -> page_height);
+ else
+ xdev -> height = 512;
+ }
+
+ if(xdev -> rport = (struct RastPort *)AllocVec(sizeof(struct RastPort),MEMF_ANY))
+ {
+ InitRastPort(xdev -> rport);
+
+ if(xdev -> bitmap = (struct BitMap *)AllocVec(sizeof(struct BitMap),MEMF_ANY))
+ {
+ InitBitMap(xdev -> bitmap,1,xdev -> width,xdev -> height);
+
+ if(xdev -> bitplane = AllocVec(xdev -> bitmap -> Rows * xdev -> bitmap -> BytesPerRow,MEMF_ANY | MEMF_CLEAR))
+ {
+ xdev -> bitmap -> Planes[0] = xdev -> bitplane;
+ xdev -> rport -> BitMap = xdev -> bitmap;
+ xdev -> page_count = 1;
+
+ DarkPen = 0;
+ LightPen = 1;
+
+ return(0);
+ }
+ else
+ {
+ char buffer[256];
+
+ sprintf(buffer,"Ghostscript: failed to allocate raster (wanted %ld, largest %ld)",xdev -> bitmap -> Rows * xdev -> bitmap -> BytesPerRow,AvailMem(MEMF_ANY | MEMF_LARGEST));
+
+ perror(buffer);
+ }
+ }
+ else
+ perror("Ghostscript: failed to allocate bitmap");
+ }
+ else
+ perror("Ghostscript: failed to allocate raster port");
+
+ return(-1);
+}
+
+ /* amiga_output_page_ilbm(gx_device *dev,int,int):
+ *
+ * Send a bitmap to an IFF-ILBM file.
+ */
+
+int
+amiga_output_page_ilbm(gx_device *dev,int num_copies,int flush)
+{
+ const sigset_t trapped = sigmask(SIGINT);
+ char buffer[270];
+ LONG result = -1;
+
+ sprintf(buffer,"%s_%04d.ilbm",xdev -> file_name,xdev -> page_count);
+
+ fprintf(stdout,"\n\033[ASaving page Nº%d to \"%s\"...\033[K",xdev -> page_count,buffer);
+ fflush(stdout);
+
+ sigprocmask(SIG_BLOCK,&trapped,NULL);
+
+ if(SaveBitMap(buffer,xdev -> bitmap,xdev -> width,xdev -> height,(UWORD)xdev -> x_pixels_per_inch,xdev -> y_pixels_per_inch))
+ {
+ fprintf(stdout,"\n\033[APage saved to file \"%s\".\033[K\n",buffer);
+
+ result = 0;
+
+ xdev -> page_count;
+ }
+ else
+ perror("\n\033[AGhostscript: error saving page\033[K");
+
+ sigprocmask(SIG_UNBLOCK,&trapped,NULL);
+
+ return(result);
+}
+
+ /* amiga_close_ilbm(gx_device *dev):
+ *
+ * Close the ilbm driver.
+ */
+
+int
+amiga_close_ilbm(gx_device *dev)
+{
+ if(xdev -> bitplane)
+ {
+ FreeVec(xdev -> bitplane);
+
+ xdev -> bitplane = NULL;
+ }
+
+ if(xdev -> bitmap)
+ {
+ FreeVec(xdev -> bitmap);
+
+ xdev -> bitmap = NULL;
+ }
+
+ if(xdev -> rport)
+ {
+ FreeVec(xdev -> rport);
+
+ xdev -> rport = NULL;
+ }
+
+ xdev -> width = xdev -> height = 0;
+/* xdev -> x_pixels_per_inch = x_pixels_per_inch = 72.72;*/
+
+ return(0);
+}
+
+private const gs_prop_item props_amiga[] =
+{
+ prop_def("PageWidth", prt_string),
+ prop_def("PageHeight", prt_string),
+ prop_def("OutputFile", prt_string)
+};
+
+int
+amiga_get_props(gx_device *dev,gs_prop_item *plist)
+{
+ int start = gx_default_get_props(dev,plist);
+
+ if(plist != 0)
+ {
+ gs_prop_item *pi = plist + start;
+
+ memcpy(pi,props_amiga,sizeof(props_amiga));
+
+ pi[0] . value .a.p.s = "";
+ pi[0] . value .a.size = -1;
+
+ pi[1] . value .a.p.s = "";
+ pi[1] . value .a.size = -1;
+
+ pi[2] . value .a.p.s = "";
+ pi[2] . value .a.size = -1;
+ }
+
+ return(start + (sizeof(props_amiga) / sizeof(gs_prop_item)));
+}
+
+int
+amiga_put_props(gx_device *dev,gs_prop_item *plist,int count)
+{
+ gs_prop_item *known[3];
+ LONG code = 0;
+
+ props_extract(plist,count,props_amiga,3,known,0);
+
+ if((code = gx_default_put_props(dev,plist,count)) < 0)
+ return(code);
+ else
+ {
+ if(known[0] != 0)
+ {
+ gs_prop_item *pn = known[0];
+ LONG size = pn -> value . a . size;
+ char temp[256];
+
+ if(size >= 256)
+ {
+ pn -> status = pv_limitcheck;
+
+ code = gs_error_limitcheck;
+ }
+ else
+ {
+ memcpy(temp,pn -> value . a . p . s,size);
+
+ temp[size] = 0;
+
+ xdev -> page_width = GetInches(temp);
+
+ if(xdev -> page_width <= 0.0)
+ {
+ xdev -> page_width = 0.0;
+
+ pn -> status = pv_limitcheck;
+
+ code = gs_error_limitcheck;
+ }
+ else
+ {
+ if(code == 0)
+ code = 1;
+ }
+ }
+ }
+
+ if(known[1] != 0)
+ {
+ gs_prop_item *pn = known[1];
+ LONG size = pn -> value . a . size;
+ char temp[256];
+
+ if(size >= 256)
+ {
+ pn -> status = pv_limitcheck;
+
+ code = gs_error_limitcheck;
+ }
+ else
+ {
+ memcpy(temp,pn -> value . a . p . s,size);
+
+ temp[size] = 0;
+
+ xdev -> page_height = GetInches(temp);
+
+ if(xdev -> page_height <= 0.0)
+ {
+ xdev -> page_height = 0.0;
+
+ pn -> status = pv_limitcheck;
+
+ code = gs_error_limitcheck;
+ }
+ else
+ {
+ if(code == 0)
+ code = 1;
+ }
+ }
+ }
+
+ if(known[2] != 0)
+ {
+ gs_prop_item *pn = known[2];
+ LONG size = pn -> value . a . size;
+
+ if(size >= 256)
+ {
+ pn -> status = pv_limitcheck;
+
+ code = gs_error_limitcheck;
+ }
+ else
+ {
+ memcpy(xdev -> file_name,pn -> value . a . p . s,size);
+
+ xdev -> file_name[size] = 0;
+ }
+ }
+
+ if(code < 0)
+ return_error(code);
+
+ if(xdev -> is_open && code)
+ {
+ LONG ccode = gs_closedevice(dev);
+
+ if(ccode < 0)
+ return(ccode);
+ }
+
+ return(code);
+ }
+}
+
+ /* amiga_color_map_rgb_color(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue):
+ *
+ * Turn an RGB colour into a pen index.
+ */
+
+gx_color_index
+amiga_color_map_rgb_color(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue)
+{
+ LONG max = xdev -> cube_size - 1,r,g,b;
+
+ r = (max * red) / gx_max_color_value;
+ g = (max * green) / gx_max_color_value;
+ b = (max * blue) / gx_max_color_value;
+
+ return((r * xdev -> cube_size + g) * xdev -> cube_size + b);
+}
+
+ /* amiga_color_map_color_rgb(gx_device *dev,gx_color_index color,gx_color_value rgb[3]):
+ *
+ * Turn a pen index into RGB colour values.
+ */
+
+int
+amiga_color_map_color_rgb(gx_device *dev,gx_color_index color,gx_color_value rgb[3])
+{
+ LONG i,value,max = xdev -> cube_size - 1;
+
+ for(i = 2 ; i >= 0 ; i--)
+ {
+ value = color % xdev -> cube_size;
+
+ rgb[i] = (gx_max_color_value * value) / max;
+
+ color /= xdev -> cube_size;
+ }
+
+ return(0);
+}
+
+ /* amiga_color_map_rgb_color_pen(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue):
+ *
+ * Turn an RGB colour into a pen index; this routine takes remapped
+ * pens into account.
+ */
+
+gx_color_index
+amiga_color_map_rgb_color_pen(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue)
+{
+ LONG max = xdev -> cube_size - 1,r,g,b;
+
+ r = (max * red) / gx_max_color_value;
+ g = (max * green) / gx_max_color_value;
+ b = (max * blue) / gx_max_color_value;
+
+ return(xdev -> pens[(r * xdev -> cube_size + g) * xdev -> cube_size + b]);
+}
+
+ /* amiga_color_map_color_rgb_pen(gx_device *dev,gx_color_index color,gx_color_value rgb[3]):
+ *
+ * Turn a pen index into RGB colour values; this routine takes remapped
+ * pens into account.
+ */
+
+int
+amiga_color_map_color_rgb_pen(gx_device *dev,gx_color_index color,gx_color_value rgb[3])
+{
+ LONG i,value,max = xdev -> cube_size - 1;
+
+ /* Find the matching pen... */
+
+ for(i = 0 ; i < xdev -> cube_size * xdev -> cube_size * xdev -> cube_size ; i++)
+ {
+ if(xdev -> pens[i] == color)
+ {
+ color = i;
+
+ break;
+ }
+ }
+
+ for(i = 2 ; i >= 0 ; i--)
+ {
+ value = color % xdev -> cube_size;
+
+ rgb[i] = (gx_max_color_value * value) / max;
+
+ color /= xdev -> cube_size;
+ }
+
+ return(0);
+}
+
+ /* amiga_copy_color8():
+ *
+ * Copy a color image, the source is guaranteed to consist of
+ * one byte per colour.
+ */
+
+int
+amiga_copy_color8(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h)
+{
+ if(y < 0 || x < 0 || w < 0 || h < 0)
+ return(-1);
+ else
+ {
+ if(w > 0 && h > 0)
+ {
+ base += sourcex;
+
+ if(w > xdev -> width)
+ w = xdev -> width;
+
+ do
+ {
+
+ CopyMem((UBYTE *)base,xdev -> temp_array,w);
+
+ WritePixelLine8(xdev -> rport,x,y++,w,xdev -> temp_array,xdev -> temp_rport);
+
+ base += raster;
+ }
+ while(--h);
+ }
+
+ return(0);
+ }
+}
+
+ /* amiga_copy_mono_raw_color():
+ *
+ * Copy a monochrome image to a bitmap.
+ */
+
+int
+amiga_copy_mono_raw_color(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h,gx_color_index zero,gx_color_index one)
+{
+ if(y < 0 || x < 0 || w < 0 || h < 0)
+ return(-1);
+ else
+ {
+ if(w > 0 && h > 0 && zero != gx_no_color_index && one != gx_no_color_index)
+ {
+ PLANEPTR line[12];
+ LONG i,j,k,modulo = xdev -> rport -> BitMap -> BytesPerRow,depth = xdev -> rport -> BitMap -> Depth;
+
+ for(i = 0 ; i < depth ; i++)
+ line[i] = xdev -> rport -> BitMap -> Planes[i] + y * modulo;
+
+ w += sourcex;
+
+ if(zero == gx_no_color_index)
+ {
+ do
+ {
+ for(i = sourcex, j = x ; i < w ; i++, j++)
+ {
+ if(base[i >> 3] & shift[i & 7])
+ {
+ for(k = 0 ; k < depth ; k++)
+ {
+ if(one & (1 << k))
+ line[k][j >> 3] |= shift[j & 7];
+ else
+ line[k][j >> 3] &= masks[j & 7];
+ }
+ }
+ }
+
+ base += raster;
+
+ for(k = 0 ; k < depth ; k++)
+ line[k] += modulo;
+ }
+ while(--h);
+ }
+ else
+ {
+ if(one == gx_no_color_index)
+ {
+ do
+ {
+ for(i = sourcex, j = x ; i < w ; i++, j++)
+ {
+ if(base[i >> 3] & shift[i & 7])
+ {
+ for(k = 0 ; k < depth ; k++)
+ {
+ if(zero & (1 << k))
+ line[k][j >> 3] |= shift[j & 7];
+ else
+ line[k][j >> 3] &= masks[j & 7];
+ }
+ }
+ }
+
+ base += raster;
+
+ for(k = 0 ; k < depth ; k++)
+ line[k] += modulo;
+ }
+ while(--h);
+ }
+ else
+ {
+ do
+ {
+ for(i = sourcex, j = x ; i < w ; i++, j++)
+ {
+ if(base[i >> 3] & shift[i & 7])
+ {
+ for(k = 0 ; k < depth ; k++)
+ {
+ if(one & (1 << k))
+ line[k][j >> 3] |= shift[j & 7];
+ else
+ line[k][j >> 3] &= masks[j & 7];
+ }
+ }
+ else
+ {
+ for(k = 0 ; k < depth ; k++)
+ {
+ if(zero & (1 << k))
+ line[k][j >> 3] |= shift[j & 7];
+ else
+ line[k][j >> 3] &= masks[j & 7];
+ }
+ }
+ }
+
+ base += raster;
+
+ for(k = 0 ; k < depth ; k++)
+ line[k] += modulo;
+ }
+ while(--h);
+ }
+ }
+ }
+
+ return(0);
+ }
+}
+
+ /* amiga_copy_color_raw_color16():
+ *
+ * Copy a color image, the source data is guaranteed to consist
+ * of one word per colour.
+ */
+
+int
+amiga_copy_color_raw_color16(gx_device *dev,const UBYTE *data,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h)
+{
+ if(y < 0 || x < 0 || w < 0 || h < 0)
+ return(-1);
+ else
+ {
+ if(w > 0 && h > 0)
+ {
+ PLANEPTR line[12];
+ LONG i,j,k,modulo = xdev -> rport -> BitMap -> BytesPerRow,depth = xdev -> rport -> BitMap -> Depth;
+ UWORD *base = (UWORD *)data;
+
+ for(i = 0 ; i < depth ; i++)
+ line[i] = xdev -> rport -> BitMap -> Planes[i] + y * modulo;
+
+ w += sourcex;
+
+ raster /= 2;
+
+ do
+ {
+ for(i = sourcex, j = x ; i < w ; i++, j++)
+ {
+ for(k = 0 ; k < depth ; k++)
+ {
+ if(base[i] & (1 << k))
+ line[k][j >> 3] |= shift[j & 7];
+ else
+ line[k][j >> 3] &= masks[j & 7];
+ }
+ }
+
+ base += raster;
+
+ for(k = 0 ; k < depth ; k++)
+ line[k] += modulo;
+ }
+ while(--h);
+ }
+
+ return(0);
+ }
+}
+
+ /* amiga_fill_rectangle_raw_color():
+ *
+ * Fill a rectangular area in a bitmap.
+ */
+
+int
+amiga_fill_rectangle_raw_color(gx_device *dev,int x,int y,int w,int h,gx_color_index color)
+{
+ if(x < 0 || x > xdev -> width - w || y < 0 || y > xdev -> height - h)
+ return(-1);
+ else
+ {
+ if(w > 0 && h > 0 && color != gx_no_color_index)
+ {
+ PLANEPTR line[12];
+ LONG i,j,right,mid,modulo = xdev -> rport -> BitMap -> BytesPerRow,depth = xdev -> rport -> BitMap -> Depth;
+
+ for(i = 0 ; i < depth ; i++)
+ line[i] = xdev -> rport -> BitMap -> Planes[i] + y * modulo + (x >> 3);
+
+ right = x + w;
+ mid = (right >> 3) - (x >> 3);
+
+ x &= 7;
+ right &= 7;
+
+ if(mid)
+ {
+ UBYTE *ptr;
+
+ do
+ {
+ for(j = 0 ; j < depth ; j++)
+ {
+ ptr = line[j];
+
+ i = mid;
+
+ if(color & (1 << j))
+ {
+ *ptr++ |= 0xFF >> x;
+
+ while(--i > 0)
+ *ptr++ = 0xFF;
+
+ *ptr |= ~(0xFF >> right);
+ }
+ else
+ {
+ *ptr++ &= ~(0xFF >> x);
+
+ while(--i > 0)
+ *ptr++ = 0x00;
+
+ *ptr &= 0xFF >> right;
+ }
+
+ line[j] += modulo;
+ }
+ }
+ while(--h);
+ }
+ else
+ {
+ UBYTE one_mask = (0xFF >> x) & ~(0xFF >> right),
+ zero_mask = ~(0xFF >> x) | (0xFF >> right);
+ do
+ {
+ for(j = 0 ; j < depth ; j++)
+ {
+ if(color & (1 << j))
+ *line[j] |= one_mask;
+ else
+ *line[j] &= zero_mask;
+
+ line[j] += modulo;
+ }
+ }
+ while(--h);
+ }
+ }
+
+ return(0);
+ }
+}
+
+ /* amiga_draw_line_raw_color():
+ *
+ * Draw a hair line, your basic DDA algorithm;
+ * keep your fingers crossed.
+ */
+
+int
+amiga_draw_line_raw_color(gx_device *dev,int x,int y,int x1,int y1,gx_color_index color)
+{
+ if(color != gx_no_color_index && (x != x1 || y != y1))
+ {
+ LONG xstep,ystep,dx,dy,diff,modulo;
+ UBYTE *line,*plane,pen;
+ LONG last,i,orig_x = x,orig_y = y;
+
+ modulo = xdev -> rport -> BitMap -> BytesPerRow;
+
+ for(i = 0 ; i < xdev -> rport -> BitMap -> Depth ; i++)
+ {
+ plane = xdev -> rport -> BitMap -> Planes[i];
+ line = &plane[y1 * modulo];
+ last = y1;
+ pen = line[x1 >> 3] & (x1 & 7);
+ x = orig_x;
+ y = orig_y;
+
+ dx = x1 - x;
+ dy = y1 - y;
+
+ if(dx < 0)
+ {
+ dx = -dx;
+ dy = -dy;
+
+ x = x1;
+ y = y1;
+ }
+
+ if(y != last)
+ line = &plane[(last = y) * modulo];
+
+ if(color & (1 << i))
+ {
+ line[x >> 3] |= shift[x & 7];
+
+ xstep = ystep = 0;
+
+ if(dy < 0)
+ {
+ if(dx > -dy)
+ {
+ diff = -dx / 2;
+
+ do
+ {
+ xstep++;
+
+ if(diff > 0)
+ {
+ ystep--;
+
+ diff = diff - dy - dx;
+ }
+ else
+ diff -= dy;
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] |= shift[x1 & 7];
+ }
+ }
+ while(xstep < dx);
+ }
+ else
+ {
+ if(dx == -dy)
+ diff = 0;
+ else
+ diff = -dy / 2;
+
+ do
+ {
+ ystep--;
+
+ if(diff > 0)
+ diff -= dx;
+ else
+ {
+ xstep++;
+
+ diff = diff - dy - dx;
+ }
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] |= shift[x1 & 7];
+ }
+ }
+ while(ystep > dy);
+ }
+ }
+ else
+ {
+ if(dx > dy)
+ {
+ diff = -dx / 2;
+
+ do
+ {
+ xstep++;
+
+ if(diff > 0)
+ {
+ ystep++;
+
+ diff = diff + dy - dx;
+ }
+ else
+ diff += dy;
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] |= shift[x1 & 7];
+ }
+ }
+ while(xstep < dx);
+ }
+ else
+ {
+ if(dx == dy)
+ diff = 0;
+ else
+ diff = dy / 2;
+
+ do
+ {
+ ystep++;
+
+ if(diff > 0)
+ diff -= dx;
+ else
+ {
+ xstep++;
+
+ diff = diff + dy - dx;
+ }
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] |= shift[x1 & 7];
+ }
+ }
+ while(ystep < dy);
+ }
+ }
+
+ if(!pen)
+ {
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] &= masks[x1 & 7];
+ }
+ }
+ else
+ {
+ line[x >> 3] &= masks[x & 7];
+
+ xstep = ystep = 0;
+
+ if(dy < 0)
+ {
+ if(dx > -dy)
+ {
+ diff = -dx / 2;
+
+ do
+ {
+ xstep++;
+
+ if(diff > 0)
+ {
+ ystep--;
+
+ diff = diff - dy - dx;
+ }
+ else
+ diff -= dy;
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] &= masks[x1 & 7];
+ }
+ }
+ while(xstep < dx);
+ }
+ else
+ {
+ if(dx == -dy)
+ diff = 0;
+ else
+ diff = -dy / 2;
+
+ do
+ {
+ ystep--;
+
+ if(diff > 0)
+ diff -= dx;
+ else
+ {
+ xstep++;
+
+ diff = diff - dy - dx;
+ }
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] &= masks[x1 & 7];
+ }
+ }
+ while(ystep > dy);
+ }
+ }
+ else
+ {
+ if(dx > dy)
+ {
+ diff = -dx / 2;
+
+ do
+ {
+ xstep++;
+
+ if(diff > 0)
+ {
+ ystep++;
+
+ diff = diff + dy - dx;
+ }
+ else
+ diff += dy;
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] &= masks[x1 & 7];
+ }
+ }
+ while(xstep < dx);
+ }
+ else
+ {
+ if(dx == dy)
+ diff = 0;
+ else
+ diff = dy / 2;
+
+ do
+ {
+ ystep++;
+
+ if(diff > 0)
+ diff -= dx;
+ else
+ {
+ xstep++;
+
+ diff = diff + dy - dx;
+ }
+
+ {
+ LONG x1 = x + xstep,y1 = y + ystep;
+
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] &= masks[x1 & 7];
+ }
+ }
+ while(ystep < dy);
+ }
+ }
+
+ if(pen)
+ {
+ if(y1 != last)
+ line = &plane[(last = y1) * modulo];
+
+ line[x1 >> 3] |= pen;
+ }
+ }
+ }
+ }
+
+ return(0);
+}
diff -rup --new-file baseline/fsf/ghostscript/gp_amiga.c amiga/fsf/ghostscript/gp_amiga.c
--- baseline/fsf/ghostscript/gp_amiga.c Wed Dec 31 17:00:00 1969
+++ amiga/fsf/ghostscript/gp_amiga.c Sat Sep 28 00:00:00 1996
@@ -0,0 +1,344 @@
+/* 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. */
+
+/* gp_amiga.c */
+/* Amiga specific routines for Ghostscript */
+
+#define ushort foo2 /* Hide conflicting typedef */
+
+#include <intuition/intuitionbase.h>
+#include <graphics/gfxbase.h>
+#include <dos/dosextens.h>
+
+#include <clib/exec_protos.h>
+#include <clib/dos_protos.h>
+
+/*
+#include <inline/exec.h>
+#include <inline/dos.h>
+*/
+
+#include <signal.h>
+
+#undef ushort
+
+/* gp_amiga.c */
+/* Amiga-specific routines for Ghostscript */
+
+
+#include "memory_.h"
+#include "string_.h"
+#include "gx.h"
+#include "gp.h"
+#include "stat_.h"
+#include "time_.h"
+
+struct IntuitionBase *IntuitionBase;
+struct GfxBase *GfxBase;
+struct Library *LayersBase,
+ *IFFParseBase,
+ *AslBase,
+ *UtilityBase;
+
+/* Nothing happens here */
+void
+gs_amiga_init()
+{
+}
+
+void
+gp_exit(int exit_status, int code)
+{
+}
+
+/* Cleanup routine, as called by atexit() trap */
+void
+cleanup()
+{
+ extern void devcleanup();
+
+ devcleanup();
+
+ if(IFFParseBase)
+ {
+ CloseLibrary(IFFParseBase);
+
+ IFFParseBase = NULL;
+ }
+
+ if(AslBase)
+ {
+ CloseLibrary(AslBase);
+
+ AslBase = NULL;
+ }
+
+ if(UtilityBase)
+ {
+ CloseLibrary(UtilityBase);
+
+ UtilityBase = NULL;
+ }
+
+ if(LayersBase)
+ {
+ CloseLibrary(LayersBase);
+
+ LayersBase = NULL;
+ }
+
+ if(GfxBase)
+ {
+ CloseLibrary((struct Library *)GfxBase);
+
+ GfxBase = NULL;
+ }
+
+ if(IntuitionBase)
+ {
+ CloseLibrary((struct Library *)IntuitionBase);
+
+ IntuitionBase = NULL;
+ }
+}
+
+void
+signal_handler(int signal)
+{
+ fprintf(stderr,"*** BREAK: Ghostscript\a\n");
+
+ exit(1);
+}
+
+/* Do platform-dependent initialization */
+void
+gp_init()
+{
+ atexit(cleanup);
+
+ signal(SIGINT,signal_handler);
+
+ if(!(IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",37)))
+ {
+ perror("Ghostscript: cannot open intuition.library v37");
+
+ exit(20);
+ }
+
+ if(!(GfxBase = (struct GfxBase *)OpenLibrary("graphics.library",37)))
+ {
+ perror("Ghostscript: cannot open graphics.library v37");
+
+ exit(20);
+ }
+
+ if(!(LayersBase = OpenLibrary("layers.library",37)))
+ {
+ perror("Ghostscript: cannot open layers.library v37");
+
+ exit(20);
+ }
+
+ if(!(UtilityBase = OpenLibrary("utility.library",37)))
+ {
+ perror("Ghostscript: cannot open utility.library v37");
+
+ exit(20);
+ }
+
+ if(!(IFFParseBase = OpenLibrary("iffparse.library",37)))
+ {
+ perror("Ghostscript: cannot open iffparse.library v37");
+
+ exit(20);
+ }
+
+ AslBase = OpenLibrary("asl.library",38);
+}
+
+/* Read the current date (in days since Jan. 1, 1980) */
+/* and time (in milliseconds since midnight). */
+void
+gp_get_clock(long *pdt)
+{
+ struct DateStamp Date;
+
+ DateStamp(&Date);
+
+ pdt[0] = Date . ds_Days + 2 * 365;
+ pdt[1] = (Date . ds_Minute * 60 + Date . ds_Tick / TICKS_PER_SECOND) * 1000;
+}
+
+/* ------ Printer accessing ------ */
+
+/* Open a connection to a printer. A null file name means use the */
+/* standard printer connected to the machine, if any. */
+/* "|command" opens an output pipe. */
+/* Return NULL if the connection could not be opened. */
+FILE *
+gp_open_printer(char *fname, int binary_mode)
+{ return
+ (strlen(fname) == 0 ?
+ gp_open_scratch_file(gp_scratch_file_name_prefix, fname, "w") :
+ fname[0] == '|' ?
+ popen(fname + 1, "w") :
+ fopen(fname, "w"));
+}
+
+/* Close the connection to the printer. */
+void
+gp_close_printer(FILE *pfile, const char *fname)
+{ if ( fname[0] == '|' )
+ pclose(pfile);
+ else
+ fclose(pfile);
+}
+
+/* ------ File name syntax ------ */
+
+/* Define the character used for separating file names in a list. */
+const char gp_file_name_list_separator = ',';
+
+/* Define the default scratch file name template. */
+const char gp_scratch_file_name_prefix[] = "T:gs_";
+
+/* Define the string to be concatenated with the file mode */
+/* for opening files without end-of-line conversion. */
+const char gp_fmode_binary_suffix[] = "b";
+/* Define the file modes for binary reading or writing. */
+const char gp_fmode_rb[] = "r";
+const char gp_fmode_wb[] = "w";
+
+/* Create and open a scratch file with a given name prefix. */
+/* Write the actual file name at fname. */
+FILE *
+gp_open_scratch_file(const char *prefix, char *fname, const char *mode)
+{
+ strcpy(fname,prefix);
+ /* Prevent trailing X's in path from being converted by mktemp. */
+ if ( *fname != 0 && fname[strlen(fname) - 1] == 'X' )
+ strcat(fname, "-");
+ strcat(fname, "XXXXXX");
+ mktemp(fname);
+ return fopen(fname, mode);
+}
+
+/* Answer whether a file name contains a directory/device specification, */
+/* i.e. is absolute (not directory- or device-relative). */
+int
+gp_file_name_is_absolute(const char *fname, uint len)
+{
+ int i;
+
+ for(i = 0 ; i < len ; i++)
+ {
+ if(fname[i] == ':')
+ return(1);
+ }
+
+ return(0);
+}
+
+/* Answer the string to be used for combining a directory/device prefix */
+/* with a base file name. The file name is known to not be absolute. */
+const char *
+gp_file_name_concat_string(const char *prefix, uint plen, const char *fname, uint len)
+{
+ if(plen > 0 && (prefix[plen - 1] == '/' || prefix[plen - 1] == ':'))
+ return("");
+ else
+ return("/");
+}
+
+/* ------ File operations ------ */
+
+/* If the file given by fname exists, fill in its status and return 1; */
+/* otherwise return 0. */
+int
+gp_file_status(const char *fname, file_status *pstatus)
+{ struct stat sbuf;
+ /* The RS/6000 prototype for stat doesn't include const, */
+ /* so we have to explicitly remove the const modifier. */
+ if ( stat((char *)fname, &sbuf) < 0 ) return 0;
+ pstatus->size_pages = stat_blocks(&sbuf); /* st_blocks is */
+ /* missing on some systems, */
+ /* see stat_.h */
+ pstatus->size_bytes = sbuf.st_size;
+ pstatus->time_referenced = sbuf.st_mtime;
+ pstatus->time_created = sbuf.st_ctime;
+ return 1;
+}
+
+
+/* ------ File enumeration ------ */
+
+/****** THIS IS NOT SUPPORTED ON UNIX SYSTEMS. ******/
+/* Amazingly enough, there is no standard Unix library routine */
+/* for enumerating the files matching a pattern, */
+/* or even for enumerating (conveniently) the files in a directory. */
+
+struct file_enum_s {
+ char *pattern;
+ int first_time;
+ const gs_memory_procs *mprocs;
+};
+
+/* Initialize an enumeration. NEEDS WORK ON HANDLING * ? \. */
+file_enum *
+gp_enumerate_files_init(const char *pat, uint patlen,
+ const gs_memory_procs *mprocs)
+{ file_enum *pfen = (file_enum *)(*mprocs->alloc)(1, sizeof(file_enum), "gp_enumerate_files");
+ char *pattern;
+ if ( pfen == 0 ) return 0;
+ pattern = (*mprocs->alloc)(patlen + 1, 1,
+ "gp_enumerate_files(pattern)");
+ if ( pattern == 0 ) return 0;
+ memcpy(pattern, pat, patlen);
+ pattern[patlen] = 0;
+ pfen->pattern = pattern;
+ pfen->mprocs = mprocs;
+ pfen->first_time = 1;
+ return pfen;
+}
+
+/* Enumerate the next file. */
+/* PUNT: JUST RETURN THE PATTERN. */
+uint
+gp_enumerate_files_next(file_enum *pfen, char *ptr, uint maxlen)
+{ if ( pfen->first_time )
+ { char *pattern = pfen->pattern;
+ uint len = strlen(pattern);
+ pfen->first_time = 0;
+ if ( len > maxlen )
+ return maxlen + 1;
+ strcpy(ptr, pattern);
+ return len;
+ }
+ return -1;
+}
+
+/* Clean up the file enumeration. */
+void
+gp_enumerate_files_close(file_enum *pfen)
+{ const gs_memory_procs *mprocs = pfen->mprocs;
+ (*mprocs->free)(pfen->pattern, strlen(pfen->pattern) + 1, 1,
+ "gp_enumerate_files_close(pattern)");
+ (*mprocs->free)((char *)pfen, 1, sizeof(file_enum),
+ "gp_enumerate_files_close");
+}
diff -rup --new-file baseline/fsf/ghostscript/gs.1 amiga/fsf/ghostscript/gs.1
--- baseline/fsf/ghostscript/gs.1 Wed May 19 03:41:20 1993
+++ amiga/fsf/ghostscript/gs.1 Sat Sep 28 00:00:00 1996
@@ -154,7 +154,7 @@ if any;
3.
The directory/ies specified by the GS_LIB_DEFAULT macro in the
Ghostscript makefile (which has been set to
-"/usr/local/lib/ghostscript:/usr/local/lib/ghostscript/fonts").
+"/ade/lib/ghostscript:/ade/lib/ghostscript/fonts").
.PP
Each of these (GS_LIB_DEFAULT, GS_LIB, and \-I parameter) may be either
a single directory, or a list of directories separated by a `:'.
@@ -320,16 +320,16 @@ Selects an alternate output file (or pip
device, as described above.
.SH FILES
.TP
-.B /usr/local/lib/ghostscript/*
+.B /ade/lib/ghostscript/*
Startup-files, utilities, and basic font definitions.
.TP
-.B /usr/local/lib/ghostscript/fonts/*
+.B /ade/lib/ghostscript/fonts/*
Additional font definitions.
.TP
-.B /usr/local/lib/ghostscript/examples/*
+.B /ade/lib/ghostscript/examples/*
Demo Ghostscript files.
.TP
-.B /usr/local/lib/doc/ghostscript/doc/*
+.B /ade/lib/doc/ghostscript/doc/*
Assorted document files.
.SH "SEE ALSO"
The various Ghostscript document files (above).
diff -rup --new-file baseline/fsf/ghostscript/gsaddmod amiga/fsf/ghostscript/gsaddmod
--- baseline/fsf/ghostscript/gsaddmod Sat May 15 23:55:00 1993
+++ amiga/fsf/ghostscript/gsaddmod Sat Sep 28 00:00:00 1996
@@ -1,3 +1,4 @@
export m; m=$1
shift
-echo $* >>${m}.dev
+# The builtin echo in pdksh is not up to this task.
+/bin/echo $* >>${m}.dev
diff -rup --new-file baseline/fsf/ghostscript/gsnd amiga/fsf/ghostscript/gsnd
--- baseline/fsf/ghostscript/gsnd Mon Feb 8 02:50:18 1993
+++ amiga/fsf/ghostscript/gsnd Sat Sep 28 00:00:00 1996
@@ -1 +1,4 @@
-gs -DNODISPLAY $*
+.key ARGS/F
+.bra {
+.ket }
+gs -DNODISPLAY {ARGS}
diff -rup --new-file baseline/fsf/ghostscript/gssetdev amiga/fsf/ghostscript/gssetdev
--- baseline/fsf/ghostscript/gssetdev Sat May 15 23:56:28 1993
+++ amiga/fsf/ghostscript/gssetdev Sat Sep 28 00:00:00 1996
@@ -1,3 +1,4 @@
export m; m=$1
shift
-echo -dev ${m} -obj $* >${m}.dev
+# The builtin echo in pdksh is not up to this task.
+/bin/echo -dev ${m} -obj $* >${m}.dev
diff -rup --new-file baseline/fsf/ghostscript/gssetmod amiga/fsf/ghostscript/gssetmod
--- baseline/fsf/ghostscript/gssetmod Sat May 15 23:56:14 1993
+++ amiga/fsf/ghostscript/gssetmod Sat Sep 28 00:00:00 1996
@@ -1,3 +1,4 @@
export m; m=$1
shift
-echo -obj $* >${m}.dev
+# The builtin echo in pdksh is not up to this task.
+/bin/echo -obj $* >${m}.dev
diff -rup --new-file baseline/fsf/ghostscript/make.doc amiga/fsf/ghostscript/make.doc
--- baseline/fsf/ghostscript/make.doc Fri May 28 15:57:00 1993
+++ amiga/fsf/ghostscript/make.doc Sat Sep 28 00:00:00 1996
@@ -82,7 +82,8 @@ The makefiles distributed with Ghostscri
follows:
- GS_LIB_DEFAULT: on Unix systems, /usr/local/lib/ghostscript
-and /usr/local/lib/ghostscript/fonts; on MS-DOS systems, C:\GS.
+and /usr/local/lib/ghostscript/fonts; on MS-DOS systems, C:\GS; on AmigaOS
+systems, /ade (aka ade:)
- TDEBUG: no debugging code included in the build.
diff -rup --new-file baseline/fsf/ghostscript/manifests/bin amiga/fsf/ghostscript/manifests/bin
--- baseline/fsf/ghostscript/manifests/bin Wed Dec 31 17:00:00 1969
+++ amiga/fsf/ghostscript/manifests/bin Sat Sep 28 00:00:00 1996
@@ -0,0 +1,149 @@
+COPYING
+COPYING.info
+bin/bdftops
+bin/font2c
+bin/gs
+bin/gsbj
+bin/gsdj
+bin/gslj
+bin/gslp
+bin/gsnd
+bin/ps2ascii
+bin/ps2epsi
+lib/ghostscript/Fontmap
+lib/ghostscript/README
+lib/ghostscript/bdftops.ps
+lib/ghostscript/decrypt.ps
+lib/ghostscript/doc/NEWS
+lib/ghostscript/doc/ansi2knr.1
+lib/ghostscript/doc/devices.doc
+lib/ghostscript/doc/drivers.doc
+lib/ghostscript/doc/fonts.doc
+lib/ghostscript/doc/gs.1
+lib/ghostscript/doc/hershey.doc
+lib/ghostscript/doc/history.doc
+lib/ghostscript/doc/humor.doc
+lib/ghostscript/doc/language.doc
+lib/ghostscript/doc/lib.doc
+lib/ghostscript/doc/make.doc
+lib/ghostscript/doc/ps2epsi.doc
+lib/ghostscript/doc/psfiles.doc
+lib/ghostscript/doc/readme.doc
+lib/ghostscript/doc/use.doc
+lib/ghostscript/doc/xfonts.doc
+lib/ghostscript/examples/cheq.ps
+lib/ghostscript/examples/chess.ps
+lib/ghostscript/examples/colorcir.ps
+lib/ghostscript/examples/escher.ps
+lib/ghostscript/examples/golfer.ps
+lib/ghostscript/examples/snowflak.ps
+lib/ghostscript/examples/tiger.ps
+lib/ghostscript/font2c.ps
+lib/ghostscript/fonts/bchb.afm
+lib/ghostscript/fonts/bchb.gsf
+lib/ghostscript/fonts/bchbi.afm
+lib/ghostscript/fonts/bchbi.gsf
+lib/ghostscript/fonts/bchr.afm
+lib/ghostscript/fonts/bchr.gsf
+lib/ghostscript/fonts/bchri.afm
+lib/ghostscript/fonts/bchri.gsf
+lib/ghostscript/fonts/cyr.gsf
+lib/ghostscript/fonts/cyri.gsf
+lib/ghostscript/fonts/hrge_r.gsf
+lib/ghostscript/fonts/hrge_rb.gsf
+lib/ghostscript/fonts/hrge_ro.gsf
+lib/ghostscript/fonts/hrgk_c.gsf
+lib/ghostscript/fonts/hrgk_s.gsf
+lib/ghostscript/fonts/hrgr_r.gsf
+lib/ghostscript/fonts/hrgr_rb.gsf
+lib/ghostscript/fonts/hrgr_ro.gsf
+lib/ghostscript/fonts/hrit_r.gsf
+lib/ghostscript/fonts/hrit_rb.gsf
+lib/ghostscript/fonts/hrit_ro.gsf
+lib/ghostscript/fonts/hrpl_r.gsf
+lib/ghostscript/fonts/hrpl_rb.gsf
+lib/ghostscript/fonts/hrpl_ro.gsf
+lib/ghostscript/fonts/hrpl_s.gsf
+lib/ghostscript/fonts/hrpl_sb.gsf
+lib/ghostscript/fonts/hrpl_sbo.gsf
+lib/ghostscript/fonts/hrpl_so.gsf
+lib/ghostscript/fonts/hrpl_t.gsf
+lib/ghostscript/fonts/hrpl_tb.gsf
+lib/ghostscript/fonts/hrpl_tbi.gsf
+lib/ghostscript/fonts/hrpl_ti.gsf
+lib/ghostscript/fonts/hrsc_c.gsf
+lib/ghostscript/fonts/hrsc_cb.gsf
+lib/ghostscript/fonts/hrsc_co.gsf
+lib/ghostscript/fonts/hrsc_s.gsf
+lib/ghostscript/fonts/hrsc_sb.gsf
+lib/ghostscript/fonts/hrsc_so.gsf
+lib/ghostscript/fonts/hrsy_r.gsf
+lib/ghostscript/fonts/n019003l.afm
+lib/ghostscript/fonts/n019003l.gsf
+lib/ghostscript/fonts/n021003l.afm
+lib/ghostscript/fonts/n021003l.gsf
+lib/ghostscript/fonts/ncrb.gsf
+lib/ghostscript/fonts/ncrbi.gsf
+lib/ghostscript/fonts/ncrr.gsf
+lib/ghostscript/fonts/ncrri.gsf
+lib/ghostscript/fonts/pagd.gsf
+lib/ghostscript/fonts/pagdo.gsf
+lib/ghostscript/fonts/pagk.gsf
+lib/ghostscript/fonts/pagko.gsf
+lib/ghostscript/fonts/pbkd.gsf
+lib/ghostscript/fonts/pbkdi.gsf
+lib/ghostscript/fonts/pbkl.gsf
+lib/ghostscript/fonts/pbkli.gsf
+lib/ghostscript/fonts/phvb.gsf
+lib/ghostscript/fonts/phvbo.gsf
+lib/ghostscript/fonts/phvr.gsf
+lib/ghostscript/fonts/phvro.gsf
+lib/ghostscript/fonts/phvrrn.gsf
+lib/ghostscript/fonts/pncb.gsf
+lib/ghostscript/fonts/pncbi.gsf
+lib/ghostscript/fonts/pncr.gsf
+lib/ghostscript/fonts/pncri.gsf
+lib/ghostscript/fonts/pplb.gsf
+lib/ghostscript/fonts/pplbi.gsf
+lib/ghostscript/fonts/pplr.gsf
+lib/ghostscript/fonts/pplri.gsf
+lib/ghostscript/fonts/psyr.gsf
+lib/ghostscript/fonts/ptmb.gsf
+lib/ghostscript/fonts/ptmbi.gsf
+lib/ghostscript/fonts/ptmr.gsf
+lib/ghostscript/fonts/ptmri.gsf
+lib/ghostscript/fonts/putb.gsf
+lib/ghostscript/fonts/putbi.gsf
+lib/ghostscript/fonts/putr.gsf
+lib/ghostscript/fonts/putri.gsf
+lib/ghostscript/fonts/pzdr.afm
+lib/ghostscript/fonts/pzdr.gsf
+lib/ghostscript/fonts/u003043t.afm
+lib/ghostscript/fonts/u003043t.gsf
+lib/ghostscript/fonts/u004006t.afm
+lib/ghostscript/fonts/u004006t.gsf
+lib/ghostscript/fonts/zcb.gsf
+lib/ghostscript/fonts/zcr.gsf
+lib/ghostscript/fonts/zcro.gsf
+lib/ghostscript/gs_dbt_e.ps
+lib/ghostscript/gs_dps1.ps
+lib/ghostscript/gs_fonts.ps
+lib/ghostscript/gs_init.ps
+lib/ghostscript/gs_lev2.ps
+lib/ghostscript/gs_statd.ps
+lib/ghostscript/gs_sym_e.ps
+lib/ghostscript/gs_type0.ps
+lib/ghostscript/gslp.ps
+lib/ghostscript/impath.ps
+lib/ghostscript/landscap.ps
+lib/ghostscript/level1.ps
+lib/ghostscript/prfont.ps
+lib/ghostscript/ps2ascii.ps
+lib/ghostscript/ps2epsi.ps
+lib/ghostscript/ps2image.ps
+lib/ghostscript/pstoppm.ps
+lib/ghostscript/quit.ps
+lib/ghostscript/showpage.ps
+lib/ghostscript/type1ops.ps
+lib/ghostscript/uglyr.gsf
+lib/ghostscript/wrfont.ps
diff -rup --new-file baseline/fsf/ghostscript/manifests/src amiga/fsf/ghostscript/manifests/src
--- baseline/fsf/ghostscript/manifests/src Wed Dec 31 17:00:00 1969
+++ amiga/fsf/ghostscript/manifests/src Sat Sep 28 00:00:00 1996
@@ -0,0 +1,553 @@
+fsf/ghostscript/COPYING
+fsf/ghostscript/Fontmap
+fsf/ghostscript/Fontmap.ATM
+fsf/ghostscript/Fontmap.VMS
+fsf/ghostscript/Makefile.in
+fsf/ghostscript/NEWS
+fsf/ghostscript/Product-Info
+fsf/ghostscript/README
+fsf/ghostscript/alloc.h
+fsf/ghostscript/alphabet.ps
+fsf/ghostscript/amiga-gcc.mak
+fsf/ghostscript/amiga.doc
+fsf/ghostscript/ansi2knr.1
+fsf/ghostscript/ansi2knr.c
+fsf/ghostscript/ansihead.mak
+fsf/ghostscript/astate.h
+fsf/ghostscript/bc.mak
+fsf/ghostscript/bcwin.mak
+fsf/ghostscript/bdftops
+fsf/ghostscript/bdftops.bat
+fsf/ghostscript/bdftops.ps
+fsf/ghostscript/bench.ps
+fsf/ghostscript/bfont.h
+fsf/ghostscript/bnum.h
+fsf/ghostscript/bseq.h
+fsf/ghostscript/btoken.h
+fsf/ghostscript/cc-head.mak
+fsf/ghostscript/ccfont.h
+fsf/ghostscript/ccgs
+fsf/ghostscript/cfonts.mak
+fsf/ghostscript/cheq.ps
+fsf/ghostscript/chess.ps
+fsf/ghostscript/colorcir.ps
+fsf/ghostscript/commprod.doc
+fsf/ghostscript/configure
+fsf/ghostscript/configure.in
+fsf/ghostscript/cp.bat
+fsf/ghostscript/ctype_.h
+fsf/ghostscript/decrypt.ps
+fsf/ghostscript/devices.doc
+fsf/ghostscript/devs.mak
+fsf/ghostscript/dict.h
+fsf/ghostscript/dodebug.h
+fsf/ghostscript/dos_.h
+fsf/ghostscript/dparam.h
+fsf/ghostscript/drivers.doc
+fsf/ghostscript/dstack.h
+fsf/ghostscript/echogs.c
+fsf/ghostscript/ega.c
+fsf/ghostscript/ega.tr
+fsf/ghostscript/empty.ps
+fsf/ghostscript/errno_.h
+fsf/ghostscript/errors.h
+fsf/ghostscript/escher.ps
+fsf/ghostscript/estack.h
+fsf/ghostscript/filedev.h
+fsf/ghostscript/files.h
+fsf/ghostscript/font.h
+fsf/ghostscript/font2c
+fsf/ghostscript/font2c.bat
+fsf/ghostscript/font2c.ps
+fsf/ghostscript/fonts.doc
+fsf/ghostscript/fonts.mak
+fsf/ghostscript/fonts/Makefile.in
+fsf/ghostscript/fonts/bchb.afm
+fsf/ghostscript/fonts/bchb.gsf
+fsf/ghostscript/fonts/bchbi.afm
+fsf/ghostscript/fonts/bchbi.gsf
+fsf/ghostscript/fonts/bchr.afm
+fsf/ghostscript/fonts/bchr.gsf
+fsf/ghostscript/fonts/bchri.afm
+fsf/ghostscript/fonts/bchri.gsf
+fsf/ghostscript/fonts/cyr.gsf
+fsf/ghostscript/fonts/cyri.gsf
+fsf/ghostscript/fonts/hrge_r.gsf
+fsf/ghostscript/fonts/hrge_rb.gsf
+fsf/ghostscript/fonts/hrge_ro.gsf
+fsf/ghostscript/fonts/hrgk_c.gsf
+fsf/ghostscript/fonts/hrgk_s.gsf
+fsf/ghostscript/fonts/hrgr_r.gsf
+fsf/ghostscript/fonts/hrgr_rb.gsf
+fsf/ghostscript/fonts/hrgr_ro.gsf
+fsf/ghostscript/fonts/hrit_r.gsf
+fsf/ghostscript/fonts/hrit_rb.gsf
+fsf/ghostscript/fonts/hrit_ro.gsf
+fsf/ghostscript/fonts/hrpl_r.gsf
+fsf/ghostscript/fonts/hrpl_rb.gsf
+fsf/ghostscript/fonts/hrpl_ro.gsf
+fsf/ghostscript/fonts/hrpl_s.gsf
+fsf/ghostscript/fonts/hrpl_sb.gsf
+fsf/ghostscript/fonts/hrpl_sbo.gsf
+fsf/ghostscript/fonts/hrpl_so.gsf
+fsf/ghostscript/fonts/hrpl_t.gsf
+fsf/ghostscript/fonts/hrpl_tb.gsf
+fsf/ghostscript/fonts/hrpl_tbi.gsf
+fsf/ghostscript/fonts/hrpl_ti.gsf
+fsf/ghostscript/fonts/hrsc_c.gsf
+fsf/ghostscript/fonts/hrsc_cb.gsf
+fsf/ghostscript/fonts/hrsc_co.gsf
+fsf/ghostscript/fonts/hrsc_s.gsf
+fsf/ghostscript/fonts/hrsc_sb.gsf
+fsf/ghostscript/fonts/hrsc_so.gsf
+fsf/ghostscript/fonts/hrsy_r.gsf
+fsf/ghostscript/fonts/n019003l.afm
+fsf/ghostscript/fonts/n019003l.gsf
+fsf/ghostscript/fonts/n021003l.afm
+fsf/ghostscript/fonts/n021003l.gsf
+fsf/ghostscript/fonts/ncrb.gsf
+fsf/ghostscript/fonts/ncrbi.gsf
+fsf/ghostscript/fonts/ncrr.gsf
+fsf/ghostscript/fonts/ncrri.gsf
+fsf/ghostscript/fonts/pagd.gsf
+fsf/ghostscript/fonts/pagdo.gsf
+fsf/ghostscript/fonts/pagk.gsf
+fsf/ghostscript/fonts/pagko.gsf
+fsf/ghostscript/fonts/pbkd.gsf
+fsf/ghostscript/fonts/pbkdi.gsf
+fsf/ghostscript/fonts/pbkl.gsf
+fsf/ghostscript/fonts/pbkli.gsf
+fsf/ghostscript/fonts/phvb.gsf
+fsf/ghostscript/fonts/phvbo.gsf
+fsf/ghostscript/fonts/phvr.gsf
+fsf/ghostscript/fonts/phvro.gsf
+fsf/ghostscript/fonts/phvrrn.gsf
+fsf/ghostscript/fonts/pncb.gsf
+fsf/ghostscript/fonts/pncbi.gsf
+fsf/ghostscript/fonts/pncr.gsf
+fsf/ghostscript/fonts/pncri.gsf
+fsf/ghostscript/fonts/pplb.gsf
+fsf/ghostscript/fonts/pplbi.gsf
+fsf/ghostscript/fonts/pplr.gsf
+fsf/ghostscript/fonts/pplri.gsf
+fsf/ghostscript/fonts/psyr.gsf
+fsf/ghostscript/fonts/ptmb.gsf
+fsf/ghostscript/fonts/ptmbi.gsf
+fsf/ghostscript/fonts/ptmr.gsf
+fsf/ghostscript/fonts/ptmri.gsf
+fsf/ghostscript/fonts/putb.gsf
+fsf/ghostscript/fonts/putbi.gsf
+fsf/ghostscript/fonts/putr.gsf
+fsf/ghostscript/fonts/putri.gsf
+fsf/ghostscript/fonts/pzdr.afm
+fsf/ghostscript/fonts/pzdr.gsf
+fsf/ghostscript/fonts/u003043t.afm
+fsf/ghostscript/fonts/u003043t.gsf
+fsf/ghostscript/fonts/u004006t.afm
+fsf/ghostscript/fonts/u004006t.gsf
+fsf/ghostscript/fonts/zcb.gsf
+fsf/ghostscript/fonts/zcr.gsf
+fsf/ghostscript/fonts/zcro.gsf
+fsf/ghostscript/gcc-head.mak
+fsf/ghostscript/gconfig.c
+fsf/ghostscript/gdebug.h
+fsf/ghostscript/gdev3852.c
+fsf/ghostscript/gdev3b1.c
+fsf/ghostscript/gdev4081.c
+fsf/ghostscript/gdev4693.c
+fsf/ghostscript/gdev8510.c
+fsf/ghostscript/gdevadmp.c
+fsf/ghostscript/gdevamiga.c
+fsf/ghostscript/gdevbgi.c
+fsf/ghostscript/gdevbit.c
+fsf/ghostscript/gdevbj10.c
+fsf/ghostscript/gdevbmp.c
+fsf/ghostscript/gdevcdj.c
+fsf/ghostscript/gdevdfax.c
+fsf/ghostscript/gdevdfg3.h
+fsf/ghostscript/gdevdjet.c
+fsf/ghostscript/gdevdjtc.c
+fsf/ghostscript/gdevegaa.asm
+fsf/ghostscript/gdevemap.c
+fsf/ghostscript/gdevepsc.c
+fsf/ghostscript/gdevepsn.c
+fsf/ghostscript/gdevescp.c
+fsf/ghostscript/gdevevga.c
+fsf/ghostscript/gdevherc.c
+fsf/ghostscript/gdevlbp8.c
+fsf/ghostscript/gdevln03.c
+fsf/ghostscript/gdevmem.h
+fsf/ghostscript/gdevmem1.c
+fsf/ghostscript/gdevmem2.c
+fsf/ghostscript/gdevmem3.c
+fsf/ghostscript/gdevmswn.c
+fsf/ghostscript/gdevmswn.h
+fsf/ghostscript/gdevmsxf.c
+fsf/ghostscript/gdevn533.c
+fsf/ghostscript/gdevnp6.c
+fsf/ghostscript/gdevo182.c
+fsf/ghostscript/gdevpbm.c
+fsf/ghostscript/gdevpccm.c
+fsf/ghostscript/gdevpccm.h
+fsf/ghostscript/gdevpcfb.c
+fsf/ghostscript/gdevpcfb.h
+fsf/ghostscript/gdevpcl.c
+fsf/ghostscript/gdevpcl.h
+fsf/ghostscript/gdevpcx.c
+fsf/ghostscript/gdevpe.c
+fsf/ghostscript/gdevpipe.c
+fsf/ghostscript/gdevpjet.c
+fsf/ghostscript/gdevprn.c
+fsf/ghostscript/gdevprn.h
+fsf/ghostscript/gdevs3ga.c
+fsf/ghostscript/gdevsco.c
+fsf/ghostscript/gdevsnfb.c
+fsf/ghostscript/gdevsppr.c
+fsf/ghostscript/gdevsun.c
+fsf/ghostscript/gdevsvga.c
+fsf/ghostscript/gdevsvga.h
+fsf/ghostscript/gdevtiff.c
+fsf/ghostscript/gdevtiff.h
+fsf/ghostscript/gdevtknk.c
+fsf/ghostscript/gdevtrfx.c
+fsf/ghostscript/gdevwddb.c
+fsf/ghostscript/gdevwdib.c
+fsf/ghostscript/gdevwprn.c
+fsf/ghostscript/gdevx.c
+fsf/ghostscript/gdevx.h
+fsf/ghostscript/gdevxini.c
+fsf/ghostscript/gdevxxf.c
+fsf/ghostscript/genarch.c
+fsf/ghostscript/genconf.c
+fsf/ghostscript/ghost.h
+fsf/ghostscript/golfer.ps
+fsf/ghostscript/gp.h
+fsf/ghostscript/gp_amiga.c
+fsf/ghostscript/gp_dosfb.c
+fsf/ghostscript/gp_itbc.c
+fsf/ghostscript/gp_iwatc.c
+fsf/ghostscript/gp_msdos.c
+fsf/ghostscript/gp_mswin.c
+fsf/ghostscript/gp_mswin.h
+fsf/ghostscript/gp_mswtx.c
+fsf/ghostscript/gp_mswtx.h
+fsf/ghostscript/gp_nofb.c
+fsf/ghostscript/gp_sysv.c
+fsf/ghostscript/gp_unix.c
+fsf/ghostscript/gp_vms.c
+fsf/ghostscript/gpcheck.h
+fsf/ghostscript/gs.1
+fsf/ghostscript/gs.c
+fsf/ghostscript/gs.h
+fsf/ghostscript/gs.mak
+fsf/ghostscript/gs.tr
+fsf/ghostscript/gs_dbt_e.ps
+fsf/ghostscript/gs_dps1.ps
+fsf/ghostscript/gs_fonts.ps
+fsf/ghostscript/gs_init.ps
+fsf/ghostscript/gs_lev2.ps
+fsf/ghostscript/gs_statd.ps
+fsf/ghostscript/gs_sym_e.ps
+fsf/ghostscript/gs_type0.ps
+fsf/ghostscript/gsaddmod
+fsf/ghostscript/gsaddmod.bat
+fsf/ghostscript/gsbj
+fsf/ghostscript/gsbj.bat
+fsf/ghostscript/gsccode.h
+fsf/ghostscript/gschar.c
+fsf/ghostscript/gschar.h
+fsf/ghostscript/gschar0.c
+fsf/ghostscript/gscie.c
+fsf/ghostscript/gscie.h
+fsf/ghostscript/gscolor.c
+fsf/ghostscript/gscolor.h
+fsf/ghostscript/gscolor2.c
+fsf/ghostscript/gscolor2.h
+fsf/ghostscript/gsconfig.h
+fsf/ghostscript/gscoord.c
+fsf/ghostscript/gscoord.h
+fsf/ghostscript/gscrypt1.h
+fsf/ghostscript/gscspace.h
+fsf/ghostscript/gsdevice.c
+fsf/ghostscript/gsdj
+fsf/ghostscript/gsdj.bat
+fsf/ghostscript/gsdj500.bat
+fsf/ghostscript/gsdps1.c
+fsf/ghostscript/gserrors.h
+fsf/ghostscript/gsfile.c
+fsf/ghostscript/gsfont.c
+fsf/ghostscript/gsfont.h
+fsf/ghostscript/gsgraph.icx
+fsf/ghostscript/gsgraph.uue
+fsf/ghostscript/gsht.c
+fsf/ghostscript/gsimage.c
+fsf/ghostscript/gsimage.h
+fsf/ghostscript/gsimage1.c
+fsf/ghostscript/gsimage2.c
+fsf/ghostscript/gsimpath.c
+fsf/ghostscript/gsio.h
+fsf/ghostscript/gsline.c
+fsf/ghostscript/gslj
+fsf/ghostscript/gslj.bat
+fsf/ghostscript/gslp
+fsf/ghostscript/gslp.bat
+fsf/ghostscript/gslp.ps
+fsf/ghostscript/gsmain.c
+fsf/ghostscript/gsmatrix.c
+fsf/ghostscript/gsmatrix.h
+fsf/ghostscript/gsmisc.c
+fsf/ghostscript/gsnd
+fsf/ghostscript/gsnd.bat
+fsf/ghostscript/gsndt.bat
+fsf/ghostscript/gspaint.c
+fsf/ghostscript/gspaint.h
+fsf/ghostscript/gspath.c
+fsf/ghostscript/gspath.h
+fsf/ghostscript/gspath2.c
+fsf/ghostscript/gsprops.h
+fsf/ghostscript/gssetdev
+fsf/ghostscript/gssetdev.bat
+fsf/ghostscript/gssetmod
+fsf/ghostscript/gssetmod.bat
+fsf/ghostscript/gsstate.c
+fsf/ghostscript/gsstate.h
+fsf/ghostscript/gst.bat
+fsf/ghostscript/gstdev.c
+fsf/ghostscript/gstext.icx
+fsf/ghostscript/gstext.uue
+fsf/ghostscript/gstt.bat
+fsf/ghostscript/gstype1.c
+fsf/ghostscript/gstype1.h
+fsf/ghostscript/gstypes.h
+fsf/ghostscript/gsuid.h
+fsf/ghostscript/gsutil.c
+fsf/ghostscript/gsutil.h
+fsf/ghostscript/gsview.bat
+fsf/ghostscript/gsw.tr
+fsf/ghostscript/gswin.def
+fsf/ghostscript/gswin.rc
+fsf/ghostscript/gswin386.rc
+fsf/ghostscript/gsxfont.h
+fsf/ghostscript/gx.h
+fsf/ghostscript/gxarith.h
+fsf/ghostscript/gxbitmap.h
+fsf/ghostscript/gxcache.h
+fsf/ghostscript/gxccache.c
+fsf/ghostscript/gxccman.c
+fsf/ghostscript/gxcdir.h
+fsf/ghostscript/gxchar.h
+fsf/ghostscript/gxcht.c
+fsf/ghostscript/gxcldev.h
+fsf/ghostscript/gxclist.c
+fsf/ghostscript/gxclist.h
+fsf/ghostscript/gxclread.c
+fsf/ghostscript/gxcmap.c
+fsf/ghostscript/gxcolor.h
+fsf/ghostscript/gxcpath.c
+fsf/ghostscript/gxcpath.h
+fsf/ghostscript/gxdevice.h
+fsf/ghostscript/gxdevmem.h
+fsf/ghostscript/gxdither.c
+fsf/ghostscript/gxdraw.c
+fsf/ghostscript/gxfdir.h
+fsf/ghostscript/gxfill.c
+fsf/ghostscript/gxfixed.h
+fsf/ghostscript/gxfmap.h
+fsf/ghostscript/gxfont.h
+fsf/ghostscript/gxfrac.h
+fsf/ghostscript/gxhint1.c
+fsf/ghostscript/gxhint2.c
+fsf/ghostscript/gxht.c
+fsf/ghostscript/gximage.h
+fsf/ghostscript/gxlum.h
+fsf/ghostscript/gxmatrix.h
+fsf/ghostscript/gxop1.h
+fsf/ghostscript/gxpath.c
+fsf/ghostscript/gxpath.h
+fsf/ghostscript/gxpath2.c
+fsf/ghostscript/gxpcopy.c
+fsf/ghostscript/gxrefct.h
+fsf/ghostscript/gxstroke.c
+fsf/ghostscript/gxtype1.h
+fsf/ghostscript/gxxfont.h
+fsf/ghostscript/gzcolor.h
+fsf/ghostscript/gzdevice.h
+fsf/ghostscript/gzht.h
+fsf/ghostscript/gzline.h
+fsf/ghostscript/gzpath.h
+fsf/ghostscript/gzstate.h
+fsf/ghostscript/helpers.doc
+fsf/ghostscript/hershey.doc
+fsf/ghostscript/history.doc
+fsf/ghostscript/humor.doc
+fsf/ghostscript/ialloc.c
+fsf/ghostscript/ibnum.c
+fsf/ghostscript/iccfont.c
+fsf/ghostscript/idebug.c
+fsf/ghostscript/idict.c
+fsf/ghostscript/idparam.c
+fsf/ghostscript/iinit.c
+fsf/ghostscript/ilevel.h
+fsf/ghostscript/impath.ps
+fsf/ghostscript/iname.c
+fsf/ghostscript/iname.h
+fsf/ghostscript/interp.c
+fsf/ghostscript/iref.h
+fsf/ghostscript/isave.c
+fsf/ghostscript/iscan.c
+fsf/ghostscript/iscan.h
+fsf/ghostscript/iscan2.c
+fsf/ghostscript/istack.c
+fsf/ghostscript/istack.h
+fsf/ghostscript/iutil.c
+fsf/ghostscript/iutil.h
+fsf/ghostscript/iutilasm.asm
+fsf/ghostscript/ivmspace.h
+fsf/ghostscript/landscap.ps
+fsf/ghostscript/language.doc
+fsf/ghostscript/level1.ps
+fsf/ghostscript/lib.doc
+fsf/ghostscript/lines.ps
+fsf/ghostscript/lprsetup.sh
+fsf/ghostscript/main.h
+fsf/ghostscript/maint.mak
+fsf/ghostscript/make.doc
+fsf/ghostscript/malloc_.h
+fsf/ghostscript/manifests/bin
+fsf/ghostscript/manifests/src
+fsf/ghostscript/markpath.ps
+fsf/ghostscript/math_.h
+fsf/ghostscript/memory_.h
+fsf/ghostscript/mergeini.ps
+fsf/ghostscript/msc.mak
+fsf/ghostscript/mv.bat
+fsf/ghostscript/opdef.h
+fsf/ghostscript/oper.h
+fsf/ghostscript/ostack.h
+fsf/ghostscript/overlay.h
+fsf/ghostscript/packed.h
+fsf/ghostscript/pcharstr.ps
+fsf/ghostscript/pj-gs.sh
+fsf/ghostscript/ppath.ps
+fsf/ghostscript/prfont.ps
+fsf/ghostscript/ps2ascii
+fsf/ghostscript/ps2ascii.bat
+fsf/ghostscript/ps2ascii.ps
+fsf/ghostscript/ps2epsi
+fsf/ghostscript/ps2epsi.bat
+fsf/ghostscript/ps2epsi.doc
+fsf/ghostscript/ps2epsi.ps
+fsf/ghostscript/ps2image.ps
+fsf/ghostscript/psfiles.doc
+fsf/ghostscript/pstoppm.ps
+fsf/ghostscript/pv.sh
+fsf/ghostscript/quit.ps
+fsf/ghostscript/readme.doc
+fsf/ghostscript/rm.bat
+fsf/ghostscript/save.h
+fsf/ghostscript/save.ps
+fsf/ghostscript/sbits.c
+fsf/ghostscript/sbits.h
+fsf/ghostscript/scanchar.h
+fsf/ghostscript/scf.h
+fsf/ghostscript/scfd.c
+fsf/ghostscript/scfdgen.c
+fsf/ghostscript/scfdtab.c
+fsf/ghostscript/scfe.c
+fsf/ghostscript/scftab.c
+fsf/ghostscript/screen.ps
+fsf/ghostscript/sdct.h
+fsf/ghostscript/sdctd.c
+fsf/ghostscript/sdcte.c
+fsf/ghostscript/sfilter.c
+fsf/ghostscript/sfilter2.c
+fsf/ghostscript/shc.h
+fsf/ghostscript/showchar.ps
+fsf/ghostscript/showpage.ps
+fsf/ghostscript/slzwd.c
+fsf/ghostscript/slzwe.c
+fsf/ghostscript/snowflak.ps
+fsf/ghostscript/stat_.h
+fsf/ghostscript/state.h
+fsf/ghostscript/std.h
+fsf/ghostscript/stdio_.h
+fsf/ghostscript/store.h
+fsf/ghostscript/stream.c
+fsf/ghostscript/stream.h
+fsf/ghostscript/string_.h
+fsf/ghostscript/sysvlp.sh
+fsf/ghostscript/tar_cat
+fsf/ghostscript/tc.mak
+fsf/ghostscript/tccommon.mak
+fsf/ghostscript/tiger.ps
+fsf/ghostscript/time_.h
+fsf/ghostscript/traceop.ps
+fsf/ghostscript/turboc.cfg
+fsf/ghostscript/type1ops.ps
+fsf/ghostscript/uglyr.gsf
+fsf/ghostscript/unix-ansi.mak
+fsf/ghostscript/unix-cc.mak
+fsf/ghostscript/unix-gcc.mak
+fsf/ghostscript/unix-lpr.doc
+fsf/ghostscript/unix-lpr.sh
+fsf/ghostscript/unixhead.mak
+fsf/ghostscript/unixtail.mak
+fsf/ghostscript/unprot.ps
+fsf/ghostscript/use.doc
+fsf/ghostscript/vms-cc.mak
+fsf/ghostscript/vms-gcc.mak
+fsf/ghostscript/vmsmath.h
+fsf/ghostscript/watc.mak
+fsf/ghostscript/watcwin.mak
+fsf/ghostscript/waterfal.ps
+fsf/ghostscript/wccommon.mak
+fsf/ghostscript/windows_.h
+fsf/ghostscript/winmaps.ps
+fsf/ghostscript/wrfont.ps
+fsf/ghostscript/x_.h
+fsf/ghostscript/xfonts.doc
+fsf/ghostscript/zarith.c
+fsf/ghostscript/zarray.c
+fsf/ghostscript/zbseq.c
+fsf/ghostscript/zchar.c
+fsf/ghostscript/zchar2.c
+fsf/ghostscript/zcie.c
+fsf/ghostscript/zcolor.c
+fsf/ghostscript/zcolor2.c
+fsf/ghostscript/zcontext.c
+fsf/ghostscript/zcontrol.c
+fsf/ghostscript/zcspace2.c
+fsf/ghostscript/zdevice.c
+fsf/ghostscript/zdict.c
+fsf/ghostscript/zdosio.c
+fsf/ghostscript/zdps1.c
+fsf/ghostscript/zfile.c
+fsf/ghostscript/zfiledev.c
+fsf/ghostscript/zfileio.c
+fsf/ghostscript/zfilter.c
+fsf/ghostscript/zfilter2.c
+fsf/ghostscript/zfont.c
+fsf/ghostscript/zfont0.c
+fsf/ghostscript/zfont1.c
+fsf/ghostscript/zfont2.c
+fsf/ghostscript/zgeneric.c
+fsf/ghostscript/zgstate.c
+fsf/ghostscript/zht.c
+fsf/ghostscript/zht2.c
+fsf/ghostscript/zimage2.c
+fsf/ghostscript/zmath.c
+fsf/ghostscript/zmatrix.c
+fsf/ghostscript/zmisc.c
+fsf/ghostscript/zmisc2.c
+fsf/ghostscript/zpacked.c
+fsf/ghostscript/zpaint.c
+fsf/ghostscript/zpath.c
+fsf/ghostscript/zpath2.c
+fsf/ghostscript/zprops.c
+fsf/ghostscript/zrelbit.c
+fsf/ghostscript/zstack.c
+fsf/ghostscript/zstring.c
+fsf/ghostscript/ztype.c
+fsf/ghostscript/zupath.c
+fsf/ghostscript/zvmem.c
+fsf/ghostscript/zvmem2.c
diff -rup --new-file baseline/fsf/ghostscript/ps2ascii amiga/fsf/ghostscript/ps2ascii
--- baseline/fsf/ghostscript/ps2ascii Tue Jun 1 06:42:38 1993
+++ amiga/fsf/ghostscript/ps2ascii Sat Sep 28 00:00:00 1996
@@ -1,13 +1,4 @@
-#!/bin/sh -f
-# Extract ASCII text from a PostScript file. Usage:
-# ps2ascii [infile.ps [outfile.txt]]
-# If outfile is omitted, output goes to stdout.
-# If both infile and outfile are omitted, ps2ascii acts as a filter,
-# reading from stdin and writing on stdout.
-if ( test $# -eq 0 ) then
- gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps - quit.ps
-elif ( test $# -eq 1 ) then
- gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps $1 quit.ps
-else
- gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps $1 quit.ps >$2
-fi
+.key IN/A,OUT/A
+.bra {
+.ket }
+gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps {IN} quit.ps >{OUT}
diff -rup --new-file baseline/fsf/ghostscript/ps2epsi amiga/fsf/ghostscript/ps2epsi
--- baseline/fsf/ghostscript/ps2epsi Fri May 7 11:39:56 1993
+++ amiga/fsf/ghostscript/ps2epsi Sat Sep 28 00:00:00 1996
@@ -1,52 +1,12 @@
-#!/bin/sh
+.key IN/A,OUT/A
+.bra [
+.ket ]
-LOCALPATH=/usr/local/bin
-PATH=/bin:/usr/bin:/usr/ucb\:$LOCALPATH\
+gs -q -dNOPAUSE -dNODISPLAY ps2epsi.ps < [IN]
-export PATH outfile
+Echo "/InitDictCount countdictstack def gsave save mark newpath" >> [OUT]
-if [ $# -lt 1 -o $# -gt 2 ]; then
- echo "Usage: pstoepsi file.ps [file.epsi]" 1>&2
- exit 1
-fi
+type [OUT] >> [IN]
-infile=$1
-
-if [ $# -eq 1 ]
-then
- case "${infile}" in
- *.ps) base=`basename ${infile} .ps` ;;
- *.cps) base=`basename ${infile} .cps` ;;
- *.eps) base=`basename ${infile} .eps` ;;
- *.epsf) base=`basename ${infile} .epsf` ;;
- *) base=`basename ${infile}` ;;
- esac
- outfile=${base}.epsi
-else
- outfile=$2
-fi
-
-gs -q -dNOPAUSE -dNODISPLAY ps2epsi.ps < ${infile} 1>&2
-
-(
-cat << BEGINEPS
-/InitDictCount countdictstack def
-gsave
-save
-mark
-newpath
-/showpage {} def
-BEGINEPS
-
-cat ${infile}
-
-cat << ENDEPS
-countdictstack InitDictCount sub { end } repeat
-cleartomark
-restore
-grestore
-ENDEPS
-
-) >> ${outfile}
-
-exit 0
+Echo "countdictstack InitDictCount sub { end } repeat" >> [OUT]
+Echo "cleartomark restore grestore" >> [OUT]
diff -rup --new-file baseline/fsf/ghostscript/use.doc amiga/fsf/ghostscript/use.doc
--- baseline/fsf/ghostscript/use.doc Sun Jul 18 08:52:50 1993
+++ amiga/fsf/ghostscript/use.doc Sat Sep 28 00:00:00 1996
@@ -106,9 +106,9 @@ Unix
Installing Ghostscript on a Unix system requires compiling it first.
The name of the executable is gs. The makefile installs all the
-files, except the fonts, in /usr/local or various subdirectories
+files, except the fonts, in /ade or various subdirectories
thereof. The fonts should be installed in
-/usr/local/lib/ghostscript/fonts. Consult the makefile for more
+/ade/lib/ghostscript/fonts. Consult the makefile for more
details.
********