History of Ghostscript versions 2.n

Table of contents

This document is a history of Ghostscript releases numbered 2.n. For more recent changes, see the the other history documents and, for the latest versions, the new:

History of Ghostscript versions 4.n
History of Ghostscript versions 3.n
History of Ghostscript versions 2.n (this document)
History of Ghostscript versions 1.n

For other information, see the Ghostscript overview.

Version 2.9.10-beta (7/28/94)

This is the last 2.9 beta, since 3.0 will be released on July 31.


Fixes bugs:
	- A | in gs.1 had a \ in front of it instead of \\.

Adds a paragraph in gs.1 that tells how to select paper size.

Notes in devs.mak that the cdj550 driver is the best one for the H-P
DeskJet 520, and the pjxl300 driver is the right one for the H-P DeskJet

Notes in make.doc that Watcom C++ 10.0 may require a change in a makefile.


Removes ICCINIT from MODULES.LIS for VMS systems.

Updates VMS.MAK to support Motif V1.2.

Updates jpeg.mak to work with version 5alpha4 of the IJG JPEG code.


Fixes bugs:
	- font2c didn't leave extra room in Type 0 font dictionaries for
entries added by definefont.
	- font2c left extra information on the stack.
	- ansi2knr would remove newline characters within formal argument
	- font2c got an Error: /undefined in makefontprocname.

Updates ansi2knr to work better with the GNU configure program.

Updates ansi2knr to handle procedure formal arguments automatically.


Fixes bugs:
	- If a file contained color or gray-scale information followed by a
masked image, the X driver would sometimes invert the polarity of the


Fixes bugs:
	- Unix systems with a 2-argument gettimeofday returned garbage
values for the current time.
	- The VMS build script for compiled fonts omitted the requirement
to load
	- memory_.h didn't note that System V Unix platforms need memmove.

On Unix systems, changes the subdirectory of $datadir/ghostscript to just
be the version number (e.g., 2.9.10 rather than gs-2.9.9).


Adds support code for the Wadalab (University of Tokyo) free Kanji font.

Notes in the documentation in Fontmap that .pfa and .pfb fonts are
compatible with ATM, but .gsf fonts are not.

Changes the names of Thomas Wolff's expanded Hershey fonts, replacing .gsf
with .pfa.


Fixes bugs:
	- The scanner became confused if the literal names /<< or />>
straddled an input buffer boundary.
	- .setlanguagelevel gave an invalidaccess error when
switching from level 2 to level 1.
	- currentgstate, setgstate, and copy for gstates didn't do
the necessary access checks.
	- The Category resource category didn't define .ResourceFile, so
/Category resourcestatus gave an error.
	- The garbage collector didn't trace the structures used by
filenameforall properly on most platforms.
	- Automatically expanding systemdict didn't work, but didn't give
an error.
	- Automatically expanding a dictionary usually expanded it by too
	- systemdict was created too small.
	- The garbage collector didn't trace the structures referenced only
from allocator objects, leading to attempts to access freed storage.
	- If a chunk was empty, the GC tried to free it even if it had
inner chunks.
*	- The outer loop in dict_find_name_by_index() could cause an
addressing fault on segmented machines when looking up Level 2 operators,
because the offset could get decremented past 0.
	- The heap_available procedure in gsmemory.c didn't convert
properly to non-ANSI syntax.  (New bug in 2.9.9.)
	- The ledgertray procedure wasn't implemented.
	- The xxxtray procedures didn't set the page size.
	- The settumble operator wasn't implemented, even as a dummy.
	- glyphshow didn't work with Type 3 fonts.
	- Supplying a RenderTable for a CIE color space caused an error.
	- The DCT filter code had the jpeg/ subdirectory name "wired in" to
the source files.

Adds experimental filters for Burrows/Wheeler block sorting compression
(BWBlockSortEncode/Decode), described in DEC SRC Research Report #124,
move-to-front coding (MoveToFrontEncode/Decode), and a simple form of
Huffman coding (BoundedHuffmanEncode/Decode).  These are experimental -- do
not rely on them remaining the same (or existing at all) in future

Adds all function prototypes needed to pacify strict compilers.

Removes all explicit references to userdict from the C code.

Changes the SAFER switch so that it disallows not only explicit writing,
deleting, or renaming of files, but also disallows specifying an explicit
OutputFile for any device (except for the initial device, by means of
-sOutputFile= on the command line).


Fixes bugs:
	- Hex decoding (ASCIIHexDecode stream and <> literals) didn't treat
