diff options
Diffstat (limited to 'gs/src')
965 files changed, 11250 insertions, 16961 deletions
diff --git a/gs/src/all-arch.mak b/gs/src/all-arch.mak new file mode 100644 index 000000000..ca88a7eef --- /dev/null +++ b/gs/src/all-arch.mak @@ -0,0 +1,745 @@ +# Copyright (C) 1999 Aladdin Enterprises. All rights reserved. +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. + +# $RCSfile$ $Revision$ +# +# Author: +# Nelson H. F. Beebe +# Center for Scientific Computing +# University of Utah +# Department of Mathematics, 322 INSCC +# 155 S 1400 E RM 233 +# Salt Lake City, UT 84112-0090 +# USA +# Email: beebe@math.utah.edu, beebe@acm.org, beebe@ieee.org (Internet) +# WWW URL: http://www.math.utah.edu/~beebe +# Telephone: +1 801 581 5254 +# FAX: +1 801 585 1640, +1 801 581 4148 +#======================================================================= +# This Makefile is an interface to the UNMODIFIED unix*.mak files for +# building gs, so as to avoid the need for customizing Makefiles for +# multiple architectures with each new release of ghostscript. +# +# Usage: +# make <arch-name> TARGETS='...' +# +# or, for convenience at Utah, +# +# make `hostname` +# +# HINT: for parallel GNU make runs, add -jnnn to TARGETS, e.g. +# TARGETS=-j6. +# WARNING: this does not produce successful builds on at least SGI IRIX 6. +# +# Current target list: +# all +# clean +# mostlyclean +# clobber +# distclean +# maintainer-clean +# init +# install +# install-gnu-readline +# install-binary +# install-binary-gnu-readline +# install-fontmap +# install-pdfsec +# dec-alpha-osf +# dec-alpha-osf-gnu-readline +# dec-mips-ultrix +# hp-parisc-hpux +# hp-parisc-hpux-gnu-readline +# ibm-rs6000-aix +# ibm-rs6000-aix-c89 +# ibm-rs6000-aix-4-1-c89 +# ibm-rs6000-aix-3-2-5-gcc +# ibm-rs6000-aix-gcc +# ibm-rs6000-aix-4.2 +# ibm-rs6000-aix-4.2-gnu-readline +# linux +# linux-gnu-readline +# next-m68K-mach +# next-m68K-mach-gnu-readline +# next-m68K-mach-cc +# sgi-mips-irix5 +# sgi-mips-irix5-gnu-readline +# sgi-mips-irix6.1 +# sgi-mips-irix6.3 +# sgi-mips-irix6.3-gnu-readline +# sgi-mips-irix6.4 +# sgi-mips-irix6.4-gnu-readline +# sun-sparc-solaris +# sun-sparc-solaris-gnu-readline +# sun-sparc-solaris-gcc +# sun-sparc-solaris-opt-gnu-readline +# sun-sparc-solaris-newsprint +# sun-sparc-solaris-pg +# sun-sparc-sunos-gcc +# sun-sparc-sunos-gcc-gnu-readline +# +# Machine-specific targets (for "make `hostname`"): +# XXXXXXXX.math.utah.edu [obscurred] +# +# [29-Apr-1999] -- update for gs-5.82: Add XLIBDIRSALL list for +# install target, and add hostnames as convenience +# targets, duplicating information in the +# ../BUILD-GS.sh script, but allowing easier restarts +# after build failures. Update install-fontmap target +# to reflect new location of installed Fontmap files. +# [20-Mar-1999] -- update for gs-5.73. Alphabetize most definitions. +# Add more comments. Add common macros to eliminate +# duplication. Set the SHARE_* variables to use +# installed versions of support libraries, instead of +# always having to duplicate their source trees as we +# did with older releases. +# [19-Mar-1999] -- change SGI IRIX 6.x targets to use -n32 -mips3, +# since -n32 is the default when no memory model +# is selected +# [09-Feb-1999] -- add install-pdfsec target +# [03-Nov-1998] -- update for gs-5.60 and later +# [10-Aug-1998] -- add ibm-rs6000-aix-3-2-5-gcc and +# ibm-rs6000-aix-4-1-c89 targets +# [04-Aug-1998] -- add linux and ibm-rs6000-aix-c89 target, and +# dependencies on init target so that I do not need +# to remember to create the obj subdirectory manually +# [19-Mar-1998] -- add -32 -mips2 flag to SGI IRIX 6.x targets, so that +# the executables run on every SGI that can run that +# O?S. Otherwise, when building on XXXXXXXX.math.utah.edu, +# the compiler chooses a default of -mips4, which won't +# run on Indy and R4400 machines. +# [23-Feb-1998] -- add -jnnn hint above, and COMMON_DEVICES below +# [28-Nov-1997] +#======================================================================= + +# Definitions needed from src/*.mak files: +DD = $(GLD) +GLD = $(GLGENDIR)/ +GLGENDIR = ./obj +GLOBJ = ./obj/ +PSD = $(PSGENDIR)/ +PSGENDIR = ./obj + +# Definition(s) for this file: +SRCDIR = /usr/local/src + +# Define local modifications of search paths: +TF = /usr/local/lib/tex/fonts +GS_LIB_DEFAULT = $$(gsdatadir)/lib:$$(gsdatadir)/fonts:$$(gsdatadir)/examples:$$(gsdir)/fonts:/usr/local/share/sys/fonts/postscript:$(TF)/lucida:$(TF)/mathtime:$(TF)/postscript/bakoma/pfb:$(TF)/vf + +# Define local paths for install targets: +GS_SHARE_DIR = /usr/local/share/ghostscript +GS_SRC_DIR = $(SRCDIR)/ghostscript + +# Arguments for make with cc (or other), and gcc: +ARGS = -f src/unixansi.mak $(COMMON_ARGS) + +ARGSGCC = -f src/unix-gcc.mak $(COMMON_ARGS) + +COMMON_ARGS = DEVICE_DEVS_EXTRA='$(DEVICE_DEVS_EXTRA)' \ + GS_LIB_DEFAULT='$(GS_LIB_DEFAULT)' \ + JSRCDIR='$(JSRCDIR)' \ + PNGSRCDIR='$(PNGSRCDIR)' \ + SHARE_LIBPNG='$(SHARE_LIBPNG)' \ + SHARE_ZLIB='$(SHARE_ZLIB)' \ + XCFLAGS='$(XCFLAGS)' \ + ZSRCDIR='$(ZSRCDIR)' \ + $(TARGETS) + +# Additional gcc-specific compilation flags +GCFLAGS = + +# Name of the installed binary executable (it will also be called gs-x.yy): +GS = ngs +GS = gs + +# Here is a list of additional output devices that we need to support at +# the University of Utah Math, Physics, and INSCC installations; +# effective with gs-5.60, Each must have a $(DD) prefix: +DEVICE_DEVS_EXTRA = $(DD)st800.dev $(DD)stcolor.dev + +# [20-Mar-1999] Set FEATURE_DEVS_EXTRA to include gnrdline.dev, to +# support input line editing in gs when compiled with gcc. Addition of +# this module also requires adding EXTRALIBS='-ltermcap' for each system +# below that uses gcc for the build. +FEATURE_DEVS_EXTRA = $(PSD)gnrdline.dev + +GNU_READLINE_ARGS = EXTRALIBS='-ltermcap' \ + FEATURE_DEVS_EXTRA='$(FEATURE_DEVS_EXTRA)' \ + XCFLAGS='-I. -I$(JSRCDIR)' + +# Additions to CFLAGS for all compilers +XCFLAGS = -I/usr/local/include + +# This variable contains a list of all X library locations, for +# use in the install target +XLIBDIRSALL=' \ + -L/usr/X11R6/lib \ + -L/usr/lib/X11 \ + -L/usr/lib/X11R5 \ + -L/usr/openwin/lib \ + -L/usr/lpp/X11/lib/R5 \ + -L/usr/lpp/X11/lib \ + -L/usr/local/$(SGIARCHLIB) \ + -L/usr/local/X11R5/lib \ + -L/usr/local/lib \ + -L/usr/local/lib32 \ +' + +# Compilation flags and load library for SGI IRIX 6.x builds: +SGIARCHFLAGS = -n32 -mips3 +SGIARCHLIB = libn32 + +# [20-Mar-1999]: New from gs-5.73: use png and zlib libraries already +# installed on the system. + +SHARE_LIBPNG = 1 +SHARE_ZLIB = 1 + +# Use of the shared libraries still requires reference to source code in +# these directories: +JSRCDIR = $(SRCDIR)/jpeg/jpeg-6b +PNGSRCDIR = $(SRCDIR)/libpng/libpng-1.0.3 +ZSRCDIR = $(SRCDIR)/zlib/zlib-1.1.3 + +# Use this to provide alternate targets to make, instead of the default +# all. It can also be used to pass additional arguments to child makes, +# e.g., -j12 for 12 parallel jobs with GNU make. +TARGETS = + +#======================================================================= + +BINDIR = /usr/local/bin + +CHMOD = chmod + +CP = /bin/cp -p +CP = rcp -p + +MV = /bin/mv + +RM = /bin/rm -f + +SHELL = /bin/sh + +#======================================================================= + +all: + $(MAKE) $(ARGS) + +# Convenience targets to make standard targets available +clean mostlyclean clobber distclean maintainer-clean: + $(MAKE) $(ARGS) $@ + +init: + -if test ! -d obj ; then mkdir obj ; fi + +install: install-binary install-fontmap install-pdfsec + +install-gnu-readline: install-binary-gnu-readline install-fontmap install-pdfsec + +# Remove the old gs binary first, so as to preserve the previous +# gs-x.yy version, if any. +install-binary: + -$(RM) $(BINDIR)/$(GS) + @$(MAKE) $(ARGS) install GS=$(GS) XLIBDIRS=$(XLIBDIRSALL) ; \ + d=`pwd` ; \ + d=`basename $$d` ; \ + d=`echo $$d | sed -e s/gs/gs-/` ; \ + $(RM) $(BINDIR)/$$d ; \ + ln $(BINDIR)/$(GS) $(BINDIR)/$$d ; \ + ls -l $(BINDIR)/$(GS) $(BINDIR)/$$d + +install-binary-gnu-readline: + -$(RM) $(BINDIR)/$(GS) + @$(MAKE) $(ARGS) install GS=$(GS) XLIBDIRS=$(XLIBDIRSALL) $(GNU_READLINE_ARGS) ; \ + d=`pwd` ; \ + d=`basename $$d` ; \ + d=`echo $$d | sed -e s/gs/gs-/` ; \ + $(RM) $(BINDIR)/$$d ; \ + ln $(BINDIR)/$(GS) $(BINDIR)/$$d ; \ + ls -l $(BINDIR)/$(GS) $(BINDIR)/$$d + +install-fontmap: + @d=`pwd` ; \ + d=`basename $$d` ; \ + d=`echo $$d | sed -e s/gs//` ; \ + if test -f $(GS_SRC_DIR)/Fontmap.new ; \ + then \ + if test -f $(GS_SHARE_DIR)/$$d/lib/Fontmap.org ; \ + then \ + true ; \ + else \ + mv $(GS_SHARE_DIR)/$$d/lib/Fontmap $(GS_SHARE_DIR)/$$d/lib/Fontmap.org ; \ + fi ; \ + $(CP) $(GS_SRC_DIR)/Fontmap.new $(GS_SHARE_DIR)/$$d/lib/Fontmap ; \ + ls -l $(GS_SHARE_DIR)/$$d/lib/Fontmap* ; \ + fi + +install-pdfsec: + @d=`pwd` ; \ + d=`basename $$d` ; \ + d=`echo $$d | sed -e s/gs//` ; \ + if test -f $(GS_SRC_DIR)/lib/pdf_sec.ps ; \ + then \ + $(MV) $(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps $(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps.org ; \ + $(CP) lib/pdf_sec.ps $(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps ; \ + $(CHMOD) 664 $(GS_SHARE_DIR)/$$d/lib/pdf_sec.ps ; \ + fi + +#======================================================================= +# Architecture-specific targets: +# +# NB: gcc 2.7.x produces bad code in zfont2.c:zregisterencoding(), and possibly +# elsewhere, so we must use native compilers for now. + +# Apple Macintosh PowerPC running Rhapsody 5.5 (a NeXTStep 5 derivative, +# with no X Window System support): +apple-powermac-rhapsody5.5 apple-powerpc-rhapsody5.5: + $(MAKE) $(ARGSGCC) \ + CC='gcc' \ + GCFLAGS=$(GCFLAGS) \ + FEATURE_DEVS_EXTRA= \ + DEVICE_DEVS= \ + SYNC=nosync \ + STDLIBS= \ + XLIBDIRS= \ + EXTRALIBS= + +dec-alpha-osf: init + $(MAKE) $(ARGS) \ + CC='c89 -O4 -Olimit 1500' \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/local/lib -L/usr/lib/X11' + +dec-alpha-osf-gnu-readline: init + $(MAKE) $(ARGS) \ + CC='c89 -O4 -Olimit 1500' \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/local/lib -L/usr/lib/X11' \ + $(GNU_READLINE_ARGS) + +# NB: Need -Dconst= for gcc 2.7.2 (unless gcc patch in make.doc is installed) +dec-mips-ultrix: init + $(MAKE) $(ARGSGCC) \ + CC='gcc -Dconst= -O3' \ + GCFLAGS=$(GCFLAGS) \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/local/lib -L/usr/lib/X11' \ + EXTRALIBS='-ltermcap' + +hp-parisc-hpux: init + $(MAKE) $(ARGS) \ + CC='c89 -O -D_HPUX_SOURCE +Onolimit' \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/include/X11R5 \ + XLIBDIRS='-L/usr/lib/X11R5 -L/usr/local/lib' \ + $(GLOBJ)gdevupd.o $(GLOBJ)gxclread.o + + $(MAKE) $(ARGS) \ + CC='c89 -O -D_HPUX_SOURCE' \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/include/X11R5 \ + XLIBDIRS='-L/usr/lib/X11R5 -L/usr/local/lib' + +hp-parisc-hpux-gnu-readline: init + $(MAKE) $(ARGS) \ + CC='c89 -O -D_HPUX_SOURCE +Onolimit' \ + XINCLUDE=-I/usr/include/X11R5 \ + XLIBDIRS='-L/usr/local/lib -L/usr/lib/X11R5 -L/usr/local/lib' \ + $(GLOBJ)gdevupd.o $(GLOBJ)gxclread.o + + $(MAKE) $(ARGS) \ + CC='c89 -O -D_HPUX_SOURCE' \ + XINCLUDE=-I/usr/include/X11R5 \ + XLIBDIRS='-L/usr/local/lib -L/usr/lib/X11R5 -L/usr/local/lib' \ + $(GNU_READLINE_ARGS) + +# NB: gs3.68 executable core dumps with this compiler +ibm-rs6000-aix: init + $(MAKE) $(ARGS) \ + CC='cc -O -D_POSIX_SOURCE' \ + CP='cp -p' \ + INSTALL='/usr/ucb/install -c' \ + XINCLUDE=-I/usr/lpp/X11/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/lpp/X11/lib/R5 -L/usr/lpp/X11/lib' + +# This works on our local AIX 3.2.5 systems: additional header files +# and libraries are needed, because IBM does not supply the Athena +# widgets in /usr/lpp/X11. +ibm-rs6000-aix-c89: init + $(MAKE) $(ARGS) \ + CC='c89 -O -D_POSIX_SOURCE' \ + CP='cp -p' \ + INSTALL='/usr/ucb/install -c' \ + XINCLUDE='-I/usr/lpp/X11/include -I/usr/local/X11R5/include' \ + XLIBDIRS='-L/usr/local/lib -L/usr/lpp/X11/lib/R5 -L/usr/lpp/X11/lib -L/usr/local/X11R5/lib' + +ibm-rs6000-aix-4-1-c89: init + $(MAKE) $(ARGS) \ + CC='c89 -O -D_POSIX_SOURCE' \ + CP='cp -p' \ + INSTALL='/usr/ucb/install -c' \ + XINCLUDE='-I/usr/lpp/X11/include' \ + XLIBDIRS='-L/usr/local/lib -L/usr/lpp/X11/lib/R5 -L/usr/lpp/X11/lib' + +# NB: Need -Dconst= for gcc 2.7.1 (unless gcc patch in make.doc is installed) +ibm-rs6000-aix-3-2-5-gcc: init + $(MAKE) $(ARGSGCC) \ + CC='gcc -Dconst= -O -D_POSIX_SOURCE' \ + CP='cp -p' \ + GCFLAGS=$(GCFLAGS) \ + INSTALL='/usr/ucb/install -c' \ + XINCLUDE='-I/usr/lpp/X11/include -I/usr/local/X11R5/include'\ + XLIBDIRS='-L/usr/local/lib -L/usr/lpp/X11/lib/R5 -L/usr/lpp/X11/lib -L/usr/local/X11R5/lib' \ + EXTRALIBS='-ltermcap' + +# NB: Need -Dconst= for gcc 2.7.1 (unless gcc patch in make.doc is installed) +ibm-rs6000-aix-gcc: init + $(MAKE) $(ARGSGCC) \ + CC='gcc -Dconst= -O -D_POSIX_SOURCE' \ + CP='cp -p' \ + GCFLAGS=$(GCFLAGS) \ + INSTALL='/usr/ucb/install -c' \ + XINCLUDE=-I/usr/lpp/X11/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/lpp/X11/lib/R5 -L/usr/lpp/X11/lib' \ + EXTRALIBS='-ltermcap' + +# gp_unix.o must be compiled outside POSIX environment to make +# struct timeval and struct timezone visible +ibm-rs6000-aix-4.2: init + $(MAKE) $(ARGS) \ + CC='cc -O -DMAXMEM=4096' \ + CP='cp -p' \ + FEATURE_DEVS_EXTRA= \ + INSTALL='/usr/ucb/install -c' \ + XINCLUDE=-I/usr/lpp/X11/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/lpp/X11/lib/R5 -L/usr/lpp/X11/lib' \ + $(GLOBJ)gp_unix.o + + $(MAKE) $(ARGS) \ + CC='cc -O -D_POSIX_SOURCE -DMAXMEM=4096' \ + CP='cp -p' \ + FEATURE_DEVS_EXTRA= \ + INSTALL='/usr/ucb/install -c' \ + XINCLUDE=-I/usr/lpp/X11/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/lpp/X11/lib/R5 -L/usr/lpp/X11/lib' + +ibm-rs6000-aix-4.2-gnu-readline: init + $(MAKE) $(ARGS) \ + CC='cc -O -DMAXMEM=4096' \ + CP='cp -p' \ + INSTALL='/usr/ucb/install -c' \ + XINCLUDE=-I/usr/lpp/X11/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/local/lib -L/usr/lpp/X11/lib/R5 -L/usr/lpp/X11/lib' \ + $(GLOBJ)gp_unix.o + + $(MAKE) $(ARGS) \ + CC='cc -O -D_POSIX_SOURCE -DMAXMEM=4096' \ + CP='cp -p' \ + INSTALL='/usr/ucb/install -c' \ + XINCLUDE=-I/usr/lpp/X11/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/local/lib -L/usr/lpp/X11/lib/R5 -L/usr/lpp/X11/lib' \ + $(GNU_READLINE_ARGS) + +linux: init + $(MAKE) $(ARGSGCC) \ + CC='gcc' \ + GCFLAGS=$(GCFLAGS) \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/X11R6/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/X11R6/lib' \ + EXTRALIBS='-ltermcap' + +linux-gnu-readline: init + $(MAKE) $(ARGSGCC) \ + CC='gcc' \ + GCFLAGS=$(GCFLAGS) \ + XINCLUDE=-I/usr/X11R6/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/X11R6/lib' \ + EXTRALIBS='-ltermcap' \ + $(GNU_READLINE_ARGS) + +next-m68K-mach: init + $(MAKE) $(ARGS) \ + CC='gcc -Dconst= -O3 -D_POSIX_SOURCE' \ + FEATURE_DEVS_EXTRA= \ + GCFLAGS=$(GCFLAGS) \ + XINCLUDE=-I/usr/local/X11R5/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/local/X11R5/lib' \ + INCLUDE=/usr/include/bsd \ + EXTRALIBS='-ltermcap' + +next-m68K-mach-gnu-readline: init + $(MAKE) $(ARGS) \ + CC='gcc -Dconst= -O3 -D_POSIX_SOURCE' \ + GCFLAGS=$(GCFLAGS) \ + XINCLUDE=-I/usr/local/X11R5/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/local/X11R5/lib' \ + INCLUDE=/usr/include/bsd \ + $(GNU_READLINE_ARGS) + +next-m68K-mach-cc: init + $(MAKE) $(ARGS) \ + CC='cc -Dconst= -O3 -D_POSIX_SOURCE' \ + XINCLUDE=-I/usr/local/X11R5/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/local/X11R5/lib' \ + INCLUDE=/usr/include/bsd + +# NB: Need the -Dxxx settings to get certain system types defined for +# at least gp_unifs.c and zdevcal.c +sgi-mips-irix5: init + $(MAKE) $(ARGS) \ + CC='cc -D_POSIX_4SOURCE -woff 608' \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/lib/X11 -L/usr/local/lib' \ + $(GLOBJ)gdevpdf.o \ + $(GLOBJ)gdevps.o \ + $(GLOBJ)gdevtifs.o \ + $(GLOBJ)gp_unix.o \ + $(GLOBJ)zdevcal.o + + $(MAKE) $(ARGS) \ + CC='cc -ansi -D_POSIX_4SOURCE -woff 608 -Olimit 1100' \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/lib/X11 -L/usr/local/lib' \ + $(GLOBJ)gxclread.o + + $(MAKE) $(ARGS) \ + CC='cc -ansi -D_POSIX_4SOURCE -woff 608' \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/local/lib -L/usr/lib/X11' + +sgi-mips-irix5-gnu-readline: init + $(MAKE) $(ARGS) \ + CC='cc -D_POSIX_4SOURCE -woff 608' \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/lib/X11 -L/usr/local/lib' \ + $(GLOBJ)gdevpdf.o \ + $(GLOBJ)gdevps.o \ + $(GLOBJ)gdevtifs.o \ + $(GLOBJ)gp_unix.o \ + $(GLOBJ)zdevcal.o + + $(MAKE) $(ARGS) \ + CC='cc -ansi -D_POSIX_4SOURCE -woff 608 -Olimit 1100' \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/lib/X11 -L/usr/local/lib' \ + $(GLOBJ)gxclread.o + + $(MAKE) $(ARGS) \ + CC='cc -ansi -D_POSIX_4SOURCE -woff 608' \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/local/lib -L/usr/lib/X11' \ + $(GNU_READLINE_ARGS) + +# NB: Need the -Dxxx settings to get certain system types defined for +# at least gp_unifs.c and zdevcal.c +sgi-mips-irix6.1: init + $(MAKE) $(ARGS) \ + CC='cc $(SGIARCHFLAGS) -ansi -D_POSIX_4SOURCE -woff 1185,1429' \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/local/lib -L/usr/lib/X11' + +sgi-mips-irix6.3: init + $(MAKE) $(ARGS) \ + CC='cc $(SGIARCHFLAGS) -D_POSIX_4SOURCE ' \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/lib/X11 -L/usr/local/lib' \ + $(GLOBJ)gdevpdf.o \ + $(GLOBJ)gdevps.o \ + $(GLOBJ)gdevtifs.o \ + $(GLOBJ)gp_unix.o \ + $(GLOBJ)zdevcal.o + + $(MAKE) $(ARGS) \ + CC='cc $(SGIARCHFLAGS) -ansi -D_POSIX_4SOURCE -woff 1185,1429 -Olimit 1100' \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/lib/X11 -L/usr/local/lib' \ + $(GLOBJ)gxclread.o + + $(MAKE) $(ARGS) \ + CC='cc $(SGIARCHFLAGS) -ansi -D_POSIX_4SOURCE -woff 1185,1429' \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/local/$(SGIARCHLIB) -L/usr/local/lib -L/usr/lib/X11' + +sgi-mips-irix6.3-gnu-readline: init + $(MAKE) $(ARGS) \ + CC='cc $(SGIARCHFLAGS) -D_POSIX_4SOURCE ' \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/lib/X11 -L/usr/local/lib' \ + $(GLOBJ)gdevpdf.o \ + $(GLOBJ)gdevps.o \ + $(GLOBJ)gdevtifs.o \ + $(GLOBJ)gp_unix.o \ + $(GLOBJ)zdevcal.o + + $(MAKE) $(ARGS) \ + CC='cc $(SGIARCHFLAGS) -ansi -D_POSIX_4SOURCE -woff 1185,1429 -Olimit 1100' \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/lib/X11 -L/usr/local/lib' \ + $(GLOBJ)gxclread.o + + $(MAKE) $(ARGS) \ + CC='cc $(SGIARCHFLAGS) -ansi -D_POSIX_4SOURCE -woff 1185,1429' \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/local/$(SGIARCHLIB) -L/usr/local/lib -L/usr/lib/X11' \ + $(GNU_READLINE_ARGS) + +sgi-mips-irix6.4: init + $(MAKE) $(ARGS) \ + CC='cc $(SGIARCHFLAGS) -D_POSIX_4SOURCE' \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/lib/X11 -L/usr/local/lib' \ + $(GLOBJ)gdevpdf.o \ + $(GLOBJ)gdevps.o \ + $(GLOBJ)gdevtifs.o \ + $(GLOBJ)gp_unix.o \ + $(GLOBJ)zdevcal.o +# + $(MAKE) $(ARGS) \ + CC='cc $(SGIARCHFLAGS) -ansi -D_POSIX_4SOURCE -woff 1185,1429 -OPT:Olimit=2500' \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/lib/X11 -L/usr/local/lib' \ + $(GLOBJ)gxclread.o + + $(MAKE) $(ARGS) \ + CC='cc $(SGIARCHFLAGS) -ansi -D_POSIX_4SOURCE -woff 1185,1429' \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/local/$(SGIARCHLIB) -L/usr/local/lib -L/usr/lib/X11' + +sgi-mips-irix6.4-gcc: init + $(MAKE) $(ARGS) \ + CC='gcc -D_POSIX_4SOURCE' \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/local/$(SGIARCHLIB) -L/usr/local/lib -L/usr/lib/X11' + +sgi-mips-irix6.4-gnu-readline: init + $(MAKE) $(ARGS) \ + CC='cc $(SGIARCHFLAGS) -D_POSIX_4SOURCE' \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/lib/X11 -L/usr/local/lib' \ + $(GLOBJ)gdevpdf.o \ + $(GLOBJ)gdevps.o \ + $(GLOBJ)gdevtifs.o \ + $(GLOBJ)gp_unix.o \ + $(GLOBJ)zdevcal.o +# + $(MAKE) $(ARGS) \ + CC='cc $(SGIARCHFLAGS) -ansi -D_POSIX_4SOURCE -woff 1185,1429 -OPT:Olimit=2500' \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/lib/X11 -L/usr/local/lib' \ + $(GLOBJ)gxclread.o + + $(MAKE) $(ARGS) \ + CC='cc $(SGIARCHFLAGS) -ansi -D_POSIX_4SOURCE -woff 1185,1429' \ + XINCLUDE=-I/usr/include/X11 \ + XLIBDIRS='-L/usr/local/$(SGIARCHLIB) -L/usr/local/lib -L/usr/lib/X11' \ + $(GNU_READLINE_ARGS) \ + XCFLAGS='-I. -I$(JSRCDIR) -I/usr/local/include -L/usr/local/lib32 -L/usr/local/lib' + +sun-sparc-solaris: init + $(MAKE) $(ARGS) \ + CC='cc -Xc' \ + FEATURE_DEVS_EXTRA= \ + XINCLUDE=-I/usr/openwin/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/openwin/lib' + +sun-sparc-solaris-gnu-readline: init + $(MAKE) $(ARGS) \ + CC='cc -Xc' \ + XINCLUDE=-I/usr/openwin/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/openwin/lib' \ + $(GNU_READLINE_ARGS) + +sun-sparc-solaris-gcc: init + $(MAKE) $(ARGSGCC) \ + CC='gcc' \ + GCFLAGS=$(GCFLAGS) \ + XINCLUDE=-I/usr/openwin/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/openwin/lib' \ + EXTRALIBS='-ltermcap' + +# For ps2pdf FullBook.ps, these optimization options only reduced the time by 3%! +sun-sparc-solaris-opt-gnu-readline: init + $(MAKE) $(ARGS) \ + CC='cc -Xc -xO5 -dalign -xlibmil -xcg92 -xtarget=ultra1/2170' \ + XINCLUDE=-I/usr/openwin/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/openwin/lib' \ + $(GNU_READLINE_ARGS) + +# [21-Dec-1998] Add missing $(DD) prefix to sparc.dev +sun-sparc-solaris-newsprint: init + $(MAKE) $(ARGS) \ + CC='cc -Xc' \ + XINCLUDE=-I/usr/openwin/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/openwin/lib' \ + DEVICE_DEVS2=$(DD)sparc.dev + +sun-sparc-solaris-pg: init + $(MAKE) $(ARGS) \ + CC='cc -Xc -xO5 -dalign -xlibmil -fsimple=2 -fns -xsafe=mem -xtarget=ultra1/170 -xpg' \ + XINCLUDE=-I/usr/openwin/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/openwin/lib -ldl' + +# [21-Dec-1998] Add missing $(DD) prefix to sparc.dev +# [28-Nov-1997] Extra device(s) to be compiled into gs to support +# local needs Neither unixansi.mak nor unix-gcc.mak currently sets +# DEVICE_DEVS2, so we are free to list only our extra ones here: + +# NB: Need -Dconst= for gcc 2.7.1 (unless gcc patch in make.doc is installed) +sun-sparc-sunos-gcc: init + $(MAKE) $(ARGSGCC) \ + CC='gcc -Dconst=' \ + FEATURE_DEVS_EXTRA= \ + GCFLAGS=$(GCFLAGS) \ + XINCLUDE=-I/usr/openwin/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/openwin/lib' \ + DEVICE_DEVS2=$(DD)sparc.dev \ + EXTRALIBS='-ltermcap' + +sun-sparc-sunos-gcc-gnu-readline: init + $(MAKE) $(ARGSGCC) \ + CC='gcc -Dconst=' \ + GCFLAGS=$(GCFLAGS) \ + XINCLUDE=-I/usr/openwin/include \ + XLIBDIRS='-L/usr/local/lib -L/usr/openwin/lib' \ + DEVICE_DEVS2=$(DD)sparc.dev \ + $(GNU_READLINE_ARGS) + +# Convenience targets: build by hostname, using settings from +# /usr/local/src/ghostscript/BUILD-GS.sh + +# [02-Oct-1999]: remove -gnu-readline from these: I still have not +# yet had time to debug the problems it creates interfacing +# to ps2pk et al +GNUREADLINE=-gnu-readline +GNUREADLINE= + +# [Hostnames at Utah intentionally obscurred:] +XXXXXXXX.math.utah.edu: dec-alpha-osf$(GNUREADLINE) +XXXXXXXX.physics.utah.edu: ibm-rs6000-aix-4.2$(GNUREADLINE) +XXXXXXXX.math.utah.edu: sgi-mips-irix6.4$(GNUREADLINE) +XXXXXXXX.math.utah.edu: hp-parisc-hpux$(GNUREADLINE) +XXXXXXXX.math.utah.edu: sgi-mips-irix6.3$(GNUREADLINE) +XXXXXXXX.math.utah.edu: next-m68K-mach$(GNUREADLINE) +XXXXXXXX: apple-powerpc-rhapsody5.5$(GNUREADLINE) +XXXXXXXX.math.utah.edu: apple-powerpc-rhapsody5.5$(GNUREADLINE) +XXXXXXXX.math.utah.edu: dec-alpha-osf$(GNUREADLINE) +XXXXXXXX.math.utah.edu: linux$(GNUREADLINE) +XXXXXXXX.math.utah.edu: sun-sparc-sunos-gcc$(GNUREADLINE) +XXXXXXXX.math.utah.edu: sun-sparc-solaris$(GNUREADLINE) +XXXXXXXX.math.utah.edu: sun-sparc-solaris$(GNUREADLINE) +XXXXXXXX.math.utah.edu: sgi-mips-irix5$(GNUREADLINE) diff --git a/gs/src/ansi2knr.c b/gs/src/ansi2knr.c index d32587cf0..295998854 100644 --- a/gs/src/ansi2knr.c +++ b/gs/src/ansi2knr.c @@ -1,6 +1,6 @@ /* Copyright (C) 1989, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. */ - +/*$RCSfile$ $Revision$*/ /* Convert ANSI C function definitions to K&R ("traditional C") syntax */ /* diff --git a/gs/src/bcwin32.mak b/gs/src/bcwin32.mak index 19da27fff..569a6a9e5 100644 --- a/gs/src/bcwin32.mak +++ b/gs/src/bcwin32.mak @@ -1,21 +1,8 @@ # Copyright (C) 1989-1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for (MS-Windows 3.1/Win32s / Windows 95 / Windows NT) + # Borland C++ 4.5 platform. @@ -25,15 +12,33 @@ # ------ Generic options ------ # +# Define the directory for the final executable, and the +# source, generated intermediate file, and object directories +# for the graphics library (GL) and the PostScript/PDF interpreter (PS). + +BINDIR=bin +GLSRCDIR=src +GLGENDIR=obj +GLOBJDIR=obj +PSSRCDIR=src +PSLIBDIR=lib +PSGENDIR=obj +PSOBJDIR=obj + +# Define the root directory for Ghostscript installation. + +AROOTDIR=c:/Aladdin +GSROOTDIR=$(AROOTDIR)/gs$(GS_DOT_VERSION) + # Define the directory that will hold documentation at runtime. -GS_DOCDIR=c:/gs +GS_DOCDIR=$(GSROOTDIR)/doc # Define the default directory/ies for the runtime # initialization and font files. Separate multiple directories with \;. # Use / to indicate directories, not a single \. -GS_LIB_DEFAULT=.;c:/gs/lib\;c:/gs/fonts +GS_LIB_DEFAULT=$(GSROOTDIR)/lib\;$(AROOTDIR)/fonts # Define whether or not searching for initialization files should always # look in the current directory first. This leads to well-known security @@ -74,6 +79,16 @@ GS=gswin32 GSCONSOLE=gswin32c GSDLL=gsdll32 +# Define the name of a pre-built executable that can be invoked at build +# time. Currently, this is only needed for compiled fonts. The usual +# alternatives are: +# - the standard name of Ghostscript on your system (typically `gs'): +BUILD_TIME_GS=gswin32c +# - the name of the executable you are building now. If you choose this +# option, then you must build the executable first without compiled fonts, +# and then again with compiled fonts. +#BUILD_TIME_GS=$(BINDIR)\$(GS) -I$(PSLIBDIR) + # To build two small executables and a large DLL, use MAKEDLL=1. # To build two large executables, use MAKEDLL=0. @@ -86,19 +101,6 @@ MAKEDLL=1 MULTITHREAD=1 -# Define the directory for the final executable, and the -# source, generated intermediate file, and object directories -# for the graphics library (GL) and the PostScript/PDF interpreter (PS). - -BINDIR=bin -GLSRCDIR=src -GLGENDIR=obj -GLOBJDIR=obj -PSSRCDIR=src -PSLIBDIR=lib -PSGENDIR=obj -PSOBJDIR=obj - # Define the directory where the IJG JPEG library sources are stored, # and the major version of the library that is stored there. # You may need to change this if the IJG library version changes. @@ -199,12 +201,12 @@ SYNC=winsync # Choose the language feature(s) to include. See gs.mak for details. -FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)mshandle.dev $(PSD)pipe.dev +FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)mshandle.dev $(GLD)pipe.dev # Choose whether to compile the .ps initialization files into the executable. # See gs.mak for details. -COMPILE_INITS=0 +COMPILE_INITS=1 # Choose whether to store band lists on files or in memory. # The choices are 'file' or 'memory'. @@ -435,6 +437,10 @@ $(LIBCTR): $(TOP_MAKEFILES) $(ECHOGS_XE) !if $(MAKEDLL) # The graphical small EXE loader +# **************** Borland C++ 4.5 will not compile the setup program, +# **************** since a later Windows header file is required. +# **************** The following dependency list should include +# **************** $(SETUP_XE) $(UNINSTALL_XE) $(GS_XE): $(GSDLL_DLL) $(DWOBJ) $(GSCONSOLE_XE)\ $(GS_OBJ).res $(GLSRCDIR)\dwmain32.def $(LINK) /Tpe $(LCT) @&&! @@ -508,4 +514,38 @@ $(GLSRCDIR)\gs16spl.def ! $(COMPDIR)\rlink -t $(GLOBJ)gs16spl.res $(GSSPL_XE) +# ---------------------- Setup and uninstall programs ---------------------- # + +!if $(MAKEDLL) + +$(SETUP_XE): $(GLOBJ)dwsetup.obj $(GLOBJ)dwinst.obj $(GLOBJ)dwsetup.res $(GLSRC)dwsetup.def + $(LINK) /Tpe /ap $(LCT) $(DEBUGLINK) @&&! +$(LIBDIR)\c0w32 + +$(GLOBJ)dwsetup.obj $(GLOBJ)dwinst.obj + +,$(SETUP_XE),$(GLOBJ)$(dwsetup), + +$(LIBDIR)\import32 + +$(LIBDIR)\ole2w32 + +$(LIBDIR)\cw32, + +$(GLSRCDIR)\dwsetup.def, + +$(GLOBJ)dwsetup.res +! + +$(UNINSTALL_XE): $(GLOBJ)dwuninst.obj $(GLOBJ)dwuninst.res $(GLSRC)dwuninst.def + $(LINK) /Tpe /ap $(LCT) $(DEBUGLINK) @&&! +$(LIBDIR)\c0w32 + +$(GLOBJ)dwuninst.obj + +,$(UNINSTALL_XE),$(GLOBJ)$(dwuninst), + +$(LIBDIR)\import32 + +$(LIBDIR)\ole2w32 + +$(LIBDIR)\cw32, + +$(GLSRCDIR)\dwuninst.def, + +$(GLOBJ)dwuninst.res +! + rem echo $(LIBDIR)\ole32.lib >> $(GLGEN)dwuninst.tr + rem echo $(LIBDIR)\uuid.lib >> $(GLGEN)dwuninst.tr + + +!endif + + # end of makefile diff --git a/gs/src/bench.c b/gs/src/bench.c index 7906c8736..29397a876 100644 --- a/gs/src/bench.c +++ b/gs/src/bench.c @@ -1,5 +1,6 @@ -/* pop (%!) .skipeof */ -/* Copyright (C) 1989, 1995 Aladdin Enterprises. All rights reserved. +/* pop (%!) .skipeof + + Copyright (C) 1989, 1995 Aladdin Enterprises. All rights reserved. This file is part of Aladdin Ghostscript. @@ -17,7 +18,7 @@ all copies. */ - +/*$RCSfile$ $Revision$ */ /* Simple hardware benchmarking suite (C and PostScript) */ #include <stdio.h> #include <stdlib.h> diff --git a/gs/src/bfont.h b/gs/src/bfont.h index 3a79f941c..ede9a58ac 100644 --- a/gs/src/bfont.h +++ b/gs/src/bfont.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interpreter internal routines and data needed for building fonts */ /* Requires gxfont.h */ diff --git a/gs/src/btoken.h b/gs/src/btoken.h index 635dcddfb..fc71a0616 100644 --- a/gs/src/btoken.h +++ b/gs/src/btoken.h @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for Level 2 binary tokens */ #ifndef btoken_INCLUDED diff --git a/gs/src/bughunt.sh b/gs/src/bughunt.sh index b5c808acc..8ec4f4084 100755 --- a/gs/src/bughunt.sh +++ b/gs/src/bughunt.sh @@ -1,5 +1,5 @@ #! /bin/sh - +# $RCSfile$ $Revision$ # NB: If your sh does not support functions, then try # /usr/local/bin/bash or /bin/ksh, if you have them. # diff --git a/gs/src/catmake b/gs/src/catmake index 61435abe1..e52e70fb1 100755 --- a/gs/src/catmake +++ b/gs/src/catmake @@ -1,5 +1,5 @@ #!/bin/sh - +# $RCSfile$ $Revision$ # Expand 'includes' in makefiles. Usage: # catmake orig.mak > makefile diff --git a/gs/src/ccfont.h b/gs/src/ccfont.h index d8003a692..9ed8eddb9 100644 --- a/gs/src/ccfont.h +++ b/gs/src/ccfont.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Header for fonts compiled into C. */ #ifndef ccfont_INCLUDED diff --git a/gs/src/ccgs b/gs/src/ccgs index 115930351..7ce2e5222 100644 --- a/gs/src/ccgs +++ b/gs/src/ccgs @@ -1,5 +1,5 @@ #!/bin/sh - +# $RCSfile$ $Revision$ # Pre-process ANSI C files with ansi2knr before compiling. # Usage: ccgs ansi2knr "cc switches..." ...switches... -c inputfile ... -o outputfile diff --git a/gs/src/cfonts.mak b/gs/src/cfonts.mak index 1b3a55216..df410a06e 100644 --- a/gs/src/cfonts.mak +++ b/gs/src/cfonts.mak @@ -1,21 +1,8 @@ # Copyright (C) 1992, 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Makefile for compiling PostScript Type 1 fonts into C. # For more information about fonts, consult the Fontmap file, # and also Fonts.htm. @@ -24,8 +11,8 @@ # PSGENDIR - the directory for files generated during building # PSOBJDIR - the object code directory -# Define the name for invoking the font2c program. -FONT2C=font2c +# Define the name of this makefile. +CFONTS_MAK=$(PSSRC)cfonts.mak # ---------------- End of editable definitions ---------------- # @@ -40,6 +27,16 @@ CFOBJ=$(CFOBJDIR)$(D) CFCC=$(CC_) $(I_)$(PSSRCDIR)$(_I) CFO_=$(O_)$(CFOBJ) +# Define how to invoke the font2c program. +F2CTMP=$(PSGEN)font2c.tmp +F2CDEP=$(MAKEFILE) $(F2CTMP) + +$(F2CTMP) : $(MAKEFILE) $(CFONTS_MAK) $(ECHOGS_XE) + $(EXP)$(ECHOGS_XE) -w $(F2CTMP) - -q -dNODISPLAY -dWRITESYSTEMDICT + $(EXP)$(ECHOGS_XE) -a $(F2CTMP) - -- $(PSLIBDIR)$(D)font2c.ps + +FONT2C=$(BUILD_TIME_GS) @$(F2CTMP) + # ---------------------------------------------------------------- # # This file supports two slightly different font sets: @@ -81,16 +78,16 @@ CharterBT_c Cyrillic_c Kana_c Utopia_c AvantGarde_c : $(CFGEN)0agk.c $(CFGEN)0agko.c $(CFGEN)0agd.c $(CFGEN)0agdo.c $(NO_OP) -$(CFGEN)0agk.c : +$(CFGEN)0agk.c : $(F2CDEP) $(FONT2C) AvantGarde-Book $(CFGEN)0agk.c agk -$(CFGEN)0agko.c : +$(CFGEN)0agko.c : $(F2CDEP) $(FONT2C) AvantGarde-BookOblique $(CFGEN)0agko.c agko -$(CFGEN)0agd.c : +$(CFGEN)0agd.c : $(F2CDEP) $(FONT2C) AvantGarde-Demi $(CFGEN)0agd.c agd -$(CFGEN)0agdo.c : +$(CFGEN)0agdo.c : $(F2CDEP) $(FONT2C) AvantGarde-DemiOblique $(CFGEN)0agdo.c agdo AvantGarde_o : $(CFOBJ)0agk.$(OBJ) $(CFOBJ)0agko.$(OBJ) $(CFOBJ)0agd.$(OBJ) $(CFOBJ)0agdo.$(OBJ) @@ -113,16 +110,16 @@ $(CFOBJ)0agdo.$(OBJ) : $(CFGEN)0agdo.c $(CCFONT) Bookman_c : $(CFGEN)0bkl.c $(CFGEN)0bkli.c $(CFGEN)0bkd.c $(CFGEN)0bkdi.c $(NO_OP) -$(CFGEN)0bkl.c : +$(CFGEN)0bkl.c : $(F2CDEP) $(FONT2C) Bookman-Light $(CFGEN)0bkl.c bkl -$(CFGEN)0bkli.c : +$(CFGEN)0bkli.c : $(F2CDEP) $(FONT2C) Bookman-LightItalic $(CFGEN)0bkli.c bkli -$(CFGEN)0bkd.c : +$(CFGEN)0bkd.c : $(F2CDEP) $(FONT2C) Bookman-Demi $(CFGEN)0bkd.c bkd -$(CFGEN)0bkdi.c : +$(CFGEN)0bkdi.c : $(F2CDEP) $(FONT2C) Bookman-DemiItalic $(CFGEN)0bkdi.c bkdi Bookman_o : $(CFOBJ)0bkl.$(OBJ) $(CFOBJ)0bkli.$(OBJ) $(CFOBJ)0bkd.$(OBJ) $(CFOBJ)0bkdi.$(OBJ) @@ -145,16 +142,16 @@ $(CFOBJ)0bkdi.$(OBJ) : $(CFGEN)0bkdi.c $(CCFONT) Courier_c : $(CFGEN)0crr.c $(CFGEN)0cri.c $(CFGEN)0crb.c $(CFGEN)0crbi.c $(NO_OP) -$(CFGEN)0crr.c : +$(CFGEN)0crr.c : $(F2CDEP) $(FONT2C) Courier $(CFGEN)0crr.c crr -$(CFGEN)0cri.c : +$(CFGEN)0cri.c : $(F2CDEP) $(FONT2C) Courier-Italic $(CFGEN)0cri.c cri -$(CFGEN)0crb.c : +$(CFGEN)0crb.c : $(F2CDEP) $(FONT2C) Courier-Bold $(CFGEN)0crb.c crb -$(CFGEN)0crbi.c : +$(CFGEN)0crbi.c : $(F2CDEP) $(FONT2C) Courier-BoldItalic $(CFGEN)0crbi.c crbi Courier_o : $(CFOBJ)0crr.$(OBJ) $(CFOBJ)0cri.$(OBJ) $(CFOBJ)0crb.$(OBJ) $(CFOBJ)0crbi.$(OBJ) @@ -179,28 +176,28 @@ $(CFGEN)0hvb.c $(CFGEN)0hvbo.c $(CFGEN)0hvrrn.c \ $(CFGEN)0hvrorn.c $(CFGEN)0hvbrn.c $(CFGEN)0hvborn.c $(NO_OP) -$(CFGEN)0hvr.c : +$(CFGEN)0hvr.c : $(F2CDEP) $(FONT2C) Helvetica $(CFGEN)0hvr.c hvr -$(CFGEN)0hvro.c : +$(CFGEN)0hvro.c : $(F2CDEP) $(FONT2C) Helvetica-Oblique $(CFGEN)0hvro.c hvro -$(CFGEN)0hvb.c : +$(CFGEN)0hvb.c : $(F2CDEP) $(FONT2C) Helvetica-Bold $(CFGEN)0hvb.c hvb -$(CFGEN)0hvbo.c : +$(CFGEN)0hvbo.c : $(F2CDEP) $(FONT2C) Helvetica-BoldOblique $(CFGEN)0hvbo.c hvbo -$(CFGEN)0hvrrn.c : +$(CFGEN)0hvrrn.c : $(F2CDEP) $(FONT2C) Helvetica-Narrow $(CFGEN)0hvrrn.c hvrrn -$(CFGEN)0hvrorn.c : +$(CFGEN)0hvrorn.c : $(F2CDEP) $(FONT2C) Helvetica-Narrow-Oblique $(CFGEN)0hvrorn.c hvrorn -$(CFGEN)0hvbrn.c : +$(CFGEN)0hvbrn.c : $(F2CDEP) $(FONT2C) Helvetica-Narrow-Bold $(CFGEN)0hvbrn.c hvbrn -$(CFGEN)0hvborn.c : +$(CFGEN)0hvborn.c : $(F2CDEP) $(FONT2C) Helvetica-Narrow-BoldOblique $(CFGEN)0hvborn.c hvborn Helvetica_o : $(CFOBJ)0hvr.$(OBJ) $(CFOBJ)0hvro.$(OBJ) $(CFOBJ)0hvb.$(OBJ) $(CFOBJ)0hvbo.$(OBJ) \ @@ -237,16 +234,16 @@ NewCenturySchlbk_c : $(CFGEN)0ncr.c $(CFGEN)0ncri.c $(CFGEN)0ncb.c \ $(CFGEN)0ncbi.c $(NO_OP) -$(CFGEN)0ncr.c : +$(CFGEN)0ncr.c : $(F2CDEP) $(FONT2C) NewCenturySchlbk-Roman $(CFGEN)0ncr.c ncr -$(CFGEN)0ncri.c : +$(CFGEN)0ncri.c : $(F2CDEP) $(FONT2C) NewCenturySchlbk-Italic $(CFGEN)0ncri.c ncri -$(CFGEN)0ncb.c : +$(CFGEN)0ncb.c : $(F2CDEP) $(FONT2C) NewCenturySchlbk-Bold $(CFGEN)0ncb.c ncb -$(CFGEN)0ncbi.c : +$(CFGEN)0ncbi.c : $(F2CDEP) $(FONT2C) NewCenturySchlbk-BoldItalic $(CFGEN)0ncbi.c ncbi NewCenturySchlbk_o : $(CFOBJ)0ncr.$(OBJ) $(CFOBJ)0ncri.$(OBJ) $(CFOBJ)0ncb.$(OBJ) $(CFOBJ)0ncbi.$(OBJ) @@ -269,16 +266,16 @@ $(CFOBJ)0ncbi.$(OBJ) : $(CFGEN)0ncbi.c $(CCFONT) Palatino_c : $(CFGEN)0plr.c $(CFGEN)0plri.c $(CFGEN)0plb.c $(CFGEN)0plbi.c $(NO_OP) -$(CFGEN)0plr.c : +$(CFGEN)0plr.c : $(F2CDEP) $(FONT2C) Palatino-Roman $(CFGEN)0plr.c plr -$(CFGEN)0plri.c : +$(CFGEN)0plri.c : $(F2CDEP) $(FONT2C) Palatino-Italic $(CFGEN)0plri.c plri -$(CFGEN)0plb.c : +$(CFGEN)0plb.c : $(F2CDEP) $(FONT2C) Palatino-Bold $(CFGEN)0plb.c plb -$(CFGEN)0plbi.c : +$(CFGEN)0plbi.c : $(F2CDEP) $(FONT2C) Palatino-BoldItalic $(CFGEN)0plbi.c plbi Palatino_o : $(CFOBJ)0plr.$(OBJ) $(CFOBJ)0plri.$(OBJ) $(CFOBJ)0plb.$(OBJ) $(CFOBJ)0plbi.$(OBJ) @@ -301,16 +298,16 @@ $(CFOBJ)0plbi.$(OBJ) : $(CFGEN)0plbi.c $(CCFONT) TimesRoman_c : $(CFGEN)0tmr.c $(CFGEN)0tmri.c $(CFGEN)0tmb.c $(CFGEN)0tmbi.c $(NO_OP) -$(CFGEN)0tmr.c : +$(CFGEN)0tmr.c : $(F2CDEP) $(FONT2C) Times-Roman $(CFGEN)0tmr.c tmr -$(CFGEN)0tmri.c : +$(CFGEN)0tmri.c : $(F2CDEP) $(FONT2C) Times-Italic $(CFGEN)0tmri.c tmri -$(CFGEN)0tmb.c : +$(CFGEN)0tmb.c : $(F2CDEP) $(FONT2C) Times-Bold $(CFGEN)0tmb.c tmb -$(CFGEN)0tmbi.c : +$(CFGEN)0tmbi.c : $(F2CDEP) $(FONT2C) Times-BoldItalic $(CFGEN)0tmbi.c tmbi TimesRoman_o : $(CFOBJ)0tmr.$(OBJ) $(CFOBJ)0tmri.$(OBJ) $(CFOBJ)0tmb.$(OBJ) $(CFOBJ)0tmbi.$(OBJ) @@ -333,7 +330,7 @@ $(CFOBJ)0tmbi.$(OBJ) : $(CFGEN)0tmbi.c $(CCFONT) Symbol_c : $(CFGEN)0syr.c $(NO_OP) -$(CFGEN)0syr.c : +$(CFGEN)0syr.c : $(F2CDEP) $(FONT2C) Symbol $(CFGEN)0syr.c syr Symbol_o : $(CFOBJ)0syr.$(OBJ) @@ -347,7 +344,7 @@ $(CFOBJ)0syr.$(OBJ) : $(CFGEN)0syr.c $(CCFONT) ZapfChancery_c : $(CFGEN)0zcmi.c $(NO_OP) -$(CFGEN)0zcmi.c : +$(CFGEN)0zcmi.c : $(F2CDEP) $(FONT2C) ZapfChancery-MediumItalic $(CFGEN)0zcmi.c zcmi ZapfChancery_o : $(CFOBJ)0zcmi.$(OBJ) @@ -361,7 +358,7 @@ $(CFOBJ)0zcmi.$(OBJ) : $(CFGEN)0zcmi.c $(CCFONT) ZapfDingbats_c : $(CFGEN)0zdr.c $(NO_OP) -$(CFGEN)0zdr.c : +$(CFGEN)0zdr.c : $(F2CDEP) $(FONT2C) ZapfDingbats $(CFGEN)0zdr.c zdr ZapfDingbats_o : $(CFOBJ)0zdr.$(OBJ) @@ -381,16 +378,16 @@ $(CFOBJ)0zdr.$(OBJ) : $(CFGEN)0zdr.c $(CCFONT) CharterBT_c : $(CFGEN)bchr.c $(CFGEN)bchri.c $(CFGEN)bchb.c $(CFGEN)bchbi.c $(NO_OP) -$(CFGEN)bchr.c : +$(CFGEN)bchr.c : $(F2CDEP) $(FONT2C) Charter-Roman $(CFGEN)bchr.c chr -$(CFGEN)bchri.c : +$(CFGEN)bchri.c : $(F2CDEP) $(FONT2C) Charter-Italic $(CFGEN)bchri.c chri -$(CFGEN)bchb.c : +$(CFGEN)bchb.c : $(F2CDEP) $(FONT2C) Charter-Bold $(CFGEN)bchb.c chb -$(CFGEN)bchbi.c : +$(CFGEN)bchbi.c : $(F2CDEP) $(FONT2C) Charter-BoldItalic $(CFGEN)bchbi.c chbi CharterBT_o : $(CFOBJ)bchr.$(OBJ) $(CFOBJ)bchri.$(OBJ) $(CFOBJ)bchb.$(OBJ) $(CFOBJ)bchbi.$(OBJ) @@ -413,10 +410,10 @@ $(CFOBJ)bchbi.$(OBJ) : $(CFGEN)bchbi.c $(CCFONT) Cyrillic_c : $(CFGEN)fcyr.c $(CFGEN)fcyri.c $(NO_OP) -$(CFGEN)fcyr.c : +$(CFGEN)fcyr.c : $(F2CDEP) $(FONT2C) Cyrillic $(CFGEN)fcyr.c fcyr -$(CFGEN)fcyri.c : +$(CFGEN)fcyri.c : $(F2CDEP) $(FONT2C) Cyrillic-Italic $(CFGEN)fcyri.c fcyri Cyrillic_o : $(CFOBJ)fcyr.$(OBJ) $(CFOBJ)fcyri.$(OBJ) @@ -433,10 +430,10 @@ $(CFOBJ)fcyri.$(OBJ) : $(CFGEN)fcyri.c $(CCFONT) Kana_c : $(CFGEN)fhirw.c $(CFGEN)fkarw.c $(NO_OP) -$(CFGEN)fhirw.c : +$(CFGEN)fhirw.c : $(F2CDEP) $(FONT2C) Calligraphic-Hiragana $(CFGEN)fhirw.c fhirw -$(CFGEN)fkarw.c : +$(CFGEN)fkarw.c : $(F2CDEP) $(FONT2C) Calligraphic-Katakana $(CFGEN)fkarw.c fkarw Kana_o : $(CFOBJ)fhirw.$(OBJ) $(CFOBJ)fkarw.$(OBJ) @@ -453,16 +450,16 @@ $(CFOBJ)fkarw.$(OBJ) : $(CFGEN)fkarw.c $(CCFONT) Utopia_c : $(CFGEN)putr.c $(CFGEN)putri.c $(CFGEN)putb.c $(CFGEN)putbi.c $(NO_OP) -$(CFGEN)putr.c : +$(CFGEN)putr.c : $(F2CDEP) $(FONT2C) Utopia-Regular $(CFGEN)putr.c utr -$(CFGEN)putri.c : +$(CFGEN)putri.c : $(F2CDEP) $(FONT2C) Utopia-Italic $(CFGEN)putri.c utri -$(CFGEN)putb.c : +$(CFGEN)putb.c : $(F2CDEP) $(FONT2C) Utopia-Bold $(CFGEN)putb.c utb -$(CFGEN)putbi.c : +$(CFGEN)putbi.c : $(F2CDEP) $(FONT2C) Utopia-BoldItalic $(CFGEN)putbi.c utbi Utopia_o : $(CFOBJ)putr.$(OBJ) $(CFOBJ)putri.$(OBJ) $(CFOBJ)putb.$(OBJ) $(CFOBJ)putbi.$(OBJ) diff --git a/gs/src/contrib.mak b/gs/src/contrib.mak index c9818b5cf..7c0002a63 100644 --- a/gs/src/contrib.mak +++ b/gs/src/contrib.mak @@ -1,21 +1,8 @@ # Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for contributed device drivers. # Define the name of this makefile. diff --git a/gs/src/cp.bat b/gs/src/cp.bat index 3d60b63af..dfc2f0759 100755 --- a/gs/src/cp.bat +++ b/gs/src/cp.bat @@ -1,4 +1,4 @@ - +@rem $RCSfile$ $Revision$ @echo off if "%2"=="." goto ne if exist _.tmp erase _.tmp diff --git a/gs/src/cp.cmd b/gs/src/cp.cmd index c77ba9175..ec3d18f95 100755 --- a/gs/src/cp.cmd +++ b/gs/src/cp.cmd @@ -1,3 +1,3 @@ @copy /B %1 %2 - +@rem $RCSfile$ $Revision$ @if not "%2"=="." touch %2 diff --git a/gs/src/ctype_.h b/gs/src/ctype_.h index b6467bf12..78012f3b8 100644 --- a/gs/src/ctype_.h +++ b/gs/src/ctype_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Wrapper for ctype.h */ #ifndef ctype__INCLUDED diff --git a/gs/src/devs.mak b/gs/src/devs.mak index 7bd91f12a..cf06a43f3 100644 --- a/gs/src/devs.mak +++ b/gs/src/devs.mak @@ -1,21 +1,8 @@ # Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for Aladdin's device drivers. # Define the name of this makefile. @@ -396,12 +383,13 @@ x__h=$(GLSRC)x_.h gdevxcmp_h=$(GLSRC)gdevxcmp.h gdevx_h=$(GLSRC)gdevx.h $(gdevbbox_h) $(gdevxcmp_h) -# See the main makefile for the definition of XLIBS. +# See the main makefile for the definition of XLIBDIRS and XLIBS. x11_=$(GLOBJ)gdevx.$(OBJ) $(GLOBJ)gdevxcmp.$(OBJ) $(GLOBJ)gdevxini.$(OBJ)\ $(GLOBJ)gdevxres.$(OBJ) $(GLOBJ)gdevxxf.$(OBJ)\ $(GLOBJ)gdevemap.$(OBJ) $(GLOBJ)gsparamx.$(OBJ) $(DD)x11_.dev : $(DEVS_MAK) $(x11_) $(GLD)bbox.dev $(SETMOD) $(DD)x11_ $(x11_) + $(ADDMOD) $(DD)x11_ -link $(XLIBDIRS) $(ADDMOD) $(DD)x11_ -lib $(XLIBS) $(ADDMOD) $(DD)x11_ -include $(GLD)bbox @@ -552,9 +540,16 @@ $(DD)oce9050.dev : $(DEVS_MAK) $(HPMONO) $(GLD)page.dev ### Henry Stiles <henrys@meerkat.dimensional.com> cljet5_=$(GLOBJ)gdevclj.$(OBJ) $(HPPCL) + +# The cljet5 driver is well-behaved. $(DD)cljet5.dev : $(DEVS_MAK) $(cljet5_) $(GLD)page.dev $(SETPDEV) $(DD)cljet5 $(cljet5_) +# The cljet5pr driver has hacks for trying to handle page rotation. +# The hacks only work with one special PCL interpreter. Don't use it! +$(DD)cljet5pr.dev : $(DEVS_MAK) $(cljet5_) $(GLD)page.dev + $(SETPDEV) $(DD)cljet5pr $(cljet5_) + $(GLOBJ)gdevclj.$(OBJ) : $(GLSRC)gdevclj.c $(math__h) $(PDEVH)\ $(gx_h) $(gsparam_h) $(gdevpcl_h) $(GLCC) $(GLO_)gdevclj.$(OBJ) $(C_) $(GLSRC)gdevclj.c @@ -668,9 +663,7 @@ $(GLOBJ)gdevps.$(OBJ) : $(GLSRC)gdevps.c $(GDEV)\ # PDF writer # Note that gs_pdfwr.ps will only actually be loaded if the configuration -# includes a PostScript interpreter. gs_mgl_e requires gs_mro_e and should -# always be loaded: guaranteeing this will require moving the Encodings -# into C code. +# includes a PostScript interpreter. pdfwrite1_=$(GLOBJ)gdevpdf.$(OBJ) $(GLOBJ)gdevpdfd.$(OBJ) pdfwrite2_=$(GLOBJ)gdevpdff.$(OBJ) $(GLOBJ)gdevpdfi.$(OBJ) $(GLOBJ)gdevpdfm.$(OBJ) @@ -680,8 +673,8 @@ pdfwrite5_=$(GLOBJ)gsflip.$(OBJ) $(GLOBJ)gsparamx.$(OBJ) pdfwrite6_=$(GLOBJ)scantab.$(OBJ) $(GLOBJ)sfilter2.$(OBJ) $(GLOBJ)sstring.$(OBJ) pdfwrite_=$(pdfwrite1_) $(pdfwrite2_) $(pdfwrite3_) $(pdfwrite4_) $(pdfwrite5_) $(DD)pdfwrite.dev : $(DEVS_MAK) $(ECHOGS_XE) $(pdfwrite_)\ - $(GLD)cmyklib.dev $(GLD)cfe.dev $(GLD)dcte.dev $(GLD)lzwe.dev\ - $(GLD)rle.dev $(GLD)szlibe.dev $(GLD)psdf.dev + $(GLD)cmyklib.dev $(GLD)cfe.dev $(GLD)lzwe.dev $(GLD)rle.dev\ + $(GLD)sdcte.dev $(GLD)sdeparam.dev $(GLD)szlibe.dev $(GLD)psdf.dev $(SETDEV2) $(DD)pdfwrite $(pdfwrite1_) $(ADDMOD) $(DD)pdfwrite $(pdfwrite2_) $(ADDMOD) $(DD)pdfwrite $(pdfwrite3_) @@ -689,10 +682,11 @@ $(DD)pdfwrite.dev : $(DEVS_MAK) $(ECHOGS_XE) $(pdfwrite_)\ $(ADDMOD) $(DD)pdfwrite $(pdfwrite5_) $(ADDMOD) $(DD)pdfwrite $(pdfwrite6_) $(ADDMOD) $(DD)pdfwrite -ps gs_pdfwr - $(ADDMOD) $(DD)pdfwrite -ps gs_lgo_e gs_lgx_e gs_mgl_e gs_mro_e - $(ADDMOD) $(DD)pdfwrite -include $(GLD)cmyklib $(GLD)cfe $(GLD)dcte - $(ADDMOD) $(DD)pdfwrite -include $(GLD)lzwe $(GLD)rle $(GLD)szlibe - $(ADDMOD) $(DD)pdfwrite -include $(GLD)psdf + $(ADDMOD) $(DD)pdfwrite -ps gs_lgo_e gs_lgx_e gs_mex_e + $(ADDMOD) $(DD)pdfwrite -ps gs_mgl_e gs_mro_e gs_wan_e + $(ADDMOD) $(DD)pdfwrite -include $(GLD)cmyklib $(GLD)cfe $(GLD)lzwe + $(ADDMOD) $(DD)pdfwrite -include $(GLD)rle $(GLD)sdcte $(GLD)sdeparam + $(ADDMOD) $(DD)pdfwrite -include $(GLD)szlibe $(GLD)psdf gdevpdfo_h=$(GLSRC)gdevpdfo.h gdevpdfx_h=$(GLSRC)gdevpdfx.h\ @@ -738,7 +732,7 @@ $(GLOBJ)gdevpdfo.$(OBJ) : $(GLSRC)gdevpdfo.c $(memory__h) $(string__h)\ $(sstring_h) $(strimpl_h) $(GLCC) $(GLO_)gdevpdfo.$(OBJ) $(C_) $(GLSRC)gdevpdfo.c -$(GLOBJ)gdevpdfp.$(OBJ) : $(GLSRC)gdevpdfp.c $(gx_h)\ +$(GLOBJ)gdevpdfp.$(OBJ) : $(GLSRC)gdevpdfp.c $(memory__h) $(gx_h)\ $(gdevpdfx_h) $(gserrors_h) $(gsparamx_h) $(GLCC) $(GLO_)gdevpdfp.$(OBJ) $(C_) $(GLSRC)gdevpdfp.c diff --git a/gs/src/dirent_.h b/gs/src/dirent_.h index 423d3ee2c..65bf7cd0d 100644 --- a/gs/src/dirent_.h +++ b/gs/src/dirent_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic substitute for Unix dirent.h */ #ifndef dirent__INCLUDED diff --git a/gs/src/dos_.h b/gs/src/dos_.h index 872bfb8e6..a6ed1a41b 100644 --- a/gs/src/dos_.h +++ b/gs/src/dos_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1992, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic MS-DOS interface */ #ifndef dos__INCLUDED diff --git a/gs/src/dpmainc.c b/gs/src/dpmainc.c index 2203078c1..85e0a2e53 100644 --- a/gs/src/dpmainc.c +++ b/gs/src/dpmainc.c @@ -17,7 +17,7 @@ */ - +/*$RCSfile$ $Revision$ */ /* Ghostscript DLL loader for OS/2 */ /* For WINDOWCOMPAT (console mode) application */ diff --git a/gs/src/dstack.h b/gs/src/dstack.h index 1f089e128..2b3004b08 100644 --- a/gs/src/dstack.h +++ b/gs/src/dstack.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for the interpreter's dictionary stack */ #ifndef dstack_INCLUDED diff --git a/gs/src/dvx-gcc.mak b/gs/src/dvx-gcc.mak index 3fb200eba..f4acb0e94 100755 --- a/gs/src/dvx-gcc.mak +++ b/gs/src/dvx-gcc.mak @@ -1,21 +1,8 @@ # Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for DesqView/X/gcc/X11 configuration. #include $(COMMONDIR)/gccdefs.mak @@ -29,6 +16,19 @@ include $(GLSRCDIR)/version.mak # ------ Generic options ------ # +# Define the directory for the final executable, and the +# source, generated intermediate file, and object directories +# for the graphics library (GL) and the PostScript/PDF interpreter (PS). + +BINDIR=bin +GLSRCDIR=src +GLGENDIR=obj +GLOBJDIR=obj +PSSRCDIR=src +PSLIBDIR=lib +PSGENDIR=obj +PSOBJDIR=obj + # Define the installation commands and target directories for # executables and files. The commands are only relevant to `make install'; # the directories also define the default search path for the @@ -83,18 +83,15 @@ GENOPT= GS=gs -# Define the directory for the final executable, and the -# source, generated intermediate file, and object directories -# for the graphics library (GL) and the PostScript/PDF interpreter (PS). - -BINDIR=bin -GLSRCDIR=src -GLGENDIR=obj -GLOBJDIR=obj -PSSRCDIR=src -PSLIBDIR=lib -PSGENDIR=obj -PSOBJDIR=obj +# Define the name of a pre-built executable that can be invoked at build +# time. Currently, this is only needed for compiled fonts. The usual +# alternatives are: +# - the standard name of Ghostscript on your system (typically `gs'): +BUILD_TIME_GS=gs +# - the name of the executable you are building now. If you choose this +# option, then you must build the executable first without compiled fonts, +# and then again with compiled fonts. +#BUILD_TIME_GS=$(BINDIR)/$(GS) -I$(PSLIBDIR) # Define the directory where the IJG JPEG library sources are stored, # and the major version of the library that is stored there. @@ -177,6 +174,12 @@ LDFLAGS=$(XLDFLAGS) EXTRALIBS=-lsys -lc +# Define the standard libraries to search at the end of linking. +# All reasonable platforms require -lm, but Rhapsody and perhaps one or +# two others fold libm into libc and require STDLIBS to be empty. + +STDLIBS=-lm + # 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 /usr/include, or the directory is supplied by an environment variable); @@ -229,12 +232,12 @@ SYNC=posync # Choose the language feature(s) to include. See gs.mak for details. -FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)pipe.dev +FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(GLD)pipe.dev # Choose whether to compile the .ps initialization files into the executable. # See gs.mak for details. -COMPILE_INITS=0 +COMPILE_INITS=1 # Choose whether to store band lists on files or in memory. # The choices are 'file' or 'memory'. diff --git a/gs/src/dvx-head.mak b/gs/src/dvx-head.mak index 9faabe091..339ba5a75 100644 --- a/gs/src/dvx-head.mak +++ b/gs/src/dvx-head.mak @@ -1,21 +1,8 @@ # Copyright (C) 1994, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Partial makefile, common to all Desqview/X configurations. # This part of the makefile gets inserted after the compiler-specific part diff --git a/gs/src/dvx-tail.mak b/gs/src/dvx-tail.mak index a0038e2df..3b1d509c1 100644 --- a/gs/src/dvx-tail.mak +++ b/gs/src/dvx-tail.mak @@ -1,21 +1,8 @@ # Copyright (C) 1994, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Partial makefile, common to all Desqview/X configurations. # This is the last part of the makefile for Desqview/X configurations. @@ -91,8 +78,8 @@ $(gconfig__h): $(GLSRCDIR)/dvx-tail.mak $(ECHOGS_XE) $(GS_XE): ld.tr gs.$(OBJ) $(INT_ALL) $(LIB_ALL) $(DEVS_ALL) $(CP_) ld.tr _temp_ - echo $(EXTRALIBS) -lm >>_temp_ - $(CC) $(LDFLAGS) $(XLIBDIRS) -o $(GS) gs.$(OBJ) @_temp_ + echo $(EXTRALIBS) $(STDLIBS) >>_temp_ + $(CC) $(LDFLAGS) -o $(GS) gs.$(OBJ) @_temp_ strip $(GS) coff2exe $(GS) del $(GS) diff --git a/gs/src/dwdll.cpp b/gs/src/dwdll.cpp index 943f9eb40..8bd39cc82 100644 --- a/gs/src/dwdll.cpp +++ b/gs/src/dwdll.cpp @@ -17,7 +17,7 @@ */ - +// $RCSfile$ $Revision$ // gsdll class for MS-Windows diff --git a/gs/src/dwdll.h b/gs/src/dwdll.h index 3fd0083bb..935c5bdad 100644 --- a/gs/src/dwdll.h +++ b/gs/src/dwdll.h @@ -18,7 +18,7 @@ */ - +// $RCSfile$ $Revision$ // gsdll_class for MS-Windows diff --git a/gs/src/dwimg.cpp b/gs/src/dwimg.cpp index 052c41191..91de4ae9e 100644 --- a/gs/src/dwimg.cpp +++ b/gs/src/dwimg.cpp @@ -16,7 +16,7 @@ all copies. */ - +// $RCSfile$ $Revision$ #define STRICT diff --git a/gs/src/dwimg.h b/gs/src/dwimg.h index 271d7a6d8..c6124d5ab 100644 --- a/gs/src/dwimg.h +++ b/gs/src/dwimg.h @@ -17,7 +17,9 @@ */ +// $RCSfile$ $Revision$ +// Image Window class class ImageWindow { static ImageWindow *first; diff --git a/gs/src/dwinst.cpp b/gs/src/dwinst.cpp new file mode 100644 index 000000000..d065222f6 --- /dev/null +++ b/gs/src/dwinst.cpp @@ -0,0 +1,937 @@ +/* Copyright (C) 1999, Ghostgum Software Pty Ltd. All rights reserved. + + This file is part of Aladdin Ghostscript. + + This program is distributed with NO WARRANTY OF ANY KIND. No author + or distributor accepts any responsibility for the consequences of using it, + or for whether it serves any particular purpose or works at all, unless he + or she says so in writing. Refer to the Aladdin Ghostscript Free Public + License (the "License") for full details. + + Every copy of Aladdin Ghostscript must include a copy of the License, + normally in a plain ASCII text file named PUBLIC. The License grants you + the right to copy, modify and redistribute Aladdin Ghostscript, but only + under certain conditions described in the License. Among other things, the + License requires that the copyright notice and this notice be preserved on + all copies. +*/ + +// $RCSfile$ $Revision$ + +#define STRICT +#include <windows.h> +#include <objbase.h> +#include <shlobj.h> +#include <stdio.h> +#include <io.h> +#include <direct.h> + +#include "dwinst.h" + +#define UNINSTALLKEY TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall") +#define UNINSTALLSTRINGKEY TEXT("UninstallString") +#define DISPLAYNAMEKEY TEXT("DisplayName") +#define UNINSTALL_FILE "uninstal.txt" +char szSection[] = "////////////////////////////////\n"; + +#ifdef _MSC_VER +#define mktemp(x) _mktemp(x) +#define chdir(x) _chdir(x) +#define mkdir(x) _mkdir(x) +#endif + + + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CInstall::CInstall() +{ + CoInitialize(NULL); + + m_szTargetDir[0] = '\0'; + m_szTargetGroup[0] = '\0'; + m_szPrograms[0] = '\0'; + m_szMainDir[0] = '\0'; + AddMessageFn = NULL; + SetAllUsers(FALSE); +} + +CInstall::~CInstall() +{ + CoUninitialize(); +} + +void CInstall::CleanUp(void) +{ + // delete all temporary files + if (m_fLogNew) + fclose(m_fLogNew); + m_fLogNew = NULL; + if (m_fLogOld) + fclose(m_fLogOld); + m_fLogOld = NULL; + + if (strlen(m_szRegistryNew)) + DeleteFile(m_szRegistryNew); + m_szRegistryNew[0] = '\0'; + + if (strlen(m_szRegistryOld)) + DeleteFile(m_szRegistryOld); + m_szRegistryOld[0] = '\0'; + + if (strlen(m_szShellNew)) + DeleteFile(m_szShellNew); + m_szShellNew[0] = '\0'; + + if (strlen(m_szShellOld)) + DeleteFile(m_szShellOld); + m_szShellOld[0] = '\0'; + + if (strlen(m_szFileNew)) + DeleteFile(m_szFileNew); + m_szFileNew[0] = '\0'; +} + + +void CInstall::SetMessageFunction(void(*fn)(const char *)) +{ + AddMessageFn = fn; +} + +void CInstall::AddMessage(const char *message) +{ + if (AddMessageFn) + (*AddMessageFn)(message); +} + +void CInstall::SetTargetDir(const char *szTargetDir) +{ + strcpy(m_szTargetDir, szTargetDir); + // remove trailing backslash + char *p; + p = m_szTargetDir + strlen(m_szTargetDir) - 1; + if (*p == '\\') + *p = '\0'; +} + +void CInstall::SetTargetGroup(const char *szTargetGroup) +{ + strcpy(m_szTargetGroup, szTargetGroup); + // remove trailing backslash + char *p; + p = m_szTargetGroup + strlen(m_szTargetGroup) - 1; + if (*p == '\\') + *p = '\0'; +} + +const char *CInstall::GetMainDir() +{ + return m_szMainDir; +} + +const char *CInstall::GetUninstallName() +{ + return m_szUninstallName; +} + +BOOL CInstall::Init(const char *szSourceDir, const char *szFileList) +{ + FILE *f; + + strcpy(m_szSourceDir, szSourceDir); + // remove trailing backslash + char *p; + p = m_szSourceDir + strlen(m_szSourceDir) - 1; + if (*p == '\\') + *p = '\0'; + strcpy(m_szFileList, szFileList); + + m_szRegistryNew[0] = m_szRegistryOld[0] = + m_szShellNew[0] = m_szShellOld[0] = + m_szFileNew[0] = '\0'; + + // Open list of files + SetCurrentDirectory(m_szSourceDir); + f = fopen(m_szFileList, "r"); + if (f == (FILE *)NULL) { + char buf[MAXSTR]; + wsprintf(buf, "Failed to open \042%s\042\n", m_szFileList); + AddMessage(buf); + return FALSE; + } + + // get application and directory name + m_szUninstallName[0] = '\0'; + if (!fgets(m_szUninstallName, sizeof(m_szUninstallName), f)) { + AddMessage("Invalid file list\n"); + fclose(f); + return FALSE; + } + if (*m_szUninstallName ) + m_szUninstallName[strlen(m_szUninstallName)-1] = '\0'; + + m_szMainDir[0] = '\0'; + if (!fgets(m_szMainDir, sizeof(m_szMainDir), f)) { + AddMessage("Invalid file list\n"); + fclose(f); + return FALSE; + } + if (*m_szMainDir ) + m_szMainDir[strlen(m_szMainDir)-1] = '\0'; + fclose(f); + + // Create log directory + strcpy(m_szLogDir, m_szTargetDir); + strcat(m_szLogDir, "\\"); + strcat(m_szLogDir, m_szMainDir); + MakeDir(m_szLogDir); + + return TRUE; +} + + +////////////////////////////////////////// +// File installation methods + +BOOL CInstall::InstallFiles(BOOL bNoCopy, BOOL *pbQuit) +{ + char szLogNew[MAXSTR]; + + AddMessage(bNoCopy ? "Checking" : "Copying"); + AddMessage(" files listed in "); + AddMessage(m_szFileList); + AddMessage("\n"); + + // Open list of files + SetCurrentDirectory(m_szSourceDir); + FILE *f = fopen(m_szFileList, "r"); + if (f == (FILE *)NULL) { + AddMessage("Failed to open \042"); + AddMessage(m_szFileList); + AddMessage("\042\n"); + return FALSE; + } + + // skip application and directory name + fgets(szLogNew, sizeof(szLogNew), f); + fgets(szLogNew, sizeof(szLogNew), f); + + // Create target log + + m_fLogNew = MakeTemp(m_szFileNew); + if (!m_fLogNew) { + AddMessage("Failed to create FileNew temporary file\n"); + return FALSE; + } + + // Copy files + char line[MAXSTR]; + while (fgets(line, sizeof(line), f) != (char *)NULL) { + if (*pbQuit) + return FALSE; + if (*line) + line[strlen(line)-1] = '\0'; + if (!InstallFile(line, bNoCopy)) { + fclose(f); + fclose(m_fLogNew); + return FALSE; + } + } + fclose(f); + fclose(m_fLogNew); + m_fLogNew = NULL; + return TRUE; +} + + + +// recursive mkdir +// requires a full path to be specified, so ignores root \ +// apart from root \, must not contain trailing \ +// Examples: +// c:\ (OK, but useless) +// c:\gstools (OK) +// c:\gstools\ (incorrect) +// c:gstools (incorrect) +// gstools (incorrect) +// The following UNC names should work, +// but didn't under Win3.1 because gs_chdir wouldn't accept UNC names +// Needs to be tested under Windows 95. +// \\server\sharename\gstools (OK) +// \\server\sharename\ (OK, but useless) +// + +BOOL CInstall::MakeDir(const char *dirname) +{ + char newdir[MAXSTR]; + const char *p; + if (strlen(dirname) < 3) + return -1; + + if (isalpha(dirname[0]) && dirname[1]==':' && dirname[2]=='\\') { + // drive mapped path + p = dirname+3; + } + else if (dirname[1]=='\\' && dirname[1]=='\\') { + // UNC path + p = strchr(dirname+2, '\\'); // skip servername + if (p == NULL) + return -1; + p++; + p = strchr(p, '\\'); // skip sharename + if (p == NULL) + return -1; + } + else { + // not full path so error + return -1; + } + + while (1) { + strncpy(newdir, dirname, (int)(p-dirname)); + newdir[(int)(p-dirname)] = '\0'; + if (chdir(newdir)) { + if (mkdir(newdir)) + return -1; + } + p++; + if (p >= dirname + strlen(dirname)) + break; // all done + p = strchr(p, '\\'); + if (p == NULL) + p = dirname + strlen(dirname); + } + + return SetCurrentDirectory(dirname); +} + +BOOL CInstall::InstallFile(char *filename, BOOL bNoCopy) +{ + char existing_name[MAXSTR]; + char new_name[MAXSTR]; + char dir_name[MAXSTR]; + + strcpy(existing_name, m_szSourceDir); + strcat(existing_name, "\\"); + strcat(existing_name, filename); + strcpy(new_name, m_szTargetDir); + strcat(new_name, "\\"); + strcat(new_name, filename); + strcpy(dir_name, new_name); + char *p = strrchr(dir_name, '\\'); + if (p) { + *p = '\0'; + if (!MakeDir(dir_name)) { + AddMessage("Failed to make directory "); + AddMessage(dir_name); + AddMessage("\n"); + return FALSE; + } + } + AddMessage(" "); + AddMessage(new_name); + AddMessage("\n"); + + if (bNoCopy) { + // Don't copy files. Leave them where they are. + // Check that all files exist + FILE *f; + if ((f = fopen(existing_name, "r")) == (FILE *)NULL) { + AddMessage("Missing file "); + AddMessage(existing_name); + AddMessage("\n"); + return FALSE; + } + fclose(f); + } + else if (!CopyFile(existing_name, new_name, FALSE)) { + char message[MAXSTR+MAXSTR+100]; + wsprintf(message, "Failed to copy file %s to %s\n", + existing_name, new_name); + AddMessage(message); + return FALSE; + } + + fputs(new_name, m_fLogNew); + fputs("\n", m_fLogNew); + + return TRUE; +} + +////////////////////////////////////////// +// Shell methods + +BOOL CInstall::StartMenuBegin() +{ + m_fLogNew = MakeTemp(m_szShellNew); + if (!m_fLogNew) { + AddMessage("Failed to create ShellNew temporary file\n"); + return FALSE; + } + + m_fLogOld = MakeTemp(m_szShellOld); + if (!m_fLogOld) { + AddMessage("Failed to create ShellNew temporary file\n"); + return FALSE; + } + + // make folder if needed + char szLink[MAXSTR]; + strcpy(szLink, m_szPrograms); + strcat(szLink, "\\"); + strcat(szLink, m_szTargetGroup); + if (chdir(szLink) != 0) { + if (mkdir(szLink) != 0) { + char buf[MAXSTR+64]; + wsprintf(buf, "Couldn't make Programs folder \042%s'042", szLink); + AddMessage(buf); + StartMenuEnd(); + return FALSE; + } + } + else { + fprintf(m_fLogOld, "Group=%s\n\n", szLink); + } + fprintf(m_fLogNew, "Group=%s\n\n", szLink); + + return TRUE; +} + +BOOL CInstall::StartMenuEnd() +{ + if (m_fLogOld) + fclose(m_fLogOld); + m_fLogOld = NULL; + if (m_fLogNew) + fclose(m_fLogNew); + m_fLogNew = NULL; + return TRUE; +} + +BOOL CInstall::StartMenuAdd(const char *szDescription, + const char *szProgram, const char *szArguments) +{ + if (!CreateShellLink(szDescription, szProgram, szArguments)) { + AddMessage("Couldn't make shell link for "); + AddMessage(szDescription); + AddMessage("\n"); + StartMenuEnd(); + return FALSE; + } + + return TRUE; +} + + +BOOL CInstall::CreateShellLink(LPCSTR description, LPCSTR program, + LPCSTR arguments, LPCSTR icon, int nIconIndex) +{ + HRESULT hres; + IShellLink* psl; + CHAR szLink[MAXSTR]; + strcpy(szLink, m_szPrograms); + strcat(szLink, "\\"); + strcat(szLink, m_szTargetGroup); + strcat(szLink, "\\"); + strcat(szLink, description); + strcat(szLink, ".LNK"); + AddMessage("Adding shell link\n "); + AddMessage(szLink); + AddMessage("\n"); + + // Ensure string is UNICODE. + WCHAR wsz[MAX_PATH]; + MultiByteToWideChar(CP_ACP, 0, szLink, -1, wsz, MAX_PATH); + + // Save old shell link + + // Get a pointer to the IShellLink interface. + hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, + IID_IShellLink, (void **)&psl); + if (SUCCEEDED(hres)) { + IPersistFile* ppf; + // Query IShellLink for the IPersistFile interface. + hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf); + if (SUCCEEDED(hres)) { + // Load the shell link. + hres = ppf->Load(wsz, STGM_READ); + if (SUCCEEDED(hres)) { + // Resolve the link. + hres = psl->Resolve(HWND_DESKTOP, SLR_ANY_MATCH); + if (SUCCEEDED(hres)) { + // found it, so save details + CHAR szTemp[MAXSTR]; + WIN32_FIND_DATA wfd; + int i; + + + fprintf(m_fLogOld, "Name=%s\n", szLink); + hres = psl->GetPath(szTemp, MAXSTR, (WIN32_FIND_DATA *)&wfd, + SLGP_SHORTPATH ); + if (SUCCEEDED(hres)) + fprintf(m_fLogOld, "Path=%s\n", szTemp); + hres = psl->GetDescription(szTemp, MAXSTR); + if (SUCCEEDED(hres)) + fprintf(m_fLogOld, "Description=%s\n", szTemp); + hres = psl->GetArguments(szTemp, MAXSTR); + if (SUCCEEDED(hres) && (szTemp[0] != '\0')) + fprintf(m_fLogOld, "Arguments=%s\n", szTemp); + hres = psl->GetWorkingDirectory(szTemp, MAXSTR); + if (SUCCEEDED(hres) && (szTemp[0] != '\0')) + fprintf(m_fLogOld, "Directory=%s\n", szTemp); + hres = psl->GetIconLocation(szTemp, MAXSTR, &i); + if (SUCCEEDED(hres) && (szTemp[0] != '\0')) { + fprintf(m_fLogOld, "IconLocation=%s\n", szTemp); + fprintf(m_fLogOld, "IconIndex=%d\n", i); + } + fprintf(m_fLogOld, "\n"); + } + } + // Release pointer to IPersistFile. + ppf->Release(); + } + // Release pointer to IShellLink. + psl->Release(); + } + + + // Save new shell link + + // Get a pointer to the IShellLink interface. + hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, + IID_IShellLink, (void **)&psl); + if (SUCCEEDED(hres)) { + IPersistFile* ppf; + // Query IShellLink for the IPersistFile interface for + // saving the shell link in persistent storage. + hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf); + if (SUCCEEDED(hres)) { + fprintf(m_fLogNew, "Name=%s\n", szLink); + + // Set the path to the shell link target. + hres = psl->SetPath(program); + if (!SUCCEEDED(hres)) + AddMessage("SetPath failed!"); + fprintf(m_fLogNew, "Path=%s\n", program); + // Set the description of the shell link. + hres = psl->SetDescription(description); + if (!SUCCEEDED(hres)) + AddMessage("SetDescription failed!"); + fprintf(m_fLogNew, "Description=%s\n", description); + if (arguments != (LPCSTR)NULL) { + // Set the arguments of the shell link target. + hres = psl->SetArguments(arguments); + if (!SUCCEEDED(hres)) + AddMessage("SetArguments failed!"); + fprintf(m_fLogNew, "Arguments=%s\n", arguments); + } + if (icon != (LPCSTR)NULL) { + // Set the arguments of the shell link target. + hres = psl->SetIconLocation(icon, nIconIndex); + if (!SUCCEEDED(hres)) + AddMessage("SetIconLocation failed!"); + fprintf(m_fLogNew, "IconLocation=%s\n", icon); + fprintf(m_fLogNew, "IconIndex=%d\n", nIconIndex); + } + + // Save the link via the IPersistFile::Save method. + hres = ppf->Save(wsz, TRUE); + // Release pointer to IPersistFile. + ppf->Release(); + } + // Release pointer to IShellLink. + psl->Release(); + fprintf(m_fLogNew, "\n"); + } + + return (hres == 0); +} + + +////////////////////////////////////////// +// Registry methods + +void +reg_quote(char *d, const char *s) +{ + while (*s) { + if (*s == '\\') + *d++ = '\\'; + *d++ = *s++; + } + *d = *s; +} + +BOOL CInstall::UpdateRegistryBegin() +{ + const char regheader[]="REGEDIT4\n"; + m_fLogNew = MakeTemp(m_szRegistryNew); + if (!m_fLogNew) { + AddMessage("Failed to create RegistryNew temporary file\n"); + return FALSE; + } + fputs(regheader, m_fLogNew); + + m_fLogOld = MakeTemp(m_szRegistryOld); + if (!m_fLogOld) { + AddMessage("Failed to create RegistryOld temporary file\n"); + UpdateRegistryEnd(); + return FALSE; + } + fputs(regheader, m_fLogOld); + + return TRUE; +} + +BOOL CInstall::UpdateRegistryEnd() +{ + if (m_fLogNew) + fclose(m_fLogNew); + m_fLogNew = NULL; + if (m_fLogOld) + fclose(m_fLogOld); + m_fLogOld = NULL; + return TRUE; +} + +BOOL CInstall::UpdateRegistryKey(const char *product, const char *version) +{ + const char hkey_name[] = "HKEY_LOCAL_MACHINE"; + const HKEY hkey_key = HKEY_LOCAL_MACHINE; + const char key_format[] = "\n[%s\\%s]\n"; + + /* Create default registry entries */ + HKEY hkey; + LONG lrc; + char name[MAXSTR]; + + // Create/Open application key + sprintf(name, "SOFTWARE\\%s", product); + lrc = RegOpenKey(hkey_key, name, &hkey); + if (lrc == ERROR_SUCCESS) { + fprintf(m_fLogOld, key_format, hkey_name, name); + } + else { + lrc = RegCreateKey(hkey_key, name, &hkey); + if (lrc == ERROR_SUCCESS) + fprintf(m_fLogNew, key_format, hkey_name, name); + } + if (lrc == ERROR_SUCCESS) + RegCloseKey(hkey); + + // Create/Open application version key + sprintf(name, "SOFTWARE\\%s\\%s", product, version); + + AddMessage(" "); + AddMessage(hkey_name); + AddMessage("\\"); + AddMessage(name); + AddMessage("\n"); + lrc = RegOpenKey(hkey_key, name, &hkey); + if (lrc == ERROR_SUCCESS) + fprintf(m_fLogOld, key_format, hkey_name, name); + else + lrc = RegCreateKey(hkey_key, name, &hkey); + if (lrc == ERROR_SUCCESS) { + fprintf(m_fLogNew, key_format, hkey_name, name); + } + else { + UpdateRegistryEnd(); + } + return TRUE; +} + +BOOL CInstall::UpdateRegistryValue(const char *product, const char *version, + const char *name, const char *value) +{ + char appver[MAXSTR]; + BOOL flag = FALSE; + HKEY hkey; + // Open application/version key + sprintf(appver, "SOFTWARE\\%s\\%s", product, version); + + if (RegOpenKey(HKEY_LOCAL_MACHINE, appver, &hkey) + == ERROR_SUCCESS) { + flag = SetRegistryValue(hkey, name, value); + RegCloseKey(hkey); + } + + return flag; +} + +BOOL CInstall::SetRegistryValue(HKEY hkey, const char *value_name, const char *value) +{ + char buf[MAXSTR]; + char qbuf[MAXSTR]; + DWORD cbData; + DWORD keytype; + + cbData = sizeof(buf); + keytype = REG_SZ; + if (RegQueryValueEx(hkey, value_name, 0, &keytype, + (LPBYTE)buf, &cbData) == ERROR_SUCCESS) { + reg_quote(qbuf, buf); + fprintf(m_fLogOld, "\042%s\042=\042%s\042\n", value_name, qbuf); + } + reg_quote(qbuf, value); + fprintf(m_fLogNew, "\042%s\042=\042%s\042\n", value_name, qbuf); + AddMessage(" "); + AddMessage(value_name); + AddMessage("="); + AddMessage(value); + AddMessage("\n"); + if (RegSetValueEx(hkey, value_name, 0, REG_SZ, + (CONST BYTE *)value, strlen(value)+1) != ERROR_SUCCESS) + return FALSE; + return TRUE; +} + +//////////////////////////////////// +// Uninstall + + +BOOL CInstall::WriteUninstall(const char *szProg, BOOL bNoCopy) +{ + LONG rc; + HKEY hkey; + HKEY hsubkey; + char buffer[MAXSTR]; + char ungsprog[MAXSTR]; + + lstrcpy(ungsprog, m_szTargetDir); + lstrcat(ungsprog, "\\"); + lstrcat(ungsprog, szProg); + + lstrcpy(buffer, m_szSourceDir); + lstrcat(buffer, "\\"); + lstrcat(buffer, szProg); + + if (bNoCopy) { + // Don't copy files. Leave them where they are. + // Check that all files exist + FILE *f; + if ((f = fopen(buffer, "r")) == (FILE *)NULL) { + AddMessage("Missing file "); + AddMessage(buffer); + AddMessage("\n"); + return FALSE; + } + fclose(f); + } + else if (!CopyFile(buffer, ungsprog, FALSE)) { + char message[MAXSTR+MAXSTR+100]; + wsprintf(message, "Failed to copy file %s to %s", buffer, ungsprog); + AddMessage(message); + return FALSE; + } + + /* write registry entries for uninstall */ + if ((rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, UNINSTALLKEY, 0, + KEY_ALL_ACCESS, &hkey)) != ERROR_SUCCESS) { + /* failed to open key, so try to create it */ + rc = RegCreateKey(HKEY_LOCAL_MACHINE, UNINSTALLKEY, &hkey); + } + if (rc == ERROR_SUCCESS) { + // Uninstall key for program + if (RegCreateKey(hkey, m_szUninstallName, &hsubkey) == ERROR_SUCCESS) { + RegSetValueEx(hsubkey, DISPLAYNAMEKEY, 0, REG_SZ, + (CONST BYTE *)m_szUninstallName, lstrlen(m_szUninstallName)+1); + lstrcpy(buffer, ungsprog); + lstrcat(buffer, " \042"); + lstrcat(buffer, m_szTargetDir); + lstrcat(buffer, "\\"); + lstrcat(buffer, m_szMainDir); + lstrcat(buffer, "\\"); + lstrcat(buffer, UNINSTALL_FILE); + lstrcat(buffer, "\042"); + AddMessage(" "); + AddMessage(m_szUninstallName); + AddMessage("="); + AddMessage(buffer); + AddMessage("\n"); + RegSetValueEx(hsubkey, UNINSTALLSTRINGKEY, 0, REG_SZ, + (CONST BYTE *)buffer, lstrlen(buffer)+1); + RegCloseKey(hsubkey); + } + + RegCloseKey(hkey); + } + return TRUE; +} + + +void +CInstall::CopyFileContents(FILE *df, FILE *sf) +{ + char buf[MAXSTR]; + int count; + while ((count = fread(buf, 1, sizeof(buf), sf)) != 0) + fwrite(buf, 1, count, df); +} + +FILE *CInstall::MakeTemp(char *fname) +{ + char *temp; + if ( (temp = getenv("TEMP")) == NULL ) + strcpy(fname, m_szTargetDir); + else + strcpy(fname, temp); + + /* Prevent X's in path from being converted by mktemp. */ + for ( temp = fname; *temp; temp++ ) { + *temp = (char)tolower(*temp); + if (*temp == '/') + *temp = '\\'; + } + if ( strlen(fname) && (fname[strlen(fname)-1] != '\\') ) + strcat(fname, "\\"); + + strcat(fname, "gsXXXXXX"); + mktemp(fname); + AddMessage("Creating temporary file "); + AddMessage(fname); + AddMessage("\n"); + return fopen(fname, "w"); +} + +BOOL CInstall::MakeLog() +{ + FILE *f, *lf; + char szFileName[MAXSTR]; + char szLogDir[MAXSTR]; + strcpy(szLogDir, m_szTargetDir); + strcat(szLogDir, "\\"); + strcat(szLogDir, m_szMainDir); + strcat(szLogDir, "\\"); + + strcpy(szFileName, szLogDir); + strcat(szFileName, UNINSTALL_FILE); + lf = fopen(szFileName, "w"); + if (lf == (FILE *)NULL) { + AddMessage("Can't create uninstall log"); + return FALSE; + } + fputs(szSection, lf); + fputs("UninstallName\n", lf); + fputs(m_szUninstallName, lf); + fputs("\n\n", lf); + + + if (strlen(m_szRegistryNew) && + (f = fopen(m_szRegistryNew, "r")) != (FILE *)NULL) { + fputs(szSection, lf); + fputs("RegistryNew\n", lf); + CopyFileContents(lf, f); + fputs("\n", lf); + fclose(f); + DeleteFile(m_szRegistryNew); + m_szRegistryNew[0] = '\0'; + } + + if (strlen(m_szRegistryOld) && + (f = fopen(m_szRegistryOld, "r")) != (FILE *)NULL) { + fputs(szSection, lf); + fputs("RegistryOld\n", lf); + CopyFileContents(lf, f); + fputs("\n", lf); + fclose(f); + DeleteFile(m_szRegistryOld); + m_szRegistryOld[0] = '\0'; + } + + if (strlen(m_szShellNew) && + (f = fopen(m_szShellNew, "r")) != (FILE *)NULL) { + fputs(szSection, lf); + fputs("ShellNew\n", lf); + CopyFileContents(lf, f); + fputs("\n", lf); + fclose(f); + DeleteFile(m_szShellNew); + m_szShellNew[0] = '\0'; + } + + if (strlen(m_szShellOld) && + (f = fopen(m_szShellOld, "r")) != (FILE *)NULL) { + fputs(szSection, lf); + fputs("ShellOld\n", lf); + CopyFileContents(lf, f); + fputs("\n", lf); + fclose(f); + DeleteFile(m_szShellOld); + m_szShellOld[0] = '\0'; + } + + if (strlen(m_szFileNew) && + (f = fopen(m_szFileNew, "r")) != (FILE *)NULL) { + fputs(szSection, lf); + fputs("FileNew\n", lf); + CopyFileContents(lf, f); + fputs("\n", lf); + fclose(f); + DeleteFile(m_szFileNew); + m_szFileNew[0] = '\0'; + } + + fputs(szSection, lf); + fclose(lf); + + return TRUE; +} + +BOOL CInstall::GetPrograms(BOOL bUseCommon, char *buf, int buflen) +{ + // Get the directory for the Program menu. This is + // stored in the Registry under HKEY_CURRENT_USER\Software\ + // Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Programs. + LONG rc; + HKEY hCU; + DWORD dwType; + ULONG ulSize = buflen; + HKEY hrkey = HKEY_CURRENT_USER; + if (bUseCommon) + hrkey = HKEY_LOCAL_MACHINE; + if (RegOpenKeyEx(hrkey, + "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", + 0,KEY_QUERY_VALUE, + &hCU) == ERROR_SUCCESS) { + rc = RegQueryValueEx( hCU, + bUseCommon ? "Common Programs" : "Programs", + NULL, + &dwType, + (unsigned char *)buf, + &ulSize); + RegCloseKey(hCU); + return TRUE; + } + return FALSE; + +#ifdef NOTUSED + // This is an alternate version, but it needs + // Internet Explorer 4.0 with Web Integrated Desktop. + // It does not work with the standard + // Windows 95, Windows NT 4.0, Internet Explorer 3.0, + // and Internet Explorer 4.0 without Web Integrated Desktop. + + HRESULT rc; + m_szPrograms[0] = '\0'; + int nFolder = CSIDL_PROGRAMS; + if (bUseCommon) + nFolder = CSIDL_COMMON_PROGRAMS; + + rc = SHGetSpecialFolderPath(HWND_DESKTOP, m_szPrograms, + nFolder, FALSE); + return (rc == NOERROR); +#endif + +} + +BOOL CInstall::SetAllUsers(BOOL bUseCommon) +{ + m_bUseCommon = bUseCommon; + return GetPrograms(bUseCommon, m_szPrograms, sizeof(m_szPrograms)); +} + + +////////////////////////////////////////////////////////////////////// diff --git a/gs/src/dwinst.h b/gs/src/dwinst.h new file mode 100644 index 000000000..861e2d278 --- /dev/null +++ b/gs/src/dwinst.h @@ -0,0 +1,113 @@ +/* Copyright (C) 1999, Ghostgum Software Pty Ltd. All rights reserved. + + This file is part of Aladdin Ghostscript. + + This program is distributed with NO WARRANTY OF ANY KIND. No author + or distributor accepts any responsibility for the consequences of using it, + or for whether it serves any particular purpose or works at all, unless he + or she says so in writing. Refer to the Aladdin Ghostscript Free Public + License (the "License") for full details. + + Every copy of Aladdin Ghostscript must include a copy of the License, + normally in a plain ASCII text file named PUBLIC. The License grants you + the right to copy, modify and redistribute Aladdin Ghostscript, but only + under certain conditions described in the License. Among other things, the + License requires that the copyright notice and this notice be preserved on + all copies. +*/ + +// $RCSfile$ $Revision$ + +// Definitions for Ghostscript installer + +#ifndef MAXSTR +#ifdef MAX_PATH +#define MAXSTR MAX_PATH +#else +#define MAXSTR 256 +#endif +#endif + +class CInstall +{ +public: + CInstall(); + virtual ~CInstall(); + void SetMessageFunction(void(*fn)(const char *)); + void AddMessage(const char *message); + const char *GetMainDir(); + const char *GetUninstallName(); + BOOL GetPrograms(BOOL bUseCommon, char *buf, int buflen); + BOOL Init(const char *szSourceDir, const char *szFileList); + BOOL InstallFiles(BOOL bNoCopy, BOOL *pbQuit); + BOOL InstallFile(char *filename, BOOL bNoCopy); + BOOL MakeDir(const char *dirname); + FILE * MakeTemp(char *name); + + BOOL SetAllUsers(BOOL bUseCommon); + void SetTargetDir(const char *szTargetDir); + void SetTargetGroup(const char *szTargetGroup); + + BOOL StartMenuBegin(); + BOOL StartMenuEnd(); + BOOL StartMenuAdd(const char *szDescription, const char *szProgram, const char *szArguments); + + BOOL UpdateRegistryBegin(); + BOOL UpdateRegistryKey(const char *product, const char *version); + BOOL UpdateRegistryValue(const char *product, const char *version, const char *name, const char *value); + BOOL UpdateRegistryEnd(); + + BOOL WriteUninstall(const char *prog, BOOL bNoCopy); + BOOL MakeLog(void); + + void CleanUp(void); + +private: + BOOL m_bNoCopy; + BOOL m_bUseCommon; + BOOL m_bQuit; + + // Source directory + char m_szSourceDir[MAXSTR]; + + // File containing list of files to install + char m_szFileList[MAXSTR]; + + // Target directory for program and fonts. + char m_szTargetDir[MAXSTR]; + + // Target Group for shortcut + char m_szTargetGroup[MAXSTR]; + + // Directory where the Start Menu is located. + char m_szPrograms[MAXSTR]; + + // Name used for uninstall + char m_szUninstallName[MAXSTR]; + + // Main directory prefix, where log files should be written + char m_szMainDir[MAXSTR]; + + // Full directory where log files should be written + char m_szLogDir[MAXSTR]; + + // Temporary log files for uninstall + char m_szFileNew[MAXSTR]; + char m_szRegistryNew[MAXSTR]; + char m_szRegistryOld[MAXSTR]; + char m_szShellNew[MAXSTR]; + char m_szShellOld[MAXSTR]; + + // Log files + FILE * m_fLogNew; + FILE * m_fLogOld; + + + BOOL SetRegistryValue(HKEY hkey, const char *value_name, const char *value); + BOOL CreateShellLink(LPCSTR description, LPCSTR program, LPCSTR arguments, LPCSTR icon = NULL, int nIconIndex = 0); + void CopyFileContents(FILE *df, FILE *sf); + + void(*AddMessageFn)(const char *); + +}; + diff --git a/gs/src/dwmain.cpp b/gs/src/dwmain.cpp index 84f675c3f..f40ea726f 100644 --- a/gs/src/dwmain.cpp +++ b/gs/src/dwmain.cpp @@ -17,7 +17,7 @@ */ - +// $RCSfile$ $Revision$ // Ghostscript DLL loader for Windows #define STRICT diff --git a/gs/src/dwmain.h b/gs/src/dwmain.h index a150d05af..d43dd85e8 100644 --- a/gs/src/dwmain.h +++ b/gs/src/dwmain.h @@ -1,4 +1,24 @@ +/* Copyright (C) 1999, Ghostgum Software Pty Ltd. All rights reserved. + + This file is part of Aladdin Ghostscript. + + This program is distributed with NO WARRANTY OF ANY KIND. No author + or distributor accepts any responsibility for the consequences of using it, + or for whether it serves any particular purpose or works at all, unless he + or she says so in writing. Refer to the Aladdin Ghostscript Free Public + License (the "License") for full details. + + Every copy of Aladdin Ghostscript must include a copy of the License, + normally in a plain ASCII text file named PUBLIC. The License grants you + the right to copy, modify and redistribute Aladdin Ghostscript, but only + under certain conditions described in the License. Among other things, the + License requires that the copyright notice and this notice be preserved on + all copies. +*/ +// $RCSfile$ $Revision$ + +// Icon index definitions -- why are these here?? #define GSTEXT_ICON 50 #define GSIMAGE_ICON 51 diff --git a/gs/src/dwmain.rc b/gs/src/dwmain.rc index 4fa119ca4..2793b9aed 100644 --- a/gs/src/dwmain.rc +++ b/gs/src/dwmain.rc @@ -17,7 +17,7 @@ */ - +/*$RCSfile$ $Revision$*/ #include <windows.h> #include "dwmain.h" diff --git a/gs/src/dwmainc.cpp b/gs/src/dwmainc.cpp index 321c080c9..f510fee24 100644 --- a/gs/src/dwmainc.cpp +++ b/gs/src/dwmainc.cpp @@ -17,7 +17,7 @@ */ - +// $RCSfile$ $Revision$ // Ghostscript DLL loader for Windows 95/NT // For WINDOWCOMPAT (console mode) application diff --git a/gs/src/dwnodll.cpp b/gs/src/dwnodll.cpp index 72e3e1428..0ceef0f55 100644 --- a/gs/src/dwnodll.cpp +++ b/gs/src/dwnodll.cpp @@ -17,7 +17,7 @@ */ - +// $RCSfile$ $Revision$ // gsdll class for MS-Windows diff --git a/gs/src/dwsetup.cpp b/gs/src/dwsetup.cpp new file mode 100644 index 000000000..b9391a60b --- /dev/null +++ b/gs/src/dwsetup.cpp @@ -0,0 +1,1036 @@ +/* Copyright (C) 1999, Ghostgum Software Pty Ltd. All rights reserved. + + This file is part of Aladdin Ghostscript. + + This program is distributed with NO WARRANTY OF ANY KIND. No author + or distributor accepts any responsibility for the consequences of using it, + or for whether it serves any particular purpose or works at all, unless he + or she says so in writing. Refer to the Aladdin Ghostscript Free Public + License (the "License") for full details. + + Every copy of Aladdin Ghostscript must include a copy of the License, + normally in a plain ASCII text file named PUBLIC. The License grants you + the right to copy, modify and redistribute Aladdin Ghostscript, but only + under certain conditions described in the License. Among other things, the + License requires that the copyright notice and this notice be preserved on + all copies. +*/ + +// $RCSfile$ $Revision$ +// +// +// This is the setup program for Win32 Aladdin Ghostscript +// +// The starting point is a self extracting zip archive +// with the following contents: +// setupgs.exe +// uninstgs.exe +// filelist.txt (contains list of program files) +// fontlist.txt (contains list of font files) +// gs#.##\* (files listed in filelist.txt) +// fonts\* (fonts listed in fontlist.txt) +// This is the same as the zip file created by Aladdin Enterprises, +// with the addition of setupgs.exe, uninstgs.exe, filelist.txt and +// fontlist.txt. +// +// The first line of the files filelist.txt and fontlist.txt +// contains the uninstall name to be used. +// The second line contains name of the main directory where +// uninstall log files are to be placed. +// Subsequent lines contain files to be copied (but not directories). +// For example, filelist.txt might contain: +// Aladdin Ghostscript 6.0 +// gs6.0 +// gs6.0\bin\gsdll32.dll +// gs6.0\lib\gs_init.ps +// The file fontlist.txt might contain: +// Aladdin Ghostscript Fonts +// fonts +// fonts\n019003l.pfb +// fonts\n019023l.pfb +// +// The default install directory is c:\Aladdin. +// The default Start Menu Folder is Aladdin. +// These are set in the resources. +// The setup program will create the following uninstall log files +// c:\Aladdin\gs#.##\uninstal.txt +// c:\Aladdin\fonts\uninstal.txt +// The uninstall program (accessed through control panel) will not +// remove directories nor will it remove itself. +// +// If the install directory is the same as the current file +// location, no files will be copied, but the existence of each file +// will be checked. This allows the archive to be unzipped, then +// configured in its current location. Running the uninstall will not +// remove uninstgs.exe, setupgs.exe, filelist.txt or fontlist.txt. + + +#define STRICT +#include <windows.h> +#include <shellapi.h> +#include <objbase.h> +#include <shlobj.h> +#include <stdio.h> +#include <direct.h> + +#ifdef MAX_PATH +#define MAXSTR MAX_PATH +#else +#define MAXSTR 256 +#endif + +#include "dwsetup.h" +#include "dwinst.h" + +//#define DEBUG + +#define UNINSTALLPROG "uninstgs.exe" + + +///////////////////////////////// +// Globals + +CInstall cinst; + +// TRUE = Place Start Menu items in All Users. +// FALSE = Current User +BOOL g_bUseCommon; + +// TRUE = Destination is the same as Source, so don't copy files. +BOOL g_bNoCopy; + +// Source directory, usually a temporary directory created by +// unzip self extractor. +CHAR g_szSourceDir[MAXSTR]; + +// Target directory for program and fonts. +// Default loaded from resources +CHAR g_szTargetDir[MAXSTR]; + +// Target Group for shortcut. +// Default loaded from resources +CHAR g_szTargetGroup[MAXSTR]; + +// Setup application name, loaded from resources +CHAR g_szAppName[MAXSTR]; + +BOOL g_bInstallFonts = TRUE; +BOOL g_bAllUsers = FALSE; + + +HWND g_hMain; // Main install dialog +HWND g_hWndText; // Install log dialog +HINSTANCE g_hInstance; + +// If a directory is listed on the command line, g_bBatch will +// be TRUE and a silent install will occur. +BOOL g_bBatch = FALSE; + +BOOL g_bQuit = FALSE; // TRUE = Get out of message loop. +BOOL g_bError = FALSE; // TRUE = Install was not successful +BOOL is_winnt = FALSE; // Disable "All Users" if not NT. + + +// Prototypes +BOOL CALLBACK MainDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); +void gs_addmess_count(const char *str, int count); +void gs_addmess(const char *str); +void gs_addmess_update(void); +BOOL init(); +BOOL install_all(); +BOOL install_prog(); +BOOL install_fonts(); +BOOL make_filelist(int argc, char *argv[]); + + +////////////////////////////////////////////////////////////////////// +// Entry point +////////////////////////////////////////////////////////////////////// + +int APIENTRY WinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPSTR lpCmdLine, + int nCmdShow) +{ + MSG msg; + g_hInstance = hInstance; + + if (!init()) { + MessageBox(HWND_DESKTOP, "Initialisation failed", + g_szAppName, MB_OK); + return 1; + } + + if (!g_bBatch) { + while (GetMessage(&msg, (HWND)NULL, 0, 0)) { + if (!IsDialogMessage(g_hWndText, &msg) && + !IsDialogMessage(g_hMain, &msg)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + DestroyWindow(g_hMain); + } + + return (g_bError ? 1 : 0); +} + + + + +////////////////////////////////////////////////////////////////////// +// Text log window +////////////////////////////////////////////////////////////////////// + + +#define TWLENGTH 32768 +#define TWSCROLL 1024 +char twbuf[TWLENGTH]; +int twend; + +// Modeless Dialog Box +BOOL CALLBACK +TextWinDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch(message) { + case WM_INITDIALOG: + EnableWindow(g_hMain, FALSE); + return TRUE; + case WM_COMMAND: + switch(LOWORD(wParam)) { + case IDC_TEXTWIN_COPY: + {HGLOBAL hglobal; + LPSTR p; + DWORD result; + int start, end; + result = SendDlgItemMessage(hwnd, IDC_TEXTWIN_MLE, EM_GETSEL, (WPARAM)0, (LPARAM)0); + start = LOWORD(result); + end = HIWORD(result); + if (start == end) { + start = 0; + end = twend; + } + hglobal = GlobalAlloc(GHND | GMEM_SHARE, end-start+1); + if (hglobal == (HGLOBAL)NULL) { + MessageBeep(-1); + return(FALSE); + } + p = (char *)GlobalLock(hglobal); + if (p == (LPSTR)NULL) { + MessageBeep(-1); + return(FALSE); + } + lstrcpyn(p, twbuf+start, end-start); + GlobalUnlock(hglobal); + OpenClipboard(hwnd); + EmptyClipboard(); + SetClipboardData(CF_TEXT, hglobal); + CloseClipboard(); + } + break; + case IDCANCEL: + g_bQuit = TRUE; + DestroyWindow(hwnd); + return TRUE; + } + break; + case WM_CLOSE: + DestroyWindow(hwnd); + return TRUE; + case WM_DESTROY: + g_bQuit = TRUE; + g_hWndText = (HWND)NULL; + EnableWindow(g_hMain, TRUE); + PostQuitMessage(0); + break; + } + return FALSE; +} + + + +// Add string to log window +void +gs_addmess_count(const char *str, int count) +{ + const char *s; + char *p; + int i, lfcount; + MSG msg; + + // we need to add \r after each \n, so count the \n's + lfcount = 0; + s = str; + for (i=0; i<count; i++) { + if (*s == '\n') + lfcount++; + s++; + } + + if (count + lfcount >= TWSCROLL) + return; // too large + if (count + lfcount + twend >= TWLENGTH-1) { + // scroll buffer + twend -= TWSCROLL; + memmove(twbuf, twbuf+TWSCROLL, twend); + } + p = twbuf+twend; + for (i=0; i<count; i++) { + if (*str == '\n') { + *p++ = '\r'; + } + *p++ = *str++; + } + twend += (count + lfcount); + *(twbuf+twend) = '\0'; + + + // Update the dialog box + if (g_bBatch) + return; + + gs_addmess_update(); + while (PeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE)) { + if (!IsDialogMessage(g_hWndText, &msg) && + !IsDialogMessage(g_hMain, &msg)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } +} + +void +gs_addmess(const char *str) +{ + gs_addmess_count(str, lstrlen(str)); + +} + + +void +gs_addmess_update(void) +{ + HWND hwndmess = g_hWndText; + + if (g_bBatch) + return; + + if (IsWindow(hwndmess)) { + HWND hwndtext = GetDlgItem(hwndmess, IDC_TEXTWIN_MLE); + DWORD linecount; + SendMessage(hwndtext, WM_SETREDRAW, FALSE, 0); + SetDlgItemText(hwndmess, IDC_TEXTWIN_MLE, twbuf); + linecount = SendDlgItemMessage(hwndmess, IDC_TEXTWIN_MLE, EM_GETLINECOUNT, (WPARAM)0, (LPARAM)0); + SendDlgItemMessage(hwndmess, IDC_TEXTWIN_MLE, EM_LINESCROLL, (WPARAM)0, (LPARAM)linecount-14); + SendMessage(hwndtext, WM_SETREDRAW, TRUE, 0); + InvalidateRect(hwndtext, (LPRECT)NULL, TRUE); + UpdateWindow(hwndtext); + } +} + + +////////////////////////////////////////////////////////////////////// +// Browse dialog box +////////////////////////////////////////////////////////////////////// + +// nasty GLOBALS +char szFolderName[MAXSTR]; +char szDirName[MAXSTR]; + +BOOL CALLBACK +DirDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + WORD notify_message; + + switch(message) { + case WM_INITDIALOG: + DlgDirList(hwnd, szDirName, IDC_FILES, IDC_FOLDER, + DDL_DRIVES | DDL_DIRECTORY); + SetDlgItemText(hwnd, IDC_TARGET, szFolderName); + return FALSE; + case WM_COMMAND: + notify_message = HIWORD(wParam); + switch (LOWORD(wParam)) { + case IDC_FILES: + if (notify_message == LBN_DBLCLK) { + CHAR szPath[MAXSTR]; + DlgDirSelectEx(hwnd, szPath, sizeof(szPath), IDC_FILES); + DlgDirList(hwnd, szPath, IDC_FILES, IDC_FOLDER, + DDL_DRIVES | DDL_DIRECTORY); + } + return FALSE; + case IDOK: + GetDlgItemText(hwnd, IDC_FOLDER, szDirName, sizeof(szDirName)); + GetDlgItemText(hwnd, IDC_TARGET, szFolderName, sizeof(szFolderName)); + EndDialog(hwnd, TRUE); + return TRUE; + case IDCANCEL: + EndDialog(hwnd, FALSE); + return TRUE; + } + return FALSE; + } + return FALSE; +} + + +////////////////////////////////////////////////////////////////////// +// Initialisation and Main dialog box +////////////////////////////////////////////////////////////////////// + +void +message_box(const char *str) +{ + MessageBox(HWND_DESKTOP, str, g_szAppName, MB_OK); +} + + +BOOL +init() +{ + DWORD dwVersion = GetVersion(); + // get source directory + GetCurrentDirectory(sizeof(g_szSourceDir), g_szSourceDir); + + // load strings + LoadString(g_hInstance, IDS_APPNAME, g_szAppName, sizeof(g_szAppName)); + LoadString(g_hInstance, IDS_TARGET_GROUP, + g_szTargetGroup, sizeof(g_szTargetGroup)); + + if (LOBYTE(LOWORD(dwVersion)) < 4) { + MessageBox(HWND_DESKTOP, + "This install program needs Windows 4.0 or later", + g_szAppName, MB_OK); + return FALSE; + } + if ( (HIWORD(dwVersion) & 0x8000) == 0) + is_winnt = TRUE; + + + cinst.SetMessageFunction(message_box); + +#define MAXCMDTOKENS 128 + + int argc; + LPSTR argv[MAXCMDTOKENS]; + LPSTR p; + char command[256]; + char *args; + char *d, *e; + + p = GetCommandLine(); + + argc = 0; + args = (char *)malloc(lstrlen(p)+1); + if (args == (char *)NULL) + return 1; + + // Parse command line handling quotes. + d = args; + while (*p) { + // for each argument + + if (argc >= MAXCMDTOKENS - 1) + break; + + e = d; + while ((*p) && (*p != ' ')) { + if (*p == '\042') { + // Remove quotes, skipping over embedded spaces. + // Doesn't handle embedded quotes. + p++; + while ((*p) && (*p != '\042')) + *d++ =*p++; + } + else + *d++ = *p; + if (*p) + p++; + } + *d++ = '\0'; + argv[argc++] = e; + + while ((*p) && (*p == ' ')) + p++; // Skip over trailing spaces + } + argv[argc] = NULL; + + if (strlen(argv[0]) == 0) { + GetModuleFileName(g_hInstance, command, sizeof(command)-1); + argv[0] = command; + } + + if (argc > 2) { + // Probably creating filelist.txt + return make_filelist(argc, argv); + } + + + // check if batch mode requested + // get location of target directory from command line as argv[1] + if (argc == 2) { + strncpy(g_szTargetDir, argv[1], sizeof(g_szTargetDir)); + g_bBatch = TRUE; + if (is_winnt) + cinst.SetAllUsers(TRUE); + } + if (g_bBatch) { + if (!install_all()) { + // display log showing error + g_bBatch = FALSE; + g_hWndText = CreateDialogParam(g_hInstance, + MAKEINTRESOURCE(IDD_TEXTWIN), + (HWND)HWND_DESKTOP, TextWinDlgProc, + (LPARAM)NULL); + gs_addmess_update(); + } + return TRUE; + } + + // Interactive setup + LoadString(g_hInstance, IDS_TARGET_DIR, + g_szTargetDir, sizeof(g_szTargetDir)); + + // main dialog box + g_hMain = CreateDialogParam(g_hInstance, MAKEINTRESOURCE(IDD_MAIN), (HWND)NULL, MainDlgProc, (LPARAM)NULL); + // centre dialog on screen + int width = GetSystemMetrics(SM_CXFULLSCREEN); + int height = GetSystemMetrics(SM_CYFULLSCREEN); + RECT rect; + GetWindowRect(g_hMain, &rect); + MoveWindow(g_hMain, (width - (rect.right - rect.left))/2, + (height - (rect.bottom - rect.top))/2, + (rect.right - rect.left), + (rect.bottom - rect.top), FALSE); + + // initialize targets + cinst.SetMessageFunction(message_box); + if (!cinst.Init(g_szSourceDir, "filelist.txt")) + return FALSE; + + SetDlgItemText(g_hMain, IDC_TARGET_DIR, g_szTargetDir); + SetDlgItemText(g_hMain, IDC_TARGET_GROUP, g_szTargetGroup); + SetDlgItemText(g_hMain, IDC_PRODUCT_NAME, cinst.GetUninstallName()); + SendDlgItemMessage(g_hMain, IDC_INSTALL_FONTS, BM_SETCHECK, BST_CHECKED, 0); + ShowWindow(g_hMain, SW_SHOWNORMAL); + + return (g_hMain != (HWND)NULL); /* success */ +} + + +// Main Modeless Dialog Box +BOOL CALLBACK +MainDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch(message) { + case WM_INITDIALOG: + EnableWindow(GetDlgItem(hwnd, IDC_ALLUSERS), is_winnt); + return TRUE; + case WM_COMMAND: + switch(LOWORD(wParam)) { + case IDC_README: + { + char buf[MAXSTR]; + sprintf(buf, "%s\\%s\\doc\\Readme.htm", g_szSourceDir, + cinst.GetMainDir()); + ShellExecute(hwnd, NULL, buf, NULL, g_szSourceDir, + SW_SHOWNORMAL); + } + return TRUE; + case IDC_BROWSE_DIR: + { char dir[MAXSTR]; + char *p; + GetDlgItemText(hwnd, IDC_TARGET_DIR, dir, sizeof(dir)); + strcpy(szDirName, dir); + if ( (p = strrchr(szDirName, '\\')) != (char *)NULL ) { + strcpy(szFolderName, p+1); + if (p == szDirName+2) + p++; // step over c:\ // + *p = '\0'; + } + else { + strcpy(szDirName, "c:\\"); + strcpy(szFolderName, dir); + } + if (DialogBox(g_hInstance, MAKEINTRESOURCE(IDD_DIRDLG), + hwnd, DirDlgProc)) { + strcpy(dir, szDirName); + if (strlen(dir) && (dir[strlen(dir)-1] != '\\')) + strcat(dir, "\\"); + strcat(dir, szFolderName); + SetDlgItemText(hwnd, IDC_TARGET_DIR, dir); + } + } + return TRUE; + case IDC_BROWSE_GROUP: + { char dir[MAXSTR]; + char programs[MAXSTR]; + char *p; + GetDlgItemText(hwnd, IDC_TARGET_GROUP, dir, sizeof(dir)); + cinst.GetPrograms( + SendDlgItemMessage(hwnd, IDC_ALLUSERS, + BM_GETCHECK, 0, 0) == BST_CHECKED, + programs, sizeof(programs)); + strcpy(szDirName, programs); + strcpy(szFolderName, dir); + if (DialogBox(g_hInstance, MAKEINTRESOURCE(IDD_DIRDLG), + hwnd, DirDlgProc)) { + strcpy(dir, szFolderName); + p = szDirName; + if (strnicmp(szDirName, programs, + strlen(programs)) == 0) { + p += strlen(programs); + if (*p == '\\') + p++; + strcpy(dir, p); + if (strlen(dir) && + (dir[strlen(dir)-1] != '\\')) + strcat(dir, "\\"); + strcat(dir, szFolderName); + } + SetDlgItemText(hwnd, IDC_TARGET_GROUP, dir); + } + } + return TRUE; + case IDCANCEL: + PostQuitMessage(0); + return TRUE; + case IDC_INSTALL: + GetDlgItemText(hwnd, IDC_TARGET_DIR, + g_szTargetDir, sizeof(g_szTargetDir)); + GetDlgItemText(hwnd, IDC_TARGET_GROUP, + g_szTargetGroup, sizeof(g_szTargetGroup)); + g_bInstallFonts = (SendDlgItemMessage(g_hMain, + IDC_INSTALL_FONTS, BM_GETCHECK, 0, 0) + == BST_CHECKED); + g_bAllUsers = (SendDlgItemMessage(hwnd, + IDC_ALLUSERS, BM_GETCHECK, 0, 0 + ) == BST_CHECKED); + + // install log dialog box + g_hWndText = CreateDialogParam(g_hInstance, + MAKEINTRESOURCE(IDD_TEXTWIN), + (HWND)hwnd, TextWinDlgProc, (LPARAM)NULL); + EnableWindow(GetDlgItem(hwnd, IDC_INSTALL), FALSE); + if (install_all()) + PostQuitMessage(0); + return TRUE; + default: + return(FALSE); + } + case WM_CLOSE: + PostQuitMessage(0); + return TRUE; + } + return FALSE; +} + +// install program and files +BOOL +install_all() +{ + gs_addmess("Source Directory="); + gs_addmess(g_szSourceDir); + gs_addmess("\n"); + gs_addmess("Target Directory="); + gs_addmess(g_szTargetDir); + gs_addmess("\n"); + gs_addmess("Target Shell Folder="); + gs_addmess(g_szTargetGroup); + gs_addmess("\n"); + gs_addmess(g_bAllUsers ? " All users\n" : " Current user\n"); + + if (stricmp(g_szSourceDir, g_szTargetDir) == 0) { + // Don't copy files + if (!g_bBatch) + if (::MessageBox(g_hWndText, "Install location is the same as the current file location. No files will be copied.", g_szAppName, MB_OKCANCEL) + != IDOK) { + return FALSE; + } + g_bNoCopy = TRUE; + } + + + if (g_bQuit) + return FALSE; + + if (!install_prog()) { + cinst.CleanUp(); + g_bError = TRUE; + return FALSE; + } + if (g_bInstallFonts && !install_fonts()) { + cinst.CleanUp(); + g_bError = TRUE; + return FALSE; + } + + gs_addmess("Install successful\n"); + +#ifdef DEBUG + return FALSE; +#endif + + return TRUE; +} + +BOOL +install_prog() +{ + char *regkey1 = "Aladdin Ghostscript"; + char regkey2[16]; + char szDLL[MAXSTR]; + char szLIB[MAXSTR]; + char szProgram[MAXSTR]; + char szArguments[MAXSTR]; + char szDescription[MAXSTR]; + + if (g_bQuit) + return FALSE; + + cinst.SetMessageFunction(gs_addmess); + cinst.SetTargetDir(g_szTargetDir); + cinst.SetTargetGroup(g_szTargetGroup); + cinst.SetAllUsers(g_bAllUsers); + if (!cinst.Init(g_szSourceDir, "filelist.txt")) + return FALSE; + + // Get GS version number + gs_addmess("Installing Program...\n"); + int nGSversion = 0; + const char *p = cinst.GetMainDir(); + while (*p && !isdigit(*p)) // skip over "gs" prefix + p++; + if (strlen(p) == 4) + nGSversion = (p[0]-'0')*100 + (p[2]-'0')*10 + (p[3]-'0'); + else if (strlen(p) == 3) + nGSversion = (p[0]-'0')*100 + (p[2]-'0')*10; + sprintf(regkey2, "%d.%d", nGSversion / 100, nGSversion % 100); + + // copy files + if (!cinst.InstallFiles(g_bNoCopy, &g_bQuit)) { + gs_addmess("Program install failed\n"); + return FALSE; + } + + if (g_bQuit) + return FALSE; + + // write registry entries + gs_addmess("Updating Registry\n"); + if (!cinst.UpdateRegistryBegin()) { + gs_addmess("Failed to begin registry update\n"); + return FALSE; + } + if (!cinst.UpdateRegistryKey(regkey1, regkey2)) { + gs_addmess("Failed to open/create registry application key\n"); + return FALSE; + } + strcpy(szDLL, g_szTargetDir); + strcat(szDLL, "\\"); + strcat(szDLL, cinst.GetMainDir()); + strcat(szDLL, "\\bin\\gsdll32.dll"); + if (!cinst.UpdateRegistryValue(regkey1, regkey2, "GS_DLL", szDLL)) { + gs_addmess("Failed to add registry value\n"); + return FALSE; + } + strcpy(szLIB, g_szTargetDir); + strcat(szLIB, "\\"); + strcat(szLIB, cinst.GetMainDir()); + strcat(szLIB, "\\lib;"); + strcat(szLIB, g_szTargetDir); + strcat(szLIB, "\\fonts"); + if (!cinst.UpdateRegistryValue(regkey1, regkey2, "GS_LIB", szLIB)) { + gs_addmess("Failed to add registry value\n"); + return FALSE; + } + if (!cinst.UpdateRegistryEnd()) { + gs_addmess("Failed to end registry update\n"); + return FALSE; + } + if (g_bQuit) + return FALSE; + + // Add Start Menu items + gs_addmess("Adding Start Menu items\n"); + if (!cinst.StartMenuBegin()) { + gs_addmess("Failed to begin Start Menu update\n"); + return FALSE; + } + strcpy(szProgram, g_szTargetDir); + strcat(szProgram, "\\"); + strcat(szProgram, cinst.GetMainDir()); + strcat(szProgram, "\\bin\\gswin32.exe"); + strcpy(szArguments, "\042-I"); + strcat(szArguments, szLIB); + strcat(szArguments, "\042"); + sprintf(szDescription, "Ghostscript %d.%d", + nGSversion / 100, nGSversion % 100); + if (!cinst.StartMenuAdd(szDescription, szProgram, szArguments)) { + gs_addmess("Failed to add Start Menu item\n"); + return FALSE; + } + strcpy(szProgram, g_szTargetDir); + strcat(szProgram, "\\"); + strcat(szProgram, cinst.GetMainDir()); + strcat(szProgram, "\\doc\\Readme.htm"); + sprintf(szDescription, "Ghostscript Readme %d.%d", + nGSversion / 100, nGSversion % 100); + if (!cinst.StartMenuAdd(szDescription, szProgram, NULL)) { + gs_addmess("Failed to add Start Menu item\n"); + return FALSE; + } + if (!cinst.StartMenuEnd()) { + gs_addmess("Failed to end Start Menu update\n"); + return FALSE; + } + + // consolidate logs into one uninstall file + if (!cinst.MakeLog()) { + gs_addmess("Failed to write uninstall log\n"); + return FALSE; + } + if (g_bQuit) + return FALSE; + + // add uninstall entry for "Add/Remove Programs" + gs_addmess("Adding uninstall program\n"); + if (!cinst.WriteUninstall(UNINSTALLPROG, g_bNoCopy)) { + gs_addmess("Failed to write uninstall entry\n"); + return FALSE; + } + + gs_addmess("Program install successful\n"); + return TRUE; +} + + +BOOL +install_fonts() +{ + cinst.SetMessageFunction(gs_addmess); + cinst.SetTargetDir(g_szTargetDir); + cinst.SetTargetGroup(g_szTargetGroup); + cinst.SetAllUsers(g_bAllUsers); + if (!cinst.Init(g_szSourceDir, "fontlist.txt")) + return FALSE; + + // copy files + if (!cinst.InstallFiles(g_bNoCopy, &g_bQuit)) { + gs_addmess("Font install failed\n"); + return FALSE; + } + + if (g_bQuit) + return FALSE; + + // consolidate logs into one uninstall file + if (!cinst.MakeLog()) { + gs_addmess("Failed to write uninstall log\n"); + return FALSE; + } + + // add uninstall entry for "Add/Remove Programs" + gs_addmess("Adding uninstall program\n"); + if (!cinst.WriteUninstall(UNINSTALLPROG, g_bNoCopy)) { + gs_addmess("Failed to write uninstall entry\n"); + return FALSE; + } + + gs_addmess("Font install successful\n"); + return TRUE; +} + + + +////////////////////////////////////////////////////////////////////// +// Create file list +////////////////////////////////////////////////////////////////////// + +FILE *fList; + +typedef int (*PFN_dodir)(const char *name); + +/* Called once for each directory */ +int +dodir(const char *filename) +{ + return 0; +} + +/* Called once for each file */ +int +dofile(const char *filename) +{ + if (fList != (FILE *)NULL) { + fputs(filename, fList); + fputs("\n", fList); + } + + return 0; +} + + +/* Walk through directory 'path', calling dodir() for given directory + * and dofile() for each file. + * If recurse=1, recurse into subdirectories, calling dodir() for + * each directory. + */ +int +dirwalk(char *path, int recurse, PFN_dodir dodir, PFN_dodir dofile) +{ + WIN32_FIND_DATA find_data; + HANDLE find_handle; + char pattern[MAXSTR]; /* orig pattern + modified pattern */ + char base[MAXSTR]; + char name[MAXSTR]; + BOOL bMore = TRUE; + char *p; + + + if (path) { + strcpy(pattern, path); + if (strlen(pattern) != 0) { + p = pattern + strlen(pattern) -1; + if (*p == '\\') + *p = '\0'; // truncate trailing backslash + } + + strcpy(base, pattern); + if (strchr(base, '*') != NULL) { + // wildcard already included + // truncate it from the base path + if ( (p = strrchr(base, '\\')) != NULL ) + *(++p) = '\0'; + } + else if (isalpha(pattern[0]) && + pattern[1]==':' && pattern[2]=='\0') { + strcat(pattern, "\\*"); // search entire disk + strcat(base, "\\"); + } + else { + // wildcard NOT included + // check to see if path is a directory + find_handle = FindFirstFile(pattern, &find_data); + if (find_handle != INVALID_HANDLE_VALUE) { + FindClose(find_handle); + if (find_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + strcat(pattern, "\\*"); // yes, search files + strcat(base, "\\"); + } + else { + dofile(path); // no, return just this file + return 0; + } + } + else + return 1; // path invalid + } + } + else { + base[0] = '\0'; + strcpy(pattern, "*"); + } + + find_handle = FindFirstFile(pattern, &find_data); + if (find_handle == INVALID_HANDLE_VALUE) + return 1; + + while (bMore) { + strcpy(name, base); + strcat(name, find_data.cFileName); + if (find_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + if ( strcmp(find_data.cFileName, ".") && + strcmp(find_data.cFileName, "..") ) { + dodir(name); + if (recurse) + dirwalk(name, recurse, dodir, dofile); + } + } + else { + dofile(name); + } + bMore = FindNextFile(find_handle, &find_data); + } + FindClose(find_handle); + + return 0; +} + + + +// This is used when creating a file list. + +BOOL make_filelist(int argc, char *argv[]) +{ + char *title = NULL; + char *dir = NULL; + char *list = NULL; + int i; + g_bBatch = TRUE; // Don't run message loop + + for (i=1; i<argc; i++) { + if (strcmp(argv[i], "-title") == 0) { + i++; + title = argv[i]; + } + else if (strcmp(argv[i], "-dir") == 0) { + i++; + dir = argv[i]; + } + else if (strcmp(argv[i], "-list") == 0) { + i++; + list = argv[i]; + } + else { + if ((title == NULL) || (strlen(title) == 0) || + (dir == NULL) || (strlen(dir) == 0) || + (list == NULL) || (strlen(list) == 0)) { + message_box("Usage: setupgs -title \042Aladdin Ghostscript #.##\042 -dir \042gs#.##\042 -list \042filelist.txt\042 spec1 spec2 specn\n"); + return FALSE; + } + if (fList == (FILE *)NULL) { + if ( (fList = fopen(list, "w")) == (FILE *)NULL ) { + message_box("Can't write list file\n"); + return FALSE; + } + fputs(title, fList); + fputs("\n", fList); + fputs(dir, fList); + fputs("\n", fList); + } + if (argv[i][0] == '@') { + // Use @filename with list of files/directories + // to avoid DOS command line limit + FILE *f; + char buf[MAXSTR]; + int j; + if ( (f = fopen(&(argv[i][1]), "r")) != (FILE *)NULL) { + while (fgets(buf, sizeof(buf), f)) { + // remove trailing newline and spaces + while ( ((j = strlen(buf)-1) >= 0) && + ((buf[j] == '\n') || (buf[j] == ' ')) ) + buf[j] = '\0'; + dirwalk(buf, TRUE, &dodir, &dofile); + } + fclose(f); + } + else { + wsprintf(buf, "Can't open @ file \042%s\042", + &argv[i][1]); + message_box(buf); + } + } + else + dirwalk(argv[i], TRUE, &dodir, &dofile); + } + } + + if (fList != (FILE *)NULL) { + fclose(fList); + fList = NULL; + } + return TRUE; +} + +////////////////////////////////////////////////////////////////////// diff --git a/gs/src/dwsetup.def b/gs/src/dwsetup.def new file mode 100644 index 000000000..26714991c --- /dev/null +++ b/gs/src/dwsetup.def @@ -0,0 +1,5 @@ +NAME DWSETUP +DESCRIPTION 'Aladdin Ghostscript Setup' +EXETYPE WINDOWS +HEAPSIZE 4096 +STACKSIZE 32768 diff --git a/gs/src/dwsetup.h b/gs/src/dwsetup.h new file mode 100644 index 000000000..7ef2fe89c --- /dev/null +++ b/gs/src/dwsetup.h @@ -0,0 +1,50 @@ +/* Copyright (C) 1999, Ghostgum Software Pty Ltd. All rights reserved. + + This file is part of Aladdin Ghostscript. + + This program is distributed with NO WARRANTY OF ANY KIND. No author + or distributor accepts any responsibility for the consequences of using it, + or for whether it serves any particular purpose or works at all, unless he + or she says so in writing. Refer to the Aladdin Ghostscript Free Public + License (the "License") for full details. + + Every copy of Aladdin Ghostscript must include a copy of the License, + normally in a plain ASCII text file named PUBLIC. The License grants you + the right to copy, modify and redistribute Aladdin Ghostscript, but only + under certain conditions described in the License. Among other things, the + License requires that the copyright notice and this notice be preserved on + all copies. +*/ + + +// $RCSfile$ $Revision$ + +// Definitions for Ghostscript setup program + +#ifndef IDC_STATIC +#define IDC_STATIC -1 +#endif + +#define IDD_TEXTWIN 101 +#define IDD_DIRDLG 102 +#define IDR_MAIN 200 +#define IDD_MAIN 201 +#define IDC_TARGET_DIR 202 +#define IDC_TARGET_GROUP 203 +#define IDC_BROWSE_DIR 204 +#define IDC_BROWSE_GROUP 205 +#define IDC_README 206 +#define IDS_APPNAME 501 +#define IDS_TARGET_DIR 502 +#define IDS_TARGET_GROUP 503 +#define IDC_PRODUCT_NAME 1000 +#define IDC_INSTALL_FONTS 1001 +#define IDC_TEXTWIN_MLE 1002 +#define IDC_TEXTWIN_COPY 1003 +#define IDC_INSTALL 1004 +#define IDC_FILES 1006 +#define IDC_FOLDER 1007 +#define IDC_TARGET 1008 +#define IDC_ALLUSERS 1009 +#define IDC_COPYRIGHT 1010 + diff --git a/gs/src/dwsetup.rc b/gs/src/dwsetup.rc new file mode 100644 index 000000000..047149679 --- /dev/null +++ b/gs/src/dwsetup.rc @@ -0,0 +1,148 @@ +/* Copyright (C) 1999, Ghostgum Software Pty Ltd. All rights reserved. + + This file is part of Aladdin Ghostscript. + + This program is distributed with NO WARRANTY OF ANY KIND. No author + or distributor accepts any responsibility for the consequences of using it, + or for whether it serves any particular purpose or works at all, unless he + or she says so in writing. Refer to the Aladdin Ghostscript Free Public + License (the "License") for full details. + + Every copy of Aladdin Ghostscript must include a copy of the License, + normally in a plain ASCII text file named PUBLIC. The License grants you + the right to copy, modify and redistribute Aladdin Ghostscript, but only + under certain conditions described in the License. Among other things, the + License requires that the copyright notice and this notice be preserved on + all copies. +*/ + + +// $RCSfile$ $Revision$ + +#include <windows.h> +#include "dwsetup.h" + +#ifndef DS_3DLOOK +#define DS_3DLOOK 0x0004L /* for Windows 95 look */ +#endif + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_MAIN DIALOG 32, 32, 300, 200 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP /* | WS_VISIBLE */ | WS_CAPTION | WS_SYSMENU +CAPTION "Aladdin Ghostscript Setup" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "Install",IDC_INSTALL,240,178,50,14 + ICON IDR_MAIN,IDC_STATIC,11,17,20,20 + LTEXT "This installs",IDC_STATIC,56,6,232,8 + LTEXT "Product Name",IDC_PRODUCT_NAME,72,16,216,8 + LTEXT "Copyright (C) 1994-1999 Aladdin Enterprises, Menlo Park, California, U.S.A. All rights reserved. See the file PUBLIC for more details.\n\nRequires 10 - 20 Mbytes disk space.", + IDC_COPYRIGHT,56,30,232,48 + + LTEXT "Install to directory",IDC_STATIC,8,92,56,8 + CONTROL "Install Fonts",IDC_INSTALL_FONTS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,160,90,85,12 + EDITTEXT IDC_TARGET_DIR,8,104,220,12,ES_AUTOHSCROLL + PUSHBUTTON "Browse...",IDC_BROWSE_DIR,240,103,50,14 + + LTEXT "Add shortcuts to",IDC_STATIC,8,132,52,8 + CONTROL "All Users",IDC_ALLUSERS,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,160,130,44,10 + EDITTEXT IDC_TARGET_GROUP,8,144,220,12,ES_AUTOHSCROLL + PUSHBUTTON "Browse...",IDC_BROWSE_GROUP,240,143,50,14 + PUSHBUTTON "Cancel",IDCANCEL,8,178,50,14 + PUSHBUTTON "Help",IDC_README,124,178,50,14 +END + + + +IDD_TEXTWIN DIALOG DISCARDABLE 0, 0, 318, 169 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "Aladdin Ghostscript setup log" +FONT 8, "MS Sans Serif" +BEGIN + PUSHBUTTON "Cancel",IDCANCEL,261,148,50,14 + EDITTEXT IDC_TEXTWIN_MLE,7,7,304,136,ES_MULTILINE | ES_WANTRETURN | + WS_VSCROLL | WS_HSCROLL + PUSHBUTTON "Copy to Clipboard",IDC_TEXTWIN_COPY,7,148,84,14 +END + +IDD_DIRDLG DIALOG DISCARDABLE 0, 0, 273, 140 +STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Select Folder" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,216,7,50,14 + PUSHBUTTON "Cancel",IDCANCEL,216,24,50,14 + LISTBOX IDC_FILES,7,7,197,70,LBS_SORT | LBS_NOINTEGRALHEIGHT | + WS_VSCROLL | WS_TABSTOP + LTEXT "Folder",IDC_FOLDER,7,82,259,12 + LTEXT "Destination Folder",IDC_STATIC,7,105,259,12 + EDITTEXT IDC_TARGET,7,120,259,12,ES_AUTOHSCROLL +END + + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAIN ICON DISCARDABLE "gstext.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO DISCARDABLE +BEGIN + IDD_MAIN, DIALOG + BEGIN + LEFTMARGIN, 8 + RIGHTMARGIN, 288 + TOPMARGIN, 6 + BOTTOMMARGIN, 192 + END + IDD_TEXTWIN, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 311 + TOPMARGIN, 7 + BOTTOMMARGIN, 162 + END + + IDD_DIRDLG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 266 + TOPMARGIN, 7 + BOTTOMMARGIN, 133 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE DISCARDABLE +BEGIN + IDS_APPNAME "Aladdin Ghostscript Setup" + IDS_TARGET_DIR "C:\\Aladdin" + IDS_TARGET_GROUP "Aladdin" +END + +///////////////////////////////////////////////////////////////////////////// + + + diff --git a/gs/src/dwtext.cpp b/gs/src/dwtext.cpp index 5b7a00af2..4e3aa18b1 100644 --- a/gs/src/dwtext.cpp +++ b/gs/src/dwtext.cpp @@ -17,7 +17,7 @@ */ - +// $RCSfile$ $Revision$ // Microsoft Windows 3.n text window for Ghostscript. diff --git a/gs/src/dwtext.h b/gs/src/dwtext.h index b6688f5d5..e1cc5d832 100644 --- a/gs/src/dwtext.h +++ b/gs/src/dwtext.h @@ -17,7 +17,7 @@ */ - +// $RCSfile$ $Revision$ // Text Window class diff --git a/gs/src/dwuninst.cpp b/gs/src/dwuninst.cpp new file mode 100644 index 000000000..5ff1e2922 --- /dev/null +++ b/gs/src/dwuninst.cpp @@ -0,0 +1,860 @@ +/* Copyright (C) 1999, Ghostgum Software Pty Ltd. All rights reserved. + + This file is part of Aladdin Ghostscript. + + This program is distributed with NO WARRANTY OF ANY KIND. No author + or distributor accepts any responsibility for the consequences of using it, + or for whether it serves any particular purpose or works at all, unless he + or she says so in writing. Refer to the Aladdin Ghostscript Free Public + License (the "License") for full details. + + Every copy of Aladdin Ghostscript must include a copy of the License, + normally in a plain ASCII text file named PUBLIC. The License grants you + the right to copy, modify and redistribute Aladdin Ghostscript, but only + under certain conditions described in the License. Among other things, the + License requires that the copyright notice and this notice be preserved on + all copies. +*/ + +// $RCSfile$ $Revision$ + +#define STRICT +#include <windows.h> +#include <objbase.h> +#include <shlobj.h> +#include <shellapi.h> +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <direct.h> +#include "dwuninst.h" + + +#ifdef _MSC_VER +#define _export +#define chdir(x) _chdir(x) +#define mkdir(x) _mkdir(x) +#endif +#define DELAY_STEP 500 +#define DELAY_FILE 10 +#define MAXSTR 256 +#define UNINSTALLKEY TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall") + +HWND hDlgModeless; +HWND hText1; +HWND hText2; +char path[MAXSTR]; +int language = 0; +BOOL is_win4 = FALSE; +HINSTANCE phInstance; +char szSection[] = "////////////////////////////////"; +BOOL bQuit = FALSE; +BOOL gError = FALSE; // set TRUE if an uninstall was not successful + +char szTitle[MAXSTR]; +char szLogFile[MAXSTR]; +char szLine[MAXSTR]; +FILE *fLog; + +void do_message(void); +BOOL dofiles(void); +BOOL registry_delete(void); +BOOL registry_import(void); +BOOL shell_new(void); +BOOL shell_old(void); +BOOL doEOF(void); + +#define gs_addmess(str) fputs(str, stdout) // for debug + + +// linked list for deleting registry entries in reverse order +typedef struct tagKEY { + long index; + struct tagKEY *previous; +} KEY; +KEY *last_key = NULL; + + +// read a line from the log, removing trailing new line character +BOOL GetLine(void) +{ + BOOL err = TRUE; + int i; + szLine[0] = '\0'; + if (fLog) + err = (fgets(szLine, sizeof(szLine)-1, fLog) == NULL); + i = strlen(szLine) - 1; + if ( (szLine[0] != '\0') && (szLine[i] == '\n')) + szLine[i] = '\0'; + return !err; +} + +BOOL IsSection(void) +{ + return (strncmp(szLine, szSection, strlen(szSection)) == 0); +} + +BOOL +NextSection(void) +{ + while (GetLine()) { + do_message(); + if (bQuit) + return FALSE; + if (IsSection()) + return TRUE; + } + + return TRUE; +} + +BOOL ReadSection(void) +{ + do_message(); + if (bQuit) + return FALSE; + GetLine(); + if (strlen(szLine) == 0) { + doEOF(); + return TRUE; + } + else if (strcmp(szLine, "FileNew")==0) { + SetWindowText(hText1, "Removing Files"); + Sleep(DELAY_STEP); + if (!dofiles()) + return FALSE; + SetWindowText(hText1, ""); + return TRUE; + } + else if (strcmp(szLine, "RegistryNew")==0) { + SetWindowText(hText1, "Removing Registry entries"); + Sleep(DELAY_STEP); + if (!registry_delete()) + return FALSE; + SetWindowText(hText1, ""); + return TRUE; + } + else if (strcmp(szLine, "RegistryOld")==0) { + SetWindowText(hText1, "Restoring Registry entries"); + Sleep(DELAY_STEP); + if (!registry_import()) + return FALSE; + SetWindowText(hText1, ""); + return TRUE; + } + else if (strcmp(szLine, "ShellNew")==0) { + SetWindowText(hText1, "Removing Start Menu items"); + Sleep(DELAY_STEP); + if (!shell_new()) + return FALSE; + SetWindowText(hText1, ""); + return TRUE; + } + else if (strcmp(szLine, "ShellOld")==0) { + SetWindowText(hText1, "Restoring Start Menu items"); + Sleep(DELAY_STEP); + if (!shell_old()) + return FALSE; + SetWindowText(hText1, ""); + return TRUE; + } + return FALSE; +} + + +BOOL +dofiles(void) +{ + while (GetLine()) { + do_message(); + if (bQuit) + return FALSE; + if (IsSection()) { + SetWindowText(hText2, ""); + return TRUE; + } + if (szLine[0] != '\0') { + SetWindowText(hText2, szLine); + if (DELAY_FILE) + Sleep(DELAY_FILE); + gs_addmess("Deleting File: "); + gs_addmess(szLine); + gs_addmess("\n"); + DeleteFile(szLine); + } + } + return FALSE; +} + +BOOL +doEOF(void) +{ + fclose(fLog); + fLog = NULL; + unlink(szLogFile); + PostMessage(hDlgModeless, WM_COMMAND, IDC_DONE, 0L); + bQuit = TRUE; + return TRUE; +} + + +BOOL +registry_delete_key(void) +{ +char keyname[MAXSTR]; +HKEY hkey = HKEY_CLASSES_ROOT; +HKEY hrkey = HKEY_CLASSES_ROOT; +char *rkey, *skey; +char *name; +DWORD dwResult; + keyname[0] = '\0'; + while (GetLine()) { + if ((szLine[0] == '\0') || (szLine[0] == '\r') || (szLine[0] == '\n')) + break; + if (szLine[0] == '[') { + // key name + rkey = strtok(szLine+1, "\\]\n\r"); + if (rkey == (char *)NULL) + return FALSE; + skey = strtok(NULL, "]\n\r"); + if (strcmp(rkey, "HKEY_CLASSES_ROOT")==0) + hrkey = HKEY_CLASSES_ROOT; + else if (strcmp(rkey, "HKEY_CURRENT_USER")==0) + hrkey = HKEY_CURRENT_USER; + else if (strcmp(rkey, "HKEY_LOCAL_MACHINE")==0) + hrkey = HKEY_LOCAL_MACHINE; + else if (strcmp(rkey, "HKEY_USERS")==0) + hrkey = HKEY_USERS; + else + return FALSE; + if (skey == (char *)NULL) + return FALSE; + gs_addmess("Opening registry key\n "); + gs_addmess(rkey); + gs_addmess("\\"); + gs_addmess(skey); + gs_addmess("\n"); + if (RegCreateKeyEx(hrkey, skey, 0, "", 0, KEY_ALL_ACCESS, + NULL, &hkey, &dwResult) + != ERROR_SUCCESS) + return FALSE; + strcpy(keyname, skey); + } + else if (szLine[0] == '@') { + // default value + RegDeleteValue(hkey, NULL); + gs_addmess("Deleting registry default value\n"); + } + else if (szLine[0] == '\042') { + // named value + name = strtok(szLine+1, "\042\r\n"); + RegDeleteValue(hkey, name); + gs_addmess("Deleting registry named value\n "); + gs_addmess(name); + gs_addmess("\n"); + } + } + // close key + if (hkey != HKEY_CLASSES_ROOT) + RegCloseKey(hkey); + // delete the key + if (strlen(keyname)) { + gs_addmess("Deleting registry key\n "); + gs_addmess(keyname); + gs_addmess("\n"); + RegOpenKeyEx(hrkey, NULL, 0, 0, &hkey); + RegDeleteKey(hkey, keyname); + RegCloseKey(hkey); + } + return TRUE; +} + +BOOL +registry_delete() +{ + long logindex; + KEY *key; + + // scan log file + // so we can remove keys in reverse order + logindex = 0; + while (GetLine() && !IsSection()) { + KEY *key; + if (szLine[0] == '[') { + if ((key = (KEY *)malloc(sizeof(KEY))) + != (KEY *)NULL) { + key->previous = last_key; + key->index = logindex; + last_key = key; + } + } + logindex = ftell(fLog); + } + + // Remove keys + for (key = last_key; key != NULL; + key = key->previous) { + if (key != last_key) + free(last_key); + fseek(fLog, key->index, SEEK_SET); + registry_delete_key(); + last_key = key; + } + free(last_key); + + fseek(fLog, logindex, SEEK_SET); + GetLine(); + return TRUE; +} + + + +void +registry_unquote(char *line) +{ +char *s, *d; +int value; + s = d = line; + while (*s) { + if (*s != '\\') { + *d++ = *s; + } + else { + s++; + if (*s == '\\') + *d++ = *s; + else { + value = 0; + if (*s) { + value = *s++ - '0'; + } + if (*s) { + value <<= 3; + value += *s++ - '0'; + } + if (*s) { + value <<= 3; + value += *s - '0'; + } + *d++ = (char)value; + } + } + s++; + } + *d = '\0'; +} + +BOOL +registry_import() +{ + HKEY hkey = HKEY_CLASSES_ROOT; + HKEY hrkey; + char *rkey, *skey; + char *value; + char *name; + DWORD dwResult; + GetLine(); + if (strncmp(szLine, "REGEDIT4", 8) != 0) + return FALSE; + + while (GetLine()) { + if (IsSection()) + break; + if ((szLine[0] == '\0') || (szLine[0] == '\r') || (szLine[0] == '\n')) + continue; + if (szLine[0] == '[') { + // key name + if (hkey != HKEY_CLASSES_ROOT) { + RegCloseKey(hkey); + hkey = HKEY_CLASSES_ROOT; + } + rkey = strtok(szLine+1, "\\]\n\r"); + if (rkey == (char *)NULL) + return FALSE; + skey = strtok(NULL, "]\n\r"); + if (strcmp(rkey, "HKEY_CLASSES_ROOT")==0) + hrkey = HKEY_CLASSES_ROOT; + else if (strcmp(rkey, "HKEY_CURRENT_USER")==0) + hrkey = HKEY_CURRENT_USER; + else if (strcmp(rkey, "HKEY_LOCAL_MACHINE")==0) + hrkey = HKEY_LOCAL_MACHINE; + else if (strcmp(rkey, "HKEY_USERS")==0) + hrkey = HKEY_USERS; + else + return FALSE; + if (skey == (char *)NULL) + return FALSE; + gs_addmess("Creating registry key\n "); + gs_addmess(rkey); + gs_addmess("\\"); + gs_addmess("skey"); + gs_addmess("\n"); + if (RegCreateKeyEx(hrkey, skey, 0, "", 0, KEY_ALL_ACCESS, + NULL, &hkey, &dwResult) + != ERROR_SUCCESS) + return FALSE; + } + else if (szLine[0] == '@') { + // default value + if (strlen(szLine) < 4) + return FALSE; + value = strtok(szLine+3, "\042\r\n"); + if (value) { + registry_unquote(value); + gs_addmess("Setting registry key value\n "); + gs_addmess(value); + gs_addmess("\n"); + if (RegSetValueEx(hkey, NULL, 0, REG_SZ, + (CONST BYTE *)value, strlen(value)+1) + != ERROR_SUCCESS) + return FALSE; + } + } + else if (szLine[0] == '\042') { + // named value + name = strtok(szLine+1, "\042\r\n"); + strtok(NULL, "\042\r\n"); + value = strtok(NULL, "\042\r\n"); + registry_unquote(value); + gs_addmess("Setting registry key value\n "); + gs_addmess(name); + gs_addmess("="); + gs_addmess(value); + gs_addmess("\n"); + if (RegSetValueEx(hkey, name, 0, REG_SZ, (CONST BYTE *)value, strlen(value)+1) + != ERROR_SUCCESS) + return FALSE; + } + } + if (hkey != HKEY_CLASSES_ROOT) + RegCloseKey(hkey); + return TRUE; +} + +// recursive mkdir +// requires a full path to be specified, so ignores root \ +// apart from root \, must not contain trailing \ +// Examples: +// c:\ (OK, but useless) +// c:\gstools (OK) +// c:\gstools\ (incorrect) +// c:gstools (incorrect) +// gstools (incorrect) +// The following UNC names should work, +// but didn't under Win3.1 because gs_chdir wouldn't accept UNC names +// Needs to be tested under Windows 95. +// \\server\sharename\gstools (OK) +// \\server\sharename\ (OK, but useless) +// + +BOOL MakeDir(char *dirname) +{ +char newdir[MAXSTR]; +char *p; + if (strlen(dirname) < 3) + return -1; + + gs_addmess("Making Directory\n "); + gs_addmess(dirname); + gs_addmess("\n"); + if (isalpha(dirname[0]) && dirname[1]==':' && dirname[2]=='\\') { + // drive mapped path + p = dirname+3; + } + else if (dirname[1]=='\\' && dirname[1]=='\\') { + // UNC path + p = strchr(dirname+2, '\\'); // skip servername + if (p == NULL) + return -1; + p++; + p = strchr(p, '\\'); // skip sharename + if (p == NULL) + return -1; + } + else { + // not full path so error + return -1; + } + + while (1) { + strncpy(newdir, dirname, (int)(p-dirname)); + newdir[(int)(p-dirname)] = '\0'; + if (chdir(newdir)) { + if (mkdir(newdir)) + return -1; + } + p++; + if (p >= dirname + strlen(dirname)) + break; // all done + p = strchr(p, '\\'); + if (p == NULL) + p = dirname + strlen(dirname); + } + + return SetCurrentDirectory(dirname); +} + + +BOOL shell_new(void) +{ + + char *p, *q; + char group[MAXSTR]; + // remove shell items added by Ghostscript + // We can only delete one group with this code + group[0] = '\0'; + while (GetLine()) { + if (IsSection()) { + if (strlen(group) != 0) { + gs_addmess("Removing shell folder\n "); + gs_addmess(group); + gs_addmess("\n"); + RemoveDirectory(group); + } + return TRUE; + } + p = strtok(szLine, "="); + q = strtok(NULL, ""); + if (p == NULL) { + continue; + } + else if (strcmp(p, "Group")==0) { + if (q) + strncpy(group, q, sizeof(group)-1); + // defer this until we have remove contents + } + else if (strcmp(p, "Name") == 0) { + if (q) { + gs_addmess("Removing shell link\n "); + gs_addmess(q); + gs_addmess("\n"); + DeleteFile(q); + } + } + } + + return TRUE; +} + + +BOOL CreateShellLink(LPCSTR name, LPCSTR description, LPCSTR program, + LPCSTR arguments, LPCSTR directory, LPCSTR icon, int nIconIndex) +{ + HRESULT hres; + IShellLink* psl; + + // Ensure string is UNICODE. + WCHAR wsz[MAX_PATH]; + MultiByteToWideChar(CP_ACP, 0, name, -1, wsz, MAX_PATH); + + // Save new shell link + + // Get a pointer to the IShellLink interface. + hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, + IID_IShellLink, (void **)&psl); + if (SUCCEEDED(hres)) { + IPersistFile* ppf; + // Query IShellLink for the IPersistFile interface for + // saving the shell link in persistent storage. + hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf); + if (SUCCEEDED(hres)) { + gs_addmess("Adding shell link\n "); + gs_addmess(name); + gs_addmess("\n"); + + // Set the path to the shell link target. + hres = psl->SetPath(program); + if (!SUCCEEDED(hres)) { + gs_addmess("SetPath failed!"); + gError = TRUE; + } + // Set the description of the shell link. + hres = psl->SetDescription(description); + if (!SUCCEEDED(hres)) { + gs_addmess("SetDescription failed!"); + gError = TRUE; + } + if ((arguments != (LPCSTR)NULL) && *arguments) { + // Set the arguments of the shell link target. + hres = psl->SetArguments(arguments); + if (!SUCCEEDED(hres)) { + gs_addmess("SetArguments failed!"); + gError = TRUE; + } + } + if ((directory != (LPCSTR)NULL) && *directory) { + // Set the arguments of the shell link target. + hres = psl->SetWorkingDirectory(directory); + if (!SUCCEEDED(hres)) { + gs_addmess("SetWorkingDirectory failed!"); + gError = TRUE; + } + } + if ((icon != (LPCSTR)NULL) && *icon) { + // Set the arguments of the shell link target. + hres = psl->SetIconLocation(icon, nIconIndex); + if (!SUCCEEDED(hres)) { + gs_addmess("SetIconLocation failed!"); + gError = TRUE; + } + } + + // Save the link via the IPersistFile::Save method. + hres = ppf->Save(wsz, TRUE); + // Release pointer to IPersistFile. + ppf->Release(); + } + // Release pointer to IShellLink. + psl->Release(); + } + + return (hres == 0); +} + + + +BOOL shell_old(void) +{ + // Add shell items removed by Ghostscript + char *p, *q; + char name[MAXSTR]; + char description[MAXSTR]; + char program[MAXSTR]; + char arguments[MAXSTR]; + char directory[MAXSTR]; + char icon[MAXSTR]; + int nIconIndex; + // Remove shell items added by Ghostscript + name[0] = description[0] = program[0] = arguments[0] + = directory[0] = icon[0] = '\0'; + nIconIndex = 0; + + while (GetLine()) { + if (IsSection()) + return TRUE; + p = strtok(szLine, "="); + q = strtok(NULL, ""); + if (strlen(szLine) == 0) { + if (name[0] != '\0') { + // add start menu item + CreateShellLink(name, description, program, arguments, + directory, icon, nIconIndex); + } + name[0] = description[0] = program[0] = arguments[0] + = directory[0] = icon[0] = '\0'; + nIconIndex = 0; + continue; + } + else if (p == (char *)NULL) { + continue; + } + else if (strcmp(p, "Group")==0) { + MakeDir(q); + } + else if (strcmp(p, "Name") == 0) + strncpy(name, q, sizeof(name)-1); + else if (strcmp(p, "Description") == 0) + strncpy(description, q, sizeof(description)-1); + else if (strcmp(p, "Program") == 0) + strncpy(program, q, sizeof(program)-1); + else if (strcmp(p, "Arguments") == 0) + strncpy(arguments, q, sizeof(arguments)-1); + else if (strcmp(p, "Directory") == 0) + strncpy(directory, q, sizeof(directory)-1); + else if (strcmp(p, "IconLocation") == 0) + strncpy(icon, q, sizeof(icon)-1); + else if (strcmp(p, "IconIndex") == 0) + nIconIndex = atoi(q); + } + + return TRUE; +} + + + +#ifdef __BORLANDC__ +#pragma argsused +#endif +BOOL CALLBACK _export +RemoveDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch(message) { + case WM_INITDIALOG: + SetWindowText(hwnd, szTitle); + return TRUE; + case WM_COMMAND: + switch(LOWORD(wParam)) { + case IDC_DONE: + // delete registry entries for uninstall + if (is_win4) { + HKEY hkey; + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, + UNINSTALLKEY, 0, KEY_ALL_ACCESS, &hkey) + == ERROR_SUCCESS) { + RegDeleteKey(hkey, szTitle); + RegCloseKey(hkey); + } + } + + SetWindowText(hText1, "Uninstall successful"); + SetWindowText(hText2, ""); + EnableWindow(GetDlgItem(hwnd, IDOK), FALSE); + EnableWindow(GetDlgItem(hwnd, IDCANCEL), TRUE); + SetDlgItemText(hwnd, IDCANCEL, "Exit"); + SetFocus(GetDlgItem(hwnd, IDCANCEL)); + return TRUE; + case IDOK: + // Start removal + EnableWindow(GetDlgItem(hwnd, IDOK), FALSE); + EnableWindow(GetDlgItem(hwnd, IDC_PRESSOK), FALSE); + while (!bQuit) { + do_message(); + if (!ReadSection()) { + SetWindowText(hText1, "Uninstall FAILED"); + SetWindowText(hText2, ""); + EnableWindow(GetDlgItem(hwnd, IDOK), FALSE); + EnableWindow(GetDlgItem(hwnd, IDCANCEL), TRUE); + SetDlgItemText(hwnd, IDCANCEL, "Exit"); + SetFocus(GetDlgItem(hwnd, IDCANCEL)); + bQuit = TRUE; + } + } + return TRUE; + case IDCANCEL: + bQuit = TRUE; + DestroyWindow(hwnd); + hDlgModeless = 0; + return TRUE; + } + case WM_CLOSE: + DestroyWindow(hwnd); + hDlgModeless = 0; + return TRUE; + } + return FALSE; +} + +void +do_message(void) +{ +MSG msg; + while (hDlgModeless && PeekMessage(&msg, (HWND)NULL, 0, 0, PM_REMOVE)) { + if ((hDlgModeless == 0) || !IsDialogMessage(hDlgModeless, &msg)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } +} + + + +BOOL +init(void) +{ + DWORD version = GetVersion(); + char *p, *s; + // get location of uninstall log from command line as argv[1] + p = GetCommandLine(); + s = p; + if (*s == '\042') { + // skip over program name + s++; + while (*s && *s!='\042') + s++; + if (*s) + s++; + } + else if (*s != ' ') { + // skip over program name + s++; + while (*s && *s!=' ') + s++; + if (*s) + s++; + } + while (*s && *s==' ') + s++; + if (*s == '\042') + s++; + strncpy(szLogFile, s, sizeof(szLogFile)); + s = szLogFile; + while (*s) { + if (*s == '\042') { + *s = '\0'; + break; + } + s++; + } + if (strlen(szLogFile) == 0) { + MessageBox(HWND_DESKTOP, "Usage: uninstgs logfile.txt", + "Aladdin Ghostscript Uninstall", MB_OK); + return FALSE; + } + + // read first few lines of file to get title + fLog = fopen(szLogFile, "r"); + if (fLog == (FILE *)NULL) { + MessageBox(HWND_DESKTOP, szLogFile, "Can't find file", MB_OK); + return FALSE; + } + GetLine(); + if (!IsSection()) { + MessageBox(HWND_DESKTOP, szLogFile, "Not valid uninstall log", + MB_OK); + return FALSE; + } + GetLine(); + if (strcmp(szLine, "UninstallName") != 0) { + MessageBox(HWND_DESKTOP, szLogFile, "Not valid uninstall log", + MB_OK); + return FALSE; + } + GetLine(); + strcpy(szTitle, szLine); + + NextSection(); + + if (LOBYTE(LOWORD(version)) >= 4) + is_win4 = TRUE; + return TRUE; +} + +#ifdef __BORLANDC__ +#pragma argsused +#endif +int PASCAL +WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int cmdShow) +{ +MSG msg; + + phInstance = hInstance; + if (!init()) + return 1; + + + CoInitialize(NULL); + + hDlgModeless = CreateDialogParam(hInstance, + MAKEINTRESOURCE(IDD_UNSET), + HWND_DESKTOP, RemoveDlgProc, (LPARAM)NULL); + hText1 = GetDlgItem(hDlgModeless, IDC_T1); + hText2 = GetDlgItem(hDlgModeless, IDC_T2); + + SetWindowPos(hDlgModeless, HWND_TOP, 0, 0, 0, 0, + SWP_SHOWWINDOW | SWP_NOMOVE | SWP_NOSIZE); + + while (hDlgModeless && GetMessage(&msg, (HWND)NULL, 0, 0)) { + if ((hDlgModeless == 0) || !IsDialogMessage(hDlgModeless, &msg)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + + if (fLog) + fclose(fLog); + + CoUninitialize(); + + return 0; +} + diff --git a/gs/src/dwuninst.def b/gs/src/dwuninst.def new file mode 100644 index 000000000..51319e274 --- /dev/null +++ b/gs/src/dwuninst.def @@ -0,0 +1,5 @@ +NAME DWUNINST +DESCRIPTION 'Aladdin Ghostscript uninstall' +EXETYPE WINDOWS +HEAPSIZE 4096 +STACKSIZE 32768 diff --git a/gs/src/dwuninst.h b/gs/src/dwuninst.h new file mode 100644 index 000000000..0305f2f0a --- /dev/null +++ b/gs/src/dwuninst.h @@ -0,0 +1,33 @@ +/* Copyright (C) 1999, Ghostgum Software Pty Ltd. All rights reserved. + + This file is part of Aladdin Ghostscript. + + This program is distributed with NO WARRANTY OF ANY KIND. No author + or distributor accepts any responsibility for the consequences of using it, + or for whether it serves any particular purpose or works at all, unless he + or she says so in writing. Refer to the Aladdin Ghostscript Free Public + License (the "License") for full details. + + Every copy of Aladdin Ghostscript must include a copy of the License, + normally in a plain ASCII text file named PUBLIC. The License grants you + the right to copy, modify and redistribute Aladdin Ghostscript, but only + under certain conditions described in the License. Among other things, the + License requires that the copyright notice and this notice be preserved on + all copies. +*/ + + +// $RCSfile$ $Revision$ + +// Definitions for Ghostscript installer + +#define ID_UNINSTGS 1 +#define ID_UNINST 2 +#define IDD_UNSET 2 +#define IDC_GSICON 101 +#define IDC_PROG 102 +#define IDC_DONE 103 +#define IDC_PRESSOK 103 +#define IDC_T1 111 +#define IDC_T2 112 + diff --git a/gs/src/dwuninst.rc b/gs/src/dwuninst.rc new file mode 100644 index 000000000..af652f1a7 --- /dev/null +++ b/gs/src/dwuninst.rc @@ -0,0 +1,40 @@ +/* Copyright (C) 1999, Ghostgum Software Pty Ltd. All rights reserved. + + This file is part of Aladdin Ghostscript. + + This program is distributed with NO WARRANTY OF ANY KIND. No author + or distributor accepts any responsibility for the consequences of using it, + or for whether it serves any particular purpose or works at all, unless he + or she says so in writing. Refer to the Aladdin Ghostscript Free Public + License (the "License") for full details. + + Every copy of Aladdin Ghostscript must include a copy of the License, + normally in a plain ASCII text file named PUBLIC. The License grants you + the right to copy, modify and redistribute Aladdin Ghostscript, but only + under certain conditions described in the License. Among other things, the + License requires that the copyright notice and this notice be preserved on + all copies. +*/ + +/* dwuninst.rc */ + +#include <windows.h> +#include "dwuninst.h" + +ID_UNINSTGS ICON "gstext.ico" + + +IDD_UNSET DIALOG 6, 15, 242, 123 +STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +CAPTION "" +FONT 8, "MS Sans Serif" +{ + DEFPUSHBUTTON "&Cancel", IDCANCEL, 106, 98, 50, 14 + PUSHBUTTON "&Uninstall", IDOK, 16, 98, 50, 14 + LTEXT "To remove this package, press Uninstall", IDC_PRESSOK, 44, 8, 192, 8 + LTEXT "", IDC_T1, 32, 48, 200, 16 + LTEXT "", IDC_T2, 32, 64, 200, 16 + ICON ID_UNINSTGS, IDC_GSICON, 8, 8, 18, 20 +} + + diff --git a/gs/src/echogs.c b/gs/src/echogs.c index 4eaff4e0d..8660548c9 100644 --- a/gs/src/echogs.c +++ b/gs/src/echogs.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* 'echo'-like utility */ #include "stdpre.h" #include <stdio.h> diff --git a/gs/src/errno_.h b/gs/src/errno_.h index 2da5b9d73..06bd7d305 100644 --- a/gs/src/errno_.h +++ b/gs/src/errno_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic substitute for Unix errno.h */ #ifndef errno__INCLUDED diff --git a/gs/src/errors.h b/gs/src/errors.h index db3e991af..232dff323 100644 --- a/gs/src/errors.h +++ b/gs/src/errors.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definition of error codes */ #ifndef errors_INCLUDED diff --git a/gs/src/estack.h b/gs/src/estack.h index 578fc63ca..670e5b0d8 100644 --- a/gs/src/estack.h +++ b/gs/src/estack.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1994, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for the execution stack */ #ifndef estack_INCLUDED diff --git a/gs/src/files.h b/gs/src/files.h index 6e7b6c827..bc2996f52 100644 --- a/gs/src/files.h +++ b/gs/src/files.h @@ -1,22 +1,10 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for interpreter support for file objects */ /* Requires stream.h */ #ifndef files_INCLUDED diff --git a/gs/src/gconf.c b/gs/src/gconf.c index c0ae19f69..0d6058214 100644 --- a/gs/src/gconf.c +++ b/gs/src/gconf.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Configuration tables */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gconf.h b/gs/src/gconf.h index 457e902ea..6ca236a42 100644 --- a/gs/src/gconf.h +++ b/gs/src/gconf.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Wrapper for gconfig.h or a substitute. */ /* diff --git a/gs/src/gdebug.h b/gs/src/gdebug.h index 017aee976..94ba2196d 100644 --- a/gs/src/gdebug.h +++ b/gs/src/gdebug.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Debugging machinery definitions */ #ifndef gdebug_INCLUDED diff --git a/gs/src/gdev3852.c b/gs/src/gdev3852.c index d93595042..0298e0d34 100644 --- a/gs/src/gdev3852.c +++ b/gs/src/gdev3852.c @@ -1,20 +1,10 @@ /* Copyright (C) 1989, 1992, 1993, 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ + +/*$RCSfile$ $Revision$*/ +/* IBM 3852 JetPrinter color ink jet driver for Ghostscript */ /* This driver program created by Kevin M. Gift <kgift@draper.com> in Sept. 1992. @@ -27,9 +17,6 @@ Modified by L. Peter Deutsch <ghost@aladdin.com> 1999-01-10 to remove _ss modifiers inappropriately copied from other code. */ - -/* IBM 3852 JetPrinter color ink jet driver for Ghostscript */ - #include "gdevprn.h" #include "gdevpcl.h" diff --git a/gs/src/gdev3b1.c b/gs/src/gdev3b1.c index 4325470ca..18c3c4805 100644 --- a/gs/src/gdev3b1.c +++ b/gs/src/gdev3b1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1994, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* * This is a driver for the AT&T 3b1/7300/UnixPC console display. * diff --git a/gs/src/gdev4081.c b/gs/src/gdev4081.c index c29d14083..20cadb175 100644 --- a/gs/src/gdev4081.c +++ b/gs/src/gdev4081.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Ricoh 4081 laser printer driver */ #include "gdevprn.h" diff --git a/gs/src/gdev4693.c b/gs/src/gdev4693.c index 1f1d511c1..8d7227bc0 100644 --- a/gs/src/gdev4693.c +++ b/gs/src/gdev4693.c @@ -6,7 +6,7 @@ * This software is provided "as is" without express or implied warranty. */ - +/*$RCSfile$ $Revision$*/ /* Driver for the Tektronix 4693d color plotter. */ #include "gdevprn.h" #define prn_dev ((gx_device_printer *)dev) /* needed in 5.31 et seq */ diff --git a/gs/src/gdev8510.c b/gs/src/gdev8510.c index 05fc49894..33243e5a4 100644 --- a/gs/src/gdev8510.c +++ b/gs/src/gdev8510.c @@ -1,25 +1,13 @@ /* Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* * C.Itoh M8510 printer driver for ghostscript. - * by Bob Smith <bob@snuffy.penfield.ny.us> + * + * By Bob Smith <bob@snuffy.penfield.ny.us> */ #include "gdevprn.h" diff --git a/gs/src/gdev8bcm.c b/gs/src/gdev8bcm.c index 34b1cd7ca..8dd110431 100644 --- a/gs/src/gdev8bcm.c +++ b/gs/src/gdev8bcm.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Dynamic color mapping for 8-bit displays */ #include "gx.h" #include "gxdevice.h" diff --git a/gs/src/gdev8bcm.h b/gs/src/gdev8bcm.h index cbc9cfe9c..bac4f785e 100644 --- a/gs/src/gdev8bcm.h +++ b/gs/src/gdev8bcm.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* 8-bit color map support */ /* Requires gxdevice.h (for gx_color_value) */ #ifndef gdev8bcm_INCLUDED diff --git a/gs/src/gdevabuf.c b/gs/src/gdevabuf.c index 0d10a0c1c..5b564a151 100644 --- a/gs/src/gdevabuf.c +++ b/gs/src/gdevabuf.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Alpha-buffering memory devices */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevadmp.c b/gs/src/gdevadmp.c index a7509ad9e..89d5ad742 100644 --- a/gs/src/gdevadmp.c +++ b/gs/src/gdevadmp.c @@ -1,23 +1,12 @@ /* Copyright (C) 1989, 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* + * Apple DMP / Imagewriter driver + * * This is a modification of Mark Wedel's Apple DMP and * Jonathan Luckey's Imagewriter II driver to * support the Imagewriter LQ's higher resolution (320x216): diff --git a/gs/src/gdevalph.c b/gs/src/gdevalph.c index 2de5cd06b..75d29f17c 100644 --- a/gs/src/gdevalph.c +++ b/gs/src/gdevalph.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Alpha-channel storage device */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevbbox.c b/gs/src/gdevbbox.c index 90d0a9846..5e0ac5a08 100644 --- a/gs/src/gdevbbox.c +++ b/gs/src/gdevbbox.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Device for tracking bounding box */ #include "math_.h" #include "memory_.h" @@ -89,7 +76,7 @@ gx_device_bbox gs_bbox_device = MAX_RESOLUTION, MAX_RESOLUTION, 1, 8, 255, 0, 256, 1), {bbox_open_device, - NULL, /* get_initial_matrix */ + gx_upright_get_initial_matrix, NULL, /* sync_output */ bbox_output_page, bbox_close_device, @@ -877,7 +864,6 @@ typedef struct bbox_image_enum_s { int y, height; } bbox_image_enum; -extern_st(st_gx_image_enum_common); gs_private_st_suffix_add2(st_bbox_image_enum, bbox_image_enum, "bbox_image_enum", bbox_image_enum_enum_ptrs, bbox_image_enum_reloc_ptrs, st_gx_image_enum_common, pcpath, target_info); diff --git a/gs/src/gdevbbox.h b/gs/src/gdevbbox.h index 35cffa706..c5bea23f5 100644 --- a/gs/src/gdevbbox.h +++ b/gs/src/gdevbbox.h @@ -1,22 +1,10 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions and interface for bbox (bounding box accumulator) device */ /* Requires gxdevice.h */ #ifndef gdevbbox_INCLUDED diff --git a/gs/src/gdevbit.c b/gs/src/gdevbit.c index dd529398d..1520f3a13 100644 --- a/gs/src/gdevbit.c +++ b/gs/src/gdevbit.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* "Plain bits" devices to measure rendering time. */ #include "math_.h" #include "gdevprn.h" diff --git a/gs/src/gdevbj10.c b/gs/src/gdevbj10.c index 0e465cf65..7cb417b20 100644 --- a/gs/src/gdevbj10.c +++ b/gs/src/gdevbj10.c @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1995, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Canon Bubble Jet BJ-10e and BJ200 printer driver */ #include "gdevprn.h" diff --git a/gs/src/gdevbjc.h b/gs/src/gdevbjc.h index 515bb3f67..3d4422e0f 100644 --- a/gs/src/gdevbjc.h +++ b/gs/src/gdevbjc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ #ifndef gdevbjc_INCLUDED # define gdevbjc_INCLUDED diff --git a/gs/src/gdevbjcl.c b/gs/src/gdevbjcl.c index 0be4be64a..1bbdb20d2 100644 --- a/gs/src/gdevbjcl.c +++ b/gs/src/gdevbjcl.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Canon BJC command generation library */ #include "std.h" #include "gdevbjcl.h" diff --git a/gs/src/gdevbjcl.h b/gs/src/gdevbjcl.h index 82c7df7be..71e265064 100644 --- a/gs/src/gdevbjcl.h +++ b/gs/src/gdevbjcl.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Canon BJC command generation library interface */ /****** PRELIMINARY, SUBJECT TO CHANGE WITHOUT NOTICE. ******/ diff --git a/gs/src/gdevbmp.c b/gs/src/gdevbmp.c index 4aebc2ccc..fa7b540a4 100644 --- a/gs/src/gdevbmp.c +++ b/gs/src/gdevbmp.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* .BMP file format output drivers */ #include "gdevprn.h" #include "gdevpccm.h" diff --git a/gs/src/gdevbmp.h b/gs/src/gdevbmp.h index 487523c82..e67a5f033 100644 --- a/gs/src/gdevbmp.h +++ b/gs/src/gdevbmp.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* .BMP file format definitions and utility interfaces */ #ifndef gdevbmp_INCLUDED diff --git a/gs/src/gdevbmpa.c b/gs/src/gdevbmpa.c index f1add733e..736c76825 100644 --- a/gs/src/gdevbmpa.c +++ b/gs/src/gdevbmpa.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$ */ /* .BMP file format output drivers: Demo of ASYNC rendering */ /* Initial version 2/2/98 by John Desrosiers (soho@crl.com) */ diff --git a/gs/src/gdevbmpc.c b/gs/src/gdevbmpc.c index e674ed4cb..563600f1e 100644 --- a/gs/src/gdevbmpc.c +++ b/gs/src/gdevbmpc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* .BMP file format driver utilities */ #include "gdevprn.h" #include "gdevbmp.h" diff --git a/gs/src/gdevccr.c b/gs/src/gdevccr.c index 01a294efc..4dd95b006 100644 --- a/gs/src/gdevccr.c +++ b/gs/src/gdevccr.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* CalComp Raster Format driver */ #include "gdevprn.h" diff --git a/gs/src/gdevcd8.c b/gs/src/gdevcd8.c index 2a600c33b..3b1b1b530 100644 --- a/gs/src/gdevcd8.c +++ b/gs/src/gdevcd8.c @@ -27,13 +27,12 @@ copyright notice and this notice be preserved on all copies. */ +/*$RCSfile$ $Revision$*/ -/* gdevcd8.c */ - -/*---------------------------------------------------------------- - +/* A printer driver for the HP670, HP690, HP850, HP855 HP870, HP890, HP1100 and HP1600 color printers. + To be used with the Ghostscript printing system. Please report all problems to uliw@erdw.ethz.ch @@ -42,8 +41,7 @@ The support for the hp670, hp690, hp890 and hp1600 was added by Martin Gerbershagen. - --------------------------------------------------------------------*/ +*/ /* Note: Depending on how you transfered the files, you might need to remove some CR-codes used on intel-based machines: diff --git a/gs/src/gdevcdj.c b/gs/src/gdevcdj.c index e187e7972..921a12157 100644 --- a/gs/src/gdevcdj.c +++ b/gs/src/gdevcdj.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* H-P and Canon colour printer drivers */ /**************************************************************** diff --git a/gs/src/gdevcgm.c b/gs/src/gdevcgm.c index 16c7493ed..d65e3c1b1 100644 --- a/gs/src/gdevcgm.c +++ b/gs/src/gdevcgm.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CGM (Computer Graphics Metafile) driver */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevcgml.c b/gs/src/gdevcgml.c index 0c16e44b1..1b2911d66 100644 --- a/gs/src/gdevcgml.c +++ b/gs/src/gdevcgml.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CGM-writing library */ #include "memory_.h" #include "stdio_.h" diff --git a/gs/src/gdevcgml.h b/gs/src/gdevcgml.h index cc3184e6b..3891d9792 100644 --- a/gs/src/gdevcgml.h +++ b/gs/src/gdevcgml.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface definitions for CGM-writing library */ #ifndef gdevcgml_INCLUDED diff --git a/gs/src/gdevcgmx.h b/gs/src/gdevcgmx.h index bdabc6ffa..44f372637 100644 --- a/gs/src/gdevcgmx.h +++ b/gs/src/gdevcgmx.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal definitions for CGM-writing library */ #ifndef gdevcgmx_INCLUDED diff --git a/gs/src/gdevcif.c b/gs/src/gdevcif.c index baa21ff2d..67901b0d8 100644 --- a/gs/src/gdevcif.c +++ b/gs/src/gdevcif.c @@ -1,23 +1,13 @@ /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ +/* + CIF output driver -/* The `Fake bitmapped device to estimate rendering time' + The `Fake bitmapped device to estimate rendering time' slightly modified to produce CIF files from PostScript. So anyone can put a nice logo free on its chip! Frederic Petrot, petrot@masi.ibp.fr */ diff --git a/gs/src/gdevclj.c b/gs/src/gdevclj.c index 8451082ee..e5f70eb4b 100644 --- a/gs/src/gdevclj.c +++ b/gs/src/gdevclj.c @@ -1,24 +1,10 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ +/* $RCSfile$ $Revision$ */ /* - - * * H-P Color LaserJet 5/5M device; based on the PaintJet. */ #include "math_.h" @@ -31,7 +17,7 @@ typedef struct gx_device_clj_s gx_device_clj; struct gx_device_clj_s { gx_device_common; gx_prn_device_common; - int rotated; /* 0 = non-rotated, 1 = rotated */ + bool rotated; }; #define pclj ((gx_device_clj *)pdev) @@ -62,7 +48,6 @@ struct gx_device_clj_s { */ #define USE_FAST_MODE - /* X_DPI and Y_DPI must be the same */ #define X_DPI 300 #define Y_DPI 300 @@ -131,12 +116,16 @@ is_supported_resolution( return false; } +/* ---------------- Standard driver ---------------- */ + /* * Find the paper size information corresponding to a given pair of dimensions. * If rotatep != 0, *rotatep is set to true if the page must be rotated 90 * degrees to fit. * * A return value of 0 indicates the paper size is not supported. + * + * Note that for the standard driver, rotation is not allowed. */ private const clj_paper_size * get_paper_size( @@ -180,7 +169,7 @@ clj_get_initial_matrix( gx_device *pdev, gs_matrix *pmat) { floatp fs_res = pdev->HWResolution[0] / 72.0; floatp ss_res = pdev->HWResolution[1] / 72.0; - clj_paper_size *psize; + const clj_paper_size *psize; psize = get_paper_size(pdev->MediaSize, NULL); /* if the paper size is not recognized, not much can be done */ @@ -196,8 +185,6 @@ clj_get_initial_matrix( gx_device *pdev, gs_matrix *pmat) return; } - /* The 'rotated' flag is set in 'put_params' */ - /* all the pages are rotated, but we include code for both cases */ if (pclj->rotated) { pmat->xx = 0.0; pmat->xy = ss_res; @@ -216,52 +203,41 @@ clj_get_initial_matrix( gx_device *pdev, gs_matrix *pmat) } /* - * Special get_params routine, to fake MediaSize, width, and height if - * we were in a 'rotated' state. + * Get the media size being set by put_params, if any. Return 0 if no media + * size is being set, 1 (and set mediasize[]) if the size is being set, <0 + * on error. */ private int -clj_get_params( gx_device *pdev, gs_param_list *plist ) +clj_media_size(float mediasize[2], gs_param_list *plist) { - int code; + gs_param_float_array fres; + gs_param_float_array fsize; + gs_param_int_array hwsize; + int have_pagesize = 0; - /* First un-rotate the MediaSize, etc. if we were in a rotated mode */ - if (pclj->rotated) { - float ftmp; - int itmp; + if ( (param_read_float_array(plist, "HWResolution", &fres) == 0) && + !is_supported_resolution(fres.data) ) + return_error(gs_error_rangecheck); - ftmp = pdev->MediaSize[0]; - pdev->MediaSize[0] = pdev->MediaSize[1]; - pdev->MediaSize[1] = ftmp; - itmp = pdev->width; - pdev->width = pdev->height; - pdev->height = itmp; + if ( (param_read_float_array(plist, "PageSize", &fsize) == 0) || + (param_read_float_array(plist, ".MediaSize", &fsize) == 0) ) { + mediasize[0] = fsize.data[0]; + mediasize[1] = fsize.data[1]; + have_pagesize = 1; } - /* process the parameter list */ - code = gdev_prn_get_params(pdev, plist); - - /* Now re-rotate the page size if needed */ - if (pclj->rotated) { - float ftmp; - int itmp; - - ftmp = pdev->MediaSize[0]; - pdev->MediaSize[0] = pdev->MediaSize[1]; - pdev->MediaSize[1] = ftmp; - itmp = pdev->width; - pdev->width = pdev->height; - pdev->height = itmp; + if (param_read_int_array(plist, "HWSize", &hwsize) == 0) { + mediasize[0] = ((float)hwsize.data[0]) / fres.data[0]; + mediasize[1] = ((float)hwsize.data[1]) / fres.data[1]; + have_pagesize = 1; } - return code; + return have_pagesize; } /* - * Special put_params routine, to intercept changes in the MediaSize, and to - * make certain the desired MediaSize and HWResolution are supported. - * - * This function will rotate MediaSize if it is needed by the device in - * order to print this size page. + * Special put_params routine, to make certain the desired MediaSize and + * HWResolution are supported. */ private int clj_put_params( @@ -269,64 +245,17 @@ clj_put_params( gs_param_list * plist ) { - gs_param_float_array fres; - gs_param_float_array fsize; - gs_param_int_array hwsize; float mediasize[2]; - int code = 0; - int pagesize_flag = 0; - bool rotate = 0; - - if ( (param_read_float_array(plist, "HWResolution", &fres) == 0) && - !is_supported_resolution(fres.data) ) - return_error(gs_error_rangecheck); - - if ( (param_read_float_array(plist, "PageSize", &fsize) == 0) || - (param_read_float_array(plist, ".MediaSize", &fsize) == 0) ) { - mediasize[0] = fsize.data[0]; - mediasize[1] = fsize.data[1]; - pagesize_flag = 1; - } - - if (param_read_int_array(plist, "HWSize", &hwsize) == 0) { - mediasize[0] = ((float)hwsize.data[0]) / fres.data[0]; - mediasize[1] = ((float)hwsize.data[1]) / fres.data[1]; - pagesize_flag = 1; - } + bool rotate = false; + int have_pagesize = clj_media_size(mediasize, plist); - if (pagesize_flag) { - if (get_paper_size(mediasize, &rotate) == 0) + if (have_pagesize < 0) + return have_pagesize; + if (have_pagesize) { + if (get_paper_size(mediasize, &rotate) == 0 || rotate) return_error(gs_error_rangecheck); - if (rotate) { - /* We need to rotate the requested page size, so synthesize a new */ - /* parameter list in front of the requestor's list to force the */ - /* rotated page size. */ - gs_param_float_array pf_array; - gs_c_param_list alist; - float ftmp = mediasize[0]; - - mediasize[0] = mediasize[1]; - mediasize[1] = ftmp; - pf_array.data = mediasize; - pf_array.size = 2; - pf_array.persistent = false; - - gs_c_param_list_write(&alist, pdev->memory); - code = param_write_float_array((gs_param_list *)&alist, ".MediaSize", &pf_array); - gs_c_param_list_read(&alist); - - /* stick this synthesized parameter on the front of the existing list */ - gs_c_param_list_set_target(&alist, plist); - if ((code = gdev_prn_put_params(pdev, (gs_param_list *)&alist)) >= 0) - pclj->rotated = 1; - gs_c_param_list_release(&alist); - } } - - else - code = gdev_prn_put_params(pdev, plist); - - return code; + return gdev_prn_put_params(pdev, plist); } /* @@ -467,10 +396,9 @@ clj_print_page( cdata[2] = cdata[1] + clsize; - /* Imageable area is without the margins. Note that the actual rotation of */ - /* page size into pdev->width & height has been done. We just use rotate to */ - /* access the correct offsets. Color laserjet is always long edge feed, we */ - /* just include the non-rotated case for completeness. */ + /* Imageable area is without the margins. Note that the actual rotation + * of page size into pdev->width & height has been done. We just use + * rotate to access the correct offsets. */ if (pclj->rotated) { imageable_width = pdev->width - (2 * psize->offsets.x) * fs_res; imageable_height = pdev->height - (2 * psize->offsets.y) * ss_res; @@ -536,68 +464,172 @@ clj_print_page( } /* CLJ device methods */ -private gx_device_procs clj_procs = { - gdev_prn_open, /* open_device */ - clj_get_initial_matrix, /* get_initial matrix */ - NULL, /* sync_output */ - gdev_prn_output_page, /* output_page */ - gdev_prn_close, /* close_device */ - gdev_pcl_3bit_map_rgb_color, /* map_rgb_color */ - gdev_pcl_3bit_map_color_rgb, /* map_color_rgb */ - NULL, /* fill_rectangle */ - NULL, /* tile_rectangle */ - NULL, /* copy_mono */ - NULL, /* copy_color */ - NULL, /* obsolete draw_line */ - NULL, /* get_bits */ - clj_get_params, /* get_params */ - clj_put_params, /* put_params */ - NULL, /* map_cmyk_color */ - NULL, /* get_xfont_procs */ - NULL, /* get_xfont_device */ - NULL, /* map_rgb_alpha_color */ - gx_page_device_get_page_device, /* get_page_device */ - NULL, /* get_alpha_bits */ - NULL, /* copy_alpha */ - NULL, /* get_band */ - NULL, /* copy_rop */ - NULL, /* fill_path */ - NULL, /* stroke_path */ - NULL, /* fill_mask */ - NULL, /* fill_trapezoid */ - NULL, /* fill_parallelogram */ - NULL, /* fill_triangle */ - NULL, /* draw_thin_line */ - NULL, /* begin_image */ - NULL, /* image_data */ - NULL, /* end_image */ - NULL, /* strip_tile_rectangle */ - NULL, /* strip_copy_rop, */ - NULL, /* get_clipping_box */ - NULL, /* begin_typed_image */ - NULL, /* get_bits_rectangle */ - NULL, /* map_color_rgb_alpha */ - NULL, /* create_compositor */ - NULL, /* get_hardware_params */ - NULL /* text_begin */ +#define CLJ_PROCS(get_params, put_params)\ + gdev_prn_open, /* open_device */\ + clj_get_initial_matrix, /* get_initial matrix */\ + NULL, /* sync_output */\ + gdev_prn_output_page, /* output_page */\ + gdev_prn_close, /* close_device */\ + gdev_pcl_3bit_map_rgb_color, /* map_rgb_color */\ + gdev_pcl_3bit_map_color_rgb, /* map_color_rgb */\ + NULL, /* fill_rectangle */\ + NULL, /* tile_rectangle */\ + NULL, /* copy_mono */\ + NULL, /* copy_color */\ + NULL, /* obsolete draw_line */\ + NULL, /* get_bits */\ + get_params, /* get_params */\ + put_params, /* put_params */\ + NULL, /* map_cmyk_color */\ + NULL, /* get_xfont_procs */\ + NULL, /* get_xfont_device */\ + NULL, /* map_rgb_alpha_color */\ + gx_page_device_get_page_device /* get_page_device */ + +private gx_device_procs cljet5_procs = { + CLJ_PROCS(gdev_prn_get_params, clj_put_params) }; -/* the CLJ device */ +/* CLJ device structure */ +#define CLJ_DEVICE_BODY(procs, dname, rotated)\ + prn_device_body(\ + gx_device_clj,\ + procs, /* procedures */\ + dname, /* device name */\ + 110, /* width - will be overridden subsequently */\ + 85, /* height - will be overridden subsequently */\ + X_DPI, Y_DPI, /* resolutions - current must be the same */\ + 0.167, 0.167, /* margins (left, bottom, right, top */\ + 0.167, 0.167,\ + 3, /* num_components - 3 colors, 1 bit per pixel */\ + 8, /* depth - pack into bytes */\ + 1, 1, /* max_gray=max_component=1 */\ + 2, 2, /* dithered_grays=dithered_components=2 */ \ + clj_print_page /* routine to output page */\ +),\ + rotated /* rotated - may be overridden subsequently */ + gx_device_clj gs_cljet5_device = { -prn_device_body( - gx_device_clj, - clj_procs, /* procedures */ - "cljet5", /* device name */ - 110, /* width - will be overridden subsequently */ - 85, /* height - will be overridden subsequently */ - X_DPI, Y_DPI, /* resolutions - current must be the same */ - 0.167, 0.167, /* margins (left, bottom, right, top */ - 0.167, 0.167, - 3, /* num_components - 3 colors, 1 bit per pixel */ - 8, /* depth - pack into bytes */ - 1, 1, /* max_gray=max_component=1 */ - 2, 2, /* dithered_grays=dithered_components=2 */ - clj_print_page /* routine to output page */ -), - 1 /* rotated - will be overridden subsequently */ + CLJ_DEVICE_BODY(cljet5_procs, "cljet5", 0 /*false*/) +}; + +/* ---------------- Driver with page rotation ---------------- */ + +/* + * For use with certain PCL interpreters, which don't implement + * setpagedevice, we provide a version of this driver that attempts to + * handle page rotation at the driver level. This version breaks an + * invariant that all drivers must obey, namely, that drivers are not + * allowed to change the parameters passed by put_params (they can only + * accept or reject them). Consequently, this driver must not be used in + * any context other than these specific PCL interpreters. We support this + * hack only because these PCL interpreters can't be changed to handle page + * rotation properly. + */ + +/* + * Special get_params routine, to fake MediaSize, width, and height if + * we were in a 'rotated' state. + */ +private int +clj_pr_get_params( gx_device *pdev, gs_param_list *plist ) +{ + int code; + + /* First un-rotate the MediaSize, etc. if we were in a rotated mode */ + if (pclj->rotated) { + float ftmp; + int itmp; + + ftmp = pdev->MediaSize[0]; + pdev->MediaSize[0] = pdev->MediaSize[1]; + pdev->MediaSize[1] = ftmp; + itmp = pdev->width; + pdev->width = pdev->height; + pdev->height = itmp; + } + + /* process the parameter list */ + code = gdev_prn_get_params(pdev, plist); + + /* Now re-rotate the page size if needed */ + if (pclj->rotated) { + float ftmp; + int itmp; + + ftmp = pdev->MediaSize[0]; + pdev->MediaSize[0] = pdev->MediaSize[1]; + pdev->MediaSize[1] = ftmp; + itmp = pdev->width; + pdev->width = pdev->height; + pdev->height = itmp; + } + + return code; +} + +/* + * Special put_params routine, to intercept changes in the MediaSize, and to + * make certain the desired MediaSize and HWResolution are supported. + * + * This function will rotate MediaSize if it is needed by the device in + * order to print this size page. + */ + private int +clj_pr_put_params( + gx_device * pdev, + gs_param_list * plist +) +{ + float mediasize[2]; + int code = 0; + bool rotate = false; + int have_pagesize = clj_media_size(mediasize, plist); + + if (have_pagesize < 0) + return have_pagesize; + if (have_pagesize) { + if (get_paper_size(mediasize, &rotate) == 0) + return_error(gs_error_rangecheck); + if (rotate) { + /* We need to rotate the requested page size, so synthesize a new */ + /* parameter list in front of the requestor's list to force the */ + /* rotated page size. */ + gs_param_float_array pf_array; + gs_c_param_list alist; + float ftmp = mediasize[0]; + + mediasize[0] = mediasize[1]; + mediasize[1] = ftmp; + pf_array.data = mediasize; + pf_array.size = 2; + pf_array.persistent = false; + + gs_c_param_list_write(&alist, pdev->memory); + code = param_write_float_array((gs_param_list *)&alist, ".MediaSize", &pf_array); + gs_c_param_list_read(&alist); + + /* stick this synthesized parameter on the front of the existing list */ + gs_c_param_list_set_target(&alist, plist); + if ((code = gdev_prn_put_params(pdev, (gs_param_list *)&alist)) >= 0) + pclj->rotated = true; + gs_c_param_list_release(&alist); + } else { + if ((code = gdev_prn_put_params(pdev, plist)) >= 0) + pclj->rotated = false; + } + } else + code = gdev_prn_put_params(pdev, plist); + + return code; +} + +/* CLJ device methods -- se above for CLJ_PROCS */ +private gx_device_procs cljet5pr_procs = { + CLJ_PROCS(clj_pr_get_params, clj_pr_put_params) +}; + +/* CLJ device structure -- see above for CLJ_DEVICE_BODY */ +gx_device_clj gs_cljet5pr_device = { + CLJ_DEVICE_BODY(cljet5pr_procs, "cljet5pr", 1 /*true*/) }; diff --git a/gs/src/gdevcljc.c b/gs/src/gdevcljc.c index 45a1ec8f5..72bf24ccd 100644 --- a/gs/src/gdevcljc.c +++ b/gs/src/gdevcljc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* * H-P Color LaserJet 5/5M contone device; based on the gdevclj.c. */ diff --git a/gs/src/gdevcmap.c b/gs/src/gdevcmap.c index 2990f3bcf..058df669d 100644 --- a/gs/src/gdevcmap.c +++ b/gs/src/gdevcmap.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Special color mapping device */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gdevcmap.h b/gs/src/gdevcmap.h index 940013051..ce5912b02 100644 --- a/gs/src/gdevcmap.h +++ b/gs/src/gdevcmap.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to special color mapping device */ #ifndef gdevcmap_INCLUDED diff --git a/gs/src/gdevcp50.c b/gs/src/gdevcp50.c index dc7911092..3adbfe841 100644 --- a/gs/src/gdevcp50.c +++ b/gs/src/gdevcp50.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1994, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Mitsubishi CP50 color printer driver */ #include "gdevprn.h" #define ppdev ((gx_device_printer *)pdev) diff --git a/gs/src/gdevcslw.c b/gs/src/gdevcslw.c index c6b7192d4..cb5cffecc 100644 --- a/gs/src/gdevcslw.c +++ b/gs/src/gdevcslw.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CoStar LabelWriter II, II Plus driver for Ghostscript */ /* Contributed by Mike McCauley mikem@open.com.au */ diff --git a/gs/src/gdevdbit.c b/gs/src/gdevdbit.c index 16604b304..7bfe0b943 100644 --- a/gs/src/gdevdbit.c +++ b/gs/src/gdevdbit.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Default device bitmap copying implementation */ #include "gx.h" #include "gpcheck.h" @@ -413,6 +400,7 @@ gx_default_strip_tile_rectangle(gx_device * dev, const gx_strip_bitmap * tiles, int rwidth = tiles->rep_width; int rheight = tiles->rep_height; int shift = tiles->shift; + gs_id tile_id = tiles->id; fit_fill_xy(dev, x, y, w, h); @@ -421,8 +409,8 @@ gx_default_strip_tile_rectangle(gx_device * dev, const gx_strip_bitmap * tiles, int ptx, pty; const byte *ptp = tiles->data; - dlprintf3("[t]tile %dx%d raster=%d;", - tiles->size.x, tiles->size.y, tiles->raster); + dlprintf4("[t]tile %dx%d raster=%d id=%lu;", + tiles->size.x, tiles->size.y, tiles->raster, tiles->id); dlprintf6(" x,y=%d,%d w,h=%d,%d p=%d,%d\n", x, y, w, h, px, py); dlputs(""); @@ -481,53 +469,59 @@ gx_default_strip_tile_rectangle(gx_device * dev, const gx_strip_bitmap * tiles, else proc_color = 0, proc_mono = dev_proc(dev, copy_mono); -/****** SHOULD ALSO PASS id IF COPYING A FULL TILE ******/ -#define real_copy_tile(srcx, tx, ty, tw, th)\ +#define real_copy_tile(srcx, tx, ty, tw, th, id)\ code =\ (proc_color != 0 ?\ - (*proc_color)(dev, row, srcx, raster, gx_no_bitmap_id, tx, ty, tw, th) :\ - (*proc_mono)(dev, row, srcx, raster, gx_no_bitmap_id, tx, ty, tw, th, color0, color1));\ - if ( code < 0 ) return_error(code);\ + (*proc_color)(dev, row, srcx, raster, id, tx, ty, tw, th) :\ + (*proc_mono)(dev, row, srcx, raster, id, tx, ty, tw, th, color0, color1));\ + if (code < 0) return_error(code);\ return_if_interrupt() #ifdef DEBUG -#define copy_tile(srcx, tx, ty, tw, th)\ - if_debug5('t', " copy sx=%d => x=%d y=%d w=%d h=%d\n",\ - srcx, tx, ty, tw, th);\ - real_copy_tile(srcx, tx, ty, tw, th) +#define copy_tile(srcx, tx, ty, tw, th, tid)\ + if_debug6('t', " copy id=%lu sx=%d => x=%d y=%d w=%d h=%d\n",\ + tid, srcx, tx, ty, tw, th);\ + real_copy_tile(srcx, tx, ty, tw, th, tid) #else -#define copy_tile(srcx, tx, ty, tw, th)\ - real_copy_tile(srcx, tx, ty, tw, th) +#define copy_tile(srcx, tx, ty, tw, th, id)\ + real_copy_tile(srcx, tx, ty, tw, th, id) #endif if (ch >= h) { /* Shallow operation */ if (icw >= w) { /* Just one (partial) tile to transfer. */ - copy_tile(irx, x, y, w, h); + copy_tile(irx, x, y, w, h, + (w == width && h == height ? tile_id : + gs_no_bitmap_id)); } else { int ex = x + w; int fex = ex - width; int cx = x + icw; + ulong id = (h == height ? tile_id : gs_no_bitmap_id); - copy_tile(irx, x, y, icw, h); + copy_tile(irx, x, y, icw, h, gs_no_bitmap_id); while (cx <= fex) { - copy_tile(0, cx, y, width, h); + copy_tile(0, cx, y, width, h, id); cx += width; } if (cx < ex) { - copy_tile(0, cx, y, ex - cx, h); + copy_tile(0, cx, y, ex - cx, h, gs_no_bitmap_id); } } - } else if (icw >= w && shift == 0) { /* Narrow operation, no shift */ + } else if (icw >= w && shift == 0) { + /* Narrow operation, no shift */ int ey = y + h; int fey = ey - height; int cy = y + ch; + ulong id = (w == width ? tile_id : gs_no_bitmap_id); - copy_tile(irx, x, y, w, ch); + copy_tile(irx, x, y, w, ch, (ch == height ? id : gs_no_bitmap_id)); row = tiles->data; do { ch = (cy > fey ? ey - cy : height); - copy_tile(irx, x, cy, w, ch); + copy_tile(irx, x, cy, w, ch, + (ch == height ? id : gs_no_bitmap_id)); } while ((cy += ch) < ey); - } else { /* Full operation. If shift != 0, some scan lines */ + } else { + /* Full operation. If shift != 0, some scan lines */ /* may be narrow. We could test shift == 0 in advance */ /* and use a slightly faster loop, but right now */ /* we don't bother. */ @@ -536,17 +530,20 @@ gx_default_strip_tile_rectangle(gx_device * dev, const gx_strip_bitmap * tiles, int cx, cy; for (cy = y;;) { + ulong id = (ch == height ? tile_id : gs_no_bitmap_id); + if (icw >= w) { - copy_tile(irx, x, cy, w, ch); + copy_tile(irx, x, cy, w, ch, + (w == width ? id : gs_no_bitmap_id)); } else { - copy_tile(irx, x, cy, icw, ch); + copy_tile(irx, x, cy, icw, ch, gs_no_bitmap_id); cx = x + icw; while (cx <= fex) { - copy_tile(0, cx, cy, width, ch); + copy_tile(0, cx, cy, width, ch, id); cx += width; } if (cx < ex) { - copy_tile(0, cx, cy, ex - cx, ch); + copy_tile(0, cx, cy, ex - cx, ch, gs_no_bitmap_id); } } if ((cy += ch) >= ey) diff --git a/gs/src/gdevdcrd.c b/gs/src/gdevdcrd.c index 6548f9d72..1c9c7bff7 100644 --- a/gs/src/gdevdcrd.c +++ b/gs/src/gdevdcrd.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Create a sample device CRD */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/gdevdcrd.h b/gs/src/gdevdcrd.h index ddd8ed1dc..68eaf323e 100644 --- a/gs/src/gdevdcrd.h +++ b/gs/src/gdevdcrd.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface for creating a sample device CRD */ #ifndef gdevdcrd_INCLUDED diff --git a/gs/src/gdevddrw.c b/gs/src/gdevddrw.c index 5058e470d..abe7763d4 100644 --- a/gs/src/gdevddrw.c +++ b/gs/src/gdevddrw.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Default polygon and image drawing device procedures */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/gdevdfax.c b/gs/src/gdevdfax.c index 6759f1d76..8f12bc1bb 100644 --- a/gs/src/gdevdfax.c +++ b/gs/src/gdevdfax.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* DigiBoard fax device. */ /*** *** Note: this driver is maintained by a user: please contact diff --git a/gs/src/gdevdflt.c b/gs/src/gdevdflt.c index 0ea15bf82..040d698da 100644 --- a/gs/src/gdevdflt.c +++ b/gs/src/gdevdflt.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Default device implementation */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gdevdgbr.c b/gs/src/gdevdgbr.c index b5e5973b8..5880def9d 100644 --- a/gs/src/gdevdgbr.c +++ b/gs/src/gdevdgbr.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Default implementation of device get_bits[_rectangle] */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevdjet.c b/gs/src/gdevdjet.c index 6e155461f..ad519178a 100644 --- a/gs/src/gdevdjet.c +++ b/gs/src/gdevdjet.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* HP LaserJet/DeskJet driver for Ghostscript */ #include "gdevprn.h" #include "gdevpcl.h" diff --git a/gs/src/gdevdjtc.c b/gs/src/gdevdjtc.c index 77892b209..c25fa8806 100644 --- a/gs/src/gdevdjtc.c +++ b/gs/src/gdevdjtc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* HP DeskJet 500C driver */ #include "gdevprn.h" #include "gdevpcl.h" diff --git a/gs/src/gdevdm24.c b/gs/src/gdevdm24.c index 704eaf5ba..43e75d1b9 100644 --- a/gs/src/gdevdm24.c +++ b/gs/src/gdevdm24.c @@ -1,25 +1,12 @@ /* Copyright (C) 1992, 1996, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ #include "gdevprn.h" - +/*$RCSfile$ $Revision$*/ /* High-res 24Dot-matrix printer driver */ /* Supported printers diff --git a/gs/src/gdevdrop.c b/gs/src/gdevdrop.c index 8b114847f..6c6ac9276 100644 --- a/gs/src/gdevdrop.c +++ b/gs/src/gdevdrop.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Default and device-independent RasterOp algorithms */ #include "memory_.h" #include "gx.h" @@ -134,10 +121,11 @@ gx_default_strip_copy_rop(gx_device * dev, if (max_height == 0) max_height = 1; block_height = min(height, max_height); - gs_make_mem_device(&mdev, mdproto, 0, -1, dev); + gs_make_mem_device(&mdev, mdproto, mem, -1, dev); + gx_device_retain((gx_device *)&mdev, true); /* prevent freeing */ mdev.width = width; mdev.height = block_height; - mdev.bitmap_memory = mdev.memory = mem; + mdev.bitmap_memory = mem; mdev.color_info = dev->color_info; code = (*dev_proc(&mdev, open_device))((gx_device *)&mdev); if (code < 0) @@ -446,7 +434,8 @@ mem_default_strip_copy_rop(gx_device * dev, if (textures->size.y < block_height) block_height = textures->size.y; } - gs_make_mem_device(&mdev, mdproto, 0, -1, NULL); + gs_make_mem_device(&mdev, mdproto, mem, -1, NULL); + gx_device_retain((gx_device *)&mdev, true); /* prevent freeing */ mdev.width = width; mdev.height = block_height; mdev.color_info.num_components = rop_depth >> 3; diff --git a/gs/src/gdevegaa.asm b/gs/src/gdevegaa.asm index e54a08c83..0fc7f8bfa 100644 --- a/gs/src/gdevegaa.asm +++ b/gs/src/gdevegaa.asm @@ -1,21 +1,8 @@ ; Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. -; -; This file is part of Aladdin Ghostscript. -; -; Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -; or distributor accepts any responsibility for the consequences of using it, -; or for whether it serves any particular purpose or works at all, unless he -; or she says so in writing. Refer to the Aladdin Ghostscript Free Public -; License (the "License") for full details. -; -; Every copy of Aladdin Ghostscript must include a copy of the License, -; normally in a plain ASCII text file named PUBLIC. The License grants you -; the right to copy, modify and redistribute Aladdin Ghostscript, but only -; under certain conditions described in the License. Among other things, the -; License requires that the copyright notice and this notice be preserved on -; all copies. - +; This software is licensed to a single customer by Artifex Software Inc. +; under the terms of a specific OEM agreement. +; $RCSfile$ $Revision$ ; gdevegaasm.asm ; Assembly code for Ghostscript PC frame buffer driver diff --git a/gs/src/gdevemap.c b/gs/src/gdevemap.c index 799207c1c..5ec16a8b6 100644 --- a/gs/src/gdevemap.c +++ b/gs/src/gdevemap.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Mappings between StandardEncoding and ISOLatin1Encoding */ #include "std.h" diff --git a/gs/src/gdevepsc.c b/gs/src/gdevepsc.c index 0550c5e65..a75e9d7f9 100644 --- a/gs/src/gdevepsc.c +++ b/gs/src/gdevepsc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Epson color dot-matrix printer driver by dave@exlog.com */ #include "gdevprn.h" diff --git a/gs/src/gdevepsn.c b/gs/src/gdevepsn.c index 100ceda58..a799f75c0 100644 --- a/gs/src/gdevepsn.c +++ b/gs/src/gdevepsn.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989-1994, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* * Epson (and similar) dot-matrix printer driver for Ghostscript. * diff --git a/gs/src/gdevescp.c b/gs/src/gdevescp.c index 4936af07e..4cc55b540 100644 --- a/gs/src/gdevescp.c +++ b/gs/src/gdevescp.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* * Epson 'ESC/P 2' language printer driver. * diff --git a/gs/src/gdevevga.c b/gs/src/gdevevga.c index b3364dda3..a68eb6e28 100644 --- a/gs/src/gdevevga.c +++ b/gs/src/gdevevga.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* IBM PC EGA and VGA display drivers */ /* All of the real code is in gdevpcfb.c. */ #include "memory_.h" diff --git a/gs/src/gdevherc.c b/gs/src/gdevherc.c index 8194b39c3..963fff2f8 100644 --- a/gs/src/gdevherc.c +++ b/gs/src/gdevherc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* IBM PC-compatible Hercules Graphics display driver */ /* using direct access to frame buffer */ diff --git a/gs/src/gdevhit.c b/gs/src/gdevhit.c index 0113edbe9..faa51b80b 100644 --- a/gs/src/gdevhit.c +++ b/gs/src/gdevhit.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Hit detection device */ #include "std.h" #include "gserror.h" diff --git a/gs/src/gdevhl7x.c b/gs/src/gdevhl7x.c index e46571645..68e89928f 100644 --- a/gs/src/gdevhl7x.c +++ b/gs/src/gdevhl7x.c @@ -1,27 +1,17 @@ /* Copyright (C) 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - -/* gdevdhl7x.c */ -/* Brother HL 720 and 730 driver for Ghostscript */ -/* (owners of the 760 should use the HP driver) */ -/* The original code was borrowed from the */ -/* HP LaserJet/DeskJet driver for Ghostscript */ -/* The code specific to the Brother HL 720 was written by : + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ + +/* $RCSfile$ $Revision$ */ +/* + * Brother HL 720 and 730 driver for Ghostscript + * + * Note: for the HL 760, use the HP driver. + * + * The original code was borrowed from the + * HP LaserJet/DeskJet driver for Ghostscript. + * The code specific to the Brother HL 720 was written by : * Pierre-Olivier Gaillard (pierre.gaillard@hol.fr) * Thanks to the documentation kindly provided by : * Richard Thomas <RICHARDT@brother.co.uk> diff --git a/gs/src/gdevht.c b/gs/src/gdevht.c index fd2499ee7..e777636c8 100644 --- a/gs/src/gdevht.c +++ b/gs/src/gdevht.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Halftoning device implementation */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gdevht.h b/gs/src/gdevht.h index 16faa0261..62c63d3f9 100644 --- a/gs/src/gdevht.h +++ b/gs/src/gdevht.h @@ -1,22 +1,10 @@ /* Copyright (C) 1995, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Halftoning "device" definitions */ /* Requires gxdevice.h */ #ifndef gdevht_INCLUDED diff --git a/gs/src/gdevifno.c b/gs/src/gdevifno.c index 0cd2cf325..2bb3d6800 100644 --- a/gs/src/gdevifno.c +++ b/gs/src/gdevifno.c @@ -11,10 +11,13 @@ * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. */ +/* $RCSfile$ $Revision$ */ /* - * gdevifno.c: gs device to generate inferno bitmaps + * gs device to generate inferno bitmaps + * * Russ Cox <rsc@plan9.bell-labs.com>, 3/25/98 * Updated to fit in the standard GS distribution, 5/14/98 + * Comments edited for automatic TOC generation, 11/4/99 */ #include "gdevprn.h" diff --git a/gs/src/gdevimgn.c b/gs/src/gdevimgn.c index 7010383aa..ca59da19c 100644 --- a/gs/src/gdevimgn.c +++ b/gs/src/gdevimgn.c @@ -1,29 +1,14 @@ /* Copyright (C) 1992, 1993, 1994, 1996 by Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - - -/* ---------------------------------------------------------- */ -/* gdevimgn.c - version 1.4 */ -/* Imagen ImPRESS printer driver */ - -/* This driver uses the Impress bitmap operation to print the - page image. */ -/* -------------------------------------------------------- */ + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ + +/*$RCSfile$ $Revision$*/ +/* + * Imagen ImPRESS printer driver - version 1.4 + * + * This driver uses the Impress bitmap operation to print the page image. + */ /* Written by Alan Millar (AMillar@bolis.sf-bay.org) August 4 1992. Basic bitmap dump. */ diff --git a/gs/src/gdevjpeg.c b/gs/src/gdevjpeg.c index d080c9646..d9e911030 100644 --- a/gs/src/gdevjpeg.c +++ b/gs/src/gdevjpeg.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* JPEG output driver */ #include "stdio_.h" /* for jpeglib.h */ #include "jpeglib_.h" diff --git a/gs/src/gdevl256.c b/gs/src/gdevl256.c index e6c8eedda..b076ce6da 100644 --- a/gs/src/gdevl256.c +++ b/gs/src/gdevl256.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Ghostscript driver for 256-color VGA modes with Linux and vgalib */ /* This Driver was derived from the BGI-Driver. It was written only for my own purpose. I never planned to release it or send diff --git a/gs/src/gdevl31s.c b/gs/src/gdevl31s.c index 5fe275e69..7379d4542 100644 --- a/gs/src/gdevl31s.c +++ b/gs/src/gdevl31s.c @@ -1,22 +1,12 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$ */ /* + * H-P LaserJet 3100 driver + * * This is a driver for use with the H-P LaserJet 3100 Software. * It requires installed H-P LaserJet 3100 Software to print. * It can be used with smbclient to print from an UNIX box diff --git a/gs/src/gdevlbp8.c b/gs/src/gdevlbp8.c index 73fa7a7cf..4c6b4b8d8 100644 --- a/gs/src/gdevlbp8.c +++ b/gs/src/gdevlbp8.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1994, 1996, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Canon LBP-8II and LIPS III driver */ #include "gdevprn.h" diff --git a/gs/src/gdevlj56.c b/gs/src/gdevlj56.c index 0df723419..0face3587 100644 --- a/gs/src/gdevlj56.c +++ b/gs/src/gdevlj56.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* H-P LaserJet 5 & 6 drivers for Ghostscript */ #include "gdevprn.h" #include "gdevpcl.h" diff --git a/gs/src/gdevlp8k.c b/gs/src/gdevlp8k.c index 72059496b..7d1a8bddf 100644 --- a/gs/src/gdevlp8k.c +++ b/gs/src/gdevlp8k.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* EPSON LP-8000 ESC-sequence Laser Printer driver for Ghostscript. diff --git a/gs/src/gdevlxm.c b/gs/src/gdevlxm.c index c3f0384fa..09e88ef53 100644 --- a/gs/src/gdevlxm.c +++ b/gs/src/gdevlxm.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989-1994, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* * Lexmark 5700 ink-jet printer driver for Ghostscript * diff --git a/gs/src/gdevm1.c b/gs/src/gdevm1.c index eed078c60..f05a2d5bd 100644 --- a/gs/src/gdevm1.c +++ b/gs/src/gdevm1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Monobit "memory" (stored bitmap) device */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevm16.c b/gs/src/gdevm16.c index 2233a627c..87533c3c8 100644 --- a/gs/src/gdevm16.c +++ b/gs/src/gdevm16.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* 16-bit-per-pixel "memory" (stored bitmap) device */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevm2.c b/gs/src/gdevm2.c index 56ba80b7f..14e52ddc4 100644 --- a/gs/src/gdevm2.c +++ b/gs/src/gdevm2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* 2-bit-per-pixel "memory" (stored bitmap) device */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevm24.c b/gs/src/gdevm24.c index fd5802d27..92db04112 100644 --- a/gs/src/gdevm24.c +++ b/gs/src/gdevm24.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* 24-bit-per-pixel "memory" (stored bitmap) device */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevm32.c b/gs/src/gdevm32.c index 8d4e29760..a23009f2f 100644 --- a/gs/src/gdevm32.c +++ b/gs/src/gdevm32.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* 32-bit-per-pixel "memory" (stored bitmap) device */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevm4.c b/gs/src/gdevm4.c index 3bd753c43..a04ebb877 100644 --- a/gs/src/gdevm4.c +++ b/gs/src/gdevm4.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* 4-bit-per-pixel "memory" (stored bitmap) device */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevm8.c b/gs/src/gdevm8.c index f9422adc3..3130b2078 100644 --- a/gs/src/gdevm8.c +++ b/gs/src/gdevm8.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* 8-bit-per-pixel "memory" (stored bitmap) device */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevmeds.c b/gs/src/gdevmeds.c index 5ab9b0d2f..7d220d0ca 100644 --- a/gs/src/gdevmeds.c +++ b/gs/src/gdevmeds.c @@ -1,24 +1,14 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$ */ /* + * Media selection support for printer drivers + * * Select from a NULL terminated list of media the smallest medium which is - * allmost equal or larger then the actual imagesize. + * almost equal or larger then the actual imagesize. * * Written by Ulrich Schmid, uschmid@mail.hh.provi.de. */ diff --git a/gs/src/gdevmeds.h b/gs/src/gdevmeds.h index 0f6e34389..c0b2f3779 100644 --- a/gs/src/gdevmeds.h +++ b/gs/src/gdevmeds.h @@ -1,21 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$ */ /* Interface for gdevmeds.c */ #ifndef gdevmeds_INCLUDED diff --git a/gs/src/gdevmem.c b/gs/src/gdevmem.c index ccb8b4836..e3d54c803 100644 --- a/gs/src/gdevmem.c +++ b/gs/src/gdevmem.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic "memory" (stored bitmap) device */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevmem.h b/gs/src/gdevmem.h index 9d68987da..536672827 100644 --- a/gs/src/gdevmem.h +++ b/gs/src/gdevmem.h @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Private definitions for memory devices. */ #ifndef gdevmem_INCLUDED diff --git a/gs/src/gdevmgr.c b/gs/src/gdevmgr.c index 83af43fb3..515c13950 100644 --- a/gs/src/gdevmgr.c +++ b/gs/src/gdevmgr.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1994, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* MGR device driver */ #include "gdevprn.h" #include "gdevpccm.h" diff --git a/gs/src/gdevmgr.h b/gs/src/gdevmgr.h index 7fe3eb74d..c681732a9 100644 --- a/gs/src/gdevmgr.h +++ b/gs/src/gdevmgr.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Common header file for MGR devices */ #ifndef gdevmgr_INCLUDED diff --git a/gs/src/gdevmiff.c b/gs/src/gdevmiff.c index e3fdd78fd..69e470ff8 100644 --- a/gs/src/gdevmiff.c +++ b/gs/src/gdevmiff.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* MIFF file format driver */ #include "gdevprn.h" diff --git a/gs/src/gdevmpla.c b/gs/src/gdevmpla.c index c3869edf7..c84491a76 100644 --- a/gs/src/gdevmpla.c +++ b/gs/src/gdevmpla.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Any-depth planar "memory" (stored bitmap) device */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevmpla.h b/gs/src/gdevmpla.h index 031442428..86562ade9 100644 --- a/gs/src/gdevmpla.h +++ b/gs/src/gdevmpla.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to planar memory devices. */ #ifndef gdevmpla_INCLUDED diff --git a/gs/src/gdevmr1.c b/gs/src/gdevmr1.c index ec8ac77a4..b4eaead0e 100644 --- a/gs/src/gdevmr1.c +++ b/gs/src/gdevmr1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* RasterOp implementation for monobit memory devices */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevmr2n.c b/gs/src/gdevmr2n.c index 4652c4d50..b7f760e21 100644 --- a/gs/src/gdevmr2n.c +++ b/gs/src/gdevmr2n.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* RasterOp implementation for 2- and 4-bit memory devices */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevmr8n.c b/gs/src/gdevmr8n.c index 342ae7ecf..3296a276e 100644 --- a/gs/src/gdevmr8n.c +++ b/gs/src/gdevmr8n.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* RasterOp implementation for 8N-bit memory devices */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevmrop.h b/gs/src/gdevmrop.h index 800373957..407bb5faa 100644 --- a/gs/src/gdevmrop.h +++ b/gs/src/gdevmrop.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for device RasterOp implementations. */ /* Requires gxdevmem.h, gsropt.h */ diff --git a/gs/src/gdevmrun.c b/gs/src/gdevmrun.c index 35cf5dbbf..0e87e0c92 100644 --- a/gs/src/gdevmrun.c +++ b/gs/src/gdevmrun.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Run-length encoded memory device */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevmrun.h b/gs/src/gdevmrun.h index 8dac8d254..6734eba03 100644 --- a/gs/src/gdevmrun.h +++ b/gs/src/gdevmrun.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definition of run-length encoded memory device */ #ifndef gdevmrun_INCLUDED diff --git a/gs/src/gdevmswn.c b/gs/src/gdevmswn.c index f313ca9b5..16f4b8b93 100644 --- a/gs/src/gdevmswn.c +++ b/gs/src/gdevmswn.c @@ -1,24 +1,12 @@ /* Copyright (C) 1989, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* * Microsoft Windows 3.n driver for Ghostscript. + * * Original version by Russell Lang and Maurice Castro with help from * Programming Windows, 2nd Ed., Charles Petzold, Microsoft Press; * created from gdevbgi.c and gnuplot/term/win.trm 5th June 1992. diff --git a/gs/src/gdevmswn.h b/gs/src/gdevmswn.h index d53fe1617..5e75f3259 100644 --- a/gs/src/gdevmswn.h +++ b/gs/src/gdevmswn.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1994, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Shared definitions for Microsoft Windows 3.n drivers */ #ifndef gdevmswn_INCLUDED diff --git a/gs/src/gdevmsxf.c b/gs/src/gdevmsxf.c index ac28ffa71..9f1e38b88 100644 --- a/gs/src/gdevmsxf.c +++ b/gs/src/gdevmsxf.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* External font (xfont) implementation for Microsoft Windows. */ #include "ctype_.h" #include "math_.h" diff --git a/gs/src/gdevn533.c b/gs/src/gdevn533.c index 5be341901..166179a69 100644 --- a/gs/src/gdevn533.c +++ b/gs/src/gdevn533.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1990, 1991, 1993, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Sony NWP-533 driver for GhostScript */ #include "gdevprn.h" #define prn_dev ((gx_device_printer *)dev) /* needed in 5.31 et seq */ diff --git a/gs/src/gdevnfwd.c b/gs/src/gdevnfwd.c index ed82a0f04..afff89f92 100644 --- a/gs/src/gdevnfwd.c +++ b/gs/src/gdevnfwd.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Null and forwarding device implementation */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gdevo182.c b/gs/src/gdevo182.c index 2fb97446d..7c214157b 100644 --- a/gs/src/gdevo182.c +++ b/gs/src/gdevo182.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Okidata Microline 182 printer driver */ /* Contributed by Maarten Koning (smeg@bnr.ca) April 4, 1993 */ diff --git a/gs/src/gdevokii.c b/gs/src/gdevokii.c index f334fa3bb..572623f00 100644 --- a/gs/src/gdevokii.c +++ b/gs/src/gdevokii.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* * Okidata IBM compatible dot-matrix printer driver for Ghostscript. * diff --git a/gs/src/gdevos2p.c b/gs/src/gdevos2p.c index 620ae38e0..9f3104063 100644 --- a/gs/src/gdevos2p.c +++ b/gs/src/gdevos2p.c @@ -1,26 +1,13 @@ -/* Copyright (C) 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. +/* Copyright (C) 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* * OS/2 printer device - * by Russell Lang. - * Derived from mswinpr2 device by Russell Lang and + * + * By Russell Lang, derived from mswinpr2 device by Russell Lang and * L. Peter Deutsch, Aladdin Enterprises. */ diff --git a/gs/src/gdevp2up.c b/gs/src/gdevp2up.c index 20dd4a639..44284bff8 100644 --- a/gs/src/gdevp2up.c +++ b/gs/src/gdevp2up.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* A "2-up" PCX device for testing page objects. */ #include "gdevprn.h" #include "gdevpccm.h" diff --git a/gs/src/gdevpbm.c b/gs/src/gdevpbm.c index 885bf1288..7fb1f8b0a 100644 --- a/gs/src/gdevpbm.c +++ b/gs/src/gdevpbm.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Portable Bit/Gray/PixMap drivers */ #include "gdevprn.h" #include "gscdefs.h" diff --git a/gs/src/gdevpccm.c b/gs/src/gdevpccm.c index 3e073cf37..dfb2d314a 100644 --- a/gs/src/gdevpccm.c +++ b/gs/src/gdevpccm.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Support routines for PC color mapping */ #include "gx.h" #include "gsmatrix.h" /* for gxdevice.h */ diff --git a/gs/src/gdevpccm.h b/gs/src/gdevpccm.h index 2a1680a4b..be1f02d60 100644 --- a/gs/src/gdevpccm.h +++ b/gs/src/gdevpccm.h @@ -1,22 +1,10 @@ /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* PC color mapping support */ /* Requires gxdevice.h */ #ifndef gdevpccm_INCLUDED diff --git a/gs/src/gdevpcfb.c b/gs/src/gdevpcfb.c index 5e4afbedf..039b9847a 100644 --- a/gs/src/gdevpcfb.c +++ b/gs/src/gdevpcfb.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* IBM PC frame buffer (EGA/VGA) drivers */ #include "memory_.h" #include "gconfigv.h" /* for USE_ASM */ diff --git a/gs/src/gdevpcfb.h b/gs/src/gdevpcfb.h index 9d22ee5a4..e1775a634 100644 --- a/gs/src/gdevpcfb.h +++ b/gs/src/gdevpcfb.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* IBM PC frame buffer definitions */ #ifndef gdevpcfb_INCLUDED diff --git a/gs/src/gdevpcl.c b/gs/src/gdevpcl.c index 80f7be869..865087b47 100644 --- a/gs/src/gdevpcl.c +++ b/gs/src/gdevpcl.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1994, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Utilities for PCL printers */ #include "gdevprn.h" #include "gdevpcl.h" diff --git a/gs/src/gdevpcl.h b/gs/src/gdevpcl.h index 52c8bb716..7e4442da6 100644 --- a/gs/src/gdevpcl.h +++ b/gs/src/gdevpcl.h @@ -1,22 +1,10 @@ /* Copyright (C) 1992, 1994, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Support for PCL-based printer drivers */ /* Requires gdevprn.h */ #ifndef gdevpcl_INCLUDED diff --git a/gs/src/gdevpcx.c b/gs/src/gdevpcx.c index ab8de1e09..b7be84a09 100644 --- a/gs/src/gdevpcx.c +++ b/gs/src/gdevpcx.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PCX file format drivers */ #include "gdevprn.h" #include "gdevpccm.h" diff --git a/gs/src/gdevpdf.c b/gs/src/gdevpdf.c index 056b7baa3..5f8874878 100644 --- a/gs/src/gdevpdf.c +++ b/gs/src/gdevpdf.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PDF-writing driver */ #include "memory_.h" #include "string_.h" @@ -26,6 +13,11 @@ #include "gxdevice.h" #include "gdevpdfx.h" +/* Define the default language level and PDF compatibility level. */ +/* Acrobat 3 (PDF 1.2) is the default. */ +#define PSDF_VERSION_INITIAL psdf_version_level2 +#define PDF_COMPATIBILITY_LEVEL_INITIAL 1.2 + /* Define the names of the resource types. */ private const char *const resource_type_names[] = { pdf_resource_type_names @@ -47,6 +39,9 @@ private ENUM_PTRS_WITH(device_pdfwrite_enum_ptrs, gx_device_pdf *pdev) { index -= gx_device_pdf_num_ptrs + gx_device_pdf_num_strings; + if (index < PDF_NUM_STD_FONTS) + ENUM_RETURN(pdev->std_fonts[index].font); + index -= PDF_NUM_STD_FONTS; if (index < NUM_RESOURCE_TYPES * NUM_RESOURCE_CHAINS) ENUM_RETURN(pdev->resources[index / NUM_RESOURCE_CHAINS].chains[index % NUM_RESOURCE_CHAINS]); index -= NUM_RESOURCE_TYPES * NUM_RESOURCE_CHAINS; @@ -77,6 +72,8 @@ private RELOC_PTRS_WITH(device_pdfwrite_reloc_ptrs, gx_device_pdf *pdev) { int i, j; + for (i = 0; i < PDF_NUM_STD_FONTS; ++i) + RELOC_PTR(gx_device_pdf, std_fonts[i].font); for (i = 0; i < NUM_RESOURCE_TYPES; ++i) for (j = 0; j < NUM_RESOURCE_CHAINS; ++j) RELOC_PTR(gx_device_pdf, resources[i].chains[j]); @@ -157,10 +154,27 @@ const gx_device_pdf gs_pdfwrite_device = NULL, /* map_color_rgb_alpha */ NULL, /* create_compositor */ NULL, /* get_hardware_params */ - gdev_pdf_text_begin + /**************************************************************** + * + * Temporarily disable text handling in the PDF writer. We will + * re-enable it in the next beta release. + * + ****************************************************************/ + 0 /****** gdev_pdf_text_begin ******/ }, - psdf_initial_values(psdf_version_ll3, 0 /*false */ ), /* (!ASCII85EncodePages) */ - 1.3, /* CompatibilityLevel */ + psdf_initial_values(PSDF_VERSION_INITIAL, 0 /*false */ ), /* (!ASCII85EncodePages) */ + PDF_COMPATIBILITY_LEVEL_INITIAL, /* CompatibilityLevel */ +#ifdef POST60 + 0 /*false*/, /* Optimize */ + 0 /*false*/, /* ParseDSCCommentsForDocInfo */ + 0 /*false*/, /* ParseDSCComments */ + 0 /*false*/, /* EmitDSCWarnings */ + 0 /*false*/, /* CreateJobTicket */ + 0 /*false*/, /* PreserveEPSInfo */ + 0 /*false*/, /* AutoPositionEPSFile */ + 0 /*false*/, /* PreserveCopyPage */ + 0 /*false*/, /* UsePrologue */ +#endif 1 /*true */ , /* ReAssignCharacters */ 1 /*true */ , /* ReEncodeCharacters */ 1, /* FirstObjectNumber */ @@ -182,9 +196,8 @@ const gx_device_pdf gs_pdfwrite_device = 0, /* contents_length_id */ 0, /* contents_pos */ NoMarks, /* procsets */ - -1, /* flatness */ - {gx_line_params_initial}, /* line_params */ {pdf_text_state_default}, /* text */ + {{0}}, /* std_fonts */ {0}, /* space_char_ids */ 0, /* pages */ 0, /* num_pages */ @@ -567,19 +580,20 @@ pdf_close(gx_device * dev) long resource_pos; long Catalog_id = pdev->Catalog->id, Info_id = pdev->Info->id, Pages_id = pdev->Pages->id; + long Threads_id = 0; + bool partial_page = (pdev->contents_id != 0 && pdev->next_page != 0); /* - * If this is an EPS file, or if the file has produced no marks - * at all, we need to tidy up a little so as not to produce - * illegal PDF. We recognize EPS files as having some contents - * but no showpage. + * If this is an EPS file, or if the file didn't end with a showpage for + * some other reason, or if the file has produced no marks at all, we + * need to tidy up a little so as not to produce illegal PDF. However, + * if there is at least one complete page, we discard any leftover + * marks. */ - if (pdev->next_page == 0) { + if (pdev->next_page == 0) pdf_open_document(pdev); - if (pdev->contents_id != 0) { - pdf_close_page(pdev); - } - } + if (pdev->contents_id != 0) + pdf_close_page(pdev); /* Write the page objects. */ @@ -599,6 +613,9 @@ pdf_close(gx_device * dev) pdf_open_obj(pdev, Pages_id); s = pdev->strm; pputs(s, "<< /Type /Pages /Kids [\n"); + /* Omit the last page if it was incomplete. */ + if (partial_page) + --(pdev->next_page); { int i; @@ -636,16 +653,16 @@ pdf_close(gx_device * dev) /* Write the Catalog. */ - pdf_open_obj(pdev, Catalog_id); - s = pdev->strm; - pputs(s, "<<"); - pprintld1(s, "/Type /Catalog /Pages %ld 0 R\n", Pages_id); - if (pdev->outlines_id != 0) - pprintld1(s, "/Outlines %ld 0 R\n", pdev->outlines_id); + /* + * The PDF specification requires Threads to be an indirect object. + * Write the threads now, if any. + */ if (pdev->articles != 0) { pdf_article_t *part; - pputs(s, "/Threads [ "); + Threads_id = pdf_begin_obj(pdev); + s = pdev->strm; + pputs(s, "[ "); while ((part = pdev->articles) != 0) { pdev->articles = part->next; pprintld1(s, "%ld 0 R\n", part->contents->id); @@ -653,7 +670,16 @@ pdf_close(gx_device * dev) gs_free_object(mem, part, "pdf_close(article)"); } pputs(s, "]\n"); + pdf_end_obj(pdev); } + pdf_open_obj(pdev, Catalog_id); + s = pdev->strm; + pputs(s, "<<"); + pprintld1(s, "/Type /Catalog /Pages %ld 0 R\n", Pages_id); + if (pdev->outlines_id != 0) + pprintld1(s, "/Outlines %ld 0 R\n", pdev->outlines_id); + if (Threads_id) + pprintld1(s, "/Threads %ld 0 R\n", Threads_id); if (pdev->Dests) pprintld1(s, "/Dests %ld 0 R\n", pdev->Dests->id); cos_dict_elements_write(pdev->Catalog, pdev); diff --git a/gs/src/gdevpdfd.c b/gs/src/gdevpdfd.c index 143a71580..ba2bcc756 100644 --- a/gs/src/gdevpdfd.c +++ b/gs/src/gdevpdfd.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Path drawing procedures for pdfwrite driver */ #include "math_.h" #include "gx.h" @@ -211,9 +198,9 @@ gdev_pdf_fill_path(gx_device * dev, const gs_imager_state * pis, gx_path * ppath if (have_path) { stream *s = pdev->strm; - if (params->flatness != pdev->flatness) { + if (params->flatness != pdev->state.flatness) { pprintg1(s, "%g i\n", params->flatness); - pdev->flatness = params->flatness; + pdev->state.flatness = params->flatness; } gdev_vector_dopath((gx_device_vector *)pdev, ppath, gx_path_type_fill, NULL); diff --git a/gs/src/gdevpdff.c b/gs/src/gdevpdff.c index c34a8cbbf..3966e3938 100644 --- a/gs/src/gdevpdff.c +++ b/gs/src/gdevpdff.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Font handling for pdfwrite driver. */ #include "math_.h" #include "memory_.h" @@ -60,6 +47,8 @@ const pdf_standard_font_t pdf_standard_fonts[] = { {0} }; +/* ---------------- Standard fonts ---------------- */ + /* Return the index of a standard font name, or -1 if missing. */ private int pdf_find_standard_font(const byte *str, uint size) @@ -75,22 +64,76 @@ pdf_find_standard_font(const byte *str, uint size) } /* - * Return the index of a standard font with the same UID as a given font, - * or -1 if missing. + * Return the index of a standard font with the same appearance + * (CharStrings, Private, WeightVector) as a given font, or -1 if missing. */ private int -find_std_uid(const gx_device_pdf *pdev, const gs_font_base *bfont) +find_std_appearance(const gx_device_pdf *pdev, const gs_font_base *bfont, + int *psame) { + bool has_uid = uid_is_UniqueID(&bfont->UID) && bfont->UID.id != 0; + const pdf_std_font_t *psf = pdev->std_fonts; int i; - for (i = 0; i < PDF_NUM_STD_FONTS; ++i) - if (uid_equal(&bfont->UID, &pdev->text.std_fonts[i].uid)) { - return i; + for (i = 0; i < PDF_NUM_STD_FONTS; ++psf, ++i) { + if (has_uid) { + if (uid_equal(&bfont->UID, &psf->uid)) { + return i; + } + } else if (psf->font) { + int same = *psame = + bfont->procs.same_font((const gs_font *)bfont, psf->font, + FONT_SAME_OUTLINES | FONT_SAME_METRICS | + FONT_SAME_ENCODING); + + if (same & FONT_SAME_OUTLINES) + return i; } + } return -1; } /* + * We register the fonts in pdev->std_fonts so that the pointers can + * be weak (get set to 0 when the font is freed). + */ +private GS_NOTIFY_PROC(pdf_std_font_notify_proc); +typedef struct pdf_std_font_notify_s { + gx_device_pdf *pdev; + int index; /* in std_fonts */ + gs_font *font; /* for checking */ +} pdf_std_font_notify_t; +gs_private_st_ptrs2(st_pdf_std_font_notify, pdf_std_font_notify_t, + "pdf_std_font_notify_t", + pdf_std_font_notify_enum_ptrs, + pdf_std_font_notify_reloc_ptrs, + pdev, font); +private int +pdf_std_font_notify_proc(void *vpsfn /*proc_data*/, void *event_data) +{ + pdf_std_font_notify_t *const psfn = vpsfn; + gx_device_pdf *const pdev = psfn->pdev; + gs_font *const font = psfn->font; + + if (event_data) + return 0; /* unknown event */ + if_debug3('_', + "[_] notify 0x%lx: gs_font 0x%lx, index=%d\n", + (ulong)psfn, (ulong)font, psfn->index); +#ifdef DEBUG + if (pdev->std_fonts[psfn->index].font != font) + lprintf3("pdf_std_font_notify font = 0x%lx, std_fonts[%d] = 0x%lx\n", + (ulong)font, psfn->index, + (ulong)pdev->std_fonts[psfn->index].font); + else +#endif + pdev->std_fonts[psfn->index].font = 0; + gs_font_notify_unregister(font, pdf_std_font_notify_proc, vpsfn); + gs_free_object(pdev->pdf_memory, vpsfn, "pdf_std_font_notify_proc"); + return 0; +} + +/* * Scan a font directory for standard fonts. Return true if any new ones * were found. */ @@ -98,23 +141,36 @@ private bool scan_for_standard_fonts(gx_device_pdf *pdev, const gs_font_dir *dir) { bool found = false; - const gs_font *orig = dir->orig_fonts; + gs_font *orig = dir->orig_fonts; for (; orig; orig = orig->next) { - const gs_font_base *obfont; + gs_font_base *obfont; - if (orig->FontType == ft_composite) + if (orig->FontType == ft_composite || !orig->is_resource) continue; - obfont = (const gs_font_base *)orig; - if (uid_is_valid(&obfont->UID)) { + obfont = (gs_font_base *)orig; + if (uid_is_UniqueID(&obfont->UID)) { /* Is it one of the standard fonts? */ int i = pdf_find_standard_font(orig->key_name.chars, orig->key_name.size); - if (i >= 0 && !uid_equal(&pdev->text.std_fonts[i].uid, - &obfont->UID)) { - pdev->text.std_fonts[i].uid = obfont->UID; - pdev->text.std_fonts[i].orig_matrix = obfont->FontMatrix; + if (i >= 0 && pdev->std_fonts[i].font == 0) { + pdf_std_font_notify_t *psfn = + gs_alloc_struct(pdev->pdf_memory, pdf_std_font_notify_t, + &st_pdf_std_font_notify, + "scan_for_standard_fonts"); + + if (psfn == 0) + continue; /* can't register */ + psfn->pdev = pdev; + psfn->index = i; + psfn->font = orig; + if_debug3('_', "[_]register 0x%lx: gs_font 0x%lx, index=%d\n", + (ulong)psfn, (ulong)orig, i); + gs_font_notify_register(orig, pdf_std_font_notify_proc, psfn); + pdev->std_fonts[i].uid = obfont->UID; + pdev->std_fonts[i].orig_matrix = obfont->FontMatrix; + pdev->std_fonts[i].font = orig; found = true; } } @@ -137,23 +193,22 @@ pdf_find_orig_font(gx_device_pdf *pdev, gs_font *font, gs_const_string *pfname, return false; for (;; font = font->base) { gs_font_base *bfont = (gs_font_base *)font; - - if (uid_is_valid(&bfont->UID) && bfont->UID.id != 0) { - /* Look for a standard font with the same UID. */ - i = find_std_uid(pdev, bfont); - if (i >= 0) - goto ret; - if (scan) { - /* Scan for fonts with any of the standard names that */ - /* have a UID. */ - bool found = scan_for_standard_fonts(pdev, font->dir); - - scan = false; - if (found) { - i = find_std_uid(pdev, bfont); - if (i >= 0) - goto ret; - } + int same; + + /* Look for a standard font with the same appearance. */ + i = find_std_appearance(pdev, bfont, &same); + if (i >= 0) + goto ret; + if (scan) { + /* Scan for fonts with any of the standard names that */ + /* have a UID. */ + bool found = scan_for_standard_fonts(pdev, font->dir); + + scan = false; + if (found) { + i = find_std_appearance(pdev, bfont, &same); + if (i >= 0) + goto ret; } } if (font->base == font) @@ -162,13 +217,13 @@ pdf_find_orig_font(gx_device_pdf *pdev, gs_font *font, gs_const_string *pfname, ret: pfname->data = (const byte *)pdf_standard_fonts[i].fname; pfname->size = strlen((const char *)pfname->data); - *pfmat = pdev->text.std_fonts[i].orig_matrix; + *pfmat = pdev->std_fonts[i].orig_matrix; return true; } /* * Determine the embedding status of a font. If the font is in the base - * 14, store its index (0..13) in *pindex. + * 14, store its index (0..13) in *pindex, otherwise store -1 there. */ private bool font_is_symbolic(const gs_font *font) @@ -179,6 +234,7 @@ font_is_symbolic(const gs_font *font) case ENCODING_INDEX_STANDARD: case ENCODING_INDEX_ISOLATIN1: case ENCODING_INDEX_WINANSI: + case ENCODING_INDEX_MACROMAN: return false; default: return true; @@ -196,25 +252,36 @@ embed_list_includes(const gs_param_string_array *psa, const byte *chars, return false; } pdf_font_embed_t -pdf_font_embed_status(gx_device_pdf *pdev, gs_font *font, int *pindex) +pdf_font_embed_status(gx_device_pdf *pdev, gs_font *font, int *pindex, + int *psame) { const byte *chars = font->font_name.chars; uint size = font->font_name.size; + /* Check whether the font is in the base 14. */ int index = pdf_find_standard_font(chars, size); - /* Check whether the font is in the base 14. */ if (index >= 0) { *pindex = index; - return FONT_EMBED_BASE14; + if (font->is_resource) { + *psame = ~0; + return FONT_EMBED_BASE14; + } else if (font->FontType != ft_composite && + find_std_appearance(pdev, (gs_font_base *)font, + psame) == index) + return FONT_EMBED_BASE14; } + *pindex = -1; /* Check the Embed lists. */ - if ((pdev->params.EmbedAllFonts || font_is_symbolic(font) || - embed_list_includes(&pdev->params.AlwaysEmbed, chars, size)) && - !embed_list_includes(&pdev->params.NeverEmbed, chars, size)) + if (embed_list_includes(&pdev->params.NeverEmbed, chars, size)) + return FONT_EMBED_NO; + if (pdev->params.EmbedAllFonts || font_is_symbolic(font) || + embed_list_includes(&pdev->params.AlwaysEmbed, chars, size)) return FONT_EMBED_YES; - return FONT_EMBED_NO; + return FONT_EMBED_UNKNOWN; } +/* ---------------- Everything else ---------------- */ + /* Allocate a font resource. */ int pdf_alloc_font(gx_device_pdf *pdev, gs_id rid, pdf_font_t **ppfres, @@ -244,6 +311,8 @@ pdf_alloc_font(gx_device_pdf *pdev, gs_id rid, pdf_font_t **ppfres, memset((byte *)pfres + sizeof(pdf_resource_t), 0, sizeof(*pfres) - sizeof(pdf_resource_t)); sprintf(pfres->frname, "R%ld", pfres->object->id); + pfres->index = -1; + pfres->BaseEncoding = ENCODING_INDEX_UNKNOWN; /* -1 */ pfres->differences = 0; pfres->descriptor = pfd; pfres->char_procs = 0; @@ -259,7 +328,6 @@ pdf_add_encoding_difference(gx_device_pdf *pdev, pdf_font_t *ppf, int chr, pdf_encoding_element_t *pdiff = ppf->differences; if (pdiff == 0) { - ppf->diff_id = pdf_obj_ref(pdev); pdiff = gs_alloc_struct_array(pdev->pdf_memory, 256, pdf_encoding_element_t, &st_pdf_encoding_element, @@ -277,43 +345,51 @@ pdf_add_encoding_difference(gx_device_pdf *pdev, pdf_font_t *ppf, int chr, /* Get the width of a given character in a (base) font. */ int -pdf_char_width(pdf_font_t *ppf, int ch, gs_font *font, const gs_matrix *pmat, +pdf_char_width(pdf_font_t *ppf, int ch, gs_font *font, int *pwidth /* may be NULL */) { if (ch < 0 || ch > 255) return_error(gs_error_rangecheck); if (!(ppf->widths_known[ch >> 3] & (1 << (ch & 7)))) { - pdf_font_descriptor_t *pfd = ppf->descriptor; + gs_font_base *bfont = (gs_font_base *)font; + gs_glyph glyph = bfont->procs.encode_char(font, (gs_char)ch, + GLYPH_SPACE_INDEX); + int wmode = font->WMode; + gs_glyph_info_t info; + double w, v; + int code; - if (pfd == 0) - return_error(gs_error_rangecheck); - ppf->Widths[ch] = pfd->MissingWidth; - if (!(pfd->Flags & FONT_IS_FIXED_WIDTH)) { - gs_font_base *bfont = (gs_font_base *)font; - gs_glyph glyph = bfont->procs.encode_char(font, (gs_char)ch, - GLYPH_SPACE_INDEX); - - if (glyph != gs_no_glyph) { - int wmode = font->WMode; - gs_matrix smat; - gs_glyph_info_t info; - int code; - - /* See above re the following. */ - if (font->FontType == ft_TrueType) { - gs_make_scaling(1000.0, 1000.0, &smat); - pmat = &smat; - } - code = font->procs.glyph_info(font, glyph, pmat, - GLYPH_INFO_WIDTH0 << wmode, - &info); - - if (code < 0) - return code; - if (info.width[wmode].y != 0) - return_error(gs_error_rangecheck); - ppf->Widths[ch] = info.width[wmode].x; + if (glyph != gs_no_glyph && + (code = font->procs.glyph_info(font, glyph, NULL, + GLYPH_INFO_WIDTH0 << wmode, + &info)) >= 0 + ) { + if (wmode && (w = info.width[wmode].y) != 0) + v = info.width[wmode].x; + else + w = info.width[wmode].x, v = info.width[wmode].y; + if (v != 0) + return_error(gs_error_rangecheck); + if (font->FontType == ft_TrueType) { + /* TrueType fonts have 1 unit per em, we want 1000. */ + w *= 1000; + } + ppf->Widths[ch] = (int)w; + } else { + /* Try for MissingWidth. */ + static const gs_point tt_scale = {1000, 1000}; + const gs_point *pscale = 0; + gs_font_info_t finfo; + + if (font->FontType == ft_TrueType) { + /* TrueType fonts have 1 unit per em, we want 1000. */ + pscale = &tt_scale; } + code = font->procs.font_info(font, pscale, FONT_INFO_MISSING_WIDTH, + &finfo); + if (code < 0) + return code; + ppf->Widths[ch] = finfo.MissingWidth; } ppf->widths_known[ch >> 3] |= 1 << (ch & 7); } @@ -662,10 +738,13 @@ pdf_embed_font_type42(gx_device_pdf *pdev, pdf_font_descriptor_t *pfd, long length_id; long start; psdf_binary_writer writer; + /* Acrobat Reader 3 doesn't handle cmap format 6 correctly. */ + const int options = WRITE_TRUETYPE_CMAP | WRITE_TRUETYPE_NAME | + (pdev->CompatibilityLevel <= 1.2 ? + WRITE_TRUETYPE_NO_TRIMMED_TABLE : 0); swrite_position_only(&poss); -#define TRUETYPE_OPTIONS (WRITE_TRUETYPE_CMAP | WRITE_TRUETYPE_NAME) - code = psdf_write_truetype_font(&poss, font, TRUETYPE_OPTIONS, + code = psdf_write_truetype_font(&poss, font, options, subset_glyphs, subset_size, pfname); if (code < 0) return code; @@ -677,50 +756,13 @@ pdf_embed_font_type42(gx_device_pdf *pdev, pdf_font_descriptor_t *pfd, code = psdf_begin_binary((gx_device_psdf *)pdev, &writer); if (code < 0) return code; - psdf_write_truetype_font(pdev->strm, font, TRUETYPE_OPTIONS, + psdf_write_truetype_font(writer.strm, font, options, subset_glyphs, subset_size, pfname); -#undef TRUETYPE_OPTIONS psdf_end_binary(&writer); pdf_end_fontfile(pdev, start, length_id); return 0; } -/* - * Write out the CharProcs for a synthesized font. - * We thought that Acrobat 2.x required this to be an indirect object, - * but we were wrong. - */ -private int -pdf_write_char_procs(gx_device_pdf * pdev, const pdf_font_t * pef, - gs_int_rect * pbbox, int widths[256]) -{ - stream *s = pdev->strm; - const pdf_char_proc_t *pcp; - int w; - - pputs(s, "<<"); - /* Write real characters. */ - for (pcp = pef->char_procs; pcp; pcp = pcp->char_next) { - pbbox->p.y = min(pbbox->p.y, pcp->y_offset); - pbbox->q.x = max(pbbox->q.x, pcp->width); - pbbox->q.y = max(pbbox->q.y, pcp->height + pcp->y_offset); - widths[pcp->char_code] = pcp->x_width; - pprintld2(s, "/a%ld\n%ld 0 R", (long)pcp->char_code, - pcp->object->id); - } - /* Write space characters. */ - for (w = 0; w < countof(pef->spaces); ++w) { - byte ch = pef->spaces[w]; - - if (ch) { - pprintld2(s, "/a%ld\n%ld 0 R", (long)ch, - pdev->space_char_ids[w]); - widths[ch] = w + X_SPACE_MIN; - } - } - pputs(s, ">>"); - return 0; -} /* Write out the Widths for an embedded or synthesized font. */ private int @@ -730,7 +772,7 @@ pdf_write_widths(gx_device_pdf *pdev, int first, int last, stream *s = pdev->strm; int i; - pputs(s, "["); + pprintd2(s, "/FirstChar %d/LastChar %d/Widths[", first, last); for (i = first; i <= last; ++i) pprintd1(s, (i & 15 ? " %d" : ("\n%d")), widths[i]); pputs(s, "]\n"); @@ -761,21 +803,106 @@ pdf_write_synthesized_type3(gx_device_pdf *pdev, const pdf_font_t *pef) pdf_open_separate(pdev, pef->object->id); s = pdev->strm; pprints1(s, "<</Type/Font/Name/%s/Subtype/Type3", pef->frname); - pprintld1(s, "/Encoding %ld 0 R", pdev->embedded_encoding_id); - pprintd1(s, "/FirstChar 0/LastChar %d/CharProcs", - pef->num_chars - 1); - pdf_write_char_procs(pdev, pef, &bbox, widths); + pprintld1(s, "/Encoding %ld 0 R/CharProcs", pdev->embedded_encoding_id); + + /* Write the CharProcs. */ + { + const pdf_char_proc_t *pcp; + int w; + + pputs(s, "<<"); + /* Write real characters. */ + for (pcp = pef->char_procs; pcp; pcp = pcp->char_next) { + bbox.p.y = min(bbox.p.y, pcp->y_offset); + bbox.q.x = max(bbox.q.x, pcp->width); + bbox.q.y = max(bbox.q.y, pcp->height + pcp->y_offset); + widths[pcp->char_code] = pcp->x_width; + pprintld2(s, "/a%ld\n%ld 0 R", (long)pcp->char_code, + pcp->object->id); + } + /* Write space characters. */ + for (w = 0; w < countof(pef->spaces); ++w) { + byte ch = pef->spaces[w]; + + if (ch) { + pprintld2(s, "/a%ld\n%ld 0 R", (long)ch, + pdev->space_char_ids[w]); + widths[ch] = w + X_SPACE_MIN; + } + } + pputs(s, ">>"); + } + pdf_write_font_bbox(pdev, &bbox); - pputs(s, "/FontMatrix[1 0 0 1 0 0]/Widths"); + pputs(s, "/FontMatrix[1 0 0 1 0 0]"); pdf_write_widths(pdev, 0, pef->num_chars - 1, widths); pputs(s, ">>\n"); pdf_end_separate(pdev); return 0; } +/* Write a font descriptor. */ +private int +pdf_write_font_descriptor(gx_device_pdf *pdev, + const pdf_font_descriptor_t *pfd, int Flags, + const gs_const_string *pfname, + const char *FontFile_key) +{ +#define DESC_INT(str, memb)\ + {str, gs_param_type_int, offset_of(pdf_font_descriptor_t, memb)} + static const gs_param_item_t required_items[] = { + DESC_INT("Ascent", Ascent), + DESC_INT("CapHeight", CapHeight), + DESC_INT("Descent", Descent), + DESC_INT("ItalicAngle", ItalicAngle), + DESC_INT("StemV", StemV), + gs_param_item_end + }; + static const gs_param_item_t optional_items[] = { + DESC_INT("AvgWidth", AvgWidth), + DESC_INT("Leading", Leading), + DESC_INT("MaxWidth", MaxWidth), + DESC_INT("MissingWidth", MissingWidth), + DESC_INT("StemH", StemH), + DESC_INT("XHeight", XHeight), + gs_param_item_end + }; +#undef DESC_INT + param_printer_params_t params; + static const param_printer_params_t ppp_defaults = { + param_printer_params_default_values + }; + printer_param_list_t rlist; + gs_param_list *const plist = (gs_param_list *)&rlist; + + pdf_font_descriptor_t defaults; + stream *s; + int code; + + pdf_open_separate(pdev, pfd->id); + params = ppp_defaults; + s = pdev->strm; + code = s_init_param_printer(&rlist, ¶ms, s); + pputs(s, "<</Type/FontDescriptor/FontName"); + pdf_put_name(pdev, pfname->data, pfname->size); + gs_param_write_items(plist, pfd, NULL, required_items); + param_write_int(plist, "Flags", &Flags); + pdf_write_font_bbox(pdev, &pfd->FontBBox); + memset(&defaults, 0, sizeof(defaults)); + gs_param_write_items(plist, pfd, &defaults, optional_items); + s_release_param_printer(&rlist); + if (pfd->FontFile_id) { + pputs(s, FontFile_key); + pprintld1(s, " %ld 0 R", pfd->FontFile_id); + } + pputs(s, ">>\n"); + pdf_end_separate(pdev); + return 0; +} + /* - * Write a Type 1 or TrueType font resource, including any encoding - * differences and/or descriptor. + * Write a Type 1 or TrueType font resource, including Widths, Encoding, + * and/or FontDescriptor. */ private int pdf_write_font_resource(gx_device_pdf *pdev, const pdf_font_t *pef, @@ -783,23 +910,14 @@ pdf_write_font_resource(gx_device_pdf *pdev, const pdf_font_t *pef, { stream *s; const pdf_font_descriptor_t *pfd = pef->descriptor; - long widths_id = 0; - int first = 0, last = 255; - /* - * For embedded TrueType fonts, the PDF documentation doesn't specify - * how the Encoding interacts with the post and cmap tables. Macduff - * Hughes of Adobe says the only reliable way to get the desired output - * is not to use Encoding at all, but even this isn't adequate for - * non-Unicode-based fonts: right now it appears there is *no* way to - * get Acrobat to do the right thing. - */ - bool write_differences = - pef->differences != 0 && - (pfd == 0 || pfd->FontFile_id == 0 || pef->FontType != ft_TrueType); const char *FontFile_key; + int Flags; + int code; pdf_open_separate(pdev, pef->object->id); s = pdev->strm; + if (pfd) + Flags = pfd->Flags; switch (pef->FontType) { case ft_encrypted: pputs(s, "<</Subtype/Type1/BaseFont"); @@ -811,101 +929,104 @@ pdf_write_font_resource(gx_device_pdf *pdev, const pdf_font_t *pef, /****** WHAT ABOUT STYLE INFO? ******/ pdf_put_name(pdev, pfname->data, pfname->size); FontFile_key = "/FontFile2"; + /* + * Hack: make all embedded subset TrueType fonts "symbolic" to work + * around undocumented assumptions in Acrobat Reader. + */ + if (has_subset_prefix(pfname->data, pfname->size)) + Flags = (Flags & ~(FONT_IS_ADOBE_ROMAN)) | + FONT_IS_SYMBOLIC; break; default: return_error(gs_error_rangecheck); } pprintld1(s, "/Type/Font/Name/R%ld", pef->object->id); - if (write_differences) - pprintld1(s, "/Encoding %ld 0 R", pef->diff_id); - if (pfd) { - while (first < last && pef->Widths[first] == pfd->MissingWidth) - ++first; - while (last > first && pef->Widths[last] == pfd->MissingWidth) - --last; - widths_id = pdf_obj_ref(pdev); - pprintld2(s, "/FontDescriptor %ld 0 R/Widths %ld 0 R", - pfd->id, widths_id); - pprintd2(s, "/FirstChar %d/LastChar %d", first, last); - } - pputs(s, ">>\n"); - if (write_differences) { - int prev = 256; - int i; + if (pfd) + pprintld1(s, "/FontDescriptor %ld 0 R", pfd->id); + if (pef->index < 0 || pef->differences) { + /* + * Among the many problems in the PDF 1.3 documentation is the + * omission of the following interesting fact: FirstChar and + * LastChar are *not* simply a way to strip off initial and final + * entries in the Widths array that are equal to MissingWidth. + * Acrobat Reader assumes that characters with codes less than + * FirstChar or greater than LastChar are undefined, without + * bothering to consult the Encoding. Therefore, the implicit value + * of MissingWidth is pretty useless, because there must be explicit + * Width entries for every character in the font that is every used. + */ + int first = 0, last = 248; + byte first_byte, last_byte; - pdf_end_separate(pdev); - pdf_open_separate(pdev, pef->diff_id); - pputs(s, "<</Type/Encoding/Differences["); - for (i = 0; i < 256; ++i) - if (pef->differences[i].str.data != 0) { - if (i != prev + 1) - pprintd1(s, "\n%d", i); - pdf_put_name(pdev, - pef->differences[i].str.data, - pef->differences[i].str.size); - prev = i; - } - pputs(s, "]>>\n"); + while (first <= last && (first_byte = pef->chars_used[first >> 3]) == 0) + first += 8; + while (last >= first && (last_byte = pef->chars_used[last >> 3]) == 0) + last -= 8; + /* + * At this point, either first > last, which indicates that none of + * the characters in the font were used (unusual to say the least, + * but must be handled correctly), or first_byte and last_byte are + * both non-zero. + */ + if (first > last) { + /* + * None of the characters in the font were used. This is + * unusual, to say the least, but must be handled correctly. + */ + first = last = 0; + } else { + while (!(first_byte & 1)) + first_byte >>= 1, ++first; + for (last += 7; !(last_byte & 0x80);) + last_byte <<= 1, --last; + } + pdf_write_widths(pdev, first, last, pef->Widths); } - if (pfd) { -#define DESC_INT(str, memb)\ - {str, gs_param_type_int, offset_of(pdf_font_descriptor_t, memb)} - static const gs_param_item_t required_items[] = { - DESC_INT("Ascent", Ascent), - DESC_INT("CapHeight", CapHeight), - DESC_INT("Descent", Descent), - DESC_INT("ItalicAngle", ItalicAngle), - DESC_INT("StemV", StemV), - DESC_INT("Flags", Flags), - gs_param_item_end - }; - static const gs_param_item_t optional_items[] = { - DESC_INT("AvgWidth", AvgWidth), - DESC_INT("Leading", Leading), - DESC_INT("MaxWidth", MaxWidth), - DESC_INT("MissingWidth", MissingWidth), - DESC_INT("StemH", StemH), - DESC_INT("XHeight", XHeight), - gs_param_item_end - }; -#undef DESC_INT - param_printer_params_t params; - static const param_printer_params_t ppp_defaults = { - param_printer_params_default_values - }; - printer_param_list_t rlist; - gs_param_list *const plist = (gs_param_list *)&rlist; - pdf_font_descriptor_t defaults; - int code; + if (pef->BaseEncoding >= 0 || pef->differences) { + long diff_id = pdf_obj_ref(pdev); + pprintld1(s, "/Encoding %ld 0 R>>\n", diff_id); pdf_end_separate(pdev); - pdf_open_separate(pdev, widths_id); - pdf_write_widths(pdev, first, last, pef->Widths); - pdf_end_separate(pdev); - pdf_open_separate(pdev, pfd->id); - params = ppp_defaults; - code = s_init_param_printer(&rlist, ¶ms, pdev->strm); - pputs(s, "<</Type/FontDescriptor/FontName"); - pdf_put_name(pdev, pfname->data, pfname->size); - gs_param_write_items(plist, pfd, NULL, required_items); - pdf_write_font_bbox(pdev, &pfd->FontBBox); - memset(&defaults, 0, sizeof(defaults)); - gs_param_write_items(plist, pfd, &defaults, optional_items); - s_release_param_printer(&rlist); - if (pfd->FontFile_id) { - pputs(s, FontFile_key); - pprintld1(s, " %ld 0 R", pfd->FontFile_id); + pdf_open_separate(pdev, diff_id); + s = pdev->strm; + pputs(s, "<</Type/Encoding"); + if (pef->BaseEncoding >= 0) { + static const char *const encoding_names[] = { + KNOWN_REAL_ENCODING_NAMES + }; + + pprints1(s, "/BaseEncoding/%s", encoding_names[pef->BaseEncoding]); + } + if (pef->differences) { + int prev = 256; + int i; + + pputs(s, "/Differences["); + for (i = 0; i < 256; ++i) + if (pef->differences[i].str.data != 0) { + if (i != prev + 1) + pprintd1(s, "\n%d", i); + pdf_put_name(pdev, + pef->differences[i].str.data, + pef->differences[i].str.size); + prev = i; + } + pputs(s, "]"); } - pputs(s, ">>\n"); } + pputs(s, ">>\n"); pdf_end_separate(pdev); + if (pfd) { + code = pdf_write_font_descriptor(pdev, pfd, Flags, pfname, FontFile_key); + if (code < 0) + return code; + } return 0; } /* * Write the FontFile* data for an embedded font. - * Return a rangecheck error if the font can't be embedded. - */ + * Return a rangecheck error if the font can't be embedded. */ private int pdf_write_embedded_font(gx_device_pdf *pdev, pdf_font_descriptor_t *pfd, pdf_font_t *ppf, gs_font *font) @@ -931,8 +1052,7 @@ pdf_write_embedded_font(gx_device_pdf *pdev, pdf_font_descriptor_t *pfd, &ignore_glyph), index != 0); ) ++total; - /* Test used / total >= MaxSubsetPct / 100 */ - if (used * 100 >= pdev->params.MaxSubsetPct * total) + if ((double)used / total >= pdev->params.MaxSubsetPct / 100.0) do_subset = false; else { subset_size = psdf_subset_glyphs(subset_glyphs, font, @@ -996,6 +1116,8 @@ pdf_register_font(gx_device_pdf *pdev, gs_font *font, pdf_font_t *ppf) return_error(gs_error_VMerror); pfn->pdev = pdev; pfn->pdfont = ppf; + if_debug3('_', "[_]register 0x%lx: pdf_font_t 0x%lx, gs_font 0x%lx\n", + (ulong)pfn, (ulong)ppf, (ulong)font); ppf->font = font; return gs_font_notify_register(font, pdf_font_notify_proc, pfn); } @@ -1013,6 +1135,9 @@ pdf_font_notify_proc(void *vpfn /*proc_data*/, void *event_data) if (event_data) return 0; /* unknown event */ + if_debug4('_', + "[_] notify 0x%lx: pdf_font_t 0x%lx, gs_font 0x%lx, skip=%d\n", + (ulong)pfn, (ulong)ppf, (ulong)font, ppf->skip); /* * HACK: temporarily patch the font's memory to one that we know is * available even during GC or restore. (Eventually we need to fix diff --git a/gs/src/gdevpdfi.c b/gs/src/gdevpdfi.c index 2703abe6c..bbe2aced2 100644 --- a/gs/src/gdevpdfi.c +++ b/gs/src/gdevpdfi.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Image handling for PDF-writing driver */ #include "math_.h" #include "memory_.h" @@ -46,6 +33,8 @@ extern const gs_color_space_type gs_color_space_type_Indexed; extern stream_state_proc_get_params(s_DCTE_get_params, stream_DCT_state); extern stream_state_proc_get_params(s_CF_get_params, stream_CF_state); +#define MAX_INLINE_IMAGE_BYTES 4000 + /* ---------------- Utilities ---------------- */ /* ------ Images ------ */ @@ -483,7 +472,8 @@ typedef struct pdf_image_writer_s { /* Begin writing an image. */ private int -pdf_begin_write_image(gx_device_pdf * pdev, pdf_image_writer * piw, bool in_line) +pdf_begin_write_image(gx_device_pdf * pdev, pdf_image_writer * piw, + gx_bitmap_id id, bool in_line) { if (in_line) { stream *s = pdev->strm; @@ -493,14 +483,14 @@ pdf_begin_write_image(gx_device_pdf * pdev, pdf_image_writer * piw, bool in_line piw->pin = &image_names_short; piw->begin_data = (pdev->binary_ok ? "ID " : "ID\n"); } else { - int code = pdf_begin_resource(pdev, resourceXObject, gs_no_id, - &piw->pres); + int code = pdf_begin_resource(pdev, resourceXObject, id, &piw->pres); stream *s = pdev->strm; if (code < 0) return code; + piw->pres->rid = id; piw->length_id = pdf_obj_ref(pdev); - pprintld1(s, " /Subtype /Image /Length %ld 0 R\n", + pprintld1(s, "/Subtype/Image/Length %ld 0 R\n", piw->length_id); piw->pin = &image_names_full; piw->begin_data = ">>\nstream\n"; @@ -551,12 +541,14 @@ pdf_end_write_image(gx_device_pdf * pdev, pdf_image_writer * piw) /* Put out a reference to an image resource. */ private int pdf_do_image(gx_device_pdf * pdev, const pdf_resource_t * pres, - const gs_matrix * pimat) + const gs_matrix * pimat, bool in_contents) { - int code = pdf_open_contents(pdev, PDF_IN_STREAM); + if (in_contents) { + int code = pdf_open_contents(pdev, PDF_IN_STREAM); - if (code < 0) - return code; + if (code < 0) + return code; + } if (pimat) pdf_put_image_matrix(pdev, pimat); pprintld1(pdev->strm, "/R%ld Do\nQ\n", pres->object->id); @@ -628,7 +620,7 @@ pdf_copy_mono(gx_device_pdf *pdev, w, h + y_offset); pprintd3(pdev->strm, "%d 0 0 %d 0 %d cm\n", w, h, y_offset); - code = pdf_begin_write_image(pdev, &writer, true); + code = pdf_begin_write_image(pdev, &writer, gs_no_id, true); if (code < 0) return code; pcp->rid = id; @@ -669,27 +661,28 @@ pdf_copy_mono(gx_device_pdf *pdev, pdf_make_bitmap_image(&image, x, y, w, h); { ulong nbytes = (ulong) ((w + 7) >> 3) * h; - bool in_line = nbytes <= 4000; + bool in_line = nbytes <= MAX_INLINE_IMAGE_BYTES; if (in_line) pdf_put_image_matrix(pdev, &image.ImageMatrix); code = pdf_open_page(pdev, PDF_IN_STREAM); if (code < 0) return code; - code = pdf_begin_write_image(pdev, &writer, in_line); + code = pdf_begin_write_image(pdev, &writer, gs_no_id, in_line); if (code < 0) return code; } - wr: /* - * There are 3 different cases at this point: - * - Writing an in-line image (pres == 0, writer.pres == 0); - * - Writing an XObject image (pres == 0, writer.pres != 0); - * - Writing the image for a CharProc (pres != 0). - * We handle them with in-line code followed by a switch, - * rather than making the shared code into a procedure, - * simply because there would be an awful lot of parameters - * that would need to be passed. - */ + wr: + /* + * There are 3 different cases at this point: + * - Writing an in-line image (pres == 0, writer.pres == 0); + * - Writing an XObject image (pres == 0, writer.pres != 0); + * - Writing the image for a CharProc (pres != 0). + * We handle them with in-line code followed by a switch, + * rather than making the shared code into a procedure, + * simply because there would be an awful lot of parameters + * that would need to be passed. + */ psdf_begin_binary((gx_device_psdf *) pdev, &writer.binary); if (pres) { /* Always use CCITTFax 2-D for character bitmaps. */ @@ -731,7 +724,8 @@ pdf_copy_mono(gx_device_pdf *pdev, case 1: return 0; case 0: - return pdf_do_image(pdev, writer.pres, &image.ImageMatrix); + return pdf_do_image(pdev, writer.pres, &image.ImageMatrix, + true); } } pputs(pdev->strm, "\nEI\n"); @@ -763,11 +757,13 @@ gdev_pdf_copy_mono(gx_device * dev, zero, one, NULL); } -/* Copy a color bitmap. */ +/* Copy a color bitmap. for_pattern = -1 means put the image in-line, */ +/* 1 means put the image in a resource. */ private int pdf_copy_color_data(gx_device_pdf * pdev, const byte * base, int sourcex, - int raster, int x, int y, int w, int h, - gs_image_t *pim, pdf_image_writer *piw, bool for_pattern) + int raster, gx_bitmap_id id, int x, int y, int w, int h, + gs_image_t *pim, pdf_image_writer *piw, + int for_pattern) { int depth = pdev->color_info.depth; int bytes_per_pixel = depth >> 3; @@ -777,6 +773,7 @@ pdf_copy_color_data(gx_device_pdf * pdev, const byte * base, int sourcex, int code; const byte *row_base; int row_step; + bool in_line; switch(bytes_per_pixel) { case 3: gs_cspace_init_DeviceRGB(&cs); break; @@ -795,13 +792,28 @@ pdf_copy_color_data(gx_device_pdf * pdev, const byte * base, int sourcex, */ row_base = base + (h - 1) * raster; row_step = -raster; - pputs(pdev->strm, "q "); + in_line = for_pattern < 0; } else { row_base = base; row_step = raster; + in_line = nbytes <= MAX_INLINE_IMAGE_BYTES; pdf_put_image_matrix(pdev, &pim->ImageMatrix); + /* + * Check whether we've already made an XObject resource for this + * image. + */ + if (id != gx_no_bitmap_id) { + piw->pres = pdf_find_resource_by_gs_id(pdev, resourceXObject, id); + if (piw->pres) + return 0; + } } - code = pdf_begin_write_image(pdev, piw, nbytes <= 4000); + /* + * We have to be able to control whether to put Pattern images in line, + * to avoid trying to create an XObject resource while we're in the + * middle of writing a Pattern resource. + */ + code = pdf_begin_write_image(pdev, piw, id, in_line); if (code < 0) return code; psdf_begin_binary((gx_device_psdf *) pdev, &piw->binary); @@ -839,15 +851,15 @@ gdev_pdf_copy_color(gx_device * dev, const byte * base, int sourcex, return code; /* Make sure we aren't being clipped. */ pdf_put_clip_path(pdev, NULL); - code = pdf_copy_color_data(pdev, base, sourcex, raster, x, y, w, h, - &image, &writer, false); + code = pdf_copy_color_data(pdev, base, sourcex, raster, id, x, y, w, h, + &image, &writer, 0); switch (code) { default: return code; /* error */ case 1: return 0; case 0: - return pdf_do_image(pdev, writer.pres, &image.ImageMatrix); + return pdf_do_image(pdev, writer.pres, NULL, true); } } @@ -881,6 +893,8 @@ gdev_pdf_strip_tile_rectangle(gx_device * dev, const gx_strip_bitmap * tiles, { gx_device_pdf *const pdev = (gx_device_pdf *) dev; int tw = tiles->rep_width, th = tiles->rep_height; + double xscale = pdev->HWResolution[0] / 72.0, + yscale = pdev->HWResolution[1] / 72.0; pdf_resource_t *pres; if (tiles->id == gx_no_bitmap_id || tiles->shift != 0 || @@ -903,33 +917,66 @@ gdev_pdf_strip_tile_rectangle(gx_device * dev, const gx_strip_bitmap * tiles, pres = pdf_find_resource_by_gs_id(pdev, resourcePattern, tiles->id); if (!pres) { /* Create the Pattern resource. */ - int code = pdf_begin_resource(pdev, resourcePattern, tiles->id, &pres); - long length_id, start, end; + int code; + long image_id, length_id, start, end; stream *s; gs_image_t image; pdf_image_writer writer; + long image_bytes = (long)tw * th * pdev->color_info.depth; + bool in_line = image_bytes <= MAX_INLINE_IMAGE_BYTES; + ulong tile_id = + (tw == tiles->size.x && th == tiles->size.y ? tiles->id : + gx_no_bitmap_id); + if (in_line) + image_id = 0; + else if (image_bytes > 65500) { + /* + * Acrobat Reader can't handle image Patterns with more than + * 64K of data. :-( + */ + goto use_default; + } else { + /* Write out the image as an XObject resource now. */ + code = pdf_copy_color_data(pdev, tiles->data, 0, tiles->raster, + tile_id, 0, 0, tw, th, &image, &writer, + 1); + if (code < 0) + goto use_default; + image_id = writer.pres->object->id; + } + code = pdf_begin_resource(pdev, resourcePattern, tiles->id, &pres); if (code < 0) goto use_default; s = pdev->strm; length_id = pdf_obj_ref(pdev); - pputs(s, "/PatternType 1/PaintType 1/TilingType 1\n"); - pputs(s, "/Resources<</ProcSet[/PDF/ImageC]>>\n"); + pputs(s, "/PatternType 1/PaintType 1/TilingType 1/Resources<<\n"); + if (image_id) + pprintld2(s, "/XObject<</R%ld %ld 0 R>>", image_id, image_id); + pputs(s, "/ProcSet[/PDF/ImageC]>>\n"); /* * Because of bugs in Acrobat Reader's Print function, we can't use * the natural BBox and Step here: they have to be 1. */ - pprintld1(s, "/BBox[0 0 1 1]/XStep 1/YStep 1/Length %ld 0 R>>stream\n", length_id); + pprintg6(s, "/Matrix[%g %g %g %g %g %g]", xscale, 0.0, 0.0, + yscale, 0.0, 0.0); + pprintld1(s, "/BBox[0 0 1 1]/XStep 1/YStep 1/Length %ld 0 R>>stream\n", + length_id); start = pdf_stell(pdev); - code = pdf_copy_color_data(pdev, tiles->data, 0, tiles->raster, - 0, 0, tw, th, &image, &writer, true); - switch (code) { - default: - return code; /* error */ - case 1: - break; - case 0: - pdf_do_image(pdev, writer.pres, &image.ImageMatrix); + if (image_id) + pprintld1(s, "/R%ld Do\n", image_id); + else { + code = pdf_copy_color_data(pdev, tiles->data, 0, tiles->raster, + tile_id, 0, 0, tw, th, &image, &writer, + -1); + switch (code) { + default: + return code; /* error */ + case 1: + break; + case 0: /* not possible */ + return_error(gs_error_Fatal); + } } end = pdf_stell(pdev); pputs(s, "endstream\n"); @@ -941,12 +988,12 @@ gdev_pdf_strip_tile_rectangle(gx_device * dev, const gx_strip_bitmap * tiles, /* Fill the rectangle with the Pattern. */ { int code = pdf_open_page(pdev, PDF_IN_STREAM); - double xscale = pdev->HWResolution[0] / 72.0, - yscale = pdev->HWResolution[1] / 72.0; stream *s; if (code < 0) goto use_default; + /* Make sure we aren't being clipped. */ + pdf_put_clip_path(pdev, NULL); s = pdev->strm; /* * Because of bugs in Acrobat Reader's Print function, we can't @@ -1117,7 +1164,8 @@ gdev_pdf_begin_image(gx_device * dev, } nbytes = (((ulong) pie->width * pie->bits_per_pixel + 7) >> 3) * pie->rows_left; - code = pdf_begin_write_image(pdev, &pie->writer, nbytes <= 4000); + code = pdf_begin_write_image(pdev, &pie->writer, gs_no_id, + nbytes <= MAX_INLINE_IMAGE_BYTES); if (code < 0) return code; psdf_begin_binary((gx_device_psdf *) pdev, &pie->writer.binary); @@ -1219,7 +1267,7 @@ pdf_image_end_image(gx_image_enum_common_t * info, bool draw_last) return 0; case 0:; } - code = pdf_do_image(pdev, pie->writer.pres, NULL); + code = pdf_do_image(pdev, pie->writer.pres, NULL, true); gs_free_object(pie->memory, pie, "pdf_end_image"); return code; } diff --git a/gs/src/gdevpdfm.c b/gs/src/gdevpdfm.c index f6532b293..69a76253c 100644 --- a/gs/src/gdevpdfm.c +++ b/gs/src/gdevpdfm.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* pdfmark processing for PDF-writing driver */ #include "memory_.h" #include "string_.h" @@ -255,6 +242,8 @@ pdfmark_make_rect(char str[MAX_RECT_STRING], const gs_rect * prect) * /A << /S /Thread /D yyy' >> * /Action /GoTo => drop the Action key * Also, \n in Contents strings must be replaced with \r. + * Note that for Thread actions, the Dest is not a real destination, + * and must not be processed as one. * * We always treat /A and /F as equivalent to /Action and /File * respectively. The pdfmark and PDF documentation is so confused on the @@ -281,6 +270,7 @@ pdfmark_put_ao_pairs(gx_device_pdf * pdev, cos_dict_t *pcd, uint i; int code; char dest[MAX_DEST_STRING]; + bool coerce_dest = false; Dest.data = 0; if (!for_outline) { @@ -315,7 +305,7 @@ pdfmark_put_ao_pairs(gx_device_pdf * pdev, cos_dict_t *pcd, File = pair; else if (pdf_key_eq(pair, "/Dest")) { Dest = pair[1]; - pdfmark_coerce_dest(&Dest, dest); + coerce_dest = true; } else if (pdf_key_eq(pair, "/Page") || pdf_key_eq(pair, "/View")) { /* Make a destination even if this is for an outline. */ @@ -325,6 +315,7 @@ pdfmark_put_ao_pairs(gx_device_pdf * pdev, cos_dict_t *pcd, if (code < 0) return code; param_string_from_string(Dest, dest); + coerce_dest = false; } } else if (pdf_key_eq(pair, "/Subtype")) Subtype = pair[1]; @@ -403,11 +394,15 @@ pdfmark_put_ao_pairs(gx_device_pdf * pdev, cos_dict_t *pcd, /* We aren't sure whether this is really needed.... */ cos_dict_put_c_strings(adict, pdev, "/Type", "/Action"); } - if (pdf_key_eq(Action + 1, "/Article")) + if (pdf_key_eq(Action + 1, "/Article")) { cos_dict_put_c_strings(adict, pdev, "/S", "/Thread"); + coerce_dest = false; /* Dest is not a real destination */ + } else pdfmark_put_c_pair(pdev, adict, "/S", Action + 1); if (Dest.data) { + if (coerce_dest) + pdfmark_coerce_dest(&Dest, dest); pdfmark_put_c_pair(pdev, adict, "/D", &Dest); Dest.data = 0; /* so we don't write it again */ } @@ -418,7 +413,7 @@ pdfmark_put_ao_pairs(gx_device_pdf * pdev, cos_dict_t *pcd, cos_dict_put(pcd, pdev, (const byte *)"/A", 2, COS_OBJECT_VALUE(&avalue, adict)); } else if (asize >= 4 && !memcmp(astr, "<<", 2)) { - /* Replace occurrences of /Dest, /File, /Subtype. */ + /* Replace occurrences of /Dest, /File, and /Subtype. */ const byte *scan = astr + 2; const byte *end = astr + asize; gs_param_string key, value; @@ -459,8 +454,11 @@ pdfmark_put_ao_pairs(gx_device_pdf * pdev, cos_dict_t *pcd, * simply write it at the top level. This doesn't seem right, * but I'm not sure what else to do. */ - if (Dest.data) + if (Dest.data) { + if (coerce_dest) + pdfmark_coerce_dest(&Dest, dest); pdfmark_put_c_pair(pdev, pcd, "/Dest", &Dest); + } if (File) pdfmark_put_pair(pdev, pcd, File); if (Subtype.data) @@ -730,14 +728,16 @@ pdfmark_ARTICLE(gx_device_pdf * pdev, gs_param_string * pairs, uint count, bead_id = pdf_obj_ref(pdev); /* Find the article with this title, or create one. */ -#if 0 /****** FIX THIS ******/ - for (part = pdev->articles; part != 0; part = part->next) - if (!bytes_compare(part->title.data, part->title.size, + for (part = pdev->articles; part != 0; part = part->next) { + const cos_value_t *a_title = + cos_dict_find(part->contents, (const byte *)"/Title", 6); + + if (a_title != 0 && !a_title->is_object && + !bytes_compare(a_title->contents.chars.data, + a_title->contents.chars.size, title.data, title.size)) break; -#else /****** FIX THIS ******/ - part = 0; -#endif /****** FIX THIS ******/ + } if (part == 0) { /* Create the article. */ cos_dict_t *contents = cos_dict_alloc(mem, "pdfmark_ARTICLE(contents)"); @@ -854,7 +854,9 @@ ps_source_ok(const gs_param_string * psource) ) return true; else { - lprintf1("bad PS passthrough: %s\n", psource->data); + lprintf("bad PS passthrough: "); + fwrite(psource->data, 1, psource->size, estderr); + fputs("\n", estderr); return false; } } @@ -1225,7 +1227,7 @@ pdfmark_PUTSTREAM(gx_device_pdf * pdev, gs_param_string * pairs, uint count, cos_object_t *pco; int code, i; - if (count != 2) + if (count < 2) return_error(gs_error_rangecheck); if ((code = pdf_get_named(pdev, &pairs[0], cos_type_stream, &pco)) < 0) return code; diff --git a/gs/src/gdevpdfo.c b/gs/src/gdevpdfo.c index 3f1ee8e89..c10258b5f 100644 --- a/gs/src/gdevpdfo.c +++ b/gs/src/gdevpdfo.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Cos object support */ #include "memory_.h" #include "string_.h" diff --git a/gs/src/gdevpdfo.h b/gs/src/gdevpdfo.h index bd124c10d..1031c1f9e 100644 --- a/gs/src/gdevpdfo.h +++ b/gs/src/gdevpdfo.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal definitions for "objects" for pdfwrite driver. */ #ifndef gdevpdfo_INCLUDED diff --git a/gs/src/gdevpdfp.c b/gs/src/gdevpdfp.c index 7b1313afe..3291e4d0c 100644 --- a/gs/src/gdevpdfp.c +++ b/gs/src/gdevpdfp.c @@ -1,32 +1,22 @@ /* Copyright (C) 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Get/put parameters for PDF-writing driver */ #include "gx.h" #include "gserrors.h" #include "gdevpdfx.h" #include "gsparamx.h" +#ifdef POST60 +#include "memory_.h" /* should be first */ +#endif /* * The pdfwrite device supports the following "real" parameters: * OutputFile <string> - * all the Distiller parameters -- see gdevpsdp.c + * all the Distiller parameters (also see gdevpsdp.c) * Only some of the Distiller parameters actually have any effect. * * The device also supports the following write-only pseudo-parameters that @@ -36,7 +26,31 @@ * pdfmark - see gdevpdfm.c */ +#ifdef POST60 +private const int CoreDistVersion = 4000; /* Distiller 4.0 */ +private const gs_param_item_t pdf_param_items[] = { +#define pi(key, type, memb) { key, type, offset_of(gx_device_pdf, memb) } + /* Acrobat Distiller 4 parameters */ + pi("Optimize", gs_param_type_bool, Optimize), + pi("ParseDSCCommentsForDocInfo", gs_param_type_bool, + ParseDSCCommentsForDocInfo), + pi("ParseDSCComments", gs_param_type_bool, ParseDSCComments), + pi("EmitDSCWarnings", gs_param_type_bool, EmitDSCWarnings), + pi("CreateJobTicket", gs_param_type_bool, CreateJobTicket), + pi("PreserveEPSInfo", gs_param_type_bool, PreserveEPSInfo), + pi("AutoPositionEPSFile", gs_param_type_bool, AutoPositionEPSFile), + pi("PreserveCopyPage", gs_param_type_bool, PreserveCopyPage), + pi("UsePrologue", gs_param_type_bool, UsePrologue), + /* Ghostscript-specific parameters */ + pi("ReAssignCharacters", gs_param_type_bool, ReAssignCharacters), + pi("ReEncodeCharacters", gs_param_type_bool, ReEncodeCharacters), + pi("FirstObjectNumber", gs_param_type_long, FirstObjectNumber), +#undef pi + gs_param_item_end +}; +#else private const int CoreDistVersion = 3000; /* Distiller 3.0 */ +#endif /* ---------------- Get parameters ---------------- */ @@ -45,19 +59,23 @@ int gdev_pdf_get_params(gx_device * dev, gs_param_list * plist) { gx_device_pdf *pdev = (gx_device_pdf *) dev; + float cl = (float)pdev->CompatibilityLevel; int code = gdev_psdf_get_params(dev, plist); + int cdv = CoreDistVersion; if (code < 0 || - (code = param_write_float(plist, "CompatibilityLevel", - &pdev->CompatibilityLevel)) < 0 || - (code = param_write_int(plist, "CoreDistVersion", - (int *)&CoreDistVersion)) < 0 || + (code = param_write_int(plist, "CoreDistVersion", &cdv)) < 0 || + (code = param_write_float(plist, "CompatibilityLevel", &cl)) < 0 || +#ifdef POST60 + (code = gs_param_write_items(plist, pdev, NULL, pdf_param_items)) < 0 +#else (code = param_write_bool(plist, "ReAssignCharacters", &pdev->ReAssignCharacters)) < 0 || (code = param_write_bool(plist, "ReEncodeCharacters", &pdev->ReEncodeCharacters)) < 0 || (code = param_write_long(plist, "FirstObjectNumber", &pdev->FirstObjectNumber)) < 0 +#endif ); return code; } @@ -71,12 +89,16 @@ gdev_pdf_put_params(gx_device * dev, gs_param_list * plist) gx_device_pdf *pdev = (gx_device_pdf *) dev; int ecode = 0; int code; - float cl = pdev->CompatibilityLevel; +#ifdef POST60 + gx_device_pdf save_dev; +#else + float cl = (float)pdev->CompatibilityLevel; bool rac = pdev->ReAssignCharacters; bool rec = pdev->ReEncodeCharacters; long fon = pdev->FirstObjectNumber; - gs_param_name param_name; psdf_version save_version = pdev->version; +#endif + gs_param_name param_name; /* * If this is a pseudo-parameter (show or pdfmark), @@ -104,15 +126,6 @@ gdev_pdf_put_params(gx_device * dev, gs_param_list * plist) /* General parameters. */ - switch (code = param_read_float(plist, (param_name = "CompatibilityLevel"), &cl)) { - default: - ecode = code; - param_signal_error(plist, param_name, ecode); - case 0: - case 1: - break; - } - { int cdv = CoreDistVersion; @@ -121,6 +134,71 @@ gdev_pdf_put_params(gx_device * dev, gs_param_list * plist) param_signal_error(plist, param_name, ecode = gs_error_rangecheck); } +#ifdef POST60 + save_dev = *pdev; + code = gs_param_read_items(plist, pdev, pdf_param_items); + if (code < 0) + ecode = code; + { + /* + * Setting FirstObjectNumber is only legal if the file + * has just been opened and nothing has been written, + * or if we are setting it to the same value. + */ + long fon = pdev->FirstObjectNumber; + + if (fon != save_dev.FirstObjectNumber) { + if (fon <= 0 || fon > 0x7fff0000 || + (pdev->next_id != 0 && + pdev->next_id != + save_dev.FirstObjectNumber + pdf_num_initial_ids) + ) { + ecode = gs_error_rangecheck; + param_signal_error(plist, "FirstObjectNumber", ecode); + } + } + } + if (ecode < 0) + goto fail; + /* + * We have to set version to the new value, because the set of + * legal parameter values for psdf_put_params varies according to + * the version. + */ + pdev->version = + (pdev->CompatibilityLevel < 1.2 ? psdf_version_level2 : + psdf_version_ll3); + ecode = gdev_psdf_put_params(dev, plist); + if (ecode < 0) + goto fail; + if (pdev->FirstObjectNumber != save_dev.FirstObjectNumber) { + if (pdev->xref.file != 0) { + fseek(pdev->xref.file, 0L, SEEK_SET); + pdf_initialize_ids(pdev); + } + } + return 0; + fail: + /* Restore all the parameters to their original state. */ + pdev->version = save_dev.version; + { + const gs_param_item_t *ppi = pdf_param_items; + + for (; ppi->key; ++ppi) + memcpy((char *)pdev + ppi->offset, + (char *)&save_dev + ppi->offset, + gs_param_type_sizes[ppi->type]); + } + return ecode; +#else + switch (code = param_read_float(plist, (param_name = "CompatibilityLevel"), &cl)) { + default: + ecode = code; + param_signal_error(plist, param_name, ecode); + case 0: + case 1: + break; + } ecode = param_put_bool(plist, "ReAssignCharacters", &rac, ecode); ecode = param_put_bool(plist, "ReEncodeCharacters", &rec, ecode); switch (code = param_read_long(plist, (param_name = "FirstObjectNumber"), &fon)) { @@ -161,7 +239,8 @@ gdev_pdf_put_params(gx_device * dev, gs_param_list * plist) pdev->version = save_version; return code; } - pdev->CompatibilityLevel = cl; + /* Handle the float/double mismatch. */ + pdev->CompatibilityLevel = (int)(cl * 10 + 0.5) / 10.0; pdev->ReAssignCharacters = rac; pdev->ReEncodeCharacters = rec; if (fon != pdev->FirstObjectNumber) { @@ -172,4 +251,5 @@ gdev_pdf_put_params(gx_device * dev, gs_param_list * plist) } } return 0; +#endif } diff --git a/gs/src/gdevpdfr.c b/gs/src/gdevpdfr.c index 3ad08875d..32c2ef8fa 100644 --- a/gs/src/gdevpdfr.c +++ b/gs/src/gdevpdfr.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Named object pdfmark processing */ #include "memory_.h" #include "string_.h" diff --git a/gs/src/gdevpdft.c b/gs/src/gdevpdft.c index e67324700..c9c7039b4 100644 --- a/gs/src/gdevpdft.c +++ b/gs/src/gdevpdft.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Text handling for PDF-writing driver. */ #include "math_.h" #include "memory_.h" @@ -34,12 +21,19 @@ #include "scommon.h" /* - * When a base font is selected, we have several alternatives for how to - * handle characters whose encoding doesn't match their encoding in the base - * font's built-in encoding. If a character's glyph doesn't match the - * character's glyph in the encoding built up so far, we check if the font - * has that glyph at all; if not, we fall back to a bitmap. Otherwise, we - * use one or both of the following algorithms: + * The PDF documentation does a pretty shoddy job of specifying use of fonts + * beyond the base 14, and on top of that, Acrobat Reader has some serious + * bugs. Specifically, Acrobat Reader 3's Print function has a bug that + * make re-encoded characters print as blank if the font is substituted (not + * embedded or one of the base 14). + * + * We do have to handle re-encoded Type 1 fonts, because TeX output makes + * constant use of them. We have several alternatives for how to handle + * characters whose encoding doesn't match their encoding in the base font's + * built-in encoding. If a character's glyph doesn't match the character's + * glyph in the encoding built up so far, we check if the font has that + * glyph at all; if not, we fall back to a bitmap. Otherwise, we use one or + * both of the following algorithms: * * 1. If this is the first time a character at this position has been * seen, assign its glyph to that position in the encoding. @@ -59,11 +53,9 @@ * it is important that strings be searchable, but some non-searchable * strings can be tolerated, the defaults are appropriate. If searchability * is not important, set ReAssignCharacters to false. - * - * Acrobat Reader 3's Print function has a bug that make re-encoded - * characters print as blank if the font is substituted (not embedded). - * Therefore, if CompatibilityLevel <= 1.2, for non-embedded fonts, no - * substitutions or re-encodings are allowed. + * + * Because of the AR3 printing bug, if CompatibilityLevel <= 1.2, for + * non-embedded non-base fonts, no substitutions or re-encodings are allowed. */ /* Forward references */ @@ -96,10 +88,6 @@ typedef struct pdf_text_process_state_s { pdf_font_t *pdfont; } pdf_text_process_state_t; -/* Forward references */ -private int pdf_encode_char(P4(gx_device_pdf *pdev, int chr, - gs_font_base *bfont, pdf_font_t *ppf)); - /* Define the auxiliary procedures for text processing. */ private int pdf_text_resync(gs_text_enum_t *pte, const gs_text_enum_t *pfrom) @@ -273,7 +261,7 @@ pdf_update_text_state(pdf_text_process_state_t *ppts, const pdf_text_enum_t *pen /* Compute the scaling matrix and combined matrix. */ gs_matrix_invert(&orig_matrix, &smat); - gs_matrix_multiply(&font->FontMatrix, &smat, &smat); + gs_matrix_multiply(&smat, &font->FontMatrix, &smat); tmat = ctm_only(penum->pis); tmat.tx = tmat.ty = 0; gs_matrix_multiply(&smat, &tmat, &tmat); @@ -319,20 +307,74 @@ pdf_update_text_state(pdf_text_process_state_t *ppts, const pdf_text_enum_t *pen if (ppf == 0 || ppf->skip) { int index = -1; pdf_font_t ftemp; + int BaseEncoding = ENCODING_INDEX_UNKNOWN; /* -1 */ + int same = 0; + pdf_font_embed_t embed = + pdf_font_embed_status(pdev, font, &index, &same); + bool have_widths = false; - switch (pdf_font_embed_status(pdev, font, &index)) { + /* + * Compute the font descriptor now, to ensure that all the widths + * are available. + */ + switch (embed) { case FONT_EMBED_YES: + /* + * HACK: Acrobat Reader 3 has a bug that makes cmap formats 4 + * and 6 not work in embedded TrueType fonts. Consequently, it + * can only handle embedded TrueType fonts if all the glyphs + * referenced by the Encoding have numbers 0-255. Check for + * this now. + */ + if (font->FontType == ft_TrueType && + pdev->CompatibilityLevel <= 1.2 + ) { + int i; + + for (i = 0; i <= 0xff; ++i) { + gs_glyph glyph = + font->procs.encode_char(font, (gs_char)i, + GLYPH_SPACE_INDEX); + + if (glyph == gs_no_glyph || + (glyph >= gs_min_cid_glyph && + glyph <= gs_min_cid_glyph + 0xff) + ) + continue; + /* Can't embed, punt. */ + if (embed == FONT_EMBED_UNKNOWN) + goto no; /* OK not to embed */ + return_error(gs_error_rangecheck); + } + } code = pdf_compute_font_descriptor(pdev, &fdesc, font, NULL); if (code < 0) return code; fdesc.FontFile_id = pdf_obj_ref(pdev); goto wf; + case FONT_EMBED_UNKNOWN: /* default is not to embed */ case FONT_EMBED_NO: +no: /* + * Per the PDF 1.3 documentation, there are only 3 BaseEncoding + * values allowed for non-embedded fonts. Pick one here. + */ + BaseEncoding = + ((const gs_font_base *)base_font)->nearest_encoding_index; + switch (BaseEncoding) { + default: + BaseEncoding = ENCODING_INDEX_WINANSI; + case ENCODING_INDEX_WINANSI: + case ENCODING_INDEX_MACROMAN: + case ENCODING_INDEX_MACEXPERT: + break; + } code = pdf_compute_font_descriptor(pdev, &fdesc, font, NULL); if (code < 0) return code; wf: fdesc.id = pdf_obj_ref(pdev); - { + /* falls through */ + case FONT_EMBED_BASE14: + if (~same & (FONT_SAME_METRICS | FONT_SAME_ENCODING)) { /* * Before allocating the font resource, check that we can * get all the widths. @@ -340,15 +382,13 @@ wf: fdesc.id = pdf_obj_ref(pdev); int i; memset(&ftemp, 0, sizeof(ftemp)); - ftemp.descriptor = &fdesc; for (i = 0; i <= 255; ++i) { - code = pdf_char_width(&ftemp, i, font, NULL, NULL); + code = pdf_char_width(&ftemp, i, font, NULL); if (code < 0 && code != gs_error_undefined) return code; } + have_widths = true; } - /* falls through */ - case FONT_EMBED_BASE14: /* * Allocate the font resource, but don't write it yet, * because we don't know yet whether it will need @@ -361,10 +401,13 @@ wf: fdesc.id = pdf_obj_ref(pdev); ppf->fname.size = font_name.size; ppf->FontType = font->FontType; ppf->index = index; + ppf->BaseEncoding = BaseEncoding; if (index < 0) { *ppf->descriptor = fdesc; ppf->font = font; ppf->orig_matrix = orig_matrix; + } + if (have_widths) { /* * C's bizarre coercion rules make us use memcpy here * rather than direct assignments, even though sizeof() @@ -397,33 +440,80 @@ wf: fdesc.id = pdf_obj_ref(pdev); return 0; } +/* Check whether a glyph exists in a (pseudo-)encoding. */ +private bool +encoding_has_glyph(gs_font_base *bfont, gs_glyph font_glyph, + gs_encoding_index_t index) +{ + int ch; + gs_glyph glyph; + + for (ch = 0; + (glyph = bfont->procs.callbacks.known_encode((gs_char)ch, index)) != + gs_no_glyph; + ++ch) + if (glyph == font_glyph) + return true; + return false; +} + /* * For a given character, check whether the encodings are compatible, and if * not, whether we can re-encode the character using the base encoding. * Return the (possibly re-encoded) character if successful. + * This procedure should only be called when ppf->index >= 0. */ private int try_encode_char(gx_device_pdf *pdev, int chr, gs_font_base *bfont, pdf_font_t *ppf) { - /* Note: ei, but not bei, may be ENCODING_INDEX_UNKNOWN. */ + /* + * bfont is the current font in which the text is being shown. + * ei is its encoding_index. + */ gs_encoding_index_t ei = bfont->encoding_index; - gs_encoding_index_t bei = pdf_standard_fonts[ppf->index].base_encoding; + /* + * ppf->font is the font that underlies this PDF font (i.e., this PDF + * font is ppf->font plus some possible Encoding differences). + * ppf->font is 0 iff this PDF font is one of the standard 14 (i.e., + * ppf->index >= 0). bei is the encoding index that will be written in + * the PDF file: it is NOT necessarily the same as + * ppf->font->encoding_index, or even ppf->font->nearest_encoding_index. + */ + bool have_font = ppf->font && ppf->font->FontType != ft_composite; + bool is_standard = ppf->index >= 0; + gs_encoding_index_t bei = + (ppf->BaseEncoding >= 0 ? ppf->BaseEncoding : + is_standard ? pdf_standard_fonts[ppf->index].base_encoding : + /* + * Despite what seems like a clear statement in the PDF + * specification to the contrary, experimentation with Acrobat + * seems to indicate that the default encoding for embedded fonts + * is StandardEncoding, not the (arbitrary) encoding built into the + * font itself. + */ + ENCODING_INDEX_STANDARD); pdf_encoding_element_t *pdiff = ppf->differences; + /* + * If set, font_glyph is the glyph currently associated with chr in + * ppf + bei; glyph is the glyph corresponding to chr in bfont. + */ gs_glyph font_glyph, glyph; - if (ei == bei && pdiff == 0) { + if (ei == bei && ei != ENCODING_INDEX_UNKNOWN && pdiff == 0) { /* * Just note that the character has been used with its original * encoding. */ return chr; } + if (!is_standard && !have_font) + return_error(gs_error_undefined); /* can't encode */ #define ENCODE(ch)\ - (pdiff != 0 && pdiff[ch].str.data != 0 ?\ - pdiff[ch].glyph :\ - bfont->procs.callbacks.known_encode((gs_char)(ch), bei)) + (pdiff != 0 && pdiff[ch].str.data != 0 ? pdiff[ch].glyph :\ + bei >= 0 ? bfont->procs.callbacks.known_encode((gs_char)(ch), bei) :\ + /* have_font */ bfont->procs.encode_char(ppf->font, chr, GLYPH_SPACE_NAME)) font_glyph = ENCODE(chr); glyph = @@ -445,6 +535,32 @@ try_encode_char(gx_device_pdf *pdev, int chr, gs_font_base *bfont, return_error(gs_error_undefined); } + /* + * If the base font is a TrueType font, punt. See comments at the + * beginning of this file for more information. + */ + if (bfont->FontType == ft_TrueType) + return_error(gs_error_undefined); + + /* + * Check whether this glyph is available in the base font's glyph set + * at all. + */ + switch (bei) { + case ENCODING_INDEX_STANDARD: + case ENCODING_INDEX_ISOLATIN1: + case ENCODING_INDEX_WINANSI: + case ENCODING_INDEX_MACROMAN: + /* Check the full Adobe glyph set(s). */ + if (!encoding_has_glyph(bfont, glyph, ENCODING_INDEX_ALOGLYPH) && + (pdev->CompatibilityLevel < 1.3 || + !encoding_has_glyph(bfont, glyph, ENCODING_INDEX_ALXGLYPH)) + ) + return_error(gs_error_undefined); + default: + break; + } + if (pdev->ReAssignCharacters) { /* * If this is the first time we've seen this character, @@ -695,7 +811,7 @@ pdf_text_process(gs_text_enum_t *pte) goto top; } -/* ---------------- Font utilities ---------------- */ +/* ---------------- Text and font utilities ---------------- */ /* Forward declarations */ private int assign_char_code(P1(gx_device_pdf * pdev)); diff --git a/gs/src/gdevpdfu.c b/gs/src/gdevpdfu.c index fe21cab52..931819f77 100644 --- a/gs/src/gdevpdfu.c +++ b/gs/src/gdevpdfu.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Output utilities for PDF-writing driver */ #include "math_.h" #include "memory_.h" @@ -175,13 +162,18 @@ pdf_reset_graphics(gx_device_pdf * pdev) { color_set_pure(&pdev->fill_color, 0); /* black */ color_set_pure(&pdev->stroke_color, 0); /* ditto */ - pdev->flatness = -1; + pdev->state.flatness = -1; { - static const gx_line_params lp_initial = - {gx_line_params_initial}; + static const gx_line_params lp_initial = { + gx_line_params_initial + }; - pdev->line_params = lp_initial; + pdev->state.line_params = lp_initial; } + pdev->text.character_spacing = 0; + pdev->text.font = NULL; + pdev->text.size = 0; + pdev->text.word_spacing = 0; } /* Set the fill or stroke color. */ @@ -244,53 +236,57 @@ pdf_put_matrix(gx_device_pdf * pdev, const char *before, * use an escape sequence for anything except a null <00>. */ void -pdf_put_name(const gx_device_pdf * pdev, const byte * nstr, uint size) +pdf_put_name_escaped(stream *s, const byte *nstr, uint size, bool escape) { - stream *s = pdev->strm; uint i; - bool escape = pdev->CompatibilityLevel >= 1.2; - char hex[4]; pputc(s, '/'); for (i = 0; i < size; ++i) { uint c = nstr[i]; + char hex[4]; switch (c) { - case '%': - case '(': - case ')': - case '<': - case '>': - case '[': - case ']': - case '{': - case '}': - /* These characters are invalid in both 1.1 and 1.2, */ - /* but can be escaped in 1.2. */ + case '#': + /* These are valid in 1.1, but must be escaped in 1.2. */ if (escape) { sprintf(hex, "#%02x", c); pputs(s, hex); break; } /* falls through */ - case 0: - /* This is invalid in 1.1 and 1.2, and cannot be escaped. */ - pputc(s, '?'); - break; + default: + if (c >= 0x21 && c <= 0x7e) { + /* These are always valid. */ + pputc(s, c); + break; + } + /* falls through */ + case '%': + case '(': case ')': + case '<': case '>': + case '[': case ']': + case '{': case '}': case '/': - case '#': - /* These are valid in 1.1, but must be escaped in 1.2. */ + /* These characters are invalid in both 1.1 and 1.2, */ + /* but can be escaped in 1.2. */ if (escape) { sprintf(hex, "#%02x", c); pputs(s, hex); break; } /* falls through */ - default: - pputc(s, c); + case 0: + /* This is invalid in 1.1 and 1.2, and cannot be escaped. */ + pputc(s, '?'); } } } +void +pdf_put_name(const gx_device_pdf *pdev, const byte *nstr, uint size) +{ + pdf_put_name_escaped(pdev->strm, nstr, size, + pdev->CompatibilityLevel >= 1.2); +} /* * Write a string in its shortest form ( () or <> ). Note that diff --git a/gs/src/gdevpdfx.h b/gs/src/gdevpdfx.h index d0162df6d..439666d71 100644 --- a/gs/src/gdevpdfx.h +++ b/gs/src/gdevpdfx.h @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal definitions for PDF-writing driver. */ #ifndef gdevpdfx_INCLUDED @@ -98,19 +85,26 @@ struct pdf_resource_s { /* ------ Fonts ------ */ /* - * The PDF writer creates 3 different kinds of font resources: + * The PDF writer creates several different kinds of font resources. + * The key differences between them are the values of num_chars, index, + * and descriptor. * - * - Synthesized Type 3 bitmap fonts, identified by num_chars != 0 - * (or equivalently PDF_FONT_IS_SYNTHESIZED = true). + * - Synthesized Type 3 bitmap fonts are identified by num_chars != 0 (or + * equivalently PDF_FONT_IS_SYNTHESIZED = true). They have index < 0, + * descriptor == 0. All other fonts have num_chars == 0. * - * - Non-embedded Type 1 or TrueType fonts, identified by num_chars == 0, - * descriptor != 0, descriptor->FontFile_id == 0. A font is in the - * base 14 iff index >= 0. + * - The base 14 fonts have num_chars == 0, index >= 0, descriptor == + * 0. All other fonts have index < 0. * - * - Embedded Type 1 or TrueType fonts, identified by num_chars == 0, - * descriptor != 0, descriptor->FontFile_id != 0. + * - All other fonts (Type 1 or TrueType, embedded or not) have + * num_chars == 0, index < 0, descriptor != 0. A font is embedded + * iff descriptor->FontFile_id != 0. + * + * For non-synthesized fonts, the structure representation is designed to + * represent directly the information that will be written in the font + * resource, Encoding, and FontDescriptor dictionaries. See the comments + * on the pdf_font_t structure below for more detail. */ - #define PDF_NUM_STD_FONTS 14 #define pdf_do_std_fonts(m)\ m("Courier", ENCODING_INDEX_STANDARD)\ @@ -136,7 +130,7 @@ typedef struct pdf_font_descriptor_s { gs_int_rect FontBBox; uint Flags; /* Optional elements (default to 0) */ - long FontFile_id; + long FontFile_id; /* non-0 iff the font is embedded */ int AvgWidth, Leading, MaxWidth, MissingWidth, StemH, XHeight; } pdf_font_descriptor_t; /* Flag bits */ @@ -180,20 +174,25 @@ struct pdf_font_s { font_type FontType; gs_font *font; /* non-0 iff font will notify us; */ /* should be a weak pointer */ - int index; /* in pdf_standard_fonts */ + int index; /* in pdf_standard_fonts, -1 if not base 14 */ gs_matrix orig_matrix; /* FontMatrix of unscaled font for embedding */ /* * For synthesized fonts, frname is A, B, ...; for other fonts, * frname is R<id>. The string is null-terminated. */ char frname[1/*R*/ + (sizeof(long) * 8 / 3 + 1) + 1/*\0*/]; - /* Encoding differences for base fonts. */ + /* Encoding for base fonts. */ + int BaseEncoding; /* if not -1, will be written as the */ + /* BaseEncoding of the Encoding dict */ byte chars_used[32]; /* 1 bit per character code */ - pdf_encoding_element_t *differences; /* [256] */ - long diff_id; + pdf_encoding_element_t *differences; /* [256] if not 0, will be written */ + /* as the Differences of the Encoding dict */ /* Bookkeeping for non-synthesized fonts. */ - pdf_font_descriptor_t *descriptor; - int Widths[256]; + pdf_font_descriptor_t *descriptor; /* if not 0, will be written as */ + /* the FontDescriptor dict */ + int Widths[256]; /* if index >= 0 or differences != 0, */ + /* will be written as the Widths in the */ + /* font resource dict */ byte widths_known[32]; /* 1 bit per character code */ bool skip; /* font was already written, skip it */ /* Bookkeeping for synthesized fonts. */ @@ -286,8 +285,9 @@ struct pdf_article_s { /* Text state */ typedef struct pdf_std_font_s { + gs_font *font; /* weak pointer, may be 0 */ gs_matrix orig_matrix; - gs_uid uid; + gs_uid uid; /* UniqueID, not XUID */ } pdf_std_font_t; typedef struct pdf_text_state_s { /* State parameters */ @@ -295,7 +295,6 @@ typedef struct pdf_text_state_s { pdf_font_t *font; floatp size; float word_spacing; - float horizontal_scaling; /* Bookkeeping */ gs_matrix matrix; /* relative to device space, not user space */ gs_point line_start; @@ -303,11 +302,10 @@ typedef struct pdf_text_state_s { #define max_text_buffer 200 /* arbitrary, but overflow costs 5 chars */ byte buffer[max_text_buffer]; int buffer_count; - pdf_std_font_t std_fonts[PDF_NUM_STD_FONTS]; /* must be last (can't initialize) */ } pdf_text_state_t; #define pdf_text_state_default\ - 0, NULL, 0, 0, 100,\ + 0, NULL, 0, 0,\ { identity_matrix_body }, { 0, 0 }, { 0, 0 }, { 0 }, 0 /* Resource lists */ @@ -375,7 +373,18 @@ typedef struct gx_device_pdf_s gx_device_pdf_t; struct gx_device_pdf_s { gx_device_psdf_common; /* PDF-specific distiller parameters */ - float CompatibilityLevel; + double CompatibilityLevel; +#ifdef POST60 + bool Optimize; + bool ParseDSCCommentsForDocInfo; + bool ParseDSCComments; + bool EmitDSCWarnings; + bool CreateJobTicket; + bool PreserveEPSInfo; + bool AutoPositionEPSFile; + bool PreserveCopyPage; + bool UsePrologue; +#endif /* End of distiller parameters */ /* Other parameters */ bool ReAssignCharacters; @@ -434,13 +443,8 @@ struct gx_device_pdf_s { long contents_length_id; long contents_pos; pdf_procset procsets; /* used on this page */ - float flatness; -/****** SHOULD USE state ******/ - /* The line width, dash offset, and dash pattern */ - /* are in default user space units. */ - gx_line_params line_params; /* current values */ -/****** SHOULD USE state ******/ pdf_text_state_t text; + pdf_std_font_t std_fonts[PDF_NUM_STD_FONTS]; long space_char_ids[X_SPACE_MAX - X_SPACE_MIN + 1]; #define initial_num_pages 50 pdf_page_t *pages; @@ -470,16 +474,17 @@ struct gx_device_pdf_s { m(5,pictures.strm) m(6,pictures.strm_buf) m(7,pictures.save_strm)\ m(8,open_font)\ m(9,Catalog) m(10,Info) m(11,Pages)\ - m(12,line_params.dash.pattern) m(13,text.font) m(14,pages)\ - m(15,cs_Pattern) m(16,last_resource)\ - m(17,articles) m(18,Dests) m(19,named_objects) m(20,open_graphics) -#define gx_device_pdf_num_ptrs 21 + m(12,text.font) m(13,pages)\ + m(14,cs_Pattern) m(15,last_resource)\ + m(16,articles) m(17,Dests) m(18,named_objects) m(19,open_graphics) +#define gx_device_pdf_num_ptrs 20 #define gx_device_pdf_do_strings(m) /* do nothing */ #define gx_device_pdf_num_strings 0 #define st_device_pdf_max_ptrs\ (st_device_psdf_max_ptrs + gx_device_pdf_num_ptrs +\ - gx_device_pdf_num_strings + NUM_RESOURCE_TYPES * NUM_RESOURCE_CHAINS +\ - MAX_OUTLINE_DEPTH * 2) + gx_device_pdf_num_strings + PDF_NUM_STD_FONTS /* std_fonts[].font */ +\ + NUM_RESOURCE_TYPES * NUM_RESOURCE_CHAINS /* resources[].chains[] */ +\ + MAX_OUTLINE_DEPTH * 2 /* outline_levels[].{first,last}.action */ #define private_st_device_pdfwrite() /* in gdevpdf.c */\ gs_private_st_composite_final(st_device_pdfwrite, gx_device_pdf,\ @@ -536,24 +541,26 @@ int pdf_end_obj(P1(gx_device_pdf * pdev)); /* ------ Graphics ------ */ /* Reset the graphics state parameters to initial values. */ -void pdf_reset_graphics(P1(gx_device_pdf * pdev)); +void pdf_reset_graphics(P1(gx_device_pdf *pdev)); /* Set the fill or stroke color. */ -int pdf_set_color(P4(gx_device_pdf * pdev, gx_color_index color, - gx_drawing_color * pdcolor, const char *rgs)); +int pdf_set_color(P4(gx_device_pdf *pdev, gx_color_index color, + gx_drawing_color *pdcolor, const char *rgs)); /* Write matrix values. */ -void pdf_put_matrix(P4(gx_device_pdf * pdev, const char *before, - const gs_matrix * pmat, const char *after)); +void pdf_put_matrix(P4(gx_device_pdf *pdev, const char *before, + const gs_matrix *pmat, const char *after)); /* Write a name, with escapes for unusual characters. */ -void pdf_put_name(P3(const gx_device_pdf * pdev, const byte * nstr, uint size)); +void pdf_put_name_escaped(P4(stream *s, const byte *nstr, uint size, + bool escape)); +void pdf_put_name(P3(const gx_device_pdf *pdev, const byte *nstr, uint size)); /* Write a string in its shortest form ( () or <> ). */ -void pdf_put_string(P3(const gx_device_pdf * pdev, const byte * str, uint size)); +void pdf_put_string(P3(const gx_device_pdf *pdev, const byte *str, uint size)); /* Write a value, treating names specially. */ -void pdf_write_value(P3(const gx_device_pdf * pdev, const byte * vstr, uint size)); +void pdf_write_value(P3(const gx_device_pdf *pdev, const byte *vstr, uint size)); /* ------ Page contents ------ */ @@ -748,6 +755,7 @@ int pdf_do_char_image(P3(gx_device_pdf * pdev, const pdf_char_proc_t * pcp, typedef enum { FONT_EMBED_BASE14, + FONT_EMBED_UNKNOWN, /* neither AlwaysEmbed nor NeverEmbed */ FONT_EMBED_NO, FONT_EMBED_YES } pdf_font_embed_t; @@ -764,10 +772,11 @@ bool pdf_find_orig_font(P4(gx_device_pdf *pdev, gs_font *font, /* * Determine the embedding status of a font. If the font is in the base - * 14, store its index (0..13) in *pindex. + * 14, store its index (0..13) in *pindex and its similarity to the base + * font (as determined by the font's same_font procedure) in *psame. */ -pdf_font_embed_t pdf_font_embed_status(P3(gx_device_pdf *pdev, gs_font *font, - int *pindex)); +pdf_font_embed_t pdf_font_embed_status(P4(gx_device_pdf *pdev, gs_font *font, + int *pindex, int *psame)); /* Allocate a font resource. */ int pdf_alloc_font(P4(gx_device_pdf *pdev, gs_id rid, pdf_font_t **ppfres, @@ -778,8 +787,8 @@ int pdf_add_encoding_difference(P5(gx_device_pdf *pdev, pdf_font_t *ppf, int chr const gs_font_base *bfont, gs_glyph glyph)); /* Get the width of a given character in a (base) font. */ -int pdf_char_width(P5(pdf_font_t *ppf, int ch, gs_font *font, - const gs_matrix *pmat, int *pwidth /* may be NULL */)); +int pdf_char_width(P4(pdf_font_t *ppf, int ch, gs_font *font, + int *pwidth /* may be NULL */)); /* Compute the FontDescriptor for a font or a font subset. */ int pdf_compute_font_descriptor(P4(gx_device_pdf *pdev, diff --git a/gs/src/gdevpe.c b/gs/src/gdevpe.c index 4b2b3fd7b..19a82efb9 100644 --- a/gs/src/gdevpe.c +++ b/gs/src/gdevpe.c @@ -1,24 +1,14 @@ /* Copyright (C) 1989, 1990, 1991, 1994, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - - -/* Private Eye display driver - Hacked by Fran Taylor, Reflection Technology Inc. */ + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ + +/*$RCSfile$ $Revision$*/ +/* + * Private Eye display driver + * + * Hacked by Fran Taylor, Reflection Technology Inc. + */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gdevpipe.c b/gs/src/gdevpipe.c index fb61972d4..604f41df3 100644 --- a/gs/src/gdevpipe.c +++ b/gs/src/gdevpipe.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* %pipe% IODevice */ #include "errno_.h" #include "pipe_.h" diff --git a/gs/src/gdevpjet.c b/gs/src/gdevpjet.c index 21db11383..82e0fdf6a 100644 --- a/gs/src/gdevpjet.c +++ b/gs/src/gdevpjet.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* H-P PaintJet, PaintJet XL, and DEC LJ250 drivers. */ /* Thanks to Rob Reiss (rob@moray.berkeley.edu) for the PaintJet XL */ /* modifications. */ diff --git a/gs/src/gdevplnx.c b/gs/src/gdevplnx.c index 4486d65ba..07c48841c 100644 --- a/gs/src/gdevplnx.c +++ b/gs/src/gdevplnx.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Plane extraction device */ #include "gx.h" #include "gserrors.h" @@ -820,7 +807,6 @@ typedef struct plane_image_enum_s { const gs_imager_state *pis; /* original imager state */ gs_imager_state *pis_image; /* modified imager state */ } plane_image_enum_t; -extern_st(st_gx_image_enum_common); gs_private_st_suffix_add3(st_plane_image_enum, plane_image_enum_t, "plane_image_enum_t", plane_image_enum_enum_ptrs, plane_image_enum_reloc_ptrs, st_gx_image_enum_common, info, pis, pis_image); diff --git a/gs/src/gdevplnx.h b/gs/src/gdevplnx.h index ce4d64e60..b73d6c926 100644 --- a/gs/src/gdevplnx.h +++ b/gs/src/gdevplnx.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Definitions and API for plane extraction device */ /* Requires gxdevcli.h */ diff --git a/gs/src/gdevpm.c b/gs/src/gdevpm.c index a70cd2213..3d2f2d6d1 100644 --- a/gs/src/gdevpm.c +++ b/gs/src/gdevpm.c @@ -1,24 +1,12 @@ /* Copyright (C) 1992, 1993, 1994, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* * OS/2 Presentation manager driver + * * By Russell Lang (based on gdevmswn.c and gdevwdib.c) * * If Ghostscript is a PM application, stdin/stdout are not @@ -63,7 +51,7 @@ #include "gdevpm.h" #ifdef __DLL__ #include "gsdll.h" -#include "gsdllwin.h" +#include "gsdllos2.h" #endif #define MIN_COMMIT 4096 /* memory is committed in these size chunks */ @@ -170,7 +158,6 @@ gx_device_pm far_data gs_os2pm_device = INITIAL_RESOLUTION, INITIAL_RESOLUTION), {0}, /* std_procs */ 8, /* BitsPerPixel */ - 1, 1, /* alpha */ 5000, /* UpdateInterval */ "\0", /* GSVIEW */ 0 /* is not DLL device */ diff --git a/gs/src/gdevpm.h b/gs/src/gdevpm.h index 41cc44c67..50c060956 100644 --- a/gs/src/gdevpm.h +++ b/gs/src/gdevpm.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Defines common to gdevpm.c, gspmdrv.c and PM GSview */ #ifndef gdevpm_INCLUDED diff --git a/gs/src/gdevpng.c b/gs/src/gdevpng.c index 047bfe54c..885ed2d4c 100644 --- a/gs/src/gdevpng.c +++ b/gs/src/gdevpng.c @@ -1,23 +1,12 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PNG (Portable Network Graphics) Format. Pronounced "ping". */ +/* lpd 1999-09-24: changes PNG_NO_STDIO to PNG_NO_CONSOLE_IO for libpng + versions 1.0.3 and later. */ /* lpd 1999-07-01: replaced remaining uses of gs_malloc and gs_free with gs_alloc_bytes and gs_free_object. */ /* lpd 1999-03-08: changed png.h to png_.h to allow compiling with only @@ -39,7 +28,20 @@ #include "gscdefs.h" #define PNG_INTERNAL -#define PNG_NO_STDIO +/* + * libpng versions 1.0.3 and later allow disabling access to the stdxxx + * files while retaining support for FILE * I/O. + */ +#define PNG_NO_CONSOLE_IO +/* + * Earlier libpng versions require disabling FILE * I/O altogether. + * This produces a compiler warning about no prototype for png_init_io. + * The right thing will happen at link time, since the library itself + * is compiled with stdio support. Unfortunately, we can't do this + * conditionally depending on PNG_LIBPNG_VER, because this is defined + * in png.h. + */ +/*#define PNG_NO_STDIO*/ #include "png_.h" /* ------ The device descriptors ------ */ diff --git a/gs/src/gdevppla.c b/gs/src/gdevppla.c index fd6893617..4ba80e462 100644 --- a/gs/src/gdevppla.c +++ b/gs/src/gdevppla.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Support for printer devices with planar buffering. */ #include "gdevprn.h" #include "gdevmpla.h" diff --git a/gs/src/gdevppla.h b/gs/src/gdevppla.h index 807fb47e6..eac4032d4 100644 --- a/gs/src/gdevppla.h +++ b/gs/src/gdevppla.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Support for printer devices with planar buffering. */ /* Requires gdevprn.h */ diff --git a/gs/src/gdevprn.c b/gs/src/gdevprn.c index c8efbc9f4..fb070e845 100644 --- a/gs/src/gdevprn.c +++ b/gs/src/gdevprn.c @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic printer driver support */ #include "ctype_.h" #include "gdevprn.h" diff --git a/gs/src/gdevprn.h b/gs/src/gdevprn.h index 16527f25c..b7c7f155b 100644 --- a/gs/src/gdevprn.h +++ b/gs/src/gdevprn.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common header file for memory-buffered printers */ #ifndef gdevprn_INCLUDED diff --git a/gs/src/gdevprna.h b/gs/src/gdevprna.h index c8ea45210..b9ef0cfc3 100644 --- a/gs/src/gdevprna.h +++ b/gs/src/gdevprna.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$ */ /* Generic asynchronous printer driver support */ /* Initial version 2/1/1998 by John Desrosiers (soho@crl.com) */ diff --git a/gs/src/gdevps.c b/gs/src/gdevps.c index e7ce039da..be8e028c7 100644 --- a/gs/src/gdevps.c +++ b/gs/src/gdevps.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PostScript-writing driver */ #include "math_.h" #include "memory_.h" @@ -989,6 +976,9 @@ psw_copy_mono(gx_device * dev, const byte * data, } if (code < 0) return 0; + code = gdev_vector_update_clip_path(vdev, NULL); + if (code < 0) + return code; return psw_image_write(pdev, op, data, data_x, raster, id, x, y, w, h, 1); } @@ -1002,6 +992,7 @@ psw_copy_color(gx_device * dev, int depth = dev->color_info.depth; const byte *bits = data + data_x * 3; char op[6]; + int code; if (w <= 0 || h <= 0) return 0; @@ -1017,6 +1008,9 @@ psw_copy_color(gx_device * dev, (dev, x, y, w, h, (bits[0] << 16) + (bits[1] << 8) + bits[2]); } sprintf(op, "%d Ic", depth / 3); /* RGB */ + code = gdev_vector_update_clip_path(vdev, NULL); + if (code < 0) + return code; return psw_image_write(pdev, op, data, data_x, raster, id, x, y, w, h, depth); } diff --git a/gs/src/gdevpsci.c b/gs/src/gdevpsci.c index cf0268247..cc0bb8b83 100644 --- a/gs/src/gdevpsci.c +++ b/gs/src/gdevpsci.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PostScript color image output device */ #include "gdevprn.h" #include "stream.h" diff --git a/gs/src/gdevpsd1.c b/gs/src/gdevpsd1.c index a6a81251c..0ea2f7dcc 100644 --- a/gs/src/gdevpsd1.c +++ b/gs/src/gdevpsd1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Write an embedded Type 1 font */ #include "memory_.h" #include "gx.h" @@ -32,6 +19,7 @@ #include "spprint.h" #include "gdevpsdf.h" +/* Write a (named) array of floats. */ private int write_float_array(gs_param_list *plist, const char *key, const float *values, int count) @@ -46,6 +34,7 @@ write_float_array(gs_param_list *plist, const char *key, const float *values, return 0; } +/* Write a UniqueID and/or XUID. */ private void write_uid(stream *s, const gs_uid *puid) { @@ -57,10 +46,77 @@ write_uid(stream *s, const gs_uid *puid) pputs(s, "/XUID ["); for (i = 0; i < n; ++i) pprintld1(s, "%ld ", uid_XUID_values(puid)[i]); - pputs(s, "] def\n"); + pputs(s, "] readonly def\n"); } } +/* Write the font name. */ +private void +write_font_name(stream *s, const gs_font_type1 *pfont, + const gs_const_string *alt_font_name) +{ + if (alt_font_name) + pwrite(s, alt_font_name->data, alt_font_name->size); + else + pwrite(s, pfont->font_name.chars, pfont->font_name.size); +} +/* + * Write the Encoding array. This is a separate procedure only for + * readability. + */ +private int +write_Encoding(stream *s, gs_font_type1 *pfont, int options, + gs_glyph *subset_glyphs, uint subset_size, gs_glyph notdef) +{ + pputs(s, "/Encoding "); + switch (pfont->encoding_index) { + case ENCODING_INDEX_STANDARD: + pputs(s, "StandardEncoding"); + break; + case ENCODING_INDEX_ISOLATIN1: + /* ATM only recognizes StandardEncoding. */ + if (options & WRITE_TYPE1_POSTSCRIPT) { + pputs(s, "ISOLatin1Encoding"); + break; + } + default:{ + gs_char i; + + pputs(s, "256 array\n"); + pputs(s, "0 1 255 {1 index exch /.notdef put} for\n"); + for (i = 0; i < 256; ++i) { + gs_glyph glyph = + (*pfont->procs.encode_char) + ((gs_font *)pfont, (gs_char)i, GLYPH_SPACE_NAME); + const char *namestr; + uint namelen; + + if (subset_glyphs && subset_size) { + /* + * Only write Encoding entries for glyphs in the + * subset. Use binary search to check each glyph, + * since subset_glyphs are sorted. + */ + if (!psdf_sorted_glyphs_include(subset_glyphs, + subset_size, glyph)) + continue; + } + if (glyph != gs_no_glyph && glyph != notdef && + (namestr = (*pfont->procs.callbacks.glyph_name) + (glyph, &namelen)) != 0 + ) { + pprintd1(s, "dup %d /", (int)i); + pwrite(s, namestr, namelen); + pputs(s, " put\n"); + } + } + pputs(s, "readonly"); + } + } + pputs(s, " def\n"); + return 0; +} + /* * Write the Private dictionary. This is a separate procedure only for * readability. @@ -72,7 +128,7 @@ write_Private(stream *s, gs_font_type1 *pfont, { const gs_type1_data *const pdata = &pfont->data; printer_param_list_t rlist; - gs_param_list *plist = (gs_param_list *)&rlist; + gs_param_list *const plist = (gs_param_list *)&rlist; int code = s_init_param_printer(&rlist, ppp, s); if (code < 0) @@ -137,7 +193,10 @@ write_Private(stream *s, gs_font_type1 *pfont, pputs(s, "/MinFeature{16 16} def\n"); pputs(s, "/password 5839 def\n"); - /* Write the Subrs. We always write them all, even for subsets. */ + /* + * Write the Subrs. We always write them all, even for subsets. + * (We will fix this someday.) + */ { int n, i; @@ -205,6 +264,18 @@ write_Private(stream *s, gs_font_type1 *pfont, return 0; } +/* Write one FontInfo entry. */ +private void +write_font_info(stream *s, const char *key, const gs_const_string *pvalue, + int do_write) +{ + if (do_write) { + pprints1(s, "\n/%s ", key); + s_write_ps_string(s, pvalue->data, pvalue->size, 0); + pputs(s, " def"); + } +} + /* Write the definition of a Type 1 font. */ int psdf_write_type1_font(stream *s, gs_font_type1 *pfont, int options, @@ -215,6 +286,7 @@ psdf_write_type1_font(stream *s, gs_font_type1 *pfont, int options, long start = stell(s); param_printer_params_t ppp; printer_param_list_t rlist; + gs_param_list *const plist = (gs_param_list *)&rlist; stream AXE_stream; stream_AXE_state AXE_state; byte AXE_buf[200]; /* arbitrary */ @@ -222,7 +294,7 @@ psdf_write_type1_font(stream *s, gs_font_type1 *pfont, int options, stream_exE_state exE_state; byte exE_buf[200]; /* arbitrary */ gs_glyph notdef = gs_no_glyph; - gs_glyph subset_data[256+1]; /* +1 for .notdef */ + gs_glyph subset_data[256 * 3 + 1]; /* *3 for seac, +1 for .notdef */ gs_glyph *subset_glyphs = orig_subset_glyphs; uint subset_size = orig_subset_size; int code; @@ -298,6 +370,16 @@ psdf_write_type1_font(stream *s, gs_font_type1 *pfont, int options, } } if (subset_glyphs) { + /* + * For subset fonts, we must ensure that characters referenced + * by seac are also included. Note that seac creates at most + * 2 pieces. + */ + code = psdf_add_subset_pieces(subset_glyphs, &subset_size, + countof(subset_data) - 1, 2, + (gs_font *)pfont); + if (code < 0) + return code; /* Subset fonts require .notdef. */ if (notdef == gs_no_glyph) return_error(gs_error_rangecheck); @@ -319,87 +401,41 @@ psdf_write_type1_font(stream *s, gs_font_type1 *pfont, int options, /* Write the font header. */ pputs(s, "%!FontType1-1.0: "); - pwrite(s, pfont->font_name.chars, pfont->font_name.size); + write_font_name(s, pfont, alt_font_name); pputs(s, "\n11 dict begin\n"); - /* Write FontInfo. Currently we don't write anything there. */ + /* Write FontInfo. */ - pputs(s, "/FontInfo 1 dict dup begin\n"); - /****** SHOULD USE param_list API FOR ADDITIONAL ELEMENTS ******/ - pputs(s, "end readonly def\n"); + pputs(s, "/FontInfo 5 dict dup begin"); + { + gs_font_info_t info; + int code = pfont->procs.font_info((gs_font *)pfont, NULL, + (FONT_INFO_COPYRIGHT | FONT_INFO_NOTICE | + FONT_INFO_FAMILY_NAME | FONT_INFO_FULL_NAME), + &info); + + if (code >= 0) { + write_font_info(s, "Copyright", &info.Copyright, + info.members & FONT_INFO_COPYRIGHT); + write_font_info(s, "Notice", &info.Notice, + info.members & FONT_INFO_NOTICE); + write_font_info(s, "FamilyName", &info.FamilyName, + info.members & FONT_INFO_FAMILY_NAME); + write_font_info(s, "FullName", &info.FullName, + info.members & FONT_INFO_FULL_NAME); + } + } + pputs(s, "\nend readonly def\n"); /* Write the main font dictionary. */ pputs(s, "/FontName /"); - if (alt_font_name) - pwrite(s, alt_font_name->data, alt_font_name->size); - else - pwrite(s, pfont->font_name.chars, pfont->font_name.size); - pputs(s, " def\n"); - pputs(s, "/Encoding "); - switch (pfont->encoding_index) { - case ENCODING_INDEX_STANDARD: - pputs(s, "StandardEncoding"); - break; - case ENCODING_INDEX_ISOLATIN1: - /* ATM only recognizes StandardEncoding. */ - if (options & WRITE_TYPE1_POSTSCRIPT) { - pputs(s, "ISOLatin1Encoding"); - break; - } - default:{ - gs_char i; - - pputs(s, "256 array\n"); - pputs(s, "0 1 255 {1 index exch /.notdef put} for\n"); - for (i = 0; i < 256; ++i) { - gs_glyph glyph = - (*pfont->procs.encode_char) - ((gs_font *)pfont, (gs_char)i, GLYPH_SPACE_NAME); - const char *namestr; - uint namelen; - - if (subset_glyphs && subset_size) { - /* - * Only write Encoding entries for glyphs in the - * subset. Use binary search to check each glyph, - * since subset_glyphs are sorted. - */ - int lo = 0, hi = subset_size - 1; - - if (glyph < subset_glyphs[0] || - glyph > subset_glyphs[subset_size - 1] - ) - continue; - /* - * Loop invariants: hi > lo; - * subset_glyphs[lo] <= glyph <= subset_glyphs[hi]. - */ - while (hi - lo > 1) { - int mid = (lo + hi) >> 1; - if (glyph >= subset_glyphs[mid]) - lo = mid; - else - hi = mid; - } - if (glyph != subset_glyphs[lo] && - glyph != subset_glyphs[hi] - ) - continue; - } - if (glyph != gs_no_glyph && glyph != notdef && - (namestr = (*pfont->procs.callbacks.glyph_name) - (glyph, &namelen)) != 0 - ) { - pprintd1(s, "dup %d /", (int)i); - pwrite(s, namestr, namelen); - pputs(s, " put\n"); - } - } - pputs(s, "readonly"); - } - } + write_font_name(s, pfont, alt_font_name); pputs(s, " def\n"); + code = write_Encoding(s, pfont, options, subset_glyphs, subset_size, + notdef); + if (code < 0) + return code; pprintg6(s, "/FontMatrix [%g %g %g %g %g %g] readonly def\n", pfont->FontMatrix.xx, pfont->FontMatrix.xy, pfont->FontMatrix.yx, pfont->FontMatrix.yy, @@ -409,8 +445,7 @@ psdf_write_type1_font(stream *s, gs_font_type1 *pfont, int options, pfont->FontBBox.p.x, pfont->FontBBox.p.y, pfont->FontBBox.q.x, pfont->FontBBox.q.y); { - private const gs_param_item_t font_items[] = - { + private const gs_param_item_t font_items[] = { {"FontType", gs_param_type_int, offset_of(gs_font_type1, FontType)}, {"PaintType", gs_param_type_int, @@ -420,11 +455,16 @@ psdf_write_type1_font(stream *s, gs_font_type1 *pfont, int options, gs_param_item_end }; - code = gs_param_write_items((gs_param_list *)&rlist, pfont, NULL, - font_items); + code = gs_param_write_items(plist, pfont, NULL, font_items); if (code < 0) return code; } + { + const gs_type1_data *const pdata = &pfont->data; + + write_float_array(plist, "WeightVector", pdata->WeightVector.values, + pdata->WeightVector.count); + } pputs(s, "currentdict end\n"); /* Write the Private dictionary. */ diff --git a/gs/src/gdevpsdf.c b/gs/src/gdevpsdf.c index 24a358a08..92c98a5ea 100644 --- a/gs/src/gdevpsdf.c +++ b/gs/src/gdevpsdf.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common utilities for PostScript and PDF writers */ #include "memory_.h" #include <stdlib.h> /* for qsort */ @@ -362,6 +349,43 @@ psdf_subset_glyphs(gs_glyph glyphs[256], gs_font *font, const byte used[32]) } /* + * Add composite glyph pieces to a list of glyphs. Does not sort or + * remove duplicates. max_pieces is the maximum number of pieces that a + * single glyph can have: if this value is not known, the caller should + * use max_count. + */ +int +psdf_add_subset_pieces(gs_glyph *glyphs, uint *pcount, uint max_count, + uint max_pieces, gs_font *font) +{ + uint i; + uint count = *pcount; + + for (i = 0; i < count; ++i) { + gs_glyph_info_t info; + int code; + + if (count + max_pieces > max_count) { + /* Check first to make sure there is enough room. */ + code = font->procs.glyph_info(font, glyphs[i], NULL, + GLYPH_INFO_NUM_PIECES, &info); + if (code < 0) + continue; + if (count + info.num_pieces > max_count) + return_error(gs_error_rangecheck); + } + info.pieces = &glyphs[count]; + code = font->procs.glyph_info(font, glyphs[i], NULL, + GLYPH_INFO_NUM_PIECES | + GLYPH_INFO_PIECES, &info); + if (code >= 0) + count += info.num_pieces; + } + *pcount = count; + return 0; +} + +/* * Sort a list of glyphs and remove duplicates. Return the number of glyphs * in the result. */ @@ -383,3 +407,26 @@ psdf_sort_glyphs(gs_glyph *glyphs, int count) glyphs[n++] = glyphs[i]; return n; } + +/* Determine whether a sorted list of glyphs includes a given glyph. */ +bool +psdf_sorted_glyphs_include(const gs_glyph *glyphs, int count, gs_glyph glyph) +{ + int lo = 0, hi = count - 1; + + if (glyph < glyphs[0] || glyph > glyphs[count - 1]) + return false; + /* + * Loop invariants: hi > lo; + * glyphs[lo] <= glyph <= glyphs[hi]. + */ + while (hi - lo > 1) { + int mid = (lo + hi) >> 1; + + if (glyph >= glyphs[mid]) + lo = mid; + else + hi = mid; + } + return (glyph == glyphs[lo] || glyph == glyphs[hi]); +} diff --git a/gs/src/gdevpsdf.h b/gs/src/gdevpsdf.h index c0b094cfe..cb22525a8 100644 --- a/gs/src/gdevpsdf.h +++ b/gs/src/gdevpsdf.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common output syntax and parameters for PostScript and PDF writers */ #ifndef gdevpsdf_INCLUDED @@ -29,6 +16,8 @@ #include "scfx.h" #include "spsdf.h" +/*#define POST60*/ + extern const stream_template s_DCTE_template; /* don't want all of sdct.h */ /* @@ -39,6 +28,12 @@ extern const stream_template s_DCTE_template; /* don't want all of sdct.h */ /* ---------------- Distiller parameters ---------------- */ +#ifdef POST60 +#define POST60_VALUE(v) v, +#else +#define POST60_VALUE(v) /* */ +#endif + /* Parameters for controlling distillation of images. */ typedef struct psdf_image_params_s { stream_state *ACSDict; /* JPEG */ @@ -47,8 +42,14 @@ typedef struct psdf_image_params_s { int Depth; stream_state *Dict; /* JPEG or CCITTFax */ bool Downsample; +#ifdef POST60 + float DownsampleThreshold; +#endif enum psdf_downsample_type { ds_Average, +#ifdef POST60 + ds_Bicubic, +#endif ds_Subsample } DownsampleType; bool Encode; @@ -57,9 +58,9 @@ typedef struct psdf_image_params_s { const stream_template *filter_template; } psdf_image_params; -#define psdf_image_param_defaults(af, res, f, ft)\ +#define psdf_image_param_defaults(af, res, dst, f, ft)\ NULL/*ACSDict*/, 0/*false*/, af, -1, NULL/*Dict*/, 0/*false*/,\ - ds_Subsample, 1/*true*/, f, res, ft + POST60_VALUE(dst) ds_Subsample, 1/*true*/, f, res, ft /* Declare templates for default image compression filters. */ extern const stream_template s_CFE_template; @@ -75,12 +76,39 @@ typedef struct psdf_distiller_params_s { arp_All, arp_PageByPage } AutoRotatePages; +#ifdef POST60 + enum psdf_binding { + binding_Left, + binding_Right + } Binding; +#endif bool CompressPages; +#ifdef POST60 + enum psdf_default_rendering_intent { + ri_Default, + ri_Perceptual, + ri_Saturation, + ri_RelativeColorimetric, + ri_AbsoluteColorimetric + } DefaultRenderingIntent; + bool DetectBlends; + bool DoThumbnails; + int EndPage; +#endif long ImageMemory; +#ifdef POST60 + bool LockDistillerParams; +#endif bool LZWEncodePages; +#ifdef POST60 + int OPM; +#endif bool PreserveHalftoneInfo; bool PreserveOPIComments; bool PreserveOverprintSettings; +#ifdef POST60 + int StartPage; +#endif enum psdf_transfer_function_info { tfi_Preserve, tfi_Apply, @@ -92,45 +120,69 @@ typedef struct psdf_distiller_params_s { } UCRandBGInfo; bool UseFlateCompression; #define psdf_general_param_defaults(ascii)\ - ascii, arp_None, 1/*true*/, 250000, 0/*false*/,\ - 0/*false*/, 0/*false*/, 0/*false*/, tfi_Apply, ucrbg_Remove, 1 /*true */ + ascii, arp_None, POST60_VALUE(binding_Left) 1/*true*/,\ + POST60_VALUE(ri_Default) POST60_VALUE(0 /*false*/)\ + POST60_VALUE(0 /*false*/) POST60_VALUE(-1)\ + 250000, POST60_VALUE(0 /*false*/) 0/*false*/, POST60_VALUE(0)\ + 0/*false*/, 0/*false*/, 0/*false*/, POST60_VALUE(-1)\ + tfi_Apply, ucrbg_Remove, 1 /*true*/ /* Color sampled image parameters */ psdf_image_params ColorImage; +#ifdef POST60 + /* We're guessing that the xxxProfile parameters are ICC profiles. */ + gs_const_string CalCMYKProfile; + gs_const_string CalGrayProfile; + gs_const_string CalRGBProfile; + gs_const_string sRGBProfile; +#endif enum psdf_color_conversion_strategy { ccs_LeaveColorUnchanged, +#ifdef POST60 + ccs_UseDeviceIndependentColor, + ccs_UseDeviceIndependentColorForImages, + ccs_sRGB +#else ccs_UseDeviceDependentColor, ccs_UseDeviceIndependentColor +#endif } ColorConversionStrategy; bool ConvertCMYKImagesToRGB; bool ConvertImagesToIndexed; #define psdf_color_image_param_defaults\ - { psdf_image_param_defaults(1/*true*/, 72, 0/*"DCTEncode"*/, 0/*&s_DCTE_template*/) },\ + { psdf_image_param_defaults(1/*true*/, 72, 1.5, 0/*"DCTEncode"*/, 0/*&s_DCTE_template*/) },\ + POST60_VALUE({0}) POST60_VALUE({0}) POST60_VALUE({0}) POST60_VALUE({0})\ ccs_LeaveColorUnchanged, 1/*true*/, 0/*false */ /* Grayscale sampled image parameters */ psdf_image_params GrayImage; #define psdf_gray_image_param_defaults\ - { psdf_image_param_defaults(1/*true*/, 72, 0/*"DCTEncode"*/, 0/*&s_DCTE_template*/) } + { psdf_image_param_defaults(1/*true*/, 72, 2.0, 0/*"DCTEncode"*/, 0/*&s_DCTE_template*/) } /* Monochrome sampled image parameters */ psdf_image_params MonoImage; #define psdf_mono_image_param_defaults\ - { psdf_image_param_defaults(0/*false*/, 300, "CCITTFaxEncode", &s_CFE_template) } + { psdf_image_param_defaults(0/*false*/, 300, 2.0, "CCITTFaxEncode", &s_CFE_template) } /* Font embedding parameters */ gs_param_string_array AlwaysEmbed; gs_param_string_array NeverEmbed; +#ifdef POST60 + enum psdf_cannot_embed_font_policy { + cefp_OK, + cefp_Warning, + cefp_Error + } CannotEmbedFontPolicy; +#endif bool EmbedAllFonts; - bool SubsetFonts; int MaxSubsetPct; + bool SubsetFonts; #define psdf_font_param_defaults\ - { 0, 0, 1/*true*/ }, { 0, 0, 1/*true*/ },\ - 1/*true*/, 1/*true*/, 20 + {0}, {0}, POST60_VALUE(cefp_OK) 1/*true*/, 35, 1/*true*/ } psdf_distiller_params; @@ -168,10 +220,24 @@ typedef struct gx_device_psdf_s { /* extern its descriptor for the sake of subclasses. */ extern_st(st_device_psdf); #define public_st_device_psdf() /* in gdevpsdf.c */\ - gs_public_st_suffix_add0_final(st_device_psdf, gx_device_psdf,\ - "gx_device_psdf", device_psdf_enum_ptrs,\ - device_psdf_reloc_ptrs, gx_device_finalize, st_device_vector) -#define st_device_psdf_max_ptrs (st_device_vector_max_ptrs) + BASIC_PTRS(device_psdf_ptrs) {\ + GC_OBJ_ELT2(gx_device_psdf, params.ColorImage.ACSDict,\ + params.ColorImage.Dict),\ + POST60_VALUE(GC_CONST_STRING_ELT(gx_device_psdf, CalCMYKProfile))\ + POST60_VALUE(GC_CONST_STRING_ELT(gx_device_psdf, CalGrayProfile))\ + POST60_VALUE(GC_CONST_STRING_ELT(gx_device_psdf, CalRGBProfile))\ + POST60_VALUE(GC_CONST_STRING_ELT(gx_device_psdf, sRGBProfile))\ + GC_OBJ_ELT2(gx_device_psdf, params.GrayImage.ACSDict,\ + params.GrayImage.Dict),\ + GC_OBJ_ELT2(gx_device_psdf, params.MonoImage.ACSDict,\ + params.MonoImage.Dict),\ + GC_OBJ_ELT2(gx_device_psdf, params.AlwaysEmbed.data,\ + params.NeverEmbed.data)\ + };\ + gs_public_st_basic_super_final(st_device_psdf, gx_device_psdf,\ + "gx_device_psdf", device_psdf_ptrs, device_psdf_data,\ + &st_device_vector, 0, gx_device_finalize) +#define st_device_psdf_max_ptrs (st_device_vector_max_ptrs + 12) /* Get/put parameters. */ dev_proc_get_params(gdev_psdf_get_params); @@ -275,11 +341,15 @@ void psdf_enumerate_glyphs_begin(P5(psdf_glyph_enum_t *ppge, gs_font *font, uint subset_size, gs_glyph_space_t glyph_space)); -/* Reset a glyph enumeration. */ +/* + * Reset a glyph enumeration. + */ void psdf_enumerate_glyphs_reset(P1(psdf_glyph_enum_t *ppge)); -/* Enumerate the next glyph in a font or a font subset. */ -/* Return 0 if more glyphs, 1 if done, <0 if error. */ +/* + * Enumerate the next glyph in a font or a font subset. + * Return 0 if more glyphs, 1 if done, <0 if error. + */ int psdf_enumerate_glyphs_next(P2(psdf_glyph_enum_t *ppge, gs_glyph *pglyph)); /* @@ -290,11 +360,26 @@ int psdf_subset_glyphs(P3(gs_glyph glyphs[256], gs_font *font, const byte used[32])); /* + * Add composite glyph pieces to a list of glyphs. Does not sort or + * remove duplicates. max_pieces is the maximum number of pieces that a + * single glyph can have: if this value is not known, the caller should + * use max_count. + */ +int psdf_add_subset_pieces(P5(gs_glyph *glyphs, uint *pcount, uint max_count, + uint max_pieces, gs_font *font)); + +/* * Sort a list of glyphs and remove duplicates. Return the number of glyphs * in the result. */ int psdf_sort_glyphs(P2(gs_glyph *glyphs, int count)); +/* + * Determine whether a sorted list of glyphs includes a given glyph. + */ +bool psdf_sorted_glyphs_include(P3(const gs_glyph *glyphs, int count, + gs_glyph glyph)); + /* ------ Exported by gdevpsd1.c ------ */ /* @@ -328,6 +413,7 @@ typedef struct gs_font_type42_s gs_font_type42; #define WRITE_TRUETYPE_CMAP 1 /* generate cmap from the Encoding */ #define WRITE_TRUETYPE_NAME 2 /* generate name if missing */ #define WRITE_TRUETYPE_POST 4 /* generate post if missing */ +#define WRITE_TRUETYPE_NO_TRIMMED_TABLE 8 /* not OK to use cmap format 6 */ int psdf_write_truetype_font(P6(stream *s, gs_font_type42 *pfont, int options, gs_glyph *subset_glyphs, uint subset_size, const gs_const_string *alt_font_name)); diff --git a/gs/src/gdevpsdi.c b/gs/src/gdevpsdi.c index 1bb0106ae..9fdedf21b 100644 --- a/gs/src/gdevpsdi.c +++ b/gs/src/gdevpsdi.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Image compression for PostScript and PDF writers */ #include "math_.h" #include "jpeglib_.h" /* for sdct.h */ @@ -33,6 +20,14 @@ #include "srlx.h" #include "szlibx.h" +/****** + ****** HACK: The DCTEncode filter causes a crash, because of its + ****** complex initialization requirements. Substitute FlateEncode + ****** if available, otherwise don't compress. + ******/ +/* Define whether to substitute for the DCTEncode filter. */ +#define SUBSTITUTE_FOR_DCT_ENCODE + /* ---------------- Image compression ---------------- */ /* @@ -113,6 +108,13 @@ setup_image_compression(psdf_binary_writer *pbw, const psdf_image_params *pdip, /* Use LZW instead. */ template = &s_LZWE_template; } +#ifdef SUBSTITUTE_FOR_DCT_ENCODE + if (template == &s_DCTE_template) { + if (pdev->version < psdf_version_ll3) + return 0; /* FlateEncode is not available */ + template = &s_zlibE_template; + } +#endif st = s_alloc_state(pdev->v_memory, template->stype, "setup_image_compression"); if (st == 0) @@ -159,7 +161,8 @@ setup_image_compression(psdf_binary_writer *pbw, const psdf_image_params *pdip, } } else if (template == &s_DCTE_template) { /****** ADD PARAMETERS FROM pdip->Dict ******/ - } { + } + { int code = psdf_encode_binary(pbw, template, st); if (code < 0) { diff --git a/gs/src/gdevpsdp.c b/gs/src/gdevpsdp.c index 8c953ea06..e8eb2d82a 100644 --- a/gs/src/gdevpsdp.c +++ b/gs/src/gdevpsdp.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* (Distiller) parameter handling for PostScript and PDF writers */ #include "string_.h" #include "jpeglib_.h" /* for sdct.h */ @@ -35,8 +22,27 @@ #include "szlibx.h" /* Define a (bogus) GC descriptor for gs_param_string. */ -/****** FIX THIS ******/ -gs_private_st_simple(st_gs_param_string, gs_param_string, "gs_param_string"); +/* The only ones we use are GC-able and not persistent. */ +gs_private_st_composite(st_gs_param_string, gs_param_string, "gs_param_string", + param_string_enum_ptrs, param_string_reloc_ptrs); +private +ENUM_PTRS_WITH(param_string_enum_ptrs, gs_param_string *pstr) return 0; +case 0: return ENUM_CONST_STRING(pstr); +ENUM_PTRS_END +private +RELOC_PTRS_WITH(param_string_reloc_ptrs, gs_param_string *pstr) +{ + gs_const_string str; + + str.data = pstr->data, str.size = pstr->size; + RELOC_CONST_STRING_VAR(str); + pstr->data = str.data; +} +RELOC_PTRS_END +gs_private_st_element(st_param_string_element, gs_param_string, + "gs_param_string[]", param_string_elt_enum_ptrs, + param_string_elt_reloc_ptrs, st_gs_param_string); + /* ---------------- Get/put Distiller parameters ---------------- */ @@ -47,6 +53,22 @@ gs_private_st_simple(st_gs_param_string, gs_param_string, "gs_param_string"); */ /* + * ColorConversionStrategy is supposed to affect output color space + * according to the following table. ****** NOT IMPLEMENTED YET ****** + +PS Input: LeaveCU UseDIC UseDICFI sRGB +Gray art Gray CalGray/ICCBased Gray Gray +Gray image Gray CalGray/ICCBased CalGray/ICCBased Gray +RGB art RGB CalGray/ICCBased RGB CalRGB/sRGB +RGB image RGB CalGray/ICCBased CalRGB/ICCBased CalRGB/sRGB +CMYK art CMYK LAB/ICCBased CMYK CalRGB/sRGB +CMYK image CMYK LAB/ICCBased LAB/ICCBased CalRGB/sRGB +CIE art Cal/ICC Cal/ICC Cal/ICC CalRGB/sRGB +CIE image Cal/ICC Cal/ICC Cal/ICC CalRGB/sRGB + + */ + +/* * The Always/NeverEmbed parameters are defined as being incremental. Since * this isn't compatible with the general property of page devices that if * you do a getpagedevice, doing a setpagedevice later will restore the same @@ -70,6 +92,9 @@ typedef struct psdf_image_param_names_s { const char *Dict; const char *Downsample; const char *DownsampleType; +#ifdef POST60 + const char *DownsampleThreshold; +#endif const char *Encode; const char *Filter; const char *Resolution; @@ -77,8 +102,11 @@ typedef struct psdf_image_param_names_s { private const psdf_image_param_names Color_names = { "ColorACSImageDict", "AntiAliasColorImages", "AutoFilterColorImages", "ColorImageDepth", "ColorImageDict", - "DownsampleColorImages", "ColorImageDownsampleType", "EncodeColorImages", - "ColorImageFilter", "ColorImageResolution" + "DownsampleColorImages", "ColorImageDownsampleType", +#ifdef POST60 + "ColorImageDownsampleThreshold", +#endif + "EncodeColorImages", "ColorImageFilter", "ColorImageResolution" }; private const psdf_image_filter_name Poly_filters[] = { {"DCTEncode", &s_DCTE_template}, @@ -89,14 +117,20 @@ private const psdf_image_filter_name Poly_filters[] = { private const psdf_image_param_names Gray_names = { "GrayACSImageDict", "AntiAliasGrayImages", "AutoFilterGrayImages", "GrayImageDepth", "GrayImageDict", - "DownsampleGrayImages", "GrayImageDownsampleType", "EncodeGrayImages", - "GrayImageFilter", "GrayImageResolution" + "DownsampleGrayImages", "GrayImageDownsampleType", +#ifdef POST60 + "GrayImageDownsampleThreshold", +#endif + "EncodeGrayImages", "GrayImageFilter", "GrayImageResolution" }; private const psdf_image_param_names Mono_names = { 0, "AntiAliasMonoImages", 0, "MonoImageDepth", "MonoImageDict", - "DownsampleMonoImages", "MonoImageDownsampleType", "EncodeMonoImages", - "MonoImageFilter", "MonoImageResolution" + "DownsampleMonoImages", "MonoImageDownsampleType", +#ifdef POST60 + "MonoImageDownsampleThreshold", +#endif + "EncodeMonoImages", "MonoImageFilter", "MonoImageResolution" }; private const psdf_image_filter_name Mono_filters[] = { {"CCITTFaxEncode", &s_CFE_template}, @@ -109,18 +143,85 @@ private const char *const AutoRotatePages_names[] = { "None", "All", "PageByPage", 0 }; private const char *const ColorConversionStrategy_names[] = { - "LeaveColorUnchanged", "UseDeviceDependentColor", - "UseDeviceIndependentColor", 0 + "LeaveColorUnchanged", +#ifdef POST60 + "UseDeviceIndependentColor", + "UseDeviceIndependentColorForImages", + "sRGB", +#else + "UseDeviceDependentColor", + "UseDeviceIndependentColor", +#endif + 0 }; private const char *const DownsampleType_names[] = { - "Average", "Subsample", 0 + "Average", +#ifdef POST60 + "Bicubic", +#endif + "Subsample", 0 +}; +#ifdef POST60 +private const char *const Binding_names[] = { + "Left", "Right", 0 }; +private const char *const DefaultRenderingIntent_names[] = { + "Default", "Perceptual", "Saturation", "RelativeColorimetric", + "AbsoluteColorimetric", 0 +}; +#endif private const char *const TransferFunctionInfo_names[] = { "Preserve", "Apply", "Remove", 0 }; private const char *const UCRandBGInfo_names[] = { "Preserve", "Remove", 0 }; +#ifdef POST60 +private const char *const CannotEmbedFontPolicy_names[] = { + "OK", "Warning", "Error", 0 +}; +#endif + +#ifdef POST60 +private const gs_param_item_t psdf_param_items[] = { +#define pi(key, type, memb) { key, type, offset_of(gx_device_psdf, params.memb) } + + /* General parameters */ + + pi("ASCII85EncodePages", gs_param_type_bool, ASCII85EncodePages), + /* (AutoRotatePages) */ + /* (Binding) */ + pi("CompressPages", gs_param_type_bool, CompressPages), + /* (DefaultRenderingIntent) */ + pi("DetectBlends", gs_param_type_bool, DetectBlends), + pi("DoThumbnails", gs_param_type_bool, DoThumbnails), + pi("EndPage", gs_param_type_int, EndPage), + pi("ImageMemory", gs_param_type_long, ImageMemory), + pi("LockDistillerParams", gs_param_type_bool, LockDistillerParams), + pi("LZWEncodePages", gs_param_type_bool, LZWEncodePages), + pi("OPM", gs_param_type_int, OPM), + pi("PreserveHalftoneInfo", gs_param_type_bool, PreserveHalftoneInfo), + pi("PreserveOPIComments", gs_param_type_bool, PreserveOPIComments), + pi("PreserveOverprintSettings", gs_param_type_bool, PreserveOverprintSettings), + pi("StartPage", gs_param_type_int, StartPage), + /* (TransferFunctionInfo) */ + /* (UCRandBGInfo) */ + pi("UseFlateCompression", gs_param_type_bool, UseFlateCompression), + + /* Color image processing parameters */ + + pi("ConvertCMYKImagesToRGB", gs_param_type_bool, ConvertCMYKImagesToRGB), + pi("ConvertImagesToIndexed", gs_param_type_bool, ConvertImagesToIndexed), + + /* Font embedding parameters */ + + pi("EmbedAllFonts", gs_param_type_bool, EmbedAllFonts), + pi("MaxSubsetPct", gs_param_type_int, MaxSubsetPct), + +#undef pi + gs_param_item_end +}; +#endif /* -------- Get parameters -------- */ @@ -128,6 +229,17 @@ extern stream_state_proc_get_params(s_DCTE_get_params, stream_DCT_state); extern stream_state_proc_get_params(s_CF_get_params, stream_CF_state); typedef stream_state_proc_get_params((*ss_get_params_t), stream_state); +#ifdef POST60 +private int +psdf_write_name(gs_param_list *plist, const char *key, const char *str) +{ + gs_param_string pstr; + + param_string_from_string(pstr, str); + return param_write_name(plist, key, &pstr); +} +#endif + private int psdf_CF_get_params(gs_param_list * plist, const stream_state * ss, bool all) { @@ -207,6 +319,11 @@ psdf_get_image_params(gs_param_list * plist, ¶ms->Downsample)) < 0 || (code = param_write_name(plist, pnames->DownsampleType, &dsts)) < 0 || +#ifdef POST60 + /****** RANGE = 1.0 TO 10.0, DEFAULT 1.5 FOR COLOR, ELSE 2.0 ******/ + (code = param_write_float(plist, pnames->DownsampleThreshold, + ¶ms->DownsampleThreshold)) < 0 || +#endif (code = param_write_bool(plist, pnames->Encode, ¶ms->Encode)) < 0 || (code = (params->Filter == 0 ? 0 : @@ -238,66 +355,107 @@ gdev_psdf_get_params(gx_device * dev, gs_param_list * plist) gx_device_psdf *pdev = (gx_device_psdf *) dev; int code = gdev_vector_get_params(dev, plist); gs_param_string arps, ccss, tfis, ucrbgis; +#ifdef POST60 + gs_param_string ccpros, cgpros, crpros, srpros; +#endif if (code < 0) return code; param_string_from_string(arps, - AutoRotatePages_names[(int)pdev->params.AutoRotatePages]); + AutoRotatePages_names[(int)pdev->params.AutoRotatePages]); param_string_from_string(ccss, - ColorConversionStrategy_names[(int)pdev->params.ColorConversionStrategy]); + ColorConversionStrategy_names[(int)pdev->params.ColorConversionStrategy]); param_string_from_string(tfis, TransferFunctionInfo_names[(int)pdev->params.TransferFunctionInfo]); param_string_from_string(ucrbgis, - UCRandBGInfo_names[(int)pdev->params.UCRandBGInfo]); + UCRandBGInfo_names[(int)pdev->params.UCRandBGInfo]); +#ifdef POST60 +#define SET_PARAM_STRING(ps, e)\ + (ps.data = pdev->params.e.data, ps.size = pdev->params.e.size,\ + ps.persistent = false) + SET_PARAM_STRING(ccpros, CalCMYKProfile); + SET_PARAM_STRING(cgpros, CalGrayProfile); + SET_PARAM_STRING(crpros, CalRGBProfile); + SET_PARAM_STRING(srpros, sRGBProfile); +#undef SET_PARAM_STRING +#endif + if ( +#ifdef POST60 + (code = gs_param_write_items(plist, pdev, NULL, psdf_param_items)) < 0 || +#endif + /* General parameters */ - (code = param_write_bool(plist, "ASCII85EncodePages", - &pdev->params.ASCII85EncodePages)) < 0 || - (code = param_write_name(plist, "AutoRotatePages", - &arps)) < 0 || - (code = param_write_bool(plist, "CompressPages", - &pdev->params.CompressPages)) < 0 || - (code = param_write_long(plist, "ImageMemory", - &pdev->params.ImageMemory)) < 0 || - (code = param_write_bool(plist, "LZWEncodePages", - &pdev->params.LZWEncodePages)) < 0 || - (code = param_write_bool(plist, "PreserveHalftoneInfo", +#ifndef POST60 + (code = param_write_bool(plist, "ASCII85EncodePages", + &pdev->params.ASCII85EncodePages)) < 0 || +#endif + (code = param_write_name(plist, "AutoRotatePages", + &arps)) < 0 || +#ifdef POST60 + (code = psdf_write_name(plist, "Binding", + Binding_names[(int)pdev->params.Binding])) < 0 || + (code = psdf_write_name(plist, "DefaultRenderingIntent", + DefaultRenderingIntent_names[(int)pdev->params.DefaultRenderingIntent])) < 0 || +#else + (code = param_write_bool(plist, "CompressPages", + &pdev->params.CompressPages)) < 0 || + (code = param_write_long(plist, "ImageMemory", + &pdev->params.ImageMemory)) < 0 || + (code = param_write_bool(plist, "LZWEncodePages", + &pdev->params.LZWEncodePages)) < 0 || + (code = param_write_bool(plist, "PreserveHalftoneInfo", &pdev->params.PreserveHalftoneInfo)) < 0 || - (code = param_write_bool(plist, "PreserveOPIComments", - &pdev->params.PreserveOPIComments)) < 0 || - (code = param_write_bool(plist, "PreserveOverprintSettings", - &pdev->params.PreserveOverprintSettings)) < 0 || - (code = param_write_name(plist, "TransferFunctionInfo", &tfis)) < 0 || - (code = param_write_name(plist, "UCRandBGInfo", &ucrbgis)) < 0 || - (code = param_write_bool(plist, "UseFlateCompression", - &pdev->params.UseFlateCompression)) < 0 || + (code = param_write_bool(plist, "PreserveOPIComments", + &pdev->params.PreserveOPIComments)) < 0 || + (code = param_write_bool(plist, "PreserveOverprintSettings", + &pdev->params.PreserveOverprintSettings)) < 0 || +#endif + (code = param_write_name(plist, "TransferFunctionInfo", &tfis)) < 0 || + (code = param_write_name(plist, "UCRandBGInfo", &ucrbgis)) < 0 || +#ifndef POST60 + (code = param_write_bool(plist, "UseFlateCompression", + &pdev->params.UseFlateCompression)) < 0 || +#endif /* Color sampled image parameters */ - (code = psdf_get_image_params(plist, &Color_names, &pdev->params.ColorImage)) < 0 || - (code = param_write_name(plist, "ColorConversionStrategy", - &ccss)) < 0 || - (code = param_write_bool(plist, "ConvertCMYKImagesToRGB", - &pdev->params.ConvertCMYKImagesToRGB)) < 0 || - (code = param_write_bool(plist, "ConvertImagesToIndexed", - &pdev->params.ConvertImagesToIndexed)) < 0 || + (code = psdf_get_image_params(plist, &Color_names, &pdev->params.ColorImage)) < 0 || + (code = param_write_name(plist, "ColorConversionStrategy", + &ccss)) < 0 || +#ifdef POST60 + (code = param_write_string(plist, "CalCMYKProfile", &ccpros)) < 0 || + (code = param_write_string(plist, "CalGrayProfile", &cgpros)) < 0 || + (code = param_write_string(plist, "CalRGBProfile", &crpros)) < 0 || + (code = param_write_string(plist, "sRGBProfile", &srpros)) < 0 || +#else + (code = param_write_bool(plist, "ConvertCMYKImagesToRGB", + &pdev->params.ConvertCMYKImagesToRGB)) < 0 || + (code = param_write_bool(plist, "ConvertImagesToIndexed", + &pdev->params.ConvertImagesToIndexed)) < 0 || +#endif /* Gray sampled image parameters */ - (code = psdf_get_image_params(plist, &Gray_names, &pdev->params.GrayImage)) < 0 || + (code = psdf_get_image_params(plist, &Gray_names, &pdev->params.GrayImage)) < 0 || /* Mono sampled image parameters */ - (code = psdf_get_image_params(plist, &Mono_names, &pdev->params.MonoImage)) < 0 || + (code = psdf_get_image_params(plist, &Mono_names, &pdev->params.MonoImage)) < 0 || /* Font embedding parameters */ - (code = psdf_get_embed_param(plist, ".AlwaysEmbed", &pdev->params.AlwaysEmbed)) < 0 || - (code = psdf_get_embed_param(plist, ".NeverEmbed", &pdev->params.NeverEmbed)) < 0 || - (code = param_write_bool(plist, "EmbedAllFonts", &pdev->params.EmbedAllFonts)) < 0 || - (code = param_write_bool(plist, "SubsetFonts", &pdev->params.SubsetFonts)) < 0 || - (code = param_write_int(plist, "MaxSubsetPct", &pdev->params.MaxSubsetPct)) < 0 + (code = psdf_get_embed_param(plist, ".AlwaysEmbed", &pdev->params.AlwaysEmbed)) < 0 || + (code = psdf_get_embed_param(plist, ".NeverEmbed", &pdev->params.NeverEmbed)) < 0 || +#ifdef POST60 + (code = psdf_write_name(plist, "CannotEmbedFontPolicy", + CannotEmbedFontPolicy_names[(int)pdev->params.CannotEmbedFontPolicy])) < 0 +#else + (code = param_write_bool(plist, "EmbedAllFonts", &pdev->params.EmbedAllFonts)) < 0 || + (code = param_write_int(plist, "MaxSubsetPct", &pdev->params.MaxSubsetPct)) < 0 || + (code = param_write_bool(plist, "SubsetFonts", &pdev->params.SubsetFonts)) < 0 +#endif ); return code; } @@ -325,24 +483,14 @@ psdf_DCT_put_params(gs_param_list * plist, stream_state * ss) } /* Put [~](Always|Never)Embed parameters. */ -private bool -param_string_eq(const gs_param_string *ps1, const gs_param_string *ps2) -{ - return !bytes_compare(ps1->data, ps1->size, ps2->data, ps2->size); -} private int -psdf_put_embed_param(gs_param_list * plist, gs_param_name notpname, - gs_param_name allpname, gs_param_string_array * psa, - gs_memory_t *mem, int ecode) +param_read_embed_array(gs_param_list * plist, gs_param_name pname, + gs_param_string_array * psa, int ecode) { - gs_param_name pname = notpname + 1; int code; - gs_param_string_array sa, nsa, asa; - bool replace; - /***** Storage management is incomplete ******/ - sa.data = 0, sa.size = 0; - switch (code = param_read_name_array(plist, pname, &sa)) { + psa->data = 0, psa->size = 0; + switch (code = param_read_name_array(plist, pname, psa)) { default: ecode = code; param_signal_error(plist, pname, ecode); @@ -350,24 +498,83 @@ psdf_put_embed_param(gs_param_list * plist, gs_param_name notpname, case 1: break; } - nsa.data = 0, nsa.size = 0; - switch (code = param_read_name_array(plist, notpname, &nsa)) { - default: - ecode = code; - param_signal_error(plist, notpname, ecode); - case 0: - case 1: - break; + return ecode; +} +private bool +param_string_eq(const gs_param_string *ps1, const gs_param_string *ps2) +{ + return !bytes_compare(ps1->data, ps1->size, ps2->data, ps2->size); +} +private int +add_embed(gs_param_string_array *prsa, const gs_param_string_array *psa, + gs_memory_t *mem) +{ + uint i; + gs_param_string *const rdata = + (gs_param_string *)prsa->data; /* break const */ + uint count = prsa->size; + + for (i = 0; i < psa->size; ++i) { + uint j; + + for (j = 0; j < count; ++j) + if (param_string_eq(&psa->data[i], &rdata[j])) + break; + if (j == count) { + uint size = psa->data[i].size; + byte *data = gs_alloc_string(mem, size, "add_embed"); + + if (data == 0) + return_error(gs_error_VMerror); + memcpy(data, psa->data[i].data, size); + rdata[count].data = data; + rdata[count].size = size; + rdata[count].persistent = false; + count++; + } } - asa.data = 0, asa.size = 0; - switch (code = param_read_name_array(plist, allpname, &asa)) { - default: - ecode = code; - param_signal_error(plist, allpname, ecode); - case 0: - case 1: - break; + prsa->size = count; + return 0; +} +private void +delete_embed(gs_param_string_array *prsa, const gs_param_string_array *pnsa, + gs_memory_t *mem) +{ + uint i; + gs_param_string *const rdata = + (gs_param_string *)prsa->data; /* break const */ + uint count = prsa->size; + + for (i = pnsa->size; i-- > 0;) { + uint j; + + for (j = count; j-- > 0;) + if (param_string_eq(&pnsa->data[i], &rdata[j])) + break; + if (j + 1 != 0) { + gs_free_const_string(mem, rdata[j].data, rdata[j].size, + "delete_embed"); + rdata[j] = rdata[--count]; + } } + prsa->size = count; +} +private int +psdf_put_embed_param(gs_param_list * plist, gs_param_name notpname, + gs_param_name allpname, gs_param_string_array * psa, + gs_memory_t *mem, int ecode) +{ + gs_param_name pname = notpname + 1; + gs_param_string_array sa, nsa, asa; + bool replace; + gs_param_string *rdata; + gs_param_string_array rsa; + int code = 0; + + mem = gs_memory_stable(mem); + ecode = param_read_embed_array(plist, pname, &sa, ecode); + ecode = param_read_embed_array(plist, notpname, &nsa, ecode); + ecode = param_read_embed_array(plist, allpname, &asa, ecode); if (ecode < 0) return ecode; /* @@ -390,56 +597,50 @@ psdf_put_embed_param(gs_param_list * plist, gs_param_name notpname, replace = false; break; } + if (replace) + return 0; /* no-op */ } if (replace) { - /****** FREE OLD ARRAY ******/ - *psa = asa; + /* Wholesale replacement, only asa is relevant. */ + rdata = gs_alloc_struct_array(mem, asa.size, gs_param_string, + &st_param_string_element, + "psdf_put_embed_param(replace)"); + if (rdata == 0) + return_error(gs_error_VMerror); + rsa.data = rdata; + rsa.size = 0; + if ((code = add_embed(&rsa, &asa, mem)) < 0) { + gs_free_object(mem, rdata, "psdf_put_embed_param(replace)"); + ecode = code; + } else + delete_embed(psa, psa, mem); } else if (sa.data || nsa.data) { - /* Incremental update. */ - gs_param_string_array rsa; - gs_param_string *rdata; - uint i; - uint count = psa->size; - - rdata = gs_alloc_struct_array(mem, count + sa.size, - gs_param_string, &st_gs_param_string, - "psdf_put_embed_param"); + /* Incremental update, sa and nsa are relevant, asa is not. */ + rdata = gs_alloc_struct_array(mem, psa->size + sa.size, + gs_param_string, + &st_param_string_element, + "psdf_put_embed_param(update)"); if (rdata == 0) return_error(gs_error_VMerror); memcpy(rdata, psa->data, psa->size * sizeof(*psa->data)); - /* Add sa to *psa. */ - for (i = 0; i < sa.size; ++i) { - uint j; - - for (j = 0; j < count; ++j) - if (param_string_eq(&sa.data[i], &rdata[j])) - break; - if (j == count) - rdata[count++] = sa.data[i]; - else { - /****** FREE sa.data[i] ******/ - } - } - /* Delete nsa from *psa. */ - for (i = 0; i < nsa.size; ++i) { - uint j; - - for (j = 0; j < count; ++j) - if (param_string_eq(&sa.data[i], &rdata[j])) - break; - if (j < count) { - /****** FREE rdata[j] ******/ - rdata[j] = rdata[--count]; - } - /****** FREE nsa.data[i] ******/ - } - rdata = gs_resize_object(mem, rdata, count, "psdf_put_embed_param"); rsa.data = rdata; - rsa.size = count; - rsa.persistent = true; + rsa.size = psa->size; + if ((code = add_embed(&rsa, &sa, mem)) < 0) { + gs_free_object(mem, rdata, "psdf_put_embed_param(update)"); + ecode = code; + } else { + delete_embed(&rsa, &nsa, mem); + rsa.data = gs_resize_object(mem, rdata, rsa.size, + "psdf_put_embed_param(resize)"); + } + } else + return 0; /* no-op */ + if (code >= 0) { + gs_free_const_object(mem, psa->data, "psdf_put_embed_param(free)"); + rsa.persistent = false; *psa = rsa; } - return 0; + return ecode; } /* Put an image Dict parameter. */ @@ -501,7 +702,6 @@ psdf_put_image_params(const gx_device_psdf * pdev, gs_param_list * plist, psdf_image_params * params, int ecode) { gs_param_string fs; - /* * Since this procedure can be called before the device is open, * we must use pdev->memory rather than pdev->v_memory. diff --git a/gs/src/gdevpsds.c b/gs/src/gdevpsds.c index ccf8fa32f..281f4c392 100644 --- a/gs/src/gdevpsds.c +++ b/gs/src/gdevpsds.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Image processing streams for PostScript and PDF writers */ #include "gx.h" #include "memory_.h" diff --git a/gs/src/gdevpsds.h b/gs/src/gdevpsds.h index 78b95079f..2f6fa5814 100644 --- a/gs/src/gdevpsds.h +++ b/gs/src/gdevpsds.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Image processing stream interface for PostScript and PDF writers */ #ifndef gdevpsds_INCLUDED diff --git a/gs/src/gdevpsdt.c b/gs/src/gdevpsdt.c index 0889a7fdc..1343da248 100644 --- a/gs/src/gdevpsdt.c +++ b/gs/src/gdevpsdt.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Write an embedded TrueType font */ #include "memory_.h" #include <stdlib.h> /* for qsort */ @@ -72,11 +59,7 @@ put_loca(stream *s, ulong offset, int indexToLocFormat) #define S8(p) (int)((U8(p) ^ 0x80) - 0x80) #define U16(p) (((uint)((p)[0]) << 8) + (p)[1]) #define S16(p) (int)((U16(p) ^ 0x8000) - 0x8000) -private ulong -u32(const byte *p) -{ - return ((ulong)U16(p) << 16) + U16((p) + 2); -} +#define u32(p) get_u32_msb(p) private void put_u16(byte *p, uint v) { @@ -170,26 +153,57 @@ mac_glyph_index(gs_font *font, int ch, gs_const_string *pstr) } /* Write a generated cmap table. */ -static const byte cmap_initial[] = { +static const byte cmap_initial_0[] = { 0, 0, /* table version # = 0 */ 0, 2, /* # of encoding tables = 2 */ + /* First table, Macintosh */ 0, 1, /* platform ID = Macintosh */ 0, 0, /* platform encoding ID = ??? */ 0, 0, 0, 4+8+8, /* offset to table start */ - + /* Second table, Windows */ 0, 3, /* platform ID = Microsoft */ 0, 0, /* platform encoding ID = unknown */ - 0, 0, 0, 4+8+8+6, /* offset to table start */ - /****** VARIABLE, add 2 x # of glyphs ******/ + 0, 0, 1, 4+8+8+6, /* offset to table start */ + /* Start of Macintosh format 0 table */ 0, 0, /* format = 0, byte encoding table */ - 0, 6, /****** VARIABLE, add 2 x # of glyphs ******/ - 0, 0 + 1, 6, /* length */ + 0, 0 /* version number */ +}; +static const byte cmap_initial_6[] = { + 0, 0, /* table version # = 0 */ + 0, 2, /* # of encoding tables = 2 */ + + /* First table, Macintosh */ + 0, 1, /* platform ID = Macintosh */ + 0, 0, /* platform encoding ID = ??? */ + 0, 0, 0, 4+8+8, /* offset to table start */ + /* Second table, Windows */ + 0, 3, /* platform ID = Microsoft */ + 0, 0, /* platform encoding ID = unknown */ + 0, 0, 0, 4+8+8+10, /* offset to table start */ + /****** VARIABLE, add 2 x # of entries ******/ + + /* Start of Macintosh format 6 table */ + 0, 6, /* format = 6, trimmed table mapping */ + 0, 10, /* length ****** VARIABLE, add 2 x # of entries ******/ + 0, 0, /* version number */ + 0, 0, /* first character code */ + 0, 0 /* # of entries ****** VARIABLE ****** */ +}; +static const byte cmap_initial_4[] = { + 0, 0, /* table version # = 0 */ + 0, 1, /* # of encoding tables = 2 */ + + /* Single table, Windows */ + 0, 3, /* platform ID = Microsoft */ + 0, 0, /* platform encoding ID = unknown */ + 0, 0, 0, 4+8 /* offset to table start */ }; static const byte cmap_sub_initial[] = { 0, 4, /* format = 4, segment mapping */ - 0, 32, /* length **VARIABLE, add 2 x # of glyphs ** */ + 0, 32, /* length ** VARIABLE, add 2 x # of glyphs ** */ 0, 0, /* version # */ 0, 4, /* 2 x segCount */ 0, 4, /* searchRange = 2 x 2 ^ floor(log2(segCount)) */ @@ -206,18 +220,16 @@ static const byte cmap_sub_initial[] = { 0, 4, /* idRangeOffset[0] */ 0, 0 /* idRangeOffset[1] */ }; -private uint -size_cmap(int num_glyphs) -{ - return sizeof(cmap_initial) + sizeof(cmap_sub_initial) + num_glyphs * 4; -} private void -write_cmap(stream *s, gs_font *font, uint first_glyph, int num_glyphs, - gs_glyph max_glyph) +write_cmap(stream *s, gs_font *font, uint first_code, int num_glyphs, + gs_glyph max_glyph, int options, uint cmap_length) { - byte cmap[sizeof(cmap_initial)]; byte cmap_sub[sizeof(cmap_sub_initial)]; byte entries[256 * 2]; + int first_entry = 0, end_entry = num_glyphs; + bool can_use_trimmed = !(options & WRITE_TRUETYPE_NO_TRIMMED_TABLE); + uint merge = 0; + uint num_entries; int i; /* Collect the table entries. */ @@ -225,32 +237,71 @@ write_cmap(stream *s, gs_font *font, uint first_glyph, int num_glyphs, for (i = 0; i < num_glyphs; ++i) { gs_glyph glyph = font->procs.encode_char(font, (gs_char)i, GLYPH_SPACE_INDEX); + uint glyph_index; if (glyph == gs_no_glyph || glyph < gs_min_cid_glyph || glyph > max_glyph ) glyph = gs_min_cid_glyph; - put_u16(entries + 2 * i, (uint)(glyph - gs_min_cid_glyph)); + glyph_index = (uint)(glyph - gs_min_cid_glyph); + merge |= glyph_index; + put_u16(entries + 2 * i, glyph_index); + } + while (end_entry > first_entry && !U16(entries + 2 * end_entry - 2)) + --end_entry; + while (first_entry < end_entry && !U16(entries + 2 * first_entry)) + ++first_entry; + num_entries = end_entry - first_entry; + + /* Write the table header and Macintosh sub-table (if any). */ + if (merge == (byte)merge && (num_entries <= 127 || !can_use_trimmed)) { + /* Use byte encoding format. */ + memset(entries + 2 * num_glyphs, 0, + sizeof(entries) - 2 * num_glyphs); + pwrite(s, cmap_initial_0, sizeof(cmap_initial_0)); + for (i = 0; i <= 0xff; ++i) + sputc(s, (byte)entries[2 * i + 1]); + } else if (can_use_trimmed) { + /* Use trimmed table format. */ + byte cmap_data[sizeof(cmap_initial_6)]; + + memcpy(cmap_data, cmap_initial_6, sizeof(cmap_initial_6)); + put_u16(cmap_data + 18, + U16(cmap_data + 18) + num_entries * 2); /* offset */ + put_u16(cmap_data + 22, + U16(cmap_data + 22) + num_entries * 2); /* length */ + put_u16(cmap_data + 26, first_code + first_entry); + put_u16(cmap_data + 28, num_entries); + pwrite(s, cmap_data, sizeof(cmap_data)); + pwrite(s, entries + first_entry * 2, num_entries * 2); + } else { + /* + * Punt. Acrobat Reader 3 can't handle any other Mac table format. + * (AR3 for Linux doesn't seem to be able to handle Windows format, + * either, but maybe AR3 for Windows can.) + */ + pwrite(s, cmap_initial_4, sizeof(cmap_initial_4)); } - - /* Write the table header and Macintosh sub-table. */ - - memcpy(cmap, cmap_initial, sizeof(cmap_initial)); - put_u16(cmap + 18, U16(cmap + 18) + num_glyphs * 2); /* length */ - put_u16(cmap + 22, U16(cmap + 22) + num_glyphs * 2); /* length */ - pwrite(s, cmap, sizeof(cmap)); - pwrite(s, entries, num_glyphs * 2); /* Write the Windows sub-table. */ memcpy(cmap_sub, cmap_sub_initial, sizeof(cmap_sub_initial)); - put_u16(cmap_sub + 2, U16(cmap_sub + 2) + num_glyphs * 2); /* length */ - put_u16(cmap_sub + 14, first_glyph + num_glyphs - 1); /* endCount[0] */ - put_u16(cmap_sub + 20, first_glyph); /* startCount[0] */ + put_u16(cmap_sub + 2, U16(cmap_sub + 2) + num_entries * 2); /* length */ + put_u16(cmap_sub + 14, first_code + end_entry - 1); /* endCount[0] */ + put_u16(cmap_sub + 20, first_code + first_entry); /* startCount[0] */ pwrite(s, cmap_sub, sizeof(cmap_sub)); - pwrite(s, entries, num_glyphs * 2); + pwrite(s, entries + first_entry * 2, num_entries * 2); + put_pad(s, cmap_length); +} +private uint +size_cmap(gs_font *font, uint first_code, int num_glyphs, gs_glyph max_glyph, + int options) +{ + stream poss; - put_pad(s, size_cmap(num_glyphs)); + swrite_position_only(&poss); + write_cmap(&poss, font, first_code, num_glyphs, max_glyph, options, 0); + return stell(&poss); } /* Write a generated name table. */ @@ -286,7 +337,7 @@ write_name(stream *s, const gs_const_string *font_name) /* Write a generated OS/2 table. */ typedef struct OS_2_s { byte - version[2], /* version 0, see below */ + version[2], /* version 1 */ xAvgCharWidth[2], usWeightClass[2], usWidthClass[2], @@ -314,11 +365,17 @@ typedef struct OS_2_s { sTypoDescender[2], sTypoLineGap[2], usWinAscent[2], - usWinDescent[2]; - /*ulCodePageRanges[8];*/ /* not used in OS/2 version 0 */ + usWinDescent[2], + ulCodePageRanges[8]; } OS_2_t; #define OS_2_LENGTH sizeof(OS_2_t) private void +update_OS_2(OS_2_t *pos2, uint first_glyph, int num_glyphs) +{ + put_u16(pos2->usFirstCharIndex, first_glyph); + put_u16(pos2->usLastCharIndex, first_glyph + num_glyphs - 1); +} +private void write_OS_2(stream *s, gs_font *font, uint first_glyph, int num_glyphs) { OS_2_t os2; @@ -328,8 +385,8 @@ write_OS_2(stream *s, gs_font *font, uint first_glyph, int num_glyphs) * ones, which affect character mapping, are usFirst/LastCharIndex. */ memset(&os2, 0, sizeof(os2)); - put_u16(os2.usFirstCharIndex, first_glyph); - put_u16(os2.usLastCharIndex, first_glyph + num_glyphs - 1); + put_u16(os2.version, 1); + update_OS_2(&os2, first_glyph, num_glyphs); pwrite(s, &os2, sizeof(os2)); put_pad(s, sizeof(os2)); } @@ -457,7 +514,7 @@ compare_table_tags(const void *pt1, const void *pt2) } int psdf_write_truetype_font(stream *s, gs_font_type42 *pfont, int options, - gs_glyph *subset_glyphs, uint subset_size, + gs_glyph *orig_subset_glyphs, uint orig_subset_size, const gs_const_string *alt_font_name) { gs_font *const font = (gs_font *)pfont; @@ -475,6 +532,7 @@ psdf_write_truetype_font(stream *s, gs_font_type42 *pfont, int options, ulong max_glyph; uint glyf_length, glyf_checksum = 0 /****** BOGUS ******/; uint loca_length, loca_checksum[2]; + uint numGlyphs; /* original value from maxp */ byte head[56]; /* 0 mod 4 */ post_t post; ulong head_checksum, file_checksum = 0; @@ -483,6 +541,12 @@ psdf_write_truetype_font(stream *s, gs_font_type42 *pfont, int options, have_name = !(options & WRITE_TRUETYPE_NAME), have_OS_2 = false, have_post = false; + uint cmap_length; + ulong OS_2_start; + uint OS_2_length = OS_2_LENGTH; + gs_glyph subset_data[256 * 3]; /* *3 for composites */ + gs_glyph *subset_glyphs = orig_subset_glyphs; + uint subset_size = orig_subset_size; int code; if (alt_font_name) @@ -493,8 +557,19 @@ psdf_write_truetype_font(stream *s, gs_font_type42 *pfont, int options, /* Sort the subset glyphs, if any. */ - if (subset_glyphs) + if (subset_glyphs) { + /* Add the component glyphs for composites. */ + memcpy(subset_data, orig_subset_glyphs, + sizeof(gs_glyph) * subset_size); + subset_glyphs = subset_data; + code = psdf_add_subset_pieces(subset_glyphs, &subset_size, + countof(subset_data), + countof(subset_data), + font); + if (code < 0) + return code; subset_size = psdf_sort_glyphs(subset_glyphs, subset_size); + } /* * Count the number of tables, including the eventual glyf and loca @@ -506,16 +581,18 @@ psdf_write_truetype_font(stream *s, gs_font_type42 *pfont, int options, numTables_stored = U16(OffsetTable + 4); for (i = numTables = 0; i < numTables_stored; ++i) { const byte *tab; + const byte *data; + ulong start; + uint length; ACCESS(12 + i * 16, 16, tab); + start = u32(tab + 8); + length = u32(tab + 12); if (!memcmp(tab, "head", 4)) { - const byte *head_data; - uint length = u32(tab + 12); - if (length != 54) return_error(gs_error_invalidfont); - ACCESS(u32(tab + 8), length, head_data); - memcpy(head, head_data, length); + ACCESS(start, length, data); + memcpy(head, data, length); } else if ( !memcmp(tab, "gly", 3) /*glyf=synthesized, glyx=Adobe bogus*/ || !memcmp(tab, "loc", 3) /*loca=synthesized, locx=Adobe bogus*/ || @@ -526,15 +603,23 @@ psdf_write_truetype_font(stream *s, gs_font_type42 *pfont, int options, else { if (numTables == MAX_NUM_TABLES) return_error(gs_error_limitcheck); - memcpy(&tables[numTables++ * 16], tab, 16); if (!memcmp(tab, "cmap", 4)) have_cmap = true; - else if (!memcmp(tab, "name", 4)) + else if (!memcmp(tab, "maxp", 4)) { + ACCESS(start, length, data); + numGlyphs = U16(data + 4); + } else if (!memcmp(tab, "name", 4)) have_name = true; - else if (!memcmp(tab, "OS/2", 4)) + else if (!memcmp(tab, "OS/2", 4)) { have_OS_2 = true; - else if (!memcmp(tab, "post", 4)) + if (length > OS_2_LENGTH) + return_error(gs_error_invalidfont); + OS_2_start = start; + OS_2_length = length; + continue; + } else if (!memcmp(tab, "post", 4)) have_post = true; + memcpy(&tables[numTables++ * 16], tab, 16); } } @@ -565,15 +650,22 @@ psdf_write_truetype_font(stream *s, gs_font_type42 *pfont, int options, } if_debug2('l', "[l]max_glyph = %lu, glyf_length = %lu\n", (ulong)max_glyph, (ulong)glyf_length); - loca_length = (max_glyph + 2) << 2; + /* + * For subset fonts, we should trim the loca table so that it only + * contains entries through max_glyph. Unfortunately, this would + * require changing numGlyphs in maxp, which in turn would affect hdmx, + * hhea, hmtx, vdmx, vhea, vmtx, and possibly other tables. This is way + * more work than we want to do right now. + */ + /*loca_length = (max_glyph + 2) << 2;*/ + loca_length = (numGlyphs + 1) << 2; indexToLocFormat = (glyf_length > 0x1fffc); if (!indexToLocFormat) loca_length >>= 1; /* * If necessary, compute the length of the post table. Note that we - * only generate post entries for characters in the Encoding. - */ + * only generate post entries for characters in the Encoding. */ if (!have_post) { memset(&post, 0, sizeof(post)); @@ -592,13 +684,13 @@ psdf_write_truetype_font(stream *s, gs_font_type42 *pfont, int options, head_checksum += u32(&head[i]); /* - * Construct the table directory, except for glyf, loca, and head, - * and, if necessary, generated cmap, name, OS/2, and post tables. + * Construct the table directory, except for glyf, loca, head, OS/2, + * and, if necessary, generated cmap, name, and post tables. * Note that the existing directory is already sorted by tag. */ - numTables_out = numTables + 3 + - !have_cmap + !have_name + !have_OS_2 + !have_post; + numTables_out = numTables + 4 + + !have_cmap + !have_name + !have_post; offset = 12 + numTables_out * 16; for (i = 0; i < numTables; ++i) { byte *tab = &tables[i * 16]; @@ -620,8 +712,8 @@ psdf_write_truetype_font(stream *s, gs_font_type42 *pfont, int options, tab += 16; if (!have_cmap) { - uint cmap_length = size_cmap(256); - + cmap_length = size_cmap(font, 0xf000, 256, + gs_min_cid_glyph + max_glyph, options); offset = put_table(tab, "cmap", 0L /****** NO CHECKSUM ******/, offset, cmap_length); tab += 16; @@ -633,11 +725,9 @@ psdf_write_truetype_font(stream *s, gs_font_type42 *pfont, int options, tab += 16; } - if (!have_OS_2) { - offset = put_table(tab, "OS/2", 0L /****** NO CHECKSUM ******/, - offset, OS_2_LENGTH); - tab += 16; - } + offset = put_table(tab, "OS/2", 0L /****** NO CHECKSUM ******/, + offset, OS_2_length); + tab += 16; if (!have_post) { offset = put_table(tab, "post", 0L /****** NO CHECKSUM ******/, @@ -692,9 +782,10 @@ psdf_write_truetype_font(stream *s, gs_font_type42 *pfont, int options, const byte *tab = &tables[i * 16]; if (tab[8] < 0x40) { + ulong start = u32(tab + 8); uint length = u32(tab + 12); - write_range(s, pfont, u32(tab + 8), length); + write_range(s, pfont, start, length); put_pad(s, length); } } @@ -729,18 +820,38 @@ psdf_write_truetype_font(stream *s, gs_font_type42 *pfont, int options, if (pfont->data.get_outline(pfont, glyph, &glyph_string) >= 0) offset += glyph_string.size; } - /* Write the trailing loca entry. */ - put_loca(s, offset, indexToLocFormat); + /* Pad to numGlyphs + 1 entries (including the trailing entry). */ + for (; glyph_prev <= gs_min_cid_glyph + numGlyphs; ++glyph_prev) + put_loca(s, offset, indexToLocFormat); put_pad(s, loca_length); /* If necessary, write cmap, name, and OS/2. */ if (!have_cmap) - write_cmap(s, font, 0xf000, 256, gs_min_cid_glyph + max_glyph); + write_cmap(s, font, 0xf000, 256, gs_min_cid_glyph + max_glyph, + options, cmap_length); if (!have_name) write_name(s, &font_name); if (!have_OS_2) write_OS_2(s, font, 0xf000, 256); + else if (!have_cmap) { + /* + * Adjust the first and last character indices in the OS/2 table + * to reflect the values in the generated cmap. + */ + const byte *pos2; + OS_2_t os2; + + ACCESS(OS_2_start, OS_2_length, pos2); + memcpy(&os2, pos2, min(OS_2_length, sizeof(os2))); + update_OS_2(&os2, 0xf000, 256); + pwrite(s, &os2, OS_2_length); + put_pad(s, OS_2_length); + } else { + /* Just copy the existing OS/2 table. */ + write_range(s, pfont, OS_2_start, OS_2_length); + put_pad(s, OS_2_length); + } /* If necessary, write post. */ diff --git a/gs/src/gdevpsim.c b/gs/src/gdevpsim.c index 4c4ea174d..93ce8e526 100644 --- a/gs/src/gdevpsim.c +++ b/gs/src/gdevpsim.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PostScript image output device */ #include "gdevprn.h" diff --git a/gs/src/gdevpx.c b/gs/src/gdevpx.c index c3dd6a9f8..5567ee2b3 100644 --- a/gs/src/gdevpx.c +++ b/gs/src/gdevpx.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* H-P PCL XL driver */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/gdevpxat.h b/gs/src/gdevpxat.h index 3d9a1d8f8..d1abbcee8 100644 --- a/gs/src/gdevpxat.h +++ b/gs/src/gdevpxat.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Attribute ID definitions for PCL XL */ #ifndef gdevpxat_INCLUDED diff --git a/gs/src/gdevpxen.h b/gs/src/gdevpxen.h index 46e43641f..59abc9b6d 100644 --- a/gs/src/gdevpxen.h +++ b/gs/src/gdevpxen.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Enumerated attribute value definitions for PCL XL */ #ifndef gdevpxen_INCLUDED diff --git a/gs/src/gdevpxop.h b/gs/src/gdevpxop.h index b2abbe4a1..57f6d79b8 100644 --- a/gs/src/gdevpxop.h +++ b/gs/src/gdevpxop.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Operator and other tag definitions for PCL XL */ #ifndef gdevpxop_INCLUDED diff --git a/gs/src/gdevrops.c b/gs/src/gdevrops.c index 675a38c77..e6cc0af08 100644 --- a/gs/src/gdevrops.c +++ b/gs/src/gdevrops.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* RasterOp source device */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gdevs3ga.c b/gs/src/gdevs3ga.c index 75f839533..f494b2e2b 100644 --- a/gs/src/gdevs3ga.c +++ b/gs/src/gdevs3ga.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1996, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* S3 86C911 driver */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gdevsco.c b/gs/src/gdevsco.c index 4da6c2eaf..3770fc116 100644 --- a/gs/src/gdevsco.c +++ b/gs/src/gdevsco.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* 17Jul91 - wb - based on gdevpcfb.c */ /* 31Jul91 - Rick Calder rick@rick.att.com - ifdefs for AT&T UNIX 4.0 2.1 */ /* 13Sep91 - wb - modify for gs24b2 */ diff --git a/gs/src/gdevsgi.c b/gs/src/gdevsgi.c index 035257edf..19dbdc79c 100644 --- a/gs/src/gdevsgi.c +++ b/gs/src/gdevsgi.c @@ -4,7 +4,7 @@ * public domain. */ - +/*$RCSfile$ $Revision$*/ /* SGI raster file driver */ #include "gdevprn.h" #include "gdevsgi.h" diff --git a/gs/src/gdevsgi.h b/gs/src/gdevsgi.h index 45e527560..32297c53e 100644 --- a/gs/src/gdevsgi.h +++ b/gs/src/gdevsgi.h @@ -7,7 +7,7 @@ * the file image.h on SGI's file server; there is no copyright on that file. */ - +/*$RCSfile$ $Revision$*/ /* SGI raster file definitions */ #ifndef gdevsgi_INCLUDED diff --git a/gs/src/gdevsj48.c b/gs/src/gdevsj48.c index 1b1b9d6aa..80769f1aa 100644 --- a/gs/src/gdevsj48.c +++ b/gs/src/gdevsj48.c @@ -1,28 +1,14 @@ /* Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ -/* --- derived from gdevbj10.c 1993-10-07 - * by Mats kerblom (f86ma@dd.chalmers.se). - * - * +/*$RCSfile$ $Revision$*/ +/* * StarJet SJ48 printer driver. * + * --- derived from gdevbj10.c 1993-10-07 + * by Mats kerblom (f86ma@dd.chalmers.se). */ #include "gdevprn.h" diff --git a/gs/src/gdevsnfb.c b/gs/src/gdevsnfb.c index 274916345..65a7699a6 100644 --- a/gs/src/gdevsnfb.c +++ b/gs/src/gdevsnfb.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1990, 1991, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Sony News frame buffer driver for GhostScript */ #include "gdevprn.h" #define prn_dev ((gx_device_printer *)dev) /* needed in 5.31 et seq */ diff --git a/gs/src/gdevsppr.c b/gs/src/gdevsppr.c index a95da6ee2..e6fb132e5 100644 --- a/gs/src/gdevsppr.c +++ b/gs/src/gdevsppr.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* SPARCprinter driver for Ghostscript */ #include "gdevprn.h" #include <stdio.h> diff --git a/gs/src/gdevstc.c b/gs/src/gdevstc.c index b87d05188..f7d2a3cd7 100644 --- a/gs/src/gdevstc.c +++ b/gs/src/gdevstc.c @@ -1,21 +1,9 @@ /* Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Epson Stylus-Color Printer-Driver */ /*** diff --git a/gs/src/gdevstc.h b/gs/src/gdevstc.h index 257c09f0d..f8b39eb71 100644 --- a/gs/src/gdevstc.h +++ b/gs/src/gdevstc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Epson Stylus-Color Printer-Driver */ #ifndef gdevstc_INCLUDED # define gdevstc_INCLUDED diff --git a/gs/src/gdevstc1.c b/gs/src/gdevstc1.c index 6ce212901..98594a790 100644 --- a/gs/src/gdevstc1.c +++ b/gs/src/gdevstc1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Epson Stylus-Color Printer-Driver */ /*** diff --git a/gs/src/gdevstc2.c b/gs/src/gdevstc2.c index 40ee698ca..d41ce9edd 100644 --- a/gs/src/gdevstc2.c +++ b/gs/src/gdevstc2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Epson Stylus-Color Printer-Driver */ /*** diff --git a/gs/src/gdevstc3.c b/gs/src/gdevstc3.c index 2cf90ce16..89999e374 100644 --- a/gs/src/gdevstc3.c +++ b/gs/src/gdevstc3.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Epson Stylus-Color Printer-Driver */ /*** diff --git a/gs/src/gdevstc4.c b/gs/src/gdevstc4.c index 6ea983a49..c508ad8a4 100644 --- a/gs/src/gdevstc4.c +++ b/gs/src/gdevstc4.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Epson Stylus-Color Printer-Driver */ /*** diff --git a/gs/src/gdevsun.c b/gs/src/gdevsun.c index 945cc8da3..c7666cf17 100644 --- a/gs/src/gdevsun.c +++ b/gs/src/gdevsun.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1994, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* SunView driver */ #include "gx.h" /* for gx_bitmap; includes std.h */ diff --git a/gs/src/gdevsunr.c b/gs/src/gdevsunr.c index 4543da6b8..3207f8cc0 100644 --- a/gs/src/gdevsunr.c +++ b/gs/src/gdevsunr.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Sun raster file driver */ #include "gdevprn.h" diff --git a/gs/src/gdevsvga.c b/gs/src/gdevsvga.c index 665fdb019..562c8a480 100644 --- a/gs/src/gdevsvga.c +++ b/gs/src/gdevsvga.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* SuperVGA display drivers */ #include "memory_.h" #include "gconfigv.h" /* for USE_ASM */ diff --git a/gs/src/gdevsvga.h b/gs/src/gdevsvga.h index fa8fbe169..9d9319123 100644 --- a/gs/src/gdevsvga.h +++ b/gs/src/gdevsvga.h @@ -1,22 +1,10 @@ /* Copyright (C) 1989, 1995, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Common definitions and procedures for SuperVGA drivers */ /* Requires gdevpcfb.h */ #ifndef gdevsvga_INCLUDED diff --git a/gs/src/gdevtfax.c b/gs/src/gdevtfax.c index 6f38c0ac8..0d58b70cc 100644 --- a/gs/src/gdevtfax.c +++ b/gs/src/gdevtfax.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* TIFF and fax devices */ #include "gdevprn.h" #include "gdevtifs.h" /* for TIFF output only */ diff --git a/gs/src/gdevtfax.h b/gs/src/gdevtfax.h index f029f9d18..a3eba47ab 100644 --- a/gs/src/gdevtfax.h +++ b/gs/src/gdevtfax.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Entry points to the TIFF/fax writing driver */ #ifndef gdevtfax_INCLUDED diff --git a/gs/src/gdevtfnx.c b/gs/src/gdevtfnx.c index ee61dd30b..ac000aa46 100644 --- a/gs/src/gdevtfnx.c +++ b/gs/src/gdevtfnx.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* 12-bit & 24-bit RGB uncompressed TIFF driver */ #include "gdevprn.h" #include "gdevtifs.h" diff --git a/gs/src/gdevtifs.c b/gs/src/gdevtifs.c index f786b014e..be4483992 100644 --- a/gs/src/gdevtifs.c +++ b/gs/src/gdevtifs.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* TIFF-writing substructure */ #include "stdio_.h" #include "time_.h" @@ -113,7 +100,7 @@ gdev_tiff_begin_page(gx_device_printer * pdev, gdev_tiff_state * tifs, FILE * fp const byte * values, int value_size) { TIFF_std_directory_entries std_entries; - const TIFF_dir_entry *pse = (TIFF_dir_entry *) & std_entries; + const TIFF_dir_entry *pse; const TIFF_dir_entry *pce; TIFF_dir_entry entry; @@ -149,7 +136,7 @@ gdev_tiff_begin_page(gx_device_printer * pdev, gdev_tiff_state * tifs, FILE * fp /* We're going to shuffle the two tag lists together. */ /* Both lists are sorted; entries in the client list */ /* replace entries with the same tag in the standard list. */ - for (ntags = 0, pse = (const TIFF_dir_entry *)&std_entries, + for (ntags = 0, pse = (const TIFF_dir_entry *)&std_entries_initial, nse = std_entry_count, pce = entries, nce = entry_count; nse && nce; ++ntags ) { diff --git a/gs/src/gdevtifs.h b/gs/src/gdevtifs.h index 43c19ecac..5e324260c 100644 --- a/gs/src/gdevtifs.h +++ b/gs/src/gdevtifs.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for writing TIFF file formats. */ #ifndef gdevtifs_INCLUDED diff --git a/gs/src/gdevtknk.c b/gs/src/gdevtknk.c index cf11bf9b7..b56a1dfe8 100644 --- a/gs/src/gdevtknk.c +++ b/gs/src/gdevtknk.c @@ -1,28 +1,15 @@ /* Copyright (C) 1992, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* - Tektronix Ink-jet plotter driver. - This code is written for 4696 and 4695 plotters, it may easily be - adopted to the 4393 and 4394 models as well, simply by adding new - device descriptors with other geometrical characteristics. -*/ + This driver is written for Tektronix ink-jet 4696 and 4695 plotters. + + It may easily be adopted to the 4393 and 4394 models as well, simply by + adding new device descriptors with other geometrical characteristics. + */ #include "gdevprn.h" #include "malloc_.h" diff --git a/gs/src/gdevupd.c b/gs/src/gdevupd.c index 05498e34d..8ab86bbc2 100644 --- a/gs/src/gdevupd.c +++ b/gs/src/gdevupd.c @@ -1,23 +1,11 @@ -/* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ +/* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ -/* gdevupd.c $Revision$ */ +/* $RCSfile$ $Revision$ */ /* "uniprint" -- Ugly Printer Driver by Gunther Hess (gunther@elmos.de) */ +/* $Revision$*/ /* Revision-History: 23-Mar-1997 - 1.43: First published version diff --git a/gs/src/gdevvec.c b/gs/src/gdevvec.c index 20811f824..9fc3d94a2 100644 --- a/gs/src/gdevvec.c +++ b/gs/src/gdevvec.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Utilities for "vector" devices */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/gdevvec.h b/gs/src/gdevvec.h index 283ed66ce..82e09db49 100644 --- a/gs/src/gdevvec.h +++ b/gs/src/gdevvec.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common definitions for "vector" devices */ #ifndef gdevvec_INCLUDED diff --git a/gs/src/gdevvglb.c b/gs/src/gdevvglb.c index 5e6d700dd..0cd3f8e46 100644 --- a/gs/src/gdevvglb.c +++ b/gs/src/gdevvglb.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1994, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* * This is a driver for 386 PCs using VGALIB for graphics on the console * display. diff --git a/gs/src/gdevwddb.c b/gs/src/gdevwddb.c index f10ad4b53..b3c992d51 100644 --- a/gs/src/gdevwddb.c +++ b/gs/src/gdevwddb.c @@ -1,25 +1,13 @@ /* Copyright (C) 1989, 1995, 1996, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* * Microsoft Windows 3.n driver for Ghostscript, * using device-dependent bitmap. + * * Original version by Russell Lang and Maurice Castro with help from * Programming Windows, 2nd Ed., Charles Petzold, Microsoft Press; * created from gdevbgi.c and gnuplot/term/win.trm 5th June 1992. diff --git a/gs/src/gdevwdib.c b/gs/src/gdevwdib.c index fc8335397..06d4a5c7e 100644 --- a/gs/src/gdevwdib.c +++ b/gs/src/gdevwdib.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* MS Windows 3.n driver for Ghostscript using a DIB for buffering. */ #include "gdevmswn.h" #include "gxdevmem.h" diff --git a/gs/src/gdevwpr2.c b/gs/src/gdevwpr2.c index e7fdeaa2a..8314e7852 100644 --- a/gs/src/gdevwpr2.c +++ b/gs/src/gdevwpr2.c @@ -1,24 +1,12 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* - * Microsoft Windows 3.n printer driver for Ghostscript. + * Improved Microsoft Windows 3.n printer driver for Ghostscript. + * * Original version by Russell Lang and * L. Peter Deutsch, Aladdin Enterprises. * Modified by rjl 1995-03-29 to use BMP printer code diff --git a/gs/src/gdevwprn.c b/gs/src/gdevwprn.c index b23769ab9..24a3fe494 100644 --- a/gs/src/gdevwprn.c +++ b/gs/src/gdevwprn.c @@ -1,24 +1,12 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* * Microsoft Windows 3.n printer driver for Ghostscript. + * * Original version by Russell Lang and * L. Peter Deutsch, Aladdin Enterprises. */ diff --git a/gs/src/gdevx.c b/gs/src/gdevx.c index 6a0bfdecf..72c8277da 100644 --- a/gs/src/gdevx.c +++ b/gs/src/gdevx.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* X Windows driver for Ghostscript library */ #include "gx.h" /* for gx_bitmap; includes std.h */ #include "math_.h" diff --git a/gs/src/gdevx.h b/gs/src/gdevx.h index e1f6df2c4..9af4c35b0 100644 --- a/gs/src/gdevx.h +++ b/gs/src/gdevx.h @@ -1,22 +1,10 @@ /* Copyright (C) 1989, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for X Windows drivers */ /* Requires gxdevice.h and x_.h */ #ifndef gdevx_INCLUDED diff --git a/gs/src/gdevxalt.c b/gs/src/gdevxalt.c index 3fd84e1a3..dc25c3111 100644 --- a/gs/src/gdevxalt.c +++ b/gs/src/gdevxalt.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Alternative X Windows drivers for help in driver debugging */ #include "gx.h" /* for gx_bitmap; includes std.h */ #include "math_.h" diff --git a/gs/src/gdevxcmp.c b/gs/src/gdevxcmp.c index b466fe64c..7c1488e98 100644 --- a/gs/src/gdevxcmp.c +++ b/gs/src/gdevxcmp.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* X Windows color mapping */ #include "math_.h" #include "x_.h" diff --git a/gs/src/gdevxcmp.h b/gs/src/gdevxcmp.h index 2d09493b6..160c29797 100644 --- a/gs/src/gdevxcmp.h +++ b/gs/src/gdevxcmp.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* X driver color mapping structure */ #ifndef gdevxcmp_INCLUDED diff --git a/gs/src/gdevxini.c b/gs/src/gdevxini.c index dba19c746..885259955 100644 --- a/gs/src/gdevxini.c +++ b/gs/src/gdevxini.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* X Windows driver initialization/finalization */ #include "memory_.h" #include "x_.h" diff --git a/gs/src/gdevxres.c b/gs/src/gdevxres.c index 00dc4ede9..a40f713c2 100644 --- a/gs/src/gdevxres.c +++ b/gs/src/gdevxres.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* X Windows driver resource tables */ #include "std.h" /* must precede any file that includes <sys/types.h> */ #include "x_.h" diff --git a/gs/src/gdevxxf.c b/gs/src/gdevxxf.c index 5f127402a..3ade1fc0e 100644 --- a/gs/src/gdevxxf.c +++ b/gs/src/gdevxxf.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* External font (xfont) implementation for X11. */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/genarch.c b/gs/src/genarch.c index d0b84d7dd..d72c7962a 100644 --- a/gs/src/genarch.c +++ b/gs/src/genarch.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generate a header file (arch.h) with parameters */ /* reflecting the machine architecture and compiler characteristics. */ @@ -54,20 +41,13 @@ time_clear(char *buf, int bsize, int nreps) private void define(FILE *f, const char *str) { - char upstr[50]; - int i, c; - - for (i = 0; (c = str[i]) != 0; ++i) - upstr[i] = toupper(str[i]); - upstr[i] = 0; - fprintf(f, "#define %s ", upstr); + fprintf(f, "#define %s ", str); } private void define_int(FILE *f, const char *str, int value) { - define(f, str); - fprintf(f, "%d\n", value); + fprintf(f, "#define %s %d\n", str, value); } const char ff_str[] = "ffffffffffffffff"; /* 8 bytes */ @@ -139,25 +119,25 @@ main(int argc, char *argv[]) section(f, "Scalar alignments"); #define OFFSET_IN(s, e) (int)((char *)&s.e - (char *)&s) - define_int(f, "arch_align_short_mod", OFFSET_IN(ss, s)); - define_int(f, "arch_align_int_mod", OFFSET_IN(si, i)); - define_int(f, "arch_align_long_mod", OFFSET_IN(sl, l)); - define_int(f, "arch_align_ptr_mod", OFFSET_IN(sp, p)); - define_int(f, "arch_align_float_mod", OFFSET_IN(sf, f)); - define_int(f, "arch_align_double_mod", OFFSET_IN(sd, d)); + define_int(f, "ARCH_ALIGN_SHORT_MOD", OFFSET_IN(ss, s)); + define_int(f, "ARCH_ALIGN_INT_MOD", OFFSET_IN(si, i)); + define_int(f, "ARCH_ALIGN_LONG_MOD", OFFSET_IN(sl, l)); + define_int(f, "ARCH_ALIGN_PTR_MOD", OFFSET_IN(sp, p)); + define_int(f, "ARCH_ALIGN_FLOAT_MOD", OFFSET_IN(sf, f)); + define_int(f, "ARCH_ALIGN_DOUBLE_MOD", OFFSET_IN(sd, d)); #undef OFFSET_IN section(f, "Scalar sizes"); - define_int(f, "arch_log2_sizeof_short", log2s[size_of(short)]); - define_int(f, "arch_log2_sizeof_int", log2s[size_of(int)]); - define_int(f, "arch_log2_sizeof_long", log2s[size_of(long)]); - define_int(f, "arch_sizeof_ptr", size_of(char *)); - define_int(f, "arch_sizeof_float", size_of(float)); - define_int(f, "arch_sizeof_double", size_of(double)); + define_int(f, "ARCH_LOG2_SIZEOF_SHORT", log2s[size_of(short)]); + define_int(f, "ARCH_LOG2_SIZEOF_INT", log2s[size_of(int)]); + define_int(f, "ARCH_LOG2_SIZEOF_LONG", log2s[size_of(long)]); + define_int(f, "ARCH_SIZEOF_PTR", size_of(char *)); + define_int(f, "ARCH_SIZEOF_FLOAT", size_of(float)); + define_int(f, "ARCH_SIZEOF_DOUBLE", size_of(double)); if (floats_are_IEEE) { - define_int(f, "arch_float_mantissa_bits", 24); - define_int(f, "arch_double_mantissa_bits", 53); + define_int(f, "ARCH_FLOAT_MANTISSA_BITS", 24); + define_int(f, "ARCH_DOUBLE_MANTISSA_BITS", 53); } else { /* * There isn't any general way to compute the number of mantissa @@ -165,8 +145,8 @@ main(int argc, char *argv[]) * than binary exponents. Use conservative values, assuming * the exponent is stored in a 16-bit word of its own. */ - define_int(f, "arch_float_mantissa_bits", sizeof(float) * 8 - 17); - define_int(f, "arch_double_mantissa_bits", sizeof(double) * 8 - 17); + define_int(f, "ARCH_FLOAT_MANTISSA_BITS", sizeof(float) * 8 - 17); + define_int(f, "ARCH_DOUBLE_MANTISSA_BITS", sizeof(double) * 8 - 17); } section(f, "Unsigned max values"); @@ -175,17 +155,16 @@ main(int argc, char *argv[]) define(f, str);\ fprintf(f, "((%s)0x%s%s + (%s)0)\n",\ tstr, ff_str + ff_strlen - size_of(typ) * 2, l, tstr) - PRINT_MAX("arch_max_uchar", unsigned char, "unsigned char", ""); - PRINT_MAX("arch_max_ushort", unsigned short, "unsigned short", ""); + PRINT_MAX("ARCH_MAX_UCHAR", unsigned char, "unsigned char", ""); + PRINT_MAX("ARCH_MAX_USHORT", unsigned short, "unsigned short", ""); /* * For uint and ulong, a different approach is required to keep gcc * with -Wtraditional from spewing out pointless warnings. */ - define(f, "arch_max_uint"); + define(f, "ARCH_MAX_UINT"); fprintf(f, "((unsigned int)~0 + (unsigned int)0)\n"); - define(f, "arch_max_ulong"); + define(f, "ARCH_MAX_ULONG"); fprintf(f, "((unsigned long)~0L + (unsigned long)0)\n"); - #undef PRINT_MAX section(f, "Cache sizes"); @@ -228,7 +207,7 @@ main(int argc, char *argv[]) if (nreps == 0) nreps = 1, t <<= 1; } - define_int(f, "arch_cache1_size", bsize >> 1); + define_int(f, "ARCH_CACHE1_SIZE", bsize >> 1); /* * Do the same thing a second time for the secondary cache. */ @@ -246,28 +225,37 @@ main(int argc, char *argv[]) if (nreps == 0) nreps = 1, t <<= 1; } - define_int(f, "arch_cache2_size", bsize >> 1); + define_int(f, "ARCH_CACHE2_SIZE", bsize >> 1); } section(f, "Miscellaneous"); - define_int(f, "arch_is_big_endian", 1 - *(char *)&one); + define_int(f, "ARCH_IS_BIG_ENDIAN", 1 - *(char *)&one); pl0.l = 0; pl1.l = -1; - define_int(f, "arch_ptrs_are_signed", (pl1.p < pl0.p)); - define_int(f, "arch_floats_are_IEEE", (floats_are_IEEE ? 1 : 0)); + define_int(f, "ARCH_PTRS_ARE_SIGNED", (pl1.p < pl0.p)); + define_int(f, "ARCH_FLOATS_ARE_IEEE", (floats_are_IEEE ? 1 : 0)); - /* There are three cases for arithmetic right shift: */ - /* always correct, correct except for right-shifting a long by 1 */ - /* (a bug in some versions of the Turbo C compiler), and */ - /* never correct. */ + /* + * There are three cases for arithmetic right shift: + * always correct, correct except for right-shifting a long by 1 + * (a bug in some versions of the Turbo C compiler), and + * never correct. + */ ars = (lr2 != -1 || ir1 != -1 || ir2 != -1 ? 0 : lr1 != -1 ? 1 : /* Turbo C problem */ 2); - define_int(f, "arch_arith_rshift", ars); - /* Some machines can't handle a variable shift by */ - /* the full width of a long. */ - define_int(f, "arch_can_shift_full_long", um1 >> lwidth == 0); + define_int(f, "ARCH_ARITH_RSHIFT", ars); + /* + * Some machines can't handle a variable shift by + * the full width of a long. + */ + define_int(f, "ARCH_CAN_SHIFT_FULL_LONG", um1 >> lwidth == 0); + /* + * Determine whether dividing a negative integer by a positive one + * takes the floor or truncates toward zero. + */ + define_int(f, "ARCH_DIV_NEG_POS_TRUNCATES", im1 / 2 == 0); /* ---------------- Done. ---------------- */ diff --git a/gs/src/genconf.c b/gs/src/genconf.c index fe862e801..c65ca62ec 100644 --- a/gs/src/genconf.c +++ b/gs/src/genconf.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generate configuration files */ #include "stdpre.h" #include <assert.h> @@ -50,7 +37,7 @@ mrealloc(void *old_ptr, size_t old_size, size_t new_size) * genconf [-Z] [-e escapechar] [-n [name_prefix | -]] [@]xxx.dev* * [-f gconfigf.h] [-h gconfig.h] * [-p[l|L][u][e] pattern] [-l|o|lo|ol out.tr] - * The default escape character is &. When this character appears in the + * The default escape character is &. When this character appears in a * pattern, it acts as follows: * &p produces a %; * &s produces a space; @@ -114,11 +101,13 @@ typedef struct config_s { string_list libs; #define c_libs lists.named.libs string_list libpaths; +#define c_links lists.named.links + string_list links; #define c_libpaths lists.named.libpaths string_list objs; #define c_objs lists.named.objs } named; -#define NUM_RESOURCE_LISTS 7 +#define NUM_RESOURCE_LISTS 8 string_list indexed[NUM_RESOURCE_LISTS]; } lists; string_pattern lib_p; @@ -145,6 +134,7 @@ static const string_list init_config_lists[] = {"-font", 50, uniq_first}, {"-lib", 20, uniq_last}, {"-libpath", 10, uniq_first}, + {"-link", 10, uniq_first}, {"-obj", 500, uniq_first} }; @@ -331,7 +321,9 @@ main(int argc, char *argv[]) } if (lib) { sort_uniq(&conf.c_libs, true); + sort_uniq(&conf.c_links, true); write_list_pattern(out, &conf.c_libpaths, &conf.libpath_p); + write_list_pattern(out, &conf.c_links, &conf.obj_p); write_list_pattern(out, &conf.c_libs, &conf.lib_p); } break; @@ -548,7 +540,7 @@ read_token(char *token, int max_len, const char **pin) int add_entry(config * pconf, char *category, const char *item, int file_index) { - if (item[0] == '-') { /* set category */ + if (item[0] == '-' && islower(item[1])) { /* set category */ strcpy(category, item + 1); return 0; } else { /* add to current category */ @@ -617,10 +609,12 @@ pre: sprintf(template, pat, pconf->name_prefix); if (IS_CAT("lib")) { list = &pconf->c_libs; break; - } - if (IS_CAT("libpath")) { + } else if (IS_CAT("libpath")) { list = &pconf->c_libpaths; break; + } else if (IS_CAT("link")) { + list = &pconf->c_links; + break; } goto err; case 'o': diff --git a/gs/src/gendev.c b/gs/src/gendev.c index 11ec055f8..64ce943ff 100644 --- a/gs/src/gendev.c +++ b/gs/src/gendev.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generate .dev configuration files */ #include "stdpre.h" #include <assert.h> diff --git a/gs/src/genht.c b/gs/src/genht.c index 68564a5c1..e04fe3746 100644 --- a/gs/src/genht.c +++ b/gs/src/genht.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generate C code for compiling halftones into ROM. */ #include "malloc_.h" #include "stdio_.h" diff --git a/gs/src/geninit.c b/gs/src/geninit.c index 9f9ed5fda..3fd7210be 100644 --- a/gs/src/geninit.c +++ b/gs/src/geninit.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Utility for merging all the Ghostscript initialization files */ /* (gs_*.ps) into a single file, optionally converting them to C data. */ #include "stdpre.h" diff --git a/gs/src/ghost.h b/gs/src/ghost.h index 2a305abb7..1e6566191 100644 --- a/gs/src/ghost.h +++ b/gs/src/ghost.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common definitions for interpreter */ #ifndef ghost_INCLUDED diff --git a/gs/src/gp.h b/gs/src/gp.h index b6d0b62f7..232462e40 100644 --- a/gs/src/gp.h +++ b/gs/src/gp.h @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to platform-specific routines */ /* Requires gsmemory.h */ diff --git a/gs/src/gp_dosfb.c b/gs/src/gp_dosfb.c index 970499885..da828b98e 100644 --- a/gs/src/gp_dosfb.c +++ b/gs/src/gp_dosfb.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* MS-DOS frame buffer swapping routines for Ghostscript */ #include <conio.h> #include "malloc_.h" diff --git a/gs/src/gp_dosfe.c b/gs/src/gp_dosfe.c index 4728aa3cc..031a5cb51 100644 --- a/gs/src/gp_dosfe.c +++ b/gs/src/gp_dosfe.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* MS-DOS file enumeration. */ #include "stdio_.h" #include <fcntl.h> diff --git a/gs/src/gp_dosfs.c b/gs/src/gp_dosfs.c index 2034f7d71..e53758149 100644 --- a/gs/src/gp_dosfs.c +++ b/gs/src/gp_dosfs.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common routines for MS-DOS (any compiler) and DesqView/X, */ /* which has a MS-DOS-like file system. */ #include "dos_.h" diff --git a/gs/src/gp_dvx.c b/gs/src/gp_dvx.c index 0c6abdc7d..d3be8eabb 100644 --- a/gs/src/gp_dvx.c +++ b/gs/src/gp_dvx.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Desqview/X-specific routines for Ghostscript */ #include "string_.h" #include "gx.h" diff --git a/gs/src/gp_getnv.c b/gs/src/gp_getnv.c index 9f11fb745..588823bb6 100644 --- a/gs/src/gp_getnv.c +++ b/gs/src/gp_getnv.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Standard implementation of gp_getenv */ #include "stdio_.h" #include "string_.h" diff --git a/gs/src/gp_gnrdl.c b/gs/src/gp_gnrdl.c deleted file mode 100644 index fea4bf527..000000000 --- a/gs/src/gp_gnrdl.c +++ /dev/null @@ -1,411 +0,0 @@ -/* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. - */ - -/* - As of version 5.71, Ghostscript includes an interface to the GNU readline - library, as a build-time option. This library is licensed under the GNU - General Public License (GPL), not the GNU Library / Lesser General Public - License (LGPL). If you build Aladdin Ghostscript with the gnrdline - option, which links this library into the executable, the GPL DOES NOT - ALLOW YOU TO COPY OR DISTRIBUTE THE RESULT. For example, the GPL forbids - you to build a RPM of Aladdin Ghostscript with GNU readline support and - put it on a server. - - The GPL does not forbid you to build or use the just-described software, - only to copy or distribute it. - - You *are* allowed to distribute the result of linking the GNU readline - library into GNU Ghostscript, which is licensed with the GPL. - - If you have questions or opinions about any of the above, please feel free - to contact the Free Software Foundation, authors of the GNU licenses, at - gnu@gnu.org, and/or Aladdin Enterprises, author of Ghostscript, at - ghost@aladdin.com. - */ - - -/* GNU readline interface */ -#include "ctype_.h" -#include "string_.h" -#include "malloc_.h" -#include "memory_.h" -#include <readline/readline.h> -#include <readline/history.h> -#include "ghost.h" -#include "errors.h" -#include "gp.h" -#include "gscdefs.h" /* for gs_product for GNU test */ -#include "gsmalloc.h" -#include "gsmemory.h" -#include "gsstruct.h" -#include "stream.h" -#include "gxiodev.h" -#include "ialloc.h" -#include "idict.h" -#include "iname.h" -#include "iutil.h" -#include "dstack.h" -#include "ostack.h" - -/* - * Note: This code was contributed by a user: please contact - * Alexey Subbotin <A.Subbotin@lpi.ru> if you have questions. - */ - -#define DEFAULT_BUFFER_SIZE 256 -#define BUFSIZE_INCR 128 - -/* The file names can be set in the makefile if desired. */ -/* - * The prototypes for read_history and write_history are broken (they don't - * specify the file name strings as const), so we have to omit the const - * here too, or else add casts that will cause some compilers to complain. - */ -#ifndef GS_HISTFILE -# define GS_HISTFILE ".gs_history" -#endif -private /*const*/ char *const GS_histfile = GS_HISTFILE; -#ifndef RL_INITFILE -# define RL_INITFILE "~/.inputrc" -#endif -private /*const*/ char *const RL_initfile = RL_INITFILE; - -/* initial key codes to make dictionary current_completion_dict - (may be changed to any key sequences by settings in init file) */ -#define RL_systemdict_keycode ('s' | 0x80 ) /* Alt-s */ -#define RL_userdict_keycode ('u' | 0x80 ) /* Alt-u */ -#define RL_currentdict_keycode ('c' | 0x80 ) /* Alt-c */ -#define RL_filenames_keycode ('f' | 0x80 ) /* Alt-f */ -#define RL_show_value_keycode ('i' | 0x80 ) /* Alt-i ( = info) */ -/* e.g.: "\C-x\C-u": complete-from-userdict */ -#define RL_systemdict_func "gs-complete-from-systemdict" -#define RL_userdict_func "gs-complete-from-userdict" -#define RL_currentdict_func "gs-complete-from-currentdict" -#define RL_filenames_func "gs-complete-filenames" -#define RL_show_value_func "gs-show-name-value" - -#define RL_init_buffsz DEFAULT_BUFFER_SIZE - -private const char *const ps_delimiters = " \n\t{}[]()/"; - -#define is_regular(A) (strchr(ps_delimiters,(A)) == NULL) - -typedef enum { - compl_systemdict, - compl_userdict, - compl_currentdict, - compl_filenames -} compl_t; - -typedef struct readline_data_s { - compl_t completion_type; - gs_memory_t *mem; - i_ctx_t *i_ctx_p; - /* current completion state */ - int c_idx, c_len; -} readline_data_t; -gs_private_st_ptrs1(st_readline_data, readline_data_t, "readline_data_t", - readline_data_enum_ptrs, readline_data_reloc_ptrs, i_ctx_p); - -private readline_data_t *the_readline_data; - -private char * -gs_readline_complete(char *text, int state) -{ - readline_data_t *const p = the_readline_data; - i_ctx_t *i_ctx_p = p->i_ctx_p; - ref *cdict; - ref eltp[2]; - - switch (p->completion_type) { - case compl_systemdict: - cdict = systemdict; - break; - case compl_userdict: - cdict = idict_stack.stack.bot + dstack_userdict_index; - break; - case compl_currentdict: - cdict = idict_stack.stack.p; - break; - case compl_filenames: - return (*filename_completion_function) (text, state); - default: - return NULL; - } - if (!state) { - p->c_len = strlen(text); - if (!(p->c_idx = dict_first(cdict))) - return NULL; - } - while ((p->c_idx = dict_next(cdict, p->c_idx, eltp)) >= 0) { - ref rnstr; - const byte *nchars; - uint nlen; - - if (!r_has_type(eltp, t_name)) - continue; - name_string_ref(eltp, &rnstr); - nchars = rnstr.value.const_bytes; - nlen = r_size(&rnstr); - if (nlen < p->c_len) - continue; - if (!strncmp((const char *)nchars, text, p->c_len)) { - char *name = (char *)malloc(nlen + 1); - - memcpy(name, nchars, nlen); - name[nlen] = 0; - return name; - } - } - return NULL; -} - -private int -rl_systemdict_compl(int count, int key) -{ - readline_data_t *const p = the_readline_data; - - p->completion_type = compl_systemdict; - return 0; -} -private int -rl_userdict_compl(int count, int key) -{ - readline_data_t *const p = the_readline_data; - - p->completion_type = compl_userdict; - return 0; -} -private int -rl_currentdict_compl(int count, int key) -{ - readline_data_t *const p = the_readline_data; - - p->completion_type = compl_currentdict; - return 0; -} -private int -rl_filenames_compl(int count, int key) -{ - readline_data_t *const p = the_readline_data; - - p->completion_type = compl_filenames; - return 0; -} - -private int -rl_show_name_value(int count, int key) -{ - readline_data_t *const p = the_readline_data; - i_ctx_t *i_ctx_p = p->i_ctx_p; - int i = rl_point; - char *c = rl_line_buffer + rl_point; - ref nref; - ref *pvref; - - while (is_regular(*c) && i < rl_end) { - c++; - i++; - } - while (!is_regular(*c) && i) { - c--; - i--; - } - if (!is_regular(*c)) - return 0; - while (is_regular(*c) && c > rl_line_buffer) - c--; - if (!is_regular(*c)) - c++; - i += ((rl_line_buffer - c) + 1); - /* - * Now the name to be looked up extends from c through c + i - 1. - */ - if (name_ref((const byte *)c, (uint)i, &nref, -1) < 0 || - (pvref = dict_find_name(&nref)) == 0 - ) - puts("\nnot found"); - else { -#define MAX_CVS 128 - char str[MAX_CVS]; - const byte *pchars = (const byte *)str; - uint len; - int code = obj_cvp(pvref, (byte *)str, MAX_CVS, &len, 1, 0, imemory); - - putchar('\n'); - if (code < 0) { - code = obj_string_data(pvref, &pchars, &len); - if (code >= 0) - switch (r_type(pvref)) { - case t_string: - putchar('('); - fwrite(pchars, 1, len, stdout); - pchars = (const byte *)")", len = 1; - break; - case t_name: - if (!r_has_attr(pvref, a_executable)) - putchar('/'); - break; - default: - code = obj_cvs(pvref, (byte *)str, MAX_CVS, &len, &pchars); - } - } - if (code < 0) - puts("-error-"); - else { - fwrite(pchars, 1, len, stdout); - putchar('\n'); - } - } - rl_on_new_line(); - rl_forced_update_display(); - return 0; -} - - -int -gp_readline_init(void **preadline_data, gs_memory_t * mem) -{ - readline_data_t *p; - int i; - - /* - * If this package is included in a non-GNU build, warn the user - * about the consequences of the GPL. - */ - for (i = strlen(gs_product) - 3; i >= 0; --i) - if (!strncmp(gs_product + i, "GNU", 3)) - break; - if (i < 0) { - fputs("\n **** WARNING: This program appears to include both the GNU readline\n", stderr); - fputs(" **** library and non-GNU-licensed code. This being so, the GNU license\n", stderr); - fputs(" **** (COPYLEFT) forbids you to copy or distribute this program.\n", stderr); - fputs(" **** See src/gp_gnrdl.c for details.\n\n", stderr); - fflush(stderr); - } - - using_history(); - read_history(GS_histfile); - - p = (readline_data_t *) - gs_alloc_struct_immovable(mem, readline_data_t, &st_readline_data, - "gp_readline_init(readline structure)"); - if (!p) - return_error(e_VMerror); - gs_register_struct_root(mem, NULL, (void **)&the_readline_data, - "the_readline_data"); - - p->mem = mem; - p->i_ctx_p = 0; /* only meaningful when reading a line */ - p->c_idx = p->c_len = 0; - p->completion_type = compl_systemdict; - - rl_add_defun(RL_systemdict_func, rl_systemdict_compl, RL_systemdict_keycode); - rl_add_defun(RL_userdict_func, rl_userdict_compl, RL_userdict_keycode); - rl_add_defun(RL_currentdict_func, rl_currentdict_compl, RL_currentdict_keycode); - rl_add_defun(RL_filenames_func, rl_filenames_compl, RL_filenames_keycode); - rl_add_defun(RL_show_value_func, rl_show_name_value, RL_show_value_keycode); - - rl_read_init_file(RL_initfile); - - /* - * The GNU readline API is pretty badly broken, as indicated in the - * following comments about the following statics that it declares. - * (Just to begin with, using statics at all is broken design.) - */ - /* - * rl_completion_entry_function should be declared with the same - * prototype as gs_readline_complete; however, it's declared as - * Function *, where Function is int ()(); - */ - rl_completion_entry_function = (Function *)gs_readline_complete; - /* - * rl_basic_word_break_characters should declared as const char *; - * however, it's declared as char *. - */ - rl_basic_word_break_characters = (char *)ps_delimiters; - - *preadline_data = p; - the_readline_data = p; /* HACK */ - return 0; -} - -void -gp_readline_finit(void *data) -{ - readline_data_t *dp = (readline_data_t *)data; - - if (dp) - gs_free_object(dp->mem, dp, "gp_readline_finit(readline structure)"); - write_history(GS_histfile); - clear_history(); -} - -int -gp_readline(stream *ignore_s_in, stream *ignore_s_out, - void *readline_data, - gs_const_string *ignore_prompt, gs_string * buf, - gs_memory_t * bufmem, uint * pcount, bool *pin_eol, - bool (*is_stdin)(P1(const stream *))) -{ - /* HACK: ignore readline_data, which is currently not supplied. */ - readline_data_t *p = the_readline_data; - char *c; - char prompt[64]; - uint count; - gx_io_device *indev = gs_findiodevice((const byte *)"%stdin", 6); - /* HACK: get the context pointer from the IODevice. See ziodev.c. */ - i_ctx_t *i_ctx_p = (i_ctx_t *)indev->state; - - p->i_ctx_p = i_ctx_p; - count = ref_stack_count(&o_stack); - if (count > 2) - sprintf(prompt, "GS<%d>", count - 2); - else - strcpy(prompt, "GS>"); - - if ((c = readline(prompt)) == NULL) { - *pcount = 0; - *pin_eol = false; - return EOFC; - } else { - count = strlen(c) + 1; - if (*c) - add_history(c); - if (count >= buf->size) { - if (!bufmem) - return ERRC; /* no better choice */ - { - uint nsize = count + BUFSIZE_INCR; - byte *nbuf = gs_resize_string(bufmem, buf->data, buf->size, - nsize, - "gp_readline(resize buffer)"); - - if (nbuf == 0) - return ERRC; /* no better choice */ - buf->data = nbuf; - buf->size = nsize; - } - } - memcpy(buf->data, c, count); - free(c); - *pin_eol = true; - *pcount = count; - return 0; - } -} diff --git a/gs/src/gp_iwatc.c b/gs/src/gp_iwatc.c index ab825df34..44007fcec 100644 --- a/gs/src/gp_iwatc.c +++ b/gs/src/gp_iwatc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Intel processor, Watcom C-specific routines for Ghostscript */ #include "dos_.h" #include <fcntl.h> diff --git a/gs/src/gp_msdos.c b/gs/src/gp_msdos.c index f636f928a..90c878d97 100644 --- a/gs/src/gp_msdos.c +++ b/gs/src/gp_msdos.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common platform-specific routines for MS-DOS (any compiler) */ #include "stdio_.h" #include "string_.h" /* for strerror */ diff --git a/gs/src/gp_mshdl.c b/gs/src/gp_mshdl.c index f0979a1e0..2d4faa7ca 100644 --- a/gs/src/gp_mshdl.c +++ b/gs/src/gp_mshdl.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* %handle% IODevice */ #include "errno_.h" #include "stdio_.h" diff --git a/gs/src/gp_msio.c b/gs/src/gp_msio.c index 1b1f4ed99..5be5a006b 100644 --- a/gs/src/gp_msio.c +++ b/gs/src/gp_msio.c @@ -1,24 +1,12 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* * Streams for Windows text window + * * Original version by Russell Lang and Maurice Castro with help from * Programming Windows, 2nd Ed., Charles Petzold, Microsoft Press; * initially created from gp_dosfb.c and gp_itbc.c 5th June 1992. @@ -69,9 +57,9 @@ private stream_proc_available(win_std_available); /* Use a pseudo IODevice to get win_stdio_init called at the right time. */ /* This is bad architecture; we'll fix it later. */ private iodev_proc_init(win_stdio_init); -const gx_io_device gs_iodev_wstdio = -{ - "wstdio", "Special", +const gx_io_device gs_iodev_wstdio = { + /* The name is null to keep this from showing up as a resource. */ + 0, "Special", {win_stdio_init, iodev_no_open_device, iodev_no_open_file, iodev_no_fopen, iodev_no_fclose, iodev_no_delete_file, iodev_no_rename_file, diff --git a/gs/src/gp_mslib.c b/gs/src/gp_mslib.c index 3d3605039..61f415283 100644 --- a/gs/src/gp_mslib.c +++ b/gs/src/gp_mslib.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* * Microsoft Windows 3.n platform support for Graphics Library * diff --git a/gs/src/gp_mswin.c b/gs/src/gp_mswin.c index 44beced42..9a6b6d52f 100644 --- a/gs/src/gp_mswin.c +++ b/gs/src/gp_mswin.c @@ -1,24 +1,12 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* * Microsoft Windows 3.n platform support for Ghostscript. + * * Original version by Russell Lang and Maurice Castro with help from * Programming Windows, 2nd Ed., Charles Petzold, Microsoft Press; * initially created from gp_dosfb.c and gp_itbc.c 5th June 1992. diff --git a/gs/src/gp_mswin.h b/gs/src/gp_mswin.h index 19a42b01b..5978569b8 100644 --- a/gs/src/gp_mswin.h +++ b/gs/src/gp_mswin.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* (used by both C code and Windows 'resource') */ #ifndef gp_mswin_INCLUDED diff --git a/gs/src/gp_nofb.c b/gs/src/gp_nofb.c index ab3140e2f..6a0513d64 100644 --- a/gs/src/gp_nofb.c +++ b/gs/src/gp_nofb.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Dummy routines for Ghostscript platforms with no frame buffer management */ #include "gx.h" #include "gp.h" diff --git a/gs/src/gp_nsync.c b/gs/src/gp_nsync.c index 83fa9ae20..c660c5468 100644 --- a/gs/src/gp_nsync.c +++ b/gs/src/gp_nsync.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Dummy thread / semaphore / monitor implementation */ #include "std.h" #include "gserror.h" diff --git a/gs/src/gp_ntfs.c b/gs/src/gp_ntfs.c index 64ed26fdb..d65e05d28 100644 --- a/gs/src/gp_ntfs.c +++ b/gs/src/gp_ntfs.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1994, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* file system stuff for MS-Windows WIN32 and MS-Windows NT */ /* hacked from gp_dosfs.c by Russell Lang */ diff --git a/gs/src/gp_os2.c b/gs/src/gp_os2.c index 34b1ea766..c739d4f79 100644 --- a/gs/src/gp_os2.c +++ b/gs/src/gp_os2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common platform-specific routines for OS/2 and MS-DOS */ /* compiled with GCC/EMX */ @@ -799,9 +786,9 @@ private stream_proc_available(pm_std_available); /* Use a pseudo IODevice to get pm_stdio_init called at the right time. */ /* This is bad architecture; we'll fix it later. */ private iodev_proc_init(pm_stdio_init); -const gx_io_device gs_iodev_wstdio = -{ - "wstdio", "Special", +const gx_io_device gs_iodev_wstdio = { + /* The name is null to keep this from showing up as a resource. */ + 0, "Special", {pm_stdio_init, iodev_no_open_device, iodev_no_open_file, iodev_no_fopen, iodev_no_fclose, iodev_no_delete_file, iodev_no_rename_file, @@ -831,7 +818,7 @@ pm_stdin_open(gx_io_device * iodev, const char *access, stream ** ps, return code; s->procs.reset = pm_std_read_reset; s->procs.process = pm_std_read_process; - s->procs.available = win_std_available; + s->procs.available = pm_std_available; s->file = NULL; return 0; } @@ -847,7 +834,7 @@ pm_stdout_open(gx_io_device * iodev, const char *access, stream ** ps, if (code != 1) return code; s->procs.process = pm_std_write_process; - s->procs.available = win_std_available; + s->procs.available = pm_std_available; s->file = NULL; return 0; } @@ -863,7 +850,7 @@ pm_stderr_open(gx_io_device * iodev, const char *access, stream ** ps, if (code != 1) return code; s->procs.process = pm_std_write_process; - s->procs.available = win_std_available; + s->procs.available = pm_std_available; s->file = NULL; return 0; } diff --git a/gs/src/gp_os9.c b/gs/src/gp_os9.c index 578ae70d6..1c765ea3e 100644 --- a/gs/src/gp_os9.c +++ b/gs/src/gp_os9.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* OSK-specific routines for Ghostscript */ #include "pipe_.h" #include "string_.h" diff --git a/gs/src/gp_posem.c b/gs/src/gp_posem.c index 7112f292b..69b80d06e 100644 --- a/gs/src/gp_posem.c +++ b/gs/src/gp_posem.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* POSIX semaphore interface */ #include "std.h" #include <semaphore.h> diff --git a/gs/src/gp_pthr.c b/gs/src/gp_pthr.c index 044daff91..4f3e4aeaa 100644 --- a/gs/src/gp_pthr.c +++ b/gs/src/gp_pthr.c @@ -1,38 +1,60 @@ -/* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. +/* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* pthreads interface */ #include "std.h" +#include "malloc_.h" #include <pthread.h> #include "gserror.h" #include "gserrors.h" #include "gpsync.h" +/* + * In order to deal with the type mismatch between our thread API, where + * the starting procedure returns void, and the API defined by pthreads, + * where the procedure returns void *, we need to create a wrapper + * closure. + */ +typedef struct gp_thread_creation_closure_s { + gp_thread_creation_callback_t proc; /* actual start procedure */ + void *proc_data; /* closure data for proc */ +} gp_thread_creation_closure_t; + +/* Wrapper procedure called to start the new thread. */ +private void * +gp_thread_begin_wrapper(void *thread_data /* gp_thread_creation_closure_t * */) +{ + gp_thread_creation_closure_t closure; + + closure = *(gp_thread_creation_closure_t *)thread_data; + free(thread_data); + DISCARD(closure.proc(closure.proc_data)); + return NULL; /* return value is ignored */ +} + int gp_create_thread(gp_thread_creation_callback_t proc, void *proc_data) { + gp_thread_creation_closure_t *closure = + (gp_thread_creation_closure_t *)malloc(sizeof(*closure)); pthread_t ignore_thread; pthread_attr_t attr; int code; + if (!closure) + return_error(gs_error_VMerror); + closure->proc = proc; + closure->proc_data = proc_data; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, 1); - code = pthread_create(&ignore_thread, &attr, proc, proc_data); - return (code ? gs_note_error(gs_error_ioerror) : 0); + code = pthread_create(&ignore_thread, &attr, gp_thread_begin_wrapper, + closure); + if (code) { + free(closure); + return_error(gs_error_ioerror); + } + return 0; } diff --git a/gs/src/gp_ptsem.c b/gs/src/gp_ptsem.c new file mode 100644 index 000000000..d15b6b266 --- /dev/null +++ b/gs/src/gp_ptsem.c @@ -0,0 +1,67 @@ +/* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ + +/*$RCSfile$ $Revision$ */ +/* POSIX pthreads implementation of semaphores */ +#include "std.h" +#include <pthread.h> +#include "gserror.h" +#include "gserrors.h" +#include "gpsync.h" + +uint +gp_semaphore_sizeof(void) +{ + return sizeof(pthread_mutex_t); +} + +/* + * This procedure should really check errno and return something + * more informative.... + */ +#define SEM_ERROR_CODE(scode)\ + (scode < 0 ? gs_note_error(gs_error_ioerror) : 0) + +int +gp_semaphore_open(gp_semaphore * sema) +{ + pthread_mutex_t * const sem = (pthread_mutex_t *)sema; + pthread_mutexattr_t attr; + int scode; + + if (!sema) + return -1; /* semaphores are not movable */ + pthread_mutexattr_init(&attr); + pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP); + scode = pthread_mutex_init(sem, &attr); + return SEM_ERROR_CODE(scode); +} + +int +gp_semaphore_close(gp_semaphore * sema) +{ + pthread_mutex_t * const sem = (pthread_mutex_t *)sema; + int scode = pthread_mutex_destroy(sem); + + return SEM_ERROR_CODE(scode); +} + +int +gp_semaphore_wait(gp_semaphore * sema) +{ + pthread_mutex_t * const sem = (pthread_mutex_t *)sema; + int scode = pthread_mutex_lock(sem); + + return SEM_ERROR_CODE(scode); +} + +int +gp_semaphore_signal(gp_semaphore * sema) +{ + pthread_mutex_t * const sem = (pthread_mutex_t *)sema; + int scode = pthread_mutex_unlock(sem); + + return SEM_ERROR_CODE(scode); +} diff --git a/gs/src/gp_semon.c b/gs/src/gp_semon.c index 335c65178..25b6692b9 100644 --- a/gs/src/gp_semon.c +++ b/gs/src/gp_semon.c @@ -1,25 +1,11 @@ -/* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. +/* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Construct monitors out of semaphores */ #include "std.h" -#include <semaphore.h> #include "gserror.h" #include "gserrors.h" #include "gpsync.h" diff --git a/gs/src/gp_strdl.c b/gs/src/gp_strdl.c index 80188f4f6..6fb8e2fa8 100644 --- a/gs/src/gp_strdl.c +++ b/gs/src/gp_strdl.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Default, stream-based readline implementation */ #include "std.h" #include "gstypes.h" diff --git a/gs/src/gp_sysv.c b/gs/src/gp_sysv.c index e54cc8037..779f0d094 100644 --- a/gs/src/gp_sysv.c +++ b/gs/src/gp_sysv.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* System V Unix-specific routines for Ghostscript */ /* This file contains a couple of standard Unix library procedures */ diff --git a/gs/src/gp_unifn.c b/gs/src/gp_unifn.c index 59c85f990..aefba5442 100644 --- a/gs/src/gp_unifn.c +++ b/gs/src/gp_unifn.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Unix-like file name syntax platform routines for Ghostscript */ #include "gx.h" #include "gp.h" diff --git a/gs/src/gp_unifs.c b/gs/src/gp_unifs.c index f2497620b..bffcfb86f 100644 --- a/gs/src/gp_unifs.c +++ b/gs/src/gp_unifs.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* "Unix-like" file system platform routines for Ghostscript */ #include "memory_.h" #include "string_.h" diff --git a/gs/src/gp_unix.c b/gs/src/gp_unix.c index 300ad610f..b08ee600b 100644 --- a/gs/src/gp_unix.c +++ b/gs/src/gp_unix.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Unix-specific routines for Ghostscript */ #include "pipe_.h" #include "string_.h" diff --git a/gs/src/gp_vms.c b/gs/src/gp_vms.c index ac6dbe949..0c78ab5f4 100644 --- a/gs/src/gp_vms.c +++ b/gs/src/gp_vms.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* VAX/VMS specific routines for Ghostscript */ #include "string_.h" #include "gx.h" diff --git a/gs/src/gp_wgetv.c b/gs/src/gp_wgetv.c index d6f991ead..0b291fdc2 100644 --- a/gs/src/gp_wgetv.c +++ b/gs/src/gp_wgetv.c @@ -1,29 +1,16 @@ -/* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. +/* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* MS Windows implementation of gp_getenv */ #include <windows.h> #include <stdio.h> #include <stdlib.h> /* for getenv */ #include <string.h> -#include "gscdefs.h" /* for gs_product and gs_revision */ +#include "gscdefs.h" /* for gs_productfamily and gs_revision */ /* prototypes */ int gp_getenv_registry(HKEY hkeyroot, const char *key, const char *name, @@ -59,7 +46,7 @@ gp_getenv(const char *name, char *ptr, int *plen) * HKEY_CURRENT_USER\Software\Aladdin Ghostscript\N.NN * or if that fails under the key * HKEY_LOCAL_MACHINE\Software\Aladdin Ghostscript\N.NN - * where "Aladdin Ghostscript" is actually gs_product + * where "Aladdin Ghostscript" is actually gs_productfamily * and N.NN is obtained from gs_revision. */ DWORD version = GetVersion(); @@ -69,7 +56,7 @@ gp_getenv(const char *name, char *ptr, int *plen) /* not Win32s */ int code; char key[256]; - sprintf(key, "Software\\%s\\%d.%d", gs_product, + sprintf(key, "Software\\%s\\%d.%d", gs_productfamily, (int)(gs_revision / 100), (int)(gs_revision % 100)); code = gp_getenv_registry(HKEY_CURRENT_USER, key, name, ptr, plen); diff --git a/gs/src/gp_win32.c b/gs/src/gp_win32.c index 5ec1dc09f..b9d1ff4e3 100644 --- a/gs/src/gp_win32.c +++ b/gs/src/gp_win32.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1994, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common platform-specific routines for MS-Windows WIN32 */ /* originally hacked from gp_msdos.c by Russell Lang */ #include "malloc_.h" diff --git a/gs/src/gp_wsync.c b/gs/src/gp_wsync.c index e56131de0..8021ad888 100644 --- a/gs/src/gp_wsync.c +++ b/gs/src/gp_wsync.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* MS Windows (Win32) thread / semaphore / monitor implementation */ /* original multi-threading code by John Desrosiers */ #include "malloc_.h" diff --git a/gs/src/gpcheck.h b/gs/src/gpcheck.h index 60744aef8..2361c44af 100644 --- a/gs/src/gpcheck.h +++ b/gs/src/gpcheck.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interrupt check interface */ #ifndef gpcheck_INCLUDED diff --git a/gs/src/gpgetenv.h b/gs/src/gpgetenv.h index f58b038d9..84521b090 100644 --- a/gs/src/gpgetenv.h +++ b/gs/src/gpgetenv.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to platform-specific getenv routine */ #ifndef gpgetenv_INCLUDED diff --git a/gs/src/gpsync.h b/gs/src/gpsync.h index bce2bb2f2..81ef2172a 100644 --- a/gs/src/gpsync.h +++ b/gs/src/gpsync.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to platform-dependent synchronization primitives */ #if !defined(gpsync_INCLUDED) diff --git a/gs/src/gs-fonts.rps b/gs/src/gs-fonts.rps index e8c567840..87fa77b89 100644 --- a/gs/src/gs-fonts.rps +++ b/gs/src/gs-fonts.rps @@ -1,5 +1,5 @@ # - +# $RCSfile$ $Revision$ # Spec file for fonts for Aladdin Ghostscript 5.50 # # Based on RPM Spec file by RedHat for GNU Ghostscript 3.33 diff --git a/gs/src/gs.c b/gs/src/gs.c index fde1a60ce..624199522 100644 --- a/gs/src/gs.c +++ b/gs/src/gs.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* 'main' program for Ghostscript */ #include "ghost.h" #include "imain.h" diff --git a/gs/src/gs.mak b/gs/src/gs.mak index e72401409..f6d93c8d9 100644 --- a/gs/src/gs.mak +++ b/gs/src/gs.mak @@ -1,21 +1,8 @@ # Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Generic makefile, common to all platforms, products, and configurations. # The platform-specific makefiles `include' this file. diff --git a/gs/src/gs.rps b/gs/src/gs.rps index 5f8bd27b8..9a769e002 100644 --- a/gs/src/gs.rps +++ b/gs/src/gs.rps @@ -1,5 +1,5 @@ # - +# $RCSfile$ $Revision$ # Spec file for Aladdin Ghostscript 5.50 # # Based on RPM Spec file by RedHat for GNU Ghostscript 3.33 diff --git a/gs/src/gs16spl.c b/gs/src/gs16spl.c index 6b44d1b16..137c51e6f 100644 --- a/gs/src/gs16spl.c +++ b/gs/src/gs16spl.c @@ -16,7 +16,7 @@ all copies. */ - +/*$RCSfile$ $Revision$ */ /* 16-bit access to print spooler from Win32s */ /* by Russell Lang */ /* 1995-11-23 */ diff --git a/gs/src/gs16spl.rc b/gs/src/gs16spl.rc index eb7693f16..da92becfe 100644 --- a/gs/src/gs16spl.rc +++ b/gs/src/gs16spl.rc @@ -16,7 +16,7 @@ all copies. */ - +/*$RCSfile$ $Revision$*/ /* Resources for GS16SPL.EXE, 16-bit access to print spooler */ /* 1995-11-10 */ diff --git a/gs/src/gsalloc.c b/gs/src/gsalloc.c index 4c22cbd57..cc583a5d1 100644 --- a/gs/src/gsalloc.c +++ b/gs/src/gsalloc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Standard memory allocator */ #include "gx.h" #include "memory_.h" diff --git a/gs/src/gsalloc.h b/gs/src/gsalloc.h index 910821ffb..9d24e25a1 100644 --- a/gs/src/gsalloc.h +++ b/gs/src/gsalloc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Memory allocator extensions for standard allocator */ #ifndef gsalloc_INCLUDED diff --git a/gs/src/gsalpha.c b/gs/src/gsalpha.c index f0dc44acf..2d6d6f743 100644 --- a/gs/src/gsalpha.c +++ b/gs/src/gsalpha.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Graphics state alpha value access */ #include "gx.h" #include "gsalpha.h" diff --git a/gs/src/gsalpha.h b/gs/src/gsalpha.h index d76fd85ed..63eced003 100644 --- a/gs/src/gsalpha.h +++ b/gs/src/gsalpha.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* API for alpha value in graphics state */ #ifndef gsalpha_INCLUDED diff --git a/gs/src/gsalphac.c b/gs/src/gsalphac.c index d86ed2bdb..96697b377 100644 --- a/gs/src/gsalphac.c +++ b/gs/src/gsalphac.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Alpha-compositing implementation */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gsalphac.h b/gs/src/gsalphac.h index 2e33324a8..0b324115d 100644 --- a/gs/src/gsalphac.h +++ b/gs/src/gsalphac.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Alpha-compositing interface */ #ifndef gsalphac_INCLUDED diff --git a/gs/src/gsargs.c b/gs/src/gsargs.c index 346bfe796..aee44d432 100644 --- a/gs/src/gsargs.c +++ b/gs/src/gsargs.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Command line argument list management */ #include "ctype_.h" #include "stdio_.h" diff --git a/gs/src/gsargs.h b/gs/src/gsargs.h index e67122ea5..74c1f08ba 100644 --- a/gs/src/gsargs.h +++ b/gs/src/gsargs.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Command line argument list management */ #ifndef gsargs_INCLUDED diff --git a/gs/src/gsbitmap.h b/gs/src/gsbitmap.h index aa829f4a6..4d6c4f1e5 100644 --- a/gs/src/gsbitmap.h +++ b/gs/src/gsbitmap.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Library "client" bitmap structures */ #ifndef gsbitmap_INCLUDED diff --git a/gs/src/gsbitops.c b/gs/src/gsbitops.c index ce0b54964..cf4b47e1e 100644 --- a/gs/src/gsbitops.c +++ b/gs/src/gsbitops.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Bitmap filling, copying, and transforming operations */ #include "stdio_.h" #include "memory_.h" diff --git a/gs/src/gsbitops.h b/gs/src/gsbitops.h index f4c636cff..db51919b7 100644 --- a/gs/src/gsbitops.h +++ b/gs/src/gsbitops.h @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface for bitmap operations */ #ifndef gsbitops_INCLUDED diff --git a/gs/src/gsbittab.c b/gs/src/gsbittab.c index 0b4d6ad0f..2033b3b22 100644 --- a/gs/src/gsbittab.c +++ b/gs/src/gsbittab.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Tables for bit operations */ #include "stdpre.h" #include "gsbittab.h" diff --git a/gs/src/gsbittab.h b/gs/src/gsbittab.h index b8fae448d..5d88aa238 100644 --- a/gs/src/gsbittab.h +++ b/gs/src/gsbittab.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to tables for bit operations */ #ifndef gsbittab_INCLUDED diff --git a/gs/src/gsccode.h b/gs/src/gsccode.h index b4aea014e..e37d8081e 100644 --- a/gs/src/gsccode.h +++ b/gs/src/gsccode.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Types for character codes */ #ifndef gsccode_INCLUDED @@ -60,16 +47,25 @@ typedef gs_proc_glyph_name((*gs_proc_glyph_name_t)); /* Define the indices for known encodings. */ typedef enum { ENCODING_INDEX_UNKNOWN = -1, + /* Real encodings. These must come first. */ ENCODING_INDEX_STANDARD = 0, ENCODING_INDEX_ISOLATIN1, ENCODING_INDEX_SYMBOL, ENCODING_INDEX_DINGBATS, ENCODING_INDEX_WINANSI, + ENCODING_INDEX_MACROMAN, + ENCODING_INDEX_MACEXPERT, +#define NUM_KNOWN_REAL_ENCODINGS 7 + /* Pseudo-encodings (glyph sets). */ ENCODING_INDEX_MACGLYPH, /* a pseudo-encoding */ ENCODING_INDEX_ALOGLYPH, /* ditto */ ENCODING_INDEX_ALXGLYPH /* ditto */ +#define NUM_KNOWN_ENCODINGS 10 } gs_encoding_index_t; -#define NUM_KNOWN_ENCODINGS 8 +#define KNOWN_REAL_ENCODING_NAMES\ + "StandardEncoding", "ISOLatin1Encoding", "SymbolEncoding",\ + "DingbatsEncoding", "WinAnsiEncoding", "MacRomanEncoding",\ + "MacExpertEncoding" /* * For fonts that use more than one method to identify glyphs, define the diff --git a/gs/src/gsccolor.h b/gs/src/gsccolor.h index ca23ea95e..a330a71b6 100644 --- a/gs/src/gsccolor.h +++ b/gs/src/gsccolor.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client color structure definition */ #ifndef gsccolor_INCLUDED diff --git a/gs/src/gscdef.c b/gs/src/gscdef.c index c2b4e2f1c..55c8c5798 100644 --- a/gs/src/gscdef.c +++ b/gs/src/gscdef.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Configuration scalars */ #include "std.h" #include "gscdefs.h" /* interface */ @@ -39,9 +26,15 @@ CONFIG_CONST long gs_buildtime = GS_BUILDTIME; #endif const char *CONFIG_CONST gs_copyright = GS_COPYRIGHT; +#ifndef GS_PRODUCTFAMILY +# define GS_PRODUCTFAMILY\ + "Artifex Ghostscript" +#endif +const char *CONFIG_CONST gs_productfamily = GS_PRODUCTFAMILY; + #ifndef GS_PRODUCT # define GS_PRODUCT\ - "Aladdin Ghostscript BETA RELEASE" + "Artifex Ghostscript" #endif const char *CONFIG_CONST gs_product = GS_PRODUCT; diff --git a/gs/src/gscdefs.h b/gs/src/gscdefs.h index 5b6afccbd..ac302cba6 100644 --- a/gs/src/gscdefs.h +++ b/gs/src/gscdefs.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Prototypes for configuration definitions in gconfig.c. */ #ifndef gscdefs_INCLUDED @@ -44,6 +31,7 @@ extern CONFIG_CONST long gs_buildtime; extern const char *CONFIG_CONST gs_copyright; extern const char *CONFIG_CONST gs_product; +extern const char *CONFIG_CONST gs_productfamily; extern CONFIG_CONST long gs_revision; extern CONFIG_CONST long gs_revisiondate; extern CONFIG_CONST long gs_serialnumber; diff --git a/gs/src/gscdevn.c b/gs/src/gscdevn.c index 8c259f73c..fcc860ef5 100644 --- a/gs/src/gscdevn.c +++ b/gs/src/gscdevn.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* DeviceN color space and operation definition */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gschar.c b/gs/src/gschar.c index aafafcf8b..78f3ce8b0 100644 --- a/gs/src/gschar.c +++ b/gs/src/gschar.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Character writing "operators" for Ghostscript library */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gschar.h b/gs/src/gschar.h index f6516e18d..3f2aaaf0f 100644 --- a/gs/src/gschar.h +++ b/gs/src/gschar.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to character operations */ #ifndef gschar_INCLUDED diff --git a/gs/src/gschar0.c b/gs/src/gschar0.c index 9ab241517..62eee480a 100644 --- a/gs/src/gschar0.c +++ b/gs/src/gschar0.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1992, 1993, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Composite font decoding for Ghostscript library */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gscie.c b/gs/src/gscie.c index 328090786..aa34a8441 100644 --- a/gs/src/gscie.c +++ b/gs/src/gscie.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CIE color rendering cache management */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/gscie.h b/gs/src/gscie.h index c5b21a98c..d6474777b 100644 --- a/gs/src/gscie.h +++ b/gs/src/gscie.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Structures for CIE color algorithms */ /* (requires gscspace.h, gscolor2.h) */ diff --git a/gs/src/gsciemap.c b/gs/src/gsciemap.c index 593d672ad..172278990 100644 --- a/gs/src/gsciemap.c +++ b/gs/src/gsciemap.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CIE color rendering */ #include "math_.h" #include "gx.h" diff --git a/gs/src/gsclipsr.c b/gs/src/gsclipsr.c index 052c1aa63..4d029a61e 100644 --- a/gs/src/gsclipsr.c +++ b/gs/src/gsclipsr.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* clipsave/cliprestore */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gsclipsr.h b/gs/src/gsclipsr.h index aa383ccc4..4272f1035 100644 --- a/gs/src/gsclipsr.h +++ b/gs/src/gsclipsr.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to clipsave/cliprestore */ #ifndef gsclipsr_INCLUDED diff --git a/gs/src/gscolor.c b/gs/src/gscolor.c index d91844aba..cb0d2f27a 100644 --- a/gs/src/gscolor.c +++ b/gs/src/gscolor.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1994, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Color and halftone operators for Ghostscript library */ #include "gx.h" #include "gserrors.h" @@ -112,6 +99,7 @@ gs_setgray(gs_state * pgs, floatp gray) if (pgs->in_cachedevice) return_error(gs_error_undefined); + cs_adjust_color_count(pgs, -1); gs_cspace_assign(pgs->color_space, gs_current_DeviceGray_space(pgs)); pgs->orig_cspace_index = pgs->orig_base_cspace_index = gs_color_space_index_DeviceGray; @@ -171,6 +159,7 @@ gs_setrgbcolor(gs_state * pgs, floatp r, floatp g, floatp b) if (pgs->in_cachedevice) return_error(gs_error_undefined); + cs_adjust_color_count(pgs, -1); gs_cspace_assign(pgs->color_space, gs_current_DeviceRGB_space(pgs)); pgs->orig_cspace_index = pgs->orig_base_cspace_index = gs_color_space_index_DeviceRGB; @@ -313,6 +302,7 @@ gx_set_device_color_1(gs_state * pgs) gx_device_color *pdc = pgs->dev_color; gs_client_color *pcc = pgs->ccolor; + cs_adjust_color_count(pgs, -1); pcc->paint.values[0] = 0.0; pcc->pattern = 0; /* for GC */ color_set_pure(pdc, 1); diff --git a/gs/src/gscolor.h b/gs/src/gscolor.h index 345d4db80..40c0da2d1 100644 --- a/gs/src/gscolor.h +++ b/gs/src/gscolor.h @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1992, 1993, 1996, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to color routines */ #ifndef gscolor_INCLUDED diff --git a/gs/src/gscolor1.c b/gs/src/gscolor1.c index 59256bb74..e0487f4d6 100644 --- a/gs/src/gscolor1.c +++ b/gs/src/gscolor1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1994, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Level 1 extended color operators for Ghostscript library */ #include "gx.h" #include "gserrors.h" @@ -48,6 +35,7 @@ gs_setcmykcolor(gs_state * pgs, floatp c, floatp m, floatp y, floatp k) if (pgs->in_cachedevice) return_error(gs_error_undefined); + cs_adjust_color_count(pgs, -1); gs_cspace_assign(pgs->color_space, gs_current_DeviceCMYK_space(pgs)); pgs->orig_cspace_index = pgs->orig_base_cspace_index = gs_color_space_index_DeviceCMYK; diff --git a/gs/src/gscolor1.h b/gs/src/gscolor1.h index c50c89c52..787076dd2 100644 --- a/gs/src/gscolor1.h +++ b/gs/src/gscolor1.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to Level 1 extended color facilities */ /* Requires gscolor.h */ diff --git a/gs/src/gscolor2.c b/gs/src/gscolor2.c index 38834d786..13210ff5f 100644 --- a/gs/src/gscolor2.c +++ b/gs/src/gscolor2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1994, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Level 2 color operators for Ghostscript library */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gscolor2.h b/gs/src/gscolor2.h index 8d2e9fc1e..879800c30 100644 --- a/gs/src/gscolor2.h +++ b/gs/src/gscolor2.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to Level 2 color facilities */ /* (requires gscspace.h, gsmatrix.h) */ diff --git a/gs/src/gscolor3.c b/gs/src/gscolor3.c index 37a6b968f..f2f1fc78b 100644 --- a/gs/src/gscolor3.c +++ b/gs/src/gscolor3.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* "Operators" for LanguageLevel 3 color facilities */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gscolor3.h b/gs/src/gscolor3.h index eea86c08b..f4fcc10bb 100644 --- a/gs/src/gscolor3.h +++ b/gs/src/gscolor3.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to LanguageLevel 3 color facilities */ #ifndef gscolor3_INCLUDED diff --git a/gs/src/gscompt.h b/gs/src/gscompt.h index acd401ddf..e0d7bdb26 100644 --- a/gs/src/gscompt.h +++ b/gs/src/gscompt.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Abstract types for compositing objects */ #ifndef gscompt_INCLUDED diff --git a/gs/src/gscoord.c b/gs/src/gscoord.c index a0bb260c5..f55e34796 100644 --- a/gs/src/gscoord.c +++ b/gs/src/gscoord.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Coordinate system operators for Ghostscript library */ #include "math_.h" #include "gx.h" diff --git a/gs/src/gscoord.h b/gs/src/gscoord.h index 36be81e96..8e2ebaf75 100644 --- a/gs/src/gscoord.h +++ b/gs/src/gscoord.h @@ -1,22 +1,10 @@ /* Copyright (C) 1989, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Interface to graphics state CTM procedures */ /* Requires gsmatrix.h and gsstate.h */ #ifndef gscoord_INCLUDED @@ -39,7 +27,6 @@ int gs_transform(P4(gs_state *, floatp, floatp, gs_point *)), gs_dtransform(P4(g #ifndef gs_imager_state_DEFINED # define gs_imager_state_DEFINED typedef struct gs_imager_state_s gs_imager_state; - #endif int gs_imager_setmatrix(P2(gs_imager_state *, const gs_matrix *)); diff --git a/gs/src/gscparam.c b/gs/src/gscparam.c index d46fd95ec..9e9a0660a 100644 --- a/gs/src/gscparam.c +++ b/gs/src/gscparam.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Default implementation of parameter lists */ #include "memory_.h" #include "string_.h" diff --git a/gs/src/gscpixel.c b/gs/src/gscpixel.c index e26e6e2a5..386e577d7 100644 --- a/gs/src/gscpixel.c +++ b/gs/src/gscpixel.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* DevicePixel color space and operation definition */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gscpixel.h b/gs/src/gscpixel.h index e2dd9206f..2092bafe3 100644 --- a/gs/src/gscpixel.h +++ b/gs/src/gscpixel.h @@ -1,22 +1,10 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Interface to DevicePixel color space */ /* Requires gscspace.h */ #ifndef gscpixel_INCLUDED diff --git a/gs/src/gscpm.h b/gs/src/gscpm.h index 821289eb9..6113b109c 100644 --- a/gs/src/gscpm.h +++ b/gs/src/gscpm.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Charpath mode and cache device status definitions */ #ifndef gscpm_INCLUDED diff --git a/gs/src/gscrd.c b/gs/src/gscrd.c index 2ab078490..d2a12a651 100644 --- a/gs/src/gscrd.c +++ b/gs/src/gscrd.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CIE color rendering dictionary creation */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/gscrd.h b/gs/src/gscrd.h index 980dec0b9..a4a47151b 100644 --- a/gs/src/gscrd.h +++ b/gs/src/gscrd.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface for CIE color rendering dictionary creation */ #ifndef gscrd_INCLUDED diff --git a/gs/src/gscrdp.c b/gs/src/gscrdp.c index f25494daa..2e6cdf4fc 100644 --- a/gs/src/gscrdp.c +++ b/gs/src/gscrdp.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CIE color rendering dictionary creation */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/gscrdp.h b/gs/src/gscrdp.h index 83b75de59..130de9979 100644 --- a/gs/src/gscrdp.h +++ b/gs/src/gscrdp.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface for device-specified CRDs */ #ifndef gscrdp_INCLUDED diff --git a/gs/src/gscrypt1.h b/gs/src/gscrypt1.h index 345f89594..653438f1f 100644 --- a/gs/src/gscrypt1.h +++ b/gs/src/gscrypt1.h @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1992, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to Adobe Type 1 encryption/decryption. */ #ifndef gscrypt1_INCLUDED diff --git a/gs/src/gscscie.c b/gs/src/gscscie.c index cddf36fec..3755a49ca 100644 --- a/gs/src/gscscie.c +++ b/gs/src/gscscie.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CIE color space management */ #include "math_.h" #include "gx.h" diff --git a/gs/src/gscsel.h b/gs/src/gscsel.h index 14467ef23..6a5c8b4a7 100644 --- a/gs/src/gscsel.h +++ b/gs/src/gscsel.h @@ -1,22 +1,9 @@ /* Copyright (C) 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for color operand selection */ #ifndef gscsel_INCLUDED diff --git a/gs/src/gscsepnm.h b/gs/src/gscsepnm.h index f349c1e11..35a25c23f 100644 --- a/gs/src/gscsepnm.h +++ b/gs/src/gscsepnm.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Standard color space separation names */ #ifndef gscsepnm_INCLUDED diff --git a/gs/src/gscsepr.c b/gs/src/gscsepr.c index 5f7c88c82..ce4ddc54c 100644 --- a/gs/src/gscsepr.c +++ b/gs/src/gscsepr.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Separation color space and operation definition */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gscsepr.h b/gs/src/gscsepr.h index c569a0e47..6bd6ba9ba 100644 --- a/gs/src/gscsepr.h +++ b/gs/src/gscsepr.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to Separation color */ #ifndef gscsepr_INCLUDED diff --git a/gs/src/gscspace.c b/gs/src/gscspace.c index 719b17470..02e32d6bf 100644 --- a/gs/src/gscspace.c +++ b/gs/src/gscspace.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Color space operators and support */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gscspace.h b/gs/src/gscspace.h index 29c107ece..c9d0ec75e 100644 --- a/gs/src/gscspace.h +++ b/gs/src/gscspace.h @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to color spaces */ #ifndef gscspace_INCLUDED diff --git a/gs/src/gscssub.c b/gs/src/gscssub.c index b87d6e7ea..3ebf66acf 100644 --- a/gs/src/gscssub.c +++ b/gs/src/gscssub.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Color space substitution "operators" */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gscssub.h b/gs/src/gscssub.h index fee6cb8e8..edc5126fc 100644 --- a/gs/src/gscssub.h +++ b/gs/src/gscssub.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to color space substitution */ #ifndef gscssub_INCLUDED diff --git a/gs/src/gsdcolor.h b/gs/src/gsdcolor.h index bd031102a..552e329a7 100644 --- a/gs/src/gsdcolor.h +++ b/gs/src/gsdcolor.h @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Device color representation for drivers */ #ifndef gsdcolor_INCLUDED diff --git a/gs/src/gsdevice.c b/gs/src/gsdevice.c index 8908ef2b9..29a343f55 100644 --- a/gs/src/gsdevice.c +++ b/gs/src/gsdevice.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Device operators for Ghostscript library */ #include "ctype_.h" #include "memory_.h" /* for memcpy */ diff --git a/gs/src/gsdevice.h b/gs/src/gsdevice.h index fb84cc320..4b5542e57 100644 --- a/gs/src/gsdevice.h +++ b/gs/src/gsdevice.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Device and page control API */ #ifndef gsdevice_INCLUDED diff --git a/gs/src/gsdevmem.c b/gs/src/gsdevmem.c index fb00204aa..bf61f7006 100644 --- a/gs/src/gsdevmem.c +++ b/gs/src/gsdevmem.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Memory device creation for Ghostscript library */ #include "math_.h" /* for fabs */ #include "memory_.h" diff --git a/gs/src/gsdll.c b/gs/src/gsdll.c index 6efd9de67..b0ed578c7 100644 --- a/gs/src/gsdll.c +++ b/gs/src/gsdll.c @@ -1,24 +1,11 @@ /* Copyright (C) 1989, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ /* Portions Copyright (C) 1994, 1995, 1996, Russell Lang. All rights reserved. */ - +/*$RCSfile$ $Revision$ */ /* Dynamic Link Library interface for OS/2 and MS-Windows Ghostscript */ /* front end to gs.c */ diff --git a/gs/src/gsdll.h b/gs/src/gsdll.h index d962e32ec..45f05a8fa 100644 --- a/gs/src/gsdll.h +++ b/gs/src/gsdll.h @@ -18,7 +18,7 @@ */ - +/*$RCSfile$ $Revision$ */ #ifndef gsdll_INCLUDED # define gsdll_INCLUDED diff --git a/gs/src/gsdll2.rc b/gs/src/gsdll2.rc index 869e94b7f..53ec90cb6 100644 --- a/gs/src/gsdll2.rc +++ b/gs/src/gsdll2.rc @@ -1,22 +1,9 @@ /* Copyright (C) 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Resources for gsdll2.dll, Ghostscript DLL for OS/2 */ ICON 1 gsos2.ico diff --git a/gs/src/gsdll32.rc b/gs/src/gsdll32.rc index 91ec73ad5..685f0dd2a 100644 --- a/gs/src/gsdll32.rc +++ b/gs/src/gsdll32.rc @@ -17,7 +17,7 @@ */ - +/*$RCSfile$ $Revision$*/ #include <windows.h> #include "gp_mswin.h" diff --git a/gs/src/gsdllos2.h b/gs/src/gsdllos2.h index 60624210d..36fcd6c8b 100644 --- a/gs/src/gsdllos2.h +++ b/gs/src/gsdllos2.h @@ -16,7 +16,7 @@ all copies. */ - +/*$RCSfile$ $Revision$ */ /* gsdll extension for OS/2 platforms */ #ifndef gsdllos2_INCLUDED diff --git a/gs/src/gsdllwin.h b/gs/src/gsdllwin.h index 311f50975..d3b6ca364 100644 --- a/gs/src/gsdllwin.h +++ b/gs/src/gsdllwin.h @@ -16,7 +16,7 @@ all copies. */ - +/*$RCSfile$ $Revision$ */ /* gsdll extension for Microsoft Windows platforms */ #ifndef gsdllwin_INCLUDED diff --git a/gs/src/gsdparam.c b/gs/src/gsdparam.c index 606b66f72..a6fb20f38 100644 --- a/gs/src/gsdparam.c +++ b/gs/src/gsdparam.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Default device parameters for Ghostscript library */ #include "memory_.h" /* for memcpy */ #include "string_.h" /* for strlen */ diff --git a/gs/src/gsdpnext.h b/gs/src/gsdpnext.h index 883da8875..21c172c56 100644 --- a/gs/src/gsdpnext.h +++ b/gs/src/gsdpnext.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* API for NeXT DPS facilities */ #ifndef gsdpnext_INCLUDED diff --git a/gs/src/gsdps.c b/gs/src/gsdps.c index 4afbb47c3..adba92ef4 100644 --- a/gs/src/gsdps.c +++ b/gs/src/gsdps.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Display PostScript extensions */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gsdps.h b/gs/src/gsdps.h index fd6df1b6c..f1ab6b223 100644 --- a/gs/src/gsdps.h +++ b/gs/src/gsdps.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to Display PostScript facilities. */ #ifndef gsdps_INCLUDED diff --git a/gs/src/gsdps1.c b/gs/src/gsdps1.c index fe1b75a5f..37c7b1940 100644 --- a/gs/src/gsdps1.c +++ b/gs/src/gsdps1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1992, 1994, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Display PostScript graphics additions for Ghostscript library */ #include "math_.h" #include "gx.h" diff --git a/gs/src/gsdsc.c b/gs/src/gsdsc.c index 8b7c796d4..72b8fe297 100644 --- a/gs/src/gsdsc.c +++ b/gs/src/gsdsc.c @@ -1,6 +1,6 @@ /* Copyright (C) 1994 Aladdin Enterprises. All rights reserved. */ - +/*$RCSfile$ $Revision$ */ /* Parse DSC comments from a PostScript file. */ #include "stdpre.h" #include <stdio.h> diff --git a/gs/src/gsdsrc.c b/gs/src/gsdsrc.c index 2c32ec4b9..de6de881a 100644 --- a/gs/src/gsdsrc.c +++ b/gs/src/gsdsrc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* DataSource procedures */ #include "memory_.h" diff --git a/gs/src/gsdsrc.h b/gs/src/gsdsrc.h index 702a83de9..b844b63ba 100644 --- a/gs/src/gsdsrc.h +++ b/gs/src/gsdsrc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* DataSource definitions */ #ifndef gsdsrc_INCLUDED diff --git a/gs/src/gserror.h b/gs/src/gserror.h index 8c113d777..c66ba8d55 100644 --- a/gs/src/gserror.h +++ b/gs/src/gserror.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Error return macros */ #ifndef gserror_INCLUDED diff --git a/gs/src/gserrors.h b/gs/src/gserrors.h index ac4affa26..6c62ceb01 100644 --- a/gs/src/gserrors.h +++ b/gs/src/gserrors.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1993, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Error code definitions */ #ifndef gserrors_INCLUDED diff --git a/gs/src/gserver.c b/gs/src/gserver.c index 575735c9f..5152e4762 100644 --- a/gs/src/gserver.c +++ b/gs/src/gserver.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1994, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Server front end for Ghostscript, replacing gs.c. */ #include "memory_.h" #include "string_.h" diff --git a/gs/src/gsexit.h b/gs/src/gsexit.h index 80a726906..92a7ac754 100644 --- a/gs/src/gsexit.h +++ b/gs/src/gsexit.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Declarations for exits */ #ifndef gsexit_INCLUDED diff --git a/gs/src/gsfcmap.c b/gs/src/gsfcmap.c index 3fceff3ec..7b02e150f 100644 --- a/gs/src/gsfcmap.c +++ b/gs/src/gsfcmap.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CMap character decoding */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gsfcmap.h b/gs/src/gsfcmap.h index 0c2bdb39a..70d762ce7 100644 --- a/gs/src/gsfcmap.h +++ b/gs/src/gsfcmap.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CMap data definition */ /* Requires gsstruct.h */ diff --git a/gs/src/gsfemu.c b/gs/src/gsfemu.c index 837337bf6..6c1050b02 100644 --- a/gs/src/gsfemu.c +++ b/gs/src/gsfemu.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Floating point emulator for gcc */ /* We actually only need arch.h + uint and ulong, but because signal.h */ diff --git a/gs/src/gsflip.c b/gs/src/gsflip.c index ab6c28163..7264f6a9b 100644 --- a/gs/src/gsflip.c +++ b/gs/src/gsflip.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Routines for "flipping" image data */ #include "gx.h" #include "gserrors.h" /* for rangecheck in sample macros */ diff --git a/gs/src/gsflip.h b/gs/src/gsflip.h index d87aa6f43..7dada9b6f 100644 --- a/gs/src/gsflip.h +++ b/gs/src/gsflip.h @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to routines for "flipping" image data */ #ifndef gsflip_INCLUDED diff --git a/gs/src/gsfname.c b/gs/src/gsfname.c index 4c3b82d17..3ebc948b1 100644 --- a/gs/src/gsfname.c +++ b/gs/src/gsfname.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* File name utilities */ #include "memory_.h" #include "gserror.h" diff --git a/gs/src/gsfname.h b/gs/src/gsfname.h index 5d10fa0d7..c79aee4f6 100644 --- a/gs/src/gsfname.h +++ b/gs/src/gsfname.h @@ -1,27 +1,16 @@ /* Copyright (C) 1993, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ #ifndef gsfname_INCLUDED # define gsfname_INCLUDED /* + * Structure and procedures for parsing file names. + * * Define a structure for representing a parsed file name, consisting of * an IODevice name in %'s, a file name, or both. Note that the file name * may be either a gs_string (no terminator) or a C string (null terminator). diff --git a/gs/src/gsfont.c b/gs/src/gsfont.c index a081aad4f..5979fae67 100644 --- a/gs/src/gsfont.c +++ b/gs/src/gsfont.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Font operators for Ghostscript library */ #include "gx.h" #include "memory_.h" @@ -53,6 +40,7 @@ const gs_font_procs gs_font_procs_default = { gs_no_define_font, /* (actually a default) */ gs_no_make_font, /* (actually a default) */ gs_default_font_info, + gs_default_same_font, gs_no_encode_char, gs_no_enumerate_glyph, gs_default_glyph_info, @@ -281,6 +269,7 @@ gs_font_alloc(gs_memory_t *mem, gs_memory_type_ptr_t pstype, pfont->next = pfont->prev = 0; pfont->memory = mem; pfont->dir = dir; + pfont->is_resource = false; gs_notify_init(&pfont->notify_list, gs_memory_stable(mem)); pfont->id = gs_next_ids(1); pfont->base = pfont; @@ -435,6 +424,7 @@ gs_makefont(gs_font_dir * pdir, const gs_font * pfont, if (!pf_out) return_error(gs_error_VMerror); memcpy(pf_out, pfont, gs_object_size(mem, pfont)); + gs_notify_init(&pf_out->notify_list, gs_memory_stable(mem)); pf_out->FontMatrix = newmat; pf_out->client_data = 0; pf_out->dir = pdir; @@ -713,10 +703,69 @@ gs_default_font_info(gs_font *font, const gs_point *pscale, int members, info->AvgWidth = info->MaxWidth = info->MissingWidth = fixed_width; } info->Flags_returned |= FONT_IS_FIXED_WIDTH; + } else if (members & FONT_INFO_MISSING_WIDTH) { + gs_glyph glyph; + int index, code; + + for (index = 0; + (code = font->procs.enumerate_glyph(font, &index, GLYPH_SPACE_NAME, &glyph)) >= 0 && + index != 0; + ) { + gs_const_string gnstr; + + gnstr.data = (const byte *) + bfont->procs.callbacks.glyph_name(glyph, &gnstr.size); + if (gnstr.size == 7 && !memcmp(gnstr.data, ".notdef", 7)) { + gs_glyph_info_t glyph_info; + int code = font->procs.glyph_info(font, glyph, pmat, + (GLYPH_INFO_WIDTH0 << wmode), + &glyph_info); + + if (code < 0) + return code; + info->MissingWidth = glyph_info.width[wmode].x; + info->members |= FONT_INFO_MISSING_WIDTH; + break; + } + } } return 0; } +/* Default font similarity testing procedure */ +int +gs_default_same_font(const gs_font *font, const gs_font *ofont, int mask) +{ + while (font->base != font) + font = font->base; + while (ofont->base != ofont) + ofont = ofont->base; + if (ofont == font) + return mask; + /* In general, we can't determine similarity. */ + return 0; +} +int +gs_base_same_font(const gs_font *font, const gs_font *ofont, int mask) +{ + int same = gs_default_same_font(font, ofont, mask); + + if (!same) { + const gs_font_base *const bfont = (const gs_font_base *)font; + const gs_font_base *const obfont = (const gs_font_base *)ofont; + + if (mask & FONT_SAME_ENCODING) { + if (bfont->encoding_index != ENCODING_INDEX_UNKNOWN || + obfont->encoding_index != ENCODING_INDEX_UNKNOWN + ) { + if (bfont->encoding_index == obfont->encoding_index) + same |= FONT_SAME_ENCODING; + } + } + } + return same; +} + /* ------ Glyph-level procedures ------ */ /* Dummy character encoding procedure */ diff --git a/gs/src/gsfont.h b/gs/src/gsfont.h index 8fdefc053..a09e20a81 100644 --- a/gs/src/gsfont.h +++ b/gs/src/gsfont.h @@ -1,22 +1,10 @@ /* Copyright (C) 1989, 1993, 1996, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Generic font and font cache interface */ /* Requires gsmatrix.h */ #ifndef gsfont_INCLUDED @@ -29,14 +17,12 @@ #ifndef gs_font_dir_DEFINED # define gs_font_dir_DEFINED typedef struct gs_font_dir_s gs_font_dir; - #endif /* Font objects */ #ifndef gs_font_DEFINED # define gs_font_DEFINED typedef struct gs_font_s gs_font; - #endif /* Initialization */ diff --git a/gs/src/gsfont0.c b/gs/src/gsfont0.c index c0d2103b8..54b3d77ff 100644 --- a/gs/src/gsfont0.c +++ b/gs/src/gsfont0.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Composite font operations for Ghostscript library */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gsfunc.c b/gs/src/gsfunc.c index ad6f3b7d7..d435f6b41 100644 --- a/gs/src/gsfunc.c +++ b/gs/src/gsfunc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic Function support */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gsfunc.h b/gs/src/gsfunc.h index e31513a15..5b23f00a8 100644 --- a/gs/src/gsfunc.h +++ b/gs/src/gsfunc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic definitions for Functions */ #ifndef gsfunc_INCLUDED @@ -73,7 +60,7 @@ typedef struct gs_function_procs_s { typedef struct gs_function_head_s { gs_function_type_t type; gs_function_procs_t procs; - bool is_monotonic; /* cached when function is created */ + int is_monotonic; /* cached when function is created */ } gs_function_head_t; struct gs_function_s { gs_function_head_t head; @@ -126,14 +113,14 @@ void gs_function_XxYy_free_params(P2(gs_function_XxYy_params_t *params, * gs_error_undefined; normally, it returns 0 for false, >0 for true, * gs_error_rangecheck if any part of the interval is outside the function's * domain. If lower[i] > upper[i], the result is not defined. - * - * Note that this is a very unsophisticated test: it returns false for - * situations where a function is monotonic in individual inputs and/or - * outputs but not for all inputs and/or outputs in the same direction. We - * only use it for fast checks. */ #define gs_function_is_monotonic(pfn, lower, upper, effort)\ (*(pfn)->head.procs.is_monotonic)(pfn, lower, upper, effort) +/* + * If the function is monotonic, is_monotonic returns the direction of + * monotonicity for output value N in bits 2N and 2N+1. (Functions with + * more than sizeof(int) * 4 - 1 outputs are never identified as monotonic.) + */ #define FN_MONOTONIC_INCREASING 1 #define FN_MONOTONIC_DECREASING 2 @@ -158,7 +145,7 @@ typedef struct gs_function_Va_params_s { gs_function_params_common; fn_evaluate_proc_t eval_proc; void *eval_data; - bool is_monotonic; + int is_monotonic; } gs_function_Va_params_t; typedef struct gs_function_Va_s { diff --git a/gs/src/gsfunc0.c b/gs/src/gsfunc0.c index 6fcfe5653..6ec1f3b83 100644 --- a/gs/src/gsfunc0.c +++ b/gs/src/gsfunc0.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Implementation of FunctionType 0 (Sampled) Functions */ #include "math_.h" #include "gx.h" @@ -30,7 +17,28 @@ typedef struct gs_function_Sd_s { gs_function_Sd_params_t params; } gs_function_Sd_t; +/* GC descriptor */ private_st_function_Sd(); +private +ENUM_PTRS_WITH(function_Sd_enum_ptrs, gs_function_Sd_t *pfn) +{ + index -= 3; + if (index < st_data_source_max_ptrs) + return ENUM_USING(st_data_source, &pfn->params.DataSource, + sizeof(pfn->params.DataSource), index); + return ENUM_USING_PREFIX(st_function, st_data_source_max_ptrs); +} +ENUM_PTR3(0, gs_function_Sd_t, params.Encode, params.Decode, params.Size); +ENUM_PTRS_END +private +RELOC_PTRS_WITH(function_Sd_reloc_ptrs, gs_function_Sd_t *pfn) +{ + RELOC_PREFIX(st_function); + RELOC_USING(st_data_source, &pfn->params.DataSource, + sizeof(pfn->params.DataSource)); + RELOC_PTR3(gs_function_Sd_t, params.Encode, params.Decode, params.Size); +} +RELOC_PTRS_END /* Define the maximum plausible number of inputs and outputs */ /* for a Sampled function. */ @@ -231,7 +239,7 @@ fn_Sd_evaluate(const gs_function_t * pfn_common, const float *in, float *out) /* Encode the output values. */ - for (i = 0; i < pfn->params.n; offset += bps, ++i) { + for (i = 0; i < pfn->params.n; ++i) { float d0, d1, r0, r1, value; if (pfn->params.Range) @@ -267,8 +275,7 @@ fn_Sd_is_monotonic(const gs_function_t * pfn_common, float v0 = lower[0], v1 = upper[0]; float e0, e1, w0, w1; float r0[max_Sd_n], r1[max_Sd_n]; - int dir = 0; - int i, code; + int code, i, result; /* * Testing this in general is very time-consuming, so we don't bother. @@ -282,6 +289,8 @@ fn_Sd_is_monotonic(const gs_function_t * pfn_common, upper[0] < pfn->params.Domain[0] ) return gs_error_rangecheck; + if (pfn->params.n > sizeof(int) * 4 - 1) + return 0; /* can't represent result */ if (pfn->params.Encode) e0 = pfn->params.Encode[0], e1 = pfn->params.Encode[1]; else @@ -304,19 +313,16 @@ fn_Sd_is_monotonic(const gs_function_t * pfn_common, gs_function_evaluate(pfn_common, upper, r1); if (code < 0) return code; - for (i = 0; i < pfn->params.n; ++i) { - float diff = r1[i] - r0[i]; - int code; - - if (diff == 0) - continue; - code = (diff < 0 ? FN_MONOTONIC_DECREASING : FN_MONOTONIC_INCREASING); - if (dir == 0) - dir = code; - else if (dir != code) - return 0; + for (i = 0, result = 0; i < pfn->params.n; ++i) { + double diff = r1[i] - r0[i]; + + result |= + (diff < 0 ? FN_MONOTONIC_DECREASING : + diff > 0 ? FN_MONOTONIC_INCREASING : + FN_MONOTONIC_DECREASING | FN_MONOTONIC_INCREASING) << + (2 * i); } - return dir; + return result; } /* Free the parameters of a Sampled function. */ diff --git a/gs/src/gsfunc0.h b/gs/src/gsfunc0.h index 1da153ebb..67f5348b3 100644 --- a/gs/src/gsfunc0.h +++ b/gs/src/gsfunc0.h @@ -1,22 +1,9 @@ -/* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. +/* Copyright (C) 1997, 1999 Aladdin Enterprises. All rights reserved. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for FunctionType 0 (Sampled) Functions */ #ifndef gsfunc0_INCLUDED @@ -42,9 +29,8 @@ typedef struct gs_function_Sd_params_s { } gs_function_Sd_params_t; #define private_st_function_Sd() /* in gsfunc.c */\ - gs_private_st_suffix_add3(st_function_Sd, gs_function_Sd_t,\ - "gs_function_Sd_t", function_Sd_enum_ptrs, function_Sd_reloc_ptrs,\ - st_function, params.Encode, params.Decode, params.Size) + gs_private_st_composite(st_function_Sd, gs_function_Sd_t,\ + "gs_function_Sd_t", function_Sd_enum_ptrs, function_Sd_reloc_ptrs) /* ---------------- Procedures ---------------- */ diff --git a/gs/src/gsfunc3.c b/gs/src/gsfunc3.c index 4ff933cb8..f33ff02b0 100644 --- a/gs/src/gsfunc3.c +++ b/gs/src/gsfunc3.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Implementation of LL3 Functions */ #include "math_.h" #include "gx.h" @@ -24,9 +11,10 @@ #include "gsfunc3.h" #include "gxfunc.h" - /* ---------------- Utilities ---------------- */ +#define MASK1 ((uint)(~0) / 3) + /* * Free an array of subsidiary Functions. Note that this may be called * before the Functions array has been fully initialized. Note also that @@ -96,32 +84,28 @@ fn_ElIn_is_monotonic(const gs_function_t * pfn_common, { const gs_function_ElIn_t *const pfn = (const gs_function_ElIn_t *)pfn_common; - int i; - int dir = 0; + int i, result; if (lower[0] > pfn->params.Domain[1] || upper[0] < pfn->params.Domain[0] ) return_error(gs_error_rangecheck); - if (pfn->params.C0 == 0 && pfn->params.C1 == 0) - return FN_MONOTONIC_INCREASING; - if (effort <= EFFORT_EASY) - return gs_error_undefined; - for (i = 0; i < pfn->params.n; ++i) { - double diff = pfn->params.C1[i] - pfn->params.C0[i]; - int code; - - if (diff == 0) - continue; - code = (diff > 0 ? FN_MONOTONIC_INCREASING : FN_MONOTONIC_DECREASING); - if (code <= 0) - return code; - if (dir == 0) - dir = code; - else if (dir != code) - return 0; + for (i = 0, result = 0; i < pfn->params.n; ++i) { + double diff = + (pfn->params.C1 == 0 ? 1.0 : pfn->params.C1[i]) - + (pfn->params.C0 == 0 ? 0.0 : pfn->params.C0[i]); + + if (pfn->params.N < 0) + diff = -diff; + else if (pfn->params.N == 0) + diff = 0; + result |= + (diff < 0 ? FN_MONOTONIC_DECREASING : + diff > 0 ? FN_MONOTONIC_INCREASING : + FN_MONOTONIC_DECREASING | FN_MONOTONIC_INCREASING) << + (2 * i); } - return dir; + return result; } /* Free the parameters of an Exponential Interpolation function. */ @@ -234,7 +218,7 @@ fn_1ItSg_is_monotonic(const gs_function_t * pfn_common, float d0 = pfn->params.Domain[0], d1 = pfn->params.Domain[1]; int k = pfn->params.k; int i; - int dir = 0; + int result = 0; if (v0 > d1 || v1 < d0) return_error(gs_error_rangecheck); @@ -258,27 +242,29 @@ fn_1ItSg_is_monotonic(const gs_function_t * pfn_common, /* Note that w0 > w1 is now possible if e0 > e1. */ if (w0 > w1) { code = gs_function_is_monotonic(pfn->params.Functions[i], - &w0, &w1, effort); - switch (code) { - case FN_MONOTONIC_INCREASING: - code = FN_MONOTONIC_DECREASING; break; - case FN_MONOTONIC_DECREASING: - code = FN_MONOTONIC_INCREASING; break; - default: - break; - } + &w1, &w0, effort); + if (code <= 0) + return code; + /* Swap the INCREASING and DECREASING flags. */ + code = ((code & MASK1) << 1) | ((code & (MASK1 << 1)) >> 1); } else { code = gs_function_is_monotonic(pfn->params.Functions[i], &w0, &w1, effort); + if (code <= 0) + return code; + } + if (result == 0) + result = code; + else { + result &= code; + /* Check that result is still monotonic in every position. */ + code = result | ((result & MASK1) << 1) | + ((result & (MASK1 << 1)) >> 1); + if (code != (1 << (2 * pfn->params.n)) - 1) + return 0; } - if (code <= 0) - return code; - if (dir == 0) - dir = code; - else if (dir != code) - return 0; } - return dir; + return result; } /* Free the parameters of a 1-Input Stitching function. */ @@ -383,22 +369,18 @@ fn_AdOt_is_monotonic(const gs_function_t * pfn_common, { const gs_function_AdOt_t *const pfn = (const gs_function_AdOt_t *)pfn_common; - int i; - int dir = 0; + int i, result; - for (i = 0; i < pfn->params.n; ++i) { + for (i = 0, result = 0; i < pfn->params.n; ++i) { int code = gs_function_is_monotonic(pfn->params.Functions[i], lower, upper, effort); if (code <= 0) return code; - if (dir == 0) - dir = code; - else if (dir != code) - return 0; + result |= code << (2 * i); } - return dir; + return result; } /* Free the parameters of an Arrayed Output function. */ diff --git a/gs/src/gsfunc3.h b/gs/src/gsfunc3.h index 5fb8ead18..652cfa1cd 100644 --- a/gs/src/gsfunc3.h +++ b/gs/src/gsfunc3.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for LL3 Functions */ #ifndef gsfunc3_INCLUDED diff --git a/gs/src/gsgc.h b/gs/src/gsgc.h index dabb023d2..e5b8efe24 100644 --- a/gs/src/gsgc.h +++ b/gs/src/gsgc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Library-level interface to garbage collector */ /* diff --git a/gs/src/gshsb.c b/gs/src/gshsb.c index a38b61fac..7fd4651d6 100644 --- a/gs/src/gshsb.c +++ b/gs/src/gshsb.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* HSB color operators for Ghostscript library */ #include "gx.h" #include "gscolor.h" diff --git a/gs/src/gshsb.h b/gs/src/gshsb.h index ebe720ee3..551f3799e 100644 --- a/gs/src/gshsb.h +++ b/gs/src/gshsb.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to HSB color routines */ #ifndef gshsb_INCLUDED diff --git a/gs/src/gsht.c b/gs/src/gsht.c index 8c2cf72a3..40ce1d015 100644 --- a/gs/src/gsht.c +++ b/gs/src/gsht.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* setscreen operator for Ghostscript library */ #include "memory_.h" #include <stdlib.h> /* for qsort */ diff --git a/gs/src/gsht.h b/gs/src/gsht.h index 921c14575..f8cab3f79 100644 --- a/gs/src/gsht.h +++ b/gs/src/gsht.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Public interface to halftone functionality */ #ifndef gsht_INCLUDED diff --git a/gs/src/gsht1.c b/gs/src/gsht1.c index c6b943eaf..e20a4b366 100644 --- a/gs/src/gsht1.c +++ b/gs/src/gsht1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Extended halftone operators for Ghostscript library */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gsht1.h b/gs/src/gsht1.h index 12e89cf46..238ac7cbb 100644 --- a/gs/src/gsht1.h +++ b/gs/src/gsht1.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Extended public interface to halftones */ #ifndef gsht1_INCLUDED diff --git a/gs/src/gshtscr.c b/gs/src/gshtscr.c index 3ee735e2d..f8a155193 100644 --- a/gs/src/gshtscr.c +++ b/gs/src/gshtscr.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Screen (Type 1) halftone processing for Ghostscript library */ #include "math_.h" #include "gx.h" diff --git a/gs/src/gshtx.c b/gs/src/gshtx.c index 2359bef00..7b37b52de 100644 --- a/gs/src/gshtx.c +++ b/gs/src/gshtx.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Stand-alone halftone/transfer function related code */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gshtx.h b/gs/src/gshtx.h index 7208f4dc7..d27298015 100644 --- a/gs/src/gshtx.h +++ b/gs/src/gshtx.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* High-level interface to stand-alone halftone/transfer objects */ #ifndef gshtx_INCLUDED diff --git a/gs/src/gsimage.c b/gs/src/gsimage.c index 9bbd6c4fa..1430bec54 100644 --- a/gs/src/gsimage.c +++ b/gs/src/gsimage.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Image setup procedures for Ghostscript library */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gsimage.h b/gs/src/gsimage.h index 463da7a84..dc861cf51 100644 --- a/gs/src/gsimage.h +++ b/gs/src/gsimage.h @@ -1,22 +1,10 @@ /* Copyright (C) 1992, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Generic image rendering interface */ /* Requires gsstate.h */ #ifndef gsimage_INCLUDED diff --git a/gs/src/gsimpath.c b/gs/src/gsimpath.c index 167e05ae4..afca88ab7 100644 --- a/gs/src/gsimpath.c +++ b/gs/src/gsimpath.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Image to outline conversion for Ghostscript library */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gsindent b/gs/src/gsindent index 8f15e949f..5c2fd03ac 100755 --- a/gs/src/gsindent +++ b/gs/src/gsindent @@ -1,5 +1,5 @@ #!/bin/sh - +# $RCSfile$ $Revision$ # This script formats C source code per the Ghostscript C style guide. # The perl invocations work around a bug in GNU indent. if [ $# -ne 0 ]; then diff --git a/gs/src/gsinit.c b/gs/src/gsinit.c index f59f3f91b..c1891acdc 100644 --- a/gs/src/gsinit.c +++ b/gs/src/gsinit.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Initialization for the imager */ #include "stdio_.h" #include "memory_.h" diff --git a/gs/src/gsio.h b/gs/src/gsio.h index bfd7b6fba..388442fd9 100644 --- a/gs/src/gsio.h +++ b/gs/src/gsio.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1990, 1993, 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* stdio redirection */ #ifndef gsio_INCLUDED diff --git a/gs/src/gsiodev.c b/gs/src/gsiodev.c index eba4d195a..3069a4df8 100644 --- a/gs/src/gsiodev.c +++ b/gs/src/gsiodev.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* IODevice implementation for Ghostscript */ #include "errno_.h" #include "string_.h" @@ -243,7 +230,7 @@ gs_findiodevice(const byte * str, uint len) gx_io_device *iodev = io_device_table[i]; const char *dname = iodev->dname; - if (strlen(dname) == len + 1 && !memcmp(str, dname, len)) + if (dname && strlen(dname) == len + 1 && !memcmp(str, dname, len)) return iodev; } return 0; diff --git a/gs/src/gsiparam.h b/gs/src/gsiparam.h index 84c582f37..7f44e2cc6 100644 --- a/gs/src/gsiparam.h +++ b/gs/src/gsiparam.h @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Image parameter definition */ #ifndef gsiparam_INCLUDED @@ -24,6 +11,7 @@ #include "gsccolor.h" /* for GS_CLIENT_COLOR_MAX_COMPONENTS */ #include "gsmatrix.h" +#include "gsstype.h" /* for extern_st */ /* ---------------- Image parameters ---------------- */ @@ -180,6 +168,7 @@ typedef struct gs_pixel_image_s { gs_pixel_image_common; } gs_pixel_image_t; +extern_st(st_gs_pixel_image); #define public_st_gs_pixel_image() /* in gximage.c */\ gs_public_st_ptrs1(st_gs_pixel_image, gs_pixel_image_t,\ "gs_data_image_t", pixel_image_enum_ptrs, pixel_image_reloc_ptrs,\ @@ -219,7 +208,6 @@ typedef struct gs_image1_s { } gs_image1_t; #define private_st_gs_image1() /* in gximage1.c */\ - extern_st(st_gs_pixel_image);\ gs_private_st_suffix_add0(st_gs_image1, gs_image1_t, "gs_image1_t",\ image1_enum_ptrs, image1_reloc_ptrs, st_gs_pixel_image) diff --git a/gs/src/gsiparm2.h b/gs/src/gsiparm2.h index d494a878b..5271283ee 100644 --- a/gs/src/gsiparm2.h +++ b/gs/src/gsiparm2.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* ImageType 2 image parameter definition */ #ifndef gsiparm2_INCLUDED diff --git a/gs/src/gsiparm3.h b/gs/src/gsiparm3.h index 079d49bae..d24d0ee7a 100644 --- a/gs/src/gsiparm3.h +++ b/gs/src/gsiparm3.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* LanguageLevel 3 (ImageType 3 & 4) image parameter definition */ #ifndef gsiparm3_INCLUDED diff --git a/gs/src/gsiparm4.h b/gs/src/gsiparm4.h index b0ffb7729..933b22823 100644 --- a/gs/src/gsiparm4.h +++ b/gs/src/gsiparm4.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* ImageType 4 image parameter definition */ #ifndef gsiparm4_INCLUDED diff --git a/gs/src/gsistate.c b/gs/src/gsistate.c index 586db23e5..9c8d99dd7 100644 --- a/gs/src/gsistate.c +++ b/gs/src/gsistate.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Imager state housekeeping */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gsjconf.h b/gs/src/gsjconf.h index 54e67d072..4fc5f587f 100644 --- a/gs/src/gsjconf.h +++ b/gs/src/gsjconf.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* jconfig.h file for Independent JPEG Group code */ #ifndef gsjconf_INCLUDED diff --git a/gs/src/gsjmorec.h b/gs/src/gsjmorec.h index bc49bedfc..12439c308 100644 --- a/gs/src/gsjmorec.h +++ b/gs/src/gsjmorec.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* "Wrapper" for Independent JPEG Group code jmorecfg.h */ #ifndef gsjmorec_INCLUDED diff --git a/gs/src/gslib.c b/gs/src/gslib.c index ec366a340..1be6e103a 100644 --- a/gs/src/gslib.c +++ b/gs/src/gslib.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Test program for Ghostscript library */ /* Capture stdin/out/err before gsio.h redefines them. */ #include "stdio_.h" diff --git a/gs/src/gslib.h b/gs/src/gslib.h index f2dab8b7d..7c10635f1 100644 --- a/gs/src/gslib.h +++ b/gs/src/gslib.h @@ -1,22 +1,10 @@ /* Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Library initialization and finalization interface */ /* Requires stdio.h, gsmemory.h */ #ifndef gslib_INCLUDED diff --git a/gs/src/gsline.c b/gs/src/gsline.c index 6d2d5e936..48317f05d 100644 --- a/gs/src/gsline.c +++ b/gs/src/gsline.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Line parameter operators for Ghostscript library */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/gsline.h b/gs/src/gsline.h index 5584f996d..81a7e55d9 100644 --- a/gs/src/gsline.h +++ b/gs/src/gsline.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Line parameter and quality definitions */ #ifndef gsline_INCLUDED diff --git a/gs/src/gslparam.h b/gs/src/gslparam.h index d6a287b36..3c1984d55 100644 --- a/gs/src/gslparam.h +++ b/gs/src/gslparam.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Line parameter definitions */ #ifndef gslparam_INCLUDED diff --git a/gs/src/gsmalloc.c b/gs/src/gsmalloc.c index bc504276c..ae1aa5567 100644 --- a/gs/src/gsmalloc.c +++ b/gs/src/gsmalloc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$Id: gsmalloc.c */ /* C heap allocator */ #include "malloc_.h" #include "gdebug.h" diff --git a/gs/src/gsmalloc.h b/gs/src/gsmalloc.h index 999eb7b6b..aca768e3a 100644 --- a/gs/src/gsmalloc.h +++ b/gs/src/gsmalloc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to default (C heap) allocator */ /* Requires gsmemory.h */ diff --git a/gs/src/gsmatrix.c b/gs/src/gsmatrix.c index 15ffb824f..ec660f447 100644 --- a/gs/src/gsmatrix.c +++ b/gs/src/gsmatrix.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Matrix operators for Ghostscript library */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/gsmatrix.h b/gs/src/gsmatrix.h index 7dd033346..7d9658cf9 100644 --- a/gs/src/gsmatrix.h +++ b/gs/src/gsmatrix.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definition of matrices and client interface to matrix routines */ #ifndef gsmatrix_INCLUDED diff --git a/gs/src/gsmdebug.h b/gs/src/gsmdebug.h index 052fb66fe..0bd724aa1 100644 --- a/gs/src/gsmdebug.h +++ b/gs/src/gsmdebug.h @@ -1,22 +1,10 @@ /* Copyright (C) 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Allocator debugging definitions and interface */ /* Requires gdebug.h (for gs_debug) */ #ifndef gsmdebug_INCLUDED diff --git a/gs/src/gsmemlok.c b/gs/src/gsmemlok.c index 9be594e03..0f95a8c29 100644 --- a/gs/src/gsmemlok.c +++ b/gs/src/gsmemlok.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Monitor-locked heap memory allocator */ /* Initial version 2/1/98 by John Desrosiers (soho@crl.com) */ diff --git a/gs/src/gsmemlok.h b/gs/src/gsmemlok.h index 90bb7a36c..c51f1ffdf 100644 --- a/gs/src/gsmemlok.h +++ b/gs/src/gsmemlok.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to monitor-locked heap memory allocator */ /* Initial version 2/1/98 by John Desrosiers (soho@crl.com) */ diff --git a/gs/src/gsmemory.c b/gs/src/gsmemory.c index 83fa386a9..4cc7e5f14 100644 --- a/gs/src/gsmemory.c +++ b/gs/src/gsmemory.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic allocator support */ #include "memory_.h" #include "gdebug.h" @@ -97,6 +84,26 @@ gs_alloc_memset(void *ptr, int /*byte */ fill, ulong lsize) } } +/* + * Either allocate (if obj == 0) or resize (if obj != 0) a structure array. + * If obj != 0, pstype is used only for checking (in DEBUG configurations). + */ +void * +gs_resize_struct_array(gs_memory_t *mem, void *obj, uint num_elements, + gs_memory_type_ptr_t pstype, client_name_t cname) +{ + if (obj == 0) + return gs_alloc_struct_array(mem, num_elements, void, pstype, cname); +#ifdef DEBUG + if (gs_object_type(mem, obj) != pstype) { + lprintf3("resize_struct_array 0x%lx, type was 0x%lx, expected 0x%lx!\n", + (ulong)obj, (ulong)gs_object_type(mem, obj), (ulong)pstype); + return 0; + } +#endif + return gs_resize_object(mem, obj, num_elements, cname); +} + /* Allocate a structure using a "raw memory" allocator. */ void * gs_raw_alloc_struct_immovable(gs_raw_memory_t * rmem, diff --git a/gs/src/gsmemory.h b/gs/src/gsmemory.h index faed82e53..5f9c7af87 100644 --- a/gs/src/gsmemory.h +++ b/gs/src/gsmemory.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface for memory allocation */ /* @@ -254,6 +241,14 @@ void gs_free_const_object(P3(gs_memory_t *mem, const void *data, void gs_free_const_string(P4(gs_memory_t *mem, const byte *data, uint nbytes, client_name_t cname)); +/* + * Either allocate (if obj == 0) or resize (if obj != 0) a structure array. + * If obj != 0, pstype is used only for checking (in DEBUG configurations). + */ +void *gs_resize_struct_array(P5(gs_memory_t *mem, void *obj, uint num_elements, + gs_memory_type_ptr_t pstype, + client_name_t cname)); + /* Register a structure root. This just calls gs_register_root. */ int gs_register_struct_root(P4(gs_memory_t *mem, gs_gc_root_t *root, void **pp, client_name_t cname)); diff --git a/gs/src/gsmemraw.h b/gs/src/gsmemraw.h index 0ad51c881..bc545befc 100644 --- a/gs/src/gsmemraw.h +++ b/gs/src/gsmemraw.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface for "raw memory" allocator */ /* Initial version 02/03/1998 by John Desrosiers (soho@crl.com) */ diff --git a/gs/src/gsmemret.c b/gs/src/gsmemret.c index ec5b1cd38..d34210e4a 100644 --- a/gs/src/gsmemret.c +++ b/gs/src/gsmemret.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Retrying memory allocator */ #include "gx.h" diff --git a/gs/src/gsmemret.h b/gs/src/gsmemret.h index c8d5ff633..24305046f 100644 --- a/gs/src/gsmemret.h +++ b/gs/src/gsmemret.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to retrying memory allocator */ #if !defined(gsmemret_INCLUDED) diff --git a/gs/src/gsmisc.c b/gs/src/gsmisc.c index 5db3fa91d..def9577df 100644 --- a/gs/src/gsmisc.c +++ b/gs/src/gsmisc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Miscellaneous utilities for Ghostscript library */ #include "ctype_.h" #include "malloc_.h" diff --git a/gs/src/gsnogc.c b/gs/src/gsnogc.c index c45fa74b9..324d2ee78 100644 --- a/gs/src/gsnogc.c +++ b/gs/src/gsnogc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* String freelist implementation and ersatz garbage collector */ #include "gx.h" #include "gsmdebug.h" diff --git a/gs/src/gsnogc.h b/gs/src/gsnogc.h index 38d015ab4..3b5ea0094 100644 --- a/gs/src/gsnogc.h +++ b/gs/src/gsnogc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to non-tracing GC */ #ifndef gsnogc_INCLUDED diff --git a/gs/src/gsnorop.c b/gs/src/gsnorop.c index b546f2c56..20706e102 100644 --- a/gs/src/gsnorop.c +++ b/gs/src/gsnorop.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Stubs for unimplemented RasterOp */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gsnotify.c b/gs/src/gsnotify.c index 33b3b7d89..4f2c07ca1 100644 --- a/gs/src/gsnotify.c +++ b/gs/src/gsnotify.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Notification machinery implementation */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gsnotify.h b/gs/src/gsnotify.h index 2e880e62d..25d0c6f19 100644 --- a/gs/src/gsnotify.h +++ b/gs/src/gsnotify.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Notification machinery */ #ifndef gsnotify_INCLUDED diff --git a/gs/src/gsos2.rc b/gs/src/gsos2.rc index 8630f022c..b90092715 100644 --- a/gs/src/gsos2.rc +++ b/gs/src/gsos2.rc @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Resources for gsos2.exe, Ghostscript for OS/2 */ -ICON 1 gsos2.ico +ICON 1 obj\gsos2.ico diff --git a/gs/src/gspaint.c b/gs/src/gspaint.c index 94ae2c098..e1ba24379 100644 --- a/gs/src/gspaint.c +++ b/gs/src/gspaint.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Painting procedures for Ghostscript library */ #include "math_.h" /* for fabs */ #include "gx.h" diff --git a/gs/src/gspaint.h b/gs/src/gspaint.h index 19e099ccf..bcc628d17 100644 --- a/gs/src/gspaint.h +++ b/gs/src/gspaint.h @@ -1,30 +1,21 @@ /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Erase/fill/stroke procedures */ /* Requires gsstate.h */ #ifndef gspaint_INCLUDED # define gspaint_INCLUDED /* Painting */ -int gs_erasepage(P1(gs_state *)), gs_fillpage(P1(gs_state *)), gs_fill(P1(gs_state *)), - gs_eofill(P1(gs_state *)), gs_stroke(P1(gs_state *)); +int gs_erasepage(P1(gs_state *)), + gs_fillpage(P1(gs_state *)), + gs_fill(P1(gs_state *)), + gs_eofill(P1(gs_state *)), + gs_stroke(P1(gs_state *)); /* Image tracing */ int gs_imagepath(P4(gs_state *, int, int, const byte *)); diff --git a/gs/src/gsparam.c b/gs/src/gsparam.c index 6a99700ee..abe666be8 100644 --- a/gs/src/gsparam.c +++ b/gs/src/gsparam.c @@ -1,22 +1,9 @@ -/* Copyright (C) 1995, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. +/* Copyright (C) 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Support for parameter lists */ #include "memory_.h" #include "string_.h" @@ -332,7 +319,7 @@ int param_write_name(gs_param_list * plist, gs_param_name pkey, const gs_param_string * pvalue) { - RETURN_WRITE_TYPED(n, gs_param_type_string); + RETURN_WRITE_TYPED(n, gs_param_type_name); } int param_write_int_array(gs_param_list * plist, gs_param_name pkey, diff --git a/gs/src/gsparam.h b/gs/src/gsparam.h index da15778a8..ecc9168bb 100644 --- a/gs/src/gsparam.h +++ b/gs/src/gsparam.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to parameter dictionaries */ #ifndef gsparam_INCLUDED diff --git a/gs/src/gsparam2.c b/gs/src/gsparam2.c index 81f28f4f7..14c13a1d8 100644 --- a/gs/src/gsparam2.c +++ b/gs/src/gsparam2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Serialize and unserialize parameter lists */ /* Initial version 2/1/98 by John Desrosiers (soho@crl.com) */ diff --git a/gs/src/gsparams.c b/gs/src/gsparams.c index 80fdbd6ad..db81f6a86 100644 --- a/gs/src/gsparams.c +++ b/gs/src/gsparams.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic parameter list serializer & expander */ /* Initial version 2/1/98 by John Desrosiers (soho@crl.com) */ diff --git a/gs/src/gsparams.h b/gs/src/gsparams.h index 97cf4913f..90c65b095 100644 --- a/gs/src/gsparams.h +++ b/gs/src/gsparams.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Serializer/expander for gs_parm_list's */ #ifndef gsparams_INCLUDED diff --git a/gs/src/gsparamx.c b/gs/src/gsparamx.c index 90da8882b..e6268f823 100644 --- a/gs/src/gsparamx.c +++ b/gs/src/gsparamx.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Extended parameter dictionary utilities */ #include "string_.h" #include "gserror.h" diff --git a/gs/src/gsparamx.h b/gs/src/gsparamx.h index 3df29aa1e..ce19ebcfe 100644 --- a/gs/src/gsparamx.h +++ b/gs/src/gsparamx.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to extended parameter dictionary utilities */ #ifndef gsparamx_INCLUDED diff --git a/gs/src/gspath.c b/gs/src/gspath.c index b2b1883f1..b7ce35e1b 100644 --- a/gs/src/gspath.c +++ b/gs/src/gspath.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Basic path routines for Ghostscript library */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gspath.h b/gs/src/gspath.h index 0e0e453b0..b622890ba 100644 --- a/gs/src/gspath.h +++ b/gs/src/gspath.h @@ -1,22 +1,10 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Graphics state path procedures */ /* Requires gsstate.h */ #ifndef gspath_INCLUDED @@ -25,29 +13,32 @@ #include "gspenum.h" /* Path constructors */ -int gs_newpath(P1(gs_state *)), gs_moveto(P3(gs_state *, floatp, floatp)), - gs_rmoveto(P3(gs_state *, floatp, floatp)), gs_lineto(P3(gs_state *, floatp, floatp)), - gs_rlineto(P3(gs_state *, floatp, floatp)), gs_arc(P6(gs_state *, floatp, floatp, floatp, floatp, floatp)), - gs_arcn(P6(gs_state *, floatp, floatp, floatp, floatp, floatp)), /* - * Because of an obscure bug in the IBM RS/6000 compiler, one (but not both) - * bool argument(s) for gs_arc_add must come before the floatp arguments. - */ +int gs_newpath(P1(gs_state *)), + gs_moveto(P3(gs_state *, floatp, floatp)), + gs_rmoveto(P3(gs_state *, floatp, floatp)), + gs_lineto(P3(gs_state *, floatp, floatp)), + gs_rlineto(P3(gs_state *, floatp, floatp)), + gs_arc(P6(gs_state *, floatp, floatp, floatp, floatp, floatp)), + gs_arcn(P6(gs_state *, floatp, floatp, floatp, floatp, floatp)), + /* + * Because of an obscure bug in the IBM RS/6000 compiler, one (but not + * both) bool argument(s) for gs_arc_add must come before the floatp + * arguments. + */ gs_arc_add(P8(gs_state *, bool, floatp, floatp, floatp, floatp, floatp, bool)), gs_arcto(P7(gs_state *, floatp, floatp, floatp, floatp, floatp, float[4])), - gs_curveto(P7(gs_state *, floatp, floatp, floatp, floatp, floatp, floatp)), - gs_rcurveto(P7(gs_state *, floatp, floatp, floatp, floatp, floatp, floatp)), - gs_closepath(P1(gs_state *)); + gs_curveto(P7(gs_state *, floatp, floatp, floatp, floatp, floatp, floatp)), + gs_rcurveto(P7(gs_state *, floatp, floatp, floatp, floatp, floatp, floatp)), + gs_closepath(P1(gs_state *)); /* Imager-level procedures */ #ifndef gs_imager_state_DEFINED # define gs_imager_state_DEFINED typedef struct gs_imager_state_s gs_imager_state; - #endif #ifndef gx_path_DEFINED # define gx_path_DEFINED typedef struct gx_path_s gx_path; - #endif int gs_imager_arc_add(P9(gx_path * ppath, gs_imager_state * pis, bool clockwise, floatp axc, floatp ayc, @@ -83,7 +74,7 @@ int gs_path_enum_copy_init(P3(gs_path_enum *, const gs_state *, bool)); #define gs_path_enum_init(penum, pgs)\ gs_path_enum_copy_init(penum, pgs, true) -int gs_path_enum_next(P2(gs_path_enum *, gs_point[3])); /* 0 when done */ +int gs_path_enum_next(P2(gs_path_enum *, gs_point[3])); /* 0 when done */ void gs_path_enum_cleanup(P1(gs_path_enum *)); /* Clipping */ diff --git a/gs/src/gspath1.c b/gs/src/gspath1.c index 1d7fb3baf..98f94cf64 100644 --- a/gs/src/gspath1.c +++ b/gs/src/gspath1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Additional PostScript Level 1 path routines for Ghostscript library */ #include "math_.h" #include "gx.h" diff --git a/gs/src/gspath2.h b/gs/src/gspath2.h index 7fb008184..18982a669 100644 --- a/gs/src/gspath2.h +++ b/gs/src/gspath2.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Level 2 graphics state path procedures */ /* Requires gsmatrix.h */ #ifndef gspath2_INCLUDED diff --git a/gs/src/gspcolor.c b/gs/src/gspcolor.c index 64cfa2565..fc903eee6 100644 --- a/gs/src/gspcolor.c +++ b/gs/src/gspcolor.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Pattern color operators and procedures for Ghostscript library */ #include "math_.h" #include "gx.h" diff --git a/gs/src/gspcolor.h b/gs/src/gspcolor.h index ab600f10e..244124f79 100644 --- a/gs/src/gspcolor.h +++ b/gs/src/gspcolor.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to Pattern color */ #ifndef gspcolor_INCLUDED diff --git a/gs/src/gspenum.h b/gs/src/gspenum.h index b10479f5e..cc1a6ccdc 100644 --- a/gs/src/gspenum.h +++ b/gs/src/gspenum.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common definitions for client interface to path enumeration */ #ifndef gspenum_INCLUDED diff --git a/gs/src/gspmdrv.c b/gs/src/gspmdrv.c index b9319f176..2c8fc6a55 100644 --- a/gs/src/gspmdrv.c +++ b/gs/src/gspmdrv.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Presentation Manager driver for Ghostscript */ /* Written by Russell Lang */ diff --git a/gs/src/gspmdrv.h b/gs/src/gspmdrv.h index d80f5f52c..1f8e2b8dc 100644 --- a/gs/src/gspmdrv.h +++ b/gs/src/gspmdrv.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions common to gspmdrv.c and gspmdrv.rc */ #ifndef gspmdrv_INCLUDED diff --git a/gs/src/gspmdrv.rc b/gs/src/gspmdrv.rc index 2778f2243..ed8d5a8eb 100644 --- a/gs/src/gspmdrv.rc +++ b/gs/src/gspmdrv.rc @@ -1,28 +1,15 @@ /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ - + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. + */ +/*$RCSfile$ $Revision$*/ /* Resources for gspmdrv.exe, the PM display driver for Ghostscript */ #include <os2.h> #include "gspmdrv.h" -ICON ID_GSPMDRV gspmdrv.ico +ICON ID_GSPMDRV obj\gspmdrv.ico DLGTEMPLATE IDD_ABOUT LOADONCALL MOVEABLE DISCARDABLE BEGIN diff --git a/gs/src/gsptype1.c b/gs/src/gsptype1.c index ff942622a..6ec207ed5 100644 --- a/gs/src/gsptype1.c +++ b/gs/src/gsptype1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PatternType 1 pattern implementation */ #include "math_.h" #include "gx.h" @@ -529,6 +516,14 @@ gs_makepixmappattern( /* overwrite the free procedure for the pattern instance */ ppmap->free_proc = pinst->rc.free; pinst->rc.free = free_pixmap_pattern; + + /* + * Since the PaintProcs don't reference the saved color space or + * color, clear these so that there isn't an extra retained + * reference to the Pattern object. + */ + gs_setgray(pinst->saved, 0.0); + } gs_setmatrix(pgs, &smat); return code; diff --git a/gs/src/gsptype1.h b/gs/src/gsptype1.h index 7bc371f0b..611f69cab 100644 --- a/gs/src/gsptype1.h +++ b/gs/src/gsptype1.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to PatternType 1 Patterns */ #ifndef gsptype1_INCLUDED diff --git a/gs/src/gsptype2.c b/gs/src/gsptype2.c index d75103860..049ccd4ce 100644 --- a/gs/src/gsptype2.c +++ b/gs/src/gsptype2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PatternType 2 implementation */ #include "gx.h" #include "gscspace.h" diff --git a/gs/src/gsptype2.h b/gs/src/gsptype2.h index f98c81cd0..0ea139082 100644 --- a/gs/src/gsptype2.h +++ b/gs/src/gsptype2.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to PatternType 2 Patterns */ #ifndef gsptype2_INCLUDED diff --git a/gs/src/gsrect.h b/gs/src/gsrect.h index 4d29d3c8f..20091ba82 100644 --- a/gs/src/gsrect.h +++ b/gs/src/gsrect.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Rectangle utilities */ #ifndef gsrect_INCLUDED diff --git a/gs/src/gsrefct.h b/gs/src/gsrefct.h index 179ec550e..6a7801041 100644 --- a/gs/src/gsrefct.h +++ b/gs/src/gsrefct.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Reference counting definitions */ #ifndef gsrefct_INCLUDED diff --git a/gs/src/gsrop.c b/gs/src/gsrop.c index 92f2cc3af..185788522 100644 --- a/gs/src/gsrop.c +++ b/gs/src/gsrop.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* RasterOp / transparency accessing for library */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gsrop.h b/gs/src/gsrop.h index 8d07721a8..19a8f705b 100644 --- a/gs/src/gsrop.h +++ b/gs/src/gsrop.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* RasterOp / transparency procedure interface */ #ifndef gsrop_INCLUDED diff --git a/gs/src/gsropc.c b/gs/src/gsropc.c index 9d9926e70..5cf667b21 100644 --- a/gs/src/gsropc.c +++ b/gs/src/gsropc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* RasterOp-compositing implementation */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gsropc.h b/gs/src/gsropc.h index c0b4aafad..0e66ef5c8 100644 --- a/gs/src/gsropc.h +++ b/gs/src/gsropc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* RasterOp-compositing interface */ #ifndef gsropc_INCLUDED diff --git a/gs/src/gsropt.h b/gs/src/gsropt.h index 3f3bb3f5e..ae1b7303d 100644 --- a/gs/src/gsropt.h +++ b/gs/src/gsropt.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* RasterOp / transparency type definitions */ #ifndef gsropt_INCLUDED diff --git a/gs/src/gsroptab.c b/gs/src/gsroptab.c index 803c8aebd..d37c20991 100644 --- a/gs/src/gsroptab.c +++ b/gs/src/gsroptab.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Table of RasterOp procedures */ #include "stdpre.h" #include "gsropt.h" diff --git a/gs/src/gsshade.c b/gs/src/gsshade.c index 4191c052e..e81b88c75 100644 --- a/gs/src/gsshade.c +++ b/gs/src/gsshade.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Constructors for shadings */ #include "gx.h" #include "gscspace.h" diff --git a/gs/src/gsshade.h b/gs/src/gsshade.h index 6a7a2abf0..38cf8e290 100644 --- a/gs/src/gsshade.h +++ b/gs/src/gsshade.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for shading */ #ifndef gsshade_INCLUDED diff --git a/gs/src/gsstate.c b/gs/src/gsstate.c index 380368fd1..9235233fc 100644 --- a/gs/src/gsstate.c +++ b/gs/src/gsstate.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Miscellaneous graphics state operators for Ghostscript library */ #include "gx.h" #include "memory_.h" diff --git a/gs/src/gsstate.h b/gs/src/gsstate.h index 5d4d354be..03ff7b14c 100644 --- a/gs/src/gsstate.h +++ b/gs/src/gsstate.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Public graphics state API */ #ifndef gsstate_INCLUDED diff --git a/gs/src/gsstruct.h b/gs/src/gsstruct.h index 9421db3e1..5815535d6 100644 --- a/gs/src/gsstruct.h +++ b/gs/src/gsstruct.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for Ghostscript modules that define allocatable structures */ /* Requires gstypes.h */ diff --git a/gs/src/gsstype.h b/gs/src/gsstype.h index 5b1c1cb61..4df6a7bd7 100644 --- a/gs/src/gsstype.h +++ b/gs/src/gsstype.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definition of structure type descriptors and extern_st */ #ifndef gsstype_INCLUDED diff --git a/gs/src/gssubst b/gs/src/gssubst index a3c80c9cf..8fa74e062 100755 --- a/gs/src/gssubst +++ b/gs/src/gssubst @@ -1,5 +1,5 @@ #!/usr/bin/tclsh - +# $RCSfile$ $Revision$ if {$argc < 2} { puts stderr "Usage: $argv0 (-t type | -u word | fromword toword) file ..." puts stderr " -t word = word word_t" diff --git a/gs/src/gstext.c b/gs/src/gstext.c index 162f5b650..614670e4c 100644 --- a/gs/src/gstext.c +++ b/gs/src/gstext.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Driver text interface support */ #include "memory_.h" #include "gstypes.h" @@ -402,7 +389,15 @@ gs_text_current_char(const gs_text_enum_t *pte) gs_char gs_text_next_char(const gs_text_enum_t *pte) { - return pte->returned.current_char; /****** WRONG ******/ + const uint operation = pte->text.operation; + + if (pte->index >= pte->text.size) + return gs_no_char; /* rangecheck */ + if (operation & (TEXT_FROM_STRING | TEXT_FROM_BYTES)) + return pte->text.data.bytes[pte->index]; + if (operation & TEXT_FROM_CHARS) + return pte->text.data.chars[pte->index]; + return gs_no_char; /* rangecheck */ } gs_glyph gs_text_current_glyph(const gs_text_enum_t *pte) diff --git a/gs/src/gstext.h b/gs/src/gstext.h index e6d010327..9768267f8 100644 --- a/gs/src/gstext.h +++ b/gs/src/gstext.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Driver interface for text */ #ifndef gstext_INCLUDED diff --git a/gs/src/gstrap.c b/gs/src/gstrap.c index 416a07881..1c4c5273f 100644 --- a/gs/src/gstrap.c +++ b/gs/src/gstrap.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Setting trapping parameters and zones */ #include "string_.h" #include "gx.h" diff --git a/gs/src/gstrap.h b/gs/src/gstrap.h index f2e626f0d..7a089e3d6 100644 --- a/gs/src/gstrap.h +++ b/gs/src/gstrap.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for trapping parameters and zones */ #ifndef gstrap_INCLUDED diff --git a/gs/src/gstype1.c b/gs/src/gstype1.c index f7b707ad9..100fcdf51 100644 --- a/gs/src/gstype1.c +++ b/gs/src/gstype1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Adobe Type 1 charstring interpreter */ #include "math_.h" #include "memory_.h" @@ -306,6 +293,7 @@ gs_type1_interpret(gs_type1_state * pcis, const gs_const_string * str, goto cc; case c1_hsbw: gs_type1_sbw(pcis, cs0, fixed_0, cs1, fixed_0); + cs1 = fixed_0; rsbw: /* Give the caller the opportunity to intervene. */ pcis->os_count = 0; /* clear */ ipsp->ip = cip, ipsp->dstate = state; @@ -316,9 +304,29 @@ rsbw: /* Give the caller the opportunity to intervene. */ /* Finish init when we return. */ pcis->init_done = 0; } else { - /* Accumulate the side bearing now, but don't do it */ - /* a second time for the base character of a seac. */ - if (pcis->seac_accent < 0) + /* + * Accumulate the side bearing now, but don't do it + * a second time for the base character of a seac. + */ + if (pcis->seac_accent >= 0) { + /* + * As a special hack to work around a bug in + * Fontographer, we deal with the (illegal) + * situation in which the side bearing of the + * accented character (save_lsbx) is different from + * the side bearing of the base character (cs0/cs1). + */ + fixed dsbx = cs0 - pcis->save_lsb.x; + fixed dsby = cs1 - pcis->save_lsb.y; + + if (dsbx | dsby) { + accum_xy(dsbx, dsby); + pcis->lsb.x += dsbx; + pcis->lsb.y += dsby; + pcis->save_adxy.x -= dsbx; + pcis->save_adxy.y -= dsby; + } + } else accum_xy(pcis->lsb.x, pcis->lsb.y); pcis->position.x = ptx; pcis->position.y = pty; diff --git a/gs/src/gstype1.h b/gs/src/gstype1.h index 3837b3fbd..47236cfd9 100644 --- a/gs/src/gstype1.h +++ b/gs/src/gstype1.h @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1995, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client interface to Adobe Type 1 font routines */ #ifndef gstype1_INCLUDED diff --git a/gs/src/gstype2.c b/gs/src/gstype2.c index 69d1a76c7..7ffcc2ec0 100644 --- a/gs/src/gstype2.c +++ b/gs/src/gstype2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Adobe Type 2 charstring interpreter */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/gstype42.c b/gs/src/gstype42.c index 91214f49e..0f5149da5 100644 --- a/gs/src/gstype42.c +++ b/gs/src/gstype42.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 42 (TrueType) font library routines */ #include "memory_.h" #include "gx.h" @@ -24,6 +11,7 @@ #include "gsstruct.h" #include "gsccode.h" #include "gsmatrix.h" +#include "gsutil.h" #include "gxfixed.h" /* for gxpath.h */ #include "gxpath.h" #include "gxfont.h" @@ -50,11 +38,7 @@ private int append_outline(P4(uint glyph_index, const gs_matrix_fixed * pmat, #define S8(p) (int)((U8(p) ^ 0x80) - 0x80) #define U16(p) (((uint)((p)[0]) << 8) + (p)[1]) #define S16(p) (int)((U16(p) ^ 0x8000) - 0x8000) -private ulong -u32(const byte *p) -{ - return ((ulong)U16(p) << 16) + U16((p) + 2); -} +#define u32(p) get_u32_msb(p) /* Define the bits in the component glyph flags. */ #define cg_argsAreWords 1 diff --git a/gs/src/gstypes.h b/gs/src/gstypes.h index d3447efb3..5ce0ce7e4 100644 --- a/gs/src/gstypes.h +++ b/gs/src/gstypes.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Miscellaneous common types for Ghostscript library */ #ifndef gstypes_INCLUDED diff --git a/gs/src/gsuid.h b/gs/src/gsuid.h index 0deb08dfd..d6ef1d3c2 100644 --- a/gs/src/gsuid.h +++ b/gs/src/gsuid.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Unique id definitions for Ghostscript */ #ifndef gsuid_INCLUDED diff --git a/gs/src/gsutil.c b/gs/src/gsutil.c index 1ca93d9e5..965d2f720 100644 --- a/gs/src/gsutil.c +++ b/gs/src/gsutil.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1994, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Utilities for Ghostscript library */ #include "string_.h" #include "memory_.h" @@ -137,6 +124,13 @@ memflip8x8(const byte * inp, int line_size, byte * outp, int dist) #endif /* !USE_ASM */ +/* Get an unsigned, big-endian 32-bit value. */ +ulong +get_u32_msb(const byte *p) +{ + return ((uint)p[0] << 24) + ((uint)p[1] << 16) + ((uint)p[2] << 8) + p[3]; +} + /* ------ String utilities ------ */ /* Compare two strings, returning -1 if the first is less, */ diff --git a/gs/src/gsutil.h b/gs/src/gsutil.h index 45490519d..bb11c4a7e 100644 --- a/gs/src/gsutil.h +++ b/gs/src/gsutil.h @@ -1,22 +1,9 @@ -/* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. +/* Copyright (C) 1992, 1993, 1999 Aladdin Enterprises. All rights reserved. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Prototypes for procedures in gsutil.c */ #ifndef gsutil_INCLUDED @@ -37,6 +24,9 @@ gs_id gs_next_ids(P1(uint count)); /* this will rotate an 8 x 8 block 90 degrees counter-clockwise. */ void memflip8x8(P4(const byte * inp, int line_size, byte * outp, int dist)); +/* Get an unsigned, big-endian 32-bit value. */ +ulong get_u32_msb(P1(const byte *p)); + /* ------ String utilities ------ */ /* Compare two strings, returning -1 if the first is less, */ diff --git a/gs/src/gswin.rc b/gs/src/gswin.rc index ca7d15013..ee90b3eef 100644 --- a/gs/src/gswin.rc +++ b/gs/src/gswin.rc @@ -17,7 +17,7 @@ */ - +/*$RCSfile$ $Revision$*/ #include <windows.h> #include "dwmain.h" diff --git a/gs/src/gsxfont.h b/gs/src/gsxfont.h index b6d6bdc36..773459a5b 100644 --- a/gs/src/gsxfont.h +++ b/gs/src/gsxfont.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* External font client definitions for Ghostscript library */ #ifndef gsxfont_INCLUDED diff --git a/gs/src/gx.h b/gs/src/gx.h index 1ec7f6a2f..5326dc3c0 100644 --- a/gs/src/gx.h +++ b/gs/src/gx.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1991, 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common internal definitions for Ghostscript library */ #ifndef gx_INCLUDED diff --git a/gs/src/gxacpath.c b/gs/src/gxacpath.c index 5830c4eb4..12eccb70b 100644 --- a/gs/src/gxacpath.c +++ b/gs/src/gxacpath.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Accumulator for clipping paths */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gxalloc.h b/gs/src/gxalloc.h index 9bcd8adb0..65becc085 100644 --- a/gs/src/gxalloc.h +++ b/gs/src/gxalloc.h @@ -1,22 +1,10 @@ /* Copyright (C) 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Structure definitions for standard allocator */ /* Requires gsmemory.h, gsstruct.h */ #ifndef gxalloc_INCLUDED @@ -450,7 +438,10 @@ void debug_print_chunk(P1(const chunk_t * cp)); /* default options */ /* Print the contents of all chunks managed by an allocator. */ /* Relevant options: all. */ void debug_dump_memory(P2(const gs_ref_memory_t * mem, - const dump_control_t * control)); + const dump_control_t * control)); + +/* Find all the objects that contain a given pointer. */ +void debug_find_pointers(P2(const gs_ref_memory_t *mem, const void *target)); #endif /* DEBUG */ diff --git a/gs/src/gxalpha.h b/gs/src/gxalpha.h index 43d649e65..b5c01eb19 100644 --- a/gs/src/gxalpha.h +++ b/gs/src/gxalpha.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal machinery for alpha channel support */ #ifndef gxalpha_INCLUDED diff --git a/gs/src/gxarith.h b/gs/src/gxarith.h index d862b1152..c529ef817 100644 --- a/gs/src/gxarith.h +++ b/gs/src/gxarith.h @@ -1,25 +1,12 @@ /* Copyright (C) 1990, 1993, 1994, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ #ifndef gxarith_INCLUDED # define gxarith_INCLUDED - +/*$RCSfile$ $Revision$ */ /* Arithmetic macros for Ghostscript library */ /* Define an in-line abs function, good for any signed numeric type. */ diff --git a/gs/src/gxband.h b/gs/src/gxband.h index db11138e1..d562a474f 100644 --- a/gs/src/gxband.h +++ b/gs/src/gxband.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Band-processing parameters for Ghostscript */ #ifndef gxband_INCLUDED diff --git a/gs/src/gxbcache.c b/gs/src/gxbcache.c index 438eb9c5e..e06aa732a 100644 --- a/gs/src/gxbcache.c +++ b/gs/src/gxbcache.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Bitmap cache implementation */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gxbcache.h b/gs/src/gxbcache.h index 629df0064..d9b452692 100644 --- a/gs/src/gxbcache.h +++ b/gs/src/gxbcache.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Bitmap cache structures */ #ifndef gxbcache_INCLUDED diff --git a/gs/src/gxbitfmt.h b/gs/src/gxbitfmt.h index 8749385ac..4fac68651 100644 --- a/gs/src/gxbitfmt.h +++ b/gs/src/gxbitfmt.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for bitmap storage formats */ #ifndef gxbitfmt_INCLUDED diff --git a/gs/src/gxbitmap.h b/gs/src/gxbitmap.h index 446c2e47e..14d06b273 100644 --- a/gs/src/gxbitmap.h +++ b/gs/src/gxbitmap.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1993, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for stored bitmaps for Ghostscript */ #ifndef gxbitmap_INCLUDED diff --git a/gs/src/gxbitops.h b/gs/src/gxbitops.h index ac6827130..c00605d68 100644 --- a/gs/src/gxbitops.h +++ b/gs/src/gxbitops.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal definitions for bitmap operations */ #ifndef gxbitops_INCLUDED diff --git a/gs/src/gxccache.c b/gs/src/gxccache.c index 4cea852a0..a6ebc53e3 100644 --- a/gs/src/gxccache.c +++ b/gs/src/gxccache.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Fast case character cache routines for Ghostscript library */ #include "gx.h" #include "gpcheck.h" diff --git a/gs/src/gxccman.c b/gs/src/gxccman.c index fcd23d615..24e43c316 100644 --- a/gs/src/gxccman.c +++ b/gs/src/gxccman.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Character cache management routines for Ghostscript library */ #include "gx.h" #include "memory_.h" diff --git a/gs/src/gxcdevn.h b/gs/src/gxcdevn.h index 4a9ce84ab..34643aa3e 100644 --- a/gs/src/gxcdevn.h +++ b/gs/src/gxcdevn.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal definitions for DeviceN color spaces */ #ifndef gxcdevn_INCLUDED diff --git a/gs/src/gxchar.c b/gs/src/gxchar.c index 048d8de52..2960137ba 100644 --- a/gs/src/gxchar.c +++ b/gs/src/gxchar.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Default implementation of text writing */ #include "gx.h" #include "memory_.h" diff --git a/gs/src/gxchar.h b/gs/src/gxchar.h index cd2fc15c6..c3589cd73 100644 --- a/gs/src/gxchar.h +++ b/gs/src/gxchar.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal character definition for Ghostscript library */ /* Requires gsmatrix.h, gxfixed.h */ diff --git a/gs/src/gxcht.c b/gs/src/gxcht.c index f0058179c..e57b6f026 100644 --- a/gs/src/gxcht.c +++ b/gs/src/gxcht.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Color halftone rendering for Ghostscript imaging library */ #include "memory_.h" #include "gx.h" @@ -143,8 +130,9 @@ gx_dc_ht_colored_load(gx_device_color * pdevc, const gs_imager_state * pis, gx_device * ignore_dev, gs_color_select_t select) { gx_device_halftone *pdht = pdevc->colors.colored.c_ht; - gx_ht_order *porder = &pdht->components[0].corder; gx_ht_cache *pcache = pis->ht_cache; + gx_ht_order *porder = + (pdht->components ? &pdht->components[0].corder : &pdht->order); if (pcache->order.bit_data != porder->bit_data) gx_ht_init_cache(pcache, porder); @@ -168,11 +156,23 @@ gx_dc_ht_colored_fill_rectangle(const gx_device_color * pdevc, const gx_device_halftone *pdht = pdevc->colors.colored.c_ht; int depth = dev->color_info.depth; int nplanes = dev->color_info.num_components; + SET_HT_COLORS_PROC((*set_ht_colors)) = + ( +#if USE_SLOW_CODE + set_ht_colors_gt_4 +#else + dev_proc(dev, map_cmyk_color) == cmyk_1bit_map_cmyk_color ? + set_cmyk_1bit_colors : + nplanes < 4 ? set_ht_colors_le_4 : + set_ht_colors_gt_4 +#endif + ); SET_COLOR_HT_PROC((*set_color_ht)) = ( #if !USE_SLOW_CODE - !(pdevc->colors.colored.plane_mask & ~(gx_color_index)15) ? - set_color_ht_le_4 : + !(pdevc->colors.colored.plane_mask & ~(gx_color_index)15) && + set_ht_colors != set_ht_colors_gt_4 ? + set_color_ht_le_4 : #endif set_color_ht_gt_4); color_values_pair_t vp; @@ -229,16 +229,7 @@ gx_dc_ht_colored_fill_rectangle(const gx_device_color * pdevc, for (i = 4; i < nplanes; ++i) caches[i] = pocs[pdht->color_indices[i]].corder.cache; } - special = -#if USE_SLOW_CODE - set_ht_colors_gt_4 -#else - (dev_proc(dev, map_cmyk_color) == cmyk_1bit_map_cmyk_color ? - set_cmyk_1bit_colors : - nplanes < 4 ? set_ht_colors_le_4 : - set_ht_colors_gt_4) -#endif - (&vp, colors, sbits, pdevc, dev, caches, nplanes); + special = set_ht_colors(&vp, colors, sbits, pdevc, dev, caches, nplanes); no_rop = source == NULL && lop_no_S_is_T(lop); /* * If the LCM of the plane cell sizes is smaller than the rectangle @@ -410,7 +401,9 @@ private const gx_const_strip_bitmap ht_no_bitmap = { } else { \ const gx_device_halftone *pdht = pdc->colors.colored.c_ht; \ int nlevels =\ - pdht->components[pdht->color_indices[i]].corder.num_levels;\ + (pdht->components ?\ + pdht->components[pdht->color_indices[i]].corder.num_levels :\ + pdht->order.num_levels);\ \ pvp->values[1][i] = pvp->values[0][i]; \ pvp->values[0][i] = fractional_color(q + 1, max_color); \ @@ -585,7 +578,9 @@ set_cmyk_1bit_colors(color_values_pair_t *ignore_pvp, sbits[3 - i] = &ht_no_bitmap;\ } else {\ int nlevels =\ - pdht->components[pdht->color_indices[i]].corder.num_levels;\ + (pdht->components ?\ + pdht->components[pdht->color_indices[i]].corder.num_levels :\ + pdht->order.num_levels);\ \ mask0 |= mask;\ sbits[3 - i] = (const gx_const_strip_bitmap *)\ @@ -926,7 +921,7 @@ set_color_ht_le_4(byte *dest_data, uint dest_raster, int px, int py, */ private void set_color_ht_gt_4(byte *dest_data, uint dest_raster, int px, int py, - int w, int h, int depth, int special, int nplanes, + int w, int h, int depth, int special, int num_planes, gx_color_index plane_mask, gx_device *dev, const color_values_pair_t *pvp, gx_color_index colors[1 << MAX_DCC], @@ -937,10 +932,18 @@ set_color_ht_gt_4(byte *dest_data, uint dest_raster, int px, int py, int dbytes = depth >> 3; byte *dest_row = dest_data + dest_raster * (h - 1) + (w * depth) / 8; - - /* Compute the number of active planes. */ - for (nplanes = 0; (plane_mask >> nplanes) != 0; ) - ++nplanes; + int pmin, pmax; + gx_color_value cv[MAX_DCC]; + + /* Compute the range of active planes. */ + if (plane_mask == 0) + pmin = 0, pmax = -1; + else { + for (pmin = 0; !((plane_mask >> pmin) & 1); ) + ++pmin; + for (pmax = 0; (plane_mask >> pmax) > 1; ) + ++pmax; + } /* Do one-time cursor initialization. */ { @@ -948,11 +951,21 @@ set_color_ht_gt_4(byte *dest_data, uint dest_raster, int px, int py, int lasty = h - 1 + py; int i; - for (i = 0; i < nplanes; ++i) + for (i = pmin; i <= pmax; ++i) if ((plane_mask >> i) & 1) init_tile_cursor(i, &cursor[i], sbits[i], endx, lasty); } + /* Pre-load the color value for the unchanging planes. */ + { + int i; + + for (i = 0; i < pmin; ++i) + cv[i] = pvp->values[0][i]; + for (i = pmax + 1; i < num_planes; ++i) + cv[i] = pvp->values[0][i]; + } + /* Now compute the actual tile. */ for (y = h; ; dest_row -= dest_raster) { byte *dest = dest_row; @@ -963,7 +976,7 @@ set_color_ht_gt_4(byte *dest_data, uint dest_raster, int px, int py, gx_color_index index = 0; gx_color_index tcolor; - for (i = 0; i < nplanes; ++i) + for (i = pmin; i <= pmax; ++i) if ((plane_mask >> i) & 1) { /* Get the next bit from an individual mask. */ tile_cursor_t *ptc = &cursor[i]; @@ -985,10 +998,9 @@ b: if (ptc->bit_shift < 8) tcolor = colors[index]; if (tcolor == gx_no_color_index) { /* Map the color value now. */ - gx_color_value cv[MAX_DCC]; int i; - for (i = 0; i < nplanes; ++i) + for (i = pmin; i <= pmax; ++i) cv[i] = pvp->values[(index >> i) & 1][i]; /****** HACK -- NO WAY TO MAP GENERAL COLORS ******/ tcolor = colors[index] = @@ -1017,7 +1029,7 @@ b: if (ptc->bit_shift < 8) } if (y == 0) break; - for (i = 0; i < nplanes; ++i) + for (i = pmin; i <= pmax; ++i) if ((plane_mask >> i) & 1) STEP_ROW(cursor[i], i); } diff --git a/gs/src/gxcie.h b/gs/src/gxcie.h index df4adf53e..2db9355d7 100644 --- a/gs/src/gxcie.h +++ b/gs/src/gxcie.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal definitions for CIE color implementation */ /* Requires gxcspace.h */ diff --git a/gs/src/gxcindex.h b/gs/src/gxcindex.h index 0eca0c803..4b77fb708 100644 --- a/gs/src/gxcindex.h +++ b/gs/src/gxcindex.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Define the device color index type and macros */ #ifndef gxcindex_INCLUDED diff --git a/gs/src/gxclbits.c b/gs/src/gxclbits.c index 31ef32288..a4e04c566 100644 --- a/gs/src/gxclbits.c +++ b/gs/src/gxclbits.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Halftone and bitmap writing for command lists */ #include "memory_.h" #include "gx.h" @@ -617,14 +604,15 @@ clist_change_tile(gx_device_clist_writer * cldev, gx_clist_state * pcls, extra + 1 + cmd_size_w(loc.index) + cmd_size_w(offset); byte *dp; uint csize; - - code = cmd_put_bits(cldev, pcls, ts_bits(cldev, loc.tile), + int code = + cmd_put_bits(cldev, pcls, ts_bits(cldev, loc.tile), tiles->rep_width * depth, tiles->rep_height, loc.tile->cb_raster, rsize, (cldev->tile_params.size.x > tiles->rep_width ? decompress_elsewhere | decompress_spread : decompress_elsewhere), &dp, &csize); + if (code < 0) return code; if (extra) { /* Write the tile parameters before writing the bits. */ diff --git a/gs/src/gxcldev.h b/gs/src/gxcldev.h index ed3a91ab8..5e3c38d49 100644 --- a/gs/src/gxcldev.h +++ b/gs/src/gxcldev.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal definitions for Ghostscript command lists. */ #ifndef gxcldev_INCLUDED diff --git a/gs/src/gxclfile.c b/gs/src/gxclfile.c index 855bcdf9c..8801db366 100644 --- a/gs/src/gxclfile.c +++ b/gs/src/gxclfile.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* File-based command list implementation */ #include "stdio_.h" #include "string_.h" diff --git a/gs/src/gxclimag.c b/gs/src/gxclimag.c index ce3c04bec..d1e1c5c0e 100644 --- a/gs/src/gxclimag.c +++ b/gs/src/gxclimag.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Higher-level image operations for band lists */ #include "math_.h" #include "memory_.h" @@ -214,8 +201,8 @@ typedef struct clist_image_enum_s { gx_image_enum_common; /* Arguments of begin_image */ gs_memory_t *memory; - gs_pixel_image_t image; - gx_drawing_color dcolor; + gs_pixel_image_t image; /* only uses Width, Height, Interpolate */ + gx_drawing_color dcolor; /* only pure right now */ gs_int_rect rect; const gs_imager_state *pis; const gx_clip_path *pcpath; @@ -225,8 +212,7 @@ typedef struct clist_image_enum_s { int bits_per_plane; /* bits per pixel per plane */ gs_matrix matrix; /* image space -> device space */ bool uses_color; - byte color_space; - gs_id color_space_id; + clist_color_space_t color_space; int ymin, ymax; bool map_rgb_to_cmyk; gx_colors_used_t colors_used; @@ -249,10 +235,10 @@ typedef struct clist_image_enum_s { int y; bool color_map_is_known; } clist_image_enum; - -/* We can disregard the pointers in the writer by allocating */ -/* the image enumerator as immovable. This is a hack, of course. */ -gs_private_st_simple(st_clist_image_enum, clist_image_enum, "clist_image_enum"); +gs_private_st_suffix_add3(st_clist_image_enum, clist_image_enum, + "clist_image_enum", clist_image_enum_enum_ptrs, + clist_image_enum_reloc_ptrs, st_gx_image_enum_common, + pis, pcpath, color_space.space); private image_enum_proc_plane_data(clist_image_plane_data); private image_enum_proc_end_image(clist_image_end_image); @@ -266,12 +252,12 @@ private bool image_band_box(P5(gx_device * dev, const clist_image_enum * pie, int y, int h, gs_int_rect * pbox)); private int begin_image_command(P3(byte *buf, uint buf_size, const gs_image_common_t *pic)); -private int cmd_image_plane_data(P7(gx_device_clist_writer * cldev, +private int cmd_image_plane_data(P8(gx_device_clist_writer * cldev, gx_clist_state * pcls, const gx_image_plane_t * planes, const gx_image_enum_common_t * pie, uint bytes_per_plane, - const uint * offsets, int h)); + const uint * offsets, int dx, int h)); private uint clist_image_unknowns(P2(gx_device *dev, const clist_image_enum *pie)); private int write_image_end_all(P2(gx_device *dev, @@ -418,9 +404,16 @@ clist_begin_typed_image(gx_device * dev, pie->bits_per_plane = bits_per_pixel / pie->num_planes; pie->matrix = mat; pie->uses_color = uses_color; - pie->color_space = (base_index << 4) | - (indexed ? (pim->ColorSpace->params.indexed.use_proc ? 12 : 8) : 0); - pie->color_space_id = (masked ? gs_no_id : pim->ColorSpace->id); + if (masked) { + pie->color_space.byte1 = 0; /* arbitrary */ + pie->color_space.space = 0; + pie->color_space.id = gs_no_id; + } else { + pie->color_space.byte1 = (base_index << 4) | + (indexed ? (pim->ColorSpace->params.indexed.use_proc ? 12 : 8) : 0); + pie->color_space.id = + (pie->color_space.space = pim->ColorSpace)->id; + } pie->y = pie->rect.p.y; /* Image row has to fit in cmd writer's buffer */ @@ -467,13 +460,14 @@ clist_begin_typed_image(gx_device * dev, if (bits_per_pixel > 4 || pim->Interpolate || num_components > 1) colors_used = all; else { + int max_value = (1 << bits_per_pixel) - 1; float dmin = pim->Decode[0], dmax = pim->Decode[1]; float dtemp; if (dmax < dmin) dtemp = dmax, dmax = dmin, dmin = dtemp; if (dmin != 0 || - dmax != (indexed ? (1 << bits_per_pixel) - 1 : 1) + dmax != (indexed ? max_value : 1) ) { colors_used = all; } else { @@ -483,11 +477,10 @@ clist_begin_typed_image(gx_device * dev, gs_client_color cc; gx_drawing_color dcolor; int i; - int max_value = (1 << bits_per_pixel) - 1; double denom = (indexed ? 1 : max_value); for (i = 0; i <= max_value; ++i) { - cc.paint.values[0] = ((double)i) / denom; + cc.paint.values[0] = (double)i / denom; remap_color(&cc, pcs, &dcolor, pis, dev, gs_color_select_source); colors_used |= cmd_drawing_colors_used(cdev, &dcolor); @@ -612,28 +605,26 @@ clist_image_plane_data(gx_image_enum_common_t * info, * Note that y and height always define a complete band. */ gs_int_rect ibox; - int bpp = pie->bits_per_plane; - int num_planes = pie->num_planes; - uint offsets[gs_image_max_planes]; - int i, iy, ih, xskip, nrows; - uint bytes_per_plane, bytes_per_row, rows_per_cmd; - int band_ymax, band_ymin; gs_int_rect entire_box; if (!image_band_box(dev, pie, y, height, &ibox)) continue; - pcls->colors_used.or |= pie->colors_used.or; - pcls->colors_used.slow_rop |= pie->colors_used.slow_rop; /* * The transmitted subrectangle has to be computed at the time * we write the begin_image command; this in turn controls how * much of each scan line we write out. */ - band_ymax = min(band_end, pie->ymax); - band_ymin = max(band_end - band_height, pie->ymin); - if (!image_band_box(dev, pie, band_ymin, - band_ymax - band_ymin, &entire_box)) - continue; + { + int band_ymax = min(band_end, pie->ymax); + int band_ymin = max(band_end - band_height, pie->ymin); + + if (!image_band_box(dev, pie, band_ymin, + band_ymax - band_ymin, &entire_box)) + continue; + } + + pcls->colors_used.or |= pie->colors_used.or; + pcls->colors_used.slow_rop |= pie->colors_used.slow_rop; /* Write out begin_image & its preamble for this band */ if (!(pcls->known & begin_image_known)) { @@ -684,49 +675,58 @@ clist_image_plane_data(gx_image_enum_common_t * info, } /* - * The actual data that we write out must use the X values - * set by begin_image, which may be larger than the ones - * actually needed for this particular scan line if the image - * is rotated. - */ -#define bx0 entire_box.p.x -#define by0 ibox.p.y -#define bx1 entire_box.q.x -#define by1 ibox.q.y - if (by0 < y0) - by0 = y0; - if (by1 > y1) - by1 = y1; - /* - * Make sure we're skipping an integral number of pixels, by - * truncating the initial X coordinate to the next lower - * value that is an exact multiple of a byte. + * The data that we write out must use the X values set by + * begin_image, which may cover a larger interval than the ones + * actually needed for these particular scan lines if the image is + * rotated. */ - xskip = bx0 & -(int)"\001\010\004\010\002\010\004\010"[bpp & 7]; - for (i = 0; i < num_planes; ++i) - offsets[i] = (by0 - y0) * planes[i].raster + ((xskip * bpp) >> 3); - xskip = bx0 - xskip; - bytes_per_plane = ((xskip + bx1 - bx0) * bpp + 7) >> 3; - bytes_per_row = bytes_per_plane * pie->num_planes; - rows_per_cmd = - (cbuf_size - cmd_largest_size) / max(bytes_per_row, 1); - - if (rows_per_cmd == 0) { /* The reader will have to buffer a row separately. */ - rows_per_cmd = 1; - } - for (iy = by0, ih = by1 - by0; ih > 0; iy += nrows, ih -= nrows) { - nrows = min(ih, rows_per_cmd); - TRY_RECT { - code = cmd_image_plane_data(cdev, pcls, planes, info, - bytes_per_plane, offsets, nrows); - } HANDLE_RECT(code); + { + /* + * image_band_box ensures that b{x,y}{0,1} fall within + * pie->rect. + */ + int bx0 = entire_box.p.x, bx1 = entire_box.q.x; + int by0 = ibox.p.y, by1 = ibox.q.y; + int bpp = pie->bits_per_plane; + int num_planes = pie->num_planes; + uint offsets[gs_image_max_planes]; + int i, iy, ih, xskip, xoff, nrows; + uint bytes_per_plane, bytes_per_row, rows_per_cmd; + + if (by0 < y0) + by0 = y0; + if (by1 > y1) + by1 = y1; + /* + * Make sure we're skipping an integral number of pixels, by + * truncating the initial X coordinate to the next lower + * value that is an exact multiple of a byte. + */ + xoff = bx0 - pie->rect.p.x; + xskip = xoff & -(int)"\001\010\004\010\002\010\004\010"[bpp & 7]; for (i = 0; i < num_planes; ++i) - offsets[i] += planes[i].raster * nrows; + offsets[i] = + (by0 - y0) * planes[i].raster + ((xskip * bpp) >> 3); + bytes_per_plane = ((bx1 - (pie->rect.p.x + xskip)) * bpp + 7) >> 3; + bytes_per_row = bytes_per_plane * pie->num_planes; + rows_per_cmd = + (cbuf_size - cmd_largest_size) / max(bytes_per_row, 1); + + if (rows_per_cmd == 0) { + /* The reader will have to buffer a row separately. */ + rows_per_cmd = 1; + } + for (iy = by0, ih = by1 - by0; ih > 0; iy += nrows, ih -= nrows) { + nrows = min(ih, rows_per_cmd); + TRY_RECT { + code = cmd_image_plane_data(cdev, pcls, planes, info, + bytes_per_plane, offsets, + xoff - xskip, nrows); + } HANDLE_RECT(code); + for (i = 0; i < num_planes; ++i) + offsets[i] += planes[i].raster * nrows; + } } -#undef bx0 -#undef by0 -#undef bx1 -#undef by1 } END_RECTS_ON_ERROR( BEGIN ++cdev->ignore_lo_mem_warnings; @@ -804,16 +804,21 @@ private int cmd_put_set_data_x(gx_device_clist_writer * cldev, gx_clist_state * pcls, int data_x) { - int dx_msb = data_x >> 5; byte *dp; - int code = set_cmd_put_op(dp, cldev, pcls, cmd_opv_set_misc, - 2 + cmd_size_w(dx_msb)); + int code; + + if (data_x > 0x1f) { + int dx_msb = data_x >> 5; - if (code >= 0) { - if (dx_msb) { + code = set_cmd_put_op(dp, cldev, pcls, cmd_opv_set_misc, + 2 + cmd_size_w(dx_msb)); + if (code >= 0) { dp[1] = cmd_set_misc_data_x + 0x20 + (data_x & 0x1f); cmd_put_w(dx_msb, dp + 2); - } else + } + } else { + code = set_cmd_put_op(dp, cldev, pcls, cmd_opv_set_misc, 2); + if (code >= 0) dp[1] = cmd_set_misc_data_x + data_x; } return code; @@ -1027,7 +1032,8 @@ image_band_box(gx_device * dev, const clist_image_enum * pie, int y, int h, fixed by0 = int2fixed(y); fixed by1 = int2fixed(y + h); int - px = pie->rect.p.x, py = pie->rect.p.y, qx = pie->rect.q.x, qy = pie->rect.q.y; + px = pie->rect.p.x, py = pie->rect.p.y, + qx = pie->rect.q.x, qy = pie->rect.q.y; gs_fixed_rect cbox; /* device clipping box */ gs_rect bbox; /* cbox intersected with band */ @@ -1198,13 +1204,10 @@ clist_image_unknowns(gx_device *dev, const clist_image_enum *pie) unknown |= ctm_known; cdev->imager_state.ctm = pis->ctm; } - if (pie->color_space_id != gs_no_id /* i.e., not masked */) { - if (cdev->color_space_id != pie->color_space_id) { + if (pie->color_space.id != gs_no_id /* i.e., not masked */) { + if (cdev->color_space.id != pie->color_space.id) { unknown |= color_space_known; cdev->color_space = pie->color_space; - cdev->color_space_id = pie->color_space_id; - if (cdev->color_space & 8) - cdev->indexed_params = pie->image.ColorSpace->params.indexed; } } if (cmd_check_clip_path(cdev, pie->pcpath)) @@ -1236,10 +1239,12 @@ begin_image_command(byte *buf, uint buf_size, const gs_image_common_t *pic) /* Write data for a partial image. */ private int cmd_image_plane_data(gx_device_clist_writer * cldev, gx_clist_state * pcls, - const gx_image_plane_t * planes, const gx_image_enum_common_t * pie, - uint bytes_per_plane, const uint * offsets, int h) + const gx_image_plane_t * planes, + const gx_image_enum_common_t * pie, + uint bytes_per_plane, const uint * offsets, + int dx, int h) { - int data_x = planes[0].data_x; + int data_x = planes[0].data_x + dx; uint nbytes = bytes_per_plane * pie->num_planes * h; uint len = 1 + cmd_size2w(h, bytes_per_plane) + nbytes; byte *dp; diff --git a/gs/src/gxclio.h b/gs/src/gxclio.h index a386313c3..9794ff7dd 100644 --- a/gs/src/gxclio.h +++ b/gs/src/gxclio.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* I/O interface for command lists */ #ifndef gxclio_INCLUDED diff --git a/gs/src/gxclip.c b/gs/src/gxclip.c index 37ccf779e..ea4e00f1c 100644 --- a/gs/src/gxclip.c +++ b/gs/src/gxclip.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Implementation of (path-based) clipping */ #include "gx.h" #include "gxdevice.h" diff --git a/gs/src/gxclip.h b/gs/src/gxclip.h index 891e186ee..c7e28f03c 100644 --- a/gs/src/gxclip.h +++ b/gs/src/gxclip.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal definitions for clipping */ #ifndef gxclip_INCLUDED diff --git a/gs/src/gxclip2.c b/gs/src/gxclip2.c index f07002951..61f6893de 100644 --- a/gs/src/gxclip2.c +++ b/gs/src/gxclip2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Mask clipping for patterns */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gxclip2.h b/gs/src/gxclip2.h index b3f762903..09ed6eda3 100644 --- a/gs/src/gxclip2.h +++ b/gs/src/gxclip2.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Tiled mask clipping device and interface */ #ifndef gxclip2_INCLUDED diff --git a/gs/src/gxclipm.c b/gs/src/gxclipm.c index 0bb800835..4aba39579 100644 --- a/gs/src/gxclipm.c +++ b/gs/src/gxclipm.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Mask clipping device */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gxclipm.h b/gs/src/gxclipm.h index 04aaf51b1..f863d2cd4 100644 --- a/gs/src/gxclipm.h +++ b/gs/src/gxclipm.h @@ -1,22 +1,10 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for mask clip device */ /* Requires gsstruct.h, gxdevice.h, gxdevmem.h */ #ifndef gxclipm_INCLUDED diff --git a/gs/src/gxclipsr.h b/gs/src/gxclipsr.h index d2ab408d3..12e79a58d 100644 --- a/gs/src/gxclipsr.h +++ b/gs/src/gxclipsr.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internals of clipsave/cliprestore */ #ifndef gxclipsr_INCLUDED diff --git a/gs/src/gxclist.c b/gs/src/gxclist.c index 0548c184a..b282b8e21 100644 --- a/gs/src/gxclist.c +++ b/gs/src/gxclist.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Command list document- and page-level code. */ #include "memory_.h" #include "string_.h" @@ -46,9 +33,11 @@ ENUM_PTRS_WITH(device_clist_enum_ptrs, gx_device_clist *cdev) switch (index) { case 0: return ENUM_OBJ((cdev->writer.image_enum_id != gs_no_id ? cdev->writer.clip_path : 0)); + case 1: return ENUM_OBJ((cdev->writer.image_enum_id != gs_no_id ? + cdev->writer.color_space.space : 0)); default: return ENUM_USING(st_imager_state, &cdev->writer.imager_state, - sizeof(gs_imager_state), index - 1); + sizeof(gs_imager_state), index - 2); } ENUM_PTRS_END private @@ -57,8 +46,10 @@ RELOC_PTRS_WITH(device_clist_reloc_ptrs, gx_device_clist *cdev) RELOC_PREFIX(st_device_forward); if (!CLIST_IS_WRITER(cdev)) return; - if (cdev->writer.image_enum_id != gs_no_id) + if (cdev->writer.image_enum_id != gs_no_id) { RELOC_VAR(cdev->writer.clip_path); + RELOC_VAR(cdev->writer.color_space.space); + } RELOC_USING(st_imager_state, &cdev->writer.imager_state, sizeof(gs_imager_state)); } RELOC_PTRS_END @@ -372,8 +363,9 @@ clist_reset(gx_device * dev) cdev->imager_state = clist_imager_state_initial; cdev->clip_path = NULL; cdev->clip_path_id = gs_no_id; - cdev->color_space = 0; - cdev->color_space_id = gs_no_id; + cdev->color_space.byte1 = 0; + cdev->color_space.id = gs_no_id; + cdev->color_space.space = 0; { int i; diff --git a/gs/src/gxclist.h b/gs/src/gxclist.h index 49e51f4a1..6933968cc 100644 --- a/gs/src/gxclist.h +++ b/gs/src/gxclist.h @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Command list definitions for Ghostscript. */ /* Requires gxdevice.h and gxdevmem.h */ @@ -197,6 +184,11 @@ typedef struct gx_device_clist_common_s { #define cmd_max_dash 11 /* Define the state of a band list when writing. */ +typedef struct clist_color_space_s { + byte byte1; /* see cmd_opv_set_color_space in gxclpath.h */ + gs_id id; /* space->id for comparisons */ + const gs_color_space *space; +} clist_color_space_t; typedef struct gx_device_clist_writer_s { gx_device_clist_common_members; /* (must be first) */ int error_code; /* error returned by cmd_put_op */ @@ -221,13 +213,11 @@ typedef struct gx_device_clist_writer_s { */ gs_imager_state imager_state; /* current values of imager params */ float dash_pattern[cmd_max_dash]; /* current dash pattern */ - const gx_clip_path *clip_path; /* current clip path */ + const gx_clip_path *clip_path; /* current clip path, */ + /* only non-transient for images */ gs_id clip_path_id; /* id of current clip path */ - byte color_space; /* current color space identifier */ - /* (only used for images) */ - gs_id color_space_id; /* ditto */ - gs_indexed_params indexed_params; /* current indexed space parameters */ - /* (ditto) */ + clist_color_space_t color_space; /* current color space, */ + /* only used for images */ gs_id transfer_ids[4]; /* ids of transfer maps */ gs_id black_generation_id; /* id of black generation map */ gs_id undercolor_removal_id; /* id of u.c.r. map */ diff --git a/gs/src/gxcllzw.c b/gs/src/gxcllzw.c index 48ec72ea3..bd8bb156d 100644 --- a/gs/src/gxcllzw.c +++ b/gs/src/gxcllzw.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* LZW filter initialization for RAM-based band lists */ #include "std.h" #include "gstypes.h" diff --git a/gs/src/gxclmem.c b/gs/src/gxclmem.c index ed85beb67..d05879f34 100644 --- a/gs/src/gxclmem.c +++ b/gs/src/gxclmem.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* RAM-based command list implementation */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gxclmem.h b/gs/src/gxclmem.h index 38283d291..d8f213980 100644 --- a/gs/src/gxclmem.h +++ b/gs/src/gxclmem.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions and declarations for clist implementation in memory. */ #ifndef gxclmem_INCLUDED diff --git a/gs/src/gxclpage.c b/gs/src/gxclpage.c index d5131b20d..f49e9703e 100644 --- a/gs/src/gxclpage.c +++ b/gs/src/gxclpage.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Page object management */ #include "gdevprn.h" #include "gxcldev.h" diff --git a/gs/src/gxclpage.h b/gs/src/gxclpage.h index 4a12d1427..aac6551d1 100644 --- a/gs/src/gxclpage.h +++ b/gs/src/gxclpage.h @@ -1,22 +1,10 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Command list procedures for saved pages */ /* Requires gdevprn.h, gxclist.h */ #ifndef gxclpage_INCLUDED diff --git a/gs/src/gxclpath.c b/gs/src/gxclpath.c index af5eaf0bc..7bc54fc1e 100644 --- a/gs/src/gxclpath.c +++ b/gs/src/gxclpath.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Higher-level path operations for band lists */ #include "math_.h" #include "memory_.h" @@ -130,10 +117,10 @@ cmd_put_drawing_color(gx_device_clist_writer * cldev, gx_clist_state * pcls, color0 == gx_no_color_index ? cldev->color_info.depth : 1); - if (tile->id == gx_no_bitmap_id ) - return_error(-1); /* can't cache */ + if (tile->id == gx_no_bitmap_id) + return_error(-1); /* can't cache tile */ if ((code = clist_change_tile(cldev, pcls, tile, depth)) < 0) - return code; /* caching of tile unsuccesful */ + return code; } if (color1 != pcls->tile_colors[1] || color0 != pcls->tile_colors[0] @@ -196,7 +183,7 @@ cmd_put_drawing_color(gx_device_clist_writer * cldev, gx_clist_state * pcls, memcpy(dp + 1, buf, bp - buf); type = cmd_dc_type_color; } else - return_error(-1); + return_error(-1); /* the color type was not known - unknown error */ /* Any non-pure color will require the phase. */ { int px = pdcolor->phase.x, py = pdcolor->phase.y; @@ -465,34 +452,35 @@ cmd_write_unknown(gx_device_clist_writer * cldev, gx_clist_state * pcls, if (unknown & color_space_known) { byte *dp; - if (cldev->color_space & 8) { /* indexed */ - uint num_values = (cldev->indexed_params.hival + 1) * + if (cldev->color_space.byte1 & 8) { /* indexed */ + const gs_color_space *pcs = cldev->color_space.space; + int hival = pcs->params.indexed.hival; + uint num_values = (hival + 1) * gs_color_space_num_components( - (const gs_color_space *)&cldev->indexed_params.base_space); - bool use_proc = cldev->color_space & 4; + (const gs_color_space *)&pcs->params.indexed.base_space); + bool use_proc = cldev->color_space.byte1 & 4; const void *map_data; uint map_size; if (use_proc) { - map_data = cldev->indexed_params.lookup.map->values; + map_data = pcs->params.indexed.lookup.map->values; map_size = num_values * - sizeof(cldev->indexed_params.lookup.map->values[0]); + sizeof(pcs->params.indexed.lookup.map->values[0]); } else { - map_data = cldev->indexed_params.lookup.table.data; + map_data = pcs->params.indexed.lookup.table.data; map_size = num_values; } code = set_cmd_put_op(dp, cldev, pcls, cmd_opv_set_color_space, - 2 + cmd_sizew(cldev->indexed_params.hival) + map_size); + 2 + cmd_sizew(hival) + map_size); if (code < 0) return code; - memcpy(cmd_put_w(cldev->indexed_params.hival, dp + 2), - map_data, map_size); + memcpy(cmd_put_w(hival, dp + 2), map_data, map_size); } else { code = set_cmd_put_op(dp, cldev, pcls, cmd_opv_set_color_space, 2); if (code < 0) return code; } - dp[1] = cldev->color_space; + dp[1] = cldev->color_space.byte1; pcls->known |= color_space_known; } return 0; @@ -734,15 +722,18 @@ clist_stroke_path(gx_device * dev, const gs_imager_state * pis, gx_path * ppath, * outside the clipping region, because that would throw off * the pattern. */ - if (pattern_size == 0) - ymin = int2fixed(max(y - adjust_y, y0)), - ymax = int2fixed(min(y + height + adjust_y, y1)); - else - ymin = min_fixed, - ymax = max_fixed; + if (pattern_size == 0) { + fixed expand = adjust_y + expansion.y; + + ymin = int2fixed(max(y - expand, y0)); + ymax = int2fixed(min(y + height + expand, y1)); + } else { + ymin = min_fixed; + ymax = max_fixed; + } code = cmd_put_path(cdev, pcls, ppath, ymin, ymax, cmd_opv_stroke + code, /* cmd_dc_type */ - false, (segment_notes) ~ 0); + false, (segment_notes)~0); if (code < 0) return code; } @@ -1302,7 +1293,8 @@ cmd_put_path(gx_device_clist_writer * cldev, gx_clist_state * pcls, ((prev.A == 0 && A == prev.E && C == prev.C && E == prev.A && B == -prev.F && D == -prev.D && F == -prev.B) || - (A == -prev.E && C == -prev.C && E == -prev.A && + (prev.A != 0 && + A == -prev.E && C == -prev.C && E == -prev.A && B == prev.F && D == prev.D && F == prev.B)) ) op = cmd_opv_scurveto; diff --git a/gs/src/gxclpath.h b/gs/src/gxclpath.h index f65fce476..90ae5d96f 100644 --- a/gs/src/gxclpath.h +++ b/gs/src/gxclpath.h @@ -1,22 +1,10 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions and support procedures for higher-level band list commands */ /* Extends (requires) gxcldev.h */ #ifndef gxclpath_INCLUDED diff --git a/gs/src/gxclrast.c b/gs/src/gxclrast.c index 30cb75ae8..41edbfcd4 100644 --- a/gs/src/gxclrast.c +++ b/gs/src/gxclrast.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Command list interpreter/rasterizer */ #include "memory_.h" #include "gx.h" @@ -2515,10 +2502,10 @@ vhc: E = B + D, F = D = A + C, C = B, B = A, A = 0; /* See gxclpath.h for details on the following. */ if (A == 0) { - /* Previous curve was vh */ + /* Previous curve was vh or vv */ A = E - C, B = D - F, C = C - a, D = b - D, E = a, F = -b; } else { - /* Previous curve was hv */ + /* Previous curve was hv or hh */ A = C - E, B = F - D, C = a - C, D = D - b, E = -a, F = b; } } diff --git a/gs/src/gxclread.c b/gs/src/gxclread.c index 3eeaddc88..52033a502 100644 --- a/gs/src/gxclread.c +++ b/gs/src/gxclread.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Command list reading for Ghostscript. */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gxclrect.c b/gs/src/gxclrect.c index 723c51e76..0cf0a71c7 100644 --- a/gs/src/gxclrect.c +++ b/gs/src/gxclrect.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Rectangle-oriented command writing for command list */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gxclutil.c b/gs/src/gxclutil.c index 5f7b4e1e1..328caa5e3 100644 --- a/gs/src/gxclutil.c +++ b/gs/src/gxclutil.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Command list writing utilities. */ #include "memory_.h" diff --git a/gs/src/gxclzlib.c b/gs/src/gxclzlib.c index 3252f3af4..eb44b8077 100644 --- a/gs/src/gxclzlib.c +++ b/gs/src/gxclzlib.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* zlib filter initialization for RAM-based band lists */ /* Must be compiled with -I$(ZSRCDIR) */ #include "std.h" diff --git a/gs/src/gxcmap.c b/gs/src/gxcmap.c index a22a08555..6bf1d1cd7 100644 --- a/gs/src/gxcmap.c +++ b/gs/src/gxcmap.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Color mapping for Ghostscript */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gxcmap.h b/gs/src/gxcmap.h index cd66c2cf4..2f3c9b8b1 100644 --- a/gs/src/gxcmap.h +++ b/gs/src/gxcmap.h @@ -1,22 +1,10 @@ /* Copyright (C) 1989, 1995, 1996, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Color mapping procedures */ /* Requires gxdcolor.h. */ #ifndef gxcmap_INCLUDED diff --git a/gs/src/gxcolor2.h b/gs/src/gxcolor2.h index 668a82631..1d9cd73b5 100644 --- a/gs/src/gxcolor2.h +++ b/gs/src/gxcolor2.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal definitions for Level 2 color routines */ /* Requires gsstruct.h, gxfixed.h */ diff --git a/gs/src/gxcomp.h b/gs/src/gxcomp.h index 9f142ef5e..c784fbf13 100644 --- a/gs/src/gxcomp.h +++ b/gs/src/gxcomp.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for implementing compositing functions */ #ifndef gxcomp_INCLUDED diff --git a/gs/src/gxcoord.h b/gs/src/gxcoord.h index 6e22820f6..7b4c02c89 100644 --- a/gs/src/gxcoord.h +++ b/gs/src/gxcoord.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Internal graphics state CTM procedures */ /* Requires gxmatrix.h and gzstate.h */ #ifndef gxcoord_INCLUDED diff --git a/gs/src/gxcpath.c b/gs/src/gxcpath.c index 591099631..4223807eb 100644 --- a/gs/src/gxcpath.c +++ b/gs/src/gxcpath.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Implementation of clipping paths, other than actual clipping */ #include "gx.h" #include "gserrors.h" @@ -515,9 +502,9 @@ gx_cpath_intersect(gx_clip_path *pcpath, /*const*/ gx_path *ppath_orig, /* Use the user space origin (arbitrarily). */ new_box.p.x = float2fixed(pis->ctm.tx); new_box.p.y = float2fixed(pis->ctm.ty); - changed = true; } new_box.q = new_box.p; + changed = true; } else { /* Intersect the two rectangles if necessary. */ if (old_box.p.x > new_box.p.x) @@ -529,10 +516,8 @@ gx_cpath_intersect(gx_clip_path *pcpath, /*const*/ gx_path *ppath_orig, if (old_box.q.y < new_box.q.y) new_box.q.y = old_box.q.y, changed = true; /* Check for a degenerate rectangle. */ - if (new_box.q.x < new_box.p.x) - new_box.q.x = new_box.p.x; - if (new_box.q.y < new_box.p.y) - new_box.q.y = new_box.p.y; + if (new_box.q.x < new_box.p.x || new_box.q.y < new_box.p.y) + new_box.p = new_box.q, changed = true; } if (changed) { /* Defer constructing the path. */ @@ -637,8 +622,13 @@ gx_clip_list_from_rectangle(register gx_clip_list * clp, } clp->single.xmin = clp->xmin = fixed2int_var(rp->p.x); clp->single.ymin = fixed2int_var(rp->p.y); - clp->single.xmax = clp->xmax = fixed2int_var_ceiling(rp->q.x); - clp->single.ymax = fixed2int_var_ceiling(rp->q.y); + /* Handle degenerate rectangles specially. */ + clp->single.xmax = clp->xmax = + (rp->q.x == rp->p.x ? clp->single.xmin : + fixed2int_var_ceiling(rp->q.x)); + clp->single.ymax = + (rp->q.y == rp->p.y ? clp->single.ymin : + fixed2int_var_ceiling(rp->q.y)); clp->count = 1; } diff --git a/gs/src/gxcpath.h b/gs/src/gxcpath.h index c18059bc4..ed824c59a 100644 --- a/gs/src/gxcpath.h +++ b/gs/src/gxcpath.h @@ -1,22 +1,10 @@ /* Copyright (C) 1991, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for clipping lists and devices */ /* Requires gxdevice.h */ #ifndef gxcpath_INCLUDED diff --git a/gs/src/gxcspace.h b/gs/src/gxcspace.h index c261466d2..2705bd911 100644 --- a/gs/src/gxcspace.h +++ b/gs/src/gxcspace.h @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Implementation of color spaces */ /* Requires gsstruct.h */ diff --git a/gs/src/gxctable.c b/gs/src/gxctable.c index be792ea10..0e1423dbf 100644 --- a/gs/src/gxctable.c +++ b/gs/src/gxctable.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Color table lookup and interpolation */ #include "gx.h" #include "gxfixed.h" diff --git a/gs/src/gxctable.h b/gs/src/gxctable.h index 0bf19a05b..2c13a389b 100644 --- a/gs/src/gxctable.h +++ b/gs/src/gxctable.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to color table lookup and interpolation */ #ifndef gxctable_INCLUDED diff --git a/gs/src/gxcvalue.h b/gs/src/gxcvalue.h index b885c2b4d..0b1c6ce84 100644 --- a/gs/src/gxcvalue.h +++ b/gs/src/gxcvalue.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definition of device color values */ #ifndef gxcvalue_INCLUDED diff --git a/gs/src/gxdcconv.c b/gs/src/gxdcconv.c index 41ea0d5f3..966e450ef 100644 --- a/gs/src/gxdcconv.c +++ b/gs/src/gxdcconv.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Conversion between device color spaces for Ghostscript */ #include "gx.h" #include "gsdcolor.h" /* for gxcmap.h */ diff --git a/gs/src/gxdcconv.h b/gs/src/gxdcconv.h index 9b4dbdadb..f6287f19c 100644 --- a/gs/src/gxdcconv.h +++ b/gs/src/gxdcconv.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal device color conversion interfaces */ #ifndef gxdcconv_INCLUDED diff --git a/gs/src/gxdcolor.c b/gs/src/gxdcolor.c index 1d1c4fa06..09c1840c7 100644 --- a/gs/src/gxdcolor.c +++ b/gs/src/gxdcolor.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Pure and null device color implementation */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gxdcolor.h b/gs/src/gxdcolor.h index b581d7069..84d6962b9 100644 --- a/gs/src/gxdcolor.h +++ b/gs/src/gxdcolor.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Device color representation for Ghostscript */ #ifndef gxdcolor_INCLUDED diff --git a/gs/src/gxdda.h b/gs/src/gxdda.h index 52269acd2..41881149f 100644 --- a/gs/src/gxdda.h +++ b/gs/src/gxdda.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for DDAs */ /* Requires gxfixed.h */ #ifndef gxdda_INCLUDED diff --git a/gs/src/gxdevbuf.h b/gs/src/gxdevbuf.h index 52afa68a9..7399226ac 100644 --- a/gs/src/gxdevbuf.h +++ b/gs/src/gxdevbuf.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for device buffer management */ #ifndef gxdevbuf_INCLUDED diff --git a/gs/src/gxdevcli.h b/gs/src/gxdevcli.h index 0ab6f07fa..4c6b8dadf 100644 --- a/gs/src/gxdevcli.h +++ b/gs/src/gxdevcli.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for device clients */ #ifndef gxdevcli_INCLUDED diff --git a/gs/src/gxdevice.h b/gs/src/gxdevice.h index 013a9be49..0d0385c9b 100644 --- a/gs/src/gxdevice.h +++ b/gs/src/gxdevice.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for device implementors */ #ifndef gxdevice_INCLUDED diff --git a/gs/src/gxdevmem.h b/gs/src/gxdevmem.h index fdd6955d1..0ec93bf29 100644 --- a/gs/src/gxdevmem.h +++ b/gs/src/gxdevmem.h @@ -1,22 +1,10 @@ /* Copyright (C) 1989, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Structure and procedures for memory devices */ /* Requires gxdevice.h */ #ifndef gxdevmem_INCLUDED diff --git a/gs/src/gxdevrop.h b/gs/src/gxdevrop.h index fe8b90f63..7b3f3ae79 100644 --- a/gs/src/gxdevrop.h +++ b/gs/src/gxdevrop.h @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Extension of gxdevice.h for RasterOp */ #ifndef gxdevrop_INCLUDED diff --git a/gs/src/gxdht.h b/gs/src/gxdht.h index 168b533f3..182475542 100644 --- a/gs/src/gxdht.h +++ b/gs/src/gxdht.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definition of device halftones */ #ifndef gxdht_INCLUDED diff --git a/gs/src/gxdhtres.h b/gs/src/gxdhtres.h index f66f52823..1e6ceda51 100644 --- a/gs/src/gxdhtres.h +++ b/gs/src/gxdhtres.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for precompiled halftone resources */ #ifndef gxdhtres_INCLUDED diff --git a/gs/src/gxdither.c b/gs/src/gxdither.c index ee2300130..f50b61afe 100644 --- a/gs/src/gxdither.c +++ b/gs/src/gxdither.c @@ -1,22 +1,9 @@ -/* Copyright (C) 1989, 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. +/* Copyright (C) 1989, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ #include "gx.h" #include "gsstruct.h" #include "gsdcolor.h" @@ -27,6 +14,8 @@ #include "gzht.h" /* + * Binary halftoning algorithms. + * * The procedures in this file use halftoning (if necessary) * to implement a given device color that has already gone through * the transfer function. There are two major cases: gray and color. @@ -314,12 +303,11 @@ gx_render_device_color(frac red, frac green, frac blue, frac white, bool cmyk, /* Dithering is required. Choose between two algorithms. */ - if (pdht->components != 0 && dev->color_info.depth >= 4) { - /* Someone went to the trouble of setting different */ - /* screens for the different components. */ + if (dev->color_info.num_components >= 4) { + /* This is a CMYK device. */ /* Use the slow, general colored halftone algorithm. */ #define RGB_REM(rem_v, i)\ - (rem_v * (ulong)(pdht->components[pdht->color_indices[i]].corder.num_levels) / frac_1) + (rem_v * (ulong)(pdht->components ? pdht->components[pdht->color_indices[i]].corder.num_levels : num_levels) / frac_1) uint lr = RGB_REM(rem_r, 0), lg = RGB_REM(rem_g, 1), lb = RGB_REM(rem_b, 2); @@ -376,7 +364,7 @@ gx_render_device_color(frac red, frac green, frac blue, frac white, bool cmyk, if (cmyk) { if (rem_w > half) rem_w = frac_1 - rem_w, - adjust_w = -1, b++, lum_invert += lum_white_weight * 2; + adjust_w = -1, w++, lum_invert += lum_white_weight * 2; else adjust_w = 1; vw = fractional_color(w, max_value); diff --git a/gs/src/gxdither.h b/gs/src/gxdither.h index 145c6b331..dedc1696b 100644 --- a/gs/src/gxdither.h +++ b/gs/src/gxdither.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to gxdither.c */ #ifndef gxdither_INCLUDED diff --git a/gs/src/gxfarith.h b/gs/src/gxfarith.h index 1c7edeaf8..fa4371f2e 100644 --- a/gs/src/gxfarith.h +++ b/gs/src/gxfarith.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Floating point arithmetic macros for Ghostscript library */ #ifndef gxfarith_INCLUDED diff --git a/gs/src/gxfcache.h b/gs/src/gxfcache.h index bd0517f33..57d9b1cff 100644 --- a/gs/src/gxfcache.h +++ b/gs/src/gxfcache.h @@ -1,22 +1,10 @@ /* Copyright (C) 1992, 1995, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Font and character cache definitions and procedures */ /* Requires gsfont.h */ #ifndef gxfcache_INCLUDED diff --git a/gs/src/gxfcmap.h b/gs/src/gxfcmap.h index 5154da9eb..7eff59846 100644 --- a/gs/src/gxfcmap.h +++ b/gs/src/gxfcmap.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal CMap data definition */ /* This file should be called gxcmap.h, except that name is already used. */ diff --git a/gs/src/gxfill.c b/gs/src/gxfill.c index 09f8aff43..bd99cac7a 100644 --- a/gs/src/gxfill.c +++ b/gs/src/gxfill.c @@ -1,24 +1,10 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Lower-level path filling procedures */ -#include "math_.h" /* for floor in fixed_mult_quo */ #include "gx.h" #include "gserrors.h" #include "gsstruct.h" @@ -45,17 +31,34 @@ struct active_line_s { #define al_dx(alp) ((alp)->diff.x) #define al_dy(alp) ((alp)->diff.y) fixed y_fast_max; /* can do x_at_y in fixed point */ - /* if y <= y_fast_max */ + /* if y <= y_fast_max */ + fixed num_adjust; /* 0 if diff.x >= 0, -diff.y + epsilon if */ + /* diff.x < 0 and division truncates */ +#if ARCH_DIV_NEG_POS_TRUNCATES + /* neg/pos truncates, we must bias the numberator. */ +# define SET_NUM_ADJUST(alp) \ + (alp)->num_adjust =\ + ((alp)->diff.x >= 0 ? 0 : -(alp)->diff.y + fixed_epsilon) +# define ADD_NUM_ADJUST(num, alp) ((num) + (alp)->num_adjust) +#else + /* neg/pos takes the floor, no special action is needed. */ +# define SET_NUM_ADJUST(alp) DO_NOTHING +# define ADD_NUM_ADJUST(num, alp) (num) +#endif #define set_al_points(alp, startp, endp)\ - (alp)->diff.x = (endp).x - (startp).x,\ - (alp)->y_fast_max = max_fixed /\ - (((alp)->diff.x >= 0 ? (alp)->diff.x : -(alp)->diff.x) | 1) + (startp).y,\ - (alp)->diff.y = (endp).y - (startp).y,\ - (alp)->start = startp, (alp)->end = endp + BEGIN\ + (alp)->diff.y = (endp).y - (startp).y;\ + (alp)->diff.x = (endp).x - (startp).x;\ + SET_NUM_ADJUST(alp);\ + (alp)->y_fast_max = max_fixed /\ + (((alp)->diff.x >= 0 ? (alp)->diff.x : -(alp)->diff.x) | 1) +\ + (startp).y;\ + (alp)->start = startp, (alp)->end = endp;\ + END #define al_x_at_y(alp, yv)\ ((yv) == (alp)->end.y ? (alp)->end.x :\ ((yv) <= (alp)->y_fast_max ?\ - ((yv) - (alp)->start.y) * al_dx(alp) / al_dy(alp) :\ + ADD_NUM_ADJUST(((yv) - (alp)->start.y) * al_dx(alp), alp) / al_dy(alp) :\ (INCR_EXPR(slow_x),\ fixed_mult_quo(al_dx(alp), (yv) - (alp)->start.y, al_dy(alp)))) +\ (alp)->start.x) @@ -190,8 +193,9 @@ private fill_loop_proc(fill_loop_by_trapezoids); #ifdef DEBUG struct stats_fill_s { long - fill, fill_alloc, y_up, y_down, horiz, x_step, slow_x, iter, find_y, - band, band_step, band_fill, afill, slant, slant_shallow, sfill; + fill, fill_alloc, y_up, y_down, horiz, x_step, slow_x, iter, find_y, + band, band_step, band_fill, afill, slant, slant_shallow, sfill, + mq_cross; } stats_fill; # define INCR(x) (++(stats_fill.x)) @@ -228,14 +232,20 @@ struct stats_fill_s { void gx_adjust_if_empty(const gs_fixed_rect * pbox, gs_fixed_point * adjust) { + /* + * For extremely large coordinates, the obvious subtractions could + * overflow. We can work around this easily by noting that since + * we know q.{x,y} >= p.{x,y}, the subtraction overflows iff the + * result is negative. + */ const fixed dx = pbox->q.x - pbox->p.x, dy = pbox->q.y - pbox->p.y; - if (dx < fixed_half && dy >= int2fixed(2)) { + if (dx < fixed_half && dx > 0 && (dy >= int2fixed(2) || dy < 0)) { adjust->x = arith_rshift_1(fixed_1 + fixed_epsilon - dx); if_debug1('f', "[f]thin adjust_x=%g\n", fixed2float(adjust->x)); - } else if (dy < fixed_half && dx >= int2fixed(2)) { + } else if (dy < fixed_half && dy > 0 && (dx >= int2fixed(2) || dx < 0)) { adjust->y = arith_rshift_1(fixed_1 + fixed_epsilon - dy); if_debug1('f', "[f]thin adjust_y=%g\n", fixed2float(adjust->y)); @@ -1209,7 +1219,7 @@ fill_loop_by_trapezoids(ll_ptr ll, gx_device * dev, y_new = ((dy | dx_old) < 1L << (size_of(fixed) * 4 - 1) ? dy * dx_old / dx_den : - fixed_mult_quo(dy, dx_old, dx_den)) + (INCR_EXPR(mq_cross), fixed_mult_quo(dy, dx_old, dx_den))) + y; /* The crossing value doesn't have to be */ /* very accurate, but it does have to be */ diff --git a/gs/src/gxfixed.h b/gs/src/gxfixed.h index 9d094a11e..8ad9571d4 100644 --- a/gs/src/gxfixed.h +++ b/gs/src/gxfixed.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Fixed-point arithmetic for Ghostscript */ #ifndef gxfixed_INCLUDED diff --git a/gs/src/gxfmap.h b/gs/src/gxfmap.h index 776a9f9ac..c8c01d9ab 100644 --- a/gs/src/gxfmap.h +++ b/gs/src/gxfmap.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Fraction map representation for Ghostscript */ #ifndef gxfmap_INCLUDED diff --git a/gs/src/gxfont.h b/gs/src/gxfont.h index 4f7349da0..5e0a1f632 100644 --- a/gs/src/gxfont.h +++ b/gs/src/gxfont.h @@ -1,22 +1,10 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Font object structure */ /* Requires gsmatrix.h, gxdevice.h */ #ifndef gxfont_INCLUDED @@ -59,6 +47,9 @@ typedef struct gx_path_s gx_path; */ typedef struct gs_font_info_s { int members; + + /* The following members exactly parallel the PDF FontDescriptor flags. */ + #define FONT_INFO_ASCENT 0x0001 int Ascent; #define FONT_INFO_AVG_WIDTH 0x0002 @@ -91,6 +82,18 @@ typedef struct gs_font_info_s { int UnderlineThickness; #define FONT_INFO_X_HEIGHT 0x00100000 int XHeight; + + /* The following members do NOT appear in the PDF FontDescriptor. */ + +#define FONT_INFO_COPYRIGHT 0x0040 + gs_const_string Copyright; +#define FONT_INFO_NOTICE 0x0080 + gs_const_string Notice; +#define FONT_INFO_FAMILY_NAME 0x1000 + gs_const_string FamilyName; +#define FONT_INFO_FULL_NAME 0x2000 + gs_const_string FullName; + } gs_font_info_t; /* @@ -150,6 +153,22 @@ typedef struct gs_font_procs_s { gs_font_info_t *info)) font_proc_font_info((*font_info)); + /* + * Determine whether this font is the "same as" another font in the ways + * specified by the mask. The returned value is a subset of the mask. + * This procedure is allowed to be conservative (return false in cases + * of uncertainty). Note that this procedure does not test the UniqueID + * or FontMatrix. + */ + +#define FONT_SAME_OUTLINES 1 +#define FONT_SAME_METRICS 2 +#define FONT_SAME_ENCODING 4 + +#define font_proc_same_font(proc)\ + int proc(P3(const gs_font *font, const gs_font *ofont, int mask)) + font_proc_same_font((*same_font)); + /* ------ Glyph-level procedures ------ */ /* Map a character code to a glyph. Some PostScript fonts use both @@ -252,6 +271,8 @@ font_proc_define_font(gs_no_define_font); font_proc_make_font(gs_no_make_font); font_proc_make_font(gs_base_make_font); font_proc_font_info(gs_default_font_info); +font_proc_same_font(gs_default_same_font); +font_proc_same_font(gs_base_same_font); /* Default glyph-level font procedures in gsfont.c */ font_proc_encode_char(gs_no_encode_char); font_proc_enumerate_glyph(gs_no_enumerate_glyph); @@ -285,6 +306,7 @@ typedef struct gs_font_name_s { /* scaled font cache */\ gs_memory_t *memory; /* allocator for this font */\ gs_font_dir *dir; /* directory where registered */\ + bool is_resource;\ gs_notify_list_t notify_list; /* clients to notify when freeing */\ gs_id id; /* internal ID (no relation to UID) */\ gs_font *base; /* original (unscaled) base font */\ diff --git a/gs/src/gxfont0.h b/gs/src/gxfont0.h index 501dcedde..4d5707ab3 100644 --- a/gs/src/gxfont0.h +++ b/gs/src/gxfont0.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 0 (composite) font data definition */ #ifndef gxfont0_INCLUDED diff --git a/gs/src/gxfont1.h b/gs/src/gxfont1.h index 0382f6c91..0f72448bd 100644 --- a/gs/src/gxfont1.h +++ b/gs/src/gxfont1.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 1 / Type 2 font data definition */ #ifndef gxfont1_INCLUDED @@ -147,4 +134,7 @@ extern_st(st_gs_font_type1); "gs_font_type1", font_type1_enum_ptrs, font_type1_reloc_ptrs,\ gs_font_finalize, st_gs_font_base, data.proc_data) +/* Export font procedures so they can be called from the interpreter. */ +font_proc_glyph_info(gs_type1_glyph_info); + #endif /* gxfont1_INCLUDED */ diff --git a/gs/src/gxfont42.h b/gs/src/gxfont42.h index 82878a4bf..18372619d 100644 --- a/gs/src/gxfont42.h +++ b/gs/src/gxfont42.h @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 42 font data definition */ #ifndef gxfont42_INCLUDED diff --git a/gs/src/gxfrac.h b/gs/src/gxfrac.h index 0ae7dcd70..cb479312a 100644 --- a/gs/src/gxfrac.h +++ b/gs/src/gxfrac.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Fraction representation for Ghostscript */ #ifndef gxfrac_INCLUDED diff --git a/gs/src/gxftype.h b/gs/src/gxftype.h index 1aa55e5cf..1daadc88a 100644 --- a/gs/src/gxftype.h +++ b/gs/src/gxftype.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definition of font type and bitmap font behavior */ #ifndef gxftype_INCLUDED diff --git a/gs/src/gxfunc.h b/gs/src/gxfunc.h index ed3c3c526..93aece6fe 100644 --- a/gs/src/gxfunc.h +++ b/gs/src/gxfunc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal definitions for Functions */ #ifndef gxfunc_INCLUDED diff --git a/gs/src/gxgetbit.h b/gs/src/gxgetbit.h index 497864645..cc8b918bd 100644 --- a/gs/src/gxgetbit.h +++ b/gs/src/gxgetbit.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface for get_bits_rectangle driver procedure */ #ifndef gxgetbit_INCLUDED diff --git a/gs/src/gxhint1.c b/gs/src/gxhint1.c index 26a462afa..c48c211e3 100644 --- a/gs/src/gxhint1.c +++ b/gs/src/gxhint1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1992, 1993, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Font level hints for Type 1 fonts */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gxhint2.c b/gs/src/gxhint2.c index f27c4233d..8d0a23237 100644 --- a/gs/src/gxhint2.c +++ b/gs/src/gxhint2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Character level hints for Type 1 fonts. */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gxhint3.c b/gs/src/gxhint3.c index 1c4bf2632..413185b76 100644 --- a/gs/src/gxhint3.c +++ b/gs/src/gxhint3.c @@ -1,24 +1,10 @@ -/* Copyright (C) 1994, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. +/* Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Apply hints for Type 1 fonts. */ -#include "math_.h" /* for floor in fixed_mult_quo */ #include "gx.h" #include "gserrors.h" #include "gxarith.h" @@ -56,8 +42,11 @@ private void #define HINT_HORZ_LOWER 4 #define HINT_HORZ_UPPER 8 /* must be > lower */ #define HINT_HORZ (HINT_HORZ_LOWER | HINT_HORZ_UPPER) -#define NEARLY_AXIAL(dmajor, dminor)\ - ((dminor) <= (dmajor) >> 4) +private inline bool +nearly_axial(fixed dmajor, fixed dminor) +{ + return (dminor <= dmajor >> 4); +} /* * Determine which types of hints, if any, are applicable to a given @@ -105,11 +94,11 @@ line_hints(const gs_type1_state * pcis, const gs_fixed_point * p0, * Note that since upper/lower refer to device space, we must * interchange them if the corresponding axis is inverted. */ - if (dy != 0 && NEARLY_AXIAL(ady, adx)) { + if (dy != 0 && nearly_axial(ady, adx)) { hints = (dy > 0 ? HINT_VERT_UPPER : HINT_VERT_LOWER); if (xi) hints ^= (HINT_VERT_LOWER | HINT_VERT_UPPER); - } else if (dx != 0 && NEARLY_AXIAL(adx, ady)) { + } else if (dx != 0 && nearly_axial(adx, ady)) { hints = (dx < 0 ? HINT_HORZ_UPPER : HINT_HORZ_LOWER); if (yi) hints ^= (HINT_HORZ_LOWER | HINT_HORZ_UPPER); @@ -213,11 +202,11 @@ adjust_curve_start(curve_segment * pcseg, const gs_fixed_point * pdiff) fixed lx = end_x - (prev->pt.x - dx), ly = end_y - (prev->pt.y - dy); gs_fixed_point delta; - delta.x = scale_delta(end_x - pcseg->p1.x, dx, lx, true); - delta.y = scale_delta(end_y - pcseg->p1.y, dy, ly, true); + delta.x = scale_delta(dx, end_x - pcseg->p1.x, lx, true); + delta.y = scale_delta(dy, end_y - pcseg->p1.y, ly, true); add_hint_diff(&pcseg->p1, delta); - delta.x = scale_delta(end_x - pcseg->p2.x, dx, lx, false); - delta.y = scale_delta(end_y - pcseg->p2.y, dy, ly, false); + delta.x = scale_delta(dx, end_x - pcseg->p2.x, lx, false); + delta.y = scale_delta(dy, end_y - pcseg->p2.y, ly, false); add_hint_diff(&pcseg->p2, delta); } private void @@ -229,11 +218,11 @@ adjust_curve_end(curve_segment * pcseg, const gs_fixed_point * pdiff) fixed lx = pcseg->pt.x - dx - start_x, ly = pcseg->pt.y - dy - start_y; gs_fixed_point delta; - delta.x = scale_delta(pcseg->p1.x - start_x, dx, lx, false); - delta.y = scale_delta(pcseg->p1.y - start_y, dy, ly, false); + delta.x = scale_delta(dx, pcseg->p1.x - start_x, lx, false); + delta.y = scale_delta(dy, pcseg->p1.y - start_y, ly, false); add_hint_diff(&pcseg->p1, delta); - delta.x = scale_delta(pcseg->p2.x - start_x, dx, lx, true); - delta.y = scale_delta(pcseg->p2.y - start_y, dy, ly, true); + delta.x = scale_delta(dx, pcseg->p2.x - start_x, lx, true); + delta.y = scale_delta(dy, pcseg->p2.y - start_y, ly, true); add_hint_diff(&pcseg->p2, delta); } diff --git a/gs/src/gxht.c b/gs/src/gxht.c index a06ae3fbd..f99619b4e 100644 --- a/gs/src/gxht.c +++ b/gs/src/gxht.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Halftone rendering for imaging library */ #include "memory_.h" #include "gx.h" @@ -435,6 +422,8 @@ gx_ht_init_cache(gx_ht_cache * pcache, const gx_ht_order * porder) } pcache->base_id = gs_next_ids(porder->num_levels + 1); pcache->order = *porder; + /* The transfer function is irrelevant, and might become dangling. */ + pcache->order.transfer = 0; pcache->num_cached = num_cached; pcache->levels_per_tile = (size + num_cached - 1) / num_cached; pcache->tiles_fit = -1; diff --git a/gs/src/gxht.h b/gs/src/gxht.h index 8b170b5a7..e1297095a 100644 --- a/gs/src/gxht.h +++ b/gs/src/gxht.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Rest of (client) halftone definitions */ #ifndef gxht_INCLUDED diff --git a/gs/src/gxhtbit.c b/gs/src/gxhtbit.c index a3ba9aa73..df8794344 100644 --- a/gs/src/gxhtbit.c +++ b/gs/src/gxhtbit.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Halftone bit updating for imaging library */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gxhttile.h b/gs/src/gxhttile.h index eb9cc627c..6c911e469 100644 --- a/gs/src/gxhttile.h +++ b/gs/src/gxhttile.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Halftone tile definition */ /* Requires gxbitmap.h */ diff --git a/gs/src/gxhttype.h b/gs/src/gxhttype.h index 369b57513..510a5ca35 100644 --- a/gs/src/gxhttype.h +++ b/gs/src/gxhttype.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Client halftone type enumeration */ #ifndef gxhttype_INCLUDED diff --git a/gs/src/gxi12bit.c b/gs/src/gxi12bit.c index 9420609a7..627814fd0 100644 --- a/gs/src/gxi12bit.c +++ b/gs/src/gxi12bit.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* 12-bit image procedures */ #include "gx.h" #include "memory_.h" diff --git a/gs/src/gxiclass.h b/gs/src/gxiclass.h index da0921038..ca50e280a 100644 --- a/gs/src/gxiclass.h +++ b/gs/src/gxiclass.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Define image rendering algorithm classes */ #ifndef gxiclass_INCLUDED diff --git a/gs/src/gxicolor.c b/gs/src/gxicolor.c index a1ca0bb35..3fd088483 100644 --- a/gs/src/gxicolor.c +++ b/gs/src/gxicolor.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Color image rendering */ #include "gx.h" #include "memory_.h" diff --git a/gs/src/gxidata.c b/gs/src/gxidata.c index b86fb0e4b..66f0fe690 100644 --- a/gs/src/gxidata.c +++ b/gs/src/gxidata.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic image enumeration and cleanup */ #include "gx.h" #include "memory_.h" @@ -30,6 +17,7 @@ private void repack_bit_planes(P7(const gx_image_plane_t *src_planes, const ulong *offsets, int num_planes, byte *buffer, int width, const sample_lookup_t * ptab, int spread)); +private gx_device *setup_image_device(P1(const gx_image_enum *penum)); /* Process the next piece of an ImageType 1 image. */ int @@ -37,8 +25,8 @@ gx_image1_plane_data(gx_image_enum_common_t * info, const gx_image_plane_t * planes, int height, int *rows_used) { - gx_device *dev = info->dev; gx_image_enum *penum = (gx_image_enum *) info; + gx_device *dev; const int y = penum->y; int y_end = min(y + height, penum->rect.h); int width_spp = penum->rect.w * penum->spp; @@ -58,21 +46,8 @@ gx_image1_plane_data(gx_image_enum_common_t * info, *rows_used = 0; return 0; } + dev = setup_image_device(penum); - /* Set up the clipping and/or RasterOp device if needed. */ - - if (penum->clip_dev) { - gx_device_clip *cdev = penum->clip_dev; - - gx_device_set_target((gx_device_forward *)cdev, dev); - dev = (gx_device *) cdev; - } - if (penum->rop_dev) { - gx_device_rop_texture *rtdev = penum->rop_dev; - - gx_device_set_target((gx_device_forward *)rtdev, dev); - dev = (gx_device *) rtdev; - } /* Now render complete rows. */ if (penum->used.y) { @@ -284,7 +259,8 @@ gx_image1_flush(gx_image_enum_common_t * info) dda_translate(penum->dda.pixel0.x, penum->cur.x - penum->prev.x); dda_translate(penum->dda.pixel0.y, penum->cur.y - penum->prev.y); penum->prev = penum->cur; - return (*penum->render)(penum, NULL, 0, width_spp, 0, penum->dev); + return (*penum->render)(penum, NULL, 0, width_spp, 0, + setup_image_device(penum)); } /* @@ -394,6 +370,27 @@ repack_bit_planes(const gx_image_plane_t *src_planes, const ulong *offsets, } } +/* Set up the device for drawing an image. */ +private gx_device * +setup_image_device(const gx_image_enum *penum) +{ + gx_device *dev = penum->dev; + + if (penum->clip_dev) { + gx_device_clip *cdev = penum->clip_dev; + + gx_device_set_target((gx_device_forward *)cdev, dev); + dev = (gx_device *) cdev; + } + if (penum->rop_dev) { + gx_device_rop_texture *rtdev = penum->rop_dev; + + gx_device_set_target((gx_device_forward *)rtdev, dev); + dev = (gx_device *) rtdev; + } + return dev; +} + /* Clean up by releasing the buffers. */ /* Currently we ignore draw_last. */ int diff --git a/gs/src/gxifast.c b/gs/src/gxifast.c index 504b45a49..a29d92a34 100644 --- a/gs/src/gxifast.c +++ b/gs/src/gxifast.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Fast monochrome image rendering */ #include "gx.h" #include "memory_.h" @@ -672,7 +659,7 @@ image_render_landscape(gx_image_enum * penum, const byte * buffer, int data_x, if (code < 0) return code; - penum->line_xy = ix; + penum->line_xy = penum->xi_next = ix; if (h == 0) return code; } diff --git a/gs/src/gximage.c b/gs/src/gximage.c index 7d2bc4a49..d8cc4e1e0 100644 --- a/gs/src/gximage.c +++ b/gs/src/gximage.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic image support */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gximage.h b/gs/src/gximage.h index aec940503..367d40bbb 100644 --- a/gs/src/gximage.h +++ b/gs/src/gximage.h @@ -1,22 +1,10 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Default image rendering state structure */ /* Requires gxcpath.h, gxdevmem.h, gxdcolor.h, gzpath.h */ #ifndef gximage_INCLUDED diff --git a/gs/src/gximage1.c b/gs/src/gximage1.c index f85a96557..02473f6eb 100644 --- a/gs/src/gximage1.c +++ b/gs/src/gximage1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* ImageType 1 initialization */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gximage2.c b/gs/src/gximage2.c index 661fe27e8..3884697ca 100644 --- a/gs/src/gximage2.c +++ b/gs/src/gximage2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* ImageType 2 image implementation */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/gximage3.c b/gs/src/gximage3.c index b75a6ac91..77c2f5043 100644 --- a/gs/src/gximage3.c +++ b/gs/src/gximage3.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* ImageType 3 image implementation */ #include "math_.h" /* for ceil, floor */ #include "memory_.h" @@ -40,7 +27,6 @@ private image_enum_proc_flush(gx_image3_flush); private image_enum_proc_planes_wanted(gx_image3_planes_wanted); /* GC descriptor */ -extern_st(st_gs_pixel_image); public_st_gs_image3(); /* Define the image type for ImageType 3 images. */ diff --git a/gs/src/gximage4.c b/gs/src/gximage4.c index 8d7bf72a2..5c7aabd1e 100644 --- a/gs/src/gximage4.c +++ b/gs/src/gximage4.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* ImageType 4 image implementation */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gximono.c b/gs/src/gximono.c index 17b4b1c62..27766afed 100644 --- a/gs/src/gximono.c +++ b/gs/src/gximono.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* General mono-component image rendering */ #include "gx.h" #include "memory_.h" diff --git a/gs/src/gxino12b.c b/gs/src/gxino12b.c index 67e800af7..6a645e97d 100644 --- a/gs/src/gxino12b.c +++ b/gs/src/gxino12b.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Dummy 12-bit image procedure */ #include "std.h" #include "gstypes.h" diff --git a/gs/src/gxiodev.h b/gs/src/gxiodev.h index 7ef1c606f..0714b2cbb 100644 --- a/gs/src/gxiodev.h +++ b/gs/src/gxiodev.h @@ -1,22 +1,10 @@ /* Copyright (C) 1993, 1994, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Structure and default implementation of IODvices */ /* Requires gsmemory.h */ #ifndef gxiodev_INCLUDED diff --git a/gs/src/gxiparam.h b/gs/src/gxiparam.h index c1bdf8812..324b45f41 100644 --- a/gs/src/gxiparam.h +++ b/gs/src/gxiparam.h @@ -1,27 +1,15 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for implementors of image types */ #ifndef gxiparam_INCLUDED # define gxiparam_INCLUDED +#include "gsstype.h" /* for extern_st */ #include "gxdevcli.h" /* ---------------- Image types ---------------- */ @@ -215,7 +203,7 @@ struct gx_image_enum_common_s { gx_image_enum_common; }; -/*extern_st(st_gx_image_enum_common); */ +extern_st(st_gx_image_enum_common); #define public_st_gx_image_enum_common() /* in gdevddrw.c */\ gs_public_st_composite(st_gx_image_enum_common, gx_image_enum_common_t,\ "gx_image_enum_common_t",\ diff --git a/gs/src/gxipixel.c b/gs/src/gxipixel.c index cc9690d4c..352516d66 100644 --- a/gs/src/gxipixel.c +++ b/gs/src/gxipixel.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common code for ImageType 1 and 4 initialization */ #include "gx.h" #include "math_.h" diff --git a/gs/src/gxiscale.c b/gs/src/gxiscale.c index 9311eacd5..29c9afed7 100644 --- a/gs/src/gxiscale.c +++ b/gs/src/gxiscale.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interpolated image procedures */ #include "gx.h" #include "math_.h" @@ -75,14 +62,14 @@ gs_image_class_0_interpolate(gx_image_enum * penum) return 0; } /* - * We used to interpolate using a digital filter, rather than Adobe's - * spatial interpolation algorithm: this produced very bad-looking - * results if the input resolution was close to the output resolution, - * especially if the input had low color resolution, and we resorted to + * We interpolate using a digital filter, rather than Adobe's + * spatial interpolation algorithm: this produces very bad-looking + * results if the input resolution is close to the output resolution, + * especially if the input has low color resolution, so we resort to * some hack tests on the input color resolution and scale to suppress - * interpolation if we thought the result would look especially bad. - * If we use Adobe's spatial interpolation approach, we don't need - * to do this. + * interpolation if we think the result would look especially bad. + * If we used Adobe's spatial interpolation approach, we wouldn't need + * to do this, but the spatial interpolation filter doesn't work yet. */ #ifdef USE_MITCHELL_FILTERX if (penum->bps < 4 || penum->bps * penum->spp < 8 || @@ -106,7 +93,10 @@ gs_image_class_0_interpolate(gx_image_enum * penum) if (penum->bps <= 8 && penum->device_color) { iss.BitsPerComponentIn = 8; iss.MaxValueIn = 0xff; - in_size = 0; + in_size = + (penum->matrix.xx < 0 ? + /* We need a buffer for reversing each scan line. */ + iss.WidthIn * iss.Colors : 0); } else { iss.BitsPerComponentIn = sizeof(frac) * 8; iss.MaxValueIn = frac_1; @@ -179,7 +169,20 @@ image_render_interpolate(gx_image_enum * penum, const byte * buffer, if (sizeofPixelIn == 1) { /* Easy case: 8-bit device color values. */ - r.ptr = bdata - 1; + if (penum->matrix.xx >= 0) { + /* Use the input data directly. */ + r.ptr = bdata - 1; + } else { + /* Mirror the data in X. */ + const byte *p = bdata + row_size - c; + byte *q = out; + int i; + + for (i = 0; i < pss->params.WidthIn; p -= c, q += c, ++i) + memcpy(q, p, c); + r.ptr = out - 1; + out = q; + } } else { /* Messy case: concretize each sample. */ int bps = penum->bps; @@ -243,7 +246,7 @@ image_render_interpolate(gx_image_enum * penum, const byte * buffer, int x; const frac *psrc; gx_device_color devc; - int code; + int status, code; DECLARE_LINE_ACCUM_COPY(out, bpp, xo); @@ -251,9 +254,9 @@ image_render_interpolate(gx_image_enum * penum, const byte * buffer, max(c * sizeofPixelOut, sizeof(gx_color_index)) - 1; w.ptr = w.limit - width * c * sizeofPixelOut; psrc = (const frac *)(w.ptr + 1); - code = (*pss->template->process) + status = (*pss->template->process) ((stream_state *) pss, &r, &w, h == 0); - if (code < 0 && code != EOFC) + if (status < 0 && status != EOFC) return_error(gs_error_ioerror); if (w.ptr == w.limit) { int xe = xo + width; @@ -307,7 +310,7 @@ image_render_interpolate(gx_image_enum * penum, const byte * buffer, penum->line_xy++; if_debug0('B', "\n"); } - if ((code == 0 && r.ptr == r.limit) || code == EOFC) + if ((status == 0 && r.ptr == r.limit) || status == EOFC) break; } } diff --git a/gs/src/gxistate.h b/gs/src/gxistate.h index b66ece79e..f0e54cbe7 100644 --- a/gs/src/gxistate.h +++ b/gs/src/gxistate.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Imager state definition */ #ifndef gxistate_INCLUDED diff --git a/gs/src/gxline.h b/gs/src/gxline.h index 03add165c..3a2ac665f 100644 --- a/gs/src/gxline.h +++ b/gs/src/gxline.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Private line parameter definitions */ #ifndef gxline_INCLUDED diff --git a/gs/src/gxlum.h b/gs/src/gxlum.h index 91c11d48e..cbc3d429c 100644 --- a/gs/src/gxlum.h +++ b/gs/src/gxlum.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Luminance computation parameters for Ghostscript */ #ifndef gxlum_INCLUDED diff --git a/gs/src/gxmatrix.h b/gs/src/gxmatrix.h index a9df9fdca..c182242bb 100644 --- a/gs/src/gxmatrix.h +++ b/gs/src/gxmatrix.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal matrix routines for Ghostscript library */ #ifndef gxmatrix_INCLUDED diff --git a/gs/src/gxmclip.c b/gs/src/gxmclip.c index 19db3ef48..429b11366 100644 --- a/gs/src/gxmclip.c +++ b/gs/src/gxmclip.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Mask clipping support */ #include "gx.h" #include "gxdevice.h" diff --git a/gs/src/gxmclip.h b/gs/src/gxmclip.h index bec415002..05083f135 100644 --- a/gs/src/gxmclip.h +++ b/gs/src/gxmclip.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Mask clipping device and interface */ /* Requires gxdevice.h, gxdevmem.h */ diff --git a/gs/src/gxobj.h b/gs/src/gxobj.h index cdffca6a2..e4ee4fbe4 100644 --- a/gs/src/gxobj.h +++ b/gs/src/gxobj.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Memory manager implementation structures for Ghostscript */ #ifndef gxobj_INCLUDED diff --git a/gs/src/gxop1.h b/gs/src/gxop1.h index 1ec2fa267..6d5f37786 100644 --- a/gs/src/gxop1.h +++ b/gs/src/gxop1.h @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1992, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 1 state shared between interpreter and compiled fonts. */ #ifndef gxop1_INCLUDED diff --git a/gs/src/gxp1fill.c b/gs/src/gxp1fill.c index 22a6bcc21..8ed32b47a 100644 --- a/gs/src/gxp1fill.c +++ b/gs/src/gxp1fill.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PatternType 1 filling algorithms */ #include "math_.h" #include "gx.h" diff --git a/gs/src/gxp1impl.h b/gs/src/gxp1impl.h index 8b664f068..c3046e115 100644 --- a/gs/src/gxp1impl.h +++ b/gs/src/gxp1impl.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PatternType 1 implementation interface */ /* Requires gxpcolor.h */ diff --git a/gs/src/gxpageq.c b/gs/src/gxpageq.c index 8888f360d..48e3e28f1 100644 --- a/gs/src/gxpageq.c +++ b/gs/src/gxpageq.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Page queue implementation */ /* Initial version 2/1/98 by John Desrosiers (soho@crl.com) */ diff --git a/gs/src/gxpageq.h b/gs/src/gxpageq.h index 47e5431ce..03027e873 100644 --- a/gs/src/gxpageq.h +++ b/gs/src/gxpageq.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Page queue implementation */ /* Initial version 2/1/98 by John Desrosiers (soho@crl.com) */ diff --git a/gs/src/gxpaint.c b/gs/src/gxpaint.c index a5a85873b..cfc03cc45 100644 --- a/gs/src/gxpaint.c +++ b/gs/src/gxpaint.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Graphics-state-aware fill and stroke procedures */ #include "gx.h" #include "gzstate.h" diff --git a/gs/src/gxpaint.h b/gs/src/gxpaint.h index 8cd467e99..06a73dc87 100644 --- a/gs/src/gxpaint.h +++ b/gs/src/gxpaint.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Internal interface to fill/stroke */ /* Requires gsropt.h, gxfixed.h, gxpath.h */ #ifndef gxpaint_INCLUDED diff --git a/gs/src/gxpath.c b/gs/src/gxpath.c index b8b962277..2b32e8a50 100644 --- a/gs/src/gxpath.c +++ b/gs/src/gxpath.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal path management routines for Ghostscript library */ #include "gx.h" #include "gserrors.h" diff --git a/gs/src/gxpath.h b/gs/src/gxpath.h index 75494dfef..c9a17fd23 100644 --- a/gs/src/gxpath.h +++ b/gs/src/gxpath.h @@ -1,22 +1,10 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Fixed-point path procedures */ /* Requires gxfixed.h */ #ifndef gxpath_INCLUDED diff --git a/gs/src/gxpath2.c b/gs/src/gxpath2.c index 00283d9f6..a0fde33e7 100644 --- a/gs/src/gxpath2.c +++ b/gs/src/gxpath2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Path tracing procedures for Ghostscript library */ #include "math_.h" #include "gx.h" @@ -328,20 +315,14 @@ gx_path_copy_reversed(const gx_path * ppath_old, gx_path * ppath) (pseg == (const segment *)psub ? sn_none : psub->next->notes); segment_notes notes; + int code; if (!psub->is_closed) { - int code = gx_path_add_point(ppath, pseg->pt.x, pseg->pt.y); - + code = gx_path_add_point(ppath, pseg->pt.x, pseg->pt.y); if (code < 0) return code; } - /* - * The odd '1' in the next statement suppresses a "statement not - * reached" warning at the end of the loop from certain compilers. - */ for (; 1; pseg = prev, prev_notes = notes) { - int code; - prev = pseg->prev; notes = pseg->notes; prev_notes = (prev_notes & sn_not_first) | @@ -351,8 +332,7 @@ gx_path_copy_reversed(const gx_path * ppath_old, gx_path * ppath) /* Finished subpath */ if (psub->is_closed) { code = - gx_path_close_subpath_notes(ppath, - prev_notes); + gx_path_close_subpath_notes(ppath, prev_notes); if (code < 0) return code; } @@ -382,9 +362,9 @@ gx_path_copy_reversed(const gx_path * ppath_old, gx_path * ppath) return_error(gs_error_Fatal); } if (code < 0) - return code; + break; } - /* not reached */ + return code; /* only reached if code < 0 */ } #undef sn_not_end /* diff --git a/gs/src/gxpcache.h b/gs/src/gxpcache.h index a144c66c1..7a09cb086 100644 --- a/gs/src/gxpcache.h +++ b/gs/src/gxpcache.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definition of Pattern cache */ #ifndef gxpcache_INCLUDED diff --git a/gs/src/gxpcmap.c b/gs/src/gxpcmap.c index 179b65ba9..2e788293f 100644 --- a/gs/src/gxpcmap.c +++ b/gs/src/gxpcmap.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Pattern color mapping for Ghostscript library */ #include "math_.h" #include "memory_.h" @@ -81,10 +68,8 @@ private const gx_device_pattern_accum gs_pattern_accum_device = {std_device_std_body_open(gx_device_pattern_accum, 0, "pattern accumulator", 0, 0, 72, 72), - { /* - * NOTE: all drawing procedures must be defaulted, - * not forwarded. - */ + { + /* NOTE: all drawing procedures must be defaulted, not forwarded. */ pattern_accum_open, NULL, NULL, @@ -97,7 +82,7 @@ private const gx_device_pattern_accum gs_pattern_accum_device = pattern_accum_copy_mono, pattern_accum_copy_color, NULL, - NULL, + gx_default_get_bits, NULL, NULL, NULL, @@ -336,8 +321,10 @@ pattern_accum_get_bits_rectangle(gx_device * dev, const gs_int_rect * prect, { gx_device_pattern_accum *const padev = (gx_device_pattern_accum *) dev; - return (*dev_proc(padev->target, get_bits_rectangle)) - (padev->target, prect, params, unread); + if (padev->bits) + return (*dev_proc(padev->target, get_bits_rectangle)) + (padev->target, prect, params, unread); + return_error(gs_error_Fatal); /* can't happen */ } /* ------ Color space implementation ------ */ diff --git a/gs/src/gxpcolor.h b/gs/src/gxpcolor.h index 617af17f3..97016aa33 100644 --- a/gs/src/gxpcolor.h +++ b/gs/src/gxpcolor.h @@ -1,22 +1,10 @@ /* Copyright (C) 1993, 1995, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Pattern color and tile structures and procedures */ /* Requires gsmatrix.h, gxcolor2.h, gxdcolor.h */ #ifndef gxpcolor_INCLUDED diff --git a/gs/src/gxpcopy.c b/gs/src/gxpcopy.c index 1cf40ef1f..6cf72003f 100644 --- a/gs/src/gxpcopy.c +++ b/gs/src/gxpcopy.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Path copying and flattening */ #include "math_.h" #include "gx.h" @@ -544,17 +531,24 @@ gx_curve_x_at_y(curve_cursor * prc, fixed y) /* * Compute in fixed point if possible. */ -#define half_fixed_bits ((fixed)1 << (sizeof(fixed) * 4)) - if (yrel < half_fixed_bits) { +#define HALF_FIXED_BITS ((fixed)1 << (sizeof(fixed) * 4)) + if (yrel < HALF_FIXED_BITS) { if (xd >= 0) { - if (xd < half_fixed_bits) - return (ufixed) xd *(ufixed) yrel / (ufixed) yd + xl; + if (xd < HALF_FIXED_BITS) + return (ufixed)xd * (ufixed)yrel / (ufixed)yd + xl; } else { - if (xd > -half_fixed_bits) - return -(fixed) ((ufixed) (-xd) * (ufixed) yrel / (ufixed) yd) + xl; + if (xd > -HALF_FIXED_BITS) { + /* Be careful to take the floor of the result. */ + ufixed num = (ufixed)(-xd) * (ufixed)yrel; + ufixed quo = num / (ufixed)yd; + + if (quo * (ufixed)yd != num) + quo += fixed_epsilon; + return xl - (fixed)quo; + } } } -#undef half_fixed_bits +#undef HALF_FIXED_BITS return fixed_mult_quo(xd, yrel, yd) + xl; } diff --git a/gs/src/gxpdash.c b/gs/src/gxpdash.c index ee9d4b787..8dcbc6ed3 100644 --- a/gs/src/gxpdash.c +++ b/gs/src/gxpdash.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Dash expansion for paths */ #include "math_.h" #include "gx.h" @@ -56,7 +43,7 @@ subpath_expand_dashes(const subpath * psub, gx_path * ppath, const float *pattern = dash->pattern; int count, index; bool ink_on; - double elt_length; + float elt_length; fixed x0 = psub->pt.x, y0 = psub->pt.y; fixed x, y; const segment *pseg; diff --git a/gs/src/gxpflat.c b/gs/src/gxpflat.c index 83ff1a72e..35e97d46c 100644 --- a/gs/src/gxpflat.c +++ b/gs/src/gxpflat.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Path flattening algorithms */ #include "gx.h" #include "gxarith.h" diff --git a/gs/src/gxropc.h b/gs/src/gxropc.h index 23d72e9bf..444e495c1 100644 --- a/gs/src/gxropc.h +++ b/gs/src/gxropc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internals for RasterOp compositing */ #ifndef gxropc_INCLUDED diff --git a/gs/src/gxrplane.h b/gs/src/gxrplane.h index b2304b9f9..114746165 100644 --- a/gs/src/gxrplane.h +++ b/gs/src/gxrplane.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for planar rendering */ #ifndef gxrplane_INCLUDED diff --git a/gs/src/gxsample.c b/gs/src/gxsample.c index 459231313..06701271d 100644 --- a/gs/src/gxsample.c +++ b/gs/src/gxsample.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Sample unpacking procedures */ #include "gx.h" #include "gxsample.h" diff --git a/gs/src/gxsample.h b/gs/src/gxsample.h index 95c87eda3..96419f606 100644 --- a/gs/src/gxsample.h +++ b/gs/src/gxsample.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Sample lookup and expansion */ #ifndef gxsample_INCLUDED diff --git a/gs/src/gxshade.c b/gs/src/gxshade.c index 3b100aeab..c33e6c0b9 100644 --- a/gs/src/gxshade.c +++ b/gs/src/gxshade.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Shading rendering support */ #include "math_.h" #include "gx.h" @@ -30,6 +17,10 @@ #include "gxpaint.h" #include "gxshade.h" +/* Define a maximum smoothness value. */ +/* smoothness > 0.2 produces severely blocky output. */ +#define MAX_SMOOTHNESS 0.2 + /* ================ Packed coordinate streams ================ */ /* Forward references */ @@ -235,7 +226,7 @@ shade_init_fill_state(shading_fill_state_t * pfs, const gs_shading_t * psh, gx_device * dev, gs_imager_state * pis) { const gs_color_space *pcs = psh->params.ColorSpace; - float max_error = pis->smoothness; + float max_error = min(pis->smoothness, MAX_SMOOTHNESS); /* * There's no point in trying to achieve smoothness beyond what * the device can implement, i.e., the number of representable diff --git a/gs/src/gxshade.h b/gs/src/gxshade.h index d041e130c..3776d2392 100644 --- a/gs/src/gxshade.h +++ b/gs/src/gxshade.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal definitions for shading rendering */ #ifndef gxshade_INCLUDED diff --git a/gs/src/gxshade1.c b/gs/src/gxshade1.c index cde0f6c08..af422c8a0 100644 --- a/gs/src/gxshade1.c +++ b/gs/src/gxshade1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Rendering for non-mesh shadings */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/gxshade4.c b/gs/src/gxshade4.c index 56959a32a..b6f371403 100644 --- a/gs/src/gxshade4.c +++ b/gs/src/gxshade4.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Rendering for Gouraud triangle shadings */ #include "memory_.h" #include "gx.h" diff --git a/gs/src/gxshade4.h b/gs/src/gxshade4.h index a11db019f..ff44e331e 100644 --- a/gs/src/gxshade4.h +++ b/gs/src/gxshade4.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal definitions for triangle shading rendering */ #ifndef gxshade4_INCLUDED diff --git a/gs/src/gxshade6.c b/gs/src/gxshade6.c index 5d1a44e53..ba27a59d2 100644 --- a/gs/src/gxshade6.c +++ b/gs/src/gxshade6.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Rendering for Coons and tensor patch shadings */ #include "memory_.h" #include "gx.h" @@ -120,19 +107,23 @@ typedef struct patch_fill_state_s { const gs_function_t *Function; } patch_fill_state_t; -/* Calculate the interpolated color at a given point. */ -/* Note that we must do this twice for bilinear interpolation. */ +/* + * Calculate the interpolated color at a given point. + * Note that we must do this twice for bilinear interpolation. + * We use the name ppcr rather than ppc because an Apple compiler defines + * ppc when compiling on PowerPC systems (!). + */ private void -patch_interpolate_color(patch_color_t * ppc, const patch_color_t * ppc0, +patch_interpolate_color(patch_color_t * ppcr, const patch_color_t * ppc0, const patch_color_t * ppc1, const patch_fill_state_t * pfs, floatp t) { if (pfs->Function) - ppc->t = ppc0->t + t * (ppc1->t - ppc0->t); + ppcr->t = ppc0->t + t * (ppc1->t - ppc0->t); else { int ci; for (ci = pfs->num_components - 1; ci >= 0; --ci) - ppc->cc.paint.values[ci] = + ppcr->cc.paint.values[ci] = ppc0->cc.paint.values[ci] + t * (ppc1->cc.paint.values[ci] - ppc0->cc.paint.values[ci]); } @@ -140,33 +131,35 @@ patch_interpolate_color(patch_color_t * ppc, const patch_color_t * ppc0, /* Resolve a patch color using the Function if necessary. */ private void -patch_resolve_color(patch_color_t * ppc, const patch_fill_state_t * pfs) +patch_resolve_color(patch_color_t * ppcr, const patch_fill_state_t * pfs) { if (pfs->Function) - gs_function_evaluate(pfs->Function, &ppc->t, ppc->cc.paint.values); + gs_function_evaluate(pfs->Function, &ppcr->t, ppcr->cc.paint.values); } /* ================ Specific shadings ================ */ /* * The curves are stored in a clockwise or counter-clockwise order that maps - * to the patch definition in a non-intuitive way: + * to the patch definition in a non-intuitive way. The documentation + * (pp. 277-281 of the PostScript Language Reference Manual, Third Edition) + * says that the curves are in the order D1, C2, D2, C1. */ /* The starting points of the curves: */ -#define C1START 0 #define D1START 0 -#define C2START 3 -#define D2START 1 +#define C2START 1 +#define D2START 3 +#define C1START 0 /* The control points of the curves (x means reversed order): */ -#define C1CTRL 0 -#define D1XCTRL 3 -#define C2XCTRL 2 -#define D2CTRL 1 +#define D1CTRL 0 +#define C2CTRL 1 +#define D2XCTRL 2 +#define C1XCTRL 3 /* The end points of the curves: */ -#define C1END 1 -#define D1END 3 +#define D1END 1 #define C2END 2 #define D2END 2 +#define C1END 3 /* ---------------- Common code ---------------- */ @@ -221,37 +214,39 @@ merge_splits(double *out, const double *a1, int n1, const double *a2, int n2) return p - out; } -/* Split a curve in both X and Y. Return the number of split points. */ +/* + * Split a curve in both X and Y. Return the number of split points. + * swap = 0 if the control points are in order, 1 if reversed. + */ private int -split_xy(double out[4], const patch_curve_t * curve, const gs_fixed_point * p3) +split_xy(double out[4], const gs_fixed_point *p0, const gs_fixed_point *p1, + const gs_fixed_point *p2, const gs_fixed_point *p3) { double tx[2], ty[2]; return merge_splits(out, tx, - gx_curve_monotonic_points(curve->vertex.p.x, - curve->control[0].x, - curve->control[1].x, - p3->x, tx), + gx_curve_monotonic_points(p0->x, p1->x, p2->x, p3->x, + tx), ty, - gx_curve_monotonic_points(curve->vertex.p.y, - curve->control[0].y, - curve->control[1].y, - p3->y, ty)); + gx_curve_monotonic_points(p0->y, p1->y, p2->y, p3->y, + ty)); } /* * Compute the joint split points of 2 curves. + * swap = 0 if the control points are in order, 1 if reversed. * Return the number of split points. */ -private int -split2_xy(double out[8], const patch_curve_t * curve1, - const gs_fixed_point * p31, const patch_curve_t * curve2, - const gs_fixed_point * p32) +inline private int +split2_xy(double out[8], const gs_fixed_point *p10, const gs_fixed_point *p11, + const gs_fixed_point *p12, const gs_fixed_point *p13, + const gs_fixed_point *p20, const gs_fixed_point *p21, + const gs_fixed_point *p22, const gs_fixed_point *p23) { double t1[4], t2[4]; - return merge_splits(out, t1, split_xy(t1, curve1, p31), - t2, split_xy(t2, curve2, p32)); + return merge_splits(out, t1, split_xy(t1, p10, p11, p12, p13), + t2, split_xy(t2, p20, p21, p22, p23)); } private int @@ -270,22 +265,20 @@ patch_fill(patch_fill_state_t * pfs, const patch_curve_t curve[4], * with respect to all 4 edges. Since each edge has no more than * 2 X and 2 Y split points (for a total of 4), taking both edges * together we have a maximum of 8 split points for each axis. - * - * The current documentation doesn't say how the 4 curves - * correspond to the 'u' or 'v' edges. Pending clarification from - * Adobe, we assume the 1st and 3rd are the 'u' edges and the - * 2nd and 4th are the 'v' edges. - ****** CHECK AGAINST UPDATED DOC ****** */ - double u[9], v[9]; - int nu = split2_xy(u, &curve[0], &curve[1].vertex.p, - &curve[2], &curve[3].vertex.p); - int nv = split2_xy(v, &curve[1], &curve[2].vertex.p, - &curve[3], &curve[0].vertex.p); + double su[9], sv[9]; + int nu = split2_xy(su, &curve[C1START].vertex.p,&curve[C1XCTRL].control[1], + &curve[C1XCTRL].control[0], &curve[C1END].vertex.p, + &curve[C2START].vertex.p, &curve[C2CTRL].control[0], + &curve[C2CTRL].control[1], &curve[C2END].vertex.p); + int nv = split2_xy(sv, &curve[D1START].vertex.p, &curve[D1CTRL].control[0], + &curve[D1CTRL].control[1], &curve[D1END].vertex.p, + &curve[D2START].vertex.p, &curve[D2XCTRL].control[1], + &curve[D2XCTRL].control[0], &curve[D2END].vertex.p); int iu, iv, ju, jv, ku, kv; double du, dv; double v0, v1, vn, u0, u1, un; - patch_color_t c0, c1, c2, c3; + patch_color_t c00, c01, c10, c11; /* * At some future time, we should set check = false if the curves * fall entirely within the bounding rectangle. (Only a small @@ -307,11 +300,23 @@ patch_fill(patch_fill_state_t * pfs, const patch_curve_t curve[4], fixed2float(curve[k].control[0].y), fixed2float(curve[k].control[1].x), fixed2float(curve[k].control[1].y)); + if (nu > 1) { + dlputs("[2]Splitting u"); + for (k = 0; k < nu; ++k) + dprintf1(", %g", su[k]); + dputs("\n"); + } + if (nv > 1) { + dlputs("[2]Splitting v"); + for (k = 0; k < nv; ++k) + dprintf1(", %g", sv[k]); + dputs("\n"); + } } #endif /* Add boundary values to simplify the iteration. */ - u[nu] = 1; - v[nv] = 1; + su[nu] = 1; + sv[nv] = 1; /* * We're going to fill the curves by flattening them and then filling @@ -333,16 +338,9 @@ patch_fill(patch_fill_state_t * pfs, const patch_curve_t curve[4], gx_curve_log2_samples(curve[i].vertex.p.x, curve[i].vertex.p.y, &cseg, flatness); } - ku = 1 << max(log2_k[0], log2_k[2]); - kv = 1 << max(log2_k[1], log2_k[3]); + ku = 1 << max(log2_k[1], log2_k[3]); + kv = 1 << max(log2_k[0], log2_k[2]); } - /* - * Since ku and kv are powers of 2, and since log2(k) is surely less - * than the number of bits in the mantissa of a double, 1/k ... - * (k-1)/k can all be represented exactly as doubles. - */ - du = 1.0 / ku; - dv = 1.0 / kv; /* Precompute the colors at the corners. */ @@ -350,16 +348,24 @@ patch_fill(patch_fill_state_t * pfs, const patch_curve_t curve[4], if ( pfs->Function ) c.t = v.cc[0];\ else memcpy(c.cc.paint.values, v.cc, sizeof(c.cc.paint.values)) - PATCH_SET_COLOR(c0, curve[0].vertex); - PATCH_SET_COLOR(c1, curve[1].vertex); - PATCH_SET_COLOR(c2, curve[2].vertex); - PATCH_SET_COLOR(c3, curve[3].vertex); + PATCH_SET_COLOR(c00, curve[D1START].vertex); /* = C1START */ + PATCH_SET_COLOR(c01, curve[D1END].vertex); /* = C2START */ + PATCH_SET_COLOR(c11, curve[C2END].vertex); /* = D2END */ + PATCH_SET_COLOR(c10, curve[C1END].vertex); /* = D2START */ #undef PATCH_SET_COLOR + /* + * Since ku and kv are powers of 2, and since log2(k) is surely less + * than the number of bits in the mantissa of a double, 1/k ... + * (k-1)/k can all be represented exactly as doubles. + */ + du = 1.0 / ku; + dv = 1.0 / kv; + /* Now iterate over the sub-patches. */ for (iv = 0, jv = 0, v0 = 0, v1 = vn = dv; jv < kv; v0 = v1, v1 = vn) { - patch_color_t cv[4]; + patch_color_t c0v0, c0v1, c1v0, c1v1; /* Subdivide the interval if it crosses a split point. */ @@ -373,51 +379,57 @@ patch_fill(patch_fill_state_t * pfs, const patch_curve_t curve[4], ix++;\ } - CHECK_SPLIT(iv, jv, v1, vn, dv, v); + CHECK_SPLIT(iv, jv, v1, vn, dv, sv); - patch_interpolate_color(&cv[0], &c0, &c3, pfs, v0); - patch_interpolate_color(&cv[1], &c0, &c3, pfs, v1); - patch_interpolate_color(&cv[2], &c1, &c2, pfs, v0); - patch_interpolate_color(&cv[3], &c1, &c2, pfs, v1); + patch_interpolate_color(&c0v0, &c00, &c01, pfs, v0); + patch_interpolate_color(&c0v1, &c00, &c01, pfs, v1); + patch_interpolate_color(&c1v0, &c10, &c11, pfs, v0); + patch_interpolate_color(&c1v1, &c10, &c11, pfs, v1); for (iu = 0, ju = 0, u0 = 0, u1 = un = du; ju < ku; u0 = u1, u1 = un) { - patch_color_t cu[4]; + patch_color_t cu0v0, cu1v0, cu0v1, cu1v1; int code; - CHECK_SPLIT(iu, ju, u1, un, du, u); + CHECK_SPLIT(iu, ju, u1, un, du, su); #undef CHECK_SPLIT - patch_interpolate_color(&cu[0], &cv[0], &cv[2], pfs, u0); - patch_resolve_color(&cu[0], pfs); - patch_interpolate_color(&cu[1], &cv[0], &cv[2], pfs, u1); - patch_resolve_color(&cu[1], pfs); - patch_interpolate_color(&cu[2], &cv[1], &cv[3], pfs, u1); - patch_resolve_color(&cu[2], pfs); - patch_interpolate_color(&cu[3], &cv[1], &cv[3], pfs, u0); - patch_resolve_color(&cu[3], pfs); - if_debug6('2', "[2]u[%d]=(%g,%g), v[%d]=(%g,%g)\n", + patch_interpolate_color(&cu0v0, &c0v0, &c1v0, pfs, u0); + patch_resolve_color(&cu0v0, pfs); + patch_interpolate_color(&cu1v0, &c0v0, &c1v0, pfs, u1); + patch_resolve_color(&cu1v0, pfs); + patch_interpolate_color(&cu0v1, &c0v1, &c1v1, pfs, u0); + patch_resolve_color(&cu0v1, pfs); + patch_interpolate_color(&cu1v1, &c0v1, &c1v1, pfs, u1); + patch_resolve_color(&cu1v1, pfs); + if_debug6('2', "[2]u[%d]=[%g .. %g], v[%d]=[%g .. %g]\n", iu, u0, u1, iv, v0, v1); /* Fill the sub-patch given by ((u0,v0),(u1,v1)). */ { - mesh_vertex_t mv[4]; - - (*transform)(&mv[0].p, curve, interior, u0, v0); - (*transform)(&mv[1].p, curve, interior, u1, v0); - (*transform)(&mv[2].p, curve, interior, u1, v1); - (*transform)(&mv[3].p, curve, interior, u0, v1); - memcpy(mv[0].cc, cu[0].cc.paint.values, sizeof(mv[0].cc)); - memcpy(mv[1].cc, cu[1].cc.paint.values, sizeof(mv[1].cc)); - memcpy(mv[2].cc, cu[2].cc.paint.values, sizeof(mv[2].cc)); - memcpy(mv[3].cc, cu[3].cc.paint.values, sizeof(mv[3].cc)); + mesh_vertex_t mu0v0, mu1v0, mu1v1, mu0v1; + + (*transform)(&mu0v0.p, curve, interior, u0, v0); + (*transform)(&mu1v0.p, curve, interior, u1, v0); + (*transform)(&mu1v1.p, curve, interior, u1, v1); + (*transform)(&mu0v1.p, curve, interior, u0, v1); + if_debug4('2', "[2] => (%g,%g), (%g,%g),\n", + fixed2float(mu0v0.p.x), fixed2float(mu0v0.p.y), + fixed2float(mu1v0.p.x), fixed2float(mu1v0.p.y)); + if_debug4('2', "[2] (%g,%g), (%g,%g)\n", + fixed2float(mu1v1.p.x), fixed2float(mu1v1.p.y), + fixed2float(mu0v1.p.x), fixed2float(mu0v1.p.y)); + memcpy(mu0v0.cc, cu0v0.cc.paint.values, sizeof(mu0v0.cc)); + memcpy(mu1v0.cc, cu1v0.cc.paint.values, sizeof(mu1v0.cc)); + memcpy(mu1v1.cc, cu1v1.cc.paint.values, sizeof(mu1v1.cc)); + memcpy(mu0v1.cc, cu0v1.cc.paint.values, sizeof(mu0v1.cc)); mesh_init_fill_triangle((mesh_fill_state_t *)pfs, - &mv[0], &mv[1], &mv[2], check); + &mu0v0, &mu1v1, &mu1v0, check); code = mesh_fill_triangle((mesh_fill_state_t *)pfs); if (code < 0) return code; mesh_init_fill_triangle((mesh_fill_state_t *)pfs, - &mv[2], &mv[3], &mv[0], check); + &mu0v0, &mu1v1, &mu0v1, check); code = mesh_fill_triangle((mesh_fill_state_t *)pfs); if (code < 0) return code; @@ -438,16 +450,16 @@ Cp_transform(gs_fixed_point * pt, const patch_curve_t curve[4], gs_fixed_point c1u, d1v, c2u, d2v; curve_eval(&c1u, &curve[C1START].vertex.p, - &curve[C1CTRL].control[0], &curve[C1CTRL].control[1], + &curve[C1XCTRL].control[1], &curve[C1XCTRL].control[0], &curve[C1END].vertex.p, u); curve_eval(&d1v, &curve[D1START].vertex.p, - &curve[D1XCTRL].control[1], &curve[D1XCTRL].control[0], + &curve[D1CTRL].control[0], &curve[D1CTRL].control[1], &curve[D1END].vertex.p, v); curve_eval(&c2u, &curve[C2START].vertex.p, - &curve[C2XCTRL].control[1], &curve[C2XCTRL].control[0], + &curve[C2CTRL].control[0], &curve[C2CTRL].control[1], &curve[C2END].vertex.p, u); curve_eval(&d2v, &curve[D2START].vertex.p, - &curve[D2CTRL].control[0], &curve[D2CTRL].control[1], + &curve[D2XCTRL].control[1], &curve[D2XCTRL].control[0], &curve[D2END].vertex.p, v); #define COMPUTE_COORD(xy)\ pt->xy = (fixed)\ @@ -496,7 +508,7 @@ Tpp_transform(gs_fixed_point * pt, const patch_curve_t curve[4], double Bu[4], Bv[4]; gs_fixed_point pts[4][4]; int i, j; - fixed x = 0, y = 0; + double x = 0, y = 0; /* Compute the Bernstein polynomials of u and v. */ { @@ -511,17 +523,17 @@ Tpp_transform(gs_fixed_point * pt, const patch_curve_t curve[4], /* Arrange the points into an indexable order. */ pts[0][0] = curve[0].vertex.p; - pts[1][0] = curve[0].control[0]; - pts[2][0] = curve[0].control[1]; - pts[3][0] = curve[1].vertex.p; - pts[3][1] = curve[1].control[0]; - pts[3][2] = curve[1].control[1]; + pts[0][1] = curve[0].control[0]; + pts[0][2] = curve[0].control[1]; + pts[0][3] = curve[1].vertex.p; + pts[1][3] = curve[1].control[0]; + pts[2][3] = curve[1].control[1]; pts[3][3] = curve[2].vertex.p; - pts[2][3] = curve[2].control[0]; - pts[1][3] = curve[2].control[1]; - pts[0][3] = curve[3].vertex.p; - pts[0][2] = curve[3].control[0]; - pts[0][1] = curve[3].control[1]; + pts[3][2] = curve[2].control[0]; + pts[3][1] = curve[2].control[1]; + pts[3][0] = curve[3].vertex.p; + pts[2][0] = curve[3].control[0]; + pts[1][0] = curve[3].control[1]; pts[1][1] = interior[0]; pts[2][1] = interior[1]; pts[2][2] = interior[2]; @@ -534,7 +546,7 @@ Tpp_transform(gs_fixed_point * pt, const patch_curve_t curve[4], x += pts[i][j].x * coeff, y += pts[i][j].y * coeff; } - pt->x = x, pt->y = y; + pt->x = (fixed)x, pt->y = (fixed)y; } int @@ -554,9 +566,20 @@ gs_shading_Tpp_fill_rectangle(const gs_shading_t * psh0, const gs_rect * rect, shade_next_init(&cs, (const gs_shading_mesh_params_t *)&psh->params, pis); while ((code = shade_next_patch(&cs, psh->params.BitsPerFlag, - curve, interior)) == 0 && - (code = patch_fill(&state, curve, interior, Tpp_transform)) >= 0 - ) - DO_NOTHING; + curve, interior)) == 0) { + /* + * The order of points appears to be consistent with that for Coons + * patches, which is different from that documented in Red Book 3. + */ + gs_fixed_point swapped_interior[4]; + + swapped_interior[0] = interior[0]; + swapped_interior[1] = interior[3]; + swapped_interior[2] = interior[2]; + swapped_interior[3] = interior[1]; + code = patch_fill(&state, curve, swapped_interior, Tpp_transform); + if (code < 0) + break; + } return min(code, 0); } diff --git a/gs/src/gxstate.h b/gs/src/gxstate.h index 3ab25cb56..e047f0f49 100644 --- a/gs/src/gxstate.h +++ b/gs/src/gxstate.h @@ -1,22 +1,9 @@ /* Copyright (C) 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal graphics state API */ #ifndef gxstate_INCLUDED diff --git a/gs/src/gxstroke.c b/gs/src/gxstroke.c index fb30a5f0b..cd6cbd70f 100644 --- a/gs/src/gxstroke.c +++ b/gs/src/gxstroke.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Path stroking procedures for Ghostscript library */ #include "math_.h" #include "gx.h" diff --git a/gs/src/gxsync.c b/gs/src/gxsync.c index 9da9a84d1..8804e5e97 100644 --- a/gs/src/gxsync.c +++ b/gs/src/gxsync.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to platform-based synchronization primitives */ /* Initial version 2/1/98 by John Desrosiers (soho@crl.com) */ diff --git a/gs/src/gxsync.h b/gs/src/gxsync.h index 766f383ea..3e9041fc8 100644 --- a/gs/src/gxsync.h +++ b/gs/src/gxsync.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to synchronization primitives */ /* Initial version 2/1/98 by John Desrosiers (soho@crl.com) */ diff --git a/gs/src/gxtext.h b/gs/src/gxtext.h index ba26578a9..7ab6c3936 100644 --- a/gs/src/gxtext.h +++ b/gs/src/gxtext.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Driver text interface implementation support */ #ifndef gxtext_INCLUDED diff --git a/gs/src/gxtmap.h b/gs/src/gxtmap.h index 53a556a16..9ae88773e 100644 --- a/gs/src/gxtmap.h +++ b/gs/src/gxtmap.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definition of transfer mapping function */ /* (also used for black generation and undercolor removal) */ diff --git a/gs/src/gxtype1.c b/gs/src/gxtype1.c index 1fe6de4fb..c0c88cfd6 100644 --- a/gs/src/gxtype1.c +++ b/gs/src/gxtype1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Adobe Type 1 font interpreter support */ #include "math_.h" #include "gx.h" @@ -377,7 +364,8 @@ gs_type1_seac(gs_type1_state * pcis, const fixed * cstack, fixed asb, /* Save away all the operands. */ pcis->seac_accent = fixed2int_var(cstack[3]); - pcis->save_asb = asb - pcis->lsb.x; + pcis->save_asb = asb; + pcis->save_lsb = pcis->lsb; pcis->save_adxy.x = cstack[0]; pcis->save_adxy.y = cstack[1]; pcis->os_count = 0; /* clear */ @@ -416,11 +404,11 @@ gs_type1_endchar(gs_type1_state * pcis) /* Reset the coordinate system origin */ sfc = pcis->fc; ptx = pcis->origin.x, pty = pcis->origin.y; - pcis->asb_diff = pcis->save_asb; + pcis->asb_diff = pcis->save_asb - pcis->save_lsb.x; pcis->adxy = pcis->save_adxy; /* - * We're going to add in the lsb of the base character / accented - * character (*not* the lsb of the accent) when we encounter the + * We're going to add in the lsb of the accented character + * (*not* the lsb of the accent) when we encounter the * [h]sbw of the accent, so ignore the lsb for now. */ accum_xy(pcis->adxy.x, pcis->adxy.y); @@ -491,3 +479,157 @@ gs_type1_endchar(gs_type1_state * pcis) gs_imager_setflat(pis, pcis->flatness); return 0; } + +/* ------ Font procedures ------ */ + +int +gs_type1_glyph_info(gs_font *font, gs_glyph glyph, const gs_matrix *pmat, + int members, gs_glyph_info_t *info) +{ + gs_font_type1 *const pfont = (gs_font_type1 *)font; + int piece_members = members & (GLYPH_INFO_NUM_PIECES | GLYPH_INFO_PIECES); + int default_members = members - piece_members; + int code = 0; + + if (default_members) { + code = gs_default_glyph_info(font, glyph, pmat, default_members, info); + + if (code < 0) + return code; + } else + info->members = 0; + if (piece_members) { + gs_glyph *pieces = + (members & GLYPH_INFO_PIECES ? info->pieces : (gs_glyph *)0); + /* + * Decode the CharString looking for seac. We have to process + * callsubr, callothersubr, and return operators, but if we see + * any other operators other than [h]sbw, pop, or hint operators, + * we can return immediately. This includes all Type 2 operators, + * since Type 2 CharStrings don't use seac. + * + * It's really unfortunate that we have to duplicate so much parsing + * code, but factoring out the parser from the interpreter would + * involve more restructuring than we're prepared to do right now. + */ + gs_type1_data *const pdata = &pfont->data; + bool encrypted = pdata->lenIV >= 0; + gs_const_string str; + fixed cstack[ostack_size]; + fixed *csp = cstack - 1; + ip_state ipstack[ipstack_size + 1]; + ip_state *ipsp = &ipstack[0]; + const byte *cip; + crypt_state state; + int c; + + if ((code = pdata->procs->glyph_data(pfont, glyph, &str)) < 0) + return code; /* non-existent glyph */ + info->members |= piece_members; + info->num_pieces = 0; /* default */ + cip = str.data; + call: + state = crypt_charstring_seed; + if (encrypted) { + int skip = pdata->lenIV; + + /* Skip initial random bytes */ + for (; skip > 0; ++cip, --skip) + decrypt_skip_next(*cip, state); + } + top: + for (;;) { + uint c0 = *cip++; + + charstring_next(c0, state, c, encrypted); + if (c >= c_num1) { + /* This is a number, decode it and push it on the stack. */ + if (c < c_pos2_0) { /* 1-byte number */ + decode_push_num1(csp, c); + } else if (c < cx_num4) { /* 2-byte number */ + decode_push_num2(csp, c, cip, state, encrypted); + } else if (c == cx_num4) { /* 4-byte number */ + long lw; + + decode_num4(lw, cip, state, encrypted); + *++csp = int2fixed(lw); + } else /* not possible */ + return_error(gs_error_invalidfont); + continue; + } +#define cnext csp = cstack - 1; goto top + switch ((char_command) c) { + default: + goto out; + case c_callsubr: + c = fixed2int_var(*csp); + code = pdata->procs->subr_data + (pfont, c, false, &ipsp[1].char_string); + if (code < 0) + return_error(code); + --csp; + ipsp->ip = cip, ipsp->dstate = state; + ++ipsp; + cip = ipsp->char_string.data; + goto call; + case c_return: + --ipsp; + cip = ipsp->ip, state = ipsp->dstate; + goto top; + case cx_hstem: + case cx_vstem: + case c1_hsbw: + cnext; + case cx_escape: + charstring_next(*cip, state, c, encrypted); + ++cip; + switch ((char1_extended_command) c) { + default: + goto out; + case ce1_vstem3: + case ce1_hstem3: + case ce1_sbw: + cnext; + case ce1_pop: + /* + * pop must do nothing, since it is used after + * subr# 1 3 callothersubr. + */ + goto top; + case ce1_seac: + /* This is the payoff for all this code! */ + if (pieces) { + gs_char bchar = fixed2int(csp[-1]); + gs_char achar = fixed2int(csp[0]); + + pieces[0] = font->procs.encode_char(font, bchar, + GLYPH_SPACE_NAME); + pieces[1] = font->procs.encode_char(font, achar, + GLYPH_SPACE_NAME); + } + info->num_pieces = 2; + goto out; + case ce1_callothersubr: + switch (fixed2int_var(*csp)) { + default: + goto out; + case 3: + csp -= 2; + goto top; + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + cnext; + } + } + } +#undef cnext + } + } + out: + return code; +} diff --git a/gs/src/gxtype1.h b/gs/src/gxtype1.h index 00723e6de..919ffb7b2 100644 --- a/gs/src/gxtype1.h +++ b/gs/src/gxtype1.h @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Private Adobe Type 1 / Type 2 charstring interpreter definitions */ #ifndef gxtype1_INCLUDED @@ -178,33 +165,31 @@ struct gs_type1_state_s { ip_state ipstack[ipstack_size + 1]; /* control stack */ int ips_count; /* # of occupied entries */ int init_done; /* -1 if not done & not needed, */ - /* 0 if not done & needed, 1 if done */ + /* 0 if not done & needed, 1 if done */ bool sb_set; /* true if lsb is preset */ - bool width_set; /* true if width is set (for */ - /* seac components) */ + bool width_set; /* true if width is set (for seac parts) */ bool have_hintmask; /* true if using a hint mask */ /* (Type 2 charstrings only) */ int num_hints; /* number of hints (Type 2 only) */ gs_fixed_point lsb; /* left side bearing (char coords) */ gs_fixed_point width; /* character width (char coords) */ - int seac_accent; /* accent character code for seac, */ - /* or -1 */ + int seac_accent; /* accent character code for seac, or -1 */ fixed save_asb; /* save seac asb */ + gs_fixed_point save_lsb; /* save seac accented lsb */ gs_fixed_point save_adxy; /* save seac adx/ady */ - fixed asb_diff; /* seac asb - accented char lsb.x, */ - /* needed to adjust Flex endpoint */ + fixed asb_diff; /* save_asb - save_lsb.x, */ + /* needed to adjust Flex endpoint */ gs_fixed_point adxy; /* seac accent displacement, */ - /* needed to adjust currentpoint */ + /* needed to adjust currentpoint */ gs_fixed_point position; /* save unadjusted position */ - /* when returning temporarily */ - /* to caller */ + /* when returning temporarily to caller */ int flex_path_state_flags; /* record whether path was open */ - /* at start of Flex section */ + /* at start of Flex section */ #define flex_max 8 gs_fixed_point flex_points[flex_max]; /* points for Flex */ int flex_count; int ignore_pops; /* # of pops to ignore (after */ - /* a known othersubr call) */ + /* a known othersubr call) */ /* The following are set dynamically. */ #define dotsection_in 0 #define dotsection_out (-1) diff --git a/gs/src/gxxfont.h b/gs/src/gxxfont.h index cf6c80d60..1ab4a6356 100644 --- a/gs/src/gxxfont.h +++ b/gs/src/gxxfont.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1994, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* External font interface for Ghostscript library */ #ifndef gxxfont_INCLUDED diff --git a/gs/src/gzacpath.h b/gs/src/gzacpath.h index 40cbc4841..3e3abb08b 100644 --- a/gs/src/gzacpath.h +++ b/gs/src/gzacpath.h @@ -1,22 +1,10 @@ /* Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* State and interface definitions for clipping path accumulator */ /* Requires gxdevice.h, gzcpath.h */ #ifndef gzacpath_INCLUDED diff --git a/gs/src/gzcpath.h b/gs/src/gzcpath.h index 60577ff35..3db2699d6 100644 --- a/gs/src/gzcpath.h +++ b/gs/src/gzcpath.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Structure definitions for clipping paths */ /* Requires gzpath.h. */ #ifndef gzcpath_INCLUDED diff --git a/gs/src/gzline.h b/gs/src/gzline.h index 9333febdc..57f8a79bb 100644 --- a/gs/src/gzline.h +++ b/gs/src/gzline.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Line parameter implementation */ #ifndef gzline_INCLUDED diff --git a/gs/src/gzpath.h b/gs/src/gzpath.h index 7ac54bf2b..37ddd0af5 100644 --- a/gs/src/gzpath.h +++ b/gs/src/gzpath.h @@ -1,22 +1,10 @@ /* Copyright (C) 1989, 1995, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Structure and internal procedure definitions for paths */ /* Requires gxfixed.h */ #ifndef gzpath_INCLUDED diff --git a/gs/src/gzstate.h b/gs/src/gzstate.h index 63031c8b8..1a1992a63 100644 --- a/gs/src/gzstate.h +++ b/gs/src/gzstate.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Private graphics state definition for Ghostscript library */ #ifndef gzstate_INCLUDED diff --git a/gs/src/ialloc.c b/gs/src/ialloc.c index e75055463..cc527da8f 100644 --- a/gs/src/ialloc.c +++ b/gs/src/ialloc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Memory allocator for Ghostscript interpreter */ #include "gx.h" #include "memory_.h" diff --git a/gs/src/ialloc.h b/gs/src/ialloc.h index c9ef3ac13..efa0748e4 100644 --- a/gs/src/ialloc.h +++ b/gs/src/ialloc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to Ghostscript interpreter memory allocator */ #ifndef ialloc_INCLUDED diff --git a/gs/src/iastate.h b/gs/src/iastate.h index bc3ccc075..26ec09329 100644 --- a/gs/src/iastate.h +++ b/gs/src/iastate.h @@ -1,22 +1,10 @@ /* Copyright (C) 1993, 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Collected definitions for interpreter allocator state */ /* Requires gsmemory.h, gsstruct.h */ #ifndef iastate_INCLUDED diff --git a/gs/src/iastruct.h b/gs/src/iastruct.h index 6f587f74d..18085e113 100644 --- a/gs/src/iastruct.h +++ b/gs/src/iastruct.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interpreter memory manager implementation structures */ #ifndef iastruct_INCLUDED diff --git a/gs/src/ibnum.c b/gs/src/ibnum.c index b26bcbdca..5f3dbaf88 100644 --- a/gs/src/ibnum.c +++ b/gs/src/ibnum.c @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Level 2 encoded number reading utilities for Ghostscript */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/ibnum.h b/gs/src/ibnum.h index b56397e6a..adac8e980 100644 --- a/gs/src/ibnum.h +++ b/gs/src/ibnum.h @@ -1,22 +1,10 @@ /* Copyright (C) 1990, 1996, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Encoded number definitions and support */ /* Requires stream.h */ #ifndef ibnum_INCLUDED diff --git a/gs/src/iccfont.c b/gs/src/iccfont.c index 4c0ef15c1..9a57c2c77 100644 --- a/gs/src/iccfont.c +++ b/gs/src/iccfont.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Initialization support for compiled fonts */ #include "string_.h" #include "ghost.h" diff --git a/gs/src/iccinit0.c b/gs/src/iccinit0.c index 6bb122cc2..460c9b4c4 100644 --- a/gs/src/iccinit0.c +++ b/gs/src/iccinit0.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Initialization string for non-compiled initialization */ #include "stdpre.h" diff --git a/gs/src/icfontab.c b/gs/src/icfontab.c index b2ff878f8..fd2a5f651 100644 --- a/gs/src/icfontab.c +++ b/gs/src/icfontab.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Table of compiled fonts */ #include "ccfont.h" diff --git a/gs/src/ichar.h b/gs/src/ichar.h index cf7b07169..55ecb10d7 100644 --- a/gs/src/ichar.h +++ b/gs/src/ichar.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Character rendering operator definitions and support procedures */ /* Requires gstext.h */ #ifndef ichar_INCLUDED diff --git a/gs/src/ichar1.h b/gs/src/ichar1.h index 8b580e203..159ff2087 100644 --- a/gs/src/ichar1.h +++ b/gs/src/ichar1.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 1 / Type 2 character rendering operator entry */ #ifndef ichar1_INCLUDED diff --git a/gs/src/icharout.h b/gs/src/icharout.h index aa3a776af..cd0b523db 100644 --- a/gs/src/icharout.h +++ b/gs/src/icharout.h @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to zcharout.c */ #ifndef icharout_INCLUDED diff --git a/gs/src/icie.h b/gs/src/icie.h index 1f61b3d06..553e69ea7 100644 --- a/gs/src/icie.h +++ b/gs/src/icie.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal definitions for interpreter CIE color handling */ #ifndef icie_INCLUDED diff --git a/gs/src/icolor.h b/gs/src/icolor.h index dc7e58f20..3985ec894 100644 --- a/gs/src/icolor.h +++ b/gs/src/icolor.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Declarations for transfer function & similar cache remapping */ #ifndef icolor_INCLUDED @@ -32,8 +19,9 @@ extern const int zcolor_remap_one_estack; /* * Schedule the sampling and reloading of a cache. Note that if - * zcolor_remap_one recognize the procedure as being of a special form, - * it may return 0 and not schedule anything. + * zcolor_remap_one recognize the procedure as being of a special form, it + * may not schedule anything, but it still returns o_push_estack. (This is + * a change as of release 5.95; formerly, it returned 0 in this case.) */ int zcolor_remap_one(P5(i_ctx_t *, const ref *, gx_transfer_map *, const gs_state *, op_proc_t)); diff --git a/gs/src/iconf.c b/gs/src/iconf.c index 7dd08925c..9b1dab898 100644 --- a/gs/src/iconf.c +++ b/gs/src/iconf.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Configuration-dependent tables and initialization for interpreter */ #include "stdio_.h" /* stdio for stream.h */ #include "gstypes.h" diff --git a/gs/src/icontext.c b/gs/src/icontext.c index f43c119eb..51f023b8f 100644 --- a/gs/src/icontext.c +++ b/gs/src/icontext.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Context state operations */ #include "ghost.h" #include "gsstruct.h" /* for gxalloc.h */ diff --git a/gs/src/icontext.h b/gs/src/icontext.h index da2bdd6ac..5895f7014 100644 --- a/gs/src/icontext.h +++ b/gs/src/icontext.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Externally visible context state */ /* Requires iref.h, stdio_.h */ diff --git a/gs/src/icremap.h b/gs/src/icremap.h index 385284340..96ded66a2 100644 --- a/gs/src/icremap.h +++ b/gs/src/icremap.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interpreter color remapping structure */ #ifndef icremap_INCLUDED diff --git a/gs/src/icsmap.h b/gs/src/icsmap.h index 476d624fd..3a619e968 100644 --- a/gs/src/icsmap.h +++ b/gs/src/icsmap.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to shared routines for loading the cached color space maps. */ #ifndef icsmap_INCLUDED diff --git a/gs/src/icstate.h b/gs/src/icstate.h index 0f2271953..497d7f60d 100644 --- a/gs/src/icstate.h +++ b/gs/src/icstate.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Externally visible context state */ #ifndef icstate_INCLUDED diff --git a/gs/src/iddict.h b/gs/src/iddict.h index 1229e40fb..07ae11c91 100644 --- a/gs/src/iddict.h +++ b/gs/src/iddict.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Dictionary API with implicit dict_stack argument */ #ifndef iddict_INCLUDED diff --git a/gs/src/iddstack.h b/gs/src/iddstack.h index 3a3aa1415..9c843ce94 100644 --- a/gs/src/iddstack.h +++ b/gs/src/iddstack.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Dictionary stack API subset needed by idict.h */ #ifndef iddstack_INCLUDED diff --git a/gs/src/idebug.c b/gs/src/idebug.c index a5481c18c..58dd6cdd4 100644 --- a/gs/src/idebug.c +++ b/gs/src/idebug.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Debugging support for Ghostscript interpreter */ /* This file must always be compiled with DEBUG set. */ #undef DEBUG diff --git a/gs/src/idebug.h b/gs/src/idebug.h index 621d8ca4b..39fb98fc5 100644 --- a/gs/src/idebug.h +++ b/gs/src/idebug.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Prototypes for debugging procedures in idebug.c */ #ifndef idebug_INCLUDED diff --git a/gs/src/idict.c b/gs/src/idict.c index 45e7306ba..a9ce45e60 100644 --- a/gs/src/idict.c +++ b/gs/src/idict.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Dictionary implementation */ #include "string_.h" /* for strlen */ #include "ghost.h" diff --git a/gs/src/idict.h b/gs/src/idict.h index 9b0d119cc..66cf89991 100644 --- a/gs/src/idict.h +++ b/gs/src/idict.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interfaces for Ghostscript dictionary package */ #ifndef idict_INCLUDED diff --git a/gs/src/idictdef.h b/gs/src/idictdef.h index 155be829b..fab0689b9 100644 --- a/gs/src/idictdef.h +++ b/gs/src/idictdef.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internals of dictionary implementation */ #ifndef idictdef_INCLUDED diff --git a/gs/src/idosave.h b/gs/src/idosave.h index 496a53fde..49bba35a4 100644 --- a/gs/src/idosave.h +++ b/gs/src/idosave.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Supporting procedures for 'save' recording. */ #ifndef idosave_INCLUDED diff --git a/gs/src/idparam.c b/gs/src/idparam.c index a9a121c90..4b35f0406 100644 --- a/gs/src/idparam.c +++ b/gs/src/idparam.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Utilities for getting parameters out of dictionaries. */ #include "memory_.h" #include "string_.h" /* for strlen */ diff --git a/gs/src/idparam.h b/gs/src/idparam.h index 4175f2516..a45579f1a 100644 --- a/gs/src/idparam.h +++ b/gs/src/idparam.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1994, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to idparam.c */ #ifndef idparam_INCLUDED diff --git a/gs/src/idsdata.h b/gs/src/idsdata.h index b50052e61..dd9047591 100644 --- a/gs/src/idsdata.h +++ b/gs/src/idsdata.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic dictionary stack structure definition */ #ifndef idsdata_INCLUDED diff --git a/gs/src/idstack.c b/gs/src/idstack.c index 67b66d96e..2d54a68fe 100644 --- a/gs/src/idstack.c +++ b/gs/src/idstack.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Implementation of dictionary stacks */ #include "ghost.h" #include "idict.h" diff --git a/gs/src/idstack.h b/gs/src/idstack.h index 1a6dc6fed..1984692da 100644 --- a/gs/src/idstack.h +++ b/gs/src/idstack.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic dictionary stack API */ #ifndef idstack_INCLUDED diff --git a/gs/src/iesdata.h b/gs/src/iesdata.h index 7ce915950..03f344a13 100644 --- a/gs/src/iesdata.h +++ b/gs/src/iesdata.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic execution stack structure definition */ #ifndef iesdata_INCLUDED diff --git a/gs/src/iestack.h b/gs/src/iestack.h index 982e79a5c..7feeea5a9 100644 --- a/gs/src/iestack.h +++ b/gs/src/iestack.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1994, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic execution stack API */ #ifndef iestack_INCLUDED diff --git a/gs/src/ifilter.h b/gs/src/ifilter.h index e1612d798..436e0abd9 100644 --- a/gs/src/ifilter.h +++ b/gs/src/ifilter.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Interpreter filter support */ /* Requires oper.h, stream.h, strimpl.h */ #ifndef ifilter_INCLUDED @@ -83,4 +71,7 @@ typedef struct stream_proc_state_s { gs_private_st_complex_only(st_sproc_state, stream_proc_state,\ "procedure stream state", sproc_clear_marks, sproc_enum_ptrs, sproc_reloc_ptrs, 0) +/* Test whether a stream is procedure-based. */ +bool s_is_proc(P1(const stream *s)); + #endif /* ifilter_INCLUDED */ diff --git a/gs/src/ifilter2.h b/gs/src/ifilter2.h index 207388f0b..46497feb3 100644 --- a/gs/src/ifilter2.h +++ b/gs/src/ifilter2.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Utilities for Level 2 filters */ #ifndef ifilter2_INCLUDED diff --git a/gs/src/ifont.h b/gs/src/ifont.h index 7e7e2eb18..e8896aa0e 100644 --- a/gs/src/ifont.h +++ b/gs/src/ifont.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1991, 1993, 1994, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interpreter internal font representation */ #ifndef ifont_INCLUDED diff --git a/gs/src/ifont1.h b/gs/src/ifont1.h index a83b5452f..5c3428a81 100644 --- a/gs/src/ifont1.h +++ b/gs/src/ifont1.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 1 font utilities shared with Type 2 */ #ifndef ifont1_INCLUDED diff --git a/gs/src/ifrpred.h b/gs/src/ifrpred.h index f92a8cef3..40a3878da 100644 --- a/gs/src/ifrpred.h +++ b/gs/src/ifrpred.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* filter_read_predictor prototype */ #ifndef ifrpred_INCLUDED diff --git a/gs/src/ifunc.h b/gs/src/ifunc.h index 8a7660ffb..545c39930 100644 --- a/gs/src/ifunc.h +++ b/gs/src/ifunc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal interpreter interfaces for Functions */ #ifndef ifunc_INCLUDED diff --git a/gs/src/ifwpred.h b/gs/src/ifwpred.h index 33be68302..debff2416 100644 --- a/gs/src/ifwpred.h +++ b/gs/src/ifwpred.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* filter_read_predictor prototype */ #ifndef ifwpred_INCLUDED diff --git a/gs/src/igc.c b/gs/src/igc.c index 8b8e06ff0..2491ef99c 100644 --- a/gs/src/igc.c +++ b/gs/src/igc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Garbage collector for Ghostscript */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/igc.h b/gs/src/igc.h index 4b47c59a4..c4409a414 100644 --- a/gs/src/igc.h +++ b/gs/src/igc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal interfaces in Ghostscript GC */ #ifndef igc_INCLUDED @@ -83,9 +70,9 @@ void ialloc_validate_object(P3(const obj_header_t *, const chunk_t *, gc_state_t *)); /* Macro for returning a relocated pointer */ -#ifdef DEBUG const void *print_reloc_proc(P3(const void *obj, const char *cname, const void *robj)); +#ifdef DEBUG # define print_reloc(obj, cname, nobj)\ (gs_debug_c('9') ? print_reloc_proc(obj, cname, nobj) : nobj) #else diff --git a/gs/src/igcref.c b/gs/src/igcref.c index 0a5e06266..86a461e52 100644 --- a/gs/src/igcref.c +++ b/gs/src/igcref.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* ref garbage collector for Ghostscript */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/igcstr.c b/gs/src/igcstr.c index 74a6a44c0..869d7dfa3 100644 --- a/gs/src/igcstr.c +++ b/gs/src/igcstr.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* String GC routines for Ghostscript */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/igcstr.h b/gs/src/igcstr.h index d0b2fe048..cfac7f27c 100644 --- a/gs/src/igcstr.h +++ b/gs/src/igcstr.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal interface to string garbage collector */ #ifndef igcstr_INCLUDED diff --git a/gs/src/igstate.h b/gs/src/igstate.h index 85246b4d8..c1111c3ee 100644 --- a/gs/src/igstate.h +++ b/gs/src/igstate.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Ghostscript interpreter graphics state definition */ #ifndef igstate_INCLUDED diff --git a/gs/src/iht.h b/gs/src/iht.h index ab3bbeb05..f9aab9453 100644 --- a/gs/src/iht.h +++ b/gs/src/iht.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Procedures exported by zht.c for zht1.c and zht2.c */ #ifndef iht_INCLUDED diff --git a/gs/src/iimage.h b/gs/src/iimage.h index e53d4b671..9dd61bac1 100644 --- a/gs/src/iimage.h +++ b/gs/src/iimage.h @@ -1,22 +1,10 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Image operator entry points */ /* Requires gscspace.h, gxiparam.h */ #ifndef iimage_INCLUDED diff --git a/gs/src/iimage2.h b/gs/src/iimage2.h index f742c2137..ae73d358d 100644 --- a/gs/src/iimage2.h +++ b/gs/src/iimage2.h @@ -1,22 +1,10 @@ /* Copyright (C) 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Level 2 image operator support */ /* Requires gsiparam.h */ #ifndef iimage2_INCLUDED diff --git a/gs/src/iinit.c b/gs/src/iinit.c index 5a95d9638..a0ca2d2a6 100644 --- a/gs/src/iinit.c +++ b/gs/src/iinit.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Initialize internally known objects for Ghostscript interpreter */ #include "string_.h" #include "ghost.h" @@ -370,13 +357,15 @@ zop_init(i_ctx_t *i_ctx_p) ref vtemp; make_const_string(&vtemp, a_readonly | avm_foreign, - strlen(gs_copyright), - (const byte *)gs_copyright); + strlen(gs_copyright), (const byte *)gs_copyright); initial_enter_name("copyright", &vtemp); make_const_string(&vtemp, a_readonly | avm_foreign, - strlen(gs_product), - (const byte *)gs_product); + strlen(gs_product), (const byte *)gs_product); initial_enter_name("product", &vtemp); + make_const_string(&vtemp, a_readonly | avm_foreign, + strlen(gs_productfamily), + (const byte *)gs_productfamily); + initial_enter_name("productfamily", &vtemp); make_int(&vtemp, gs_revision); initial_enter_name("revision", &vtemp); make_int(&vtemp, gs_revisiondate); diff --git a/gs/src/iinit.h b/gs/src/iinit.h index f98472eed..318cac1ed 100644 --- a/gs/src/iinit.h +++ b/gs/src/iinit.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* (Internal) interface to iinit.c */ #ifndef iinit_INCLUDED diff --git a/gs/src/ilevel.h b/gs/src/ilevel.h index cb96df982..8c0dd4b69 100644 --- a/gs/src/ilevel.h +++ b/gs/src/ilevel.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interpreter language level interface */ #ifndef ilevel_INCLUDED diff --git a/gs/src/ilocate.c b/gs/src/ilocate.c index b42686d58..68f374a9b 100644 --- a/gs/src/ilocate.c +++ b/gs/src/ilocate.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Object locating and validating for Ghostscript memory manager */ #include "ghost.h" #include "memory_.h" diff --git a/gs/src/imain.c b/gs/src/imain.c index 85075321b..a356e12d8 100644 --- a/gs/src/imain.c +++ b/gs/src/imain.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common support for interpreter front ends */ #include "memory_.h" #include "string_.h" diff --git a/gs/src/imain.h b/gs/src/imain.h index 5a6439133..71d3eb4a1 100644 --- a/gs/src/imain.h +++ b/gs/src/imain.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to imain.c */ /* Requires <stdio.h>, stdpre.h, gsmemory.h, gstypes.h, iref.h */ diff --git a/gs/src/imainarg.c b/gs/src/imainarg.c index dbbed4810..f555c1dea 100644 --- a/gs/src/imainarg.c +++ b/gs/src/imainarg.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Command line parsing and dispatching */ #include "ctype_.h" #include "memory_.h" @@ -792,7 +779,12 @@ print_emulators(void) for (pes = gs_emulator_name_array; pes->value.const_bytes != 0; pes++ ) - fprintf(stdout, " %s", pes->value.const_bytes); + /* + * Even though gs_emulator_name_array is declared and used as + * an array of string refs, each string is actually a + * (null terminated) C string. + */ + fprintf(stdout, " %s", (const char *)pes->value.const_bytes); } fprintf(stdout, "\n"); } diff --git a/gs/src/imainarg.h b/gs/src/imainarg.h index a3816f40b..e4fac9683 100644 --- a/gs/src/imainarg.h +++ b/gs/src/imainarg.h @@ -1,22 +1,9 @@ /* Copyright (C) 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* argv/argc interface to imainarg.c */ #ifndef imainarg_INCLUDED diff --git a/gs/src/imemory.h b/gs/src/imemory.h index a80826064..b5b7b003a 100644 --- a/gs/src/imemory.h +++ b/gs/src/imemory.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Ghostscript memory allocator extensions for interpreter level */ #ifndef imemory_INCLUDED diff --git a/gs/src/iminst.h b/gs/src/iminst.h index 9f55a87ad..1f03c7686 100644 --- a/gs/src/iminst.h +++ b/gs/src/iminst.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definition of interpreter instance */ /* Requires stdio_.h, gsmemory.h, iref.h */ diff --git a/gs/src/iname.c b/gs/src/iname.c index 79aa5b4fb..946168755 100644 --- a/gs/src/iname.c +++ b/gs/src/iname.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Name lookup for Ghostscript interpreter */ #include "memory_.h" #include "string_.h" @@ -52,6 +39,7 @@ gs_private_st_composite(st_name_table, name_table, "name_table", /* Forward references */ private int name_alloc_sub(P1(name_table *)); +private void name_free_sub(P2(name_table *, uint)); private void name_scan_sub(P3(name_table *, uint, bool)); /* Debugging printout */ @@ -89,6 +77,8 @@ names_init(ulong count, gs_ref_memory_t *imem) else if (count - 1 > max_name_count) return 0; nt = gs_alloc_struct(mem, name_table, &st_name_table, "name_init(nt)"); + if (nt == 0) + return 0; memset(nt, 0, sizeof(name_table)); nt->max_sub_count = ((count - 1) | nt_sub_index_mask) >> nt_log2_sub_size; @@ -96,8 +86,16 @@ names_init(ulong count, gs_ref_memory_t *imem) nt->memory = mem; /* Initialize the one-character names. */ /* Start by creating the necessary sub-tables. */ - for (i = 0; i < NT_1CHAR_FIRST + NT_1CHAR_SIZE; i += nt_sub_size) - name_alloc_sub(nt); + for (i = 0; i < NT_1CHAR_FIRST + NT_1CHAR_SIZE; i += nt_sub_size) { + int code = name_alloc_sub(nt); + + if (code < 0) { + while (nt->sub_next > 0) + name_free_sub(nt, --(nt->sub_next)); + gs_free_object(mem, nt, "name_init(nt)"); + return 0; + } + } for (i = -1; i < NT_1CHAR_SIZE; i++) { uint ncnt = NT_1CHAR_FIRST + i; uint nidx = name_count_to_index(ncnt); @@ -523,6 +521,18 @@ name_alloc_sub(name_table * nt) return 0; } +/* Free a sub-table. */ +private void +name_free_sub(name_table * nt, uint sub_index) +{ + gs_free_object(nt->memory, nt->sub[sub_index].strings, + "name_free_sub(string sub-table)"); + gs_free_object(nt->memory, nt->sub[sub_index].names, + "name_free_sub(sub-table)"); + nt->sub[sub_index].names = 0; + nt->sub[sub_index].strings = 0; +} + /* Scan a sub-table and add unmarked entries to the free list. */ /* We add the entries in decreasing count order, so the free list */ /* will stay sorted. If all entries are unmarked and free_empty is true, */ @@ -557,11 +567,7 @@ name_scan_sub(name_table * nt, uint sub_index, bool free_empty) nt->free = free; else { /* No marked entries, free the sub-table. */ - gs_free_object(nt->memory, ssub, "name_scan_sub(string sub-table)"); - gs_free_object(nt->memory, nt->sub[sub_index].names, - "name_scan_sub(sub-table)"); - nt->sub[sub_index].names = 0; - nt->sub[sub_index].strings = 0; + name_free_sub(nt, sub_index); if (sub_index == nt->sub_count - 1) { /* Back up over a final run of deleted sub-tables. */ do { diff --git a/gs/src/iname.h b/gs/src/iname.h index e9ccc18b1..3adaec2b7 100644 --- a/gs/src/iname.h +++ b/gs/src/iname.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interpreter's name table interface */ #ifndef iname_INCLUDED diff --git a/gs/src/inamedef.h b/gs/src/inamedef.h index 09539bb40..4ae0cec9d 100644 --- a/gs/src/inamedef.h +++ b/gs/src/inamedef.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Name table definition */ #ifndef inamedef_INCLUDED diff --git a/gs/src/inameidx.h b/gs/src/inameidx.h index b10857742..c526c2248 100644 --- a/gs/src/inameidx.h +++ b/gs/src/inameidx.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Name index definitions */ #ifndef inameidx_INCLUDED diff --git a/gs/src/inames.h b/gs/src/inames.h index d4b6ca1c3..eb3ef6aaf 100644 --- a/gs/src/inames.h +++ b/gs/src/inames.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Name table interface */ #ifndef inames_INCLUDED diff --git a/gs/src/inamestr.h b/gs/src/inamestr.h index 28bc6e2ab..ca77cc4c0 100644 --- a/gs/src/inamestr.h +++ b/gs/src/inamestr.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Name table strings definition */ #ifndef inamestr_INCLUDED diff --git a/gs/src/inobtokn.c b/gs/src/inobtokn.c index aee515b6e..f0346063e 100644 --- a/gs/src/inobtokn.c +++ b/gs/src/inobtokn.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Dummy scan_binary_token for Level 1 systems */ #include "ghost.h" #include "errors.h" diff --git a/gs/src/inouparm.c b/gs/src/inouparm.c index 4e37b5917..7ee896a91 100644 --- a/gs/src/inouparm.c +++ b/gs/src/inouparm.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Dummy set_user_params for Level 1 systems */ #include "ghost.h" #include "icontext.h" /* for set_user_params prototype */ diff --git a/gs/src/instcopy b/gs/src/instcopy index b3412440d..50d214f73 100755 --- a/gs/src/instcopy +++ b/gs/src/instcopy @@ -1,31 +1,44 @@ #!/bin/sh - +# $RCSfile$ $Revision$ # # Implement a uniform 'install' syntax independent of which of the two # "standard" install programs is installed. Based on ideas in, but not # copied from, the GNU fileutils install-sh script. Usage: -# instcopy -c [-m <mode>] <file> <dir> +# instcopy -c [-m <mode>] <srcfile> (<dstdir>|<dstfile>) + +doit="" +# Uncomment the following line for testing +#doit="echo " -c=$1 mode="" - if [ "$2" = "-m" ]; then mode=$3; shift; shift; else true; fi + while true; do + case "$1" in + -c) ;; + -m) mode=$2; shift ;; + *) break ;; + esac + shift; done -src=$2 -dst=$3 +src=$1 +dst=$2 - if [ x"$c" = x-c -a -f $src -a -d $dst ]; then true; else - echo "Usage: instcopy -c [-m <mode>] <file> <dir>" + if [ $# = 2 -a -f $src ]; then true; else + echo "Usage: instcopy -c [-m <mode>] <srcfile> (<dstdir>|<dstfile>)" exit 1 fi -dstdir=`echo $dst | sed -e 's,/$,,'` +if [ -d $dst ]; then + dstdir=`echo $dst | sed -e 's,/$,,'` + dst="$dstdir"/`basename $src` +else + dstdir=`echo $dst | sed -e 's,/[^/]*$,,'` +fi dsttmp=$dstdir/#inst.$$# -dst="$dstdir"/`basename $src` -cp $src $dsttmp && -trap "rm -f $dsttmp" 0 && -if [ x"$mode" != x ]; then chmod $mode $dsttmp; else true; fi && -rm -f $dst && -mv $dsttmp $dst && +$doit cp $src $dsttmp && +$doit trap "rm -f $dsttmp" 0 && +if [ x"$mode" != x ]; then $doit chmod $mode $dsttmp; else true; fi && +$doit rm -f $dst && +$doit mv $dsttmp $dst && exit 0 diff --git a/gs/src/int.mak b/gs/src/int.mak index 6e4330e90..175c599c0 100644 --- a/gs/src/int.mak +++ b/gs/src/int.mak @@ -1,21 +1,8 @@ # Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # (Platform-independent) makefile for PostScript and PDF language # interpreters. # Users of this makefile must define the following: @@ -280,27 +267,6 @@ $(PSOBJ)sfilter1.$(OBJ) : $(PSSRC)sfilter1.c $(AK) $(stdio__h) $(memory__h)\ $(sfilter_h) $(strimpl_h) $(PSCC) $(PSO_)sfilter1.$(OBJ) $(C_) $(PSSRC)sfilter1.c -# GNU readline. This code was contributed by a user: please contact -# Alexey Subbotin <A.Subbotin@lpi.ru> if you have questions. -# The references from a gp_ module to the interpreter are a bug, -# but they are intrinsic to what this implementation does. -# NOTE: please see gp_gnrdl.c for information about licensing problems -# that will arise if you add this feature to Aladdin Ghostscript. -gnrdline_=$(PSOBJ)gp_gnrdl.$(OBJ) -$(PSD)gnrdline.dev : $(INT_MAK) $(ECHOGS_XE) $(gnrdline_) - $(SETMOD) $(PSD)gnrdline $(gnrdline_) - $(ADDMOD) $(PSD)gnrdline -lib readline termcap - $(ADDMOD) $(PSD)gnrdline -replace $(GLD)strdline - $(ADDMOD) $(PSD)gnrdline -ps gs_rdlin - -$(PSOBJ)gp_gnrdl.$(OBJ) : $(PSSRC)gp_gnrdl.c $(AK)\ - $(ctype__h) $(malloc__h) $(memory__h) $(string__h)\ - $(gp_h) $(gscdefs_h) $(gsmalloc_h) $(gsmemory_h) $(gsstruct_h)\ - $(gxiodev_h) $(stream_h)\ - $(ghost_h) $(dstack_h) $(errors_h) $(ialloc_h) $(idict_h) $(iname_h) $(iutil_h)\ - $(ostack_h) - $(PSCC) $(PSO_)gp_gnrdl.$(OBJ) $(C_) $(PSSRC)gp_gnrdl.c - ###### Operators OP=$(GH) $(oper_h) @@ -1380,14 +1346,14 @@ $(PSOBJ)zfunc0.$(OBJ) : $(PSSRC)zfunc0.c $(OP) $(memory__h)\ # ---------------- DCT filters ---------------- # # The definitions for jpeg*.dev are in jpeg.mak. -$(PSD)dct.dev : $(INT_MAK) $(ECHOGS_XE) $(GLD)dcte.dev $(GLD)dctd.dev - $(SETMOD) $(PSD)dct -include $(GLD)dcte $(GLD)dctd +$(PSD)dct.dev : $(INT_MAK) $(ECHOGS_XE) $(PSD)dcte.dev $(PSD)dctd.dev + $(SETMOD) $(PSD)dct -include $(PSD)dcte $(PSD)dctd # Encoding (compression) -dcte_=$(PSOBJ)zfdcte.$(OBJ) $(GLOBJ)sdeparam.$(OBJ) $(GLOBJ)sdcparam.$(OBJ) -$(PSD)dcte.dev : $(INT_MAK) $(ECHOGS_XE) $(GLD)sdcte.dev $(dcte_) - $(SETMOD) $(PSD)dcte -include $(GLD)sdcte +dcte_=$(PSOBJ)zfdcte.$(OBJ) +$(PSD)dcte.dev : $(INT_MAK) $(ECHOGS_XE) $(GLD)sdcte.dev $(GLD)sdeparam.dev $(dcte_) + $(SETMOD) $(PSD)dcte -include $(GLD)sdcte $(GLD)sdeparam $(ADDMOD) $(PSD)dcte -obj $(dcte_) $(ADDMOD) $(PSD)dcte -oper zfdcte @@ -1400,9 +1366,9 @@ $(PSOBJ)zfdcte.$(OBJ) : $(PSSRC)zfdcte.c $(OP)\ # Decoding (decompression) -dctd_=$(PSOBJ)zfdctd.$(OBJ) $(GLOBJ)sddparam.$(OBJ) $(GLOBJ)sdcparam.$(OBJ) -$(PSD)dctd.dev : $(INT_MAK) $(ECHOGS_XE) $(GLD)sdctd.dev $(dctd_) - $(SETMOD) $(PSD)dctd -include $(GLD)sdctd +dctd_=$(PSOBJ)zfdctd.$(OBJ) +$(PSD)dctd.dev : $(INT_MAK) $(ECHOGS_XE) $(GLD)sdctd.dev $(GLD)sddparam.dev $(dctd_) + $(SETMOD) $(PSD)dctd -include $(GLD)sdctd $(GLD)sddparam $(ADDMOD) $(PSD)dctd -obj $(dctd_) $(ADDMOD) $(PSD)dctd -oper zfdctd diff --git a/gs/src/interp.c b/gs/src/interp.c index 015832bf0..16c3d1b06 100644 --- a/gs/src/interp.c +++ b/gs/src/interp.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Ghostscript language interpreter */ #include "memory_.h" #include "string_.h" @@ -423,6 +410,7 @@ interp_reclaim(i_ctx_t **pi_ctx_p, int space) * (This will eventually result in a fatal error if no 'stopped' * is active.) * In case of a quit or a fatal error, also store the exit code. + * Set *perror_object to null or the error object. */ private int gs_call_interp(P5(i_ctx_t **, ref *, int, int *, ref *)); int @@ -435,8 +423,6 @@ gs_interpret(i_ctx_t **pi_ctx_p, ref * pref, int user_errors, int *pexit_code, gs_register_ref_root(imemory_system, &error_root, (void **)&perror_object, "gs_interpret"); - /* Initialize the error object in case of GC. */ - make_null(perror_object); code = gs_call_interp(pi_ctx_p, pref, user_errors, pexit_code, perror_object); i_ctx_p = *pi_ctx_p; @@ -461,6 +447,8 @@ gs_call_interp(i_ctx_t **pi_ctx_p, ref * pref, int user_errors, *pexit_code = 0; ialloc_reset_requested(idmemory); again: + /* Avoid a dangling error object that might get traced by a future GC. */ + make_null(perror_object); o_stack.requested = e_stack.requested = d_stack.requested = 0; while (gc_signal) { /* Some routine below triggered a GC. */ gs_gc_root_t epref_root; @@ -469,11 +457,11 @@ again: /* Make sure that doref will get relocated properly if */ /* a garbage collection happens with epref == &doref. */ gs_register_ref_root(imemory_system, &epref_root, - (void **)&epref, "gs_call_interpret(epref)"); + (void **)&epref, "gs_call_interp(epref)"); code = interp_reclaim(pi_ctx_p, -1); i_ctx_p = *pi_ctx_p; gs_unregister_root(imemory_system, &epref_root, - "gs_call_interpret(epref)"); + "gs_call_interp(epref)"); if (code < 0) return code; } diff --git a/gs/src/interp.h b/gs/src/interp.h index 2d70161c3..22de1bebf 100644 --- a/gs/src/interp.h +++ b/gs/src/interp.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Internal interfaces to interp.c and iinit.c */ #ifndef interp_INCLUDED diff --git a/gs/src/iosdata.h b/gs/src/iosdata.h index 1b944626b..90d99e6f4 100644 --- a/gs/src/iosdata.h +++ b/gs/src/iosdata.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic operand stack API */ #ifndef iosdata_INCLUDED diff --git a/gs/src/iostack.h b/gs/src/iostack.h index 6924b3dff..661aae3b6 100644 --- a/gs/src/iostack.h +++ b/gs/src/iostack.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic operand stack API */ #ifndef iostack_INCLUDED diff --git a/gs/src/ipacked.h b/gs/src/ipacked.h index 416cc2baa..1a62d4ad5 100644 --- a/gs/src/ipacked.h +++ b/gs/src/ipacked.h @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1992, 1993, 1994, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Packed array format for Ghostscript */ #ifndef ipacked_INCLUDED diff --git a/gs/src/iparam.c b/gs/src/iparam.c index 1c45fb652..febccb413 100644 --- a/gs/src/iparam.c +++ b/gs/src/iparam.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interpreter implementations of parameter dictionaries */ #include "memory_.h" #include "string_.h" @@ -258,7 +245,7 @@ ref_param_write_typed(gs_param_list * plist, gs_param_name pkey, case gs_param_type_array: return ref_param_begin_write_collection(plist, pkey, &pvalue->value.d, - pvalue->type - gs_param_type_dict); + (gs_param_collection_type_t)(pvalue->type - gs_param_type_dict)); default: return_error(e_typecheck); } diff --git a/gs/src/iparam.h b/gs/src/iparam.h index 68039e156..90fe99133 100644 --- a/gs/src/iparam.h +++ b/gs/src/iparam.h @@ -1,22 +1,10 @@ /* Copyright (C) 1993, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions and interface for interpreter parameter list implementations */ /* Requires ialloc.h, istack.h */ #ifndef iparam_INCLUDED diff --git a/gs/src/iparray.h b/gs/src/iparray.h index 17ea0597d..515ac3429 100644 --- a/gs/src/iparray.h +++ b/gs/src/iparray.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Packed array constructor for Ghostscript */ /* Requires ipacked.h, istack.h */ diff --git a/gs/src/ipcolor.h b/gs/src/ipcolor.h index fdf118d61..02ece4c66 100644 --- a/gs/src/ipcolor.h +++ b/gs/src/ipcolor.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interpreter definitions for Pattern color */ #ifndef ipcolor_INCLUDED diff --git a/gs/src/ireclaim.c b/gs/src/ireclaim.c index 0847ca24c..012f3185e 100644 --- a/gs/src/ireclaim.c +++ b/gs/src/ireclaim.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interpreter's interface to garbage collector */ #include "ghost.h" #include "errors.h" diff --git a/gs/src/iref.h b/gs/src/iref.h index a6958cc02..42a3a4246 100644 --- a/gs/src/iref.h +++ b/gs/src/iref.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Object structure and type definitions for Ghostscript */ #ifndef iref_INCLUDED diff --git a/gs/src/isave.c b/gs/src/isave.c index 10507b2f2..d3d708104 100644 --- a/gs/src/isave.c +++ b/gs/src/isave.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Save/restore manager for Ghostscript interpreter */ #include "ghost.h" #include "memory_.h" diff --git a/gs/src/isave.h b/gs/src/isave.h index ec3add9cc..69e2e2e3d 100644 --- a/gs/src/isave.h +++ b/gs/src/isave.h @@ -1,22 +1,10 @@ /* Copyright (C) 1991, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Procedures for save/restore */ /* Requires imemory.h */ #ifndef isave_INCLUDED diff --git a/gs/src/iscan.c b/gs/src/iscan.c index f3d139251..8b2c91046 100644 --- a/gs/src/iscan.c +++ b/gs/src/iscan.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Token scanner for Ghostscript interpreter */ #include "ghost.h" #include "memory_.h" diff --git a/gs/src/iscan.h b/gs/src/iscan.h index 908eef2c2..1bcbf1cc8 100644 --- a/gs/src/iscan.h +++ b/gs/src/iscan.h @@ -1,22 +1,10 @@ /* Copyright (C) 1992, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Token scanner state and interface */ /* Requires gsstruct.h, ostack.h, stream.h */ #ifndef iscan_INCLUDED diff --git a/gs/src/iscanbin.c b/gs/src/iscanbin.c index 6448d102b..55751f944 100644 --- a/gs/src/iscanbin.c +++ b/gs/src/iscanbin.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1994, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Ghostscript binary token scanner and writer */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/iscanbin.h b/gs/src/iscanbin.h index b2e856dd7..501949821 100644 --- a/gs/src/iscanbin.h +++ b/gs/src/iscanbin.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to binary token scanner */ #ifndef iscanbin_INCLUDED diff --git a/gs/src/iscannum.c b/gs/src/iscannum.c index 8654b081d..9c460a2ff 100644 --- a/gs/src/iscannum.c +++ b/gs/src/iscannum.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Number scanner for Ghostscript interpreter */ #include "math_.h" #include "ghost.h" diff --git a/gs/src/iscannum.h b/gs/src/iscannum.h index f4ce1e1c1..4997dabff 100644 --- a/gs/src/iscannum.h +++ b/gs/src/iscannum.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to Ghostscript number scanner */ #ifndef iscannum_INCLUDED diff --git a/gs/src/isdata.h b/gs/src/isdata.h index 3828f4c0d..b1f0003a9 100644 --- a/gs/src/isdata.h +++ b/gs/src/isdata.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Structure for expandable stacks of refs */ /* Requires iref.h */ diff --git a/gs/src/isstate.h b/gs/src/isstate.h index bf3465832..a81d7b55b 100644 --- a/gs/src/isstate.h +++ b/gs/src/isstate.h @@ -1,22 +1,10 @@ /* Copyright (C) 1993, 1995, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definition of 'save' structure */ /* Requires isave.h */ #ifndef isstate_INCLUDED diff --git a/gs/src/istack.c b/gs/src/istack.c index 9f7caa14d..240822051 100644 --- a/gs/src/istack.c +++ b/gs/src/istack.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Manager for expandable stacks of refs */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/istack.h b/gs/src/istack.h index 459ee3846..69bcbd2ad 100644 --- a/gs/src/istack.h +++ b/gs/src/istack.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for expandable stacks of refs */ /* Requires iref.h */ diff --git a/gs/src/istkparm.h b/gs/src/istkparm.h index 3ca9362d7..fa14c53ab 100644 --- a/gs/src/istkparm.h +++ b/gs/src/istkparm.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Parameter structure for expandable stacks of refs */ #ifndef istkparm_INCLUDED diff --git a/gs/src/istream.h b/gs/src/istream.h index e71acffa9..8d04ca507 100644 --- a/gs/src/istream.h +++ b/gs/src/istream.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994, 1995, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Interpreter support procedures for streams */ /* Requires scommon.h */ #ifndef istream_INCLUDED diff --git a/gs/src/istruct.h b/gs/src/istruct.h index c4a6af198..36023e429 100644 --- a/gs/src/istruct.h +++ b/gs/src/istruct.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interpreter-level extension of gsstruct.h */ #ifndef istruct_INCLUDED diff --git a/gs/src/iutil.c b/gs/src/iutil.c index 0f2d84d06..05485002e 100644 --- a/gs/src/iutil.c +++ b/gs/src/iutil.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Utilities for Ghostscript interpreter */ #include "math_.h" /* for fabs */ #include "memory_.h" @@ -499,7 +486,7 @@ ensure_dot(char *buf) strcpy(buf1, ept); strcpy(ept, ".0"); - strcat(buf, ept); + strcat(ept, buf1); } } } diff --git a/gs/src/iutil.h b/gs/src/iutil.h index 2a0a0c9c2..8d05e9cc4 100644 --- a/gs/src/iutil.h +++ b/gs/src/iutil.h @@ -1,22 +1,10 @@ /* Copyright (C) 1991, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Interface to interpreter utilities */ /* Requires imemory.h, ostack.h */ #ifndef iutil_INCLUDED diff --git a/gs/src/iutil2.c b/gs/src/iutil2.c index b0c5195a2..bd607f542 100644 --- a/gs/src/iutil2.c +++ b/gs/src/iutil2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Level 2 utilities for Ghostscript interpreter */ #include "memory_.h" #include "string_.h" diff --git a/gs/src/iutil2.h b/gs/src/iutil2.h index eb64726c2..920e98336 100644 --- a/gs/src/iutil2.h +++ b/gs/src/iutil2.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface to procedures in iutil2.c */ #ifndef iutil2_INCLUDED diff --git a/gs/src/iutilasm.asm b/gs/src/iutilasm.asm index d5a7027fe..0856b78c1 100644 --- a/gs/src/iutilasm.asm +++ b/gs/src/iutilasm.asm @@ -1,21 +1,8 @@ ; Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. -; -; This file is part of Aladdin Ghostscript. -; -; Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -; or distributor accepts any responsibility for the consequences of using it, -; or for whether it serves any particular purpose or works at all, unless he -; or she says so in writing. Refer to the Aladdin Ghostscript Free Public -; License (the "License") for full details. -; -; Every copy of Aladdin Ghostscript must include a copy of the License, -; normally in a plain ASCII text file named PUBLIC. The License grants you -; the right to copy, modify and redistribute Aladdin Ghostscript, but only -; under certain conditions described in the License. Among other things, the -; License requires that the copyright notice and this notice be preserved on -; all copies. - +; This software is licensed to a single customer by Artifex Software Inc. +; under the terms of a specific OEM agreement. +; $RCSfile$ $Revision$ ; iutilasm.asm ; Assembly code for Ghostscript interpreter on MS-DOS systems diff --git a/gs/src/ivmem2.h b/gs/src/ivmem2.h index 9fe8750ec..49ef30d52 100644 --- a/gs/src/ivmem2.h +++ b/gs/src/ivmem2.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* VM control user parameter procedures */ #ifndef ivmem2_INCLUDED diff --git a/gs/src/ivmspace.h b/gs/src/ivmspace.h index 60b22d0d4..47d9bcd82 100644 --- a/gs/src/ivmspace.h +++ b/gs/src/ivmspace.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1994, 1996, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Local/global space management */ /* Requires iref.h */ diff --git a/gs/src/jerror_.h b/gs/src/jerror_.h index ff92274e2..8a299562d 100644 --- a/gs/src/jerror_.h +++ b/gs/src/jerror_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Wrapper for jerror.h */ #if SHARE_JPEG diff --git a/gs/src/jpeg.mak b/gs/src/jpeg.mak index 780f593cc..334090357 100644 --- a/gs/src/jpeg.mak +++ b/gs/src/jpeg.mak @@ -1,21 +1,8 @@ # Copyright (C) 1994, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for Independent JPEG Group library code. # Users of this makefile must define the following: # GSSRCDIR - the GS library source directory diff --git a/gs/src/lib.mak b/gs/src/lib.mak index e0428ad74..8d5da46a5 100644 --- a/gs/src/lib.mak +++ b/gs/src/lib.mak @@ -1,21 +1,8 @@ # Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # (Platform-independent) makefile for Ghostscript graphics library # and other support code. # Users of this makefile must define the following: @@ -176,7 +163,8 @@ $(GLOBJ)gsmemret.$(OBJ) : $(GLSRC)gsmemret.c $(GXERR) $(gsmemret_h) $(GLCC) $(GLO_)gsmemret.$(OBJ) $(C_) $(GLSRC)gsmemret.c # gsnogc is not part of the base configuration. -# This is available as a .dev so it can be used by non PS parsers +# We make it available as a .dev so it can be used in configurations that +# don't include the garbage collector, as well as by the "async" logic. gsnogc_=$(GLOBJ)gsnogc.$(OBJ) $(GLD)gsnogc.dev : $(LIB_MAK) $(ECHOGS_XE) $(gsnogc_) $(SETMOD) $(GLD)gsnogc $(gsnogc_) @@ -502,7 +490,7 @@ $(GLOBJ)gxdither.$(OBJ) : $(GLSRC)gxdither.c $(GX)\ $(gxcmap_h) $(gxdevice_h) $(gxdither_h) $(gxlum_h) $(gzht_h) $(GLCC) $(GLO_)gxdither.$(OBJ) $(C_) $(GLSRC)gxdither.c -$(GLOBJ)gxfill.$(OBJ) : $(GLSRC)gxfill.c $(GXERR) $(math__h)\ +$(GLOBJ)gxfill.$(OBJ) : $(GLSRC)gxfill.c $(GXERR)\ $(gsstruct_h)\ $(gxdcolor_h) $(gxdevice_h) $(gxfixed_h) $(gxhttile_h)\ $(gxistate_h) $(gxpaint_h)\ @@ -1068,6 +1056,10 @@ $(GLOBJ)sjpege.$(OBJ) : $(GLSRC)sjpege.c $(AK)\ # sdeparam is used by the filter operator and the PS/PDF writer. # It is not included automatically in sdcte. +sdeparam_=$(GLOBJ)sdeparam.$(OBJ) $(GLOBJ)sdcparam.$(OBJ) +$(GLD)sdeparam.dev : $(LIB_MAK) $(ECHOGS_XE) $(sdeparam_) + $(SETMOD) $(GLD)sdeparam $(sdeparam_) + $(GLOBJ)sdeparam.$(OBJ) : $(GLSRC)sdeparam.c $(AK) $(memory__h)\ $(jpeglib__h)\ $(gserror_h) $(gserrors_h) $(gsmemory_h) $(gsparam_h) $(gstypes_h)\ @@ -1095,6 +1087,10 @@ $(GLOBJ)sjpegd.$(OBJ) : $(GLSRC)sjpegd.c $(AK)\ # sddparam is used by the filter operator. # It is not included automatically in sdctd. +sddparam_=$(GLOBJ)sddparam.$(OBJ) $(GLOBJ)sdcparam.$(OBJ) +$(GLD)sddparam.dev : $(LIB_MAK) $(ECHOGS_XE) $(sddparam_) + $(SETMOD) $(GLD)sddparam $(sddparam_) + $(GLOBJ)sddparam.$(OBJ) : $(GLSRC)sddparam.c $(AK) $(std_h)\ $(jpeglib__h)\ $(gserror_h) $(gserrors_h) $(gsmemory_h) $(gsparam_h) $(gstypes_h)\ @@ -1104,9 +1100,7 @@ $(GLOBJ)sddparam.$(OBJ) : $(GLSRC)sddparam.c $(AK) $(std_h)\ # ---------------- LZW filters ---------------- # # These are used by Level 2 in general. -slzwe_=slzwce -#slzwe_=slzwe -lzwe_=$(GLOBJ)$(slzwe_).$(OBJ) $(GLOBJ)slzwc.$(OBJ) +lzwe_=$(GLOBJ)slzwce.$(OBJ) $(GLOBJ)slzwc.$(OBJ) $(GLD)lzwe.dev : $(LIB_MAK) $(ECHOGS_XE) $(lzwe_) $(SETMOD) $(GLD)lzwe $(lzwe_) @@ -1118,10 +1112,6 @@ $(GLOBJ)slzwce.$(OBJ) : $(GLSRC)slzwce.c $(AK) $(stdio__h) $(gdebug_h)\ $(slzwx_h) $(strimpl_h) $(GLCC) $(GLO_)slzwce.$(OBJ) $(C_) $(GLSRC)slzwce.c -$(GLOBJ)slzwe.$(OBJ) : $(GLSRC)slzwe.c $(AK) $(stdio__h) $(gdebug_h)\ - $(slzwx_h) $(strimpl_h) - $(GLCC) $(GLO_)slzwe.$(OBJ) $(C_) $(GLSRC)slzwe.c - $(GLOBJ)slzwc.$(OBJ) : $(GLSRC)slzwc.c $(AK) $(std_h)\ $(slzwx_h) $(strimpl_h) $(GLCC) $(GLO_)slzwc.$(OBJ) $(C_) $(GLSRC)slzwc.c @@ -1537,7 +1527,7 @@ gxpageq_h=$(GLSRC)gxpageq.h $(gsmemory_h) $(gxband_h) $(gxsync_h) gdevprna_h=$(GLSRC)gdevprna.h $(gdevprn_h) $(gxsync_h) async_=$(GLOBJ)gdevprna.$(OBJ) $(GLOBJ)gxpageq.$(OBJ) -async_inc=$(GLD)clist.dev $(GLD)$(SYNC).dev $(GLD)gsnogc.dev +async_inc=$(GLD)clist.dev $(GLD)gsnogc.dev $(GLD)$(SYNC).dev $(GLD)async.dev : $(LIB_MAK) $(ECHOGS_XE) $(async_) $(async_inc) $(SETMOD) $(GLD)async $(async_) $(ADDMOD) $(GLD)async -include $(async_inc) @@ -1647,7 +1637,7 @@ $(GLOBJ)gxhint2.$(OBJ) : $(GLSRC)gxhint2.c $(GXERR) $(memory__h)\ $(gxfont_h) $(gxfont1_h) $(gxtype1_h) $(GLCC) $(GLO_)gxhint2.$(OBJ) $(C_) $(GLSRC)gxhint2.c -$(GLOBJ)gxhint3.$(OBJ) : $(GLSRC)gxhint3.c $(GXERR) $(math__h)\ +$(GLOBJ)gxhint3.$(OBJ) : $(GLSRC)gxhint3.c $(GXERR)\ $(gxarith_h) $(gxfixed_h) $(gxmatrix_h)\ $(gxfont_h) $(gxfont1_h) $(gxtype1_h)\ $(gzpath_h) @@ -1690,7 +1680,7 @@ $(GLD)ttflib.dev : $(LIB_MAK) $(ECHOGS_XE) $(ttflib_) gxfont42_h=$(GLSRC)gxfont42.h $(GLOBJ)gstype42.$(OBJ) : $(GLSRC)gstype42.c $(GXERR) $(memory__h)\ - $(gsccode_h) $(gsmatrix_h) $(gsstruct_h)\ + $(gsccode_h) $(gsmatrix_h) $(gsstruct_h) $(gsutil_h)\ $(gxfixed_h) $(gxfont_h) $(gxfont42_h) $(gxistate_h) $(gxpath_h) $(GLCC) $(GLO_)gstype42.$(OBJ) $(C_) $(GLSRC)gstype42.c @@ -2093,6 +2083,11 @@ $(GLOBJ)gp_posem.$(OBJ) : $(GLSRC)gp_posem.c $(AK) $(std_h)\ $(gpsync_h) $(gserror_h) $(gserrors_h) $(GLCC) $(GLO_)gp_posem.$(OBJ) $(C_) $(GLSRC)gp_posem.c +# (POSIX) pthreads semaphores. DOESN'T WORK. +$(GLOBJ)gp_ptsem.$(OBJ) : $(GLSRC)gp_ptsem.c $(AK) $(std_h)\ + $(gpsync_h) $(gserror_h) $(gserrors_h) + $(GLCC) $(GLO_)gp_ptsem.$(OBJ) $(C_) $(GLSRC)gp_ptsem.c + # Monitors built out of semaphores. $(GLOBJ)gp_semon.$(OBJ) : $(GLSRC)gp_semon.c $(AK) $(std_h)\ $(gpsync_h) $(gserror_h) $(gserrors_h) @@ -2103,7 +2098,7 @@ pthreads_=$(GLOBJ)gp_pthr.$(OBJ) $(GLD)pthreads.dev : $(LIB_MAK) $(ECHOGS_XE) $(pthreads_) $(SETMOD) $(GLD)pthreads $(pthreads_) -lib pthread -$(GLOBJ)gp_pthr.$(OBJ) : $(GLSRC)gp_pthr.c $(AK) $(std_h)\ +$(GLOBJ)gp_pthr.$(OBJ) : $(GLSRC)gp_pthr.c $(AK) $(malloc__h) $(std_h)\ $(gpsync_h) $(gserror_h) $(gserrors_h) $(GLCC) $(GLO_)gp_pthr.$(OBJ) $(C_) $(GLSRC)gp_pthr.c @@ -2113,6 +2108,11 @@ $(GLD)posync.dev : $(LIB_MAK) $(ECHOGS_XE) $(posync_) $(GLD)pthreads.dev $(SETMOD) $(GLD)posync $(posync_) -include $(GLD)pthreads $(ADDMOD) $(GLD)posync -replace $(GLD)nosync +# FreeBSD has its own, idiosyncratic pthreads implementation. +$(GLD)fbsdsync.dev : $(LIB_MAK) $(ECHOGS_XE) $(posync_) + $(SETMOD) $(GLD)fbsdsync $(posync_) -lib c_r + $(ADDMOD) $(GLD)fbsdsync -replace $(GLD)nosync + # Other stuff. # Other MS-DOS facilities. diff --git a/gs/src/libpng.mak b/gs/src/libpng.mak index 2789a968d..59940ca8d 100644 --- a/gs/src/libpng.mak +++ b/gs/src/libpng.mak @@ -1,21 +1,8 @@ # Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for PNG (Portable Network Graphics) code. # Users of this makefile must define the following: # ZSRCDIR - the zlib source directory diff --git a/gs/src/main.h b/gs/src/main.h index 44b68688e..7a66acf50 100644 --- a/gs/src/main.h +++ b/gs/src/main.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Backward-compatible interface to gsmain.c */ #ifndef main_INCLUDED diff --git a/gs/src/malloc_.h b/gs/src/malloc_.h index 7ccb13fea..ab9cc2b03 100644 --- a/gs/src/malloc_.h +++ b/gs/src/malloc_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic substitute for Unix malloc.h */ #ifndef malloc__INCLUDED diff --git a/gs/src/math_.h b/gs/src/math_.h index 6fca7aee8..75550fc3f 100644 --- a/gs/src/math_.h +++ b/gs/src/math_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic substitute for math.h */ #ifndef math__INCLUDED diff --git a/gs/src/md5.c b/gs/src/md5.c index 0dbff594d..c70a0de35 100644 --- a/gs/src/md5.c +++ b/gs/src/md5.c @@ -21,19 +21,23 @@ ghost@aladdin.com */ +/*$RCSfile$ $Revision$ */ /* + Independent implementation of MD5 (RFC 1321). + This code implements the MD5 Algorithm defined in RFC 1321. It is derived directly from the text of the RFC and not from the reference implementation. - The original and principal author of ansi2knr is L. Peter Deutsch + The original and principal author of md5.c is L. Peter Deutsch <ghost@aladdin.com>. Other authors are noted in the change history that follows (in reverse chronological order): + 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. + 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). 1999-05-03 lpd Original version. */ - #include "md5.h" #ifdef TEST diff --git a/gs/src/md5.h b/gs/src/md5.h index 1d3b6e444..134ff8fe6 100644 --- a/gs/src/md5.h +++ b/gs/src/md5.h @@ -21,19 +21,25 @@ ghost@aladdin.com */ +/*$RCSfile$ $Revision$ */ /* + Independent implementation of MD5 (RFC 1321). + This code implements the MD5 Algorithm defined in RFC 1321. It is derived directly from the text of the RFC and not from the reference implementation. - The original and principal author of ansi2knr is L. Peter Deutsch + The original and principal author of md5.h is L. Peter Deutsch <ghost@aladdin.com>. Other authors are noted in the change history that follows (in reverse chronological order): + 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. + 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); + added conditionalization for C++ compilation from Martin + Purschke <purschke@bnl.gov>. 1999-05-03 lpd Original version. */ - #ifndef md5_INCLUDED # define md5_INCLUDED @@ -55,6 +61,11 @@ typedef struct md5_state_s { md5_byte_t buf[64]; /* accumulate block */ } md5_state_t; +#ifdef __cplusplus +extern "C" +{ +#endif + /* Initialize the algorithm. */ #ifdef P1 void md5_init(P1(md5_state_t *pms)); @@ -76,4 +87,8 @@ void md5_finish(P2(md5_state_t *pms, md5_byte_t digest[16])); void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); #endif +#ifdef __cplusplus +} /* end extern "C" */ +#endif + #endif /* md5_INCLUDED */ diff --git a/gs/src/memory_.h b/gs/src/memory_.h index 80f131009..1ad311973 100644 --- a/gs/src/memory_.h +++ b/gs/src/memory_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1994, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic substitute for Unix memory.h */ #ifndef memory__INCLUDED diff --git a/gs/src/msvc32.mak b/gs/src/msvc32.mak index 48cdbf02a..972e6e510 100644 --- a/gs/src/msvc32.mak +++ b/gs/src/msvc32.mak @@ -1,21 +1,8 @@ # Copyright (C) 1991-1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for 32-bit Microsoft Visual C++, Windows NT or Windows 95 platform. # # All configurable options are surrounded by !ifndef/!endif to allow @@ -34,10 +21,48 @@ # ------ Generic options ------ # +# Define the directory for the final executable, and the +# source, generated intermediate file, and object directories +# for the graphics library (GL) and the PostScript/PDF interpreter (PS). + +!ifndef BINDIR +BINDIR=.\bin +!endif +!ifndef GLSRCDIR +GLSRCDIR=.\src +!endif +!ifndef GLGENDIR +GLGENDIR=.\obj +!endif +!ifndef GLOBJDIR +GLOBJDIR=.\obj +!endif +!ifndef PSSRCDIR +PSSRCDIR=.\src +!endif +!ifndef PSLIBDIR +PSLIBDIR=.\lib +!endif +!ifndef PSGENDIR +PSGENDIR=.\obj +!endif +!ifndef PSOBJDIR +PSOBJDIR=.\obj +!endif + +# Define the root directory for Ghostscript installation. + +!ifndef AROOTDIR +AROOTDIR=c:/Aladdin +!endif +!ifndef GSROOTDIR +GSROOTDIR=$(AROOTDIR)/gs$(GS_DOT_VERSION) +!endif + # Define the directory that will hold documentation at runtime. !ifndef GS_DOCDIR -GS_DOCDIR=c:/gs +GS_DOCDIR=$(GSROOTDIR)/doc !endif # Define the default directory/ies for the runtime initialization and @@ -47,7 +72,7 @@ GS_DOCDIR=c:/gs # illegal escape. !ifndef GS_LIB_DEFAULT -GS_LIB_DEFAULT=.;c:/gs/lib;c:/gs/fonts +GS_LIB_DEFAULT=$(GSROOTDIR)/lib;$(AROOTDIR)/fonts !endif # Define whether or not searching for initialization files should always @@ -108,6 +133,18 @@ GSCONSOLE=gswin32c GSDLL=gsdll32 !endif +!ifndef BUILD_TIME_GS +# Define the name of a pre-built executable that can be invoked at build +# time. Currently, this is only needed for compiled fonts. The usual +# alternatives are: +# - the standard name of Ghostscript on your system (typically `gs'): +BUILD_TIME_GS=gswin32c +# - the name of the executable you are building now. If you choose this +# option, then you must build the executable first without compiled fonts, +# and then again with compiled fonts. +#BUILD_TIME_GS=$(BINDIR)\$(GS) -I$(PSLIBDIR) +!endif + # To build two small executables and a large DLL use MAKEDLL=1 # To build two large executables use MAKEDLL=0 @@ -115,35 +152,6 @@ GSDLL=gsdll32 MAKEDLL=1 !endif -# Define the directory for the final executable, and the -# source, generated intermediate file, and object directories -# for the graphics library (GL) and the PostScript/PDF interpreter (PS). - -!ifndef BINDIR -BINDIR=.\bin -!endif -!ifndef GLSRCDIR -GLSRCDIR=.\src -!endif -!ifndef GLGENDIR -GLGENDIR=.\obj -!endif -!ifndef GLOBJDIR -GLOBJDIR=.\obj -!endif -!ifndef PSSRCDIR -PSSRCDIR=.\src -!endif -!ifndef PSLIBDIR -PSLIBDIR=.\lib -!endif -!ifndef PSGENDIR -PSGENDIR=.\obj -!endif -!ifndef PSOBJDIR -PSOBJDIR=.\obj -!endif - # Define the directory where the IJG JPEG library sources are stored, # and the major version of the library that is stored there. # You may need to change this if the IJG library version changes. @@ -300,14 +308,14 @@ SYNC=winsync # Choose the language feature(s) to include. See gs.mak for details. !ifndef FEATURE_DEVS -FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)mshandle.dev $(PSD)pipe.dev +FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)mshandle.dev $(GLD)pipe.dev !endif # Choose whether to compile the .ps initialization files into the executable. # See gs.mak for details. !ifndef COMPILE_INITS -COMPILE_INITS=0 +COMPILE_INITS=1 !endif # Choose whether to store band lists on files or in memory. @@ -385,7 +393,7 @@ TOP_MAKEFILES=$(MAKEFILE) $(GLSRCDIR)\msvccmd.mak $(GLSRCDIR)\msvctail.mak $(GLS # nmake expands macros when encountered, not when used, # so this must precede the !include statements. -BEGINFILES2=$(GLOBJDIR)\gs*32*.exp $(GLOBJDIR)\gs*32*.ilk $(GLOBJDIR)\gs*32*.pdb $(GLOBJDIR)\gs*32*.lib $(GLGENDIR)\lib32.rsp +BEGINFILES2=$(GLOBJDIR)\*.exp $(GLOBJDIR)\*.ilk $(GLOBJDIR)\*.pdb $(GLOBJDIR)\*.lib $(GLGENDIR)\lib32.rsp $(GLOBJDIR)\dw*.res $(SETUP_XE) $(UNINSTALL_XE) $(BINDIR)\*.exp $(BINDIR)\*.ilk $(BINDIR)\*.pdb $(BINDIR)\*.lib !include $(GLSRCDIR)\msvccmd.mak !include $(GLSRCDIR)\winlib.mak @@ -403,7 +411,7 @@ $(GLGEN)lib32.rsp: $(TOP_MAKEFILES) !if $(MAKEDLL) # The graphical small EXE loader -$(GS_XE): $(GSDLL_DLL) $(DWOBJ) $(GSCONSOLE_XE) +$(GS_XE): $(GSDLL_DLL) $(DWOBJ) $(GSCONSOLE_XE) $(SETUP_XE) $(UNINSTALL_XE) echo /SUBSYSTEM:WINDOWS > $(GLGEN)gswin32.rsp echo /DEF:$(GLSRCDIR)\dwmain32.def /OUT:$(GS_XE) >> $(GLGEN)gswin32.rsp $(LINK) $(LCT) @$(GLGEN)gswin32.rsp $(DWOBJ) @$(LIBCTR) $(GS_OBJ).res @@ -451,4 +459,33 @@ $(GSCONSOLE_XE): $(GS_ALL) $(DEVS_ALL) $(GLOBJ)gsdll.$(OBJ) $(OBJCNO) $(GS_OBJ). del $(GLGEN)gswin32c.tr !endif +# ---------------------- Setup and uninstall programs ---------------------- # + +!if $(MAKEDLL) + +$(SETUP_XE): $(GLOBJ)dwsetup.obj $(GLOBJ)dwinst.obj $(GLOBJ)dwsetup.res $(GLSRC)dwsetup.def + echo /DEF:$(GLSRC)dwsetup.def /OUT:$(SETUP_XE) > $(GLGEN)dwsetup.rsp + echo $(GLOBJ)dwsetup.obj $(GLOBJ)dwinst.obj >> $(GLGEN)dwsetup.rsp + copy $(LIBCTR) $(GLGEN)dwsetup.tr + echo $(LIBDIR)\ole32.lib >> $(GLGEN)dwsetup.tr + echo $(LIBDIR)\uuid.lib >> $(GLGEN)dwsetup.tr + $(LINK_SETUP) + $(LINK) $(LCT) @$(GLGEN)dwsetup.rsp @$(GLGEN)dwsetup.tr $(GLOBJ)dwsetup.res + del $(GLGEN)dwsetup.rsp + del $(GLGEN)dwsetup.tr + +$(UNINSTALL_XE): $(GLOBJ)dwuninst.obj $(GLOBJ)dwuninst.res $(GLSRC)dwuninst.def + echo /DEF:$(GLSRC)dwuninst.def /OUT:$(UNINSTALL_XE) > $(GLGEN)dwuninst.rsp + echo $(GLOBJ)dwuninst.obj >> $(GLGEN)dwuninst.rsp + copy $(LIBCTR) $(GLGEN)dwuninst.tr + echo $(LIBDIR)\ole32.lib >> $(GLGEN)dwuninst.tr + echo $(LIBDIR)\uuid.lib >> $(GLGEN)dwuninst.tr + $(LINK_SETUP) + $(LINK) $(LCT) @$(GLGEN)dwuninst.rsp @$(GLGEN)dwuninst.tr $(GLOBJ)dwuninst.res + del $(GLGEN)dwuninst.rsp + del $(GLGEN)dwuninst.tr + +!endif + + # end of makefile diff --git a/gs/src/msvccmd.mak b/gs/src/msvccmd.mak index 9108e4fc9..2ea8cb211 100644 --- a/gs/src/msvccmd.mak +++ b/gs/src/msvccmd.mak @@ -1,21 +1,8 @@ # Copyright (C) 1997, 1998 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Command definition section for Microsoft Visual C++ 4.x/5.x, # Windows NT or Windows 95 platform. # Created 1997-05-22 by L. Peter Deutsch from msvc4/5 makefiles. diff --git a/gs/src/msvclib.mak b/gs/src/msvclib.mak index 1375d23e5..af51a6251 100644 --- a/gs/src/msvclib.mak +++ b/gs/src/msvclib.mak @@ -1,21 +1,8 @@ # Copyright (C) 1991-1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for Microsoft Visual C++ 4.1 or later, Windows NT or Windows 95 LIBRARY. # # All configurable options are surrounded by !ifndef/!endif to allow @@ -27,10 +14,19 @@ # ------ Generic options ------ # +# Define the root directory for Ghostscript installation. + +!ifndef AROOTDIR +AROOTDIR=c:/Aladdin +!endif +!ifndef GSROOTDIR +GSROOTDIR=$(AROOTDIR)/gs$(GS_DOT_VERSION) +!endif + # Define the directory that will hold documentation at runtime. !ifndef GS_DOCDIR -GS_DOCDIR=c:/gs +GS_DOCDIR=$(GSROOTDIR)/doc !endif # Define the default directory/ies for the runtime initialization and @@ -40,7 +36,7 @@ GS_DOCDIR=c:/gs # illegal escape. !ifndef GS_LIB_DEFAULT -GS_LIB_DEFAULT=.;c:/gs/lib;c:/gs/fonts +GS_LIB_DEFAULT=$(GSROOTDIR)/lib;$(AROOTDIR)/fonts !endif # Define whether or not searching for initialization files should always @@ -251,7 +247,7 @@ FEATURE_DEVS=dps2lib.dev psl2cs.dev cielib.dev imasklib.dev patlib.dev htxlib.de # See gs.mak for details. !ifndef COMPILED_INITS -COMPILE_INITS=0 +COMPILE_INITS=1 !endif # Choose whether to store band lists on files or in memory. diff --git a/gs/src/msvctail.mak b/gs/src/msvctail.mak index 77858aa02..5d0adc7b9 100644 --- a/gs/src/msvctail.mak +++ b/gs/src/msvctail.mak @@ -1,21 +1,8 @@ # Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Common tail section for Microsoft Visual C++ 4.x/5.x, # Windows NT or Windows 95 platform. # Created 1997-05-22 by L. Peter Deutsch from msvc4/5 makefiles. diff --git a/gs/src/mv.bat b/gs/src/mv.bat index 8b2dfeb24..4757963f4 100755 --- a/gs/src/mv.bat +++ b/gs/src/mv.bat @@ -1,2 +1,2 @@ - +@rem $RCSfile$ $Revision$ @rename %1 %2 diff --git a/gs/src/mv.cmd b/gs/src/mv.cmd index 47a3c6412..d40b35e0b 100755 --- a/gs/src/mv.cmd +++ b/gs/src/mv.cmd @@ -1,2 +1,2 @@ @rename %1 %2 - +@rem $RCSfile$ $Revision$ diff --git a/gs/src/oparc.h b/gs/src/oparc.h index 7d79a04b1..a920e91d8 100644 --- a/gs/src/oparc.h +++ b/gs/src/oparc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Arc operator declarations */ #ifndef oparc_INCLUDED diff --git a/gs/src/opcheck.h b/gs/src/opcheck.h index 6e9283e53..b97597757 100644 --- a/gs/src/opcheck.h +++ b/gs/src/opcheck.h @@ -1,22 +1,10 @@ /* Copyright (C) 1993, 1995, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for operator operand checking */ /* Requires ialloc.h (for imemory), iref.h, errors.h */ #ifndef opcheck_INCLUDED diff --git a/gs/src/opdef.h b/gs/src/opdef.h index 5cc36f811..cc9cf3dfa 100644 --- a/gs/src/opdef.h +++ b/gs/src/opdef.h @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Operator definition interface for Ghostscript */ #ifndef opdef_INCLUDED diff --git a/gs/src/openvms.mak b/gs/src/openvms.mak index 6bc601d50..f71bbe109 100644 --- a/gs/src/openvms.mak +++ b/gs/src/openvms.mak @@ -1,21 +1,8 @@ # Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for OpenVMS VAX and Alpha # # Please contact Jim Dunham (dunham@omtool.com) if you have questions. @@ -99,6 +86,16 @@ CDEBUG= GS=GS +# Define the name of a pre-built executable that can be invoked at build +# time. Currently, this is only needed for compiled fonts. The usual +# alternatives are: +# - the standard name of Ghostscript on your system (typically `gs'): +BUILD_TIME_GS=GS +# - the name of the executable you are building now. If you choose this +# option, then you must build the executable first without compiled fonts, +# and then again with compiled fonts. +#BUILD_TIME_GS=$(BINDIR)$(GS) -I$(PSLIBDIR) + # Define the directory where the IJG JPEG library sources are stored, # and the major version of the library that is stored there. # You may need to change this if the IJG library version changes. @@ -182,7 +179,6 @@ SYNC=posync # devs.mak and contrib.mak for the list of available devices. DEVICE_DEVS=$(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11gray2.dev $(DD)x11gray4.dev $(DD)x11mono.dev -#DEVICE_DEVS1=$(DD)bmpmono.dev $(DD)bmpamono.dev $(DD)posync.dev DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3=$(DD)deskjet.dev $(DD)djet500.dev $(DD)laserjet.dev $(DD)ljetplus.dev $(DD)ljet2p.dev $(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)ljet4d.dev @@ -191,14 +187,15 @@ DEVICE_DEVS5=$(DD)uniprint.dev DEVICE_DEVS6=$(DD)bj10e.dev $(DD)bj200.dev $(DD)bjc600.dev $(DD)bjc800.dev DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev $(DD)pcxcmyk.dev -DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev $(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev +DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev DEVICE_DEVS11=$(DD)tiff12nc.dev $(DD)tiff24nc.dev DEVICE_DEVS12=$(DD)psmono.dev $(DD)psgray.dev $(DD)psrgb.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)epswrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev -DEVICE_DEVS16= +# Overflow from DEVS9 +DEVICE_DEVS16=$(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= @@ -211,7 +208,7 @@ FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev # Choose whether to compile the .ps initialization files into the executable. # See gs.mak for details. -COMPILE_INITS=0 +COMPILE_INITS=1 # Choose whether to store band lists on files or in memory. # The choices are 'file' or 'memory'. @@ -362,6 +359,19 @@ CONFLDTR=-o # ---------------------------- End of options ---------------------------- # +# Define the default build rule, so the object directories get created +# automatically. + +# I wasn't able to find a "do nothing" command in the DCL manual! +std: STDDIRS default + WRITE SYS$$OUTPUT "Done." + +STDDIRS: + $$ If F$$Search("$(BINDIR)") .EQS. "" Then Create/Directory/Log $(BINDIR) + $$ If F$$Search("$(GLGENDIR)") .EQS. "" Then Create/Directory/Log $(GLGENDIR) + $$ If F$$Search("$(GLOBJDIR)") .EQS. "" Then Create/Directory/Log $(GLOBJDIR) + $$ If F$$Search("$(PSGENDIR)") .EQS. "" Then Create/Directory/Log $(PSGENDIR) + $$ If F$$Search("$(PSOBJDIR)") .EQS. "" Then Create/Directory/Log $(PSOBJDIR) # ------------------- Include the generic makefiles ---------------------- # diff --git a/gs/src/openvms.mmk b/gs/src/openvms.mmk index da98df829..e9e91ec62 100644 --- a/gs/src/openvms.mmk +++ b/gs/src/openvms.mmk @@ -1,21 +1,8 @@ # Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for OpenVMS VAX and Alpha using MMK # # Please contact Jim Dunham (dunham@omtool.com) if you have questions. @@ -102,12 +89,22 @@ CDEBUG= GS=GS +# Define the name of a pre-built executable that can be invoked at build +# time. Currently, this is only needed for compiled fonts. The usual +# alternatives are: +# - the standard name of Ghostscript on your system (typically `gs'): +BUILD_TIME_GS=GS +# - the name of the executable you are building now. If you choose this +# option, then you must build the executable first without compiled fonts, +# and then again with compiled fonts. +#BUILD_TIME_GS=$(BINDIR)$(GS) -I$(PSLIBDIR) + # Define the directory where the IJG JPEG library sources are stored, # and the major version of the library that is stored there. # You may need to change this if the IJG library version changes. # See jpeg.mak for more information. -JSRCDIR=[-.jpeg-6b] +JSRCDIR=[.jpeg-6b] JVERSION=6 # Define the directory where the PNG library sources are stored, @@ -115,13 +112,13 @@ JVERSION=6 # You may need to change this if the libpng version changes. # See libpng.mak for more information. -PSRCDIR=[-.libpng-1_0_3] +PSRCDIR=[.libpng-1_0_3] PVERSION=10003 # Define the directory where the zlib sources are stored. # See zlib.mak for more information. -ZSRCDIR=[-.zlib-1_1_3] +ZSRCDIR=[.zlib-1_1_3] # Note that built-in third-party libraries aren't available. @@ -187,7 +184,6 @@ SYNC=posync # devs.mak and contrib.mak for the list of available devices. DEVICE_DEVS=$(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11gray2.dev $(DD)x11gray4.dev $(DD)x11mono.dev -#DEVICE_DEVS1=$(DD)bmpmono.dev $(DD)bmpamono.dev $(DD)posync.dev DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3=$(DD)deskjet.dev $(DD)djet500.dev $(DD)laserjet.dev $(DD)ljetplus.dev $(DD)ljet2p.dev $(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)ljet4d.dev @@ -204,7 +200,7 @@ DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $ DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)epswrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev # Overflow from DEVS9 -DEVICE_DEVS16=$(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev +DEVICE_DEVS16=$(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= diff --git a/gs/src/oper.h b/gs/src/oper.h index 5c588a173..15c3abcf3 100644 --- a/gs/src/oper.h +++ b/gs/src/oper.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for Ghostscript operators */ #ifndef oper_INCLUDED diff --git a/gs/src/opextern.h b/gs/src/opextern.h index efd8bd265..a4ca83823 100644 --- a/gs/src/opextern.h +++ b/gs/src/opextern.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Externally accessible operator declarations */ #ifndef opextern_INCLUDED diff --git a/gs/src/os2.mak b/gs/src/os2.mak index 175064e81..e4adc7189 100644 --- a/gs/src/os2.mak +++ b/gs/src/os2.mak @@ -1,21 +1,8 @@ # Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for MS-DOS or OS/2 GCC/EMX platform. # Uses Borland (MSDOS) MAKER or # Uses IBM NMAKE.EXE Version 2.000.000 Mar 27 1992 @@ -26,15 +13,35 @@ # ------ Generic options ------ # +# Define the directory for the final executable, and the +# source, generated intermediate file, and object directories +# for the graphics library (GL) and the PostScript/PDF interpreter (PS). + +# This makefile has never been tested with any other values than these, +# and almost certainly won't work with other values. +BINDIR=bin +GLSRCDIR=src +GLGENDIR=obj +GLOBJDIR=obj +PSSRCDIR=src +PSLIBDIR=src +PSGENDIR=obj +PSOBJDIR=obj + +# Define the root directory for Ghostscript installation. + +AROOTDIR=c:/Aladdin +GSROOTDIR=$(AROOTDIR)/gs$(GS_DOT_VERSION) + # Define the directory that will hold documentation at runtime. -GS_DOCDIR=c:/gs +GS_DOCDIR=$(GSROOTDIR)/doc # Define the default directory/ies for the runtime # initialization and font files. Separate multiple directories with ;. # Use / to indicate directories, not a single \. -GS_LIB_DEFAULT=c:/gs/lib;c:/gs/fonts +GS_LIB_DEFAULT=$(GSROOTDIR)/lib;$(AROOTDIR)/fonts # Define whether or not searching for initialization files should always # look in the current directory first. This leads to well-known security @@ -82,20 +89,15 @@ IBMCPP=0 GS=gsos2 GSDLL=gsdll2 -# Define the directory for the final executable, and the -# source, generated intermediate file, and object directories -# for the graphics library (GL) and the PostScript/PDF interpreter (PS). - -# This makefile has never been tested with any other values than these, -# and almost certainly won't work with other values. -BINDIR=. -GLSRCDIR=. -GLGENDIR=. -GLOBJDIR=. -PSSRCDIR=. -PSLIBDIR=. -PSGENDIR=. -PSOBJDIR=. +# Define the name of a pre-built executable that can be invoked at build +# time. Currently, this is only needed for compiled fonts. The usual +# alternatives are: +# - the standard name of Ghostscript on your system (typically `gs'): +BUILD_TIME_GS=gsos2 +# - the name of the executable you are building now. If you choose this +# option, then you must build the executable first without compiled fonts, +# and then again with compiled fonts. +#BUILD_TIME_GS=$(BINDIR)\$(GS) -I$(PSLIBDIR) # Define the directory where the IJG JPEG library sources are stored, # and the major version of the library that is stored there. @@ -118,6 +120,14 @@ PVERSION=10002 ZSRCDIR=zlib +# The following is a hack to get around the special treatment of \ at +# the end of a line. +NUL= +DD=$(GLGENDIR)\$(NUL) +GLD=$(GLGENDIR)\$(NUL) +PSD=$(PSGENDIR)\$(NUL) + + # ------ Platform-specific options ------ # # If you don't have an assembler, set USE_ASM=0. Otherwise, set USE_ASM=1, @@ -206,7 +216,7 @@ TOP_MAKEFILES=$(MAKEFILE) # Define the files to be deleted by 'make clean'. -BEGINFILES=gspmdrv.exe gs*.res gs*.ico $(GSDLL).dll +BEGINFILES=$(BINDIR)\gspmdrv.exe $(GLOBJDIR)\gspmdrv.o $(GLOBJDIR)\gs*.res $(GLOBJDIR)\gs*.ico $(BINDIR)\$(GSDLL).dll # Define the ANSI-to-K&R dependency. @@ -223,7 +233,7 @@ CO=/O- # Make sure we get the right default target for make. -dosdefault: default gspmdrv.exe +dosdefault: default $(BINDIR)\gspmdrv.exe # Define a rule for invoking just the preprocessor. @@ -264,12 +274,12 @@ SH= # Define generic commands. # We use cp.cmd rather than copy /B so that we update the write date. -CP_=cp.cmd +CP_=$(GLSRCDIR)\cp.cmd # We use rm.cmd rather than erase because rm.cmd never generates # a non-zero return code. -RM_=rm.cmd +RM_=$(GLSRCDIR)\rm.cmd # OS/2 erase, unlike MS-DOS erase, accepts multiple files or patterns. -RMN_=rm.cmd +RMN_=$(GLSRCDIR)\rm.cmd # Define the arguments for genconf. @@ -370,7 +380,7 @@ CDLL= GENOPT=$(CP) $(CD) $(CGDB) $(CDLL) $(CO) -CCFLAGS0=$(GENOPT) $(PLATOPT) +CCFLAGS0=$(GENOPT) $(PLATOPT) -D__OS2__ CCFLAGS=$(CCFLAGS0) CC=$(COMPDIR)\$(COMP) $(CCFLAGS0) CC_=$(CC) @@ -389,7 +399,7 @@ FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev # Choose whether to compile the .ps initialization files into the executable. # See gs.mak for details. -COMPILE_INITS=0 +COMPILE_INITS=1 # Choose whether to store band lists on files or in memory. # The choices are 'file' or 'memory'. @@ -411,54 +421,54 @@ FILE_IMPLEMENTATION=stdio # devs.mak, pcwin.mak, and contrib.mak for the list of available devices. !if $(MAKEDLL) -DEVICE_DEVS=os2pm.dev os2dll.dev os2prn.dev +DEVICE_DEVS=$(DD)os2pm.dev $(DD)os2dll.dev $(DD)os2prn.dev !else -DEVICE_DEVS=os2pm.dev +DEVICE_DEVS=$(DD)os2pm.dev !endif -#DEVICE_DEVS1=x11.dev x11alpha.dev x11cmyk.dev x11mono.dev +#DEVICE_DEVS1=$(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11mono.dev DEVICE_DEVS1= -DEVICE_DEVS2=epson.dev eps9high.dev eps9mid.dev epsonc.dev ibmpro.dev -DEVICE_DEVS3=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev -DEVICE_DEVS4=cdeskjet.dev cdjcolor.dev cdjmono.dev cdj550.dev -DEVICE_DEVS5=djet500c.dev declj250.dev lj250.dev jetp3852.dev r4081.dev t4693d2.dev t4693d4.dev t4693d8.dev tek4696.dev lbp8.dev uniprint.dev -DEVICE_DEVS6=st800.dev stcolor.dev bj10e.dev bj200.dev bjc600.dev bjc800.dev m8510.dev necp6.dev -DEVICE_DEVS7=dfaxhigh.dev dfaxlow.dev -DEVICE_DEVS8=pcxmono.dev pcxgray.dev pcx16.dev pcx256.dev pcx24b.dev pcxcmyk.dev -DEVICE_DEVS9=pbm.dev pbmraw.dev pgm.dev pgmraw.dev pgnm.dev pgnmraw.dev pnm.dev pnmraw.dev ppm.dev ppmraw.dev -DEVICE_DEVS10=tiffcrle.dev tiffg3.dev tiffg32d.dev tiffg4.dev tifflzw.dev tiffpack.dev -DEVICE_DEVS11=bmpmono.dev bmpgray.dev bmp16.dev bmp256.dev bmp16m.dev tiff12nc.dev tiff24nc.dev -DEVICE_DEVS12=psmono.dev psgray.dev bit.dev bitrgb.dev bitcmyk.dev -DEVICE_DEVS13=pngmono.dev pnggray.dev png16.dev png256.dev png16m.dev -DEVICE_DEVS14=jpeg.dev jpeggray.dev -DEVICE_DEVS15=pdfwrite.dev pswrite.dev epswrite.dev pxlmono.dev pxlcolor.dev +DEVICE_DEVS2=$(DD)epson.dev $(DD)eps9high.dev $(DD)eps9mid.dev $(DD)epsonc.dev $(DD)ibmpro.dev +DEVICE_DEVS3=$(DD)deskjet.dev $(DD)djet500.dev $(DD)laserjet.dev $(DD)ljetplus.dev $(DD)ljet2p.dev +DEVICE_DEVS4=$(DD)cdeskjet.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cdj550.dev +DEVICE_DEVS5=$(DD)djet500c.dev $(DD)declj250.dev $(DD)lj250.dev +DEVICE_DEVS6=$(DD)st800.dev $(DD)stcolor.dev $(DD)bj10e.dev $(DD)bj200.dev +DEVICE_DEVS7=$(DD)t4693d2.dev $(DD)t4693d4.dev $(DD)t4693d8.dev $(DD)tek4696.dev +DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev +DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev +DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev +DEVICE_DEVS11=$(DD)bmpmono.dev $(DD)bmp16.dev $(DD)bmp256.dev $(DD)bmp16m.dev $(DD)tiff12nc.dev $(DD)tiff24nc.dev +DEVICE_DEVS12=$(DD)psmono.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev +DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev +DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev +DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)epswrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev # Overflow for DEVS3,4,5,6,9 -DEVICE_DEVS16=ljet3.dev ljet3d.dev ljet4.dev ljet4d.dev -DEVICE_DEVS17=pj.dev pjxl.dev pjxl300.dev -DEVICE_DEVS18= -DEVICE_DEVS19= -DEVICE_DEVS20= +DEVICE_DEVS16=$(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)ljet4d.dev +DEVICE_DEVS17=$(DD)pj.dev $(DD)pjxl.dev $(DD)pjxl300.dev +DEVICE_DEVS18=$(DD)jetp3852.dev $(DD)r4081.dev $(DD)lbp8.dev $(DD)uniprint.dev +DEVICE_DEVS19=$(DD)m8510.dev $(DD)necp6.dev $(DD)bjc600.dev $(DD)bjc800.dev +DEVICE_DEVS20=$(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev # Include the generic makefiles. -!include "version.mak" -!include "gs.mak" -!include "lib.mak" -!include "jpeg.mak" +!include "$(GLSRCDIR)\version.mak" +!include "$(GLSRCDIR)\gs.mak" +!include "$(GLSRCDIR)\lib.mak" +!include "$(GLSRCDIR)\jpeg.mak" # zlib.mak must precede libpng.mak -!include "zlib.mak" -!include "libpng.mak" -!include "devs.mak" -!include "pcwin.mak" -!include "contrib.mak" -!include "int.mak" -!include "cfonts.mak" +!include "$(GLSRCDIR)\zlib.mak" +!include "$(GLSRCDIR)\libpng.mak" +!include "$(GLSRCDIR)\devs.mak" +!include "$(GLSRCDIR)\pcwin.mak" +!include "$(GLSRCDIR)\contrib.mak" +!include "$(GLSRCDIR)\int.mak" +!include "$(GLSRCDIR)\cfonts.mak" # -------------------------------- Library -------------------------------- # # The GCC/EMX platform os2__=$(GLOBJ)gp_getnv.$(OBJ) $(GLOBJ)gp_nofb.$(OBJ) $(GLOBJ)gp_os2.$(OBJ) -$(GLGEN)os2_.dev: $(os2__) nosync.dev - $(SETMOD) $(GLGEN)os2_ $(os2__) -include nosync +$(GLGEN)os2_.dev: $(os2__) $(GLD)nosync.dev + $(SETMOD) $(GLGEN)os2_ $(os2__) -include $(GLD)nosync !if $(MAKEDLL) # Using a file device resource to get the console streams re-initialized # is bad architecture (an upward reference to ziodev), @@ -468,7 +478,7 @@ $(GLGEN)os2_.dev: $(os2__) nosync.dev !endif -$(GLOBJ)gp_os2.$(OBJ): $(GSLRC)gp_os2.c\ +$(GLOBJ)gp_os2.$(OBJ): $(GLSRC)gp_os2.c\ $(dos__h) $(pipe__h) $(string__h) $(time__h)\ $(gsdll_h) $(gx_h) $(gsexit_h) $(gsutil_h) $(gp_h) $(GLCC) $(GLO_)gp_os2.$(OBJ) $(C_) $(GLSRC)gp_os2.c @@ -477,44 +487,44 @@ $(GLOBJ)gp_os2.$(OBJ): $(GSLRC)gp_os2.c\ CCAUX=$(COMPDIR)\$(COMP) $(CO) -$(ECHOGS_XE): echogs.c +$(ECHOGS_XE): $(GLSRCDIR)\echogs.c !if $(EMX) - $(CCAUX) -o $(AUXGEN)echogs echogs.c + $(CCAUX) -o $(AUXGEN)echogs $(GLSRCDIR)\echogs.c $(COMPDIR)\emxbind $(EMXPATH)/bin/emxl.exe $(AUXGEN)echogs $(ECHOGS_XE) del $(AUXGEN)echogs !endif !if $(IBMCPP) - $(CCAUX) /Fe$(ECHOGS_XE) echogs.c + $(CCAUX) /Fe$(ECHOGS_XE) $(GLSRCDIR)\echogs.c !endif -$(GENARCH_XE): genarch.c $(GENARCH_DEPS) +$(GENARCH_XE): $(GLSRCDIR)\genarch.c $(GENARCH_DEPS) !if $(EMX) - $(CCAUX) -o $(AUXGEN)genarch genarch.c + $(CCAUX) -o $(AUXGEN)genarch $(GLSRCDIR)\genarch.c $(COMPDIR)\emxbind $(EMXPATH)/bin/emxl.exe $(AUXGEN)genarch $(GENARCH_XE) del $(AUXGEN)genarch !endif !if $(IBMCPP) - $(CCAUX) /Fe$(GENARCH_XE) genarch.c + $(CCAUX) /Fe$(GENARCH_XE) $(GLSRCDIR)\genarch.c !endif -$(GENCONF_XE): genconf.c $(GENCONF_DEPS) +$(GENCONF_XE): $(GLSRCDIR)\genconf.c $(GENCONF_DEPS) !if $(EMX) - $(CCAUX) -o $(AUXGEN)genconf genconf.c + $(CCAUX) -o $(AUXGEN)genconf $(GLSRCDIR)\genconf.c $(COMPDIR)\emxbind $(EMXPATH)/bin/emxl.exe $(AUXGEN)genconf $(GENCONF_XE) del $(AUXGEN)genconf !endif !if $(IBMCPP) - $(CCAUX) /Fe$(GENCONF_XE) genconf.c + $(CCAUX) /Fe$(GENCONF_XE) $(GLSRCDIR)\genconf.c !endif -$(GENDEV_XE): gendev.c $(GENDEV_DEPS) +$(GENDEV_XE): $(GLSRCDIR)\gendev.c $(GENDEV_DEPS) !if $(EMX) - $(CCAUX) -o $(AUXGEN)gendev gendev.c + $(CCAUX) -o $(AUXGEN)gendev $(GLSRCDIR)\gendev.c $(COMPDIR)\emxbind $(EMXPATH)/bin/emxl.exe $(AUXGEN)gendev $(GENDEV_XE) del $(AUXGEN)gendev !endif !if $(IBMCPP) - $(CCAUX) /Fe$(GENDEV_XE) gendev.c + $(CCAUX) /Fe$(GENDEV_XE) $(GLSRCDIR)\gendev.c !endif $(GENHT_XE): $(PSSRC)genht.c $(GENHT_DEPS) @@ -541,7 +551,7 @@ $(GENINIT_XE): $(PSSRC)geninit.c $(GENINIT_DEPS) $(gconfig__h): $(TOP_MAKEFILES) $(ECHOGS_XE) $(ECHOGS_XE) -w $(gconfig__h) /* This file deliberately left blank. */ -$(gconfigv_h): os2.mak $(TOP_MAKEFILES) $(ECHOGS_XE) +$(gconfigv_h): $(GLSRCDIR)\os2.mak $(TOP_MAKEFILES) $(ECHOGS_XE) $(ECHOGS_XE) -w $(gconfigv_h) -x 23 define USE_ASM -x 2028 -q $(USE_ASM)-0 -x 29 $(ECHOGS_XE) -a $(gconfigv_h) -x 23 define USE_FPU -x 2028 -q $(FPU_TYPE)-0 -x 29 $(ECHOGS_XE) -a $(gconfigv_h) -x 23 define EXTEND_NAMES 0$(EXTEND_NAMES) @@ -553,64 +563,65 @@ gsdllos2_h=$(GLSRC)gsdllos2.h # Interpreter main program -ICONS=gsos2.ico gspmdrv.ico +ICONS=$(GLOBJ)gsos2.ico $(GLOBJ)gspmdrv.ico !if $(MAKEDLL) #making a DLL GS_ALL=$(GLOBJ)gsdll.$(OBJ) $(INT_ALL) $(INTASM)\ - $(LIB_ALL) $(LIBCTR) $(ld_tr) $(GLGEN)lib.tr $(GS).res $(ICONS) + $(LIB_ALL) $(LIBCTR) $(ld_tr) $(GLGEN)lib.tr $(GLOBJ)$(GS).res $(ICONS) -$(GS_XE): $(GSDLL).dll dpmainc.c $(gsdll_h) $(gsdllos2_h) gsos2.rc gscdefs.$(OBJ) +$(GS_XE): $(BINDIR)\$(GSDLL).dll $(GLSRC)dpmainc.c $(gsdll_h) $(gsdllos2_h) $(GLSRC)gsos2.rc $(GLOBJ)gscdefs.$(OBJ) !if $(EMX) - $(COMPDIR)\gcc $(CGDB) $(CO) -Zomf -o$(GS_XE) dpmainc.c gscdefs.$(OBJ) gsos2.def + $(COMPDIR)\gcc $(CGDB) $(CO) -Zomf -I$(GLSRCDIR) -I$(GLOBJDIR) -o$(GS_XE) $(GLSRC)dpmainc.c $(GLOBJ)gscdefs.$(OBJ) $(GLSRC)gsos2.def !endif !if $(IBMCPP) - $(CCAUX) /Fe$(GX_XE) dpmainc.c gscdefs.$(OBJ) + $(CCAUX) -I$(GLSRCDIR) -I$(GLOBJDIR) /Fe$(GX_XE) $(GLSRC)dpmainc.c $(GLOBJ)gscdefs.$(OBJ) !endif - rc gsos2.res $(GS_XE) + rc $(GLOBJ)$(GS).res $(GS_XE) $(GLOBJ)gsdll.$(OBJ): $(GLSRC)gsdll.c $(gsdll_h) $(ghost_h) $(gscdefs_h) $(PSCC) $(GLO_)gsdll.$(OBJ) $(C_) $(GLSRC)gsdll.c -$(GSDLL).dll: $(GS_ALL) $(ALL_DEVS) $(GLOBJ)gsdll.$(OBJ) +$(BINDIR)\$(GSDLL).dll: $(GS_ALL) $(ALL_DEVS) $(GLOBJ)gsdll.$(OBJ) !if $(EMX) - LINK386 /DEBUG $(COMPBASE)\lib\dll0.obj $(COMPBASE)\lib\end.lib @$(ld_tr) $(GLOBJ)gsdll.obj, $(GSDLL).dll, ,$(COMPBASE)\lib\gcc.lib $(COMPBASE)\lib\st\c.lib $(COMPBASE)\lib\st\c_dllso.lib $(COMPBASE)\lib\st\sys.lib $(COMPBASE)\lib\c_alias.lib $(COMPBASE)\lib\os2.lib, gsdll2.def + LINK386 /DEBUG $(COMPBASE)\lib\dll0.obj $(COMPBASE)\lib\end.lib @$(ld_tr) $(GLOBJ)gsdll.obj, $(BINDIR)\$(GSDLL).dll, ,$(COMPBASE)\lib\gcc.lib $(COMPBASE)\lib\st\c.lib $(COMPBASE)\lib\st\c_dllso.lib $(COMPBASE)\lib\st\sys.lib $(COMPBASE)\lib\c_alias.lib $(COMPBASE)\lib\os2.lib, $(GLSRC)gsdll2.def !endif !if $(IBMCPP) - LINK386 /NOE /DEBUG @$(ld_tr) $(GLOBJ)gsdll.obj, $(GSDLL).dll, , , gsdll2.def + LINK386 /NOE /DEBUG @$(ld_tr) $(GLOBJ)gsdll.obj, $(BINDIR)\$(GSDLL).dll, , , $(GLSRC)gsdll2.def !endif !else #making an EXE GS_ALL=$(GLOBJ)gs.$(OBJ) $(INT_ALL) $(INTASM)\ - $(LIB_ALL) $(LIBCTR) $(ld_tr) $(GLGEN)lib.tr $(GS).res $(ICONS) + $(LIB_ALL) $(LIBCTR) $(ld_tr) $(GLGEN)lib.tr $(GLOBJ)$(GS).res $(ICONS) $(GS_XE): $(GS_ALL) $(ALL_DEVS) - $(COMPDIR)\gcc $(CGDB) -o $(GS) $(GLOBJ)gs.$(OBJ) @$(ld_tr) $(INTASM) -lm - $(COMPDIR)\emxbind -r$*.res $(COMPDIR)\emxl.exe $(GS) $(GS_XE) -ac - del $(GS) + $(COMPDIR)\gcc $(CGDB) -I$(GLSRCDIR) -o $(GLOBJ)$(GS) $(GLOBJ)gs.$(OBJ) @$(ld_tr) $(INTASM) -lm + $(COMPDIR)\emxbind -r$(GLOBJ)$(GS).res $(COMPDIR)\emxl.exe $(GLOBJ)$(GS) $(GS_XE) -ac + del $(GLOBJ)$(GS) !endif # Make the icons from their text form. -gsos2.ico: gsos2.icx $(ECHOGS_XE) - $(ECHOGS_XE) -wb gsos2.ico -n -X -r gsos2.icx +$(GLOBJ)gsos2.ico: $(GLSRC)gsos2.icx $(ECHOGS_XE) + $(ECHOGS_XE) -wb $(GLOBJ)gsos2.ico -n -X -r $(GLSRC)gsos2.icx -gspmdrv.ico: gspmdrv.icx $(ECHOGS_XE) - $(ECHOGS_XE) -wb gspmdrv.ico -n -X -r gspmdrv.icx +$(GLOBJ)gspmdrv.ico: $(GLSRC)gspmdrv.icx $(ECHOGS_XE) + $(ECHOGS_XE) -wb $(GLOBJ)gspmdrv.ico -n -X -r $(GLSRC)gspmdrv.icx -$(GS).res: $(GS).rc gsos2.ico - rc -i $(COMPBASE)\include -r $*.rc +$(GLOBJ)$(GS).res: $(GLSRC)$(GS).rc $(GLOBJ)gsos2.ico + rc -i $(COMPBASE)\include -i $(GLSRCDIR) -i $(GLOBJDIR) -r $(GLSRC)$(GS).rc $(GLOBJ)$(GS).res + # PM driver program -gspmdrv.o: gspmdrv.c $(GLSRC)gspmdrv.h - $(COMPDIR)\gcc $(CGDB) $(CO) -c $*.c +$(GLOBJ)gspmdrv.o: $(GLSRC)gspmdrv.c $(GLSRC)gspmdrv.h + $(COMPDIR)\gcc $(CGDB) $(CO) -I$(GLSRCDIR) -o $(GLOBJ)gspmdrv.o -c $(GLSRC)gspmdrv.c -gspmdrv.res: gspmdrv.rc $(GLSRC)gspmdrv.h gspmdrv.ico - rc -i $(COMPBASE)\include -r $*.rc +$(GLOBJ)gspmdrv.res: $(GLSRC)gspmdrv.rc $(GLSRC)gspmdrv.h $(GLOBJ)gspmdrv.ico + rc -i $(COMPBASE)\include -i $(GLSRCDIR) -i $(GLOBJDIR) -r $(GLSRC)gspmdrv.rc $(GLOBJ)gspmdrv.res -gspmdrv.exe: gspmdrv.o gspmdrv.res gspmdrv.def - $(COMPDIR)\gcc $(CGDB) $(CO) -o $* $*.o - $(COMPDIR)\emxbind -p -r$*.res -d$*.def $(COMPDIR)\emxl.exe $* $*.exe - del $* +$(BINDIR)\gspmdrv.exe: $(GLOBJ)gspmdrv.o $(GLOBJ)gspmdrv.res $(GLSRC)gspmdrv.def + $(COMPDIR)\gcc $(CGDB) $(CO) -o $(GLOBJ)gspmdrv $(GLOBJ)gspmdrv.o + $(COMPDIR)\emxbind -p -r$(GLOBJ)gspmdrv.res -d$(GLSRC)gspmdrv.def $(COMPDIR)\emxl.exe $(GLOBJ)gspmdrv $(BINDIR)\gspmdrv.exe + del $(GLOBJ)gspmdrv diff --git a/gs/src/ostack.h b/gs/src/ostack.h index bf149ca40..0973eff88 100644 --- a/gs/src/ostack.h +++ b/gs/src/ostack.h @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1994, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for Ghostscript operand stack */ #ifndef ostack_INCLUDED diff --git a/gs/src/pcwin.mak b/gs/src/pcwin.mak index 950f9abcb..676fb573f 100644 --- a/gs/src/pcwin.mak +++ b/gs/src/pcwin.mak @@ -1,21 +1,8 @@ # Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for PC window system (MS Windows and OS/2) -specific device # drivers. @@ -98,5 +85,5 @@ os2prn_=$(GLOBJ)gdevos2p.$(OBJ) $(DD)os2prn.dev: $(os2prn_) $(GLD)page.dev $(SETPDEV) $(DD)os2prn $(os2prn_) -$(GLOBJ)gdevos2p.$(OBJ): gdevos2p.c $(gp_h) $(gdevpccm_h) $(gdevprn_h) $(gscdefs_h) +$(GLOBJ)gdevos2p.$(OBJ): $(GLSRC)gdevos2p.c $(gp_h) $(gdevpccm_h) $(gdevprn_h) $(gscdefs_h) $(GLCC) $(GLO_)gdevos2p.$(OBJ) $(C_) $(GLSRC)gdevos2p.c diff --git a/gs/src/pipe_.h b/gs/src/pipe_.h index fd2fc989a..dc876cf12 100644 --- a/gs/src/pipe_.h +++ b/gs/src/pipe_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Declaration of popen and pclose */ #ifndef pipe__INCLUDED diff --git a/gs/src/png_.h b/gs/src/png_.h index 250fe9cd6..66cd8afda 100644 --- a/gs/src/png_.h +++ b/gs/src/png_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Wrapper for png.h */ #if SHARE_LIBPNG diff --git a/gs/src/rm.bat b/gs/src/rm.bat index 96fe999e0..0e486b51d 100755 --- a/gs/src/rm.bat +++ b/gs/src/rm.bat @@ -1,4 +1,4 @@ - +@rem $RCSfile$ $Revision$ @echo off :next if '%1'=='' goto exit diff --git a/gs/src/rm.cmd b/gs/src/rm.cmd index 128ff47b6..0c9328e4d 100755 --- a/gs/src/rm.cmd +++ b/gs/src/rm.cmd @@ -1,5 +1,5 @@ @echo off - +@rem $RCSfile$ $Revision$ :next if '%1'=='' goto exit if '%1'=='-f' goto sh diff --git a/gs/src/sa85d.c b/gs/src/sa85d.c index 6e14b0ee4..7c1ce5f0d 100644 --- a/gs/src/sa85d.c +++ b/gs/src/sa85d.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* ASCII85Decode filter */ #include "std.h" #include "strimpl.h" diff --git a/gs/src/sa85d.h b/gs/src/sa85d.h index 854750571..27d729071 100644 --- a/gs/src/sa85d.h +++ b/gs/src/sa85d.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* ASCII85Decode filter interface */ /* Requires scommon.h; strimpl.h if any templates are referenced */ diff --git a/gs/src/sa85x.h b/gs/src/sa85x.h index bcda3f18b..6ecb03b47 100644 --- a/gs/src/sa85x.h +++ b/gs/src/sa85x.h @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* ASCII85 filter interface */ /* Requires scommon.h; strimpl.h if any templates are referenced */ diff --git a/gs/src/sbcp.c b/gs/src/sbcp.c index 901b78046..39b44ff56 100644 --- a/gs/src/sbcp.c +++ b/gs/src/sbcp.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* BCP and TBCP filters */ #include "stdio_.h" #include "strimpl.h" diff --git a/gs/src/sbhc.c b/gs/src/sbhc.c index 42508a874..5837d87fc 100644 --- a/gs/src/sbhc.c +++ b/gs/src/sbhc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Bounded Huffman code filters */ #include "memory_.h" #include "stdio_.h" diff --git a/gs/src/sbhc.h b/gs/src/sbhc.h index 70b298d8f..711fc4645 100644 --- a/gs/src/sbhc.h +++ b/gs/src/sbhc.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for BoundedHuffman filters */ /* Requires strimpl.h */ #ifndef sbhc_INCLUDED diff --git a/gs/src/sbtx.h b/gs/src/sbtx.h index 070de1581..a187b5ee8 100644 --- a/gs/src/sbtx.h +++ b/gs/src/sbtx.h @@ -1,22 +1,10 @@ /* Copyright (C) 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for ByteTranslate filters */ /* Requires scommon.h; strimpl.h if any templates are referenced */ #ifndef sbtx_INCLUDED diff --git a/gs/src/sbwbs.c b/gs/src/sbwbs.c index 2783ac9c1..ab5c986d1 100644 --- a/gs/src/sbwbs.c +++ b/gs/src/sbwbs.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Burrows/Wheeler block sorting compression filters */ #include "stdio_.h" #include "memory_.h" diff --git a/gs/src/sbwbs.h b/gs/src/sbwbs.h index d4ac662fd..08cfc6e3b 100644 --- a/gs/src/sbwbs.h +++ b/gs/src/sbwbs.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994, 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for BWBlockSort (Burroughs-Wheeler) filters */ /* Requires scommon.h; strimpl.h if any templates are referenced */ #ifndef sbwbs_INCLUDED diff --git a/gs/src/scanchar.h b/gs/src/scanchar.h index 93553da49..957ac3fda 100644 --- a/gs/src/scanchar.h +++ b/gs/src/scanchar.h @@ -1,22 +1,10 @@ /* Copyright (C) 1990, 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for token scanner character type table */ /* Requires scommon.h */ #ifndef scanchar_INCLUDED diff --git a/gs/src/scantab.c b/gs/src/scantab.c index f88e7cf65..909df1688 100644 --- a/gs/src/scantab.c +++ b/gs/src/scantab.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Scanner table for PostScript/PDF tokens */ #include "stdpre.h" #include "scommon.h" diff --git a/gs/src/scf.h b/gs/src/scf.h index bef21ec31..cff48d197 100644 --- a/gs/src/scf.h +++ b/gs/src/scf.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common definitions for CCITTFax encoding and decoding filters */ #ifndef scf_INCLUDED diff --git a/gs/src/scfd.c b/gs/src/scfd.c index 493a7ea59..612e5bf67 100644 --- a/gs/src/scfd.c +++ b/gs/src/scfd.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CCITTFax decoding filter */ #include "stdio_.h" /* includes std.h */ #include "memory_.h" @@ -487,7 +474,7 @@ cf_decode_1d(stream_CFD_state * ss, stream_cursor_read * pr) } run_color = 1; db: /* Decode a black run. */ - get_run(cf_black_decode, cfd_black_initial_bits, cfd_black_initial_bits, + get_run(cf_black_decode, cfd_black_initial_bits, cfd_black_min_bits, bcnt, "[w1]black", dbl, out1); if (bcnt < 0) { /* All exceptional codes are invalid here. */ /****** WRONG, uncompressed IS ALLOWED ******/ diff --git a/gs/src/scfdgen.c b/gs/src/scfdgen.c index 31eb31fa7..75e587fd6 100644 --- a/gs/src/scfdgen.c +++ b/gs/src/scfdgen.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1994, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generate the CCITTFaxDecode tables */ #include "stdio_.h" /* includes std.h */ #include "scf.h" @@ -43,11 +30,11 @@ main() cfd_node area[1 << max(cfd_white_initial_bits, cfd_black_initial_bits)]; fputs("/* Copyright (C) 1992, 1993, 1998, 1999 Aladdin Enterprises. All rights reserved. */\n\n", out); + fputs("/* $Id$ */\n", out); + fputs("/* Tables for CCITTFaxDecode filter. */\n\n", out); fputs("/* This file was generated automatically. It is governed by the same terms */\n", out); fputs("/* as the files scfetab.c and scfdgen.c from which it was derived. */\n", out); fputs("/* Consult those files for the licensing terms and conditions. */\n\n", out); - fputs("/* scfdtab.c */\n", out); - fputs("/* Tables for CCITTFaxDecode filter. */\n\n", out); fputs("#include \"std.h\"\n", out); fputs("#include \"scommon.h\"\t\t/* for scf.h */\n", out); fputs("#include \"scf.h\"\n\n", out); diff --git a/gs/src/scfdtab.c b/gs/src/scfdtab.c index 27a44ce2a..e6d10b3a1 100644 --- a/gs/src/scfdtab.c +++ b/gs/src/scfdtab.c @@ -1,12 +1,12 @@ /* Copyright (C) 1992, 1993, 1998, 1999 Aladdin Enterprises. All rights reserved. */ +/* $RCSfile$ $Revision$ */ +/* Tables for CCITTFaxDecode filter. */ + /* This file was generated automatically. It is governed by the same terms */ /* as the files scfetab.c and scfdgen.c from which it was derived. */ /* Consult those files for the licensing terms and conditions. */ -/* scfdtab.c */ -/* Tables for CCITTFaxDecode filter. */ - #include "std.h" #include "scommon.h" /* for scf.h */ #include "scf.h" diff --git a/gs/src/scfe.c b/gs/src/scfe.c index 800dc96d5..10dcf4a6a 100644 --- a/gs/src/scfe.c +++ b/gs/src/scfe.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CCITTFax encoding filter */ #include "stdio_.h" /* includes std.h */ #include "memory_.h" diff --git a/gs/src/scfetab.c b/gs/src/scfetab.c index 3fb419bc9..0b57d4d42 100644 --- a/gs/src/scfetab.c +++ b/gs/src/scfetab.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Tables for CCITTFaxEncode filter */ #include "std.h" #include "scommon.h" /* for scf.h */ diff --git a/gs/src/scfparam.c b/gs/src/scfparam.c index b8b93ef3e..7b647d9c0 100644 --- a/gs/src/scfparam.c +++ b/gs/src/scfparam.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CCITTFax filter parameter setting and reading */ #include "std.h" #include "gserror.h" diff --git a/gs/src/scfx.h b/gs/src/scfx.h index 0957a2abf..0d1712356 100644 --- a/gs/src/scfx.h +++ b/gs/src/scfx.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CCITTFax filter state definition */ /* Requires strimpl.h */ diff --git a/gs/src/scommon.h b/gs/src/scommon.h index 618496899..055278f17 100644 --- a/gs/src/scommon.h +++ b/gs/src/scommon.h @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions common to stream clients and implementors */ #ifndef scommon_DEFINED diff --git a/gs/src/sdcparam.c b/gs/src/sdcparam.c index db4fa6f9d..cea3669a2 100644 --- a/gs/src/sdcparam.c +++ b/gs/src/sdcparam.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* DCT filter parameter setting and reading */ #include "memory_.h" #include "jpeglib_.h" diff --git a/gs/src/sdcparam.h b/gs/src/sdcparam.h index 1d45343d5..d85819341 100644 --- a/gs/src/sdcparam.h +++ b/gs/src/sdcparam.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* DCT filter parameter setting and reading interface */ #ifndef sdcparam_INCLUDED diff --git a/gs/src/sdct.h b/gs/src/sdct.h index 5aff8eb3a..948053d15 100644 --- a/gs/src/sdct.h +++ b/gs/src/sdct.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for DCT filters */ /* Requires stream.h, strimpl.h, jpeg/jpeglib.h */ #ifndef sdct_INCLUDED diff --git a/gs/src/sdctc.c b/gs/src/sdctc.c index c912e9f19..5528e170a 100644 --- a/gs/src/sdctc.c +++ b/gs/src/sdctc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Code common to DCT encoding and decoding streams */ #include "stdio_.h" #include "jpeglib_.h" diff --git a/gs/src/sdctd.c b/gs/src/sdctd.c index 1dd74ad42..9e52a1bf7 100644 --- a/gs/src/sdctd.c +++ b/gs/src/sdctd.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* DCT decoding filter stream */ #include "memory_.h" #include "stdio_.h" diff --git a/gs/src/sdcte.c b/gs/src/sdcte.c index 6fa0bc358..4b5e85e8b 100644 --- a/gs/src/sdcte.c +++ b/gs/src/sdcte.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* DCT encoding filter stream */ #include "memory_.h" #include "stdio_.h" diff --git a/gs/src/sddparam.c b/gs/src/sddparam.c index 15f2ea74d..49f315ff7 100644 --- a/gs/src/sddparam.c +++ b/gs/src/sddparam.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* DCTDecode filter parameter setting and reading */ #include "std.h" #include "jpeglib_.h" diff --git a/gs/src/sdeparam.c b/gs/src/sdeparam.c index b1b74e65e..3eb981f05 100644 --- a/gs/src/sdeparam.c +++ b/gs/src/sdeparam.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* DCTEncode filter parameter setting and reading */ #include "memory_.h" #include "jpeglib_.h" diff --git a/gs/src/seexec.c b/gs/src/seexec.c index 147a30958..64b8a7d80 100644 --- a/gs/src/seexec.c +++ b/gs/src/seexec.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* eexec filters */ #include "stdio_.h" /* includes std.h */ #include "strimpl.h" diff --git a/gs/src/sfilter.h b/gs/src/sfilter.h index 1187538ac..120180611 100644 --- a/gs/src/sfilter.h +++ b/gs/src/sfilter.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for simple Ghostscript streams */ /* Requires scommon.h; should require strimpl.h only if any templates */ /* are referenced, but some compilers always require strimpl.h. */ diff --git a/gs/src/sfilter1.c b/gs/src/sfilter1.c index 842207faa..515c87070 100644 --- a/gs/src/sfilter1.c +++ b/gs/src/sfilter1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Filters included in Level 1 systems: NullEncode/Decode, PFBDecode, */ /* SubFileDecode. */ #include "stdio_.h" /* includes std.h */ diff --git a/gs/src/sfilter2.c b/gs/src/sfilter2.c index e3636d791..a9180f30c 100644 --- a/gs/src/sfilter2.c +++ b/gs/src/sfilter2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Simple Level 2 filters */ #include "stdio_.h" /* includes std.h */ #include "memory_.h" diff --git a/gs/src/sfxboth.c b/gs/src/sfxboth.c index 42c677584..0830b4e53 100644 --- a/gs/src/sfxboth.c +++ b/gs/src/sfxboth.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* File stream implementation using both stdio and direct OS calls */ #include "sfxstdio.c" diff --git a/gs/src/sfxfd.c b/gs/src/sfxfd.c index 95792e0fe..87a8f645f 100644 --- a/gs/src/sfxfd.c +++ b/gs/src/sfxfd.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* File stream implementation using direct OS calls */ /****** ****** NOTE: THIS FILE MAY NOT COMPILE ON NON-UNIX PLATFORMS, AND MAY diff --git a/gs/src/sfxstdio.c b/gs/src/sfxstdio.c index 67cc5d4f7..ae318397d 100644 --- a/gs/src/sfxstdio.c +++ b/gs/src/sfxstdio.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* File stream implementation using stdio */ #include "stdio_.h" /* includes std.h */ #include "memory_.h" diff --git a/gs/src/shc.c b/gs/src/shc.c index 933fd98f3..4311e3519 100644 --- a/gs/src/shc.c +++ b/gs/src/shc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Support code for shc.h */ #include "std.h" #include "scommon.h" diff --git a/gs/src/shc.h b/gs/src/shc.h index 11eeb75b8..b1638d66b 100644 --- a/gs/src/shc.h +++ b/gs/src/shc.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common definitions for filters using Huffman coding */ #ifndef shc_INCLUDED diff --git a/gs/src/shcgen.c b/gs/src/shcgen.c index 62eef1923..176800544 100644 --- a/gs/src/shcgen.c +++ b/gs/src/shcgen.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generate (bounded) Huffman code definitions from frequencies, */ /* and tables from definitions. */ #include "memory_.h" diff --git a/gs/src/shcgen.h b/gs/src/shcgen.h index 06aa2a96d..ee176975a 100644 --- a/gs/src/shcgen.h +++ b/gs/src/shcgen.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Interface for Huffman code generation */ /* Requires shc.h */ #ifndef shcgen_INCLUDED diff --git a/gs/src/siinterp.c b/gs/src/siinterp.c index 823789f49..7d55d1926 100644 --- a/gs/src/siinterp.c +++ b/gs/src/siinterp.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Image interpolation filter */ #include "memory_.h" #include <assert.h> diff --git a/gs/src/siinterp.h b/gs/src/siinterp.h index 3b3f0e508..ffdaf541f 100644 --- a/gs/src/siinterp.h +++ b/gs/src/siinterp.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for image interpolation filter */ /* Requires strimpl.h */ diff --git a/gs/src/siscale.c b/gs/src/siscale.c index 064924b3b..4f0d68cb8 100644 --- a/gs/src/siscale.c +++ b/gs/src/siscale.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Image scaling filters */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/siscale.h b/gs/src/siscale.h index 5f14231e7..488afa64a 100644 --- a/gs/src/siscale.h +++ b/gs/src/siscale.h @@ -1,22 +1,10 @@ /* Copyright (C) 1995, 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for smoothed image scaling filter */ /* Requires strimpl.h */ #ifndef siscale_INCLUDED diff --git a/gs/src/sisparam.h b/gs/src/sisparam.h index fd4387187..3991f48ec 100644 --- a/gs/src/sisparam.h +++ b/gs/src/sisparam.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic image scaling stream definitions */ /* Requires strimpl.h */ diff --git a/gs/src/sjpeg.h b/gs/src/sjpeg.h index 7298ccea6..e47c17926 100644 --- a/gs/src/sjpeg.h +++ b/gs/src/sjpeg.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* IJG entry point wrappers */ /* Requires sdct.h, jpeg/jpeglib.h */ #ifndef sjpeg_INCLUDED diff --git a/gs/src/sjpegc.c b/gs/src/sjpegc.c index ca27b1675..1758c2036 100644 --- a/gs/src/sjpegc.c +++ b/gs/src/sjpegc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface routines for IJG code, common to encode/decode. */ #include "stdio_.h" #include "string_.h" diff --git a/gs/src/sjpegd.c b/gs/src/sjpegd.c index 5e8402e60..77f9029c2 100644 --- a/gs/src/sjpegd.c +++ b/gs/src/sjpegd.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface routines for IJG decoding code. */ #include "stdio_.h" #include "string_.h" diff --git a/gs/src/sjpege.c b/gs/src/sjpege.c index a0df585a4..95c5f0088 100644 --- a/gs/src/sjpege.c +++ b/gs/src/sjpege.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface routines for IJG encoding code. */ #include "stdio_.h" #include "string_.h" diff --git a/gs/src/slzwc.c b/gs/src/slzwc.c index 66f37e3c1..3504c373f 100644 --- a/gs/src/slzwc.c +++ b/gs/src/slzwc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Code common to LZW encoding and decoding streams */ #include "std.h" #include "strimpl.h" diff --git a/gs/src/slzwce.c b/gs/src/slzwce.c index 55ef28dc1..41df9972b 100644 --- a/gs/src/slzwce.c +++ b/gs/src/slzwce.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Simple encoder compatible with LZW decoding filter */ #include "stdio_.h" /* includes std.h */ #include "gdebug.h" diff --git a/gs/src/slzwd.c b/gs/src/slzwd.c index 455346fa5..3fabb6360 100644 --- a/gs/src/slzwd.c +++ b/gs/src/slzwd.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* LZW decoding filter */ #include "stdio_.h" /* includes std.h */ #include "gdebug.h" diff --git a/gs/src/slzwx.h b/gs/src/slzwx.h index f63f490fa..7f980becf 100644 --- a/gs/src/slzwx.h +++ b/gs/src/slzwx.h @@ -1,22 +1,10 @@ /* Copyright (C) 1993, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for LZW filters */ /* Requires strimpl.h */ #ifndef slzwx_INCLUDED diff --git a/gs/src/smtf.c b/gs/src/smtf.c index a49a78ae4..0915912ad 100644 --- a/gs/src/smtf.c +++ b/gs/src/smtf.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* MoveToFront filters */ #include "stdio_.h" #include "strimpl.h" diff --git a/gs/src/smtf.h b/gs/src/smtf.h index 764ddf321..c849e1036 100644 --- a/gs/src/smtf.h +++ b/gs/src/smtf.h @@ -1,22 +1,10 @@ /* Copyright (C) 1995 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for MoveToFront filters */ /* Requires scommon.h; strimpl.h if any templates are referenced */ #ifndef smtf_INCLUDED diff --git a/gs/src/spdiff.c b/gs/src/spdiff.c index 660d03dad..9a3c81952 100644 --- a/gs/src/spdiff.c +++ b/gs/src/spdiff.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Pixel differencing filters */ #include "stdio_.h" /* should be std.h, but needs NULL */ #include "memory_.h" diff --git a/gs/src/spdiffx.h b/gs/src/spdiffx.h index 18e4aeeb4..479f35e43 100644 --- a/gs/src/spdiffx.h +++ b/gs/src/spdiffx.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994, 1995, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for PixelDifference filters */ /* Requires strimpl.h */ #ifndef spdiffx_INCLUDED diff --git a/gs/src/spngp.c b/gs/src/spngp.c index de51c6b5d..30a9d0468 100644 --- a/gs/src/spngp.c +++ b/gs/src/spngp.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PNG pixel prediction filters */ #include "memory_.h" #include "strimpl.h" diff --git a/gs/src/spngpx.h b/gs/src/spngpx.h index b33b95639..6b8adde1c 100644 --- a/gs/src/spngpx.h +++ b/gs/src/spngpx.h @@ -1,22 +1,10 @@ /* Copyright (C) 1996, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for PNGPredictor filters */ /* Requires strimpl.h */ #ifndef spngpx_INCLUDED diff --git a/gs/src/spprint.c b/gs/src/spprint.c index 538c5608a..48b4185ea 100644 --- a/gs/src/spprint.c +++ b/gs/src/spprint.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Print values in ASCII form on a stream */ #include "math_.h" /* for fabs */ #include "stdio_.h" /* for stream.h */ diff --git a/gs/src/spprint.h b/gs/src/spprint.h index 6d097659a..a0045e360 100644 --- a/gs/src/spprint.h +++ b/gs/src/spprint.h @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Print values in ASCII form on a stream */ #ifndef spprint_INCLUDED diff --git a/gs/src/spsdf.c b/gs/src/spsdf.c index df6383ded..127e0fdaa 100644 --- a/gs/src/spsdf.c +++ b/gs/src/spsdf.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common utilities for PostScript and PDF format printing */ #include "stdio_.h" /* for stream.h */ #include "string_.h" diff --git a/gs/src/spsdf.h b/gs/src/spsdf.h index 5633540b7..8117c58cf 100644 --- a/gs/src/spsdf.h +++ b/gs/src/spsdf.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common output syntax and parameters for PostScript and PDF writers */ #ifndef spsdf_INCLUDED diff --git a/gs/src/srdline.h b/gs/src/srdline.h index 62d5d99a8..f59ed769b 100644 --- a/gs/src/srdline.h +++ b/gs/src/srdline.h @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Interface for readline */ /* Requires gsmemory.h, gstypes.h */ diff --git a/gs/src/srld.c b/gs/src/srld.c index 218259aa3..c510c4fae 100644 --- a/gs/src/srld.c +++ b/gs/src/srld.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* RunLengthDecode filter */ #include "stdio_.h" /* includes std.h */ #include "memory_.h" diff --git a/gs/src/srle.c b/gs/src/srle.c index 08026cf13..9ac2f9e75 100644 --- a/gs/src/srle.c +++ b/gs/src/srle.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* RunLengthEncode filter */ #include "stdio_.h" /* includes std.h */ #include "memory_.h" diff --git a/gs/src/srlx.h b/gs/src/srlx.h index a6176e116..32e78a28d 100644 --- a/gs/src/srlx.h +++ b/gs/src/srlx.h @@ -1,22 +1,10 @@ /* Copyright (C) 1994, 1995, 1996, 1997 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ +/* Definitions for RunLength filters */ /* Requires scommon.h; strimpl.h if any templates are referenced */ #ifndef srlx_INCLUDED diff --git a/gs/src/sstring.c b/gs/src/sstring.c index 7f7e395ae..58e3eaf12 100644 --- a/gs/src/sstring.c +++ b/gs/src/sstring.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* String and hexstring streams (filters) */ #include "stdio_.h" /* includes std.h */ #include "memory_.h" diff --git a/gs/src/sstring.h b/gs/src/sstring.h index 8b89acd8b..3c89e148f 100644 --- a/gs/src/sstring.h +++ b/gs/src/sstring.h @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* are referenced, but some compilers always require strimpl.h. */ #ifndef sstring_INCLUDED diff --git a/gs/src/stat_.h b/gs/src/stat_.h index 05eba3759..91ef70fd1 100644 --- a/gs/src/stat_.h +++ b/gs/src/stat_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic substitute for Unix sys/stat.h */ #ifndef stat__INCLUDED diff --git a/gs/src/std.h b/gs/src/std.h index c370fda1d..95a88721b 100644 --- a/gs/src/std.h +++ b/gs/src/std.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1994, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Standard definitions for Aladdin Enterprises code */ #ifndef std_INCLUDED diff --git a/gs/src/stdio_.h b/gs/src/stdio_.h index ca7c29b73..6abdf2a6b 100644 --- a/gs/src/stdio_.h +++ b/gs/src/stdio_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1994, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic substitute for stdio.h */ #ifndef stdio__INCLUDED diff --git a/gs/src/stdpre.h b/gs/src/stdpre.h index 8c4452527..00dc4253b 100644 --- a/gs/src/stdpre.h +++ b/gs/src/stdpre.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Standard definitions for Aladdin Enterprises code not needing arch.h */ #ifndef stdpre_INCLUDED diff --git a/gs/src/store.h b/gs/src/store.h index cb2d8a4f9..2cbc8c1f8 100644 --- a/gs/src/store.h +++ b/gs/src/store.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Assignment-related macros */ #ifndef store_INCLUDED diff --git a/gs/src/stream.c b/gs/src/stream.c index c0407ebb6..c738aa502 100644 --- a/gs/src/stream.c +++ b/gs/src/stream.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Stream package for Ghostscript interpreter */ #include "stdio_.h" /* includes std.h */ #include "memory_.h" @@ -712,15 +699,20 @@ sreadbuf(stream * s, stream_cursor_write * pbuf) stream_cursor_read cr; stream_cursor_read *pr; stream_cursor_write *pw; + int left; bool eof; strm = curr->strm; if (strm == 0) { cr.ptr = 0, cr.limit = 0; pr = &cr; + left = 0; eof = false; } else { pr = &strm->cursor.r; + left = sbuf_min_left(strm); + left = min(left, pr->limit - pr->ptr); + pr->limit -= left; eof = strm->end_status == EOFC; } pw = (prev == 0 ? pbuf : &curr->cursor.w); @@ -728,6 +720,7 @@ sreadbuf(stream * s, stream_cursor_write * pbuf) (ulong) curr, (uint) (pr->limit - pr->ptr), (uint) (pw->limit - pw->ptr), eof); status = (*curr->procs.process) (curr->state, pr, pw, eof); + pr->limit += left; if_debug4('s', "[s]after read 0x%lx, nr=%u, nw=%u, status=%d\n", (ulong) curr, (uint) (pr->limit - pr->ptr), (uint) (pw->limit - pw->ptr), status); diff --git a/gs/src/stream.h b/gs/src/stream.h index 95ebcdc9f..7798848f2 100644 --- a/gs/src/stream.h +++ b/gs/src/stream.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for Ghostscript stream package */ /* Requires stdio.h */ @@ -266,10 +253,13 @@ int spseek(P2(stream *, long)); /* * Define the minimum amount of data that must be left in an input buffer * after a read operation to handle filter read-ahead. This is 1 byte for - * filters (including procedure data sources), 0 for files. + * filters (including procedure data sources) that haven't reached EOD, + * 0 for files. */ #define max_min_left 1 -#define sbuf_min_left(s) (s->strm == 0 && s->end_status != CALLC ? 0 : 1) +#define sbuf_min_left(s)\ + (s->strm == 0 ? (s->end_status != CALLC ? 0 : 1) :\ + s->end_status == EOFC || s->end_status == ERRC ? 0 : 1) /* The following are for very high-performance clients of read streams, */ /* who unpack the stream state into local variables. */ diff --git a/gs/src/strimpl.h b/gs/src/strimpl.h index 5839c635e..a2b86fa9a 100644 --- a/gs/src/strimpl.h +++ b/gs/src/strimpl.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Definitions for stream implementors */ /* Requires stdio.h */ diff --git a/gs/src/string_.h b/gs/src/string_.h index 033b9c1a5..32d783992 100644 --- a/gs/src/string_.h +++ b/gs/src/string_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1994, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic substitute for Unix string.h */ #ifndef string__INCLUDED diff --git a/gs/src/szlibc.c b/gs/src/szlibc.c index 0e6fecfa0..8ead4aa5d 100644 --- a/gs/src/szlibc.c +++ b/gs/src/szlibc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Code common to zlib encoding and decoding streams */ #include "std.h" #include "gserror.h" diff --git a/gs/src/szlibd.c b/gs/src/szlibd.c index 5502b1807..7f1d9dfb4 100644 --- a/gs/src/szlibd.c +++ b/gs/src/szlibd.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* zlib decoding (decompression) filter stream */ #include "std.h" #include "gsmemory.h" diff --git a/gs/src/szlibe.c b/gs/src/szlibe.c index 18f3efa8a..2abfd25f6 100644 --- a/gs/src/szlibe.c +++ b/gs/src/szlibe.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* zlib encoding (compression) filter stream */ #include "std.h" #include "gsmemory.h" diff --git a/gs/src/szlibx.h b/gs/src/szlibx.h index 8de6b86c2..42f0fa8b3 100644 --- a/gs/src/szlibx.h +++ b/gs/src/szlibx.h @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* zlib filter state definition */ #ifndef szlibx_INCLUDED diff --git a/gs/src/szlibxx.h b/gs/src/szlibxx.h index df38b531b..13c508f24 100644 --- a/gs/src/szlibxx.h +++ b/gs/src/szlibxx.h @@ -1,22 +1,9 @@ /* Copyright (C) 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Implementation definitions for zlib interface */ /* Must be compiled with -I$(ZSRCDIR) */ diff --git a/gs/src/time_.h b/gs/src/time_.h index ac3e19523..e22cadbcd 100644 --- a/gs/src/time_.h +++ b/gs/src/time_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1997, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic substitute for Unix sys/time.h */ #ifndef time__INCLUDED diff --git a/gs/src/ugcclib.mak b/gs/src/ugcclib.mak index 080475c45..a38a5fe97 100644 --- a/gs/src/ugcclib.mak +++ b/gs/src/ugcclib.mak @@ -1,21 +1,8 @@ # Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for Unix / gcc library testing. BINDIR=./libobj @@ -66,6 +53,7 @@ XCFLAGS= CFLAGS=-g -O $(GCFLAGS) $(XCFLAGS) CFLAGS_NO_WARN=-g -O $(GCFLAGS_NO_WARN) $(XCFLAGS) LDFLAGS=$(XLDFLAGS) +STDLIBS=-lm EXTRALIBS= XINCLUDE=-I/usr/local/X/include XLIBDIRS=-L/usr/X11/lib @@ -78,7 +66,7 @@ SYNC=posync FEATURE_DEVS=$(GLD)dps2lib.dev $(GLD)psl2cs.dev $(GLD)cielib.dev\ $(GLD)imasklib.dev $(GLD)patlib.dev $(GLD)htxlib.dev $(GLD)roplib.dev\ $(GLD)devcmap.dev -COMPILE_INITS=0 +COMPILE_INITS=1 BAND_LIST_STORAGE=file BAND_LIST_COMPRESSOR=zlib FILE_IMPLEMENTATION=stdio @@ -134,10 +122,10 @@ include $(GLSRCDIR)/unix-aux.mak LIB_ONLY=$(GLOBJ)gslib.$(OBJ) $(GLOBJ)gsnogc.$(OBJ) $(GLOBJ)gconfig.$(OBJ) $(GLOBJ)gscdefs.$(OBJ) ldt_tr=$(GLOBJ)ldt.tr $(GS_XE): $(ld_tr) $(ECHOGS_XE) $(LIB_ALL) $(DEVS_ALL) $(LIB_ONLY) - $(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(LDFLAGS) $(XLIBDIRS) -o $(GS_XE) + $(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(LDFLAGS) -o $(GS_XE) $(ECHOGS_XE) -a $(ldt_tr) -n -s $(LIB_ONLY) -s cat $(ld_tr) >>$(ldt_tr) - $(ECHOGS_XE) -a $(ldt_tr) -s - $(EXTRALIBS) -lm + $(ECHOGS_XE) -a $(ldt_tr) -s - $(EXTRALIBS) $(STDLIBS) LD_RUN_PATH=$(XLIBDIR); export LD_RUN_PATH; $(SH) <$(ldt_tr) include $(GLSRCDIR)/unix-end.mak diff --git a/gs/src/unix-aux.mak b/gs/src/unix-aux.mak index 2eaf4649e..938188dc6 100644 --- a/gs/src/unix-aux.mak +++ b/gs/src/unix-aux.mak @@ -1,21 +1,8 @@ # Copyright (C) 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Partial makefile common to all Unix configurations. # This makefile contains the build rules for the auxiliary programs such as # echogs, and the 'platform' modules. diff --git a/gs/src/unix-end.mak b/gs/src/unix-end.mak index 56dd6d849..b7357a918 100644 --- a/gs/src/unix-end.mak +++ b/gs/src/unix-end.mak @@ -1,21 +1,8 @@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Partial makefile common to all Unix and Desqview/X configurations. # This is the next-to-last part of the makefile for these configurations. @@ -42,10 +29,10 @@ PGDEFS=GENOPT='-DPROFILE' CFLAGS='$(CFLAGS_PROFILE) $(GCFLAGS) $(XCFLAGS)'\ PSGENDIR=$(PSGENDIR)/$(PGRELDIR) PSOBJDIR=$(PSOBJDIR)/$(PGRELDIR) pg: PGDIRS - make $(PGDEFS) default + $(MAKE) $(PGDEFS) default pgclean: PGDIRS - make $(PGDEFS) clean + $(MAKE) $(PGDEFS) clean # Define a rule for building debugging configurations. DEBUGDIRS: STDDIRS @@ -61,10 +48,10 @@ DEBUGDEFS=GENOPT='-DDEBUG' CFLAGS='$(CFLAGS_DEBUG) $(GCFLAGS) $(XCFLAGS)'\ PSGENDIR=$(PSGENDIR)/$(DEBUGRELDIR) PSOBJDIR=$(PSOBJDIR)/$(DEBUGRELDIR) debug: DEBUGDIRS - make $(DEBUGDEFS) default + $(MAKE) $(DEBUGDEFS) default debugclean: DEBUGDIRS - make $(DEBUGDEFS) clean + $(MAKE) $(DEBUGDEFS) clean # The rule for gconfigv.h is here because it is shared between Unix and # DV/X environments. diff --git a/gs/src/unix-gcc.mak b/gs/src/unix-gcc.mak index e50210dcb..389902685 100755 --- a/gs/src/unix-gcc.mak +++ b/gs/src/unix-gcc.mak @@ -1,21 +1,8 @@ # Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for Unix/gcc/X11 configuration. # ------------------------------- Options ------------------------------- # @@ -107,6 +94,16 @@ GENOPT= GS=gs +# Define the name of a pre-built executable that can be invoked at build +# time. Currently, this is only needed for compiled fonts. The usual +# alternatives are: +# - the standard name of Ghostscript on your system (typically `gs'): +BUILD_TIME_GS=gs +# - the name of the executable you are building now. If you choose this +# option, then you must build the executable first without compiled fonts, +# and then again with compiled fonts. +#BUILD_TIME_GS=$(BINDIR)/$(GS) -I$(PSLIBDIR) + # Define the directories for debugging and profiling binaries, relative to # the standard binaries. @@ -186,7 +183,8 @@ GCFLAGS=-Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -W # Define the added flags for standard, debugging, and profiling builds. -CFLAGS_STANDARD=-O2 +#CFLAGS_STANDARD=-O2 +CFLAGS_STANDARD=-O CFLAGS_DEBUG=-g -O CFLAGS_PROFILE=-pg -O2 @@ -225,6 +223,12 @@ LDFLAGS=$(XLDFLAGS) -fno-common EXTRALIBS= +# Define the standard libraries to search at the end of linking. +# All reasonable platforms require -lm, but Rhapsody and perhaps one or +# two others fold libm into libc and require STDLIBS to be empty. + +STDLIBS=-lm + # 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 /usr/include, or the directory is supplied by an environment variable); @@ -264,30 +268,25 @@ XLIBS=Xt Xext X11 FPU_TYPE=1 # Define the .dev module that implements thread and synchronization -# primitives for this platform. Don't change this unless you really know -# what you're doing. +# primitives for this platform. On FreeBSD, change posync to fbsdsync. +# Otherwise, don't change this unless you really know what you're doing. SYNC=posync # ------ Devices and features ------ # # Choose the language feature(s) to include. See gs.mak for details. -# Note that there is one feature that requires a GNU library: -# $(PSD)gnrdline.dev, which adds support for GNU readline, including -# on-the-fly name completion and evaluation. For details, including -# licensing problems that will arise if you add this feature to Aladdin -# Ghostscript releases, see gp_gnrdl.c. - -FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)pipe.dev -#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)pipe.dev $(PSD)rasterop.dev + +FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(GLD)pipe.dev +#FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(GLD)pipe.dev # The following is strictly for testing. -FEATURE_DEVS_ALL=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)pipe.dev $(PSD)rasterop.dev $(PSD)double.dev $(PSD)trapping.dev $(PSD)compht.dev $(PSD)gnrdline.dev +FEATURE_DEVS_ALL=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(PSD)double.dev $(PSD)trapping.dev $(PSD)compht.dev $(GLD)pipe.dev #FEATURE_DEVS=$(FEATURE_DEVS_ALL) # Choose whether to compile the .ps initialization files into the executable. # See gs.mak for details. -COMPILE_INITS=0 +COMPILE_INITS=1 # Choose whether to store band lists on files or in memory. # The choices are 'file' or 'memory'. @@ -351,7 +350,7 @@ DEVICE_DEVS16= DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= -DEVICE_DEVS20= +DEVICE_DEVS20=$(DD)cljet5.dev $(DD)cljet5pr.dev # ---------------------------- End of options --------------------------- # diff --git a/gs/src/unixansi.mak b/gs/src/unixansi.mak index e61012016..fa89ff972 100755 --- a/gs/src/unixansi.mak +++ b/gs/src/unixansi.mak @@ -1,21 +1,8 @@ # Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for Unix/ANSI C/X11 configuration. # ------------------------------- Options ------------------------------- # @@ -107,6 +94,16 @@ GENOPT= GS=gs +# Define the name of a pre-built executable that can be invoked at build +# time. Currently, this is only needed for compiled fonts. The usual +# alternatives are: +# - the standard name of Ghostscript on your system (typically `gs'): +BUILD_TIME_GS=gs +# - the name of the executable you are building now. If you choose this +# option, then you must build the executable first without compiled fonts, +# and then again with compiled fonts. +#BUILD_TIME_GS=$(BINDIR)/$(GS) -I$(PSLIBDIR) + # Define the directories for debugging and profiling binaries, relative to # the standard binaries. @@ -218,6 +215,12 @@ LDFLAGS=$(XLDFLAGS) EXTRALIBS= +# Define the standard libraries to search at the end of linking. +# All reasonable platforms require -lm, but Rhapsody and perhaps one or +# two others fold libm into libc and require STDLIBS to be empty. + +STDLIBS=-lm + # 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 /usr/include, or the directory is supplied by an environment variable); @@ -256,8 +259,8 @@ XLIBS=Xt Xext X11 FPU_TYPE=1 # Define the .dev module that implements thread and synchronization -# primitives for this platform. Don't change this unless you really know -# what you're doing. +# primitives for this platform. On FreeBSD, change posync to fbsdsync. +# Otherwise, don't change this unless you really know what you're doing. SYNC=posync @@ -265,12 +268,12 @@ SYNC=posync # Choose the language feature(s) to include. See gs.mak for details. -FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)pipe.dev +FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(GLD)pipe.dev # Choose whether to compile the .ps initialization files into the executable. # See gs.mak for details. -COMPILE_INITS=0 +COMPILE_INITS=1 # Choose whether to store band lists on files or in memory. # The choices are 'file' or 'memory'. @@ -291,7 +294,7 @@ FILE_IMPLEMENTATION=stdio # Choose the device(s) to include. See devs.mak for details, # devs.mak and contrib.mak for the list of available devices. -DEVICE_DEVS=$(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11mono.dev +DEVICE_DEVS=$(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11gray2.dev $(DD)x11gray4.dev $(DD)x11mono.dev DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3=$(DD)deskjet.dev $(DD)djet500.dev $(DD)laserjet.dev $(DD)ljetplus.dev $(DD)ljet2p.dev $(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)ljet4d.dev @@ -299,15 +302,16 @@ DEVICE_DEVS4=$(DD)cdeskjet.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cdj550.de DEVICE_DEVS5=$(DD)uniprint.dev DEVICE_DEVS6=$(DD)bj10e.dev $(DD)bj200.dev $(DD)bjc600.dev $(DD)bjc800.dev DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev -DEVICE_DEVS8=$(DD)jpeg.dev $(DD)jpeggray.dev $(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev -DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev $(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev +DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev $(DD)pcxcmyk.dev +DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev DEVICE_DEVS11=$(DD)tiff12nc.dev $(DD)tiff24nc.dev -DEVICE_DEVS12=$(DD)psmono.dev $(DD)psgray.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev +DEVICE_DEVS12=$(DD)psmono.dev $(DD)psgray.dev $(DD)psrgb.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev -DEVICE_DEVS14= +DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)epswrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev -DEVICE_DEVS16= +# Overflow from DEVS9 +DEVICE_DEVS16=$(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= diff --git a/gs/src/unixhead.mak b/gs/src/unixhead.mak index 969da00ea..ff9390d5b 100644 --- a/gs/src/unixhead.mak +++ b/gs/src/unixhead.mak @@ -1,21 +1,8 @@ # Copyright (C) 1990, 1993, 1996, 1997 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Partial makefile common to all Unix configurations. # This part of the makefile gets inserted after the compiler-specific part diff --git a/gs/src/unixinst.mak b/gs/src/unixinst.mak index 8b63cabcd..48f7ca874 100644 --- a/gs/src/unixinst.mak +++ b/gs/src/unixinst.mak @@ -1,21 +1,8 @@ # Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Partial makefile common to all Unix and Desqview/X configurations, # containing the `install' targets. # This is the very last part of the makefile for these configurations. @@ -46,32 +33,36 @@ gsbj gsdj gsdj500 gslj gslp gsnd \ bdftops dvipdf font2c \ pdf2dsc pdf2ps pf2afm pfbtopfa printafm \ ps2ascii ps2epsi ps2pdf ps2ps wftopfa ;\ - do if ( test -f lib/$$f ); then $(INSTALL_PROGRAM) lib/$$f $(scriptdir)/$$f; fi;\ + do if ( test -f $(PSLIBDIR)/$$f ); then $(INSTALL_PROGRAM) $(PSLIBDIR)/$$f $(scriptdir); fi;\ done' +PSDOCDIR=$(PSLIBDIR)/../doc +PSEXDIR=$(PSLIBDIR)/../examples +PSMANDIR=$(PSLIBDIR)/../man + MAN1_PAGES=gs pdf2dsc pdf2ps ps2ascii ps2epsi ps2pdf ps2ps install-data: man/gs.1 -mkdir $(mandir) -mkdir $(man1dir) - cd man; $(SH) -c 'for f in $(MAN1_PAGES) ;\ - do if ( test -f $$f.1 ); then $(INSTALL_DATA) $$f.1 $(man1dir)/$$f.$(man1ext); fi;\ + $(SH) -c 'for f in $(MAN1_PAGES) ;\ + do if ( test -f $(PSMANDIR)/$$f.1 ); then $(INSTALL_DATA) $(PSMANDIR)/$$f.1 $(man1dir)/$$f.$(man1ext); fi;\ done' -mkdir $(datadir) -mkdir $(gsdir) -mkdir $(gsdatadir) -mkdir $(gsdatadir)/lib - cd lib; $(SH) -c 'for f in \ + $(SH) -c 'for f in \ Fontmap Fontmap.GS \ -cbjc600.ppd cbjc800.ppd *.upp \ gs_init.ps gs_btokn.ps gs_ccfnt.ps gs_cff.ps gs_cidfn.ps gs_cmap.ps \ gs_diskf.ps gs_dpnxt.ps gs_dps.ps gs_dps1.ps gs_dps2.ps gs_epsf.ps \ gs_fonts.ps gs_kanji.ps gs_lev2.ps gs_ll3.ps \ gs_pfile.ps gs_rdlin.ps gs_res.ps gs_setpd.ps gs_statd.ps \ gs_trap.ps gs_ttf.ps gs_typ32.ps gs_typ42.ps gs_type1.ps \ -gs_dbt_e.ps gs_il1_e.ps gs_il2_e.ps gs_ksb_e.ps gs_std_e.ps gs_sym_e.ps \ +gs_ce_e.ps gs_dbt_e.ps gs_il1_e.ps gs_il2_e.ps gs_ksb_e.ps \ +gs_std_e.ps gs_sym_e.ps \ ht_ccbnm.ps \ acctest.ps align.ps bdftops.ps caption.ps cid2code.ps decrypt.ps docie.ps \ -errpage.ps font2c.ps font2pcl.ps gslp.ps impath.ps \ +errpage.ps font2c.ps font2pcl.ps gslp.ps gsnup.ps impath.ps \ landscap.ps level1.ps lines.ps markhint.ps markpath.ps \ packfile.ps pcharstr.ps pf2afm.ps ppath.ps prfont.ps printafm.ps \ ps2ai.ps ps2ascii.ps ps2epsi.ps quit.ps rollconv.ps \ @@ -86,10 +77,13 @@ pdf_base.ps pdf_draw.ps pdf_font.ps pdf_main.ps pdf_ops.ps pdf_sec.ps \ gs_lgo_e.ps gs_lgx_e.ps gs_mex_e.ps gs_mgl_e.ps gs_mro_e.ps \ gs_pdf_e.ps gs_wan_e.ps \ gs_pdfwr.ps ;\ - do if ( test -f $$f ); then $(INSTALL_DATA) $$f $(gsdatadir)/lib/$$f; fi;\ + do if ( test -f $(PSLIBDIR)/$$f ); then $(INSTALL_DATA) $(PSLIBDIR)/$$f $(gsdatadir)/lib; fi;\ + done' + $(SH) -c 'for f in $(PSLIBDIR)/*.ppd $(PSLIBDIR)/*.upp $(PSLIBDIR)/*.xbm $(PSLIBDIR)/*.xpm;\ + do $(INSTALL_DATA) $$f $(gsdatadir)/lib ;\ done' -mkdir $(docdir) - cd doc; $(SH) -c 'for f in \ + $(SH) -c 'for f in \ PUBLIC README \ ps2epsi.txt \ Bug-form.htm C-style.htm Commprod.htm Copying.htm Current.htm \ @@ -99,12 +93,12 @@ History1.htm History2.htm History3.htm History4.htm History5.htm \ Htmstyle.htm Humor.htm Install.htm Language.htm Lib.htm Make.htm New-user.htm \ News.htm Ps2pdf.htm Psfiles.htm Public.htm Readme.htm Release.htm \ Source.htm Tester.htm Unix-lpr.htm Use.htm Xfonts.htm ;\ - do if ( test -f $$f ); then $(INSTALL_DATA) $$f $(docdir)/$$f; fi;\ + do if ( test -f $(PSDOCDIR)/$$f ); then $(INSTALL_DATA) $(PSDOCDIR)/$$f $(docdir); fi;\ done' -mkdir $(exdir) - cd examples; for f in \ + for f in \ alphabet.ps chess.ps cheq.ps colorcir.ps escher.ps golfer.ps \ grayalph.ps snowflak.ps tiger.ps vasarely.ps waterfal.ps \ ridt91.eps ;\ - do $(INSTALL_DATA) $$f $(exdir)/$$f ;\ + do $(INSTALL_DATA) $(PSEXDIR)/$$f $(exdir) ;\ done diff --git a/gs/src/unixlink.mak b/gs/src/unixlink.mak index 3307b7f15..a46ef49c9 100644 --- a/gs/src/unixlink.mak +++ b/gs/src/unixlink.mak @@ -1,21 +1,8 @@ # Copyright (C) 1990, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Partial makefile common to all Unix configurations. # This part of the makefile contains the linking steps. @@ -63,10 +50,10 @@ $(GS_A): $(INT_ARCHIVE_ALL) # which has limited environment space. ldt_tr=$(PSOBJ)ldt.tr $(GS_XE): $(ld_tr) $(ECHOGS_XE) $(XE_ALL) - $(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(LDFLAGS) $(XLIBDIRS) -o $(GS_XE) + $(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(LDFLAGS) -o $(GS_XE) $(ECHOGS_XE) -a $(ldt_tr) -n -s $(PSOBJ)gs.$(OBJ) -s cat $(ld_tr) >>$(ldt_tr) - $(ECHOGS_XE) -a $(ldt_tr) -s - $(EXTRALIBS) -lm + $(ECHOGS_XE) -a $(ldt_tr) -s - $(EXTRALIBS) $(STDLIBS) LD_RUN_PATH=$(XLIBDIR); export LD_RUN_PATH; \ XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \ FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \ diff --git a/gs/src/unixtrad.mak b/gs/src/unixtrad.mak index 86b09ba23..67a8f14fa 100644 --- a/gs/src/unixtrad.mak +++ b/gs/src/unixtrad.mak @@ -1,21 +1,8 @@ # Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for Unix/"Traditional" C/X11 configuration. # ------------------------------- Options ------------------------------- # @@ -107,6 +94,16 @@ GENOPT= GS=gs +# Define the name of a pre-built executable that can be invoked at build +# time. Currently, this is only needed for compiled fonts. The usual +# alternatives are: +# - the standard name of Ghostscript on your system (typically `gs'): +BUILD_TIME_GS=gs +# - the name of the executable you are building now. If you choose this +# option, then you must build the executable first without compiled fonts, +# and then again with compiled fonts. +#BUILD_TIME_GS=$(BINDIR)/$(GS) -I$(PSLIBDIR) + # Define the directories for debugging and profiling binaries, relative to # the standard binaries. @@ -213,6 +210,12 @@ LDFLAGS=$(XLDFLAGS) EXTRALIBS= +# Define the standard libraries to search at the end of linking. +# All reasonable platforms require -lm, but Rhapsody and perhaps one or +# two others fold libm into libc and require STDLIBS to be empty. + +STDLIBS=-lm + # 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 /usr/include, or the directory is supplied by an environment variable); @@ -251,8 +254,8 @@ XLIBS=Xt Xext X11 FPU_TYPE=1 # Define the .dev module that implements thread and synchronization -# primitives for this platform. Don't change this unless you really know -# what you're doing. +# primitives for this platform. On FreeBSD, change posync to fbsdsync. +# Otherwise, don't change this unless you really know what you're doing. SYNC=posync @@ -260,12 +263,12 @@ SYNC=posync # Choose the language feature(s) to include. See gs.mak for details. -FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)pipe.dev +FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(GLD)pipe.dev # Choose whether to compile the .ps initialization files into the executable. # See gs.mak for details. -COMPILE_INITS=0 +COMPILE_INITS=1 # Choose whether to store band lists on files or in memory. # The choices are 'file' or 'memory'. diff --git a/gs/src/version.mak b/gs/src/version.mak index d1f84ef3b..863ceef5e 100644 --- a/gs/src/version.mak +++ b/gs/src/version.mak @@ -1,30 +1,17 @@ # Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Makefile fragment containing the current revision identification. # Major and minor version numbers. # MINOR0 is different from MINOR only if MINOR is a single digit. -GS_VERSION_MAJOR=5 -GS_VERSION_MINOR=93 -GS_VERSION_MINOR0=93 +GS_VERSION_MAJOR=6 +GS_VERSION_MINOR=10 +GS_VERSION_MINOR0=10 # Revision date: year x 10000 + month x 100 + day. -GS_REVISIONDATE=19990911 +GS_REVISIONDATE=19991212 # Derived values GS_VERSION=$(GS_VERSION_MAJOR)$(GS_VERSION_MINOR0) GS_DOT_VERSION=$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR) diff --git a/gs/src/vmsmath.h b/gs/src/vmsmath.h index fd4872bb2..6b59676cc 100644 --- a/gs/src/vmsmath.h +++ b/gs/src/vmsmath.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Substitute for math.h on VAX/VMS systems */ #ifndef vmsmath_INCLUDED diff --git a/gs/src/watc.mak b/gs/src/watc.mak index dde7e2260..235bb2707 100644 --- a/gs/src/watc.mak +++ b/gs/src/watc.mak @@ -1,21 +1,8 @@ # Copyright (C) 1991, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for MS-DOS/Watcom C386 platform. # We strongly recommend that you read the Watcom section of Make.htm # before attempting to build Ghostscript with the Watcom compiler. @@ -26,15 +13,33 @@ # ------ Generic options ------ # +# Define the directory for the final executable, and the +# source, generated intermediate file, and object directories +# for the graphics library (GL) and the PostScript/PDF interpreter (PS). + +BINDIR=bin +GLSRCDIR=src +GLGENDIR=obj +GLOBJDIR=obj +PSSRCDIR=src +PSLIBDIR=lib +PSGENDIR=obj +PSOBJDIR=obj + +# Define the root directory for Ghostscript installation. + +AROOTDIR=c:/Aladdin +GSROOTDIR=$(AROOTDIR)/gs$(GS_DOT_VERSION) + # Define the directory that will hold documentation at runtime. -GS_DOCDIR=c:/gs +GS_DOCDIR=$(GSROOTDIR)/doc # Define the default directory/ies for the runtime # initialization and font files. Separate multiple directories with \;. # Use / to indicate directories, not a single \. -GS_LIB_DEFAULT=.\;c:/gs/lib\;c:/gs/fonts +GS_LIB_DEFAULT=$(GSROOTDIR)/lib\;$(AROOTDIR)/fonts # Define whether or not searching for initialization files should always # look in the current directory first. This leads to well-known security @@ -74,18 +79,15 @@ NOPRIVATE=0 GS=gs386 -# Define the directory for the final executable, and the -# source, generated intermediate file, and object directories -# for the graphics library (GL) and the PostScript/PDF interpreter (PS). - -BINDIR=bin -GLSRCDIR=src -GLGENDIR=obj -GLOBJDIR=obj -PSSRCDIR=src -PSLIBDIR=lib -PSGENDIR=obj -PSOBJDIR=obj +# Define the name of a pre-built executable that can be invoked at build +# time. Currently, this is only needed for compiled fonts. The usual +# alternatives are: +# - the standard name of Ghostscript on your system (typically `gs'): +BUILD_TIME_GS=gs386 +# - the name of the executable you are building now. If you choose this +# option, then you must build the executable first without compiled fonts, +# and then again with compiled fonts. +#BUILD_TIME_GS=$(BINDIR)\$(GS) -I$(PSLIBDIR) # Do not edit the next group of lines. NUL= @@ -185,7 +187,7 @@ FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev # Choose whether to compile the .ps initialization files into the executable. # See gs.mak for details. -COMPILE_INITS=0 +COMPILE_INITS=1 # Choose whether to store band lists on files or in memory. # The choices are 'file' or 'memory'. diff --git a/gs/src/watclib.mak b/gs/src/watclib.mak index ab437893a..b1bf1ef20 100644 --- a/gs/src/watclib.mak +++ b/gs/src/watclib.mak @@ -1,28 +1,17 @@ # Copyright (C) 1991, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for MS-DOS / Watcom C/C++ library testing. libdefault: $(GLOBJ)gslib.exe $(NO_OP) -GS_DOCDIR=c:/gs -GS_LIB_DEFAULT=.;c:/gs/lib\;c:/gs/fonts +AROOTDIR=c:/Aladdin +GSROOTDIR=$(AROOTDIR)/gs$(GS_DOT_VERSION) +GS_DOCDIR=$(GSROOTDIR)/doc +GS_LIB_DEFAULT=$(GSROOTDIR)/lib\;$(AROOTDIR)/fonts SEARCH_HERE_FIRST=1 GS_INIT=gs_init.ps @@ -39,16 +28,16 @@ NOPRIVATE=1 GS=gslib !ifndef BINDIR -BINDIR=.\obj +BINDIR=.\debugobj !endif !ifndef GLSRCDIR GLSRCDIR=.\src !endif !ifndef GLGENDIR -GLGENDIR=.\obj +GLGENDIR=.\debugobj !endif !ifndef GLOBJDIR -GLOBJDIR=.\obj +GLOBJDIR=.\debugobj !endif # Do not edit the next group of lines. @@ -107,7 +96,7 @@ FEATURE_DEVS=$(GLD)patlib.dev $(GLD)path1lib.dev $(GLD)hsblib.dev DEVICE_DEVS=$(DD)vga.dev !endif !ifndef COMPILE_INITS -COMPILE_INITS=0 +COMPILE_INITS=1 !endif !ifndef BAND_LIST_STORAGE BAND_LIST_STORAGE=file diff --git a/gs/src/watcw32.mak b/gs/src/watcw32.mak index 42dd7decd..f5e08e62f 100644 --- a/gs/src/watcw32.mak +++ b/gs/src/watcw32.mak @@ -1,21 +1,8 @@ # Copyright (C) 1991-1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # watcw32.mak # makefile for Watcom C++ v??, Windows NT or Windows 95 platform. # Does NOT build gs16spl.exe, which is 16-bit and is used under Win32s. @@ -30,15 +17,33 @@ # ------ Generic options ------ # +# Define the directory for the final executable, and the +# source, generated intermediate file, and object directories +# for the graphics library (GL) and the PostScript/PDF interpreter (PS). + +BINDIR=bin +GLSRCDIR=src +GLGENDIR=obj +GLOBJDIR=obj +PSSRCDIR=src +PSLIBDIR=lib +PSGENDIR=obj +PSOBJDIR=obj + +# Define the root directory for Ghostscript installation. + +AROOTDIR=c:/Aladdin +GSROOTDIR=$(AROOTDIR)/gs$(GS_DOT_VERSION) + # Define the directory that will hold documentation at runtime. -GS_DOCDIR=c:/gs +GS_DOCDIR=$(GSROOTDIR)/doc # Define the default directory/ies for the runtime # initialization and font files. Separate multiple directories with \;. # Use / to indicate directories, not a single \. -GS_LIB_DEFAULT=.;c:/gs/lib\;c:/gs/fonts +GS_LIB_DEFAULT=$(GSROOTDIR)/lib\;$(AROOTDIR)/fonts # Define whether or not searching for initialization files should always # look in the current directory first. This leads to well-known security @@ -79,24 +84,21 @@ GS=gswin32 GSCONSOLE=gswin32c GSDLL=gsdll32 +# Define the name of a pre-built executable that can be invoked at build +# time. Currently, this is only needed for compiled fonts. The usual +# alternatives are: +# - the standard name of Ghostscript on your system (typically `gs'): +BUILD_TIME_GS=gswin32c +# - the name of the executable you are building now. If you choose this +# option, then you must build the executable first without compiled fonts, +# and then again with compiled fonts. +#BUILD_TIME_GS=$(BINDIR)\$(GS) -I$(PSLIBDIR) + # To build two small executables and a large DLL use MAKEDLL=1 # To build two large executables use MAKEDLL=0 MAKEDLL=1 -# Define the directory for the final executable, and the -# source, generated intermediate file, and object directories -# for the graphics library (GL) and the PostScript/PDF interpreter (PS). - -BINDIR=bin -GLSRCDIR=src -GLGENDIR=obj -GLOBJDIR=obj -PSSRCDIR=src -PSLIBDIR=lib -PSGENDIR=obj -PSOBJDIR=obj - # Define the directory where the IJG JPEG library sources are stored, # and the major version of the library that is stored there. # You may need to change this if the IJG library version changes. @@ -186,7 +188,7 @@ FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev # Choose whether to compile the .ps initialization files into the executable. # See gs.mak for details. -COMPILE_INITS=0 +COMPILE_INITS=1 # Choose whether to store band lists on files or in memory. # The choices are 'file' or 'memory'. diff --git a/gs/src/wccommon.mak b/gs/src/wccommon.mak index 084cf6f5f..befb1367d 100644 --- a/gs/src/wccommon.mak +++ b/gs/src/wccommon.mak @@ -1,21 +1,8 @@ # Copyright (C) 1991, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # wccommon.mak # Section of Watcom C/C++ makefile common to MS-DOS and MS Windows. # We strongly recommend that you read the Watcom section of Make.htm diff --git a/gs/src/wctail.mak b/gs/src/wctail.mak index 00343f2b6..e24a92374 100644 --- a/gs/src/wctail.mak +++ b/gs/src/wctail.mak @@ -1,21 +1,8 @@ # Copyright (C) 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # wctail.mak # Last part of Watcom C/C++ makefile common to MS-DOS and MS Windows. diff --git a/gs/src/windows_.h b/gs/src/windows_.h index 3bcc72101..a5493c629 100644 --- a/gs/src/windows_.h +++ b/gs/src/windows_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Wrapper for windows.h */ #ifndef windows__INCLUDED diff --git a/gs/src/winint.mak b/gs/src/winint.mak index 394308dcc..f4f17baaa 100644 --- a/gs/src/winint.mak +++ b/gs/src/winint.mak @@ -1,21 +1,8 @@ # Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Common interpreter makefile section for 32-bit MS Windows. # This makefile must be acceptable to Microsoft Visual C++, Watcom C++, @@ -37,6 +24,28 @@ PSCCWIN=$(CC_WX) $(CCWINFLAGS) $(I_)$(PSI_)$(_I) $(PSF_) # Define the name of this makefile. WININT_MAK=$(PSSRC)winint.mak +# Define the location of the WinZip self-extracting-archive-maker. +!ifndef WINZIPSE_XE +WINZIPSE_XE="C:\Program Files\WinZip Self-Extractor\WZIPSE32.EXE" +!endif + +# Define the setup and install programs, which are only suitable +# for the DLL build. +!if $(MAKEDLL) +!ifndef SETUP_XE_NAME +SETUP_XE_NAME=setupgs.exe +!endif +!ifndef SETUP_XE +SETUP_XE=$(BINDIR)\$(SETUP_XE_NAME) +!endif +!ifndef UNINSTALL_XE_NAME +UNINSTALL_XE_NAME=uninstgs.exe +!endif +!ifndef UNINSTALL_XE +UNINSTALL_XE=$(BINDIR)\$(UNINSTALL_XE_NAME) +!endif +!endif + # ----------------------------- Main program ------------------------------ # ICONS=$(GLGEN)gsgraph.ico $(GLGEN)gstext.ico @@ -121,4 +130,107 @@ $(GLOBJ)dwdllc.obj: $(GLSRC)dwdll.cpp $(AK) $(dwdll_h) $(gsdll_h) $(GLOBJ)dwnodllc.obj: $(GLSRC)dwnodll.cpp $(AK) $(dwdll_h) $(gsdll_h) $(GLCPP) $(COMPILE_FOR_CONSOLE_EXE) $(GLO_)dwnodllc.obj $(C_) $(GLSRC)dwnodll.cpp + +# ---------------------- Setup and uninstall program ---------------------- # + +!if $(MAKEDLL) + +# Modules for setup program + +$(GLOBJ)dwsetup.res: $(GLSRC)dwsetup.rc $(GLSRC)dwsetup.h $(GLGEN)gstext.ico + $(RCOMP) -I$(GLSRCDIR) -i$(GLOBJDIR) -i$(INCDIR)$(_I) -r $(RO_)$(GLOBJ)dwsetup.res $(GLSRC)dwsetup.rc + +$(GLOBJ)dwsetup.obj: $(GLSRC)dwsetup.cpp $(GLSRC)dwsetup.h $(GLSRC)dwinst.h + $(GLCPP) $(COMPILE_FOR_EXE) $(GLO_)dwsetup.obj $(C_) $(GLSRC)dwsetup.cpp + +$(GLOBJ)dwinst.obj: $(GLSRC)dwinst.cpp $(GLSRC)dwinst.h + $(GLCPP) $(COMPILE_FOR_EXE) $(GLO_)dwinst.obj $(C_) $(GLSRC)dwinst.cpp + +# Modules for uninstall program + +$(GLOBJ)dwuninst.res: $(GLSRC)dwuninst.rc $(GLSRC)dwuninst.h $(GLGEN)gstext.ico + $(RCOMP) -I$(GLSRCDIR) -i$(GLOBJDIR) -i$(INCDIR)$(_I) -r $(RO_)$(GLOBJ)dwuninst.res $(GLSRC)dwuninst.rc + +$(GLOBJ)dwuninst.obj: $(GLSRC)dwuninst.cpp $(GLSRC)dwuninst.h + $(GLCPP) $(COMPILE_FOR_EXE) $(GLO_)dwuninst.obj $(C_) $(GLSRC)dwuninst.cpp + +!endif + + +# ------------------------- Distribution archive -------------------------- # + +# Create a self-extracting archive with setup program. +# This assumes that the current directory is named gs#.## relative to its +# parent, where #.## is the Ghostscript version, and that the files and +# directories listed in ZIPTEMPFILE and ZIPFONTFILES are the complete list +# of needed files and directories. + +ZIPTEMPFILE=gs$(GS_DOT_VERSION)\obj\dwfiles.rsp +ZIPPROGFILE1=gs$(GS_DOT_VERSION)\bin\gsdll32.dll +ZIPPROGFILE2=gs$(GS_DOT_VERSION)\bin\gswin32.exe +ZIPPROGFILE3=gs$(GS_DOT_VERSION)\bin\gswin32c.exe +ZIPPROGFILE4=gs$(GS_DOT_VERSION)\bin\gs16spl.exe +ZIPPROGFILE5=gs$(GS_DOT_VERSION)\doc +ZIPPROGFILE6=gs$(GS_DOT_VERSION)\examples +ZIPPROGFILE7=gs$(GS_DOT_VERSION)\lib +ZIPFONTFILES=fonts + +# Make the zip archive. +FILELIST_TXT=filelist.txt +FONTLIST_TXT=fontlist.txt +zip: $(SETUP_XE) $(UNINSTALL_XE) + cd .. + copy gs$(GS_DOT_VERSION)\$(SETUP_XE) . + copy gs$(GS_DOT_VERSION)\$(UNINSTALL_XE) . + echo $(ZIPPROGFILE1) > $(ZIPTEMPFILE) + echo $(ZIPPROGFILE2) >> $(ZIPTEMPFILE) + echo $(ZIPPROGFILE3) >> $(ZIPTEMPFILE) + echo $(ZIPPROGFILE4) >> $(ZIPTEMPFILE) + echo $(ZIPPROGFILE5) >> $(ZIPTEMPFILE) + echo $(ZIPPROGFILE6) >> $(ZIPTEMPFILE) + echo $(ZIPPROGFILE7) >> $(ZIPTEMPFILE) + $(SETUP_XE_NAME) -title "Aladdin Ghostscript $(GS_DOT_VERSION)" -dir "gs$(GS_DOT_VERSION)" -list "$(FILELIST_TXT)" @$(ZIPTEMPFILE) + $(SETUP_XE_NAME) -title "Aladdin Ghostscript Fonts" -dir "fonts" -list "$(FONTLIST_TXT)" $(ZIPFONTFILES) + -del gs$(GS_VERSION)w32.zip + zip -9 -r gs$(GS_VERSION)w32.zip $(SETUP_XE_NAME) $(UNINSTALL_XE_NAME) $(FILELIST_TXT) $(FONTLIST_TXT) + zip -9 -r gs$(GS_VERSION)w32.zip $(ZIPFONTFILES) + zip -9 -r gs$(GS_VERSION)w32.zip $(ZIPPROGFILE1) + zip -9 -r gs$(GS_VERSION)w32.zip $(ZIPPROGFILE2) + zip -9 -r gs$(GS_VERSION)w32.zip $(ZIPPROGFILE3) + rem Don't flag error if Win32s spooler file is missing. + rem This occurs when using MSVC++. + -zip -9 -r gs$(GS_VERSION)w32.zip $(ZIPPROGFILE4) + zip -9 -r gs$(GS_VERSION)w32.zip $(ZIPPROGFILE5) + zip -9 -r gs$(GS_VERSION)w32.zip $(ZIPPROGFILE6) + zip -9 -r gs$(GS_VERSION)w32.zip $(ZIPPROGFILE7) + -del $(ZIPTEMPFILE) + -del $(SETUP_XE_NAME) + -del $(UNINSTALL_XE_NAME) + -del $(FILELIST_TXT) + -del $(FONTLIST_TXT) + cd gs$(GS_DOT_VERSION) + +# Now convert to a self extracting archive. +# This involves making a few temporary files. +ZIP_RSP = $(GLOBJ)setupgs.rsp +# Note that we use ECHOGS_XE rather than echo for the .txt files +# to avoid ANSI/OEM character mapping. +archive: zip $(GLOBJ)gstext.ico $(ECHOGS_XE) + $(ECHOGS_XE) -w $(ZIP_RSP) -q "-win32 -setup" + $(ECHOGS_XE) -a $(ZIP_RSP) -q -st -x 22 Aladdin Ghostscript $(GS_DOT_VERSION) for Win32 -x 22 + $(ECHOGS_XE) -a $(ZIP_RSP) -q -i -s $(GLOBJ)gstext.ico + $(ECHOGS_XE) -a $(ZIP_RSP) -q -a -s $(GLOBJ)about.txt + $(ECHOGS_XE) -a $(ZIP_RSP) -q -t -s $(GLOBJ)dialog.txt + $(ECHOGS_XE) -a $(ZIP_RSP) -q -c -s $(SETUP_XE_NAME) + $(ECHOGS_XE) -w $(GLOBJ)about.txt "Aladdin Ghostscript is Copyright " -x A9 " 1999 Aladdin Enterprises." + $(ECHOGS_XE) -a $(GLOBJ)about.txt See license in gs$(GS_DOT_VERSION)\doc\PUBLIC. + $(ECHOGS_XE) -a $(GLOBJ)about.txt See gs$(GS_DOT_VERSION)\doc\Commprod.htm regarding commercial distribution. + $(ECHOGS_XE) -w $(GLOBJ)dialog.txt This installs Aladdin Ghostscript $(GS_DOT_VERSION). + $(ECHOGS_XE) -a $(GLOBJ)dialog.txt Aladdin Ghostscript displays, prints and converts PostScript and PDF files. + $(WINZIPSE_XE) ..\gs$(GS_VERSION)w32 @$(GLOBJ)setupgs.rsp + -del $(ZIP_RSP) + -del $(GLOBJ)about.txt + -del $(GLOBJ)dialog.txt + + # end of winint.mak diff --git a/gs/src/winlib.mak b/gs/src/winlib.mak index b94854b01..2419109a6 100644 --- a/gs/src/winlib.mak +++ b/gs/src/winlib.mak @@ -1,20 +1,8 @@ # Copyright (C) 1991-1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Common makefile section for 32-bit MS Windows. # This makefile must be acceptable to Microsoft Visual C++, Watcom C++, @@ -45,10 +33,6 @@ AK=$(GLGENDIR)\ccf32.tr NULL= CMD=.bat - -!ifndef C_ -C_=-c -!endif D_=-D _D_=$(NULL)= _D= diff --git a/gs/src/winplat.mak b/gs/src/winplat.mak index bf98a883d..8d092bb6e 100644 --- a/gs/src/winplat.mak +++ b/gs/src/winplat.mak @@ -1,21 +1,8 @@ # Copyright (C) 1999 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Common makefile section for builds on 32-bit MS Windows, including the # Watcom MS-DOS build. diff --git a/gs/src/wmin.mak b/gs/src/wmin.mak index 95cb13528..ca8adced7 100644 --- a/gs/src/wmin.mak +++ b/gs/src/wmin.mak @@ -1,21 +1,8 @@ # Copyright (C) 1994 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # Makefile for compiling the Wadalab free Kanji font into the executable. # This does not yet include rules for creating the wmin*.c files. diff --git a/gs/src/x_.h b/gs/src/x_.h index 75def5a6d..cb4641f4c 100644 --- a/gs/src/x_.h +++ b/gs/src/x_.h @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Header for including X library calls in Ghostscript X11 driver */ #ifndef x__INCLUDED diff --git a/gs/src/zarith.c b/gs/src/zarith.c index c93779bc3..22a5d7231 100644 --- a/gs/src/zarith.c +++ b/gs/src/zarith.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1994, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Arithmetic operators */ #include "math_.h" #include "ghost.h" diff --git a/gs/src/zarray.c b/gs/src/zarray.c index 234ac898c..5af6e8926 100644 --- a/gs/src/zarray.c +++ b/gs/src/zarray.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Array operators */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zbfont.c b/gs/src/zbfont.c index 2061fdca1..e1378ad50 100644 --- a/gs/src/zbfont.c +++ b/gs/src/zbfont.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Font creation utilities */ #include "memory_.h" #include "string_.h" @@ -213,6 +200,7 @@ build_gs_primitive_font(i_ctx_t *i_ctx_p, os_ptr op, gs_font_base ** ppfont, int painttype; float strokewidth; ref *pcharstrings = 0; + ref CharStrings; gs_font_base *pfont; font_data *pdata; int code; @@ -235,6 +223,11 @@ build_gs_primitive_font(i_ctx_t *i_ctx_p, os_ptr op, gs_font_base ** ppfont, dict_find_string(pcharstrings, ".notdef", &ignore) <= 0 ) return_error(e_invalidfont); + /* + * Since build_gs_simple_font may resize the dictionary and cause + * pointers to become invalid, save CharStrings. + */ + CharStrings = *pcharstrings; } code = build_gs_simple_font(i_ctx_p, op, &pfont, ftype, pstype, pbuild, options); @@ -244,7 +237,7 @@ build_gs_primitive_font(i_ctx_t *i_ctx_p, os_ptr op, gs_font_base ** ppfont, pfont->StrokeWidth = strokewidth; pdata = pfont_data(pfont); if (pcharstrings) - ref_assign(&pdata->CharStrings, pcharstrings); + ref_assign(&pdata->CharStrings, &CharStrings); else make_null(&pdata->CharStrings); /* Check that the UniqueIDs match. This is part of the */ @@ -307,7 +300,7 @@ lookup_gs_simple_font_encoding(gs_font_base * pfont) const ref *pfe = &pfont_data(pfont)->Encoding; int index; - for (index = registered_Encodings_countof; --index >= 0;) + for (index = NUM_KNOWN_REAL_ENCODINGS; --index >= 0;) if (obj_eq(pfe, ®istered_Encoding(index))) break; pfont->encoding_index = index; @@ -316,7 +309,7 @@ lookup_gs_simple_font_encoding(gs_font_base * pfont) uint esize = r_size(pfe); uint best = esize / 3; /* must match at least this many */ - for (index = registered_Encodings_countof; --index >= 0;) { + for (index = NUM_KNOWN_REAL_ENCODINGS; --index >= 0;) { const ref *pre = ®istered_Encoding(index); bool r_packed = r_has_type(pre, t_shortarray); bool f_packed = !r_has_type(pfe, t_array); diff --git a/gs/src/zbseq.c b/gs/src/zbseq.c index 005a3f52e..7b603092a 100644 --- a/gs/src/zbseq.c +++ b/gs/src/zbseq.c @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Level 2 binary object sequence operators */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zcfont.c b/gs/src/zcfont.c index edeeef2ab..40cde4430 100644 --- a/gs/src/zcfont.c +++ b/gs/src/zcfont.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Composite font-related character operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zchar.c b/gs/src/zchar.c index b026552e5..478cdad5a 100644 --- a/gs/src/zchar.c +++ b/gs/src/zchar.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Character operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zchar1.c b/gs/src/zchar1.c index 4ef90aac7..6eb7f5708 100644 --- a/gs/src/zchar1.c +++ b/gs/src/zchar1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 1 character display operator */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zchar2.c b/gs/src/zchar2.c index ab98acd55..d4c85abe8 100644 --- a/gs/src/zchar2.c +++ b/gs/src/zchar2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 2 character display operator */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zchar32.c b/gs/src/zchar32.c index f9eecceda..59edc1711 100644 --- a/gs/src/zchar32.c +++ b/gs/src/zchar32.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 32 font glyph operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zchar42.c b/gs/src/zchar42.c index aa9506c28..09118d2db 100644 --- a/gs/src/zchar42.c +++ b/gs/src/zchar42.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 42 character display operator */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zcharout.c b/gs/src/zcharout.c index b7d96df6a..1c74f4fb3 100644 --- a/gs/src/zcharout.c +++ b/gs/src/zcharout.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Common code for outline (Type 1 / 4 / 42) fonts */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zcharx.c b/gs/src/zcharx.c index 4f0cc5b9a..08280a0bb 100644 --- a/gs/src/zcharx.c +++ b/gs/src/zcharx.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Level 2 character operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zcid.c b/gs/src/zcid.c index 2bc33afca..3697cb018 100644 --- a/gs/src/zcid.c +++ b/gs/src/zcid.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CID-keyed font operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zcie.c b/gs/src/zcie.c index 9eb58c006..bdd430a4c 100644 --- a/gs/src/zcie.c +++ b/gs/src/zcie.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CIE color operators */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/zcolor.c b/gs/src/zcolor.c index 8ab2e6ec4..e0b194182 100644 --- a/gs/src/zcolor.c +++ b/gs/src/zcolor.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1994, 1996, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Color operators */ #include "ghost.h" #include "oper.h" @@ -164,7 +151,12 @@ zcolor_remap_one(i_ctx_t *i_ctx_p, const ref * pproc, */ if (r_size(pproc) == 0) { pmap->proc = gs_identity_transfer; - return 0; + /* + * Even though we don't actually push anything on the e-stack, all + * clients do, so we return o_push_estack in this case. This is + * needed so that clients' finishing procedures will get run. + */ + return o_push_estack; } op = osp += 4; make_int(op - 3, 0); diff --git a/gs/src/zcolor1.c b/gs/src/zcolor1.c index 17972661a..381bce6c9 100644 --- a/gs/src/zcolor1.c +++ b/gs/src/zcolor1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Level 1 extended color operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zcolor2.c b/gs/src/zcolor2.c index 4919e7e76..52c39ee84 100644 --- a/gs/src/zcolor2.c +++ b/gs/src/zcolor2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Level 2 color operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zcontext.c b/gs/src/zcontext.c index c79885c4d..332fdad91 100644 --- a/gs/src/zcontext.c +++ b/gs/src/zcontext.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Display PostScript context operators */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zcontrol.c b/gs/src/zcontrol.c index 9d81a5e00..d4b11c2f2 100644 --- a/gs/src/zcontrol.c +++ b/gs/src/zcontrol.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Control operators */ #include "string_.h" #include "ghost.h" diff --git a/gs/src/zcrd.c b/gs/src/zcrd.c index 5737b9325..7949cba57 100644 --- a/gs/src/zcrd.c +++ b/gs/src/zcrd.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CIE color rendering operators */ #include "math_.h" #include "ghost.h" diff --git a/gs/src/zcsdevn.c b/gs/src/zcsdevn.c index 2cec8edd8..8cd4b45c3 100644 --- a/gs/src/zcsdevn.c +++ b/gs/src/zcsdevn.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* DeviceN color space support */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zcsindex.c b/gs/src/zcsindex.c index 5c4119f23..bad8f3c4a 100644 --- a/gs/src/zcsindex.c +++ b/gs/src/zcsindex.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Indexed color space support */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zcspixel.c b/gs/src/zcspixel.c index 49e2a6a15..2332a887a 100644 --- a/gs/src/zcspixel.c +++ b/gs/src/zcspixel.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* DevicePixel color space support */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zcssepr.c b/gs/src/zcssepr.c index f02bf61e4..7cc842d29 100644 --- a/gs/src/zcssepr.c +++ b/gs/src/zcssepr.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Separation color space support */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zdevcal.c b/gs/src/zdevcal.c index df802072b..eeb8b811f 100644 --- a/gs/src/zdevcal.c +++ b/gs/src/zdevcal.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1998 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* %Calendar% IODevice */ #include "time_.h" #include "ghost.h" diff --git a/gs/src/zdevice.c b/gs/src/zdevice.c index 1c55fa98c..9572bffba 100644 --- a/gs/src/zdevice.c +++ b/gs/src/zdevice.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Device-related operators */ #include "string_.h" #include "ghost.h" diff --git a/gs/src/zdevice2.c b/gs/src/zdevice2.c index fbae5e8f7..6943ccd81 100644 --- a/gs/src/zdevice2.c +++ b/gs/src/zdevice2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Level 2 device operators */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/zdict.c b/gs/src/zdict.c index a6dbac2e5..271770b27 100644 --- a/gs/src/zdict.c +++ b/gs/src/zdict.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Dictionary operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zdosio.c b/gs/src/zdosio.c index 47f01d1b8..4263ef596 100644 --- a/gs/src/zdosio.c +++ b/gs/src/zdosio.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* MS-DOS direct I/O operators. */ /* These should NEVER be included in a released configuration! */ #include "dos_.h" diff --git a/gs/src/zdouble.c b/gs/src/zdouble.c index 3d999678b..7c6d975e6 100644 --- a/gs/src/zdouble.c +++ b/gs/src/zdouble.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Double-precision floating point arithmetic operators */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/zdpnext.c b/gs/src/zdpnext.c index 93b79a1ce..deed08756 100644 --- a/gs/src/zdpnext.c +++ b/gs/src/zdpnext.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* NeXT Display PostScript extensions */ #include "math_.h" #include "ghost.h" diff --git a/gs/src/zdps.c b/gs/src/zdps.c index 12d000694..09af7afea 100644 --- a/gs/src/zdps.c +++ b/gs/src/zdps.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Display PostScript extensions */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zdps1.c b/gs/src/zdps1.c index 66254af71..3d7b06a38 100644 --- a/gs/src/zdps1.c +++ b/gs/src/zdps1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Level 2 / Display PostScript graphics extensions */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zfbcp.c b/gs/src/zfbcp.c index e71c7a2e4..86fe7502b 100644 --- a/gs/src/zfbcp.c +++ b/gs/src/zfbcp.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* (T)BCP filter creation */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zfcmap.c b/gs/src/zfcmap.c index 63f450b02..fa70ce50d 100644 --- a/gs/src/zfcmap.c +++ b/gs/src/zfcmap.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* CMap creation operator */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zfdctd.c b/gs/src/zfdctd.c index 5ee75e8eb..80e086b61 100644 --- a/gs/src/zfdctd.c +++ b/gs/src/zfdctd.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* DCTDecode filter creation */ #include "memory_.h" #include "stdio_.h" /* for jpeglib.h */ diff --git a/gs/src/zfdcte.c b/gs/src/zfdcte.c index 824617526..1c55986d1 100644 --- a/gs/src/zfdcte.c +++ b/gs/src/zfdcte.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* DCTEncode filter creation */ #include "memory_.h" #include "stdio_.h" /* for jpeglib.h */ diff --git a/gs/src/zfdecode.c b/gs/src/zfdecode.c index 90d01382f..fb6d08a35 100644 --- a/gs/src/zfdecode.c +++ b/gs/src/zfdecode.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Additional decoding filter creation */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zfile.c b/gs/src/zfile.c index af38d19ef..2dae1b7f8 100644 --- a/gs/src/zfile.c +++ b/gs/src/zfile.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Non-I/O file operators */ #include "memory_.h" #include "string_.h" diff --git a/gs/src/zfileio.c b/gs/src/zfileio.c index 60d2f7806..19bbf6ce8 100644 --- a/gs/src/zfileio.c +++ b/gs/src/zfileio.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* File I/O operators */ #include "ghost.h" #include "gp.h" @@ -598,6 +585,20 @@ zsetfileposition(i_ctx_t *i_ctx_p) /* ------ Non-standard extensions ------ */ +/* <file> .isprocfilter <bool> */ +private int +zisprocfilter(i_ctx_t *i_ctx_p) +{ + os_ptr op = osp; + stream *s; + + check_file(s, op); + while (s->strm != 0) + s = s->strm; + make_bool(op, s_is_proc(s)); + return 0; +} + /* <file> <int> unread - */ private int zunread(i_ctx_t *i_ctx_p) @@ -711,6 +712,7 @@ const op_def zfileio1_op_defs[] = { op_def_end(0) }; const op_def zfileio2_op_defs[] = { + {"1.isprocfilter", zisprocfilter}, {"2setfileposition", zsetfileposition}, {"2unread", zunread}, {"2write", zwrite}, diff --git a/gs/src/zfilter.c b/gs/src/zfilter.c index c1b414026..84519fbcd 100644 --- a/gs/src/zfilter.c +++ b/gs/src/zfilter.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Filter creation */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zfilter2.c b/gs/src/zfilter2.c index f45e44b64..142574649 100644 --- a/gs/src/zfilter2.c +++ b/gs/src/zfilter2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Additional filter creation */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zfilterx.c b/gs/src/zfilterx.c index cd4c91be4..d767fe7b0 100644 --- a/gs/src/zfilterx.c +++ b/gs/src/zfilterx.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Extended (non-standard) filter creation */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zfont.c b/gs/src/zfont.c index 2732b875d..ccd6140be 100644 --- a/gs/src/zfont.c +++ b/gs/src/zfont.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic font operators */ #include "ghost.h" #include "oper.h" @@ -182,6 +169,21 @@ zcurrentcacheparams(i_ctx_t *i_ctx_p) return 0; } +/* <font> .registerfont - */ +private int +zregisterfont(i_ctx_t *i_ctx_p) +{ + os_ptr op = osp; + gs_font *pfont; + int code = font_param(op, &pfont); + + if (code < 0) + return code; + pfont->is_resource = true; + pop(1); + return 0; +} + /* ------ Initialization procedure ------ */ const op_def zfont_op_defs[] = @@ -194,6 +196,7 @@ const op_def zfont_op_defs[] = {"1setcachelimit", zsetcachelimit}, {"1setcacheparams", zsetcacheparams}, {"0currentcacheparams", zcurrentcacheparams}, + {"1.registerfont", zregisterfont}, op_def_end(zfont_init) }; diff --git a/gs/src/zfont0.c b/gs/src/zfont0.c index 4f08a823a..aa39b9d28 100644 --- a/gs/src/zfont0.c +++ b/gs/src/zfont0.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Composite font creation operator */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zfont1.c b/gs/src/zfont1.c index b985fbe37..3d6c8210e 100644 --- a/gs/src/zfont1.c +++ b/gs/src/zfont1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 1 and Type 4 font creation operators */ #include "ghost.h" #include "oper.h" @@ -37,6 +24,9 @@ /* Type 1 font procedures (defined in zchar1.c) */ extern const gs_type1_data_procs_t z1_data_procs; font_proc_glyph_outline(zcharstring_glyph_outline); +/* Font procedures defined here */ +private font_proc_font_info(z1_font_info); +private font_proc_same_font(z1_same_font); /* Default value of lenIV */ #define DEFAULT_LENIV_1 4 @@ -190,6 +180,9 @@ build_charstring_font(i_ctx_t *i_ctx_p, os_ptr op, build_proc_refs *pbuild, ref_assign(&pdata->u.type1.GlobalSubrs, pfr->GlobalSubrs); pfont->data.procs = &z1_data_procs; pfont->data.proc_data = (char *)pdata; + pfont->procs.font_info = z1_font_info; + pfont->procs.same_font = z1_same_font; + pfont->procs.glyph_info = gs_type1_glyph_info; pfont->procs.enumerate_glyph = z1_enumerate_glyph; pfont->procs.glyph_outline = zcharstring_glyph_outline; return define_gs_font((gs_font *)pfont); @@ -253,3 +246,116 @@ const op_def zfont1_op_defs[] = {"2.buildfont4", zbuildfont4}, op_def_end(0) }; + +/* ------ Font procedures for Type 1 fonts ------ */ + +/* font_info procedure */ +private bool +z1_font_info_has(const ref *pfidict, const char *key, gs_const_string *pmember) +{ + ref *pvalue; + + if (dict_find_string(pfidict, key, &pvalue) > 0 && + r_has_type(pvalue, t_string) + ) { + pmember->data = pvalue->value.const_bytes; + pmember->size = r_size(pvalue); + return true; + } + return false; +} +private int +z1_font_info(gs_font *font, const gs_point *pscale, int members, + gs_font_info_t *info) +{ + const gs_font_type1 *const pfont1 = (const gs_font_type1 *)font; + int code = gs_default_font_info(font, pscale, members & + ~(FONT_INFO_COPYRIGHT | FONT_INFO_NOTICE | + FONT_INFO_FAMILY_NAME | FONT_INFO_FULL_NAME), + info); + const ref *pfdict; + ref *pfontinfo; + + if (code < 0) + return code; + pfdict = &pfont_data(pfont1)->dict; + if (dict_find_string(pfdict, "FontInfo", &pfontinfo) <= 0 || + !r_has_type(pfontinfo, t_dictionary)) + return 0; + if ((members & FONT_INFO_COPYRIGHT) && + z1_font_info_has(pfontinfo, "Copyright", &info->Copyright)) + info->members |= FONT_INFO_COPYRIGHT; + if ((members & FONT_INFO_NOTICE) && + z1_font_info_has(pfontinfo, "Notice", &info->Notice)) + info->members |= FONT_INFO_NOTICE; + if ((members & FONT_INFO_FAMILY_NAME) && + z1_font_info_has(pfontinfo, "FamilyName", &info->FamilyName)) + info->members |= FONT_INFO_FAMILY_NAME; + if ((members & FONT_INFO_FULL_NAME) && + z1_font_info_has(pfontinfo, "FullName", &info->FullName)) + info->members |= FONT_INFO_FULL_NAME; + return code; +} + +/* same_font procedure */ +private bool +same_font_dict(const font_data *pdata, const font_data *podata, + const char *key) +{ + ref *pvalue; + bool present = dict_find_string(&pdata->dict, key, &pvalue) > 0; + ref *povalue; + bool opresent = dict_find_string(&podata->dict, key, &povalue) > 0; + + return (present == opresent && + (present <= 0 || obj_eq(pvalue, povalue))); +} +private int +z1_same_font(const gs_font *font, const gs_font *ofont, int mask) +{ + if (ofont->FontType != font->FontType) + return 0; + while (font->base != font) + font = font->base; + while (ofont->base != ofont) + ofont = ofont->base; + if (ofont == font) + return mask; + { + int same = gs_base_same_font(font, ofont, mask); + int check = mask & ~same; + const gs_font_type1 *const pfont1 = (const gs_font_type1 *)font; + const font_data *const pdata = pfont_data(pfont1); + const gs_font_type1 *pofont1 = (const gs_font_type1 *)ofont; + const font_data *const podata = pfont_data(pofont1); + + if ((check & (FONT_SAME_OUTLINES | FONT_SAME_OUTLINES)) && + pofont1->data.procs == &z1_data_procs && + obj_eq(&pdata->CharStrings, &podata->CharStrings) && + /* + * We use same_font_dict for convenience: we know that + * both fonts do have Private dictionaries. + */ + same_font_dict(pdata, podata, "Private") + ) + same |= FONT_SAME_OUTLINES; + + if ((check & FONT_SAME_METRICS) && (same & FONT_SAME_OUTLINES) && + pofont1->data.procs == &z1_data_procs && + /* Metrics may be affected by CDevProc, Metrics, Metrics2. */ + same_font_dict(pdata, podata, "Metrics") && + same_font_dict(pdata, podata, "Metrics2") && + same_font_dict(pdata, podata, "CDevProc") + ) + same |= FONT_SAME_METRICS; + + if ((check & FONT_SAME_ENCODING) && + pofont1->procs.same_font == z1_same_font && + obj_eq(&pdata->Encoding, &podata->Encoding) + ) + same |= FONT_SAME_ENCODING; + + return same; + } +} + diff --git a/gs/src/zfont2.c b/gs/src/zfont2.c index ee44ddddc..76c9431e7 100644 --- a/gs/src/zfont2.c +++ b/gs/src/zfont2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1991, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 2 font creation operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zfont32.c b/gs/src/zfont32.c index 8ee3de2dc..d294479c4 100644 --- a/gs/src/zfont32.c +++ b/gs/src/zfont32.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 32 font operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zfont42.c b/gs/src/zfont42.c index bef0a659b..dd9a62b05 100644 --- a/gs/src/zfont42.c +++ b/gs/src/zfont42.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type 42 font creation operator */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zfproc.c b/gs/src/zfproc.c index 9b52f1152..cd071a5fa 100644 --- a/gs/src/zfproc.c +++ b/gs/src/zfproc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Procedure-based filter stream support */ #include "memory_.h" #include "ghost.h" @@ -360,6 +347,16 @@ s_proc_write_continue(i_ctx_t *i_ctx_p) return 0; } +/* ------ More generic ------ */ + +/* Test whether a stream is procedure-based. */ +bool +s_is_proc(const stream *s) +{ + return (s->procs.process == s_proc_read_process || + s->procs.process == s_proc_write_process); +} + /* ------ Initialization procedure ------ */ const op_def zfproc_op_defs[] = diff --git a/gs/src/zfreuse.c b/gs/src/zfreuse.c index 346aae1a9..bdc4cd485 100644 --- a/gs/src/zfreuse.c +++ b/gs/src/zfreuse.c @@ -1,22 +1,9 @@ /* Copyright (C) 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* ReusableStreamDecode filter support */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zfunc.c b/gs/src/zfunc.c index df77d30d3..3b763378f 100644 --- a/gs/src/zfunc.c +++ b/gs/src/zfunc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Generic PostScript language interface to Functions */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zfunc0.c b/gs/src/zfunc0.c index c1701f0f9..8c9dfb73a 100644 --- a/gs/src/zfunc0.c +++ b/gs/src/zfunc0.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PostScript language interface to FunctionType 0 (Sampled) Functions */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zfunc3.c b/gs/src/zfunc3.c index c55b73fab..546504126 100644 --- a/gs/src/zfunc3.c +++ b/gs/src/zfunc3.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PostScript language interface to LL3 Functions */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zfunc4.c b/gs/src/zfunc4.c index 3b908ee62..6d015aee9 100644 --- a/gs/src/zfunc4.c +++ b/gs/src/zfunc4.c @@ -1,22 +1,9 @@ /* Copyright (C) 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PostScript language support for FunctionType 4 (PS Calculator) Functions */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zfzlib.c b/gs/src/zfzlib.c index 26fed95d3..638ad002a 100644 --- a/gs/src/zfzlib.c +++ b/gs/src/zfzlib.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* zlib and Flate filter creation */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zgeneric.c b/gs/src/zgeneric.c index 29fdc421a..31f9b7b30 100644 --- a/gs/src/zgeneric.c +++ b/gs/src/zgeneric.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1994, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Array/string/dictionary generic operators for PostScript */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zgstate.c b/gs/src/zgstate.c index 5c28b93fd..5eb8fc4fa 100644 --- a/gs/src/zgstate.c +++ b/gs/src/zgstate.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Graphics state operators */ #include "math_.h" #include "ghost.h" diff --git a/gs/src/zhsb.c b/gs/src/zhsb.c index 78474c970..25c511c60 100644 --- a/gs/src/zhsb.c +++ b/gs/src/zhsb.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* HSB color operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zht.c b/gs/src/zht.c index 0277da311..30af106e1 100644 --- a/gs/src/zht.c +++ b/gs/src/zht.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1991, 1993, 1994, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Halftone definition operators */ #include "ghost.h" #include "memory_.h" diff --git a/gs/src/zht1.c b/gs/src/zht1.c index 04917a6b6..4f0ce381d 100644 --- a/gs/src/zht1.c +++ b/gs/src/zht1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* setcolorscreen operator */ #include "ghost.h" #include "memory_.h" diff --git a/gs/src/zht2.c b/gs/src/zht2.c index 5b4cf338f..55a535850 100644 --- a/gs/src/zht2.c +++ b/gs/src/zht2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Level 2 sethalftone operator */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zimage.c b/gs/src/zimage.c index 3ad45ce34..80cb7b7e1 100644 --- a/gs/src/zimage.c +++ b/gs/src/zimage.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Image operators */ #include "ghost.h" #include "oper.h" @@ -368,26 +355,22 @@ image_file_continue(i_ctx_t *i_ctx_p) if (num_aliases <= 0) continue; /* this is an alias for an earlier file */ while ((avail = sbufavailable(s)) < min_left + num_aliases) { - /****** REFILL BUFFER, NOT sgetc ******/ - int next = sgetc(s); + int next = s->end_status; - if (next >= 0) { - sputback(s); - if (s->end_status == EOFC || s->end_status == ERRC) - min_left = 0; - continue; - } switch (next) { - case EOFC: - break; /* with avail = 0 */ - case INTC: - case CALLC: - return - s_handle_read_exception(i_ctx_p, next, pp, - NULL, 0, image_file_continue); - default: - /* case ERRC: */ - return_error(e_ioerror); + case 0: + s_process_read_buf(s); + continue; + case EOFC: + break; /* with avail < min_left */ + case INTC: + case CALLC: + return + s_handle_read_exception(i_ctx_p, next, pp, + NULL, 0, image_file_continue); + default: + /* case ERRC: */ + return_error(e_ioerror); } break; /* for EOFC */ } diff --git a/gs/src/zimage2.c b/gs/src/zimage2.c index d2991662c..71636d6bb 100644 --- a/gs/src/zimage2.c +++ b/gs/src/zimage2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* image operator extensions for Level 2 PostScript */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/zimage3.c b/gs/src/zimage3.c index 63541f107..2f14e469f 100644 --- a/gs/src/zimage3.c +++ b/gs/src/zimage3.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* LanguageLevel 3 ImageTypes (3 & 4 - masked images) */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/ziodev.c b/gs/src/ziodev.c index a3bcd5dff..f97fe71ae 100644 --- a/gs/src/ziodev.c +++ b/gs/src/ziodev.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Standard IODevice implementation */ #include "memory_.h" #include "stdio_.h" @@ -86,7 +73,7 @@ const gx_io_device gs_iodev_statementedit = /* ------ Operators ------ */ -/* <int> .getiodevice <string> */ +/* <int> .getiodevice <string|null> */ private int zgetiodevice(i_ctx_t *i_ctx_p) { @@ -101,8 +88,11 @@ zgetiodevice(i_ctx_t *i_ctx_p) if (iodev == 0) /* index out of range */ return_error(e_rangecheck); dname = (const byte *)iodev->dname; - make_const_string(op, a_readonly | avm_foreign, - strlen((const char *)dname), dname); + if (dname == 0) + make_null(op); + else + make_const_string(op, a_readonly | avm_foreign, + strlen((const char *)dname), dname); return 0; } diff --git a/gs/src/ziodev2.c b/gs/src/ziodev2.c index 4b56b51e3..d084d477e 100644 --- a/gs/src/ziodev2.c +++ b/gs/src/ziodev2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1994, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* (Level 2) IODevice operators */ #include "string_.h" #include "ghost.h" diff --git a/gs/src/zlib.mak b/gs/src/zlib.mak index 99854a678..630e56497 100644 --- a/gs/src/zlib.mak +++ b/gs/src/zlib.mak @@ -1,21 +1,8 @@ -# Copyright (C) 1995, 1996, 1997, 1998 Aladdin Enterprises. All rights reserved. -# -# This file is part of Aladdin Ghostscript. -# -# Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author -# or distributor accepts any responsibility for the consequences of using it, -# or for whether it serves any particular purpose or works at all, unless he -# or she says so in writing. Refer to the Aladdin Ghostscript Free Public -# License (the "License") for full details. -# -# Every copy of Aladdin Ghostscript must include a copy of the License, -# normally in a plain ASCII text file named PUBLIC. The License grants you -# the right to copy, modify and redistribute Aladdin Ghostscript, but only -# under certain conditions described in the License. Among other things, the -# License requires that the copyright notice and this notice be preserved on -# all copies. - +# Copyright (C) 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. +# This software is licensed to a single customer by Artifex Software Inc. +# under the terms of a specific OEM agreement. +# $RCSfile$ $Revision$ # makefile for zlib library code. # Users of this makefile must define the following: # GSSRCDIR - the GS library source directory @@ -39,6 +26,9 @@ # for more convenient access. # # This makefile is known to work with zlib versions through 1.1.3. +# Note that there are obscure bugs in zlib versions before 1.1.3 that +# may cause the FlateDecode filter to produce an occasional ioerror: +# we strongly recommend using version 1.1.3 or later. ZSRC=$(ZSRCDIR)$(D) ZGEN=$(ZGENDIR)$(D) diff --git a/gs/src/zmath.c b/gs/src/zmath.c index 73c9c8d0a..86ef697c1 100644 --- a/gs/src/zmath.c +++ b/gs/src/zmath.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1992, 1993, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Mathematical operators */ #include "math_.h" #include "ghost.h" diff --git a/gs/src/zmatrix.c b/gs/src/zmatrix.c index 3260ecfdb..1836ed9f8 100644 --- a/gs/src/zmatrix.c +++ b/gs/src/zmatrix.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Matrix operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zmedia2.c b/gs/src/zmedia2.c index 501574840..2f975b487 100644 --- a/gs/src/zmedia2.c +++ b/gs/src/zmedia2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Media matching for setpagedevice */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/zmisc.c b/gs/src/zmisc.c index 93984f7a4..d815a2aa2 100644 --- a/gs/src/zmisc.c +++ b/gs/src/zmisc.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Miscellaneous operators */ #include "errno_.h" #include "memory_.h" diff --git a/gs/src/zmisc1.c b/gs/src/zmisc1.c index 422d1a0b8..c0d96b0ca 100644 --- a/gs/src/zmisc1.c +++ b/gs/src/zmisc1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1997, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Miscellaneous Type 1 font operators */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zmisc2.c b/gs/src/zmisc2.c index be589903e..7c06c6e2a 100644 --- a/gs/src/zmisc2.c +++ b/gs/src/zmisc2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Miscellaneous Level 2 operators */ #include "memory_.h" #include "string_.h" diff --git a/gs/src/zmisc3.c b/gs/src/zmisc3.c index f46a6fbd1..681f86386 100644 --- a/gs/src/zmisc3.c +++ b/gs/src/zmisc3.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Miscellaneous LanguageLevel 3 operators */ #include "ghost.h" #include "gscspace.h" /* for gscolor2.h */ diff --git a/gs/src/zpacked.c b/gs/src/zpacked.c index b3e273f2f..b78c0c50c 100644 --- a/gs/src/zpacked.c +++ b/gs/src/zpacked.c @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1992, 1993, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Packed array operators */ #include "ghost.h" #include "ialloc.h" diff --git a/gs/src/zpaint.c b/gs/src/zpaint.c index 330f27baf..7ac3a8ea5 100644 --- a/gs/src/zpaint.c +++ b/gs/src/zpaint.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Painting operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zpath.c b/gs/src/zpath.c index 12dcd98b7..0d5f86812 100644 --- a/gs/src/zpath.c +++ b/gs/src/zpath.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Basic path operators */ #include "math_.h" #include "ghost.h" diff --git a/gs/src/zpath1.c b/gs/src/zpath1.c index ce2fc725a..3afe13e48 100644 --- a/gs/src/zpath1.c +++ b/gs/src/zpath1.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PostScript Level 1 additional path operators */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zpcolor.c b/gs/src/zpcolor.c index 7c312b044..be88ebe3c 100644 --- a/gs/src/zpcolor.c +++ b/gs/src/zpcolor.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Pattern color */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zrelbit.c b/gs/src/zrelbit.c index f6fd429fc..fc1498cff 100644 --- a/gs/src/zrelbit.c +++ b/gs/src/zrelbit.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Relational, boolean, and bit operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zrop.c b/gs/src/zrop.c index 2a3d0af3e..878eb80d8 100644 --- a/gs/src/zrop.c +++ b/gs/src/zrop.c @@ -1,22 +1,9 @@ /* Copyright (C) 1995, 1996, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* RasterOp control operators */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zshade.c b/gs/src/zshade.c index 3b39400a5..860942811 100644 --- a/gs/src/zshade.c +++ b/gs/src/zshade.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* PostScript language interface to shading */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zstack.c b/gs/src/zstack.c index 587c63523..dde291727 100644 --- a/gs/src/zstack.c +++ b/gs/src/zstack.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1991, 1992, 1994, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Operand stack operators */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zstring.c b/gs/src/zstring.c index fc858f26a..564dcf4f5 100644 --- a/gs/src/zstring.c +++ b/gs/src/zstring.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* String operators */ #include "memory_.h" #include "ghost.h" diff --git a/gs/src/zsysvm.c b/gs/src/zsysvm.c index e7bca7731..6232ef4b9 100644 --- a/gs/src/zsysvm.c +++ b/gs/src/zsysvm.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1995, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* System VM and VM-specific operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/ztoken.c b/gs/src/ztoken.c index 4f29023a7..652fc92b2 100644 --- a/gs/src/ztoken.c +++ b/gs/src/ztoken.c @@ -1,22 +1,9 @@ /* Copyright (C) 1994, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Token reading operators */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/ztrap.c b/gs/src/ztrap.c index 551828e8a..9e6386a73 100644 --- a/gs/src/ztrap.c +++ b/gs/src/ztrap.c @@ -1,22 +1,9 @@ /* Copyright (C) 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Operators for setting trapping parameters and zones */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/ztype.c b/gs/src/ztype.c index 0c619ad81..a87bf1f23 100644 --- a/gs/src/ztype.c +++ b/gs/src/ztype.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Type, attribute, and conversion operators */ #include "math_.h" #include "memory_.h" diff --git a/gs/src/zupath.c b/gs/src/zupath.c index acc7074d0..bc22ea097 100644 --- a/gs/src/zupath.c +++ b/gs/src/zupath.c @@ -1,22 +1,9 @@ /* Copyright (C) 1990, 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Operators related to user paths */ #include "ghost.h" #include "oper.h" diff --git a/gs/src/zusparam.c b/gs/src/zusparam.c index dabd961c3..e108e18f6 100644 --- a/gs/src/zusparam.c +++ b/gs/src/zusparam.c @@ -1,22 +1,9 @@ /* Copyright (C) 1996, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* User and system parameter operators */ #include "memory_.h" #include "string_.h" diff --git a/gs/src/zvmem.c b/gs/src/zvmem.c index b7a84e3a3..4f5497a63 100644 --- a/gs/src/zvmem.c +++ b/gs/src/zvmem.c @@ -1,22 +1,9 @@ /* Copyright (C) 1989, 1995, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* "Virtual memory" operators */ #include "ghost.h" #include "gsstruct.h" diff --git a/gs/src/zvmem2.c b/gs/src/zvmem2.c index 44d3cacb9..19ccb79a5 100644 --- a/gs/src/zvmem2.c +++ b/gs/src/zvmem2.c @@ -1,22 +1,9 @@ /* Copyright (C) 1992, 1993, 1994, 1997, 1998, 1999 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. + * This software is licensed to a single customer by Artifex Software Inc. + * under the terms of a specific OEM agreement. */ - +/*$RCSfile$ $Revision$ */ /* Level 2 "Virtual memory" operators */ #include "ghost.h" #include "oper.h" |