the data source as read-only (although it restored it to its original

Implements move-to-front coding, a simple form of Huffman coding, and
Burrows/Wheeler block sorting compression.


Fixes bugs:
*	- (The following bug fix was actually implemented somewhere around
version 2.7.)  restore didn't purge character cache entries whose keys were
names created more recently than the save.
	- gstype1.h declared gs_type1_state_sizeof as an extern, but this
wasn't defined anywhere.
	- gs_makeimagedevice didn't set the size of the palette correctly,
which confused the GC.
	- gs_makeimagedevice didn't set num_components to 1 for
mapped-color devices with only gray values.
*	- The two-color halftoning algorithms truncated when computing the
halftone level, rather than rounding it.
*	- If a path being filled had line segments that fell entirely to
the right of the clipping region, part of the path might not be filled.
	- The optimized code for 24-bit color didn't ensure properly that
32-bit accesses would be aligned appropriately.
	- The miter join check had gotten reversed somewhere along the way.
*	- Because x and y were interchanged in the miter check computation,
in some situations the check was inverted.  (This is a very old bug!)
	- It was believed that strokepath didn't work with dashed lines;
the problem appears to have been an incorrect testing program.

Adds all function prototypes needed to pacify strict compilers.

Changes fixed2float so it doesn't cast the result to float, and removes
fixed2double.  This produces slightly more accurate results in many places,
and may even be faster (for FPUs that normally generate double rather than
single precision results).

Version 2.9.9-beta (6/23/94)


Puts a pointer to devs.mak in the section of use.doc that talks about
MS-DOS displays.


Fixes bugs:
	- The %pipe% IODevice was omitted on System V platforms.
	- The AXP VMS build script needed /NESTED_INCLUDE=PRIMARY in
CC_QUAL to work around a bug in the DEC C compiler.


Fixes bugs:
	- redefined .loadFontmap incorrectly.


Fixes bugs:
	- stream_compact used memcpy even though the source and destination
might overlap.
	- filter applied to a closed file could cause a crash.


Fixes bugs:
	- putdeviceparams to a printer didn't close and reopen the device
if only the page size or resolution was changed.

Version 2.9.8 (6/20/94)

This is the first version that claims to be a full Level 2 implementation. It was distributed to satisfy a contractual requirement.


In make.doc:
	- Adds a reference to the generic System V section at the end of
the SCO section.
	- Notes that DEC OSF/1 systems may require changing the name of the
install program to installbsd.

Updates drivers.doc to reflect the change from "properties" to

Updates the Aladdin Enterprises Free Public License to version 1.

In language.doc, notes that certain device parameters will be phased out.


Fixes bugs:
	- The file was included in the distribution by mistake.

Notes in the Unix makefiles that X11R6 probably needs SM and ICE added to


Fixes bugs:
	- used a non-existent file as its example.
	- A temporary string in was allocated too small.

Upgrades so it will handle (simple) Type 0 fonts as well as Type


Fixes bugs:
	- The TIFF drivers didn't byte-align each scan line.
	- gdevtfax.c applied & to an array member of a structure.

Changes the param_list interface slightly: Implementations of the
put_params driver procedure should now use param_signal_error to report
errors, and should not give up at the first error.  (Even though this is a
non-backward-compatible change, old implementations will continue to work;
they just won't deliver complete results to the setpagedevice Policies


Fixes bugs:
	- Removes the time zone adjustment from gp_get_clock in gp_unix.c,
since the value returned by all Unix systems is bogus.
	- The DV/X makefile still included the dfaxhigh and dfaxlow drivers.
	- (VMS command file) didn't work properly if the
argument list was empty.
	- vms.mak, vms-axp.mak, and modules.lis hadn't been updated to
reflect changes in 2.9.7.
	- The MS Windows version wouldn't link (overflowed the 64K primary
data segment).


Makes the font substitution algorithm somewhat more intelligent.


Fixes bugs:
	- Enumerating the pointers of a zero-length array of structures
caused a divide by zero.
	- iref.h didn't protect itself against multiple inclusion.
	- The CCITTFaxEncode filter didn't byte-align the final
end-of-block code if EndOfBlock and EncodedByteAlign were both true.
	- make_initial_dict in iinit.c used `name' as a formal parameter
name, which some compilers believe conflicts with a typedef.
	- Not all internal operators had registered names.
	- The GC used memcpy, rather than bytes_copy, when compacting
objects, even though the source and destination might overlap.
	- When debugging was enabled, gc_string_mark could give a spurious
error indication.
	- vmstatus returned too small a value for the maximum VM.
	- The scanner could get into a loop when reading a radix-85 string.
	- The GC could get into a state where it was called after every
allocation (because of the patch setting global = true in ireclaim).
	- The general path filling algorithm didn't skip regions that were
completely outside the clipping box.
	- The gs_screen_enum structure contained a pointer (porder) that
pointed into the middle of a structure, confusing the GC.

Implements the BitmapWidths flag in fonts.  The default of false means that
we use scalable widths even with xfonts.

Changes the Generic resource category so that ResourceFileName is optional.

Changes the .getdeviceparams operator so that it takes an optional
dictionary giving the set of keys whose values are wanted.  Changes the
.putdeviceparams operator so that it takes an optional policy dictionary
specifying the action to be taken on errors, and returns a list of keys and
errors if it fails, rather than causing an error.  These are
non-backward-compatible changes, but ordinary programs do not use these

Changes the names of some internal operators and procedures by adding
a . to the beginning:

Implements currentpagedevice, and a small subset of setpagedevice.  Only
the following keys in the page device dictionary are known to the current
implementation, and the ones marked with * are not actually processed:
	MediaColor, MediaWeight, MediaType, InsertSheet
	  (for InputAttributes matching only)
	  (for OutputAttributes matching only)
	*Orientation (for all devices, not just roll devices)
Does not implement:
	- Updating InputAttributes or OutputAttributes by sensing the state
	  of the device;
	- Retrying media matching after an initial failure;
	- Automatic handling of portrait vs. landscape page size;
	- Recording the CTM after Install as the one to be used for
	  defaultmatrix, initmatrix, and initgraphics.
Also, media matching is normally disabled (with InputAttributes = null)
for all devices.  ****** We had to disable setpagedevice just before
shipping this release, because of interactions with the older device
handling machinery that we could not fix in the time available.


Fixes bugs:
	- 24-bit color (mem_true24_fill_rectangle and _copy_mono) had
algorithm bugs.
	- A complex conditional expression in gx_render_gray wouldn't
compile properly with the DECStation 3100 Ultrix 4.3 compiler.
	- The GC routines for gx_device_clip didn't handle the case where
the 'current' pointer pointed to list.single.
	- gx_add_char_bits used memcpy, rather than bytes_copy, for
compressing character bitmaps, even though the source and destination might
	- Some compilers require the definition of st_gstate_contents to
precede the definitions of the GC procedures.
	- Filling a large rectangle (more than 1K of bitmap) with a colored
halftone overwrote random areas of the stack.

Changes gs_setcachedevice[2] to take a pointer to an array of floats,
rather than 6 or 10 individual floats.  THIS IS A NON-BACKWARD-COMPATIBLE

Implements the BitmapWidths flag in fonts.

Version 2.9.7-beta (6/5/94)

Yet another pre-3.0 beta. The main features are a fairly reliable garbage collector, and function prototypes almost everywhere they are needed.


Fixes bugs:
	- The comment at the beginning of the zfindlibfile procedure was

Replaces the GNU License (the COPYING file) with version 0 of the new
Aladdin Enterprises Free Public License (the PUBLIC file).


Fixes bugs:
	- The definition of in gs.mak was incorrect (it

Adds the ability to specify a value for FONTPATH on the command line
(-sFONTPATH=), overriding GS_FONTPATH.

Replaces the -oper2 configuration resource type with the ability to specify
in the op_def list the dictionary in which operators will be defined.  (See
opdef.h for more details.)  This is an internal change only.


Fixes bugs:
	- got an error on interlaced GIF files whose height
wasn't a multiple of 8.

Changes so it stores the traced operator in the same dictionary
where the operator is currently defined, if possible.


Fixes bugs:
	- The new G3 fax drivers crashed on page widths greater than 2623
(40 * 64 + 63) pixels.  (We fixed this by disallowing page widths greater
than approximately twice this.)
	- The 24-bit PCX driver had some debugging code accidentally left
in it that produced large volumes of useless console output.

Removes the previous (Leffler) TIFF/F driver and the TruFax driver.


Fixes bugs:
	- time_.h, gp_unix.c, and gp_sysv.c didn't do the right thing on
SVR4 platforms, where gettimeofday only takes 1 argument.
	- The final linking command on Turbo C platforms didn't specify the
COMPDIR directory for the linker.


Changes the standard Fontmap to use the URW contributed fonts as
work-alikes for Helvetica and Times Roman.


Fixes bugs:
	- The garbage collector wasn't in a consistent state.
	- In Level 2 mode, statusdict was allocated in global VM rather
than local VM.
	- resourceforall gave an error on the built-in categories such as
	- The file searching algorithm didn't check the current directory
	- When opening a file failed, it didn't return a different error
depending on the problem.
	- The CCITTFaxEncode filter crashed on widths larger than 2623 (64
* 40 + 63) pixels.  (We fixed this by disallowing page widths greater than
approximately twice this.)
	- The .type1getsbw operator gave an invalidfont error if a
CharString started with anything other than a [h]sbw.  (Adobe's published
specs say this is invalid, but some Adobe MultiMaster fonts start with a
callsubr and/or a callothersubr.)
	- When printing out the stack with == after an error, the error
handler got a repeated (and ultimately fatal) typecheck error if it
encountered an object of non-standard type.
	- The token operator could incorrectly attempt to free a structure
on the stack if it encountered an input buffer boundary.
	- string_to_ref didn't correctly set the a_local flag in the string
object it created.
	- If the -c switch was the last switch on the command line,
Ghostscript always exited without going into interactive mode.
	- copy didn't check for errors when copying a dictionary.

Makes many minor changes (mostly adding prototypes) to reduce error and
warning messages from gcc and other strict compilers.

Adds files containing the 4 predefined PDF encodings (MacRoman, MacExpert,
WinAnsi, and PDFDoc).


Fixes bugs:
	- image_bbox in gxccman.c could produce a division by 0 if a
0-width character was being entered into the cache.
	- gx_image_cached_char incorrectly specified a scale of 2x2 rather
than 1x1 if it had to read bits from an xfont.
	- Stale pointers in the halftone cache weren't cleared properly by
a restore.  (We fixed this by making grestoreall clear the halftone cache.)
	- setdash used gs_malloc, rather than the current allocator, for
allocating the dash pattern.
	- If one attempted to fill a very wide region with a colored
halftone, gx_dc_ht_colored_fill_rectangle would loop indefinitely.
	- The container_offset in clipping devices was set incorrectly,
causing the garbage collector to mangle pointers.

Changes the fopen routine in IODevices so that it can return an arbitrary
error code, rather than simply succeeding or failing.  THIS IS A
NON-BACKWARD-COMPATIBLE CHANGE.  It only affects IODevice implementations,
of which there are very few.  (It doesn't affect ordinary device drivers.)

Changes the char_metrics xfont procedure so it returns the width as
floating point numbers rather than integers.  THIS IS A
NON-BACKWARD-COMPATIBLE CHANGE.  It only affects xfont implementations, of
which there are very few.

Makes many minor changes (mostly adding prototypes) to reduce error and
warning messages from gcc and other strict compilers.

Version 2.9.6-beta (5/23/94, not distributed to the public)

This, too, was supposed to be the last beta release for public release 3.0. It was created primarily for a user who desperately needed a Level 1 system that would run properly on a 64-bit hardware architecture. The garbage collector is badly broken (it's in the middle of an architectural change); setpagedevice is still not implemented.


Documents the standard location of Type 1 fonts on AIX.

Changes the last few mentions of Ghostview for Microsoft Windows to GSview
for Windows.

Notes that Solaris 2.n provides the X11 header files in a different place.

Changes README to reflect the differentiation between Aladdin Ghostscript
and GNU Ghostscript.


Fixes bugs:
	- The compilation rules for the modules that call the IJG library
used -Ijpeg rather than -I$(JPEGSRC).
	- The rule for omitted echogs$(XE) as a prerequisite.

Makes it possible to define the values of buildtime, copyright, revision,
revisiondate, and serialnumber in the makefile.


Fixes bugs:
	- The utility didn't handle local color tables.

Updates to version 1.81.


Fixes bugs:
	- The TIFF and fax devices used some identical names, causing
linker complaints.
	- The bj10e/bj200 driver inadvertently disabled the sheet feeder.
(The change may not actually fix this bug, since we don't have either of
these printers with a sheet feeder to test it on.)
	- The 'bit' device didn't map colors to pixel values correctly.
	- The monochrome PCL driver didn't work around the fact that the
Canon LBP4i printer didn't clear its seed row correctly.

Adds new drivers:
	- A user-contributed driver for the H-P DesignJet 650C.
	- A user-contributed driver for the Canon LIPS III printer.
	- A completely new tiffg3 driver with one based on the new, fast
faxg3 code.  This driver does not include any external code, and carries an
Aladdin copyright.
	- A tiffg4 driver, also based on the fast CCITT filter code.

Removes the tiffg3x driver that appeared briefly in 2.9.5, and renames the
previous (Leffler) tiffg3 driver as tiffg3x.

Adds support for A0, A1, and A2 paper sizes to PCL drivers.

Changes all the names involving "props" to "params", for consistency with
the header files, some other internal interfaces, and Adobe's terminology.
THIS IS A NON-BACKWARD-COMPATIBLE CHANGE.  However, it only affects devices
that implement their own get_props and put_props procedures, of which there
aren't very many.


Fixes bugs:
	- The DV/X makefile used X11 rather than X for the X11 library name.
	- The DV/X makefile incorrectly included the PC display drivers.
	- The DV/X makefile omitted gp_dosfs.$(OBJ) from the list of
platform-specific files.
	- The DV/X makefile used : rather than ; for separating directory
names in GS_LIB_DEFAULT.
	- x_.h omitted a needed alias for XtAppSetFallbackResources.
	- The makefile entry for System V Unix systems didn't include
	- The comment before LDFLAGS in the gcc makefiles incorrectly
suggested using the -x switch on Ultrix platforms.
	- The forward declaration of quant_params in zfdct.c upset the Sun
compiler because it declared a parameter as float rather than floatp.
*	- The Microsoft C compiler, like the Borland C compilers, only
compares the offset part of segmented pointers.


Adds a fontmap suitable for use with Adobe Type Basics.


Fixes bugs:
	- The STACK_LOOP_BEGIN macro in istack.h didn't work correctly on
segmented systems.
	- The end_phase procedure in igc.c didn't work correctly on
segmented systems.
	- Indexed color spaces didn't mark their base space properly when
garbage collecting.
	- The garbage collector didn't work on segmented systems, because
it smashed the lsize field of large objects with mark/reloc information.
	- Some structures didn't have correct associated GC procedures:
gs_indexed_map, gs_client_pattern, gs_pattern_instance.
	- restore could free names or stack segments that were still
*	- If a packed object caused an error, the error object could be set
to garbage rather than the correct object.
*	- Badly designed error handlers which use $error for temporary
storage could cause a dictfull error.
	- Some compilers objected to the use of "dict" as a variable name
in a scope where it was defined as a type.
	- IODevices were declared const and non-const inconsistently.
	- setpagedevice popped one object too many off the stack if the
request included any subdictionaries that needed to be merged.
	- More garbage collector bugs were fixed.
	- If the current stack block was empty, Level 2 restore would give
a spurious typecheck error.
	- The CCITTFaxEncode filter could get confused if it emptied the
input and filled the output at the same time.
	- The CCITTFaxEncode filter could insert an extra EOL if it had to
suspend at certain times.
	- The new parser for literal strings (as of 2.9.5) could mis-count
internal parentheses if a parenthesis caused the internal buffer collecting
the string to overflow.
	- If the current stack block had fewer than 3 elements,
.type1addpath could report a spurious typecheck error.
	- Text rendering operations (show, stringwidth, etc.) caused a
crash if the current color was a Pattern that hadn't already been
	- If a program did a grestore when the graphics state stack was
empty, the graphics state was initialized to unexpected (and, in some
cases, invalid) values.
	- pathforall could cause a bogus stackoverflow if it overflowed the
current stack block.
	- Closing an encoding filter with a procedure as target left the
filter on the stack.
*	- The outer loop in dict_lookup() could cause an addressing fault
on segmented machines when looking up Level 2 operators, because the offset
could get decremented past 0.
	- There was an = instead of an == in a test in scanner_reloc_ptrs.
	- The call on gs_reloc_refs in sproc_reloc_ptrs in zfproc.c omitted
the last (gcst) argument.

(Re-)implements the 2-D case of CCITTFaxEncode, and fixes a couple of bugs
in it.

Adds DiffEncode and DiffDecode filters that implement color prediction for
the PDF variant of the LZWDecode filter.

Changes the specification of .oserrorstring to be similar to getenv,
user-written code should be using .oserrorstring.

Adds oversampling for better character rasterizing.


Fixes bugs:
	- gx_dc_ht_colored_fill_rectangle gave a compiler warning because
of a problem with const pointers.
	- dfmul2fixed_vars (in gxfixed.h) omitted the & before vda on
big-endian platforms, causing compilation errors.
	- IODevices were declared const and non-const inconsistently.
	- The Type 1 rasterizer never enabled overshoot suppression.
	- stroke didn't fatten the line properly if stroke adjustment was
enabled, or if the line was horizontal or vertical.
*	- The clipping test for characters was too strict by almost 1
pixel, leading to unnecessary clipping of text at the edge of the clipping
*	- The initial clipping box was computed incorrectly for devices
whose initial transformation matrix included a rotation.

Changed the implementation of clipping lists and show enumerators to use
separate objects rather than embedded objects, to pacify the GC.  (This is
an internal change, not visible at the PostScript or API level.)

Makes the character cache trim off left and right blank areas, as well as
top and bottom.  (Internal change.)

Adds oversampling for better character rasterizing.

Version 2.9.5-beta (4/11/94)

This was supposed to be the last beta release before 3.0, but it won't be. The only known major defects are the unreliable garbage collector, and the dummy implementation of setpagedevice/currentpagedevice.


Fixes bugs:
	- The file commnew.doc didn't belong in the fileset.

Notes in the makefiles that SVR4 systems may need to set EXTRALIBS=-lnsl.

Adds a user-contributed `man' page for the ps2epsi utility.


Fixes bugs:
	- The IJG files didn't compile properly by themselves, because they
didn't have $(AK) in their dependency list.

Changes back the handling of files named on the command line, so that they
are first sought in the current directory, and if that fails, use the
search path.  (2.9.4-beta changed things so that files on the command line
did not use the search path, because as of that version, the search path
doesn't necessarily include the current directory.  I consider the "check
the current directory and then use the search path" rule, which is the
MS-DOS standard and was used in Ghostscript prior to 2.9.4, a serious
mistake, since it is one of the best-known security holes in Unix and can
also produce confusing and unexpected results depending on the current
directory; I would much rather have a clear distinction between
user-specified files, which should not use any path searching, and system
files, that only use the defined search path.  However, as of this moment,
users seem to want the convenience at the expense of insecurity and

Adds '.' to the beginning of the search path for MS-DOS platforms, to
conform to the usual MS-DOS file searching convention.

Adds a -c ("code") switch, which interprets following arguments (until the
next switch) as PostScript tokens.

Changes the handling of FEATURE_DEVS so that either or must normally be selected.  THIS IS A NON-BACKWARD-COMPATIBLE
CHANGE for Level 1 systems, which formerly set FEATURE_DEVS to an empty


Fixes bugs:
	- didn't switch back to local VM properly before running
the program being benchmarked.

Adds a ppmsetpagesize command to the pstoppm utility.


Fixes bugs:
	- The PCX and GIF drivers used an incorrect algorithm for computing
the blue component of the color palette, which could cause colors to come
out with not quite enough blue.
	- The SPARCprinter driver wouldn't compile with non-ANSI compilers.

Adds new drivers:
	- A user-contributed driver for DEC sixel displays like the VT240
(sxlcrt, in gdevln03.c, which has a FSF copyright.)
	- A much larger and supposedly faster version of the TIFF/F driver
(tiffg3x, in gdevtifx.c), contributed by a user.  This has the same
copyright as the TIFF/F driver (gdevtiff.c).
	- A driver (faxg3, in gdevfax.c) that produces plain Group 3 fax
output with no header, using the CCITTFaxEncode filter to do the work.
(This is around 2.5-3 times as fast as the other fax drivers distributed
with Ghostscript.)
	- A user-contributed driver for the Mitsubishi CP50 color printer.

Changes the `bit' driver so one can set the Colors and *Values properties.

Makes the color mapping for PC displays, PCX files, and GIF files identical
(they differed slightly before).


Fixes bugs:
	- VMS used DISPLAY rather than DECW$DISPLAY to get the display name
if opening the display failed.
	- Many minor bugs relating to OS/2 and Win32 were fixed.
	- On Unix and DV/X platforms, the install script didn't mkdir
$(gsdir), and didn't mkdir the intermediate directory for the man page.
	- On BSD and UTek platforms, the declaration of memset in
memory_.h, and the definition in gsmisc.c, conflicted with the ANSI
	- One of the SPARC compilers compiled the intersection computation
in arc_either (gspath.c) incorrectly.
	- The temporary file names created under OS/2 could exceed the 8.3
length limit.


Fixes bugs:
	- The test files for the IJG library had been damaged by EOL
	- The garbage collector didn't mark some of the most recently
created names.
	- The interpreter would sometimes report a typecheck instead of a
	- If aload didn't have enough room on the stack, it would report a
rangecheck rather than a stackoverflow.
	- zcontext wouldn't compile, because it hadn't been updated to the
new GC interfaces.
	- The definition of private_st_stream_proc_state in ifilter.h ended
with a semicolon, which upset some compilers.
	- load didn't check to make sure that the dictionaries it examined
had read access.
	- cvrs didn't handle negative numbers in radix 2 or 3 properly.
	- The allocator could become confused if it was asked to allocate a
large array.
	- readline gave an ioerror rather than a rangecheck if it
overflowed the string.
	- The allocator didn't free packed arrays properly.
	- The allocator's check for LIFO freeing of arrays was off by 1, so
it never succeeded.
	- The undercolor removal and black generation procedures weren't
initialized properly.
	- If the interpreter couldn't find, it returned a random
exit code.
	- If an operator expected a procedure and didn't get one, it
sometimes gave an invalidaccess rather than a typecheck.
	- Unix file enumeration often did the wrong thing if there were
directories in the pattern.
	- The ASCIIHexDecode filter read an extra character after the
terminating >.
	- scalefont didn't fill in ScaleMatrix properly.
	- The CCITTFaxEncode filter crashed if the width of the page wasn't
a multiple of 8 bits.
	- The error printing code used .languagelevel, which wasn't defined
in Level 1 configurations.
	- setpagedevice didn't pop its argument.
	- Definitions in statusdict didn't change according to the current
language level.
	- Separation color spaces didn't allow strings as color space names.
	- Due to a bug in chunk_locate_ptr, the garbage collector sometimes
decided incorrectly that a pointer was pointing outside collectable space.
	- (Many other garbage collector bugs were fixed.)

Implements additional Level 2 features:
	- Garbage collection for strings.
	- Expandable operand and dictionary stacks, and the ability to set
	the maximum size of these stacks.
	- Additional user and system parameters.  The following are dummies:
	AccurateScreens, JobName, JobTimeout, WaitTimeout.
	- Procedure-based filters usable with cvx/exec and token.
	- Separation color spaces (always using the alternate space).
	(These were theoretically implemented in version 2.6, but they were
	never tested and were actually missing most of the implementation.)
	- VMThreshold and VMReclaim for invoking GC automatically.

Adds a hook in iscan.c for parsing DSC comments.

Adds encoding and decoding filters for the BCP and TBCP protocols.  These
are not fully implemented yet:
	- The interrupt and status request characters are ignored on input,
	and never generated on output;
	- The TBCP encoder doesn't emit the start-of-protocol string;
	- The TBCP decoder doesn't recognize the end-of-protocol string.

Factors out Type 1 font capability as a separate feature.

Changes the names of some files:
	packed.h to ipacked.h;
	bnum.h to ibnum.h.

Changes the name of the value.index member of a ref to value.boolval.
(Internal change only.)


Fixes bugs:
	- The definition of RELOC_PTRS_BEGIN in gsstruct.h wouldn't compile
properly with non-ANSI compilers.
	- The JPEG library wouldn't compile properly with non-ANSI compilers.
*	- The platform font machinery gave up too easily in some cases.
	- CMYK devices needing halftoning converted the CMYK color to RGB.
	- The debugging code in arc_add (gspath.c) didn't print the output
values correctly.

Factors out Type 1 font capability as a separate feature.

Version 2.9.4-beta (2/19/94)


Changes Ghostscript's path searching algorithm so that it does not
automatically look in the current directory first.  (The former algorithm
was more MS-DOS-like; the new one is more Unix-like.)  If you want to
include the current directory, you must include '.' in the search path.

Adds two new resource types for genconf.c:
	- -header filexxx.h adds #include "filexxx.h" to gconfig.h.
	- -libpath dir adds dir to the list of library search paths.


Fixes bugs:
	- (used by bdftops) computed the starting X coordinate
incorrectly, typically causing characters to be displaced slightly to the
	- didn't handle local and global VM properly.

Adds a utility, contributed by a user, for converting arbitrary
PostScript files into a form compatible with Adobe Illustrator.


Adds new drivers:
	- A user-contributed driver for Imagen Impress laser printers.
	- A user-contributed driver for the DEC LA75plus printer.


Under OS/2, adds the ability to keep Ghostscript in memory for a
specified number of minutes.

Adds support for Win32 and Win32s.

Changes the MS Windows platform font interface so that it does not attempt
to render fonts at sizes smaller than 6 pixels.  Changes the X Windows
interface, which already did this for 4-point and smaller fonts, to also
use a lower limit of 6 pixels.  Also changes the X Windows platform font
machinery so it does not render fonts at sizes larger than 36 pixels: at
large sizes, Ghostscript does a perfectly good job, and some X font servers
rasterize the entire font and lock up the entire window system while doing


Fixes bugs:
	- currentdash always returned a new array of reals, rather than the
actual argument of setdash.
	- Strings in binary object sequences read in as integers.
	- Because of a bug in chunk_locate_ptr, some large objects didn't
get freed properly.
	- If an error occurred while processing an image, Ghostscript would
attempt to free random blocks of storage.
	- Input filters discarded trailing data, rather than filling it out
with zeros.  (This is now fixed for ASCIIHexDecode and ASCII85Decode; it's
not clear what other filters it should affect.)
	- The ASCII85Encode filter produced garbage output for the final
1-4 bytes before EOD.
*	- The TIFF output driver produced incorrect output for the second
and subsequent pages if the output was being produced on multiple files.
*	- The default handleerror did a 'stop', which was not correct.
	- gpcheck.h converted all positive return codes to 0 if interrupt
checking was enabled.
	- Images with multiple data sources didn't work.
	- Images with 12-bit sample values didn't work.
	- Images with a file as the data source read additional data beyond
what was required.
	- 2 vmreclaim worked (pretty much), but 1 vmreclaim didn't.
	- If %lineedit was opened multiple times, characters from later
openings overwrote characters from earlier ones.
	- token returned garbage for the "remaining string" result when
reading from a string, if it actually read all of the string.  (New bug in
2.9.2, probably.)

Implements additional Level 2 features:
	- DCTEncode and DCTDecode filters.
	- Filters with procedures as the data source or target.
	(Except for token and cvx/exec.)
	- Garbage collection for names.

Changes the error printout so that strings are always truncated at 200

For Level 2 systems, changes the initial setting of the object format
parameter from 0 to an appropriate non-zero value.

* Changes the .quit operator so that it takes two operands, an error object
and an error code; if the latter is negative, the interpreter returns this
as the error code, rather than e_Quit.

Makes StandardEncoding and ISOLatin1Encoding arrays, rather than packed
arrays, on large-memory systems, for compatibility with certain test
suites.  Changes .registerencoding to accept arrays as well as packed


Fixes bugs:
	- Due to an error in cie_mult3, CIE-based colors were badly
*	- Very narrow (but not empty) rectangles would disappear.
*	- Small halftone cells could smash the next higher entry in the
halftone cache.
	- The orientation algorithm in gxstroke.c still interchanged
clockwise and counter-clockwise coordinate systems (after having been
"fixed" at least 3 times).
	- Stroking 1-pixel-wide lines shortened them, instead of
lengthening them, if non-butt caps were requested.

Refactors mem_mapped8_copy_mono because of limitations in the bcc32

Version 2.9.3-beta (1/19/94)

This version was created for evaluation purposes for a few users who needed Level 2 capability; it was never released to anyone else, even beta testers.


Fixes bugs:
	- The description of psview and xpsview was incorrect.


Changes the installation directories for Unix and similar systems to put
Ghostscript data in $(datadir)/ghostscript/gs-NN.NN.NN rather than directly
in $(datadir)/ghostscript.  (Fonts still go in $(datadir)/ghostscript/fonts.)


Fixes bugs:
	- Some spaces were incorrectly replaced with tabs in the help
message in the 3B1 display driver.
	- The BMP driver wrote a spurious scan line at the beginning
of its output.
	- The monochrome PCX driver had the two palette elements

Adds new drivers:
	- A user-contributed driver for the Xerox XES printer format.  This
has a FSF copyright.
	- A user-contributed driver for the Epson AP3250 printer.  (This is
the same as the Stylus 800, with slightly different margins.)
	- A user-contributed driver for the DEC LA70 printer with some
algorithms for improving text at low resolutions.  This has a FSF
	- A user-contributed driver for an intermediate-resolution mode
for 9-pin "Epson-compatible" printers.

Changes the name of the Stylus 800 driver from escp2 to st800.

Adds a compile-time flag to the Epson driver to cope with Panasonic 9-pin
printers, which sometimes have trouble mixing graphics and tabs.


Fixes bugs:
	- The MS Windows driver (gp_mswin.c) referred to iodev.h rather
than gxiodev.h.
	- On Unix System V platforms, gp_unifs.c and gdevpipe.c were
incorrectly omitted from the link list.
	- (Some?) System V platforms don't have the S_ISDIR macro,
requiring a change in stat_.h.
	- The Unix `install' target didn't install and
	- No MODULES.LIS file was provided for VMS.

Adds Desqview/X makefiles that actually work.

Documents the set of H-P-supplied patches needed to make H-P's
compilers process Ghostscript.

Changes the MS Windows driver so that if the user presses the Enter key
while the image window has the focus, the text window will be brought to
the top and made the active window.  This is useful when viewing a
multi-page document with Ghostscript.


Fixes bugs:
	- The definition of public_st_client_color() in gxccolor.h
included an extraneous semicolon.
	- The definition of private_st_AXD_state() in sfilter.h included an
extraneous semicolon.
	- saxx.c didn't include sfilter.h, which it needed for the
definition of private_st_AXD_state().
	- ialloc_struct failed to create a separate chunk if the structure
was very large.
	- setcolorspace didn't allocate the colorspace object in the same
VM space as the graphics state, causing problems when the colorspace was
	- In rare circumstances, currentfile could return an empty array
rather than a file.
	- Dictionary keys were always allocated in global VM.
	- If NOPLATFONTS was true, definefont didn't check whether the
dictionary was read-only before trying to insert an ExactSize key.
	- startjob could get an invalidaccess error, because serverdict was
allocated in global VM.
	- Using definefont with an already registered font created a
circular list structure.
	- If a PostScript procedure appeared as a CharString in a Type 1
font, it was always called with the character name, never the character
	- The SubFileDecode filter didn't work with a non-empty EOD string
(went into an endless loop).  (Probably a new bug in 2.8.)
	- save/restore didn't properly restore the maxlength of a
dictionary, causing data to get smashed at random.  (New bug in 2.9.)
	- save didn't mark objects as old, so a nested restore had no
effect.  (New bug in 2.9.2.)
	- After returning from an OtherSubrs callback, op_type1_free
freed the saved interpreter state incorrectly.  (New bug in 2.7.)
	- Level 1 configurations didn't work because .makeoperator gave an
invalidaccess error.  (New bug in 2.9.2.)
	- ASCII85 string literals didn't work.  (Probably a new bug in 2.8.)
	- If the current global/local allocation mode was different at the
end of a file than at the beginning, an addressing fault could occur
(gs_unregister_root in gs_run_string).  (New bug in 2.9.2.)
	- After a setfileposition on a file open for reading,
fileposition would return an incorrect value, even though the stream
was actually repositioned properly.

Brings the dictionary unpacking code for the DCT filters into line with
Adobe Technical Note 5116, which describes the Picky parameter for
DCTDecode and the NoMarker, Resync, Blend, Picky, and Relax parameters for

Changes the .quit operator so that if given a negative argument, the
interpreter returns this as the error code, rather than e_Quit.

Changes the Ghostscript integer version number from 100P+10S+T to

Changes the default halftone screen for high-resolution devices, both
black-and-white and color.


Fixes bugs:
	- The software floating multiply code used with USE_FPU=-1 only
worked on little-endian platforms.
	- Specifying a left side bearing to .type1addpath produced an
inappropriate offset.

Version 2.9.2-beta (1/2/94)

This version was distributed only to beta testers. It adds a garbage collector and full local and global VM support. It is the first version that sets languagelevel = 2, i.e., claims to be a Level 2 implementation.


Fixes bugs:
	- make.doc still referred to use_* variables in gdevx.c, and
use.doc didn't explain the use* X resources.

Notes that -Olimit=1000 is needed to compile Ghostscript on AXP systems
under OSF/1 1.3.


Fixes bugs:
	- did not work with interlaced images.
	- omitted gsmemory.h from the #include list in compiled


Fixes bugs:
	- The MS Windows driver hadn't been updated to work with the
new additions to the gx_device structure.
	- The BMP file driver wrote one scan line too many.
	- The cdj driver omitted an important cast to int in the error
diffusion code (FSdither macro).

Changes the SuperVGA drivers to recognize erasepage and reset the
color table, like the X driver.

Adds some fragmentary code to begin implementing the PostScript fax


Fixes bugs:
	- The procedure initializers for the MS Windows console I/O
were missing the new reset element.
	- The makefile entry in bcwin.mak used -fdev rather than -iodev.
	- The Borland C++ makefiles exceeded MS-DOS's line length limit if
the compiler files were in the standard Borland directory (BORLANDC).
	- Some procedures weren't declared with prototypes in gp_vms.c.
	- Some declarations had to be reordered to pacify the VAX compiler.
	- Under MS Windows, Ghostscript didn't automatically de-iconify the
text window to display messages on an error exit.
	- The Unix makefile rule for gconfig_.h used echogs rather than
	- The Microsoft C makefile referred to an obsolete file
	- gp_unifs.c used strpbrk and strrchr, which some systems lack.

Updates the OS/2 code and documentation for compatibility with the current
Ghostscript version.


Fixes bugs:
	- The X11 .pfa fonts replaced their .gsf requirements in the
fontmap, but not distributed with the previous (beta) release.

Adds fontmaps appropriate for use with DEC Ultrix and OSF/1 systems.


Fixes bugs:
	- 4-value entries in the Metrics dictionary were interpreted with
the width and side bearing interchanged.
	- Objects large enough to require their own chunk were not freed
	- The GS_FONTPATH scanner didn't deal with the possibility that
opening a file might fail.
	- The interrupt and timeout errors incorrectly pushed an error
object on the operand stack.
	- imagemask gave an error if it was invoked with a dictionary
argument with a current color space with more than 1 parameter.
	- definefont insisted that a new font not have a FID entry.
	- Some places didn't cast char to byte when needed.
	- An extra element was left on the stack when substituting the
default font for a font whose file couldn't be found.
	- The CCITTFaxDecode filter didn't allow the dictionary to be
omitted.  (The Adobe documentation doesn't allow this, but Adobe
implementations do.)
	- When the input came from a pipe (`-') switch, opening a filter on
currentfile that required more than 1 input byte to make progress would
cause Ghostscript to hang (in sreadbuf).
	- The interpreter didn't call gs_set_lib_paths before executing a
compiled-in initialization file.
	- A stream could be closed more than once.  (New bug in 2.8.)
	- The LZW decoder produced incorrect output if a code string was
too long to fit into a single output buffer.  (New bug as of 2.8.)

Implements a special check in def to allow construction of systemdict,
which is stored in global VM but references dictionaries in local VM.

Implements additional Level 2 features:
	- %null% and %ram% IODevices.
	- startjob, exitserver.
	- Local and global VM (finish).
	- Garbage collection (for everything except names and strings).

Moves the procedures for selecting paper size from systemdict to userdict.

Sets languagelevel to 2 in Level 2 mode, since essentially all of
Level 2 is now implemented.

Factors out the Level 1 extended color facilities (CMYK color and
colorimage) as a separate configuration feature.

Adds some preliminary code to begin implementing the Adobe BCP and TBCP
communication protocols.

Changes the implementation of save and restore so that the bookkeeping
structures are allocated in the new area, not the old.  (This is an
internal change not visible at the PostScript level.)


Fixes bugs:
	- gdevprn used some preprocessor macros in formal argument
lists that ansi2knr couldn't handle.
	- pick_cell_size called gs_distance_transform with a 0 argument
that non-ANSI compilers didn't automatically promote to floating point.
	- gs_screen_init called hypot with integer arguments that
non-ANSI compilers didn't automatically promote to floating point.
	- Some places didn't cast char to byte when needed.
	- The vx/vy origin adjustment for WMode=1 wasn't implemented.
	- The pattern cache wasn't initialized properly.
	- Composite fonts didn't properly decode strings that started with
an escape sequence, which have a special (undocumented) decoding rule, and
also didn't properly decode strings with multiple consecutive escape

Factors out the Level 1 extended color facilities (CMYK color and
colorimage) as a separate configuration feature.

Version 2.9.1-beta (12/7/93)

This version was distributed only to beta testers.


Adds a utility to view GIF files.  The current version does not
work with interlaced data, local color tables, or files containing more
than one image.


Fixes bugs:
	- putinterval and copy didn't do the right thing if the source and
destination were aliases for overlapping sections of the same array or
	- The DCT filter stub didn't allow the dictionary to be omitted.
(The Adobe documentation doesn't allow this, but Adobe implementations

Adds an optional dictionary argument to the LZWDecode filter, containing
InitialCodeLength, FirstBitLowOrder, BlockData, and EarlyChange entries.
Setting these parameters appropriately allows reading (non-interlaced) GIF
data directly.


Fixes bugs:
	- setdash produced inverted output if the pattern had an odd
number of elements and the offset O had the property that L <= O mod
2*L, where L was the sum of the pattern elements.

Version 2.9-beta (12/6/93)

Like 2.7, this version was created to satisfy a contractual requirement, and will never be distributed to anyone other than the other party to the contract.


Notes that Ghostscript runs on IBM PCs and compatibles under DR DOS

Notes that Ghostscript will run on IBM PCs and compatibles with
Hercules display cards if you redirect text output to a file.

Notes that the alternate DeskJet 500C driver (djet500c) does not work
on the 550C.

Gives a list of system-specific directories where Type 1 fonts are
likely to be installed, as a suggested setting for GS_FONTPATH.


Changes the distribution script so that it stores all text files in the
main source archive with Unix end-of-line conventions, but with DOS
end-of-line conventions in the MS-DOS-specific archive.

Changes the MS-DOS, MS Windows, and OS/2 makefiles so that 486SX and 486DX
processors are different CPU_TYPEs.  (The former, designated by
CPU_TYPE=485, does not include an on-chip FPU.)

Adds a line to which can be uncommented to select A4 as
the default paper size.

Adds a definable CFLAGS macro to the makefiles, allowing -DA4 to
select A4 as the default paper size.

Adds the H-P printer drivers to the standard Unix configurations.


Fixes bugs:
	- If there were no unencoded characters, would get
an error.

Changes ansi2knr to accept a wider range of function declaration syntax,
and to not depend on any Ghostscript header files.


Fixes bugs:
	- Several drivers (DigiFax, Epson LQ-2550, NEC P6) didn't handle
A4 paper width.
	- The IBM ProPrinter wasn't being initialized properly.
	- The Epson driver didn't work properly with compilers that
insisted on 'char' being a signed type.
	- The Epson driver ignored its end_string argument, producing
incorrect end-of-page behavior on some printers.

Adds new drivers:
	- User-contributed drivers for Bellcore MGR (a window manager most
commonly used with OS-9) devices.
	- A user-contributed driver for the CIF file format.
	- A user-contributed driver for the HP 2563B line printer.

Changes the LaserJet 2p, 3, and 4 drivers so they set the initial position
to (0,0) rather than (0,0.25").  (I don't remember why it was the other

Implements the PageCount property in all drivers, not just printer

Introduces a new gx_tile_bitmap type, and changes the tile_rectangle
device procedure to take it in place of gx_bitmap.  THIS IS A
NON-BACKWARD-COMPATIBLE CHANGE.  However, it only affects devices that
implement their own tile_rectangle procedures, of which there aren't very


Fixes bugs:
	- The VMS module lists referred to SDCTD and SDCTE instead of
	- The Unix install script tried to install the non-existent file
	- Microsoft C does something bizarre with empty macro parameters,
which caused a problem with the gs_struct_type_... macros.
	- The Unix platforms didn't automatically handle the presence
or absence of <dirent.h>.
	- The DEC Alpha OSF/1 1.3 library lacks `const' in the prototype
for popen, which requires a workaround.
	- The DEC Alpha OSF/1 1.3 X Windows library uses `private' as a
member name.

Splits off gp_unifs.c, containing code common to "Unix-like" file systems.

Adds a user-contributed OS-9 platform.


Fixes bugs:
	- The currentfile cache wasn't updated properly if an executable
file appeared in the middle of a procedure.  In particular, eexec-encoded
.PFB fonts often didn't work.
	- There was an extraneous `goto top' in scfd.c.
	- An integer constant overflowed in iname.c.
	- -2147483648 (i.e., -1 << 31) was converted to a float.
	- eexec didn't skip the first 4 characters correctly if they were
split across a buffer boundary.
	- The font/matrix pair cache didn't properly free entries with only
an XUID that was being deallocated.

Implements additional Level 2 features:
	- Patterns, makepattern, setpattern.
	- IODevice resource, setdevparams, currentdevparams.
	- OutputDevice resource, setpagedevice, currentpagedevice.
	(Partially implemented.)

Adds a new type t_struct to handle miscellaneous types that are allocated
as objects and that the interpreter doesn't handle specially, and changes
condition, fontID, gstate, lock, and save types to use t_struct.  (This is
an internal change, not visible at the language level.)

Moves the maxlength of a dictionary to its own ref, eliminating the "size
of integer" hack.  (This is an internal change, not visible at the
language level.)

Adds the last OS error number to the error printout.

Removes the obsolete framedevice operator.

Implements resetfile (the only Level 1 operator not yet implemented!).

Changes the name of the getdevice operator to .getdevice.


Fixes bugs:
	- A couple of necessary casts from char * to byte * were omitted.
	- A Sun compiler required an extra cast to (void *) in the e1
macro in clip_rect_enum_ptrs in gxcpath.c.
	- The gx_dc_ procedures defined in gxdraw.c weren't marked as
	- The number of "on" pixels in a halftone cell sometimes varied by
1 from cell to cell.
	- Mapping a gray level to CMYK didn't subtract it from 1 (to
produce the K component).
*	- charpath took hints into account.

Shuffles the order of some declarations to pacify the VMS C compiler.

Version 2.8-beta (11/10/93)

This version was distributed only to beta testers. It adds Type 0 font support. It also includes extensive redesign of streams (to eventually support procedure streams) and device properties (to eventually support get/setpagedevice and get/setdevparams).


Notes the change in X11 foreground/background handling.

Changes README so it no longer claims that Ghostscript works with X11R3.

Notes (in devs.mak) that the cdjmono driver is the best one to use for the
DeskJet 510.


Fixes bugs:
	- echogs wasn't always invoked with ./ on Unix systems.

Changes the file name unix-ansi.mak to unixansi.mak, so it can be created
on a MS-DOS system.

Adds a new "feature",, which compiles and links the
initialization files (gs_*.ps) into the executable, just as
compiles and links fonts.  If ccinit and ccfonts are both selected, the
only external file needed at run time is Fontmap.  Note that you must have
a working version of Ghostscript already in order to create a version that
uses the ccinit feature, just as for ccfonts.


Fixes bugs:
	- the ps2image utility didn't put a %! on the first line of the


Fixes bugs:
	- The Hercules display driver didn't include definitions for
outport2 and PAGE_HEIGHT_INCHES, which it uses.
	- The BGI driver didn't call setactivepage or setvisualpage,
which it needs to do in general.
	- The Apple DMP driver declared dmp_print_page rather than
appledmp_print_page, causing a compilation error.

Changes the X11 driver so that it doesn't use the default foreground and
background colors: you must set foreground and background explicitly for
Ghostscript if you want them to be other than black and white

Adds new user-contributed drivers for:
	- The StarJet 48 inkjet printer;
	- The GNU/Linux VGALIB display interface.
	- OS/2 Presentation Manager.

Changes the margins of the Epson driver to 0.2, 0.0, 0.0, 0.0, which
more accurately reflect the printer's capabilities.

Changes the get_props and put_props device procedures to take property
list "objects" with a procedural interface, rather than a data structure
get_props and put_props procedures.  Fortunately, there were only a few
devices that implemented their own get_props and put_props procedures (the
H-P color printers, and the three window systems -- X Windows, MS Windows,
and OS/2 PM).


Fixes bugs:
	- The meaning of the -p switch for the Watcom compile-and-link
program was changed between Watcom C/386 versions 8.5 and 9.5, causing the
make process to malfunction.
	- The SCFTAB and SCFDTAB modules were omitted from the VMS link

Adds user-contributed code for OS/2.

Removes the assumption that an 80486 CPU implies the presence of hardware
floating point, since the 486SX and Cyrix 486SLC don't have it.


Fixes bugs:
*	- The GS_FONTPATH scanner didn't recognize .PFB fonts beginning
with %!PS-AdobeFont.
*	- The GS_FONTPATH scanner often didn't recognize .PFB fonts at all.
	- Type 1 fonts always set the line join, line cap, and miter limit
to known values, rather than using the current values.  (Using the current
values doesn't make much sense, but it's apparently what the Adobe
implementations do.)
	- DISKFONTS didn't work, because of the change in the Ghostscript
fonts to do a systemdict begin/end (in version 2.7.1).


Fixes bugs:
	- == didn't produce exactly the same output as the Adobe
interpreters.  (Some automated debugging and testing programs care.)
	- The CCITTFaxEncode filter could get caught in an infinite loop,
because it failed to mask a byte datum when scanning for runs of black
	- The write operator gave an error for values outside the range 0
to 255, rather than just using the low-order 8 bits.
	- Some applications call a statusdict procedure named
setresolution without checking first whether it is present; Ghostscript
didn't provide one.
	- Reading from a closed stream caused an error instead of
returning EOF.
	- Input streams didn't close automatically at EOF.
	- findfont was defined as an operator, not a procedure.
	- closefile on a closed file gave an error.  (It isn't obvious
that the Adobe documentation specifies that it shouldn't, but that's what
Adobe says they do.)
	- The LZWDecode filter didn't handle codes representing strings
longer than the buffer size correctly.
	- The LZWDecode filter only allowed 4095 codes to be used, rather
than 4096.
	- The rand operator produced an infinite string of zeros if
given 0 or 0x7fffffff as the seed.
	- When a CDevProc procedure was called, there was an extra
copy of the character name on the operand stack below the operands of

Replaces all stream implementations with new ones designed to allow
interruption at arbitrary times.  ****** The 2-D case of CCITTFaxEncode
hasn't been converted (but it probably didn't work before, either).

Implements additional Level 2 features:
	- Type 0 (composite) fonts.

Adds an eexecEncode filter.

Implements setcolorscreen, which was accidentally omitted from 2.7.


Fixes bugs:
*	- In colorimage, if the color space of the image was different
from the current color space, and the first data values on a scan line
were zeros, the wrong color could result.
	- The new flatness testing algorithm could overflow, producing
straight lines or obvious polygons instead of curves.
	- Images could fail to display pixels after the first non-blank
pixel on a line if halftoned color was required.  (This bug was probably
introduced in 2.7.)
	- Interpolation between transfer map entries didn't work, because
of a rounding/truncation bug in frac2bits (bug introduced in 2.7.1.)
	- cshow did an extra grestore at the end.

* Implements a hack to slightly displace 1-bit-wide or -high images.  This
is necessary to work around a bug in TeX (or dvips?), which uses such
images to draw horizontal and vertical lines without positioning them to
ensure that they cover device pixel centers.

Adds support for composite fonts (no new client procedures).

Version 2.7.2-beta (10/11/93)

This version was distributed only to alpha testers.


Fixes bugs:
	- didn't print unencoded characters.

Improves to remove embedded comments.


Fixes bugs:
	- An error occurring within the scope of an internal .stopped
didn't pop the command and error name off the stack.
*	- The = and == procedures weren't re-entrant.

* Adds a .writecvs operator that does a cvs to an internal string followed
by a writestring.


Fixes bugs:
	- grestore freed the path and the clip path in an order that
was likely to lead to memory sandbars.
	- moveto + closepath didn't actually close the path.
	- moveto + reversepath produced an empty path (no moveto).
	- moveto + closepath + reversepath produced an extra lineto.
	- reversepath didn't set the current point to the end (i.e., the
former beginning) of the last subpath.

Adds a "planar" memory device.

Version 2.7.1-beta (10/4/93, not distributed to the public)

Like 2.7, this version was created to satisfy a contractual requirement, and will never be distributed to anyone other than the other party to the contract.


Documents the GS_OPTIONS environment variable.

Adds a summary of all environment variables to the documentation

Documents the existence of a third free viewer built on Ghostscript.


Fixes bugs:
	- wrfont didn't wrap a systemdict begin / end around the body of
the font.
	- wrfont wrote out the Symbol and ZapfDingbats encodings in a way
that only worked if the encoding was known by name.

Changes bdftops to include an XUID if desired.

Changes bdftops so that it uses 'show' for unknown ligatures, rather than
executing the characters as subroutines; this makes such ligatures work
properly with xfonts.


Fixes bugs:
	- The PCL drivers sent a printer reset (<ESC>E) at the beginning
of every page, instead of only before the first page.
	- The PCX driver didn't round up the scan line width in the
header, even though it produced scan lines with the correct (rounded)
number of bytes.

Adds a new map_rgb_alpha_color procedure.  This is a backward-compatible
change; this procedure defaults to calling map_rgb_color.


Fixes bugs:
	- On Unix platforms, the value of the TEMP environment variable
had to end with a '/'.
	- On MS-DOS systems, printer output to devices other than PRN
(specifically, LPTn) didn't put the device into binary mode.

Adds FPU_TYPE to the Unix makefiles, with a default value of 1.

Removes the mention of Xmu linking problems on the SunOS platform,
since the problem no longer exists.

Changes the order of X Windows libraries from Xt X11 Xext to Xt Xext X11.
This makes the OSF/1 linker happier.


Fixes bugs:
	- All the fonts originated by Aladdin, and the shareware fonts,
had UniqueIDs in the 4xxxxxx range, which is only supposed to be used for
limited-distribution fonts.
*	- When Ghostscript loaded a font, it pushed a scratch dictionary
on the dictionary stack, rather than userdict.  (Note that this fix also
requires fixing the fonts to include a protective systemdict begin /
end; see below.)
*	- When loading a font failed, Ghostscript didn't check the font
name against the default font name properly.
	- Ghostscript's own fonts didn't include a systemdict begin /
end to guard against redefinition of names used in the reading
procedures (e.g., index).
*	- When Ghostscript scanned a .PFB font to get the FontName, it
didn't skip over the 6-byte header, which could cause confusion or a
	- Loading a .PFB font that left extra information on the
operand stack didn't work.

Changes the ZapfDingbats font to use DingbatsEncoding rather than include
a copy of the encoding in itself, if DingbatsEncoding is known.  Changes
the Symbol font similarly.

Removes eexec encryption from the 4 URW fonts, so they will work with

Adds shareware Hiragana and Katakana fonts (Calligraphic-Hiragana and
Calligraphic-Katakana, by Kevin Hartig).

Adds GS on the end of the family names of all of Aladdin's own converted

Replaces many of the Hershey fonts with new ones (mostly Type 1) created
by Thomas Wolff, who added accents, accented characters, and other
non-alphabetics.  These too now have proper UniqueIDs.


Fixes bugs:
*	- imagemask interpreted the Decode array incorrectly (inverted).
	- Running out of memory when constructing a path incorrectly
signalled a limitcheck rather than a VMerror.
	- restore didn't purge uncached scaled fonts properly.

Adds alpha (opacity) to the graphics state, and setalpha and
currentalpha operators.

Redefines erasepage in terms of a new .fillpage operator that fills
the current page with the current color and then does a sync_output.

Redefines setdevice and putdeviceprops in terms of new .setdevice and
.putdeviceprops operators that return a boolean indicating whether the
page needs to be erased.  With this change, operators that erase the page
always call erasepage at the interpreter level rather than calling
gs_erasepage directly.


Fixes bugs:
	- The null device allowed its size to be reset.
	- clippath didn't establish a current point if the clipping
path was empty.
*	- The Type 1 font interpreter (gs_type1_interpret) flattened
curves even if it was being invoked for charpath.
	- Colored halftones usually didn't come out with the correct
phase, and had several other problems.
	- A show or charpath within a BuildChar procedure didn't work.
	- Accented characters composed with seac used the base
character width instead of the composed character width.  (The Adobe
documentation says these must be the same, but some commercial fonts
don't obey this.)
	- setcurrentpoint in the accent of a character composed with
seac didn't take the accent's displacement into account.

Adds an alpha (coverage) value to the graphics state, and
gs_setalpha/currentalpha procedures.  Currently Ghostscript just passes
the alpha value to the driver; it doesn't attempt to emulate alpha
handling if the driver doesn't support it.

Redefines gs_erasepage to call gs_fillpage.

Bypasses the fill code if the clipping box is empty.  This makes a big
difference for stringwidth, and doesn't hurt anything else.

Changes frac_1 from 0x7fff to 0x7ff8.  This allows exact representation of
practically all useful fractions, since this number (32760) is

Changes float to double in several matrix routines for better accuracy.

Adds new device properties to implement the deviceinfo operator:
Colors, GrayValues, RedValues, GreenValues, BlueValues, ColorValues.
Also adds HWBitsPerPixel and HWColorMap.

Changes the sorting algorithm for halftones to use qsort instead of
special code.

Changes the Type 1 interpreter so that it uses the current point, rather
than (0,0), as the character origin.

Version 2.7-beta (9/20/93, not distributed to the public)

This is the first of a series of beta-only versions planned for release between 2.6.n and 3.0. This version, in particular, was created to satisfy a contractual requirement, and will never be distributed to anyone other than the other party to the contract.


Fixes bugs:
	- The "HP XLFD extensions" to X11R5 are not specific to H-P
	- The configuration generation script used rm rather than rm -f.
	- gs.1 was installed in $(docdir) rather than $(mandir);
$(mandir) wasn't defined.
	- ansi2knr.1 was installed in $(docdir), which was
inappropriate because ansi2knr itself wasn't installed anywhere.

Moves documentation for versions 2.4.x and 2.5.x to history.doc.

Moves the documentation on how to add devices to the configuration
from devs.mak to make.doc.

Changes the name of readme.doc to current.doc, since the presence of
two "readme" files was confusing to users.

Documents how to use the Microsoft Windows PostScript printer driver
to convert TrueType fonts to Type 1 fonts embedded in the document.

Corrects several errors in the documentation of the get_bits driver

Documents the fact that X11R3 is no longer supported.

Removes the last references to "Ghostscript" from the comments in the
gs_*.ps files.  The only remaining reference, other than the boilerplate
comments at the beginning of each file, is in the message at the end of

Documents the use of WMAKEL rather than WMAKE with the Watcom compiler.


Fixes bugs:
*	- The Unix install script used gs rather than $(GS) as the name of
the executable.
*	- The Unix install script didn't copy to $(gsdatadir).
	- genconf.c used ps2 as a variable name; ps2 is a predefined
preprocessor symbol in the VSC compiler used by IBM.
	- @-expansion didn't interact properly with -- and -+.
	- The Unix install script didn't copy COPYING to $(docdir),
and copied README to $(gsdatadir) rather than $(docdir).
	- ps2ascii used /bin/sh -f, which is an incorrect flag.

Removes all uses and mentions of USG (a now-obsolete GNU convention)
as a synonym for SYSV.

Removes and from FEATURE_DEVS if is
included, since they don't add anything beyond

Changes the ccgs script to explictly remove the old .o file before
doing the mv, for the benefit of people who have changed mv to prompt
before overwriting.  Changes the configuration script to use rm -f
for the same reason.

Changes the -Z switch so an empty list of options does nothing, rather
than turning on all options.

Adds a -@ switch which is like -- and -+ except that it does
@-expansion of arguments.

Changes genconf so it takes patterns from the command line that describe
how to write the linker control files, rather than having the patterns
built in.

Changes -d and -D so that if no value is supplied, the default is
true rather than null.


Fixes bugs:
*	- The ps2ascii script still referenced under its
old name
*	- had a 'pop' missing in the written-out
definition of 'max' in the boilerplate code it put at the beginning
of compressed files.
*	- got a typecheck if a scan line had no repeated
data in it anywhere.
	- didn't handle CharStrings or Subrs that weren't
	- produced an init file that incorrectly
attempted to load the Symbol and Dingbats encodings dynamically.

Removes the gsview.bat file, since it was confusingly named and not
generally useful.

Changes bdftops back to using encrypted CharStrings, for compatibility
with Adobe interpreters, but also changes lenIV to 0, to save a little
more space.

Changes the traceop utility so it makes traced operators appear to be
operators, and so it will replace a definition in systemdict if explicitly
requested to do so and systemdict is writable.

Adds a printafm utility for printing the metrics of fonts in AFM format.


Fixes bugs:
	- The cdj driver was missing a few type casts that were needed to
satisfy pedantic compilers.
	- For banded devices, many of the non-displaying target routines
were getting called with the original device as the first argument, not
the target device.  (This didn't make any difference in practice, because
gdev_prn_open explicitly copied the non-rendering procedures back into the
procedure vector.)
*	- The X driver didn't catch and discard bogus errors on
XFreeColors, which faulty servers generate.
*	- The X driver gave up on color allocation too easily.
*	- The X driver dynamic color table size could become negative.
*	- x_lookup_font could return platform fonts of very small sizes,
which have very inaccurate metrics.
*	- The ESCP/2 driver was incorrectly named gdevescp2 in devs.mak.
	- The Apple DMP driver used #if 0 / #endif instead of comment
brackets, and was incorrectly named "dmp" instead of "appledmp" in
the source code.
*	- The X driver didn't free dynamic colors at the start of each page.
*	- The X driver didn't bind foreground/background defaults tightly.
*	- The X driver didn't check for GHOSTVIEW_COLORS properly.
*	- The X driver freed too many colors if an allocation request failed.
*	- The X driver didn't check return value of gs_malloc for being NULL.
*	- The DeskJet/LaserJet driver used an incorrect command for
*	- The DeskJet/LaserJet driver incorrectly reset the printer at the
beginning of every page.
*	- The PCX driver put an old version number in the header, and
didn't pad scan lines to an even number of bytes.
	- The BMP driver used a variable named `quad', which is a
reserved word on some platforms.
*	- The TIFF driver didn't handle A4 or B4 size paper correctly.
*	- The X11 driver incorrectly demanded the Xmu library, which was
not needed and which caused link errors on some versions of SunOS.
*	- X11 font matching scheme was too loose, causing overlaps and
other problems.
*	- X11 Font Extensions (rotated and mirrored fonts) did not work
properly on NCD terminals.
*	- When freeing the rgb cube/gray ramp, the parameters to gs_free()
did not exactly match the parameters to gs_malloc().
*	- Ghostscript failed to warn the user when it could not allocate
the original color cube/gray ramp and dropped back to a smaller
cube/ramp, or from color to mono.
*	- x_release could cause Ghostscript to fail if a font was freed
after the device was closed.
	- The X driver continued to ask the server for colors even after a
request failed, causing colored images to display very slowly.

* Adds a pcxgray driver to provide 8-bit gray scale output in PCX format.

Adds a pcx24b driver to provide 24-bit RGB color PCX output.

* Adds a LaserJet 4 driver.

Adds a user-contributed driver for the DEC LA70 (very similar to the LA75).

Substantially improves the performance of the PxM drivers by eliminating
an unnecessary copying step and by writing each scan line with a single
fwrite when possible.

Moves the gray-scale and 24-bit RGB device color mapping routines to
gxcmap.c from gdevpcx.c and (nowhere).

Allows window granularities smaller than 64K in the VESA driver.

Changes the LaserJet margins again.


Fixes bugs:
	- Platforms where stat doesn't return a st_blocks value
computed the block count wrong.
	- In gp_vms.c, the call on SYS$FILESCAN needed two uint *s
rather than a long * and a struct *.
*	- The VMS script files referenced IBSCAN instead of ISCAN2,
and omitted GDEVXXF.
*	- The UUENCODEd icons for the MS Windows platform were omitted
from the fileset.
*	- On MS-DOS systems, filenameforall didn't interpret * alone
as a pattern matching all files.

Adds wildcard matching capability to filenameforall under Unix.

Removes gp_file_status from the platform interface, since all
platforms provide identical stat calls in the C library.

Adds DesqView/X (using djgcc and go32) as a platform.

Removes the S3 driver from the standard PC configurations.

Adds documentation for compiling Ghostscript on the Intergraph Clipper.

Updates the documentation to add a better list of X Windows font
names for the Sun platform.


Creates an external file ( with the ZapfDingbats encoding
(actually in 2.6.1, but not documented there).

Changes the names of the Cyrillic fonts to Shareware-Cyrillic-Regular
and Shareware-Cyrillic-Italic, keeping Cyrillic, Cyrillic-Regular,
and Cyrillic-Italic as aliases.

* Removes the requirement that the FontName in the font file be the same
as the name in Fontmap.  (This requirement led to the need for aliases,
and was extremely confusing to users.)

* Adds a GS_FONTPATH environment variable containing a list of directories
that should be scanned automatically for fonts.

* Gets rid of the Ugly font, and changes the default to the IBM Courier
font, which is freely distributable.


Fixes bugs:
	- cvs didn't check for stack underflow.
*	- zht2.c didn't include alloc.h.
*	- execstackoverflow cleared the e-stack instead of just
cutting it back.
	- if and ifelse incorrectly reported typecheck instead of
	- Copying a dictionary could alter some items even if a later
item causes an invalidaccess error because of an attempted store of a
local object into global VM.
	- bitshift and cvrs assumed that longs occupied 32 bits.
*	- exitserver didn't check the password, and always succeeded.
	- Font loading didn't suppress all output messages if QUIET
was set.
*	- The interpreter incorrectly pushed its exit procedure on
the e-stack if it was called again after an interrupt.
*	- The interpreter didn't treat timeout like interrupt in
terms of re-executing the current operation.
*	- `show' operators popped their operands before they were
sure they wouldn't be interrupted.
*	- rotate with a matrix operand didn't check for multiples of
90 degrees.
	- In the system name table, ge was misspelled eg, and
pathforall was misspelled pathfoall.
*	- file_close_file attempted to free the buffer even if it was an
externally supplied string (specifically, the argument of gs_run_string).
	- setprintername (in set printername rather than

Implements additional Level 2 features:
	- Indexed color space with lookup procedure.
	- sethalftone, except for the transfer function override,
	and currenthalftone.

Implements OtherSubrs for indices greater than 3 (required for
MultiMaster fonts).

Implements black generation and undercolor removal.

Changes `store' from a C procedure to a PostScript procedure.

Changes idiv back so it requires integer operands, per the Adobe
documentation but not per some old Adobe interpreters.

* Adds many new paper sizes to  It now includes ISO a0-a10
and b0-b10, and CAD sizes archA-archE.

Implements `status' for non-%os% files.  (This is currently a no-op,
but the framework is there.)

Changes the error handler so it normally uses = rather than == to print
the operand stack, to avoid recursive errors.

* Adds time slicing capability to the interpreter.

Implements setcolorscreen/currentcolorscreen.


Fixes bugs:
*	- Rectangles with vertices specified in clockwise order were
drawn as 0-width lines.
*	- The string matching function reported that 'abcdefg'
matched the pattern 'abcde'.
*	- The bounding box of non-rectangular clipping paths was not
being marked as valid, so cached characters would simply get
discarded as being outside the bounding box.
	- erasepage filled the page with the device's white color,
not with gray level 1 passed through the transfer function.
*	- Colors with equal R/G/B or C/M/Y components were rendered
incorrectly if the 3 or 4 transfer functions were not all the same.
*	- Because of a bug in rc_unshare, using CIE color would give
random errors (such as /invalidaccess in --for--).
*	- setbbox didn't round the coordinates properly, which could
cause erroneous rangecheck errors with coordinates on the edge of the
*	- Color halftones "flipped over" at the 50% point, inverting
foreground and background.
	- Quite a few places assumed that longs occupied 32 bits.
*	- kshow passed an incorrect c1 value to the procedure.
	- The debugging code in update_x_list in gxfill.c didn't take
into account the possibility that the active line at x_first might be
	- gx_image_cached_char called the xfont render_char procedure an
extra time if it failed with required=0 and succeeded with required=1.
(This was just a small inefficiency, not a logic bug.)
	- Non-rectangular clipping regions weren't computed correctly,
because accum_add_rect didn't handle overlapping rectangles.
	- Drivers didn't report file system errors (such as file system
full) as an ioerror.
*	- setdevice didn't reset the charpath and setcachedevice flags.
	- The Zortech compiler produced wrong code for the uid_equal
macro; uid_equal is now a procedure.

Passes OtherSubrs arguments back to the caller correctly for indices
greater than 3.

Implements black generation and undercolor removal.

Removes gdev_mem_ensure_byte_order, which was no longer used or useful.

Removes gstdev.c (device tracing), since it hasn't been used in a
long time and is of little value given a reasonable debugger.

Changes the interface to the xfont char_metrics and render_char
procedures to allow them to return 1.

Changes 32-bit memory devices so they use CMYK color mapping rather
than RGB mapping with an unused byte.

Implements gs_setcolorscreen/currentcolorscreen.

Implements Level 2 halftones, except for the transfer function override.

Implements a hack to make zero-width rectangles display as one pixel wide,
to work around a bug in the Microsoft Windows PostScript driver.
Currently the hack only works for vertical lines, not horizontal ones.

Version 2.6.1 (5/28/93)

This is primarily a bug-fix release for 2.6, with a couple of minor additions.


Adds proper `man' pages ansi2knr.1 and gs.1.


Fixes bugs:
	- The Unix makefile produced an incorrect linker command if
EXTRALIBS was not empty.
	- The Unix install commands didn't copy devices.doc,
ps2epsi.doc, and xfonts.doc to the documentation directory.
	- echogs.c didn't include <sys/types.h>, which is needed for
time_t on some systems.
	- malloc_.h used <malloc.h> rather than <stdlib.h> on
NeXTStep systems.

Changes the configuration procedure to use a C program rather than
complex shell scripts.


Fixes bugs:
	- The boilerplate produced by ps2image used the 'max'
operator, which is not a standard PostScript operator.
	- The utility had 'floring' instead of 'florin' in
the OEMEncoding table.
	- was omitted from the PC distribution.

Changes the name of the dicttomark procedure to .dicttomark.

Renames as, so it matches the names of the
script files.


Fixes bugs:
	- The pbmraw driver was writing out RGG instead of RGB values.
	- The X11 driver used NULL in a place where it should have
used None.
	- For multi-file output, the GIF driver didn't write a header
at the beginning of each file.
	- The Epson driver didn't honor the -A4 compilation switch,
didn't put (0,0) at the physical corner of the page, and was too
liberal about using tabs instead of spaces.

Replaces the color handling algorithms in the X Windows driver with
new, much better ones.

Makes the PC display drivers recognize the -A4 compilation switch,
like the printer drivers.

Adds new user-contributed drivers:
	- A driver for Epson printers that use the ESC/P 2 control
language, such as the Stylus 800.
	- A driver for the Apple Dot Matrix Printer and Imagewriter.

Adds a new get_xfont_device driver procedure.  This is a
backward-compatible change, since there is a sensible default.


Fixes bugs:
	- On VMS, gconfig.h didn't have #include "gsconfig.h" as its
first line.
	- gconfig.c compiled incorrectly on the RS/6000 because the
compiler evaluated a constant of the form (x<<y)+z incorrectly.
	- Quite a few files that used the mem... functions didn't
include memory_.h, which caused trouble on some bsd4.2 systems.
	- The definition of zfont_char_xglyph confused one of the AIX
	- On VMS, DEC C allows extra arguments for fopen, but gcc doesn't.
	- On the MS Windows platform, 2.6 used gdevwddb rather than
gdevwdib; the latter is almost always faster.
	- The PC .zip files didn't include the Windows .ICO and .RES
files in either GSEXE.ZIP or GSFILES.ZIP.

On PC platforms, adds an option (FPU_TYPE=-1) to optimize for
machines lacking a floating point processor.


Adds 4 new fonts contributed by URW.  These have a URW copyright and
are governed by the GNU License.

Documents the fact that font names in Fontmap can be strings, not
only names.

Adds DingbatsEncoding as a predefined encoding (in addition to
Standard, ISOLatin1, and Symbol).


Fixes bugs:
	- memchr (used in zfile.c) isn't available on all platforms.
	- languagelevel was defined as an operator rather than an
	- iccfont.c referred to name_StandardEncoding instead of
#include'ing font.h and referring just to StandardEncoding.
	- The CCITTFaxDecode filter didn't work on 32- (or 64-) bit
machines, because of a bug in more_bits().
	- The structures recording an allocation within the scope of
a save could get allocated unnecessarily, because they weren't
properly marked as free when an array was freed.

Renames the following Ghostscript-specific operators by adding a '.'
at the front: makeoperator, setdebug, setmaxlength, stringmatch,
type1decrypt, type1encrypt.

Adds a real implementation of glyphshow.


Fixes bugs:
	- Discarding fractional character coordinates in the Type 1
rasterizer led to some rendering anomalies (e.g., characters 1 pixel
too high).
	- If a font had a non-standard encoding (i.e., not
StandardEncoding, ISOLatin1Encoding, or SymbolEncoding), Ghostscript
would never invoke the platform font code.
	- The RGB to HSB color conversion algorithms produced
nonsensical values.
	- struct cached_char_s was defined redundantly in gxcdir.h,
causing compilation problems on some systems.
	- 32-bit color devices didn't work properly on little-endian
machines (arrange_bytes in gdevmem2 was wrong).
	- The scaled font cache could confuse two fonts with the same
UniqueID and different Encodings.
	- Under many common circumstances (first use of a character
was with stringwidth, the font was renamed, the font encoding was
changed), xfonts would not be used.

Adds gs_glyphshow.

Version 2.6 (5/9/93)

The main new feature in this release is the ability to use platform fonts. It also adds many more Level 2 PostScript facilities.


Corrects some errors in the documentation of the makeimagedevice operator.

Adds operand and result types to the comments at the beginning of all the

Adds new sections on installation in use.doc.

Reinstates history.doc as a repository for old and no longer interesting
history information.

Adds a new file, devices.doc, with documentation for specific devices.

Points out that font2c must be run with a Fontmap that includes the fonts
being converted, and that its arguments must be quoted with "" on VMS

Notes that the font name in the Fontmap must be the same as the FontName
in the font.

Adds a list of the Level 2 facilities not provided by Ghostscript.

Identifies as an alias for the
gnu.ghostscript.bug newsgroup.

Points out explicitly that -sOutputFile=- sends output to stdout, and
requires using the -q switch.

Documents the use of tar_cat to construct the Unix makefiles.

Adds a new file, xfonts.doc, that describes the external font interface.

Documents the fact that drivers must use gs_malloc and gs_free rather than
malloc and free.

Documents the *.sh (shell script) files.

Adds brief documentation on some additional development tool .ps files.

Documents the TEMP and GS_OPTIONS environment variable.

Points out the need to run Windows in 386 Enhanced mode on machines
that have less than 6 Mb of RAM.

Consolidates documentation on compiler switches in make.doc (some of
it had been in the unix*.mak files).


Fixes bugs:
	- \'s in arguments following -- were doubled.

Includes the full set of filters automatically if the level2 feature
is selected.

Extends DEVICE_DEVS... up to DEVS9.  Adds DEVICE_DEVS1 as well.

Renames turboc.mak and tbcplus.mak as tc.mak and bc.mak.

Makes @-files use the library path (GS_LIB, -I).

Changed the Unix install script to use install <file> <destfile>
rather than install <file> <directory>.

Adds a GS_OPTIONS environment variable that acts like an implicit @-file
at the beginning of the command line (i.e., may contain switches and
initialization files).

Renames as

Adds a user-contributed shell script for using Ghostscript with an
H-P printer spooler.

Adds to the set of installed utility files.

Extends the TEMP environment variable (the directory for scratch
files) to work on Unix as well as MS-DOS.

Changes the MS Windows makefile to generate gswin.exe rather than
gs.exe, and the Watcom makefile to generate gs386.exe.

Moves the "product" string from to iinit.c.

Adds a GS macro to the makefiles, to allow choosing the name of the


Fixes bugs:
*	- font2c did the wrong thing (still) for fonts that didn't
use StandardEncoding, ISOLatin1Encoding, or SymbolEncoding.
*	- had a fatal bug (wrong operand order for
charstack_write) that caused bdftops to fail.
	- gslp didn't wrap or truncate lines.
	- gslp didn't handle tabs in a second or subsequent column
	- The definition of ashow in incorrectly undid the
increment following the last character.
	- The definition of awidthshow in failed to pop
two entries from the stack, and also tested the character against the
wrong value.

Adds a shell script ( that interfaces Ghostscript with the
System V 3.2 lp interface.

Adds ps2ascii and ps2epsi script/batch files.

Adds a new utility,, for concatenating all the
Ghostscript initialization files into a single file, optionally
removing comments and blank lines.

Adds new switches to gslp:
	-q: suppress all printed output.
	--detect: check whether the file begins with %!, and if so,
	    interpret it directly as a PostScript file.
	--first-page <page#>: replaces the former -P switch.
	--last-page <page#>: replaces the former -Q switch.
	--(heading|footing)-(left|center|right) <string>: define
	    headers/footers.  # inserts the page number.
	--margin-(top|bottom|left|right) <inches>: define margins.
	--spacing <n>: for double, triple, etc. spacing.
Also makes gslp ignore all the enscript flags it doesn't implement.

Adds an option to to do encryption at read-in time.  (This
allows much better compression of the standard Ghostscript fonts.)
Changes bdftops to use this option.

Changes gslp to accept wild cards in file names.

Replaces with a new one contributed by a user.

Changes the compression scheme used in ps2image to a much more
effective one.  Writing images is much slower than with the previous
scheme, but reading is not.


Fixes bugs:
	- SCFDTAB and SCFTAB were omitted from the VMS module lists.
	- Function prototypes were not being used with the Watcom
	- On MS-DOS platforms, if the value of the TEMP variable had
a trailing : or \, Ghostscript appended a \ anyway.
	- Under Windows, changing the size or resolution of the image
closed and reopened the window.
	- Ghostscript would not build correctly with the Watcom compiler
if DOS4G=quiet was not set, because the DOS4GW copyright message was sent
to stdout.
*	- Finally gets Ghostscript to run properly on the RS/6000, by
adding a compiler bug workaround to arc_add and arc_either.
*	- Finally gets Ghostscript to compile properly on Sun SPARC
systems, by adding a compiler bug workaround in scan_number.

Changes the default MS-DOS configuration from 8086/8088 to 80286.

Adds all the SuperVGA drivers to the BC++ and Watcom executables
(except for the VESA driver in the Watcom executable).

Adds a makefile (msc.mak) for the Microsoft C/C++ 7.0 platform.  This
is currently a MS-DOS, not a MS Windows, platform.

Changes gp_enumerate_files_init so it takes a gs_memory_procs *, not
separate proc_alloc_t and proc_free_t arguments; also, it must
enumerate precisely the requested set of files, not a superset.  THIS
IS A NON-BACKWARD-COMPATIBLE CHANGE.  It affects all gp_*.c files.

Adds the P*M drivers and to the standard configuration on
Unix platforms.

Changes the Watcom makefile so it uses the WATCOM environment variable (by
default) as the base directory for the Watcom executables.

Adds the MS Windows COMMDLG.DLL and SHELL.DLL files to the set of
files incorporated in GSEXE.ZIP, since the new MS Windows code uses
them, and they aren't provided with Windows 3.0.

Makes major revisions to the MS Windows platform and driver code, to
support the gsview front end, and also to remove the dependence on the
Borland EasyWin library.  NOTE: Compiling the MS Windows code now requires
Borland C++ 3.1 (not 3.0).

Changes time_.h so that Ghostscript will compile and run on A/UX.

Changes the MS-DOS implementation of file enumeration so it always
treats \s in the file name as literal characters, not escapes, unless
there are two \\s in a row.  This does the most sensible thing given
the DOS file naming conventions.

Adds a %pipe% file device under Unix.

Adds a makefile for Watcom C under MS Windows.  This is very preliminary;
in particular, NO display output is supported.


Fixes bugs:
	- fonts.mak referred to ncri and puti rather than ncrri and
	- cyr and cyri had the wrong protection.
	- The Hershey fonts left the font on the stack when they were
*	- The FontName of an aliased font was the original FontName
from the file, not the alias.
*	- Fontmap.BTS had incorrect entries for AvantGarde-Demi and
	- Ghostscript pushed userdict, rather than an empty writable
dictionary, onto the stack when loading a font, leading to name clashes.

Adds a new cfonts.mak with a full set of rules for compiling all the
standard Ghostscript fonts (except the Hershey fonts) into C.

Adds UniqueIDs to the Hershey fonts, and removes the UniqueIDs from
the Hershey entries in the Fontmap.

Adds a new Fontmap for VAX/VMS with DECWindows/Motif.

Changes MakeHersheyFont so it takes the encoding as an additional
parameter, and changes the Hershey-Symbol font to use SymbolEncoding.


Fixes bugs:
	- The !@*&^%#@$ PCL drivers *still* didn't do the right thing
about vertical spacing: the <ESC>*p+<n>Y command works on all PCL 3,
4, and 5 printers *except* the LaserJet IIp.
	- The cdj driver used recursive macros (height, t_margin,
b_margin) that not all compilers handled correctly.
	- The djtc driver used some assignments including =*, which
some compilers dislike.
	- The S3 driver wouldn't compile correctly with the Watcom
	- The makefile entry for the S3 driver was wrong.
	- The SuperVGA drivers returned an error, rather than using
the highest available resolution, if a too-high resolution was
	- The GIF driver produced an incorrect header for images
wider or taller than 32K pixels.
	- The GIF driver wasn't able to handle multi-page documents
	- The margins on the DeskJet were still not correct.
	- Some ANSI C compilers rejected a complex expression in
	- Printer drivers didn't recover cleanly from problems in
opening the scratch files.
	- The BJ-10e driver used the same name `out' for a label and
a variable.
	- The SCO ODT compiler couldn't handle sizeof(ppdev->fname).
	- The Epson driver used the wrong value for ESC in the
initialization string.

Adds new drivers:
	- Drivers to produce MS Windows .BMP format output.
	- A new ATI Wonder display driver (800x600, 16 colors) and a
1024x768 mode for the existing driver.

Adds new user-contributed drivers:
	- A driver for the Tektronix 4693d color printer.  This carries a
university copyright.
	- A driver for the SPARCprinter.
	- A driver for the Canon BJ200 printer.
	- A driver for the IBM ProPrinter.
	- A driver for the DEC LJ250 printer, which has a
PaintJet-compatible mode.
	- A replacement driver for the Sony NWP533.
	- A driver that writes TIFF/F (Group 3 fax) files.  This carries
an external copyright.
	- A driver for the C.Itoh M8510 printer.
	- A driver for the Okidata MicroLine 182 9-pin dot-matrix printer.
	- A Hercules Graphics driver.
	- A driver for printers under MS Windows.
	- A driver for direct frame buffer addressing under SCO Unix
and Xenix and AT&T SVR4.

Changes the get_bits driver procedure so it always reads a single
scan line, and optionally does not copy the data.  THIS IS A
NON-BACKWARD-COMPATIBLE CHANGE.  However, this change does not affect
any existing printer driver, since these all go through intermediate
routines in gdevprn.c.

Changes gdevprn.h, and the relevant printer drivers, so that -DA4
will change the default paper size for any printer driver.

Allows the use of NULL or 0 for default procedures in the driver
procedure vector.

Adds an optional map_cmyk_color procedure to the driver procedure

Changes the Epson driver so that the minimum amount of white space
required to use a tab is an easily changed parameter.

Changes the BGI driver to use separate segments for the Borland
device drivers, to reduce the risk of overflowing a segment.

Adds an optimization option (normally enabled) to the PGM and PPM drivers
such that they revert to PBM or (for PPM) PGM if the page can be
represented that way.

Adds a new (optional) driver procedure to get the procedure vector
for external fonts.

Adds an argument to gp_open_printer to indicate whether the file should be
opened in binary or text mode.  THIS IS A NON-BACKWARD-COMPATIBLE CHANGE.
However, this change does not affect any existing printer driver, since
these all go through intermediate routines in gdevprn.c.

Changes the LN03/LA50/LA75 driver so it uses a text record mode to open
the output file under VMS (by adding an argument to gp_open_printer to
indicate this.)

Allows (indeed, encourages) drivers to use far_data to declare the device
structure, primarily to avoid overflowing the 64K data segment under MS
Windows.  Changes the file output drivers and many of the printer drivers
to declare their device structures as far_data.

Replaces the AT&T 3B1 driver with an updated version (from the same

Changes the Epson BJ driver and the SPARCprinter driver so they align
the (0,0) point of the page with the physical corner of the paper
rather than with the origin of the printable area.

Removes the EIZO MDB-10 driver, since it caused complications for the
EGA and VGA drivers and is not a widely used device.


Fixes bugs:
	- The entry for the copydevice operator in the operator table
was initialized incorrectly.
	- printobject and writeobject didn't handle nested arrays.
	- restore didn't properly close the current file (if
appropriate), causing an invalidaccess error.
	- buildfont required the presence of a valid, 4-element
FontBBox.  (The Red Books say it's required, but Adobe interpreters
don't require it; some DEC software generates a 3-element FontBBox.)
	- resourceforall had several bugs; it didn't do even
approximately the right thing.  There were quite a few other problems
with the implementation of resources.
	- setfont, makefont, and scalefont would accept a font with
no FID entry.
*	- Loading a .PFB font left the file open (until the next
restore or quit).
	- The default (null) font didn't include a PaintType entry,
which some PostScript files expected.
*	- The ASCIIHexDecode filter sometimes thought the underlying
stream was at EOF even when there was (at most one buffer's worth of)
data left.
	- iscan.c included <ctype.h> before std.h, causing type name
clashes on some systems.
*	- save and restore didn't handle the pointers in the graphics
state correctly; for example, the current font wasn't restored
	- Binary object sequences at the top interpreter level didn't
get executed immediately.
	- On high-resolution devices, the default transfer function
converted almost-white grays to very light grays rather than white.
	- The `string' operator was checking the string length
against max_uint rather than max_ushort, which could cause invalid
lengths to be accepted.
*	- deviceinfo caused a stackunderflow error.
*	- idiv could give incorrect results for quotients or
remainders that didn't fit in 24 bits.
*	- The ASCII85Encode filter padded trailing bytes with 1's
rather than 0's.
*	- The ASCII85Decode filter had a typo that produced incorrect
results if there were exactly 2 trailing bytes.
	- findlibfile didn't push a copy of the file name if it was
the name of a special (%) file.
	- setduplexmode was not defined in statusdict, causing
/undefined errors from some poorly designed input files.
*	- The CCITTFaxDecode filter had several bugs in 2-D decoding.
*	- The ASCII85Decode filter didn't read ahead to detect EOD if
it fell precisely on a buffer boundary.
	- If a file mentioned on the command line redefined `start',
Ghostscript would run the new definition rather than the built-in one
after processing all the files on the command line.
	- The SCO ODT compiler couldn't handle the conditionals in the
ngetc (iscan.c) and sgetc* (stream.h) macros.
	- makefont and scalefont didn't cache the PostScript dictionaries
for scaled fonts.
	- Changing the elements of the Encoding of a font dynamically
didn't take effect if the character was already cached.
	- makefont and scalefont didn't add the (undocumented) OrigFont
and ScaleMatrix entries to the new font.
*	- findfont insisted that the font name be a string or a name.
	- filenameforall could cause an incorrect transfer of control
if no files matched the pattern.
*	- ISOLatin1Encoding had hyphen instead of minus at code 45.
	- restore didn't reset saved_cbot and saved_ctop correctly;
as a result, some freed blocks could get abandoned rather than put on
the free list.
	- Some numerical constants in zarith.c assumed that longs
occupied 32 bits.

Implements additional Level 2 features:
	- %device%file names (only the "os" device is provided).
	- <~ ~> for ASCII-85 strings.
	- Binary error messages.
	- BuildGlyph.
	- CCITTFaxDecode filter entries EndOfBlock, Rows, and
	(undocumented) FirstBitLowOrder.
	- {set/current}{color/colorspace/overprint/colorrendering/
	blackgeneration/undercolorremoval}.  (See below under library
	for limitations.)
	- Decode for the dictionary form of image.
	- File access modes a, r/w/a+.
	- Font entries CDevProc, Metrics2, and WMode.
	- Font operators cshow, findencoding, rootfont, and
	- glyphshow (emulated with PostScript code).
	- languagelevel.
	- realtime.
	- setbbox.
	- (Subset of) system and user parameters.
	- xshow, yshow, and xyshow.
	- XUIDs for fonts.

Moves the installation of systemdict and the initial allocation of
globaldict (if relevant) and userdict from to iinit.c.

Makes Level 2 features dynamically selectable through the
.setlanguagelevel operator; disables all Level 2 features
(specifically including automatic dictionary expansion) unless the
level2 feature is included and active.

Adds the .knownget operator for speeding up system procedures.

Renames the type1addpath operator as .type1addpath; adds an optional
left side bearing argument; changes it so it does not do the
setcachedevice, fill, or stroke, but does do a moveto for the
character width.  Changes Type1BuildChar appropriately.  (All this is
needed to make WMode work.)

Removes the .setmetrics operator, which is no longer needed.

* Changes the meaning of the user_errors argument to gs_run_file and
gs_run_string so that -1 means always return on an error, 0 means
only return on an error not within a `stopped'.

Adds all the necessary checks and operators for local/global VM, but
doesn't actually implement local/global mode.

Changes setcachedevice back so that it requires 4 numbers on the
stack rather than a 4-element array.  (It was changed to be the other
way in release 2.0, but that was because I didn't realize that fonts
had to have an executable FontBBox, and some of the Ghostscript fonts

Changes all the filter operators from .filterxxx to .filter_xxx, and
removes the need to enumerate them in

Adds .oserrno and .oserrorstring operators for getting the last OS
error (in the current context).

Changes gs_finit similarly to gp_exit.  Adds gs_exit_with_code that
takes both an exit status and a Ghostscript error code.

Changes the name of name.h to iname.h.

Adds support for the `interrupt' error (but doesn't provide any standard
way of generating one, other than through the gp_check_interrupts polling

Adds copyright to systemdict.

Changes the spot halftone screen to an elliptical screen supplied by
Berthold K. P. Horn.

Adds a check that the first token in is an integer.  In
conjunction with other code in, this should catch all attempts
to run Ghostscript with a that doesn't match the executable.

Changes all relevant occurrences of sizeof to size_of in order to
work with the buggy SVR4.2 C compiler.

Changes gp_exit so it is passed both the Ghostscript error code and
the exit status code as arguments.  This is backward-compatible for
all but the pickiest compilers.

Adds a call on gp_check_interrupts() after fwrite calls in the stream
machinery.  This prevents lengthy console output from locking out
other programs.

Changes a couple of occurrences of op_def_ptr in iinit.c to work around a
`const' bug in Sun's SC1.0 compiler.

Adds a special hack in the 'where' operator to work around a bug in Aldus
Freehand 2.x.

Changes all empty argument lists from () to (void), which is the ANSI
C syntax.

Adds a hack to ignore ^[ and ^D^[ tokens, to work around the prologue
and epilogue emitted by the MS Windows LaserJet IV driver.

Defines the processcolors operator, which should not be needed, but
is required because of bugs in Lotus 1-2-3 and Adobe PhotoShop.

Changes the allocator (ialloc) to fill all allocated and/or freed
blocks with a marker if gs_alloc_debug is set, as gs_malloc and
gs_free already do.


Fixes bugs:
	- 16-bit memory devices stored the bytes of each pixel in the
wrong order.
	- copy_mono did the wrong thing when copying 1 source chunk
to 2 destination chunks with polarity inverted.  (This probably
didn't affect any actual uses of Ghostscript.)
*	- The compile-time check for ints being 2 or 4 bytes used the
#error directive, which most compilers don't recognize.
	- arc and arcn didn't do the right thing for degenerate
(single-point) arcs, or for arcs drawn in the "wrong" direction that
were multiples of 360 degrees.
	- charpath did the wrong thing with Type 3 fonts.
	- copyscanlines gave an error if the buffer was too large.
	- The copy_mono procedure (used for text and halftones) for
2- and 4-bit-per-pixel memory and printer devices incorrectly
incremented the destination pointer after every pixel, instead of
only after every byte.
	- The fill_rectangle procedure (used for graphics) for 2- and
4-bit-per-pixel memory and printer devices, if given any color other
than all 0's or all 1's, multiplied the X coordinate and width by 2
or 4, thereby filling the wrong area.
	- The use of 'data' in both gs_type1_data and gs_font upset
the VMS compiler.
	- The `Flex' feature wasn't implemented for Type 1 fonts,
which caused serious errors in rendering some fonts that use it.
(Unfortunately, some Adobe fonts violate the specification, so we had
to implement Flex to always use a curve.)
*	- Stem width adjustment was too eager, producing very strange
effects on small characters with tight curves (a curve point could
get snapped to the other side of the open area).
	- The allocator didn't align structures adequately on
machines where sizeof(long) or sizeof(char *) was 8 bytes.
	- The test for IEEE floating point gave an incorrect
(negative) result on machines where sizeof(long) was 8 bytes.
	- genarch.c assumed that the result of subtracting two
pointers was an int, leading to a garbage arch.h file on systems
where this was false.
*	- The Type 1 font interpreter incorrectly reset the adjusted
path position to be the same as the unadjusted path position whenever
it returned control to the client (in particular, for callothersubr),
leading to discontinuities and distortions in the character shapes.
*	- Accented characters in Type 1 fonts often misplaced the
accent to the left.
	- gsmisc.c wouldn't compile on machines with 64-bit pointers,
because _pad was 0, and ANSI compilers don't accept 0-length arrays.
	- pathforall got confused if the client procedures modified
the path.
	- The command list file representation limited X and Y
coordinates to 15 bits.
*	- stroke could produce spikes or other garbage for mitered
joins as a result of stroke adjustment.
	- The params_size field of the null device was wrong, so
scaling the null device produced unpredictable results.

Changes monobit memory devices to always store data big-endian.  This
eliminates byte-swapping, at the cost of slightly slower rendering.

Removes the memswab* routines, since they are no longer needed.

Implements gs_cshow_[n_]init, which provides support for cshow, and
gs_xyshow_[n_]init, which provides support for {x,y,xy}show.

Adds an optional left side bearing argument to gs_type1_interpret.

Changes gs_type1_interpret so it does not do a setcachedevice, fill,
or stroke, but only appends the character outline to the path
(including a moveto for the character width.)

Removes gs_setmetrics, which is no longer needed.

Implements gs_setcachedevice2, which provides support for

Speeds up gsave/grestore by allocating, deallocating, and copying as
much as possible of the graphics state in a single operation.

Implements gs_{set/current}{color/colorspace/overprint/colorrendering/
blackgeneration/undercolorremoval}.  Device, indexed (with table, not
with procedure), CIE, and (substituted) separation colors are
supported; some of the setup code for patterns is also present.

Increases the size of temporary file names in gdevprn.h from 30
characters to 60.

Changes the character cache to be allocated dynamically in chunks.

Splits gxcache.c into gxccache.c (fast "hit" code) and gxccman.c (all
other code).

Changes all occurrences of sizeof to size_of in order to work with the
buggy SVR4.2 C compiler.

Adds a new concept of "external fonts", which allow a driver to
substitute its own fonts for the ones obtained through the normal
font machinery.

Changes all empty argument lists from () to (void), which is the ANSI
C syntax.

Version 2.5.2 (9/20/92)

This is yet another bug fix release to (finally!) get the PCL drivers working again.


Fixes bugs:
	- The comment in devs.mak for cdjcolor said it used 8 bits
per pixel, rather than the correct 24.

Adds gsbj/dj/lj/lp and to the installed files on Unix

Removes and from the standard configurations on
all platforms, since the presence of the setcolor operator was
causing the output of some common applications to fail.


Fixes bugs:
	- font2c produced invalid output for any font that didn't use
StandardEncoding or ISOLatin1Encoding.


Fixes bugs:
	- gp_sysv.c required an extern long timezone.


Fixes bugs:
	- The PCL drivers were *still* doing the wrong thing about
zeroing the seed row for Mode 3 compression.
	- Setting the resolution with -r didn't work under Windows.
	- The Windows driver got a stack overflow if it was ever
asked to display a bit image wider than 32 pixels.
	- The Tseng driver didn't sense the model (ET3000 vs. ET4000)

Adds the eps9high device to the standard MS-DOS makefiles.


Fixes bugs:
	- gs_run_string used gs_user_errors (a global) rather than
user_errors (its argument) to control error handling.  (This does not
affect normal operation of Ghostscript, only use as a server.)
	- eexec popped the top element of the dictionary stack
afterwards even if the encrypted code had pushed something onto it.
This caused problems for some badly written PostScript code.
	- The printed form of real numbers didn't always include a
decimal point, causing compatibility problems.

Makes -s and -d work for device properties.

Increases the cache limit on large-memory systems.

Adds a check to ensure that the revision of matches that
of the interpreter.

Adds the .knownget operator.


Fixes bugs:
	- The raster computation in clist_render_init, and the
computation of state_size in clist_open, didn't widen an operand to
long, leading to possibly incorrect operation for 24-bit-per-pixel
printers on MS-DOS systems.
	- The flatness was set too large for Type 1 characters,
leading to visible straight edges instead of curves at large sizes.
	- Type 1 fonts that contained out-of-range coordinates would
produce garbled output.  (This was not a problem with the standard
Ghostscript fonts, or with Adobe Type Manager fonts.)
	- gschar0.c wouldn't compile, because it referred to a
non-existing structure member penum->chr.  (This had no effect on
Ghostscript's operation.)
	- The curve flattener required line segments to be no more
than 8 x the flatness in length, leading to an enormous number of
	- pathforall would cause an addressing fault if the path
consisted of only a moveto.

Refactors some header files so that std.h is always included before
any system header file that might include sys/types.h.

Adds logic for removing top and bottom blank rows in cached
characters.  (This is the beginning of compression for the cache.)

Changes the arguments of memswab2/4 from char * to byte *, for more
accurate type conformance.

Version 2.5.1 (9/11/92)

This is the usual bug fix re-release.


Fixes bugs:
	- The makefile rules for compiled fonts had a circular
	- `make begin' didn't work properly on all platforms.

Ensures that all batch files end with a newline.  (The absence of the
newline was confusing the GNU diff program.)

Documents the fact that the -dASCIIOUT switch no longer exists.


Fixes bugs:
	- pstoppm didn't `bind' its internal procedures.
	- grestoreall would undo the output device selected by

Changes the utilities for reading and writing Type 1 character
outlines so they can work with stack representations as well as

Removes the,, and utilities from
the distribution.

Adds a gslj utility to parallel gslp and gsdj.


Adds the DeskJet 500C drivers (cdeskjet/cdj*) to the MS-DOS / Borland
C++, MS-DOS / Watcom C/386, and MS-Windows configurations.

Removes the PCX file driver from the MS Windows executable, because
the static data segment exceeded 64K.

Makes some changes in the Unix System V platform file (gp_sysv.c) and
in time_.h and unixtail.mak to accommodate the 3B1.


Fixes bugs:
	- The Charter-Italic font was named bchi.pfa rather than
	- The Cyrillic fonts (cyr.gsf, cyri.gsf) were omitted from
the fileset.
	- Ghostscript incorrectly assumed that all Type 1 fonts had a
FontInfo dictionary.
	- .loadfont used false PFBDecode, so a few .PFB fonts would
get errors because the first eexec byte would be whitespace.

Changes font2c and its supporting code so that compiled fonts are


Fixes bugs:
	- The margins for the H-P printers were still wrong.
	- The H-P drivers accidentally cleared the compression seed
row when switching compression modes.
	- Some of the H-P drivers used the wrong control codes for
skipping blank lines.

Adds user-supported drivers for the AT&T 3B1 console device, and for
the NEC P6+ printer.

Updates the SunView driver with a new version supplied by a(nother)

Changes the X Windows driver so the Ghostscript window doesn't get
input focus.

Changes the common code for the printer drivers so that if it can
allocate a full bitmap but there isn't at least a minimum amount of
memory left afterwards, it switches to banding.

Changes the Windows driver so it handles devices with more than 8
bits per pixel.  (We haven't been able to test this.)

Adds a read-only PageCount device property (for printer devices

Changes all Aladdin-supported drivers to clip drawing requests to the
((0,0), (width,height)) rectangle of device space.


Fixes bugs:
	- Closing a NullEncode filter always gave an ioerror.
	- If a single-character name occurred 1 character before the
end of an input buffer, the character would be doubled.
	- The procedures in didn't use "bind".
	- Setting the page size didn't work properly with devices
with rotated coordinate systems.
	- If an error occurred, and the error object wasn't the last
element of its procedure, the interpreter would re-execute the error
object after running the error handler.
	- Memory devices didn't get resized if HWSize was changed,
leading to out-of-bounds memory accesses.

Moves revision and revisiondate from to iinit.c.  Adds a
-v switch that just prints these out.

Arranges things so that if Ghostscript is reading from a pipe (`-'
switch on the command line) and encounters an error, it exits with
status 1 rather than 0.

Changes the interpreter interface so the caller explicitly passes a
pointer for storing an error object.


Fixes bugs:
	- The automatic adjustment of the scaling for variant paper
sizes caused the image to get expanded when it should have been
contracted, and vice versa.
	- The curve flattener insisted that each line segment be no
more than 2 x the flatness in length, leading to an enormous number
of segments even when not necessary for accuracy.
	- flattenpath and strokepath discarded a trailing moveto.
	- strokepath treated "0-width" lines as really having a width
of zero, rather than one pixel.
	- Buffered devices weren't closed and reopened if the amount
of buffer space was changed.
	- stroke used the line cap at the beginning of each subpath
even if the subpath was closed.

Removes the requirement that the clipping rectangle fall in the
non-negative quadrant of device space.  (This was causing problems
for Ghostview, but removing it required adding the extra clipping
step to the drawing routines in the drivers.)

Version 2.5 (8/18/92)

This version adds Type 1 hinting, CCITTFax encoding and decoding, and Microsoft Windows support, as well as the usual minor improvements and bug fixes.


Fixes bugs:
	- GSIMPATH, SLZWD, and SLZWE were omitted from the VMS
makefiles, and GSIM2OUT was not removed.
	- messed up the current path.

Adds new switches:
	-dSAFER disables file writing and directory modification.
	-dESTACKPRINT causes errors to print the execution stack with
== instead of =.
	-sOutputFile=<string> replaces -sOUTPUTFILE (which is still
recognized) for setting the output file or pipe for the default
(printer) device.
	-sPAPERSIZE=<sizename> initializes the paper size.
	-dBufferSpace=<number> sets the buffer size for the default
(printer) device.

For Unix systems, changes the directories in GS_LIB_DEFAULT from
`pwd` to $(gsdatadir), i.e., normally $(datadir)/ghostscript, where
datadir is normally /usr/local/lib.

Adds a note in the header file to the effect that the X Windows
driver expects to find header files in $(XINCLUDE)/X11, not in

Changes -q so it defines QUIET as true instead of null (so it can be
used in the middle of the command line as well as at the beginning).

Renames the history.doc file as NEWS.



Fixes bugs:
	- The stack size was not getting increased on the Watcom

Removes "b" from the scratch file opening modes in gp_unix.c and
(conditionally) in gdevprn.c, to pacify the DECstation Ultrix system.

Adds a makefile (bcwin.mak) and a platform file (gp_mswin.c) for
Microsoft Windows.

On MS-DOS platforms (including Windows), uses the TEMP environment
variable to designate the directory for scratch files.

Changes std.h so that the VMS C compiler uses function prototypes and

Changes the VMS cc makefile so it doesn't use ansi2knr.


Fixes bugs:
	- findfont left an extra entry on the stack if it couldn't
find the default font.

Renames bchi, ncri, and puti as bchri, ncrri, and putri, to conform
with the naming scheme for other fonts.

Adds $(CCFLAGS) to the command line used for compiling fonts.

Converts the .pfa fonts (CharterBT, IBM Courier, and Utopia) to .gsf,
by removing eexec encryption and also removing some mysterious
unmapped characters from Courier.  This makes these fonts work with

Changes the implementation of compiled fonts so they are read-only
and sharable (no external references).  (They are, however, not

Provides a way to use compiled fonts on platforms that limit the
number of characters in an identifier.

Adds public-domain Cyrillic and Cyrillic-Italic fonts.

Adds a 'userdict begin' to .loadfont, because Type 3 fonts produced
by Fontographer expect a writable dictionary on the top of the stack.

Changes definefont for Type 1 fonts to insert UnderlinePosition and
UnderlineThickness entries in FontInfo if they are absent, because
many word processors incorrectly assume these entries are present.


Fixes bugs:
	- The documentation in use.doc said that the densities for
9-pin Epson printers were 60x60 to 240x60, rather than 60x72 to
	- gdevprn.c smashed one byte beyond the end of the string
given as the OutputFile device property.
	- The X11 driver used XVisualIDFromVisual, which is not
defined in X11R3.
	- The SunView driver modified the input data, which was
declared as const.
	- The LaserJet IIP and III drivers shifted the page 185
pixels to the left and 0.25" down, because the initialization string
was incorrect.
	- The PCX driver wrote 16-bit values using the byte ordering
of the platform, rather than always LSB first.
	- For vertical spacing, the LaserJet and DeskJet drivers used
a command that spaces N/300", rather than N scan lines, but gave it a
parameter in scan lines.
	- The VESA driver didn't allocate a full 256-byte buffer for
reading the mode information from the BIOS, causing the stack to get
smashed by newer VESA implementations.
	- The VESA driver didn't use the scan line length returned by
the BIOS, causing garbage output for some cards and some resolutions.
	- The generic printer driver didn't free the bitmap when
closing the device, if it fit entirely in memory.
	- The PaintJet driver allocated its data areas on the stack
instead of with gs_malloc.
	- The generic printer driver didn't attempt to increase the
buffer size if it was too small.
	- The band list driver didn't split large bitmaps properly,
leading to garbled characters at high resolutions.
	- The GIF and PCX drivers used a color map that often turned
gray colors into non-grays.

Changes the default put_props procedure so that if the device is
open, setting HWSize and/or HWResolution closes the device and
reopens it.

Adds a driver for Microsoft Windows 3.n.

Updates the 'cdj' and 'dj500c' DeskJet 500C drivers with new versions.
(This are user-contributed drivers.)

Changes gdev_prn_put_props so OutputFile can be changed dynamically.

Updates the DEC LN03 driver to also handle the LA50 and LA75.  (This
is a user-contributed driver with a FSF copyright.)

Changes the LaserJet/DeskJet driver so that -DA4 in the makefile
makes A4 paper the default.  The driver now also sends an appropriate
page size selection command to the printer if the printer supports it.

Changes all the Aladdin-supported drivers to return appropriate error
codes rather than -1.

Adds a driver for the S3 86C911, a PC graphics accelerator used in
the popular Diamond Stealth board.  This is the first driver that
uploads character bitmaps to a device; others will probably follow.

Adds user-supplied code to the Epson driver so it will do triple
passes on 9-pin printers for higher resolution.

Adds user-supplied code for the PaintJet XL to the PaintJet driver.


Fixes bugs:
	- zdps1.c didn't include alloc.h.
	- On 32-bit systems, if maxlength of a dictionary was less
than the actual allocated space, length could become larger than
	- flushfile didn't actually flush data when reading.
	- The ASCII85Decode filter signalled EOF prematurely.
	- The scanner interpreted .3D.glorp as the number 0.3, rather
than as a name.
	- Closing a file freed the stream structure, creating
dangling references if there were other file objects pointing to the
same stream.
	- eexec called handleerror if an error occurred, instead of
letting the error propagate to an enclosing stopped.
	- gs.h made perror illegal, instead of defining it in terms
of strerror.
	- One-character names weren't being allocated at
initialization, so they could be left dangling after a restore.
	- Internal gsaves (i.e., the ones in show and setcachedevice)
didn't also save istate, so setfont inside a BuildChar procedure
might cause the font outside to get changed.
	- The allocator incorrectly freed objects in the current
chunk that were older than the current save.
	- mark was just an object, rather than an operator, so 'bind'
didn't bind it.  (This is theoretically a problem for null, true, and
false also, but even more unlikely to be a problem in practice.)
	- packed_get didn't cast packed integers to int, so negative
integer elements of packed arrays came out wrong.
	- quit just did a gs_exit, instead of returning to the driver
in an orderly way.
	- Because check_type_access checked for errors in the wrong
order, sometimes type errors were reported as access errors.
	- eq didn't check for stack underflow.
	- Some of the stream_procs structures weren't properly
declared const, leading to link errors on VMS.

Implements currentcolor, currentcolorspace, setcolor, and
setcolorspace (for DeviceGray, DeviceRGB, and DeviceCMYK only).

Implements the dictionary form of image and imagemask.  All the pairs
in the Decode array must be the same; Interpolate is ignored.  The
only supported color spaces are DeviceGray, DeviceRGB, and

Implements files as allowable sources for the image operators.

Removes the index field from the name structure, moving it to the
'size' field of name refs.

Changes the unread/sungetc operation to require that the character be
the same as the last one read from the file.

Adds fflush calls to some debugging printout routines, because Unix
sometimes buffers terminal output.

Implements the CCITTFaxEncode and CCITTFaxDecode filters.  Implements
the general case of the SubFileDecode filter.

Changes definefont to treat a UniqueID of 0 as equivalent to no
UniqueID, because Fontographer output apparently often violates the
specification in this way.

Changes the default printer screen from 32.5 to 46 cells/inch.  (The
old value was appropriate for a hand-rotated cell with two spots in

Changes the utility routines to allow an integral real wherever an
integer parameter is expected in a dictionary, because Fontographer
produces fonts that violate the Adobe specification in this way.

Adds a `dosio' feature that provides direct access to memory and to
I/O ports under MS-DOS.  (This feature is not included in the
standard executables, of course.)

Changes the default character cache limit to a 1/4" x 1/4" character
at the default resolution, rather than basing it on the preallocated
cache size.

Removes support for t_color objects, which haven't actually been used
for several releases.

Implements setcmykcolor and currentcmykcolor as operators, so they
will interact properly with setcolorspace and currentcolorspace.

Changes the name of the file.h header file to files.h, to work around
a bug in the VMS header library.

Adds command line switches @file (to treat file as more command line,
to get around the DOS 128-character command line limit) and -ffile
(so one can specify file names that begin with - or @).

Changes the PFBDecode filter so it takes an additional boolean that
says whether or not to convert binary packets to hex.  (Conversion to
hex and back to binary accounted for a substantial amount of the time
required to load .PFB fonts.)

Splits off `copydevice' as a separate operator again.


Fixes bugs:
	- In the VMS environment, string_.h used its own prototypes
for the str... and mem... functions instead of <string.h>
	- gx_alloc_char_bits declared cdsize as long, but didn't
shorten it when passing it to shorten_cached_char.
	- Stroking didn't suppress fattening of the lines.
	- kshow didn't update the cached CTM information in the show
enumerator when returning from the callout, so further characters
could get drawn in the wrong place.
	- When a memory device returned its initial matrix, it
smashed the padding fields, which contained the interpreter's type
	- setcachedevice didn't set the initial matrix in the cache
memory device.
	- image_set_rgb (in the image operators) didn't do a
gx_color_from_rgb, so in principle one could sometimes get incorrect
colors in an image.
	- The decision about whether or not to cache a character
bitmap incorrectly compared the character size against cmax rather
than cdata_size.
	- show didn't reset the in_cachedevice flag in the graphics
state, so characters rendered by a recursive show were never cached.
	- clip and eoclip didn't release the intermediate flattened
clip path, causing memory to be lost.
	- The tile_diff routine didn't handle the case of two
identical tiles properly; this produced garbage in the band list
	- stringwidth didn't round the character origin to an
integral pixel; this interacted badly with hinting, causing
improperly hinted characters to wind up in the cache.
	- Bitmaps (including characters) were displaced, as well as
being clipped, if they intersected the top of a clipping region.
	- In gxclist and gdevmem1, the raster computation (although
not the result) could overflow an int on 16-bit machines.

Implements decoding (sample mapping) for image and imagemask.

Implements hinting for Type 1 fonts, based on (but not copying) the
algorithms from the X11R5 tape.

Changes curve rasterizing to use sampling, rather than recursive
subdivision, for characters.  This produces noticeably better output.
Speed penalty for non-cached characters is less than 10% at display
resolutions, up to 50% for 300 dpi printers.

Implements gs_setcmykcolor and gs_currentcmykcolor.  These are
semi-fake, since they simply convert the color to and from RGB, but
the former does set the current color space properly.

Changes clipping regions so they use the any-part-of-pixel rule
rather than the center-of-pixel rule.  This helps avoid dropouts when
using very small regions.

Implements stroke adjustment.

Version 2.4.2 (5/8/92)

This is another quick release. It finally fixes rotated halftone screens, and cleans up a few minor problems from 2.4.1.

This release is being distributed only to beta testers and commercial licensees, since I don't want to be distracted from working on 2.5.


Fixes bugs:
	- UTRACE still appeared in the VMS makefiles.
	- The support files (*.bat, *.doc, *.gsf, *.ps, Fontmap,
COPYING, README) weren't included in the MS-DOS tar file.
	- The Unix install script didn't install

Replaces the type1imagepath operator with PostScript code (, based on the new .imagepath operator.



Fixes bugs:
	- had an occurrence of Subrs rather than /Subrs,
causing it to not print the Subrs, or to get an error if there were
	- didn't get the const declarations for string
dictionaries quite right.
	- The missing newline at the end of gsbj.bat confused GNU
	- ansi2knr would go into an infinite loop if a statement
exceeded its internal buffer size.
	- Compiled fonts would get processed by ansi2knr, which
messed them up.


Fixes bugs:
	- Ghostscript didn't supply equivalents for rename and
gettimeofday, which some System V platforms lack.
	- The missing newline at the end of gp_dosfb.c confused GNU

Changes the Borland makefiles so that stack checking is only enabled
if DEBUG or TDEBUG is set.


Changes the names of the Utopia fonts from utrg/utb/utbi/uti to
putr/putb/putbi/puti, for consistency with the rest of the font names.
Changes cour/courb/courbi/couri to ncrr/ncrb/ncrbi/ncri likewise.

Replaces the Charter fonts with the CharterBT fonts donated by
Bitstream to the X11R5 distribution.

Adds font aliasing capability to Fontmap.  Replaces
Courier-[Bold]Oblique and ZapfChancery-MediumItalic by aliases.

Changes the FontBBox of the Hershey fonts to be an executable, rather
than a literal, array.


Fixes bugs:
	- The GIF driver omitted a `private' on the definition of
	- The GIF driver wrote 16-bit values using the byte ordering
of the platform, rather than always LSB first.
	- George Cameron's DeskJet 500C driver had an incorrect
control sequence for skipping blank lines.

Adds 'const' in many places, including the tile and bitmap arguments
of the tile_rectangle, copy_mono, and copy_color driver routines.
THIS IS A DRIVER INTERFACE CHANGE.  (Printer drivers are not
affected, since they don't implement these routines.)

Adds a driver for the Trident TVGA.


Fixes bugs:
	- alloc_free sometimes incorrectly chose to put an unaligned
block in an old segment on a freelist.
	- The default undercolor removal function returned its
argument rather than returning 0.

Adds NullEncode and SubFileDecode to the standard filters, since
bdftops uses the latter.

Adds RunLengthEncode and RunLengthDecode to the optional filters.

Removes the type1imagepath operator.  (It is still available as
PostScript code,  Replaces it with a simpler outline
tracing operator .imagepath.

Adds 'const' in many places.

Makes fileposition (but not setfileposition) legal for NullEncode

Changes the default transfer function for high-resolution devices
from the identity function to the square root function.

Moves array_get from zgeneric.c to iutil.c.

Changes uses of fopen to add a "b" to the access mode, rather than
relying on the _fmode global variable on MS-DOS platforms.

Allows use of the -Z switch even when gsmain.c wasn't compiled with
-DDEBUG, since other modules might have been.

Reorganizes gs.c and gsmain.c so that the latter can be used in
server environments.

Replaces all uses of stdin/out/err with gs_stdin/out/err.

Makes the number of permanent entries on the dictionary stack a
parameter, to allow inserting globaldict in the future.

Changes BlueShift in the Type 1 font Private dictionary to allow real
numbers.  (This differs from the Adobe specification, but at least
one commercial font has a real number for BlueShift.)


Fixes bugs:
	- The doubling check in init_ht (gxht.c) still sometimes
thought there was enough room to double the tile when there actually
	- Rotated halftone screens didn't work.
	- gxarith.h used #ifdef vax, rather than #if
!arch_floats_are_IEEE, to test whether IEEE floats were being used.
	- pathforall didn't report a trailing moveto.

Replaces gs_type1imagepath with gs_imagepath.

Allows sOUTPUTFILE=-, meaning output to stdout.

Adds 'const' in many places.

Replaces all uses of stdin/out/err with gs_stdin/out/err.

Version 2.4.1 (4/21/92)

This is a quick release to fix minor problems discovered in 2.4, and to add a few improvements that didn't quite make it into 2.4. It also adds GIF and PCX file support.


Fixes bugs:
	- Some makefile dependencies, and the ccgs script, caused trouble
for parallel versions of `make'.
	- Compiling genarch with -O with gcc on the RS/6000 produced a
buggy executable.

Fixes some minor problems in make.doc.

Adds DEVICE_DEVS2..5 to handle long device lists.

Removes the need to set GS_RUN_EXE when using the Watcom compiler on
MS-DOS systems.

Gets rid of, merging its function into

Gets rid of; this information is now compiled in gconfig.c.


Fixes bugs:
	- The palette for pstoppm in 8-bit mode didn't contain all 8
primary colors.
	- font2c used just values_ to mean &values_[0]; some compilers
couldn't handle this.

Makes font2c insert `const' in many appropriate places.


Fixes bugs:
	- The SunView driver had not been updated properly for 2.4 and was
pretty thoroughly broken.
	- None of the printer drivers worked properly with the Watcom
compiler, because stdprn was doing \n -> \r\n substitution.
	- If the generic printer driver couldn't allocate the requested
size command list buffer, it gave up rather than trying to allocate a
smaller buffer.
	- The SuperVGA drivers (except for the VESA driver) didn't
work with the Watcom compiler, because a couple of places in the
drivers weren't truncating the offset of "segmented" pointers
	- Some of the H-P used <esc>*b#Y rather than <esc>*p+#Y for
vertical positioning; this apparently is wrong, at least for the

Removes the dependence of the X Windows driver on Xt, Xext, and Xmu.  As a
result, Ghostscript will not install a standard colormap itself, but it
will use one if one is already installed.

Adds a set of drivers for Portable Bitmap, Graymap, and Pixmap file

Adds drivers for monochrome, EGA/VGA-style, and SuperVGA-style PCX
file formats.

Adds drivers for monochrome and 256-color GIF file formats.


Adds ZapfChancery-MediumItalic as a copy of ZapfChancery-Oblique.


Fixes bugs:
	- A value with l_new set could 'escape' to save level 0 on a
stack; if stored, it prevented the slot from being saved and restored
	- 16#7fffffff + 1 gave the floating point equivalent of -2^31, not
	- The PFBDecode filter computed the packet length incorrectly if
the 0x8000-bit of the length was set.
	- 5-byte numbers in Type 1 CharStrings complained of a rangecheck
if they exceeded 16 bits, rather than if they exceeded the integer part of
a fixed.
	- (, ), and \ appearing in file name arguments in the command
line did not work properly.

Adds 'const' in many places.

Changes the random number generator to be the same as the one used in
Level 2 PostScript (as reported by Ed Taft on comp.lang.postscript).

Exits with code 1 rather than code 0 on an unrecoverable error detected at
the PostScript level.

Makes dictionaries expand automatically when they fill up.

Adds gp_exit to complement gp_init.

Changes dictionaries to always allocate a power of 2 entries on
32-bit machines.  Changes the name table to allocate indices
scattered, so dictionary lookup doesn't have to do a multiply to
scramble the index.

Changes the handling of currentfile to do "shallow binding" so stack
searching is almost never required.


Fixes bugs:
	- arc and arcn got a numeric exception if the radius was zero.
	- The undocumented 15 opcode in Type 1 fonts wasn't ignored.
	- PaintType 3 wasn't allowed.  (It isn't clear what it should
mean; we treat it as equivalent to 0.)
	- The VAX/VMS C compiler was generating incorrect code for the
chi_bits and cmask macros in gdevmem, producing incorrect output.
	- If the result of the slow algorithm for intersecting clipping
paths was a rectangle, the wrong thing happened (cbox didn't get set).
	- gx_path_is_rectangle didn't recognize open rectangles.
	- clist_change_tile didn't check properly whether the tile
size had changed, so changing the screen could produce invalid band
	- The image operators did the wrong thing in the 1-for-1
case, interleaving N bytes of data with 7*N bytes of garbage.
	- stroke sometimes handled bevel and miter joins wrong in
reflected coordinate systems.
	- init_ht checked incorrectly whether there was enough room
to Y-replicate tiles, so sometimes it did it when it shouldn't have.
	- stroke sometimes thought lines were thin when they weren't.

Adds 'const' in many places.

Adds support for 2- and 4-bit-per-pixel memory devices.

Version 2.4 (3/25/92)

This is a major release that adds SuperVGA support, support for Metrics, settable device properties, and incremental font loading. It also includes important performance improvements, based on rewrites of some key algorithms, and quite a few new Level 2 / Display PostScript facilities.


Fixes bugs:
	- The rule for compiling gconfig.c didn't include the -I switches.
	- .bat files were being distributed with a \n line terminator
rather than \r\n.
	- A CLOSE MODULE_LIST was needed after END_COMPILE: in the VMS
command files.
	- Unix systems couldn't handle multiple drivers with overlapping
sets of files.
	- -s<name> defined <name> as a null, rather than as an empty string.

Adds to the list of needed configuration files.

Changes the way that the makefile handles nested .h files, so that it
doesn't have to `touch' them.

Adds the loadallfonts procedure to

Changes the standard DOS configuration to include VGA, EGA, VESA, Epson,
BubbleJet, and H-P printer drivers.

Renames ghost.mak as gs.mak, and gdevs.mak as devs.mak.

Adds a USE_ASM flag so that one can build a DOS version of Ghostscript
without having an assembler.

Splits off common code from the two MS-DOS makefiles into tccommon.mak.

Replaces the COPYING and LICENSE files with a new LICENSE file containing
version 2 of the GNU General Public License.

Removes DEVICES and DEVICE_OBJS from the makefiles, since they are no
longer needed.

Adds a GS_DEVICE environment variable to supply a default device name if

Adds ansihead.mak and unix-ansi.mak, to parallel [g]cc-head.mak and
unix-[g]cc.mak, for other ANSI C compilers.

Changes the way that optional features are defined in the makefiles, so
that they actually work.

Adds support for the Watcom C/386 compiler.

Allows # in the command line as equivalent to =, to compensate for
brain-damaged MS-DOS shell.

Adds -sOUTPUTFILE= to set the output file or pipe.

Adds -dWRITESYSTEMDICT to leave systemdict writable.


Fixes bugs:
	- insisted on having Subrs be present in the font.
	- decoded negative numbers between -108 and -1131
	- didn't handle packets longer than 64K correctly.

Changes the bdftops utility so that it makes entries for UnderlinePosition
and UnderlineThickness in FontInfo, and so that it always records a
FullName (the FontName if no other is provided).

Changes the name of the pfbtops utility to pfbtogs, because groff already
includes a program called pfbtops.

Adds the gslp utility for doing "line printing" of text files, similar to
enscript + lpr.

Adds a new variable DITHERPPI that enables a different dither pattern,
claimed to be better for printers.

Adds the font2c utility for compiling Type 1 fonts into C, so they can be
linked into an executable rather than loaded dynamically.


Fixes bugs:
	- gdev_prn_copy_scan_lines was erroneously masking the last byte
of data even on color printers, as was paintjet_print_page.
	- The TruFax driver had a couple of compilation errors, since it
hadn't been compiled in a while.
	- The BGI driver sometimes didn't consult BGIPATH when looking for
.BGI files.
	- initclip did the wrong thing with memory devices.
	- The BGI driver didn't look in BGIDIR for .BGI files.
	- The Epson driver didn't set the right margin properly with
	- The BJ-10e driver was badly broken.
	- gdev_prn_open/close_printer didn't reset the command list file,
so it was taking quadratic time to print multi-page documents.

Adds color to the SunView driver.

Adds selectable resolution (75, 100, 150, or 300 DPI) to the
DeskJet/LaserJet driver.

Changes gssetdev so that drivers can specify special libraries to be
loaded, as well as object files.

Adds a driver for VESA-compliant SuperVGA displays.  This driver handles
all resolutions from 640 x 400 up to 1280 x 1024, in 256-color mode.  The
default is VGA resolution (640 x 480).

Adds a driver for the ATI Wonder SuperVGA card, and for SuperVGA cards
using the Tseng Labs ET3000 or ET4000 chip such as the STB VGA EM-16 and
the Orchid ProDesigner II (256-color modes only).

Adds a driver for Trident and Tseng Labs SuperVGA cards in 800 x 600,
16-color modes (for cards with only 256K of memory).

Adds user-contributed drivers for the Ricoh 4081, DEC LN03, Canon LBP-8II,
and H-P DeskJet 500C printers.

Adds Tim Theisen's Ghostview changes to the X11 driver.


	- Changes map_rgb_color and map_color_rgb to always work in a
	    16-bit color value space, rather than a space defined by the
	    maximum number of distinct colors provided by the device.

	- Adds an argument to the output_page procedure to indicate
	    whether the procedure is being called for copypage or
	    showpage, and a num_copies argument.

	- Adds a gx_bitmap_id to the copy_ and tile_ procedures, so that
	    drivers can cache bitmaps in the server or device if they want

	- Removes fill_trapezoid and tile_trapezoid.

	- Adds a new get_bits procedure for reading the bits back from the
	    driver buffer (when possible), replacing copy_scan_lines.
	    This procedure takes a new argument describing padding and
	    byte swapping, and returns a different value from

	- Adds get_props and put_props procedures for accessing arbitrary
	    additional properties of devices.  The interface is quite
	    complex, but provides a great deal of flexibility.

See drivers.doc for details.

Changes gdev_mem_bytes_per_scan_line to gdev_prn_bytes_per_scan_line.

Adds a user-contributed driver for DigiBoard, Inc.'s fax software.


Changes Type1BuildChar so it uses the information from the Metrics
dictionary in the font, if Metrics is present.

Changes findfont (.loadfont) so it recognizes .PFB fonts and can load them
directly.  Also changes .loadfont to disable packing temporarily, because
some fonts rely on procedures being writable (!).


Fixes bugs:
	- The hypot function is not available on some Unix systems.
	- Ghostscript didn't flush and close files when exiting.
	- In statusdict, the /margins procedure used .leftmargin, but
/setmargins used .lmargin.
	- An out-of-range putinterval would simply do nothing, rather than
reporting an error.
	- If an attempt to allocate a block larger than the allocator's
chunk size (20K) failed, the allocator would erroneously think it had
	- The bind operator made the top-level procedure read-only, as
well as interior procedures.
	- gs.c copied 1 extra character for the value of strings defined
on the command line with -s...=, which could smash the first byte of the
next object in memory.
	- copying a dictionary erroneously required the maxlength of the
destination to be greater than or equal to the maxlength of the source,
rather than the length of the source.
	- undef didn't correctly decide when to mark a deleted entry as
deleted vs. free; as a result, some keys couldn't be looked up properly
after an undef.
	- type1encrypt and type1decrypt didn't set the size of the result
	- cvi and cvr didn't allow leading or trailing whitespace in
	- cvs didn't cause an error if the destination string was too
	- Many operators didn't check correctly for stack underflow (off
by 1).
	- `for' used reals, rather than integers, if the limit was a real,
even if the initial value and increment were integers.
	- `restore' didn't properly invalidate copies of the save object
being restored from; `save dup restore restore' would crash.
	- `restore' sometimes didn't undo stores into matrices that were
stored into by operators.  (The identity matrix always had l_new set.)
	- readline gave a rangecheck if the input line exactly filled the
	- `--' as the last switch on the command line caused a crash
rather than an error message.
	- On MS-DOS systems, filenameforall didn't handle patterns with a
drive or directory specifier properly.
	- stroke sometimes called gz_draw_line_fixed even if the line went
outside the clipping box by 1 pixel.

Changes the loop that binds procedure "operators" to entirely disable the
handling of the typecheck error, rather than to use stopped.  This cuts
initialization time significantly, and also eliminates about 35K of wasted
space (for saving the stacks).

Changes the version "operator" so it returns 47.0.  Adds "revision" to
define the Ghostscript version # x 100.

Adds gscurrentresolution and gssetresolution procedures for getting and
setting the device resolution.

Adds -r<res> and -r<xres>x<yres> as command line options for setting
device resolution.

Adds a facility for incrementally loading the individual CharStrings of a
Ghostscript font from the disk.  This can save a lot of memory, at the
expense of slower rendering.  (It is intended primarily for MS-DOS

Changes findlibfile to return the name of the file that was actually
opened, as well as the file itself, when the operation succeeds.

Changes the name of the main entry to the interpreter from interpret to
gs_interpret, because of a conflict with a Data General library procedure.

Adds the .setmetrics operator to set the metrics for the current
character for Type 1 fonts.

Adds more LaserWriter-specific entries to statusdict.

Gives names to all the internal `operators', so they will print out
reasonably when an error occurs.

Extends the status operator to accept a string and return file
information, as defined for Level 2 PostScript.

Adds the filter operator and some specific filters: ASCII85Encode,
ASCII85Decode, ASCIIHexEncode, ASCIIHexDecode, eexecDecode, NullEncode,
PFBDecode, and the null case of SubFileDecode.

Extends the scanner to recognize the Level 2 << and >> tokens.

Adds a facility for extracting the text strings from a PostScript file and
writing them out in a simple format (selected by -dASCIIOUT, implemented

Implements all of the remaining Display PostScript facilities that are
also in Level 2 (i.e., everything in section A.1.3 of the PostScript
Language Reference Manual, Second Edition, that is not also in section
A.1.2).  The virtual memory operations are all stubs; the new halftone
options are not fully implemented.

Changes makeimagedevice to use a string of gray or RGB values, rather than
an array of color objects, to specify the palette.  Removes
currentgscolor and setgscolor from the interpreter, but leaves t_color
objects in, since they may be useful later.

Adds getdeviceprops and putdeviceprops for manipulating device properties.
Currently defined properties for all devices: InitialMatrix, HWResolution,
HWSize, Name.  Currently defined properties for printers: BufferSpace,
MaxBitmap, OutputFile.  OutputFile allows |command for piping on Unix

Removes deviceparams and makedevice.  Adds devicedefaultmatrix.

Implements reversepath.

Makes copy work on devices.

MS-DOS specific
- - - - - - - -

Fixes bugs:
	- iutilasm.asm wouldn't assemble with newer versions of MASM if
CPU_TYPE was set to 286 or above.
	- CPU_TYPE=386 didn't properly substitute the faster
multiply/divide routines under Turbo C++ or Borland C++, only under the
original Turbo C.


Fixes bugs:
	- A curve whose first and last points were the same wouldn't get
drawn at all.
	- A bug in the Turbo C++ compiler generated bad code when shifting
a long right by 1 bit.
	- If stroking a dashed line ever encountered a segment that was
completely blank, Ghostscript would indirect through a null pointer.
	- arc and arcn gave an error if the radius was negative.
	- stroke always used the general algorithm, even if the line was
guaranteed to be thin.
	- arc and arcn erroneously reduced the angles mod 360.
	- Very large or negative 32-bit numbers in Type 1 fonts didn't
work properly on MS-DOS systems (the ff0000 bits got set to zero).
	- Color printer devices rendering entirely in memory only
allocated a monochrome-sized bitmap.
	- clip and eoclip didn't intersect the paths properly in the
general case.
	- charpath erroneously rounded the current point to an integral
value, causing characters to be spaced improperly.
	- The definition of max_color_param got some compilers confused.
	- charpath always used quadratic time and space, and dropped all
but the last character when used with a Type 3 font.
	- Stroking a path with a 180 degree angle would incorrectly miter
instead of beveling.
	- Type 1 fonts used the current flatness for curves, which could
produce bad (and inconsistent) results.
	- Stroking a degenerate line segment produced incorrect results.

Changes the character cache to use the UniqueID as the key, when
available, instead of the font pointer.  This dramatically improves
performance when fonts are getting removed and reloaded because of page
isolation with save/restore.

Removes some unnecessary casts to (float) from gsmatrix.c and gscoord.c.

Changes the Type 1 interpreter so that it rounds line and curve endpoints
to the center of the nearest half-pixel, and omits null line segments.
This both speeds up rendering at small sizes and improves output quality.

Changes gs_deviceparams to return resolution as well as extent; changes
gs_makedevice to accept resolution as well as extent.

Replaces the algorithm for approximating circular arcs with curves with a
more accurate one.

Changes gs_point and gs_rect to use doubles rather than floats.

Adds gs_setmetrics, for overriding Type 1 font metrics for the current

Changes clipping to use lists of rectangles rather than path intersection.
 This makes a big difference when clipping bitmaps (including characters).

Changes the character cache to discard entries incrementally, rather than
clearing the entire cache when it fills up.

Changes the implementation of transfer functions to use a cached map,
built when the transfer function is set.  This makes transfer functions
work properly in all situations, including images.

Defines a .quit operator that takes an exit code, and redefines quit in
terms of it.

Adds support for 16-bit-per-pixel devices in gdevmem.

Adds gs_copydevice and gs_deviceinitialmatrix; removes gs_deviceparams and

Changes setscreen to ensure that the cell is always at least 4x4 pixels in

Version 2.3 (8/28/91)

This is a minor release to fix two bugs and add the PaintJet driver, which didn't make it into 2.2.


Changes the pstoppm utility so it counts pages correctly even in the
presence of arbitrary saves and restores.


Adds a new, "supported" PaintJet driver.

Changes the Epson driver to use ESC+D rather than ESC+\ for horizontal
positioning, since many printers don't support the latter.

Adds horizontal double-density (two-pass) printing to the Epson driver, so
it can do 240 x 60 and 360 x 180 densities.  (Vertical double density is
not supported yet.)

Version 2.2 (6/1/91)

The purpose of this release is to add save/restore, and a few miscellaneous Level 2 P*stScr*pt features such as undef. It also includes major improvements in graphics quality and in handling of high-resolution printers.


Changes the version numbering to M.mpp rather than M.m.p, so that
`version' can be a real number for those programs that insist on it.

Renames as, as, and
as  The initialization files now all are named gs_*.ps.

Renames gdevs.{c,h,tl} as gconfig.{c,h,tl}.

Changes the relevant makefiles and command files so that a single build
can contain several drivers that share code, e.g., the Epson driver and
the DeskJet driver.

Changes so it relies on an external file rather than
making a specific test for the presence of Level 2 features.

Adds an entry for uglyr.gsf to the makefile.

Removes the distinction between CCA and CCNA, since most of the files now
contain constructs that require non-ANSI compilation on MS-DOS platforms.

Adds a `man' page for the ansi2knr utility.

Changes the documentation (use.doc) to show how to use -sDEVICE=<device>,
or the selectdevice procedure, to select devices by name.

Adds DEVICE_DEVS to the makefiles (analogous to DEVICES and DEVICE_OBJS).
This finally makes the make procedure fully automatic.

Adds the name of the initialization file ( as a
platform-specific makefile parameter, GS_INIT.

Removes the test program gt.{c,tr} from the fileset, since it is not
useful to users.

Moves the Symbol encoding vector to a separate file (, from
which it is loaded when first used.

Changes the error handler so it can handle errors that occur while reading
the initialization files.

Extends ansi2knr so it can handle `void' and `...' in parameter lists.

Adds to the set of installed files.

MS-DOS-specific changes
- - - - - - - - - - - -

Adds the VGA and BGI drivers to the standard MS-DOS configuration, and
makes VGA the default.

Adds a `+' and a newline at the end of, to avoid problems with file
transfer programs or editors that add a newline at the end of files.

Changes the name of msdos.mak to turboc.mak, and creates a new tbcplus.mak
makefile for use with Turbo C++ and Borland C++.

Changes the extension of the loader response files from .tl to .tr.

Changes the default search path from c:/ghost and c:/ghost/fonts to c:/gs
and c:/gs/fonts.

Changes the directory separator from `|' back to ';', since it appears
that DOS can handle a ; in a command line if it is prefixed with \.

Unix-specific changes
- - - - - - - - - - -

Changes the uses of install in unixtail.mak so they only install a single
file at a time, which is all that the standard Unix install allows.

Removes the duplicate files (README/readme, LICENSE/license,
COPYING/copying, Fontmap/fontmap).

Changes the ld flags from LDPLAT to LDFLAGS.

Adds XCFLAGS and XLDFLAGS.  These are concatenated with CFLAGS and LDFLAGS
respectively.  The intention is that they be set from the `make' command
line if desired.

VMS-specific changes
- - - - - - - - - -

Repairs the omission of ZPACKED from the VMS build lists.


Fixes bugs:
	- The SunView driver produced semi-garbage on little-endian
platforms (Sun-386i) because it didn't swap the bit order.
	- The X driver would dump core if it couldn't open the display and
the DISPLAY environment variable wasn't set.
	- The X driver relied on white = 0, black = ones in a couple of
	- The X driver would return an error, instead of clipping, if
asked to display outside the window.
	- The X driver would create inappropriately sized windows, because
it believed the server's report of the screen resolution.

Adds Fran Taylor's Private Eye driver to gdevs.mak and the fileset (not
supported by Aladdin Enterprises).

Adds Neil Ostroff's TruFax driver to gdevs.mak and the fileset (not
supported by Aladdin Enterprises).

Makes the scratch file template for the printer drivers a per-platform
quantity (gp_scratch_file_name_template).  Puts the default scratch files
for Unix in /usr/tmp rather than /tmp.

Changes the SunView driver to prevent the Ghostscript window from being
destroyed (which badly confuses the interpreter).

Extends the Epson driver to handle a variety of print densities in both X
and Y, to handle 24-pin as well as 8-pin graphics, and to allow optional
specification of default density in the makefile (gdevs.mak).

Refactors the printer drivers so that a single driver handles both DeskJet
and LaserJet.  Adds LaserJet drivers that use the new compression modes on
the LJ IId/IIp and LJ III.

Changes all the printer drivers to use band lists rather than bitmap
paging as the buffering method.  (The individual drivers need only a
one-line change to replace mem_copy_scan_lines with
gdev_prn_copy_scan_lines with a different argument.)

Adds the halftone phase as additional arguments to tile_rectangle and

Adds an entirely new and much simpler PaintJet driver, using the new band
list interface.

Adds margin information to the device structure.  This is currently only
relevant for printer devices.

Adds BGIPATH and BGIUSER environment variables, allowing additional
control of the BGI driver.

Changes the x/y_pixels_per_inch member of the device structure from int to


Patches so definefont will add an isFixedPitch entry to
FontInfo if there isn't one there.

Removes the old "type 7 path" encoding code from

Changes bdftops so it puts isFixedWidth and ItalicAngle entries in the
FontInfo dictionary of the fonts it creates, since some P*stScr*pt
programs rely on this.

Changes bdftops so it synthesizes as many missing characters as possible
out of the ones that are there (in particular: synthesizes accents out of
punctuation marks, and accented characters using seac.)  The results
aren't all that good, but they're a lot better than having characters
missing out of the font.


Adds a pfbtops utility for converting .PFB fonts to standard Ghostscript

Fixes bugs:
	- ps2image didn't reset things properly between pages for
multi-page documents.


Makes Ghostscript recognize `-' alone as meaning that it should read from
standard input as though it were a file.  This allows Ghostscript to
accept a pipe as input.

Fixes bugs:
	- seac in type1addpath used the current font's encoding, not
	- type1decryptfile (eexec) didn't recognize binary (as opposed to
hex) representation.
	- Mentioning a name whose value was a no-access object caused an
invalidaccess error.
	- There was a bogus definition of `run' in zfile.c.
	- The interpreter didn't handle end-of-file on stdin properly.
	- Real numbers with an 'e' or 'E' but no decimal point were not
	- On MS-DOS systems, inside strings, \ followed by a newline was
not discarded properly.
	- On MS-DOS systems, the long unsigned divide routine sometimes
gave incorrect answers.  Among other things, this caused alternate-radix
numbers sometimes to crash the interpreter.
	- cvrs didn't do the right thing about reals or negative integers.
	- .echo.mode was being reset with def instead of store, and was
defined in systemdict rather than userdict.
	- setgray and settransfer didn't interact properly.
	- 16#80000000 was being interpreted as a signed integer (and
converted to a real) rather than an unsigned one.
	- atan returned 0 sometimes when it should have returned 180.
	- currentcmykcolor was defined wrong.

Removes the filename operator, since no standard Ghostscript code used it,
and it caused problems with some P*stScr*pt files.

Implements new operators: filenameforall, selectfont (as a procedure),
stringmatch, undef.

Adds new standard procedures: selectdevice.

For MS-DOS, requires that the operand and execution stacks be located in
the data segment, and uses short pointers to address them.  This produces
significantly smaller and faster code.  (These changes are not visible to
users or library clients.)

Changes the assignment of attribute bits, and adds new bits for
save/restore and the garbage collector.  Changes many of the macros in
store.h to support save/restore.  (These changes are not visible to users
or library clients.)  Implements save and restore.

Moves type names from to ghost.h and ztype.c.

Moves error names from to errors.h and iinit.c.

Introduces gp.h as a documented interface to the platform-specific files.

Adds the -- switch, which allows Ghostscript programs to take arguments
from the command line.

Changes many uses of the name `name' to something else, to avoid upsetting
the Microsoft C compiler.

Really implements packed arrays -- they took the same amount of space as
ordinary arrays in previous versions.

Changes exitserver in serverdict so that it just clears the stacks.  (This
isn't the correct fix, but it will do as a workaround.)

Makes many miscellaneous small changes to pacify various compilers.

Changes so that when "quiet" mode is selected (-q switch),
Ghostscript doesn't print anything when loading fonts or when substituting
for undefined characters.

Defines the name consisting of just a control-D as a no-op, because some
P*stScr*pt-generating applications put control-Ds in their output.

Implements halftone phase (sethalftonephase and currenthalftonephase

Removes the -E switch, since it is no longer useful.

Changes the -w and -h switches to a single -g (geometry) switch, with
usage -g<width>x<height>.  Makes the -h switch, and a new -? switch, print
usage help.

Implements correct handling of stack overflow errors (makes an array out
of the contents of the overflowing stack, and resets the stack, before
invoking the error handler).

Adds t_oparray (`operators' defined as procedures) and the makeoperator
operator.  This is so that programs like the Distillery that rely on all
operators being bound by `bind' will work properly.

Adds a new NOPAUSE flag to suppress the prompt and pause at copypage and


Fixes bugs:
	- gs_type1_interpret didn't store the encryption state or the skip
count before returning to let the client handle a seac or an endchar in
the middle of a seac.
	- The definition of the Type 1 operator ce_testadd was based on
wrong information; the operator takes only 2 operands and does something
	- mem_true24_copy_mono wasn't incrementing the destination pointer
if the color was transparent, leading to garbled characters.
	- gx_lookup_fm_pair would sometimes look at one entry beyond the
end of the cached font/matrix pair area.  (This probably had no practical
	- gs_type1_interpret didn't save the current point when returning
to the client for a callothersubr, causing some characters to be rendered
displaced (such as some of the chess pieces in
	- gs_setgray, gs_sethsbcolor, gs_setrgbcolor, gs_setflat, and
gs_setlinewidth gave errors for out-of-range operands rather than forcing
them into range.
	- Transfer functions were not actually supported.
	- The area fill algorithm failed on certain complex paths.
	- The current point was sometimes defined when a BuildChar
procedure was called.
	- Stroking a degenerate line didn't display anything for round
caps or joins.
	- If the ends of a curve had exactly the same X coordinate, the
curve sometimes wouldn't be displayed.
	- Very thin lines that went outside the clipping region would
sometimes be displayed as dashed, or not at all.
	- The translation in a FontMatrix was ignored.
	- Very wide, shallow lines would color extraneous pixels when
using bevel or miter joins.
	- Dashed lines didn't join properly at the beginning of a closed
	- 0-degree arcs didn't add the appropriate line (possibly
degenerate) to the path.
	- gs_type1_interpret didn't reset the callsubr stack when starting
the base character of a seac, which caused confusion if the accent's
endchar fell inside a Subr.
	- Non-monochrome memory memory devices weren't checking the
arguments of the drawing procedures properly.
	- The initial clipping rectangle for memory devices was being
computed wrong.
	- Null devices had a semi-infinite clipping rectangle instead of
an empty one.
	- gs_setlinewidth was treating negative arguments as zero, instead
of taking the absolute value.
	- imagemask with a dithered color used a solid color rather than
the dithered one.

Tweaks the area fill and image rendering algorithms to be a little more
liberal with paint when being used to render characters.

Changes the name of the 8-bit mapped color memory device from
mem_mapped_color_device to mem_mapped8_color_device.

Changes the memory devices so that on little-endian platforms, they can
store the bytes within a word in either order.  (Little-endian order
allows efficient 32-bit updating, big-endian is required when displaying
or writing to a printer or a file.)

Implements halftone phase.

Replaces the trapezoid fill algorithm with a much more accurate one
inspired by a contribution from Paul Haeberli.  This also changes the
graphics convention back to filling only pixels whose center falls within
the region to be filled.

Changes the character cache to allocate headers and bits contiguously out
of a single ring buffer.

Changes gs_imagemask and gs_imagemask_init to take a thickness adjustment

Changes gs_setcachedevice and gs_setcharwidth to take the graphics state
as a parameter.

Renames gx_device_memory_bitmap_size as gdev_mem_bitmap_size,
mem_copy_scan_lines as gdev_mem_copy_scan_lines, and
mem_bytes_per_scan_line as gdev_mem_bytes_per_scan_line.

Version 2.1.1 (1/15/91)

This is a sub-release distributed to fix a few early bugs in 2.1, just in time for the new GNU master tape.

Build procedures

Removes all of the (undebugged) Level 2 code from the fileset, as well as
the (unused) file gdevvga.c.

Changes the tar file so that the files are stored in the directory
gs<version> rather than simply gs, e.g., gs211.


Changes the scanner so that \ is recognized within strings regardless of
whether the scanner is reading from a string or from a file.  This is
compatible with newer P*stScr*pt interpreters, and with the newer
P*stSc*pt language specification, but not with the older specification in
the original PostScript Language Reference Manual.


Fixes the max_value macro in gdevmem.c so that compilers won't complain
about a left shift by 32.

Adds 'byte' to the list of types that gdevx.c must sidestep because header
files use them.


Changes the computation of penum->unpack in gsimage.c so as not to upset
compilers that don't treat procedures and pointers to procedures as
compatible types for conditional expressions.

Version 2.1 (12/31/90)

This is primarily a bug fix release to clean up problems in 2.0. It also implements a first cut at the new color operators.

Build procedures

Changes the separator for multiple directories in MS-DOS from ';' to '|',
since there is no way to include a ';' in a command line.

Adds <dir>/fonts to the default search path, where <dir> is c:/ghost for
MS-DOS systems and `pwd` for Unix systems.

Adds new documentation describing how to direct output to the printer.

Changes the PROCTYPE and USE8087 options in MSDOS.MAK to CPU_TYPE and
FPU_TYPE.  The latter now indicates the type of FPU to generate code for,
if any.


Adds a driver for the Canon BubbleJet BJ10e.

Modifies the EGA driver to handle (non-standard) frame buffers larger than
64K.  Adds drivers for the VGA and for the EIZO MDB-10 (a 1024 x 768 frame

Changes the X driver so that it clips to the window dimensions, rather
than reporting an error.

Notes that the H-P LaserJet driver, like the DeskJet driver, works under
Unix as well as MS-DOS.

Adds support for 120 X DPI mode, and for the LQ-1500, to the Epson driver.


Fixes bugs in bdftops:
	- It was using /UniqueId instead of /UniqueID as the key for the
font unique ID.  This effectively disabled the font cache.
	- The definition for .notdef was bogus -- an invalid CharString.

Changes and so that NullFont is the initial font,
rather than Ugly.

Arranges things so that when attempting a font substitution, if the
default font is not found, NullFont is used instead.

Extends bdftops so that if certain easily synthesized characters are
missing from a font, it will attempt to synthesize them using available


Extends the -T switch to allow specifying a printf template for the
arguments of the procedure being traced.

Fixes bugs:
	- /0 was interpreted as equivalent to 0 (a number) rather than a
literal name.
	- packedarray was defined as being like array, instead of like
array followed by astore.
	- Many minor and harmless type mismatches (and a couple of very
minor genuine bugs) were upsetting the Apollo C compiler.
	- exp was incorrectly failing in certain cases with a negative
first argument.
	- copyscanlines incorrectly required at least 4 elements on the
operand stack, although it correctly only used the top 3.
	- readhexstring incorrectly read 1 byte even if the string length
was zero.
	- Not every place that expected an array would accept a packed
	- Very complex paths (and infrequently other things) could produce
a 'memory leak'.
	- / alone would skip following whitespace and gather following
characters, rather than creating an empty name.
	- left newerror defined as true in $error, which resulted
in an erroneous error report if a program executed a 'stop'.
	- The definition of exitserver in serverdict didn't clear the
	- currentfile returned an executable file, rather than a literal
	- setfont for Type 1 fonts didn't check the UniqueID in the font
dictionary against the one in the font's Private dictionary.
	- A value stored in a dictionary under the key /xxx couldn't be
retrieved using the key (xxx), and vice versa.
	- charpath with a Type 1 font on a string containing a 'space'
would produce garbage (it released the parent path inappropriately).
	- bytesavailable did not work properly for terminal input.

Changes the interface to the memory allocator so that it always takes an
element size and an element count, like calloc instead of malloc (but note
that alloc does *not* clear just-allocated blocks).  Gets rid of the
special 'dynamic' allocation procedures.

Changes the random number operators to use a better implementation.

Changes the idiv operator so it will accept any numbers, not just
integers, as arguments.  (The PostScript manual doesn't allow this, but
implementations apparently do.)

Provides semi-fake but usable definitions for all of the color PostScript
extensions, including a real implementation of colorimage.

No longer uses the name 'null', which is apparently reserved by Microsoft
C.  Makes a number of other minor changes required to pacify the Microsoft
C compiler.

Implements %statementedit and %lineedit.  (%statementedit is equivalent to
%lineedit, which is wrong.)  Changes the interactive interpreter to use

Changes the scanner to accept null, ctrl-K (vertical tab), and ctrl-L
(form feed) as whitespace.  Ctrl-L terminates a comment, null and ctrl-K
do not.

Allows a literal string as the 'proc' argument(s) for image, imagemask,
and colorimage.

Adds the following operators/procedures: arct, cleardictstack, deletefile,

Defines =print as a synonym for =, for the benefit of LaserPrep.

Implements non-zero PaintType for the show operators (but not for
charpath) for Type 1 fonts.

Adds the ISOLatin1Encoding encoding vector.

Renames currentcolor and setcolor as currentgscolor and setgscolor, to
avoid conflict with the Level 2 PostScript names.  Removes colorhsb,
colorrgb, hsbcolor, and rgbcolor.


Fixes bugs:
	- In a couple of places, a 0 was being passed as a pointer
argument without casting, which confused the Microsoft C compiler.
	- Image devices were not recognized properly in debugging
	- Inverted-color monochrome image devices were not recognized
	- Images that exactly fill the drawing area rendered very slowly,
because they erroneously used the general clipping algorithm.
	- Images that are 1-for-1 with the device were incorrectly scaled
by a factor of 8 in X.
	- Rounding artifacts sometimes caused characters to be unevenly
offset vertically by 1 pixel.
	- Type 1 fonts that used the Flex feature resulted in garbled
	- The show operator routines would incorrectly fill or stroke a
path that existed at the time the show was started.
	- setscreen truncated the cell size instead of rounding, which
could produce off-by-1 anomalies.
	- stroke would sometimes produce garbage (or nothing at all) for
very narrow lines.
	- path filling would only color the pixels whose centers fell
inside the path: the Adobe specification requires coloring a pixel if any
part of it falls inside the path.

Changes the Epson printer driver so that it drives the printer directly
rather than writing to a file.

Changes pathbbox so that if the path is empty but there is a current
point, it returns a null rectangle at the current point.

Changes gs_image_init to take an additional parameter (after bps) giving
the number of samples per pixel (1, 3, or 4), and an indication of whether
the samples for each pixel are together or separated (-3 or -4).

Renames the gs_image_data and gs_imagemask_data procedures as gs_image and
gs_imagemask, and removes the old versions of the latter.

Adds gs_colorimage.

Replaces Snoopy's color dithering algorithm with one contributed by Paul

Changes gs_setgray, gs_[set]hsbcolor, and gs_[set]rgbcolor so that they
coerce arguments outside the range [0..1] back into the range, instead of
signalling an error.

Makes a number of minor changes required to pacify the Microsoft C

Changes gs_arcto so that if the last argument is a null pointer, the
tangent points are not returned.

Removes gs_type1addpath, which is not useful.  (Clients must call
gs_type1_init and gs_type1_interpret directly.)

Implements the 'seac' opcode for Type 1 fonts, allowing fonts with accented
characters to display properly.

Implements the undocumented 'testadd' opcode for Type 1 fonts, which is
used by some Adobe fonts.

Renames gs_currentcolor and gs_setcolor as gs_currentgscolor and
gs_setgscolor.  Removes gs_colorhsb, gs_colorrgb, gs_hsbcolor, and

Version 2.0 (9/12/90)

The main purpose of this release is to add fonts, support for multiple devices, and imaging into memory. It also fixes a number of miscellaneous bugs. (Unfortunately, accurate records of the bugs fixed are not available.) The changes were so extensive that we chose to increment the major version number.


Doesn't attempt to open the .MAP file on Unix systems.

Adds mention of to interp.doc.

Notes that Turbo C 2.0, not 1.5, is required for building the MS-DOS

Adds a DEVICES= line to the makefile, and allows multiple devices.

Documents, in interp.doc, the X Windows resources that Ghostscript

Adds three PostScript masters to the fileset: (+,, and


Changes the names of all the device drivers.  See gdevs.mak for the
updated list.

Adds a (working) driver for SunView.

Adds drivers for the Sony NeWS frame buffer, and the Sony Microsystems
NWP533 printers.  These drivers were contributed by users, so we aren't
prepared to answer questions about them.

Adds a driver for the Borland Graphics Interface (BGI) for MS-DOS systems.
Note that to use this driver with a non-EGA/VGA display, you need a .BGI
file appropriate for your hardware.  (The Ghostscript executable includes
the EGA/VGA driver.)

Adds a driver for Epson printers.  The driver has only been tested on an
LX-800, and on an H-P DeskJet in FX-80 emulation mode, but may work on
other models.  The driver could be adapted to work on Unix systems, but as
distributed, it only works on MS-DOS systems.

Adds a driver for the Hewlett-Packard DeskJet printer.  The driver could
be adapted to work on Unix systems, but as distributed, it only works on
MS-DOS systems.

The X Windows driver no longer waits for the user to type a character
before bringing up the initial display.

Adds information to drivers.doc describing how to change the definition of
the device structure and procedure table.

Extends the tile_rectangle and tile_trapezoid driver procedures to
interpret color0 = color1 = gx_no_color_index as meaning that the tile is
actually colored, not a mask.

Build procedures

Changes the tar file so it puts everything in a directory called gs.

Removes the -ansi switch for gcc (this was causing problems with <math.h>
on some systems).

Changes LDPLAT to the string -X, which is appropriate for most Unix
systems (but not for SunOS 4.n).

Adds EXTRALIBS to the makefile, for specifying additional libraries to be
linked in.

Adds a 'clean' target for 'make', to get rid of all temporary files, the
binaries, and the executable.

Changes names of system-specific files from gp-xxx.c to gp_xxx.c.

Adds support for VMS (gp_vms.c and ghost.dcl).

Creates a new file gdevs.mak, and reorganizes the other makefiles, so that
the choice of which device driver(s) to include is isolated in a single
line in the platform-specific makefile.

Changes the standard MS-DOS makefile so it builds for 8088/86 (not 80386),
with neither -DNOPRIVATE nor -DDEBUG.

Changes the name of the MS-DOS makefile from dos-ega.mak to msdos.mak, and
the Unix makefiles from ux-[g]cc-x.mak to unix-[g]cc.mak.

Updates drivers.doc to describe how to add new drivers in gdevs.mak.

Removes the drivers are now responsible for specifying the size
of the imaging region.


Adds a makefile macro GS_LIB_DEFAULT and an environment variable GS_LIB to
define a search path for the library (initialization and font) files, and
implements the -I switch for the same purpose (replacing -sLIB=, which was
never actually implemented).  See interp.doc for details.

No longer clears the operand stack between interactive inputs.  No longer
prints the contents of the operand stack after every input in debug mode.

Doesn't "eat" the character that the user types to proceed after a
showpage, unless it's an isolated <return>.

Changes the prompt so that it says
if the operand stack is empty, or
if there are n > 0 elements on the operand stack.

Adds -w and -h switches to the command line, equivalent to -dWIDTH= and
-dHEIGHT= except that they require numeric arguments.

Adds -q (quiet startup) switch to the command line, which suppresses some
initial messages and also has an effect equivalent to -dQUIET.

Fixes bugs:
	- = and == caused an error on some kinds of objects if the object
didn't have read access.
	- cvs didn't print operator names.
	- The definition of dynamic_begin in iscan.c caused the DEC VMS C
compiler to produce incorrect code.
	- mul didn't return a correct (real) result when multiplying a
very large integer by an integer that wasn't very large.
	- eq and ne didn't work on files, fonts, save objects, and some
	- The scanner would sometimes blow up on floating point numbers
beginning with a '.'.
	- flushfile didn't pop its argument from the stack.
	- put and putinterval would store into a packed array.
	- a few operators didn't check properly for stack underflow.
	- cvrs produced wrong output for radix values greater than 10.
	- The scanner would convert upper-case letters in alternate-radix
numbers wrong on Unix systems.
	- String comparisons other than equality often produced the wrong
result if the strings were of different lengths.
	- An ifelse as the last thing inside a forall would confuse the
execution stack.
	- There were some omitted casts and 'private' declarations that
made the GNU compiler unhappy.
	- There was a memory leak in the image[mask] operators that caused
516 bytes to be permanently lost each time one of them was used.
	- Quoted strings of length greater than 50 and less than 100 would
get mangled when being read in.
	- The scanner didn't consume the whitespace character following a
token, so programs that read data out of the program file could get
	- Under rare circumstances, an object of size between 249 and 255
bytes could get allocated on top of another object.

Allows bind to bind packed arrays, even though they aren't normally

Changes the length operator to allow a name as the argument.  (The
PostScript manual doesn't allow this, but implementations apparently do.)

Changes the setcachedevice operator to allow the bounding box to be
specified as a 4-element array instead of 4 scalars.  (The PostScript
manual doesn't allow this, but implementations apparently do.)

Removes a line from that accidentally disabled the font cache.

Implements memory devices (makeimagedevice, copyscanlines, and makedevice
for image devices).  makeimagedevice is implemented only for 1, 8, 24, and
32 bits per pixel.

Changes the deviceparams operator so it pushes a mark on the stack below
the parameters.  This is to allow for devices that have more than the
standard set of parameters.

Replaces defaultdevicename with two new operators, getdevice and

Adds a flushpage operator that flushes any outstanding buffered output to
the screen.  This is not the same as copypage: on printers, copypage
actually prints a page, whereas flushpage may do nothing; on displays,
flushpage and copypage may both flush output to a server.

Adds an unread operator for pushing back a character into a file.

Adds a description of proposed grayimage and colorimage operators to
ghost.doc, even though they aren't implemented yet.

Changes the name of the currentfileposition operator to fileposition.

Removes the framedevice operator, since the new device operators supersede

Adds a writeppmfile operator, for writing the contents of a memory device
to a ppm file.

Makes Ghostscript work even when the >> operator doesn't sign-extend
negative numbers.  (This has not been tested.)

Adds the Symbol encoding to

Adds two new file-related operators, filename and findlibfile.  See
ghost.doc and interp.doc for details.

Adds type1encrypt and type1decrypt operators for manipulating Adobe Type 1
encoded fonts.

Changes the imagecharpath and addcharpath operators to type1imagepath and
type1addpath.  These operators now work with the Adobe Type 1 font

Adds the type1decryptfile operator for reading Adobe Type 1 encrypted


Fixes bugs:
	- curveto and lineto didn't check for the current point being
	- stringwidth would fail if there was no current point.
	- There were omitted casts that made the GNU compiler unhappy.
	- Line caps and joins didn't always work.
	- Dashed lines didn't work at all.
	- If you read out the current matrix while inside a BuildChar
procedure, the result was garbage.
	- image[mask] would crash if you gave it a single string with more
than 64K-1 pixels (MS-DOS only).
	- Filling with a gray pattern sometimes wrote into pixels beyond
the right edge of the region (MS-DOS only).
	- The font cache would mistake fonts for each other if both fonts
had a default (unsupplied) "unique ID".
	- When a character was entered into the font cache for the first
time, sometimes it would display as garbage and/or displaced vertically
from its proper position.

Implements gs_makeimagedevice, gs_copyscanlines, gs_getdevice,
gs_devicename, gs_flushpage, gs_writeppmfile, gs_type1encrypt,
gs_type1decrypt, gs_type1imagepath, and gs_type1addpath procedures
corresponding to the new operators in the interpreter (see preceding

Changes [gs_]setdevice so that it does an erasepage when it first opens
the device.

Changes definition of gx_device structure as follows.  NOTE: THIS AFFECTS

	- Removes bits_from_MSB (which wasn't actually used, in any case).
	    Ghostscript now assumes officially, as it always did in
	    practice, that device bitmaps are stored MSB first, i.e., X=0
	    corresponds to the 0x80 bit in the first byte.

	- Removes the initial_matrix member, which wasn't actually being
	    set up.

	- Adds a new member 'name', a string giving the device name.

	- Adds new members 'x_pixels_per_inch' and 'y_pixels_per_inch'.
	    These are only used by the default initial_matrix procedure
	    (see below).

	- Adds a new procedure 'output_page'.  The default implementation
	    (gx_default_output_page) just calls the sync_output procedure.

	- Adds a new procedure 'get_initial_matrix'.  The default
	    procedure uses the width, height, and x/y_pixels_per_inch
	    members to compute the matrix, assuming that X values run from
	    right to left, and Y values run from top to bottom.

Changes the names of the allocation procedure types gs_proc_alloc and
gs_proc_free to proc_alloc_t and proc_free_t, and moves them from gs.h to

Makes Ghostscript work even when the >> operator doesn't sign-extend
negative numbers.  (This has not been tested.)

Copyright © 1996, 1997, 1998 Aladdin Enterprises. All rights reserved.

This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of the license contained in the file LICENSE in this distribution.

Ghostscript version 7.07, 17 May 2003