Changes in the most recent releases of Ghostscript

Table of contents

This document is a record of changes in Ghostscript releases numbered 5.60 through 6.0. For earlier versions, see the the history documents:

History of Ghostscript versions 5.0 - 5.50
History of Ghostscript versions 4.n
History of Ghostscript versions 3.n
History of Ghostscript versions 2.n
History of Ghostscript versions 1.n

For other information, see the Ghostscript overview.


Within each release, news appears in the following order: Incompatible
changes, Documentation, Procedures, Utilities, Drivers, Platforms, Fonts,
Interpreter, Streams (included under Interpreter through release 2.9.9),
Library.  Changes marked with a * were made available as patches to a
previous release.


Version 5.72 (tester) (3/17/99)

This fileset finally gets rid of the need to have jpeg, libpng, or zlib source code on Unix systems that already have these libraries available. It also starts to add support for general DeviceN color spaces. Works in progress: - Fix Fontmap -> Fontmap.GS link, which VMS can't handle. - Make x11alpha do real alpha blending. - spdiff.c is unfinished, partly wrong. - DeviceN support is in progress. In gxcht.c, set_ht_colors_le_4 and set_color_ht_gt_4 don't have any way to color-map >4 planes.

Incompatible changes

(Interpreter) - The str argument of arg_push_memory_string is no longer const. - The last argument of print_reloc is now const. (Library) - Clients should never call the device open_device or close_device procedure directly: they should call gs_opendevice or gs_closedevice. - The fn_free_functions procedure has been made private. - The first argument of gs_currentpoint is no longer const. - References to header files in the third-party libraries must now include a trailing _, i.e.: jerror_.h jmorecf_.h jpeglib_.h png_.h zconf_.h - IJG JPEG library versions before v5a are no longer supported. - ilog2 replaces small_exact_log2. - Support for "outside" clipping has been removed. - Clients that define their own devices now must either register them in the makefile (using the SET[P]DEV[2] macros) or set the stype pointer in the static prototype to the correct structure type (or at least a structure type with the correct procedures).

Documentation

Clarifies the fact that clients should never call the device open_device or close_device procedure directly. (doc/Drivers.htm) Updates contact information for Artifex Software. (doc/Commprod.htm, doc/New-user.htm) Clarifies the fact that Aladdin did not write gdevcdj.c. (gdevcdj.c) Documents the new -TTYPAUSE switch. (doc/Use.htm) Adds SCO OpenServer 5.0.5 to the list of systems where Ghostscript is known to build. (doc/Make.htm) Notes that the MIPSpro 7.2.1.3m compiler produces incorrect output. (doc/Make.htm)

Procedures

Fixes problems: - The Unix install directory ($(gsdatadir)) and the Unix default search path ($(gsdatadir)/lib) weren't compatible. (bug introduced since 5.50) (unixinst.mak) - The compilation rule for echogs omitted a dependency and also failed to specify a directory for header files. (unix-aux.mak) - Third-party library source code was required even if the corresponding SHARE_xxx option was set to 1. (devs.mak, gs.mak, int.mak, lib.mak, jpeg.mak) Adds a -dTTYPAUSE switch to cause .confirm to read from /dev/tty instead of stdin, useful when the data input is a pipe. (lib/gs_init.ps)

Utilities

Fixes problems: - Some preprocessor macros were defined twice on VMS. (echogs.c) - traceop.ps didn't build operator-tracing procedures in global VM. (This didn't matter before we introduced local pseudo-operators.) (lib/traceop.ps) - geninit produced invalid output or hung if the input files didn't have the correct EOL representation for the platform. (geninit.c) Updates a (probably otherwise obsolete) file for the deletion of the private JPEG library error message table. (bughunt.sh)

Drivers

Fixes problems: - A procedure returning void tried to return a value. (gdevtfax.c) - For 24-bit displays, XGetImage can return an image in which bits_per_pixel is 32 rather than 24, which is not at all obvious from the documentation; also, the bit and byte ordering may not be MSBFirst. (gdevx.c) - XFree takes a char *, not a void *. (gdevx.c) - The fix in 5.71 to adjust the width of TIFF images introduced another bug. (gdevtfax.c) - If the X driver used a standard colormap, pixel values 255 and less didn't map back to RGB properly. (bug introduced in 5.71) (gdevxcmp.c) - The ForceMono addition to gdevbit.c (in 5.71) was incorrect. (gdevbit.c) - There was a const mismatch in an extern. (gdevxalt.c) - Third-party library source code was required even if the corresponding SHARE_xxx option was set to 1. Fixing this required referencing all third-party library header files through *_.h files. (gdevjpeg.c, gdevpdfi.c, gdevpng.c, gdevpsdi.c, gdevpsdp.c) - There was no way to cause the bounding box device to give up its reference to the target. (gdevbbox.h, gdevbbox.c) - pdfwrite crashed if given a 12-bit-per-sample CMYK image when ConvertCMYKImagesToRGB was true, and produced invalid output for other 12-bit-per-sample images (PDF limits bits-per-sample to 8). (gdevpsdi.c) - pdfwrite mangled planar images if bits-per-sample was other than 8. (bug introduced since 5.50) (gdevpdfi.c) Changes some code to reduce compiler warnings about casts discarding const. (gdevxalt.c) Removes a test that allowed referencing the statically allocated instance of the alternative X drivers. (gdevxalt.c) Changes a reference to small_exact_log2. (gdevsvga.c) Greatly improves the PDF writer's handling of simple pattern fills, by retaining them as pattern fills. (gdevpdfx.h, gdevpdf.c, gdevpdfi.c)

Fonts

Fixes problems: - Cn in a font name wasn't recognized as indicating a condensed font. (lib/gs_fonts.ps)

Interpreter

Fixes problems: - Third-party library source code was required even if the corresponding SHARE_xxx option was set to 1. Fixing this required referencing all third-party library header files through *_.h files. (zfdctd.c, zfdcte.c) - An /undefined error occurred on floating point numbers whose integer part exceeded the size of a long (normally 31 bits) and that also included a fraction. (iscannum.c) - ialloc.c included gxarith.h unnecessarily. (ialloc.c) When opening a terminal for reading, always sets the buffer size to 1. This does not apply to %stdin, %lineedit, or %statementedit. (zfile.c) Changes code to use the new deconstifying freeing procedures, to remove deconstifying casts. (gsargs.h, ialloc.h, gsargs.c, zfname.c, zfunc.c) Adds a writable packed ref pointer variant to ref.value, to remove compiler warnings about casts discarding const. (igc.h, iref.h, idict.c, igc.c, igcref.c) Changes the help printouts to use the new printf_program_ident procedure. (imainarg.c) Generalizes clients to handle color spaces that may have more than 4 components. (zcsdevn.c, zcsindex.c, zcssepr.c, zdpnext.c, zfdecode.c) Removes support for outside clipping, which we implemented only because we misinterpreted a requirement. (zpath.c)

Interpreter (PDF)

Fixes problems: - Selecting a colored Pattern color space caused an error. (lib/pdf_draw.ps, lib/pdf_ops.ps) - Reading data from a subfile with no filter caused an error. (lib/pdf_base.ps) Allows mask images to omit BitsPerComponent: Acrobat Reader accepts this even though the PDF specification requires it to be present (with value = 1). (lib/pdf_draw.ps)

Streams

Fixes problems: - The PixelDifference filters didn't propagate leftover bits in the last byte of a row. (bug probably introduced in 5.60) (spdiff.c) - The 1- and 2-bit-per-pixel PixelDifferenceEncode filters were broken. (spdiff.c) Changes code slightly to remove a warning about an uninitialized variable. (spdiff.c) Extends the PixelDifference filters to handle more than 4 Colors. s_PDiff_max_Colors is the maximum value. (spdiffx.h, spdiff.c) Adds a stream for converting 12-bit samples to 8-bit. (gdevpsds.h, gdevpsds.c) Gets rid of the no longer needed private copy of the JPEG error message table. (sdcte.c, sdeparam.c, sjpegerr.c [deleted], sjpegc.c)

Library

Fixes problems: - If a 1-bit-per-pixel image terminated early, the last few scan lines might not be written out. (gxidata.c) - The bbox device could leave its target in a half-open state, because it called the open/close_device procedures directly rather than going through gs_open/closedevice. We "fixed" this by making this device forward open and close, but conditionally, so that clients can choose. (gdevbbox.c) - Third-party library source code was required even if the corresponding SHARE_xxx option was set to 1. Fixing this required referencing all third-party library header files through *_.h files. (sdcparam.c, sdctc.c, sdctd.c, sddparam.c, sjpegc.c, sjpegd.c, sjpege.c, sjpegerr.c) - Low-memory recovery in the band list writer sometimes didn't work, because a test was backwards. (gxcldev.h, gxclist.c) - Executing a put_params during band rasterizing didn't update cached values in the imager state. This was probably not a problem in practice, since the only parameters that affect cached values (device color space, depth, and color mapping) were very rarely set. (gxclrast.c) - Converting 12-bit planar images to chunky format could store beyond the end of the output area and corrupt memory. (gsflip.h, gsflip.c) - The algorithms for converting 4-plane, 1- and 2-bit planar images to chunky format were wrong. (gsflip.c) - Images that lay entirely outside the page could cause a memory access error. (gxclimag.c) - The bbox device could return excessively conservative values for stroked paths. (gxpaint.h, gdevbbox.c, gxpaint.c, gxstroke.c) - Banding devices now include some pointers that the garbage collector must trace. (gdevprn.h, gxclist.h, gxdevice.h, gdevprn.c, gsdevice.c, gxclist.c) Adds a gs_opendevice procedure to mirror gs_closedevice. (gsdevice.h, gsdevice.c) Adds deconstifying freeing procedures to the memory manager. This allows us to have pointers as structure members that should be const * for all ordinary clients, and still be able to free the referenced objects without a compiler warning. (gsmemory.h, gsmemory.c) Changes code, often to use the new deconstifying freeing procedures, to remove deconstifying casts. (gspath.h, gxfunc.h, gsfunc.c, gsfunc0.c, gsfunc3.c, gspath.c, gsptype1.c) Changes the eprintf macros so they print the version as well as the program name. (std.h, gscdef.c, gsmisc.c) Adds procedures that update cached values in graphics or imager states after setting device parameters. Clients should use these when setting parameters of devices that may be current in graphics or imager states. Note that this is only a partial solution for a much deeper problem, and may even have to be replaced at some point. (gsdevice.h, gsdevice.c) Defines GS_CLIENT_COLOR_MAX_COMPONENTS (in gsccolor.h), GX_DEVICE_COLOR_MAX_COMPONENTS (in gxcindex.h), and GS_IMAGE_MAX_COMPONENTS, and starts to use them where needed, in anticipation of implementing DeviceN color spaces. (gsccolor.h, gsdcolor.h, gsiparam.h, gsiparm4.h, gxcindex.h, gxctable.h, gximage.h, gxshade.h, gdevplnx.c, gscdevn.c, gscolor2.c, gxcht.c, gxclimag.c, gxcmap.c, gxicolor.c, gxctable.c, gxi12bit.c) Replaces small_exact_log2 by a procedure ilog2 that computes floor(log2(n)). (gxarith.h, gsmisc.c, gspaint.c, gxccman.c, gxclimag.c, gxclrect.c) Upgrades gsflip.c to handle >4 planes. (gsbitops.h, gsflip.h, gsflip.c) Speeds up getting and testing memory device prototypes a little. (gdevmem.c) Speeds up adding arcs to a path a little. (gspath1.c) Increases the precision of a precomputed constant from float to double. (gxpath.h) Adds a new band list operation to make circles smaller and faster. (gxclpath.h, gxclpath.c, gxclrast.c) Adds an accessor procedure for the start point of the current subpath. (gxpath.h, gxpath2.c) Removes support for outside clipping, which we implemented only because we misinterpreted a requirement. (gspath.h, gxcldev.h, gxcpath.h, gxpath.h, gspath.c, gxacpath.c, gxclip.c, gxclpath.c, gxclrast.c, gxcpath.c) Changes gs_copydevice to require that static prototypes either be registered in gx_device_list or have a correct stype pointer. (This is already the case for all devices in code we distribute.) (gsdevice.c) Adds ENUM_PTRS_PROC and RELOC_PTRS_PROC macros for giving a name to the typed pointer to the object being processed. (gsstruct.h)

Version 5.71 (tester) (3/3/99)

This fileset reinstates support for TrueColor X displays, and adds optional support for GNU readline. It also includes a little more work on the new driver text API.

Incompatible changes

(Library) - The *line_accum* macros are now capitalized; declare_line_accum is renamed DECLARE_LINE_ACCUM_COPY, and DECLARE_LINE_ACCUM is new.

Documentation

Documents the CIE joint cache invariant more accurately. (gscie.h) Adds a request for xdpyinfo/xwininfo output to the problem reporting form. (doc/Bug-form.htm)

Procedures

Fixes problems: - The default search path was missing the lib subdirectory on many platforms. (dvx-gcc.mak, os2.mak, ugcclib.mak, unix-gcc.mak, unixansi.mak, unixtrad.mak, watc.mak, watclib.mak, watcw32.mak) - The dependency list for the X Windows drivers was incorrect, sometimes causing needed recompilation to be omitted. (devs.mak)

Utilities

Fixes problems: - The representation of maximum unsigned values produced warnings on some compilers (specifically, gcc with -Wtraditional). (genarch.c) - Some string variables weren't declared const. (echogs.c, genarch.c) - The viewpbm utility was broken for pgm and ppm (but not pbm). (bug introduced in 5.66) (lib/viewpbm.ps)

Drivers

Fixes problems: - The X driver didn't handle TrueColor displays properly. (gdevxcmp.h, gdevxcmp.c) - The alternative X drivers didn't implement get_bits properly. (gdevxalt.c) - The X driver specified the byte order incorrectly for displays with more than 8 bits per pixel. (gdevx.c) - The X driver used the wrong number of bits for comparing colors on visuals with fixed color maps. (gdevxcmp.h, gdevxcmp.c) - Some symbols were multiply defined with -DNOPRIVATE. (gdevbit.c) - If a file specified a paper size, rather than using the default, the G3/G4 fax output drivers didn't adjust the width to a legal one for fax systems. (gdevtfax.c) Segregates the resource lists, for which warnings about casting of const to non-const string types should be suppressed, into a separate file. (devs.mak, gdevx.h, gdevxini.c, gdevxres.c) Splits off the code related to color mapping for X Windows, for greater understandability. (devs.mak, gdevx.h, gdevxcmp.h, gdevx.c, gdevxcmp.c, gdevxini.c) Changes code slightly to remove warnings about signed/unsigned integer constants. (gdevxalt.c) Changes code to remove unused variables. (gdevx.c, gdevxalt.c) Adds a user-contributed driver for the H-P LaserJet 4D. (devs.mak, gdevdjet.c) Makes the bitcmyk driver reset its map_cmyk_color procedure dynamically according to the depth, allowing more efficient execution in the 1- and 8-bit cases. (gdevbit.c) Adds a settable option, AdjustWidth, to control whether the fax-format drivers (faxg*, tiffcrle, tiffg*) adjust the page width to legal fax values. Its default value is 1 (do adjust). (devs.mak, gdevtfax.c) Adds a ForceMono parameter to the bitcmyk/bitrgb devices to implement a special monochrome-in-CMYK mode requested by a customer. (gdevbit.c) Removes the TRIM_ and EXPAND_BITS_TO_BYTES options from the bit devices, since they are no longer needed. (gdevbit.c)

Fonts

Changes the substitution mechanism for condensed / narrow fonts, so that the PDF interpreter can use it. (lib/gs_fonts.ps)

Interpreter

Fixes problems: - The bind operator generated unaligned accesses and might not operate reliably. (bug introduced in 5.70) (zmisc.c) - If the BuildChar procedure of a font included an image or imagemask operator, charpath would (incorrectly) display the character. (zimage.c) Adds a bogus return statement to suppress a compiler warning. (gs.c) Changes code slightly to remove warnings about signed/unsigned integer constants. (store.h, ibnum.c) Changes the build date format to %d-%02d-%02d. (lib/gs_init.ps, imainarg.c) Rearranges some code to add readline support. (files.h, imain.c, zfileio.c, ziodev.c) Adds support for GNU readline, with several completion keys, contributed by a user. (int.mak, gs_rdlin.ps, gp_gnrdl.c)

Interpreter (PDF)

Fixes problems: - In-line images caused a syntaxerror or stackunderflow. (bug introduced in 5.70) (lib/pdf_draw.ps) - The font substitution mechanism didn't detect Condensed fonts. (lib/pdf_font.ps)

Streams

Adds an interface and default implementation for readline. (srdline.h, stream.h, stream.c)

Library

Fixes problems: - A void procedure attempted to return a value. (stream.c) - A pointer was declared with an extra *. (gsmemory.c) - An argument would be stringified with traditional C. (gdevdbit.c) - The check for validity of the CIE joint caches was wrong, leading to incorrect output in some obscure cases. (gsciemap.c) - A tiny rounding inaccuracy could cause an occasional blank line when rendering adjacent images. (gxipixel.c) - Some symbols were multiply defined with -DNOPRIVATE. (gsptype2.h) - If a character was too large to be cached, it didn't use anti-aliasing, even if TextAlphaBits was >1. (gspaint.c) Changes code slightly to remove warnings about signed/unsigned integer constants. (gsccode.h, gsmisc.c, gxcht.c) Changes code to remove a warning about an unhandled case in a switch. (gsstruct.h, gsmemory.c) Changes code to remove unused variables. (gxcindex.h, gdevdbit.c, gdevprn.c, gxiscale.c) Restructures the header files for the new text API, adding the SINGLE options in text_params, enough new elements in text_enum to store all the arguments of text_begin, and new elements in text_enum to hold results returned by text_process. This code is no longer "subject to [arbitrary] change without notice", although it is still not very stable. (gstext.h, gxtext.h, gstext.c) Changes code to remove warnings about uninitialized variables. (gxipixel.c) Changes the syntactic form of some constants yet again to suppress a different set of compiler warnings. (gxsample.c) Adds a procedure to fix the charpath-in-BuildChar problem. (gsimage.h, gsimage.c, gsptype1.c) Speeds up the handling of certain RasterOp cases for CMYK devices. (gxdevice.h, gxdevmem.h, gdevdrop.c, gdevmem.c, gdevmr8n.c, gdevrops.c) Adds a platform-specific interface for reading lines from stdin. This is intended primarily to support GNU readline. (lib.mak, gp.h, gp_strdl.c)

Version 5.70 (internal) (2/20/99)

This fileset includes substantial changes to the interpreter in support of making it fully reentrant (eliminating writable globals).

Incompatible changes

(Interpreter) - The ref_stack structure has been renamed ref_stack_t, and has been changed substantially. Clients should now access all of its members, other than the pointers to the current block, through the macros or procedures defined in istack.h. The STACK_LOOP_{BEGIN,END} macros have been removed. - The argument of context_state_load is no longer const. - Each file's table of operator definitions is now limited to 16 entries. op_def_table[] no longer exists: use op_index_def() instead. - invalid_file_entry now has an associated VM space, avm_invalid_file_entry, that must be used in constructing invalid file refs. - restore will now undo binding of pseudo-operators. Attempting to bind a local pseudo-operator into a global procedure will cause an invalidaccess error.

Documentation

Updates the driver documentation a bit. It probably still includes a lot of out-of-date text. (doc/Drivers.htm) Improves the problem reporting form to make it absolutely clear that test data are required, and that the problem must be reproducible without using a viewer. (doc/Bug-form.htm) Documents the -dDOINTERPOLATE switch. (doc/Use.htm) Documents the difference between public and tester releases, in connection with making tester releases available to everyone. (doc/New-user.htm) Updates the list of history files. (doc/Readme.htm) Adds a questionnaire for people who want to be notified of new test releases. (doc/Readme.htm, doc/Tester.htm)

Procedures

Fixes problems: - A ! was missing before an include. (bcwin32.mak, msvc32.mak) - A trailing \ in some macro definitions was quoted incorrectly. (bcwin32.mak, msvc32.mak) - An editing error prevented a makefile from working. (bcwin32.mak) - The 16-bit spooler executable didn't reference its icon correctly. (gs16spl.rc) - The Watcom makefiles had gotten badly out of date. (watc.mak, watclib.mak, wccommon.mak) - Some DEVICE_DEVS lines were too long for the shell to handle. (openvms.mmk) - A space was missing before a colon. (openvms.mmk) Updates MSVC support to handle version 6. (msvc32.mak) Extends genconf to handle function types as well as image types, and changes the output for image types. (genconf.c) Desupports the use of CONFIG for selecting between multiple configurations, since parameterized output directories do this better. (bcwin32.mak, dvx-gcc.mak, gs.mak, int.mak, lib.mak, msvc32.mak, msvclib.mak, openvms.mak, openvms.mmk, os2.mak, ugcclib.mak, unix-gcc.mak, unixansi.mak, unixtrad.mak, watc.mak, watclib.mak, watcw32.mak) Adds a -dDOINTERPOLATE switch to force Interpolate in all images. (lib/gs_init.ps)

Utilities

Rewrites viewpcx to eliminate dependence on a special filter. (lib/viewpcx.ps)

Drivers

Fixes problems: - The [e]pswrite and pdfwrite drivers wrote out clipping paths using the winding number rule even if the path had been set with eoclip. (gdevpdfd.c, gdevvec.c) - Some occurrences of ushort should have been gx_color_value. (gdevpbm.c) - A comment was accidentally left outside comment quotes. (gdev3852.c) - There was a char/byte mismatch not covered by a cast. (gdevdcrd.c) - There were still some references to the 'huge' keyword, which has been superseded by FAR. (gdevwdib.c) - Some obsolete references to which_colors hadn't been removed. (gdevwdib.c) - The [e]pswrite driver produced incorrect output for a curveto or closepath followed by a lineto and then a moveto. (gdevps.c) - The [e]pswrite driver could produce incorrect output for paths ending with a lineto. (gdevps.c) - The name paper_sizes was used both by a driver and by other code, causing a problem when building with -dNOPRIVATE. (gdevclj.c) Consolidates the X error handling statics into a structure. (gdevxini.c) Updates the pdfwrite driver to reflect the addition of state to the ASCII85Encode filter. (gdevpsdf.c) Adds a user-contributed driver for the Lexmark 5700 printer (black-and-white only). (contrib.mak, gdevlxm.c) Updates the mswinpr2 driver with a new, user-contributed one that includes interaction with the user. (gdevwpr2.c)

Fonts

Fixes problems: - When TrueType support was present, the FONTPATH scanner didn't recognize TrueType fonts whose 'type' was "true" rather than the documented <00 01 00 00>. (lib/gs_ttf.ps) - When DEBUG was set, loading a TrueType font could cause an /undefined error. (lib/gs_ttf.ps)

Interpreter

Fixes problems: - Local (pseudo-)operators could get bound into global procedures with 'bind', causing dangling references. Attempting this now causes an invalidaccess error. Fixing this also required making restore undo binding of pseudo-operators. (zmisc.c) - A harmless dictfull error occurring during language level switching caused an error. (zmisc2.c) - If given a closed input file, flushfile caused an error, rather than doing nothing. (zfileio.c) Renames the ref_stack structure as ref_stack_t, and factors it so that the parts set only at initialization are separated from the dynamic parts, in support of moving the stacks from static to dynamic storage. (icstate.h, idebug.h, idstack.h, iestack.h, iostack.h, iparam.h, iparray.h, istack.h, idebug.c, interp.c, iparam.c, istack.c, zcontext.c, zpacked.c, zvmem.c) Moves the dynamic part of the stacks in-line in the context structure; gets rid of the statically allocated stacks. (dstack.h, estack.h, icontext.h, icstate.h, idstack.h, iestack.h, interp.h, iostack.h, ostack.h, icontext.c, iinit.c, interp.c, zcontext.c) Packages the dictionary lookup statistics in a structure, like the other statistics. (idict.c) Changes from dynamic to static initialization of the function type table. (int.mak, ifunc.h, iconf.c, zfunc.c, zfunc0.c, zfunc3.c) Removes the PCXDecode filter. (zfilterx.c) Removes more writable statics. (int.mak, btoken.h, files.h, icstate.h, igstate.h, ipacked.h, iscan.h, icontext.c, imain.c, iscan.c, iscanbin.c, zbseq.c, zcolor2.c, zcontext.c, zgstate.c, ziodev.c, zmath.c, zpcolor.c, zpacked.c) Changes the representation of the operator table to avoid allocating a dynamic copy. This introduces a limit of 16 entries per definition set. (int.mak, opdef.h, iconf.c, idebug.c, iinit.c, interp.c, iutil.c, zcontext.c, zcontrol.c, zdict.c, zfileio.c, zgstate.c, ztype.c) Includes the ASCII85Decode filter in all configurations, for simplicity. (iscan.c, zfdecode.c) Makes the invalid file reference point to a static object. (files.h, icontext.c, zfile.c, ziodev.c) Changes all dictfull error returns from the dictionary code to use return_error. This should have been done a long time ago! (idict.c) Increases the predefined size of systemdict a little more because .upp files may define a lot of new entries. (iinit.c) Adds a few more interpreter statistics. (interp.c)

Interpreter (PDF)

Fixes problems: - Images never closed the data stream, placing a heavy load on the garbage collector to clean up streams and stream states. (lib/pdf_draw.ps) - Streams stored on external files didn't work. (lib/pdf_base.ps) Reorganizes code slightly to allocate less memory for in-line images. (lib/pdf_draw.ps) Speeds up some common operations a little. (lib/pdf_base.ps)

Streams

Removes the PCXDecode filter. (spcxx.h [deleted], spcxd.c [deleted]) Changes the name of a variable for greater clarity. (stream.c) Splits off the ASCII85Decode filter into a separate file, since it turns out to be convenient to include it in all configurations. (sa85d.h, sa85x.h, sa85d.c, sfilter2.c) Makes an initialization entry point available for non-heap-allocated streams. (stream.h, stream.c) Changes the ASCII85Encode filter so it always produces lines of at most 80 characters, not counting the EOD marker. THIS IS A NON-BACKWARD-COMPATIBLE CHANGE, because this filter now needs a state structure, which it didn't before. (sa85x.h, sfilter2.c)

Library

Fixes problems: - Reference counting of graphics state elements was wrong when creating multiple contexts, causing memory corruption. (bug probably introduced in 5.68) (gsstate.c) - If CIE joint caches were created because the reference count of the existing caches was >1, the new caches weren't initialized correctly. (bug introduced in 5.60, found by Ray Johnston.) (gscie.c) - If Margins are set so that part of the default clipping region lies outside the ((0,0),(width,height)) device coordinate space, the fast case of images could cause a memory access error. (gxifast.c) - In the case of a halftone with more bits than levels, gx_check_tile_cache could incorrectly return false, causing images to render more slowly than they should. (gzht.h, gxht.c) - There was a const mismatch between an argument and the formal parameter. (gdevprn.h, gdevprn.c, gxclread.c) - An error in the definition of st_imager_state_num_ptrs caused the garbage collector to omit marking one pointer in imager states, possibly causing memory corruption. (gxistate.h) - The bbox device, used with no target, didn't properly handle images where more data was provided than needed. (gdevbbox.c) Removes any pretense of supporting multiple threads in a single-threaded environment. Dummy synchronization primitives, however, are still provided. (gp_nsync.c) Removes more writable statics. (gximage.h, gxi12bit.c, gxino12b.c, gxipixel.c) Changes the handling of image types, and adds similar handling for function types. (gscdefs.h, gconf.c) Consolidates the gs_std* files into a structure. (gsio.h, gsmisc.c) Speeds up the fastest (common) case of clipping fill_rectangle and copy_mono operations. We could do the same for the other operations if we wanted. (gxclip.c) Identifies this fileset as a tester release. (gscdef.c)

Version 5.69 (internal) (2/4/99)

This incremental fileset fixes minor compilation problems, as well as many problems with driver-based CRDs (not used by PostScript or PDF).

Procedures

Fixes problems: - The OpenVMS makefile had not been updated properly to reflect the division of files into subdirectories. (openvms.mak) - A space was missing before a :. (devs.mak) - The MMK makefile had not been updated to reflect the renaming of the psm[raw] devices to pksm[raw]. (openvms.mmk) Changes the default name of the build directory for the library test program from debugobj to libobj, so that one can work with both library and interpreter builds without interference. (ugcclib.mak) Adds -fno-builtin to the gcc switches, to detect failure to declare functions like memcpy, at a small cost in performance. (ugcclib.mak, unix-gcc.mak)

Utilities

Makes a couple of minor fixes to ansi2knr, suggested by users. (ansi2knr.c) Updates ps2ai.ps with an improved version from its author. (lib/ps2ai.ps)

Drivers

Fixes problems: - The 32-bit CMYK "async" BMP driver was declared incorrectly as a non-async device. (gdevbmpa.c) - Some #includes were missing, because gcc didn't warn about failures to declare certain standard functions. (x_.h, gdevdcrd.c, gdevx.c) - The PC frame buffer device still referred to _ss and near. (gdevpcfb.c) - The [e]pswrite driver didn't handle bitmaps with a non-zero X bit offset correctly. (gdevps.c) - The pdfwrite driver wrote all clipping paths with the winding number rule, even if they were established by eoclip. (gdevpdfd.c) - "Vector" drivers wrote all clipping paths with the winding number rule, even if they were established by eoclip. (gdevvec.c) Adds the CRDName parameter to the sample driver-based CRD. (gdevdcrd.c) Tweaks the sample driver-based CRD to make it a more realistic (closer to the PostScript default). (gdevdcrd.c) Adds the sample driver-based CRD to the modified X drivers. (devs.mak, gdevxalt.c)

Interpreter

Fixes problems: - Some #includes were missing, because gcc didn't warn about failures to declare certain standard functions. (zchar1.c) - Driver CRDs were not supported properly. (zcrd.c, lib/gs_lev2.ps) Changes some code because non-int switch expressions are not handled correctly in pre-ANSI C. (igcref.c, zdevice.c) Adds the ability to set the orientation of zero-length "dots". (zgstate.c) Adds comments on an alternative shallow-binding design. (dstack.h) Changes the threshold for repeatedly rescanning change lists so that it is based on the cumulative amount of rescanning and not the amount in a single pass. (isave.c)

Streams

Changes some code because non-int switch expressions are not handled correctly in pre-ANSI C. (sfilter1.c)

Library

Fixes problems: - Some casts to (gx_device *) were missing. (gschar.c) - Some #includes were missing, because gcc doesn't warn about failures to declare certain standard functions. (gdevdgbr.c, gscie.c, gsmatrix.c, gxshade1.c) - gxclread.c now needs gdevprn.h to declare certain procedures. We tried very hard to make the command list machinery not depend on anything related to printer devices, but at this point we have not succeeded. (gxclread.c) - For CRDs set by library clients, the is_identity flags in the caches were set incorrectly, producing incorrect output. (gscie.h, gscie.c, gscrd.c, gscrdp.c) - For CRDs set by library clients, the EncodeABC and RenderTable T procedures were sampled incorrectly. (gsciemap.c, gscrd.c) - The interpreter tried to sample the TransformPQR functions in the PostScript CRD even for driver CRDs. (gscie.h, gscie.c) - Library assistance was needed for the interpreter to support driver CRDs properly. (gscrdp.h, gscrdp.c) - The procedures that accessed cached CIE values didn't round the index, so accessing already-cached values could wipe out the cache. (gscie.c) - The procedure that accessed cached RenderTable.T values simply wasn't implemented. (gscrd.c) Adds an "if (1)" to a macro to suppress "statement not reached" warnings from stupid compilers. (gsmemlok.c) Changes the syntactic form of some constant tables to suppress signed/unsigned warning messages. (gsbitops.c, gxsample.c) Changes some switch statements to if/else because non-int switch expressions are not handled correctly in pre-ANSI C. (gdevmr8n.c, gxdcolor.c) Adds the ability to set the orientation of zero-length "dots". (gsline.h, gxline.h, gsline.c, gsstate.c, gxstroke.c) Adds an allocator state variable to support the change in the rescanning algorithm. (gxalloc.h)

Version 5.68 (internal) (1/29/99)

This fileset implements PatternType 2 (gradient fill) Patterns. All significant PostScript LanguageLevel 3 features are now implemented, except for DeviceN color spaces. We have also verified that the MMK script for OpenVMS also works with MMS. Note that there are significant non-backward compatible changes to memory management for device instances: we are sorry about this, but just as with paths in 5.22, we had to fix this design problem at some point.

Incompatible changes

(Procedures) - A new makefile, unix-aux.mak, must be included in all Unix top-level makefiles. (It is included in the ones we distribute.) unixtail.mak is renamed unixlink.mak. (Library) - The names of the anti-aliasing parameters in the device color_info structure have been changed. - Dummy definitions for PC-specific C keywords (_cs, _ds, _ss, near, far, huge) are no longer provided: these keywords should be removed from non-PC-specific code. - The names of the alignment_mod, ptr_le, ptr_lt, ptr_ge, ptr_gt, and ptr_between macros have been changed to upper case (ALIGNMENT_MOD etc.) - gs_make_null_device now takes an additional argument. - The ccolor member of a gx_device_color is no longer inside a substructure. - Clients now must initialize Pattern templates with gs_patternN_init, where N is the PatternType (normally 1), before filling in the members. - gs_pattern_instance_common_t is renamed gs_pattern_instance_t; gs_pattern_instance is renamed gs_pattern1_instance. - To set the target of a forwarding device, you must now use gx_device_set_target rather than setting the target member directly. - Memory management for devices has changed substantially, and in a subtle way. If you have code that calls the library, please read the documentation in gxdevcli.h. - Callers of the driver create_buf_device procedure must always call it through gdev_create_buf_device, never directly. - For composite and CID-keyed fonts, the character code returned by gs_show_current_char and gs_kshow_previous_char is now the full multi-byte character code rather than just the last byte of the code. - gdev_cmap_set_method has been replaced by a device parameter, ColorMappingMethod. - The CRD pointer parameter for param_write_cie_render1 and param_put_cie_render1 is no longer const.

Documentation

Fixes problems: - The documentation for resize_object and resize_string didn't allow the new size to be the same as the old size, didn't describe what data was preserved, and didn't guarantee to return the same object if the new size was the same as the old size. (gsmemraw.h, gsmemory.h) - The documentation for the value returned by the internal .getmetrics32 operator was incorrect. (zchar32.c) - The documentation for the special color mapping device didn't say that the caller had to call gs_setdevice_no_init to update graphics states. (gdevcmap.h) Notes that OPENVMS.MMK works with both MMK and MMS. (doc/Make.htm) Adds a note to the C style guide about nested vs. multi-branch 'if' statements. (doc/C-style.htm) Notes that the multi-threaded ("async") drivers require libc version 6 or higher under Linux. (doc/Make.htm) Notes additional Irix/MIPSpro combinations that compile idict.c incorrectly, and gives a workaround. (doc/Make.htm) Adds a couple more acknowledgements. (doc/Helpers.htm) Documents the new -Z^ switch. (doc/Use.htm) Documents the new rules about memory management for device instances (gxdevcli.h, gxdevice.h)

Procedures

Fixes problems: - The "async" BMP devices were accidentally included in the default list for Unix, leading to a requirement for the POSIX thread package, which is not available on all systems. (unix-gcc.mak) - There was a minor typo in the new MMK script. (openvms.mmk) - The MMK script redefines macros, which MMS does not allow. (openvms.mmk) - The gcc version test used gcc rather than $(CC) for the compiler name. (unix-gcc.mak) - There was a minor typo in the pcx2up device makefile entry. (devs.mak) - Some commands in the Unix install rules referenced sh rather than $(SHELL). (unixinst.mak) Makes (dummy) in-RIP trapping an optional feature, and removes it from the default configuration. (int.mak, lib.mak) Splits off the build rules for the Unix auxiliary programs, so they can be shared between interpreter and library configurations. (ugcclib.mak, unix-aux.mak, unix-gcc.mak, unixansi.mak, unixtail.mak [deleted], unixlink.mak, unixtrad.mak) Adds the bitcmyk device to the list of devices for the library test program. (ugcclib.mak)

Utilities

Fixes problems: - ansi2knr didn't handle occurrences of '/' or quoted strings inside an argument list correctly. (ansi2knr.c) At the suggestion of a GNU person, makes ansi2knr check for output errors. (ansi2knr.c)

Drivers

Fixes problems: - Setting the resolution on the SPARCprinter didn't work. (gdevsppr.c) - Even in PDF 1.1 compatibility mode, the PDF writer used a predictor to compress images. (gdevpsdi.c) - Reference counting for devices was not implemented consistently. (gdevxalt.c) - gcc (again) missed some static / non-static inconsistencies. (gdevbmpa.c, gdevifno.c) Removes all remaining uses of segment identifiers (_cs, _ds, _ss) from non-PC-specific code. (gdev3852.c, gdevcdj.c, gdevhl7x.c, gdevl256.c, gdevmgr.c, gdevsgi.c, gdevsppr.c, gdevvglb.c) Removes all remaining uses of the 'near' keyword from non-PC-specific code. (gdevcd8.c, gdevcdj.c, gdevcgm.c) Changes uses of round_up to ROUND_UP. (gdevmsxf.c, gdevpcx.c, gdevpx.c, gdevxxf.c) Adds user-contributed support for 16-bit displays to the MS Windows driver. (gdevmswn.c, gdevwdib.c) Adds a user-contributed driver (sunhmono) for the Harlequin variant of 1-bit Sun raster files. We expect to add other varieties of Sun Raster file eventually as well. (contrib.mak, gdevsunr.c) Adds a user-contributed driver (fs600) for the Kyocera FS-600 laser printer. (devs.mak, gdevdjet.c) Replaces the sample device CRD with a slightly hacked version of the default PostScript CRD, and moves it to a separate file for greater flexibility in testing. (gdevdcrd.h, gdevbit.c, gdevdcrd.c) Adds standard and "async" 32-bit CMYK BMP drivers (even though this is outside the published BMP format). (gdevbmp.c, gdevbmpa.c) Changes the names of the separated-CMYK PBM drivers from psm to pksm, to be more descriptive. (devs.mak, openvms.mak, unix-gcc.mak, gdevpbm.c)

Platforms

Fixes problems: - On MS Windows and OS/2, "(%stdin) (r) file bytesavailable" caused a crash. (gp_msio.c, gp_os2.c)

Fonts

Fixes problems: - TrueType fonts with fewer glyph names in post than entries in loca caused an error. (gs_ttf.ps) Adds additional tracing to the TrueType font loader. (lib/gs_ttf.ps) Per Adobe, adds the Euro symbol under the name /Euro (capitalized) to various built-in Encodings. (lib/gs_mro_e.ps, lib/gs_pdf_e.ps, lib/gs_sym_e.ps, lib/gs_wan_e.ps)

Interpreter

Fixes problems: - An extraneous file got left in the fileset. (lib/pdf_main.ps.sav [deleted]) - The number of required arguments for .pathbbox was incorrectly specified as 0 rather than 1. (zpath1.c) - Opening a ReusableStreamDecode filter with a string source and no decoding filters left an extra value on the stack. (lib/gs_ll3.ps) - Type 32 fonts sometimes didn't display the characters, or displayed them offset. (lib/gs_typ32.ps) - In LanguageLevel 3, copypage still called EndPage with 1 rather than 0. (lib/gs_init.ps) - The HalftoneName parameter was missing from the trapping parameter set. (lib/gs_ll3.ps) - CMap character entries were processed in the wrong order. (lib/gs_cmap.ps) - CMap'ed non-CID fonts didn't work properly, because they called BuildChar with the original character code rather than BuildGlyph with the mapped glyph. (zchar.c) - Using an out-of-range CID value with a CIDFont caused an error rather than substituting a notdef. (lib/gs_cidfn.ps) - CIDFontType 0 fonts with a GlyphDirectory didn't fall back to the indexed character data if the CID wasn't in the GlyphDirectory. (lib/gs_cidfn.ps) - CIDFontType 0 fonts didn't substitute a notdef at all. (lib/gs_cidfn.ps) Changes uses of round_up to ROUND_UP. (igcstr.c) Updates clients for the object-oriented changes to Patterns. (zcolor2.c, zpcolor.c) Implements the rest of PatternType 2. (ipcolor.h, zpcolor.c, zshade.c) Makes in-RIP trapping an optional feature. (lib/gs_ll3.ps, lib/gs_trap.ps) Updates clients for the change in gs_show_current_char. (zcfont.c, zchar.c) Changes the dict_*_param macros to procedures, for easier tracing. This includes a change in the return value of dict_matrix3_param. (icie.h, zcie.c, zcrd.c)

Streams

Changes uses of round_up to ROUND_UP. (scfd.c, scfe.c)

Library

Fixes problems: - Once again, gcc failed to flag a static procedure declaration followed by a non-static definition. (gdevprna.c, gximage3.c) - Anti-aliasing no longer worked for the x11alpha device. To fix this, we factored out the anti-aliasing information in the gx_device_color_info structure. (bug introduced in 5.65) (gxdevcli.h, gdevabuf.c, gdevdflt.c, gdevxalt.c, gsdparam.c) - An empty declaration generated an extraneous semicolon. (gxclip2.h) - Some macros that generated an if-else construct didn't enclose it in BEGIN/END, possibly leading to incorrect parsing. (gxobj.h) - A comment was missing a closing */. (gxpageq.h) - The handling of the phase in Pattern filling was broken again. We probably broke it with the "fix" introduced in 5.24. (gxp1fill.c) - Looking up an undefined IODevice name caused a memory access error. (bug claimed to be fixed in 5.24) (gsiodev.c) - The null device installed for stringwidth didn't copy the color mapping information from its target, causing confusion if the current device was a pattern accumulator. (gxdevcli.h, gxdevice.h, gschar.c, gsdevice.c, gxpcmap.c) - mem_mapped2_copy_mono produced incorrect results for byte-aligned rectangles exactly 1 byte wide (fix from John D.), and could also access data 1 byte beyond the end of each source row. (gdevm2.c) - In the case of a masked image or a RasterOp involving a Pattern, the garbage collector could fail to follow a pointer, possibly causing memory corruption. (gsdcolor.h) - Assigning a double value to a float variable caused an infinite recursion. (gxshade1.c) - Failure to detect when the region being filled had become very small caused excessive recursion. (gxshade4.c) - The default implementations of resize_object didn't always return the old object if the old and new sizes were the same. (gsalloc.c, gsmalloc.c) - The left side bearing of TrueType characters was sometimes calculated incorrectly. (gstype42.c) - The TrueType renderer disregarded the left side bearing values. We aren't sure that the change we made is right, but it seems to produce better output. (gstype42.c) - Shadings used the first Decode entry for both X and Y values. (gxshade.c) - Function-based Shadings sometimes omitted part of their output. (gxshade1.c) - Function-based Shadings didn't access 4-bit-per-sample data correctly. (gsfunc0.c) - The malloc/free-based allocator didn't finalize objects when freeing them. (gsmalloc.c) - Reference counting for device instances was not implemented even close to consistently. THIS IS THE BUG TAIL WE WORRIED ABOUT IN 5.24. (gxdevcli.h, gxdevice.h, gdevbbox.c, gdevcmap.c, gdevmem.c, gdevnfwd.c, gdevplnx.c, gdevprn.c, gdevrops.c, gsalphac.c, gschar.c, gsdevice.c, gsropc.c, gxidata.c, gxmclip.c, gxipixel.c, gxpcmap.c) - Some device structure definitions failed to include finalization. (gdevmrop.h, gsstruct.h, gxclip2.h, gxcpath.h, gxdevmem.h, gxmclip.h) - Reference counting for the device halftone wasn't correct in the band rasterizer. This must be a recently introduced bug, because otherwise banding couldn't have worked. (gxclrast.c) - When banding, high-level images that extended off the page in the Y direction caused memory access errors. (gxclimag.c) - [a]widthshow didn't use the correct value for comparison for composite fonts with FMapType 9 (CMap). (gxchar.h, gschar.c, gschar0.c, gsfcmap.c) - The special color mapping device only worked for device_cmap_monochrome. (gdevcmap.h, gdevcmap.c) - The definition of gs_memory_locked_release was wrong. (gsmemlok.h, gsmemlok.c) - An opaque structure definition (for gx_device) was missing, creating a need for an otherwise unnecessary #include. (gscrdp.h) - Certain cached values weren't computed when needed. Fixing this required removing 'const' from a parameter type. (gscrdp.h, gscrdp.c) - gxclmem.c #included "gsmalloc.h", which is no longer needed. (gxclmem.c) - Memory management for device halftones was incorrect, leading to objects being freed twice or other memory corruption during band rendering. (gzht.h, gsht.c, gsstate.c, gxclrast.c, gxistate.c) - Setting a driver-originated CRD didn't invalidate cached information, leading to incorrect output. (gscrdp.c) - A consistency check on driver-originated CRDs was incorrect, causing valid CRDs to be rejected. (gscrdp.c) Removes dummy definitions for old PC-specific language extensions. (stdpre.h) Removes uses of the PC-specific 'huge' keyword. (gdevmem.c) Removes uses of the PC-specific 'near' keyword. (gdevabuf.c, gdevbbox.c) Changes the pointer comparison macros to upper-case names. (gxalloc.h, stdpre.h, gsalloc.c, gsmisc.c) Changes the alignment_mod macro to upper case. (stdpre.h, gdevdbit.c, gdevdgbr.c, gsparams.c, gxifast.c) Changes the round_up and round_down macros to upper case. We retain the lower-case definitions for the sake of the PCL code. (gxfcache.h, gxobj.h, stdpre.h, gdevalph.c, gdevmem.c, gsalloc.c, gspath1.c, gxccman.c, gxclimag.c, gxifast.c) Makes Pattern colors more object-oriented, to support PatternType 2, splitting gsptype1.c off from gspcolor.c in the process. (gsccolor.h, gsdcolor.h, gspcolor.h, gsptype1.h, gsptype2.h, gxcolor2.h, gxpcolor.h, gspcolor.c, gsptype1.c, gxpcmap.c) Implements PatternType 2. (gspcolor.h, gsptype1.h, gsptype2.h, gxcolor2.h, gxpcolor.h, gxshade.h, gspcolor.c, gsptype2.c) Changes the interface to shaded filling to make filling rectangles more efficient. (gsshade.h, gscolor3.c, gsshade.c) Improves some macros that didn't handle expressions as arguments. (gsrect.h) Improves tracing of loading the CIE caches. (gscie.c) Cleans up some formatting, and replaces some floating point divides with multiplies. (gstype42.c) Adds default values for the MaxSeparations (1), Separations (false), and SeparationColorNames (empty array) device parameters. (gsdparam.c) Adds -Z^ to trace reference counting. (gsrefct.h, gsmemory.c) Changes the definition of finalization so that finalization procedures *can* assume that objects they reference still exist. This is necessary so that forwarding devices can decrement the reference counts of their targets. Fortunately, all invocations of finalization (in 'restore', the garbage collector, and freeing) already have this property. (gsstruct.h) Extends CRD initialization so that cached values may be copied from an existing CRD. (gscrd.h, gscrd.c) Adds a wrapper to the driver create_buf_device procedure to increment the reference count, so that buffer devices can be freely used in graphics states and as a target. (gxdevcli.h, gdevprn.c, gxclread.c) Removes recursion from the shading rendering code, in preparation for making it interruptible (required for DeviceN color mapping callouts). (gxshade4.h, gxshade1.c, gxshade4.c, gxshade6.c) Monitor-locks the default allocator based on the C heap, if multi-threading is being supported at all. (lib.mak, gsmalloc.h, gsmalloc.c) Speeds up the implementation of mem_true32_copy_mono for the common case. (gdevm32.c) Adds a (disabled) option for defining gx_color_index as a pointer or a structure, for testing. (gxcindex.h) Makes the library test program test the special color mapper more thoroughly. (gslib.c)

Version 5.67 (internal) (1/8/99)

This fileset adds more PostScript LanguageLevel 3 capability: - Complete implementation of shfill. - Most of the expanded CMap capabilities. - ReusableStreamDecode filter. - FontType 2 for CFFs (formerly done in an incompatible way). - HalftoneMode user parameter. - HalftoneTypes 6, 10, and 16. - ImageType 3 images. - UseCIEColor device parameter. It also adds a build script for MMK (which may also work with MMS) under OpenVMS, and Uli Wortmann's drivers for the H-P color inkjet printers. Among other bug fixes, it eliminates about half the "possibly uninitialized variable" compiler warnings.

Incompatible changes

(Library) - The default UCR and BG functions are now f(k) = k rather than f(k) = 0. - The set_[d]fmul2fixed_vars macros have been removed from gxfixed.h. Clients must use the new CHECK/FINISH_[D]FMUL2FIXED_VARS macros. (We don't think there are any such clients outside Ghostscript itself.) - The internal procedure gx_cpath_intersect_slow is replaced with gx_cpath_intersect_path_slow, with different arguments. - gs_color_space_type_Device{Gray,RGB,CMYK} are now private. Clients should use the gs_cspace_Device{Gray,RGB,CMYK} access procedures in gscspace.h to obtain device color space objects. - FontType 2 was renamed from ft_CFF to ft_encrypted2. - FontType 2 fonts now have FontType = ft_encrypted2, rather than ft_encrypted with CharstringType = 2. CharstringType no longer exists. - Type 1 / Type 2 fonts now have an additional member, interpret, that must be initialized. - gdev_prn_render_lines and gdev_prn_get_band_buffer replace gdev_prn_locate_overlay_buffer and gdev_prn_get_overlay_bits. "Async" drivers must now use the new procedures to implement partial-page rendering recovery. - Clients that pass ImageType 3 images where the mask and the image are not scaled identically, or that call image_plane_data without knowing the image type, must now call gs_image_planes_wanted or gx_image_planes_wanted in order to find out which subset of the data planes to pass to the next call of image_plane_data. - gx_image_enum_common_init now takes slightly different arguments. - gs_imager_state_initialize now initializes the entire imager state, including halftone, dev_ht, and ht_cache. - The argument lists for the plane_data and end_image procedures in image enumerators have changed.

Documentation

Fixes problems: - The 5.66 News mentioned the non-existent WAITFILE macro, and had another minor typo. (doc/News.htm) - The URL for the user-contributed H-P 850c driver was incorrect. (doc/Devices.htm, contrib.mak) - The documentation for the driver image API had gotten out of date. (doc/Drivers.htm) Greatly improves documentation for the page queue. (from Artifex 5.50c) (gxpageq.h) Documents the fact that Solaris builds now need -lposix4 for . (doc/Make.htm) Adds a stack status comment in .pdfshow. (gs_pdfwr.ps) Documents the new -Z` debugging switch. (doc/Use.htm) Touches up some formatting in the C style guide, and adds a mention of the space-before-: rule for makefiles. (doc/C-style.htm) Adds documentation for the new H-P 8xx drivers. (doc/Devices.htm) Splits off news for versions 5.0 - 5.50 into a separate file. (doc/History5.htm)

Procedures

Fixes problems: - On MS Windows platforms, the DLL object file wasn't created in the proper directory. (from Artifex 5.55) (msvc32.mak) - cfonts.mak didn't have no-op commands for rules that didn't contain any commands. (cfonts.mak) - The version number for libpng was different from libpng's own version numbering system. (libpng.mak) - Solaris builds now need -lposix4 for . (unix-gcc.mak, unixansi.mak, unixtrad.mak) - The makefiles redefined a number of macros, which MMS doesn't allow. (bcwin32.mak, gs.mak, int.mak, lib.mak, libpng.mak, msvc32.mak, openvms.mak, openvms.mmk, unix-gcc.mak, unixansi.mak, unixtrad.mak, version.mak) Changes cp.bat and rm.bat to eliminate "File not found" messages. (from Artifex 5.55) (cp.bat, rm.bat) Changes all platform-independent makefiles to add a space before the : that separates the targets from the dependencies, to allow the makefiles to be used with MMS/MMK. (cfonts.mak, contrib.mak, devs.mak, gs.mak, int.mak, jpeg.mak, lib.mak, libpng.mak, zlib.mak) Adds a script for compiling Ghostscript on OpenVMS systems with MMK. This has not been tested extensively. (doc/Make.htm, openvms.mmk) Changes the set of optimization switches for MSVC++. We believe the new switches produce working executables, which /O2 didn't. (msvc32.mak, msvccmd.mak) Updates the default expected libpng version to 1.0.2. (bcwin32.mak, dvx-gcc.mak, msvc32.mak, msvclib.mak, openvms.mak, os2.mak, ugcclib.mak, unix-gcc.mak, unixansi.mak, unixtrad.mak, watc.mak, watclib.mak, watcw32.mak)

Utilities

Fixes problems: - Default scaling in viewcmyk.ps was broken. (lib/viewcmyk.ps) Updates pdf2dsc.ps with a newer (user-contributed) version that generates DocumentMedia and PageMedia comments. (lib/pdf2dsc.ps)

Drivers

Fixes problems: - An int * was provided where a uint * was required. (gdevpbm.c) - ps2ps -dLanguageLevel=1 generated invalid output. (gdevps.c) - The X drivers crashed on gray-scale displays. (bug probably introduced in 5.61) (gdevx.c) - The width and height of the cljet5 device were interchanged. (from Artifex) (gdevclj.c) - The PDF writer didn't clip cached characters properly. (bug introduced somewhere between 3.51 and 5.10) (gdevpdfi.c) - For stroked paths with a non-uniform CTM, the PDF writer could emit coordinates larger than 32K, which Acrobat handles incorrectly. (gdevpdfd.c) Restructures some code to suppress bogus "possibly uninitialized variable" warnings. (gdevpdfm.c, gdevps.c) Adds some unnecessary initializations to suppress bogus "possibly uninitialized variable" warnings. (gdevpbm.c, gdevpdfd.c, gdevvec.c, gdevxalt.c) Rewrites the (contributed) X11 xfont code to remove code duplication. (gdevx.h, gdevx.c, gdevxini.c, gdevxxf.c) Adds a user-contributed driver for the H-P LaserJet 3100 with H-P software. (gdevmeds.h, gdevl31s.c, gdevmeds.c) Adds a user-contributed option for 600 dpi output on H-P DesignJet 650C-compatible printers. (gdevcdj.c) Removes unnecessary references to device color spaces. (gdevpdfi.c) Changes the [e]pswrite and pdfwrite drivers to use EndOfBlock rather than Rows for CCITTFax image encoding, producing slightly smaller output. (gdevpsdf.c) Changes the sample async driver to use gdev_prn_render_lines and gdev_prn_get_band_buffer instead of locate_overlay_buffer and get_overlay_bits. Unfortunately, because "async" memory management is broken, we have no way to test the code. (gdevbmpa.c) Updates clients for the change in gx_image_enum_common_init. (gdevpdfi.c, gdevvec.c) Adds Uli Wortmann's drivers for the H-P color inkjet printers. (contrib.mak, gdevcd8.c) Adds mode 9 compression to the PCL printer utilities. (gdevpcl.h, gdevcdj.c, gdevpcl.c) Updates implementors for the change in the plane_data and image_end image processing procedures. (gdevpdfi.c, gdevps.c, gdevpx.c)

Fonts

Fixes problems: - The PFM files for URW Grotesk and Antiqua had some extraneous ^M characters inserted before ^J characters. (fonts/u003043t.pfm, fonts/u004006t.pfm) - CID-keyed fonts didn't handle GlyphDirectory correctly. (lib/gs_cidfn.ps) - CIDFontType 0 fonts with 0-length Subrs caused an error. (lib/gs_cidfn.ps) - Malformed TrueType fonts with overlapping tables (which are nevertheless apparently acceptable to Windows) caused an error. (lib/gs_ttf.ps) - The Hershey font repairs documented in fileset 5.24 apparently never happened: the makeher.ps program was fixed, but the derived fonts were still broken. (fonts/h*.ps) - In some Fontmaps, the /Charter-* font names were linked directly to the Bitstream fonts, rather than being aliases for /CharterBT-*. (lib/Fontmap.GS, lib/Fontmap.Sol, lib/Fontmap.Ult) Makes undefined fonts execute the SubstituteFont procedure in $error, per a posting by Stephen Zisk of Adobe on pdf-prepress-l on 10/8/97. (lib/gs_fonts.ps) Changes the interpreter-level CIE color space install procedures to reflect the addition of const to the color space argument. (zcie.c)

Interpreter

Fixes problems: - The interpreter appeared to be a distiller even when the current device was not pdfwrite. We fixed this by patching 'where' to make the distiller operators visible iff the current device is pdfwrite. We also moved the setcolor hack in 'where' into PostScript code. (lib/gs_init.ps, lib/gs_lev2.ps, lib/gs_pdfwr.ps, zmisc2.c) - The current color space for shfill wasn't identically the same color space as the one in the shading. (gs_ll3.ps) Changes the default UCR and BG functions from f(k) = 0 to f(k) = k. (lib/gs_init.ps) Adds some unnecessary initializations to suppress bogus "possibly uninitialized variable" warnings. (igc.c, zcie.c) Restructures some code slightly to suppress a bogus "possibly uninitialized variable" warning. (zdevice.c) Brings the CMap machinery up to LL3, by allowing a single CMap to reference multiple fonts (usefont, usematrix, and array CIDSystemInfo). (lib/gs_cmap.ps, zfcmap.c) Finishes implementing ReusableStreamDecode. The implementation is very inefficient -- it reads the entire contents into a string -- but it passes the Genoa FTS. (lib/gs_ll3.ps, lib/gs_res.ps, zfreuse.c) Changes CFFs with CharstringType = 2 to generate FontType 2 fonts, rather than FontType 1 with CharstringType = 2, for compatibility with Adobe's LL3 implementations. (lib/gs_cff.ps, lib/gs_type1.ps, lib/type1ops.ps, bfont.h, ichar1.h, ifont.h, ifont1.h, zbfont.c, zchar1.c, zchar2.c, zcharx.c, zfont.c, zfont1.c, zfont2.c) Adds the ability to create (with .bytestring) and do a few operations (currently only length, put, putinterval) on byte arrays. This is needed for implementing ReusableStringDecode filters with >64K bytes of data, and for the LL3 halftone types. (zgeneric.c, zstring.c) Implements HalftoneMode, and HalftoneTypes 6, 10, and 16. To do this, we introduce an internal HalftoneType 7. (lib/gs_dps2.ps, lib/gs_init.ps, lib/gs_ll3.ps, lib/gs_res.ps, zht2.c) Finishes implementing ImageType 3 images. (zimage.c, zimage3.c) Adds the hooks in ColorSpace defineresource and undefineresource for detecting definitions that interact with UseCIEColor. (gs_res.ps) Implements UseCIEColor at the interpreter level. (lib/gs_dps1.ps, lib/gs_ll3.ps, zcolor1.c, zcolor2.c, zimage.c, zmisc3.c) Touches up some formatting. (igstate.h)

Interpreter (PDF)

Fixes problems: - A MediaBox with a non-zero llx or lly would produce incorrect output. The way we fixed this doesn't exactly match Acrobat, but it produces reasonable output. (based on a change from Artifex 5.55) (lib/pdf_main.ps) - Colored patterns didn't work properly. (lib/pdf_draw.ps) - The resources in a Pattern dictionary weren't made available during the execution of the PaintProc. (fix from Artifex) (lib/pdf_draw.ps)

Streams

Adds a flag to the ASCIIHexEncode filter to indicate whether or not to write an EOD, required for Level 1 output from the pswrite device. (sstring.h, sstring.c) Adds a close_at_eod flag to the stream state, for implementing reusable streams; also cleans up some formatting. (stream.h, stream.c)

Library

Fixes problems: - Black-and-white images with Interpolate = true produced undesirable artifacts if the image resolution was close to that of the device. We now disable Interpolate in this case. (gxiscale.c) - In "async" mode, get_hardware_params did an unnecessary flush and reopen. (from Artifex 5.50c) (gdevprna.c) - The computation of the minimum band height for the "async" reader was incorrect. (from Artifex 5.50c) (gdevbmpa.c) - The "fix" for reallocating async buffer memory in 5.50 was incorrect. (from Artifex 5.55) (gdevprn.c) - The "async" reader called clist_finish_page, which it shouldn't. (from Artifex 5.50c) (gdevprn.c) - The image enumeration procedures for ImageType 4 were unnecessary, since the ImageType 1 code now handles ImageType 4 as well. (gximage4.c) - The structure descriptor for tile clipping devices was unnecessary, since these are the same as mask clipping devices. (gxclip2.h) - There was a trailing comma in an enumeration list. (gsbitops.c) - Some compilers didn't like initializing a uint with ~0. (gdevm1.c) - shfill unnecessarily saved, reset, and restored the graphics state. (gscolor3.c) - Radial shadings always extended the shading to radius = 0. (gxshade1.c) - An identifier exceeded VMS's limit of 31 characters. (gdevprn.h, gdevprn.c) - A header file didn't #include enough of its prerequisites. (gxpcolor.h) - Images with non-default ImageMatrix weren't written correctly in the band list. (bug introduced in 5.60) (gximage1.c) - Banded images that had to use the default implementation incurred an extra level of procedure call for each block of data. (gxclimag.c) - Images rotated by other than a multiple of 90 degrees produced incorrect output, because pie->rect.p.y was updated after each block of data, causing image_band_box to produce inconsistent results. (bug introduced by async changes in 5.50) (gxclimag.c) - The client_data pointer in client_order halftones wasn't traced correctly, possibly causing memory corruption if this type of halftone was used. (These are not currently used by the PostScript interpreter.) (gsht.c, gsht1.c) - ImageType 3 images didn't handle subrectangles. (Not a problem for PostScript, which doesn't generate subrectangles, or for PCL, which doesn't use them.) (gximage3.c) - If a VMerror occurred when setting up an ImageType 3 image. an attempt could be made to free an uninitialized pointer. (gximage3.c) - ImageType 4 images with 1 to 8 bits per sample and Decode = [1 0] didn't test transparency correctly. (bug introduced in 5.60) (gximage.h, gxicolor.c, gximono.c, gxipixel.c) - setgray, setrgbcolor, sethsbcolor, and setcmykcolor didn't use gs_cspace_assign, causing code duplication. After this fix, we made the device color space types private, since there are no longer any references to them outside gscspace.c. (gxcspace.h, gscolor.c, gscolor1.c, gscspace.c) - gs_cspace_assign was misspelled cs_cspace_assign. (gscspace.h) - setgray didn't set the pattern pointer of the current color to 0, possibly causing the GC to retain patterns it shouldn't. (gscolor.c) - The dev_ht member of an imager (or graphics) state wasn't included in the macro that enumerates reference-counted pointers. This probably had no effect, since the macro isn't used. (gxistate.h) - When the band rasterizer freed its imager state, the halftone and device halftone structures weren't freed, possibly causing memory leakage. (gsistate.c) Changes the default UCR and BG functions from f(k) = 0 to f(k) = k, per a user's suggestion. We aren't sure which matches the Adobe implementations on color devices. (gxdcconv.c) Conditionally removes some variables that are not needed on big-endian systems. (gdevm1.c) Restructures some code to suppress bogus "possibly uninitialized variable" warnings. (gxfixed.h, gdevddrw.c, gsmatrix.c, gsmisc.c, gxclimag.c) Adds a couple of unnecessary initializations to suppress bogus "possibly uninitialized variable" warnings. (gsbitops.c) Implements BBox, Background, and Extend for shadings. (Background isn't tested yet, because it only takes effect for pattern shading, which isn't implemented yet.) (gsshade.h, gxacpath.h, gxistate.h, gxpath.h, gscolor3.c, gsshade.c, gxacpath.c, gxacpath.c, gxcpath.c) Brings the CMap machinery up to LL3, by allowing a single CMap to reference multiple fonts (usefont, usematrix, and array CIDSystemInfo). (gsfcmap.h, gxfcmap.h, gsfcmap.c) Adds more tracing output to the band list reader. (gxclrast.c) Cleans up some formatting. (gstext.h, gxtext.h) Replaces FontType = 1, CharstringType = 2 with FontType = 2, to match the Adobe implementations. (gxfont1.h, gxftype.h, gxtype1.h, gstype1.c, gstype2.c, gxtype1.c) Adds new gs_bytestring and gs_const_bytestring structures that may reference either string or (byte) object storage. (gsstruct.h, gstypes.h, gsmemory.c) Implements an additional halftone type (ht_type_threshold2) needed for HalftoneTypes 6, 10, and 16. We don't extend gshtx.[hc] to deal with this at this time, since the new type is only needed for the PostScript interpreter. (gxht.h, gxhttype.h, gzht.h, gsht.c, gsht1.c, gshtscr.c) Adds a procedure for division mod M, possibly needed for halftones. (gxarith.h, gsmisc.c) Adds a -Z` debugging switch to turn off high-level images in the band list. (gxclimag.c) Implements gdev_prn_render_lines, as the lowest-level external API for rendering lines in a banded device. This call replaces the "overlay" calls for async rendering. (gdevprn.h, gdevprna.h, gxclist.h, gdevprn.c, gxclread.c) Extends the image enumeration API so that the enumerator can indicate what subset of the input planes it wants delivered on the next call to image_plane_data. Currently this is only needed for ImageType 3. (gsimage.h, gxdevcli.h, gxiparam.h, gdevddrw.c, gsimage.c, gximage.c, gximage3.c) Extends the image enumeration structures to handle images that require a different amount of data for plane N than Width * plane_depths[N]. This requires a NON-BACKWARD-COMPATIBLE change to the argument list of the gx_image_enum_common_init procedure. (gxiparam.h, gdevbbox.c, gsimage.c, gxclimag.c, gximage.c, gximage2.c, gximage3.c, gxipixel.c) Updates the copyright date to 1999. (gscdef.c) Cleans up formatting, capitalizes macro names, etc. (gximage.h, gxsample.h, gxipixel.c) Adds the UseCIEColor device parameter. (gxdevcli.h, gxdevice.h, gsdparam.c) Implements color space substitution (UseCIEColor). (gscolor2.h, gscspace.h, gscssub.h, gxistate.h, gzstate.h, gscolor.c, gscolor1.c, gscolor2.c, gscolor3.c, gscssub.c, gslib.c, gspcolor.c, gsstate.c) Changes the color space install procedure so that its color space argument is const. Now all color space implementation procedures take a const argument. (gscie.h, gxcspace.h, gscdevn.c, gscolor2.c, gscscie.c, gscspace.c, gscsepr.c, gspcolor.c) Changes gs_setcolorspace so its color space argument is const. (gscolor2.h, gscolor2.c) Splits imager state procedures out of gsstate.c, which was getting too large. (gxistate.h, gsstate.c, gsistate.c) Changes gs_imager_state_initialize so it really initializes the whole imager state. (gsistate.c, gxclrast.c) Removes the now-redundant first (device) argument from the plane_data and end_image procedures in image enumerators. Implementors of these procedures must now get the device from the enumerator structure. This is a NON-BACKWARD-COMPATIBLE design cleanup that we have been putting off for most of a year. Also adds an argument to plane_data so it can tell its client how many rows of data was used: this is needed for the implementation of ImageType 3. (gxdevcli.h, gxiparam.h, gdevbbox.c, gdevplnx.c, gsimage.c, gxclimag.c, gxidata.c, gximage.c, gximage3.c) Changes CFFs with CharstringType = 2 to FontType 2 fonts, rather than FontType 1 with CharstringType = 2, for compatibility with Adobe's LL3 implementations. (gstype1.h)

Version 5.66 (internal) (11/25/98)

This fileset includes the ability to efficiently and conveniently obtain planar rather than chunky raster output. It also fixes a large number of minor compilation problems on non-ANSI compilers, and a small number of real problems. It also implements the PostScript LanguageLevel 3 clipsave and cliprestore operators. Unfortunately, because of fragility in third-party code changes that we were forced to include in the base graphics library, overlapped rasterizing ("async mode") fails: - At 300 dpi, for 4-bit planar devices in the low-memory ("partial page") condition, and always for 32-bit planar devices. - At 600 dpi, for all devices other than monochrome.

Incompatible changes

(Procedures) - Every platform-specific makefile must now define _D_, the internal separator for defining preprocessor macros. - Every platform-specific makefile must now define PSLIBDIR, the directory holding the PS initialization files at build time. (This need not be the same as where these files are stored at run time.) (Library) - New elements arch_float_mantissa_bits and arch_double_mantissa_bits have been added to arch.h. Cross-build environments that supply arch.h rather than generating it at build time must add these elements. - A new GB_SELECT_PLANES option has been added to the options mask for the get_bits_rectangle driver procedure. Implementations of this procedure must take this option into account (although they do not have to implement it). - The make_buffer_device printer device procedure has been replaced with create_buf_device, setup_buf_device, and destroy_buf_device. All clients and implementors of make_buffer_device must be changed, including users of the clist_init_params macro. - The gx_device_cmap_procs procedure has been replaced with gx_get_cmap_procs, which also take an imager state as an argument. Callers of gx_device_cmap_procs must be changed.

Documentation

Updates Make.htm to clarify the standard directory structure. (doc/Make.htm) Adds a note about DEC C vs. VAX C for remapping of exit codes. (doc/Make.htm) Clarifies that the end_image procedure frees the enumerator. (gxiparam.h)

Procedures

Fixes problems: - The genxxx utilities didn't compile properly on systems where the C compiler doesn't automatically search for .h files in the directory of the .c file. (unixtail.mak) - Preprocessor definitions require special quoting with Watcom C. Fixing this required adding a _D_ macro similar to II. This is a NON-BACKWARD-COMPATIBLE change, since this definition is now required in each platform-specific makefile. (dvx-head.mak, openvms.mak, os2.mak, unixhead.mak, wccommon.mak, winlib.mak, zlib.mak) - The VMS subdirectories didn't include the "." to make the directory name relative. (openvms.mak) - Some of the OpenVMS command files were omitted from the distribution. (copy_one.com, rm_one.com, rm_all.com) - MMK interprets a final - on a command line as a continuation marker. (gs.mak) - gsiparm4_h was used before being defined. (lib.mak) - Compiled initialization code (COMPILE_INITS=1) was broken because of the introduction of subdirectories. (bcwin32.mak, dvx-gcc.mak, msvc32.mak, openvms.mak, os2.mak, unix-gcc.mak, unixansi.mak, unixtrad.mak, watc.mak, watcw32.mak, int.mak, geninit.c) - Level 1 configurations would no longer build with the standard set of drivers. (devs.mak) - wmake interpreted "&" in a rule command line as calling for background execution. (wccommon.mak) Makes the standard set of features the same on all platforms, namely, psl3 (PostScript LanguageLevel 3) + pdf (PDF 1.2/1.3) + dpsnext (DPS with NeXT extensions) + ttfont (ability to load TrueType fonts directly). Unix platforms add pipe (recognition of %pipe% file names). (bcwin32.mak, dvx-gcc.mak, msvc32.mak, openvms.mak, os2.mak, unix-gcc.mak, unixansi.mak, unixtrad.mak, watc.mak, watcw32.mak) Adds minimal support for Windows 95/NT compiler versions. (wccommon.mak) Notes a set of switches that may work around the optimizer bug in MSVC++ 5.0. (msvccmd.mak)

Utilities

Adds a switch to genconf to set the escape character, since wmake interprets "&" in a rule command line as calling for background execution. (genconf.c) Makes echogs recognize -+ alone as equivalent to - alone, for the sake of VMS systems, which interpret a final - as a line continuation marker. (echogs.c) Adds a viewpsm procedure to viewpbm.ps, for reassembling plane-separated files. (lib/viewpbm.ps)

Drivers

Fixes problems: - There were places where the code assumed that void * could be coerced to byte *, which not all C compilers support. (gdevpdfx.h, gdevpdfo.c) - The name put_bytes was defined in two places, causing an error when linking with NOPRIVATE=1. (gdevpx.c) - The minimum space computation for high-level images and for the scan line length for the sample async driver was slightly too small. (gdevbmpa.c) Improves the tracing output from the psm driver. (gdevpbm.c) Rewrites some macros to eliminate "statement not reached" compiler warnings. (gdevpx.c) Revises the (only) client for changes in the plane-extraction device API. (gdevpbm.c) Adds plane-separated BMP drivers, primarily for testing but also as an example. bmp[a]sep1 and bmp[a]sep8 produce 1- and 8-bit-per-pixel separated CMYK. (gdevbmp.h, gdevbmp.c, gdevbmpa.c, gdevbmpc.c)

Platforms

Fixes problems: - The Watcom environment doesn't provide the st_blocks member of the stat structure. (stat_.h) - In its standard configuration, the Watcom environment doesn't provide stdprn. (gp_iwatc.c) - Newer versions of DEC C on OpenVMS don't require the remapping of the exit codes. (stdpre.h) Revises the dummy implementation of semaphores, monitors, and threads in an attempt to make async rendering (just barely) work for the non-overlay case. Unfortunately, this turned out not to be feasible. (gp_nsync.c)

Interpreter

Fixes problems: - Certain DEC compilers assume that a pointer is aligned even if it is cast to a pointer whose target type has weaker alignment; this produced "unaligned access" errors in the interpreter. (interp.c) - A necessary cast was omitted. (zcrd.c) - Level 1 configurations would no longer run. (lib/gs_init.ps) Updates clients to set mask image fattening properly. (zimage.c, zimage2.c) Rewrites some macros to eliminate "statement not reached" compiler warnings. (files.h, istruct.h)

Interpreter (PDF)

Fixes problems: - The test for whether to honor the Rotate key was backwards. (bug probably introduced in 5.24) (lib/pdf_main.ps) Updates the code to handle improper PDF files in which the startxref and the following file position appear on the same line rather than (as required by the spec) two successive lines. (lib/pdf_main.ps)

Streams

Notes a bug in s_DCT_get_quantization_tables. (sdcparam.c)

Library

Fixes problems: - The algorithm for reducing 4-bit chunky to 1-bit separated colors didn't handle the trailing pixels of a transfer correctly. (gdevplnx.c) - Banding for RGB devices with multi-plane halftones was broken. (bug introduced recently) (gxdcolor.c) - Mask images were written in the band list with inverted polarity. (bug introduced in 5.60) (gximage1.c) - Mask images were always fattened. Fixing this required extending the API, since gs_image_t_init_mask set adjust = true by default (a bad decision) and we didn't want to change it. (gschar.h, gscpm.h, gsiparam.h, gzstate.h, gschar.c, gximage1.c) - The member names push and pop caused problems for compilers whose preprocessors consider it an error to use a macro defined with arguments as a name without arguments. (gxfont1.h, gstype1.c) - Once again, gcc didn't detect some private/non-private mismatches. (gdevplnx.c, gsalphac.c, gximage2.c, gximage4.c) - & was used with an array (which gcc doesn't complain about). (gxshade6.c) - There were several uses of automatic aggregate initialization, which not all C compilers support. (gdevprn.c, gdevps.c) - There were places where the code assumed that void * could be coerced to byte *, which not all C compilers support. (gdevprn.c) - Some \ line continuation characters were used inappropriately (in a macro argument list). (gxclimag.c) - Some function prototypes didn't use the Pn macros. (gsalloc.c) - A function definition not at the left margin confused ansi2knr. (gsfont.c) - A cast for the result of malloc, needed on systems where malloc returns a char * rather than a void *, was missing. (gsmalloc.c) - An occurrence of dev should be pdev. (I can't understand how we missed this in 5.65.) (gdevprna.c) - A value was missing from a list of initial structure values, causing mismatches between subsequent values and the members they initialized. (gcc treated this as a warning: it should have given an error.) (gxband.h) - When setting the tile phase during banding, the old value of the tile phase was written out rather than the new one. (gxclutil.c) - The definition of fixed_mult_quo wasn't consistent between systems with FPU (where it took the floor, and might be slightly inaccurate) and systems without FPU (where it truncated towards zero, and was accurate). (gxfixed.h, genarch.c, gsmisc.c) - Banding devices using multi-screen halftones didn't set the halftone phase correctly. We have now "fixed" this problem at least 4 times. (gxclrast.c) - The name put_bytes was defined in two places, causing an error when linking with NOPRIVATE=1. (gsparams.c) - For [x][y]show, the pointers to the width arrays weren't initialized, causing memory access errors when checking or garbage collecting. (gschar.c) - Due to a typo, bitmap characters were fattened too much. (gximage1.c) - Some identifiers exceeded VMS's limit of 31 characters. (gdevprn.h, gscsepr.h, gsdevice.h, gxdevice.h, gdevdflt.c, gdevprn.c, gscsepr.c, gsdparam.c) - The device halftone parameter was declared const inappropriately in some places. (gsdcolor.h, gxdither.h, gxdcolor.c, gxdither.c) - gdev_mem_raster was used (misleadingly, even though it happened to produce the correct result) on possibly non-memory devices. (gxclread.c) - Pure Level 1 configurations had some undefined procedures. (gscolor1.c, gscspace.c) - Indexed color images could incorrectly conclude that they didn't need to re-render halftones, producing incorrect output. (gximono.c) - gs_device_is_memory returned false for non-banding printer devices: this didn't used to matter, but it matters now. We changed it to test the procedures rather than the device name. (gdevmem.c) - The plane extraction device didn't handle halftoned colors correctly. (gdevplnx.c) - If an error occurred while building a Function object, a crash could occur while freeing the partially built object. (gsfunc.c) - The plane extraction device didn't handle RasterOps correctly. (gdevplnx.c) - The colors-used mask could include some additional, invalid bits. (gxclrect.c) - The colors-used mask was updated incorrectly for RasterOps on subtractive-color devices. (gxclrect.c) - Memory devices didn't set enough option bits for the case where get_bits_rectangle had to do conversion. (gdevmem.c) - The TrueType font rasterizer didn't accept fonts whose 'type' was "true" rather than the documented <00 01 00 00>. (gstype42.c) - A bug in the Watcom compiler caused two conditional expressions to execute incorrectly. (gstype42.c) - When a page queue was freed, it attempted to free the page_info resource in the reserve entry, which is actually unused. (gxpageq.c) - A necessary #include was missing. (gdevmr2n.c) Reduces the size of band list entries for halftoned colors somewhat. (gxclpath.h, gxclpath.c, gxclrast.c) Increases the number of saved band color masks per page, mostly for testing. (gxband.h) Rewrites some macros, and one 'for' statement, to eliminate "statement not reached" compiler warnings. (gxcldev.h, gxpath2.c) Corrects a tiny inaccuracy in the computation of trapezoid coordinates. (gdevddrw.c) Edits the trapezoid fill code for greater readability and better documentation of its functioning. The new code runs a little slower on compilers that don't support 'inline'. (gdevddrw.c) Improves the documentation of the tile phase bookkeeping. (gxclrast.c) Documents the fact that fixed_mult_quo takes the floor if the first argument is negative. (gxfixed.h) Finishes implementing clipsave and cliprestore. (gxclipsr.h, gxistate.h, gzstate.h, gsclipsr.c, gsstate.c) Implements driver access to planar, rather than chunky, banding. (gdevplnx.h, gdevprn.h, gxclist.h, gxdevcli.h, gxrplane.h, gdevplnx.c, gdevprn.c, gxclread.c) Makes it possible to set up memory devices that allocate just the line pointer table (but not the bitmap), or neither the line pointers nor the bitmap. (gxdevmem.h, gdevmem.c) Moves gx_device_white/black to a more appropriate header file. (gxdcolor.h) Moves gx_default_make_buffer_device to a more appropriate file. (gdevdflt.c, gdevprn.c) Adds plane extraction and expansion utility procedures, required for the extended capability of get_bits_rectangle. (gsbitops.h, gsbitops.c) Extends get_bits_rectangle so it can return individual planes rather than all planes. (gdevplnx.h, gsbittab.h, gxbitfmt.h, gxgetbit.h, gdevdgbr.c, gdevdrop.c, gdevmem.c, gdevplnx.c, gsalphac.c, gsbittab.c) Factors out the two more complex cases of gx_get_bits_copy into single-use procedures for readability. (gdevdgbr.c) Makes public the procedure for reducing a colored halftone to a pure or binary halftone, needed for planar rendering. (gxdither.h, gxdither.c) Moves the client_data pointer from gs_state to gs_imager_state. (gxistate.h, gzstate.h, gsstate.c) Extends the plane extraction device to handle fill_mask and images efficiently. (gxcmap.h, gdevplnx.h, gdevplnx.c) Creates a procedure to make a temporary copy of a gs_imager_state, needed for planar image processing. (gxistate.h, gsstate.c) Makes getting the color mapping procedures for a device a virtual procedure of the imager state, needed for planar image processing. (gxcmap.h, gxistate.h, gxcmap.c, gxicolor.c, gximono.c, gxi12bit.c) Increases the amount of memory allocated to the asynchronous rasterizer, since we now may need a dynamically allocated line pointer table for the target (plane) memory device. (gdevprna.c) Adds a record of which bands have "difficult" RasterOps -- RasterOps that can't be executed, even in principle, in CMYK space. We don't do anything with this information yet, but we will have to. (gsropt.h, gxband.h, gxcldev.h, gxclpath.h, gxclist.c, gxclpath.c, gxclrect.c) Makes conversion from render_plane indices to bit ranges the responsibility of the device, not the client. (gxrplane.h)

Version 5.65 (internal) (11/13/98)

The main purpose of this fileset is to fix the MS Windows and OpenVMS build procedures, which have been broken since 5.60. It also adds the ability for a driver to determine efficiently which colors are used in a given page or band, which is important for separated color printing, and contains some early support for plane-separated color printing.

Incompatible changes

(Procedures) - Every platform-specific makefile must now define D_ and _D, the brackets for defining preprocessor macros. - The unix-cc.mak makefile has been renamed unixtrad.mak, since it only applies to "traditional C" compilers. (Drivers, Library) - Devices now store their TextAlphaBits and GraphicsAlphaBits values explicitly. The former get_alpha_bits procedure is obsoleted, and no longer implemented or called by any code we distribute. - gx_device_color_info now has additional fields. Code that constructed gx_color_info_values in any way other than by using the dci_ macros will no longer work.

Documentation

Fixes problems: - The -sPSFile= switch was still documented, even though it no longer exists. (doc/Use.htm) - The - "switch" wasn't documented in the list of switches, although it was documented elsewhere. (doc/Use.htm) - The documentation for the PC environments was out of date -- it didn't mention the use of subdirectories. (doc/Make.htm) Updates the documentation on PostScript files to indicate in what directory the files are distributed. (doc/Psfiles.htm) Documents more of the utility procedures used by printer drivers. (gdevprn.h) Notes that the public tar archives may not be compatible with the tar program in SunOS 4.1.3. (doc/Make.htm) Adds documentation on the Unix "make pg" target. (doc/Make.htm) Updates documentation to reflect the name change from unix-cc.mak to unixtrad.mak. (doc/Make.htm) Adds some links for the benefit of people who have built Ghostscript before and therefore skip reading the initial sections of the documentation. (doc/Make.htm) Documents the new -_ switch. (doc/Use.htm) Updates the documentation to mention PostScript LanguageLevel 3 and to remove many references to 16-bit systems. (doc/Language.htm)

Procedures

Fixes problems: - A cast discarded `const' needlessly. (genconf.c) - Upper-case echogs switches were getting converted to lower case on VMS. (jpeg.mak) - $(EXP) was missing before some invocations of executables. (gs.mak, jpeg.mak, lib.mak) - Some dependencies in the Unix install script were incorrect. (unixinst.mak) - Because of differences between shells, putting *.upp in the list of files to be installed didn't work with some shells. (unixinst.mak) - The PC makefiles were out of date. (bcwin32.mak, pcwin.mak, winint.mak, winlib.mak, dwmain.rc, gsdll32.rc) - Some makefiles still used $(DEV) instead of dev. (dvx-tail.mak, msvclib.mak, openvms.mak, os2.mak, pcwin.mak, watclib.mak, winlib.mak) - The DEVICE_DEVSn lists overflowed the DOS 120-character command line limit again. We had to add DEVICE_DEVS16 through 20 to work around this. (*.mak) - Preprocessor definitions have a different syntax on VMS. Fixing this required adding D_ and _D macros, similar to I_ and _I. This is a NON-BACKWARD-COMPATIBLE change, since these definitions are now required in each platform-specific makefile. (dvx-head.mak, openvms.mak, os2.mak, unixhead.mak, wccommon.mak, winlib.mak, zlib.mak) Adds command line switches to generate additional warnings when compiling the auxiliary programs with gcc. (unix-gcc.mak) Gets rid of the EXPP and SHP macros, since they aren't used or needed any longer. (gs.mak, bcwin32.mak, dvx-head.mak, msvccmd.mak, openvms.mak, os2.mak, unixhead.mak, watcw32.mak, wccommon.mak) Changes the Unix EXP to null, since all executables now use an explicit directory prefix. (unixhead.mak) Renames unix-cc.mak as unixtrad.mak, since people with ANSI-compatible cc were getting confused. (unix-cc.mak [deleted], unixtrad.mak) Adds a -_ switch, for piped execution with buffering. (iminst.h, imainarg.c)

Utilities

Fixes problems: - The revised ansi2knr didn't recognize "foo(void)" as a procedure definition. (ansi2knr.c) - ansi2knr didn't handle function definitions where the last formal parameter was a procedure parameter. (ansi2knr.c) Adds a utility for printing an informative error page if a PostScript job fails. (lib/errpage.ps, doc/Psfiles.htm, unixinst.mak)

Drivers

Fixes problems: - The [e]pswrite drivers produced incorrect output for images in non-Device color spaces. We fixed this by causing all other images to be handled as rectangles. This is clearly not satisfactory: we need to unify the PS and PDF writers in this area. (gdevps.c) - The CCITTFaxEncoded data produced by the [e]pswrite driver had both a Rows value and an EndOfBlock marker, which wasn't compatible with some Adobe interpreters. (gdevpsdf.c) - X devices couldn't be copied, because the copy didn't clear the list of X fonts and therefore tried to free it a second time. (gdevx.c, gdevxini.c) - gdevx.h declared a type called rect, conflicting with variables named rect. (gdevx.h, gdevx.c) - A function definition wasn't formatted properly to be recognized by ansi2knr. (gdevupd.c) - The PCL XL drivers crashed if given a masked image. (gdevpx.c) Adds a PBM driver that writes separated CMYK, using the colors-used masks to skip bands. (devs.mak, gdevpbm.c) Updates drivers that formerly supported the TextAlphaBits and GraphicsAlphaBits parameters themselves. (gdevmswn.h, gdevsvga.h, gdevpbm.c, gdevmswn.c, gdevpm.c, gdevwdib.c, gdevsvga.c, gdevxalt.c)

Platforms

Fixes problems: - The stack size on the Watcom platform was set too small. (watc.mak) - The OpenVMS platform code and makefiles had gotten out of date. (gp_vms.c, openvms.mak)

Interpreter

Fixes problems: - The size of Indexed color space lookup tables wasn't set, possibly causing them to be corrupted during garbage collection. (zcsindex.c) - A function definition wasn't formatted properly to be recognized by ansi2knr. (icontext.c) - quit was only rebound to stop in encapsulated jobs, rather than in any context under control of a job server. Since we don't currently have any explicit way to indicate whether execution is under control of a job server, we consider that it is under a job server iff startjob has ever been executed. (lib/gs_lev2.ps) Adds tracing output for removing an entry from a dictionary. (idict.c) Slightly improves dictionary deletion so that it can replace a run of deleted keys with empty keys. (idict.c) Adds statistics-gathering to the interpreter. (interp.c) Adds more statistics-gathering to the dictionary stack search. (idstack.c) Improves the debugging printout of packed arrays. (idebug.c) Increases the name table allocation increment from 128 names (1.5K) to 256 names (3K), to provide better scattering of name indices. (inamedef.h) Changes the name count / index mapping to provide better scattering. (inamedef.h)

Interpreter (PDF)

Fixes problems: - If a font other than the base 14 wasn't embedded and lacked a descriptor, an error occurred. (The PDF specification explicitly prohibits this, but Acrobat PDFWriter 3.02 for Windows produces PDF files with TrueType fonts that lack a descriptor.) (lib/pdf_font.ps)

Library

Fixes problems: - The computation of colors used by CMYK halftones was incorrect. (gxclpath.c) - Some header files had preprocessor directives with a space before the #, which pre-ANSI compilers don't accept. (gpsync.h, gsjconf.h, gsmemlok.h, gxsync.h, gxxfont.h) - A number of prototypes didn't use the Pn macros. (gscolor2.h, gscsepr.h, gsptype1.h, gspcolor.c) - A function definition wasn't formatted properly to be recognized by ansi2knr. (gxcht.c) - The algorithm for reducing single-plane CMYK halftones to binary halftones was incorrect (bug introduced in 5.60). (gxdither.c) - Writing a degenerate triangle or parallelogram in the band list could cause a memory access error when rasterizing. (gxclrast.c) Adds per-band "colors used" information to the information for a saved page, and procedures (gdev_prn_colors_used and gx_page_info_colors_used, defined in gdevprn.h) for accessing it. (gdevprn.h, gxband.h, gxclist.h, gdevprn.c, gxclist.c) Adds an internal device that appears to clients as a multi-plane color device, and extracts a single plane for actual rendering. This device will be used to support planar output devices. (gdevplnx.h, gsbitops.h, gdevplnx.c) Adds explicit color_info.text_anti_alias_bits and graphics_anti_alias_bits values in the device state, obsoleting the get_alpha_bits procedure, and makes them settable for all devices. (gxdevcli.h, gxdevice.h, gdevabuf.c, gdevdflt.c, gdevnfwd.c, gdevprn.c, gsdparam.c) Reformats some code for readability. (gxdither.c) Adds a tentative API for a procedure that allows band rasterizing directly into client's memory. This is tentative because we may need to add the ability to select an individual plane. (gdevprn.h)

Version 5.64 (internal) (11/5/98)

This is another incremental fileset to fix problems for an external customer.

Incompatible changes

(Drivers) - The output_page procedure of all drivers now must call gx_finish_output_page as its last action. (This doesn't affect ordinary printer or raster file drivers, which already call a common procedure.)

Documentation

Fixes problems: - The instructions for creating 'makefile' on Unix systems were out of date. (doc/Make.htm)

Procedures

Fixes problems: - An omitted return statement caused genconf to malfunction on some platforms. (genconf.c) - The replacement of MAKEFILES by TOP_MAKEFILES accidentally changed some comments that should not have been changed. (bcwin32.mak, gs.mak, msvctail.mak, openvms.mak, os2.mak, watcw32.mak, wctail.mak, winlib.mak)

Drivers

Updates drivers to call gx_finish_output_page where needed. (gdev3b1.c, gdevcgm.c, gdevcp50.c, gdevpdf.c, gdevmswn.c, gdevpm.c, gdevps.c, gdevpx.c, gdevsnfb.c, gdevwprn.c, gdevx.c)

Library

Fixes problems: - The FontBBox workaround introduced in 5.63 didn't work properly. (zchar1.c) - PageCount was getting incremented in the first device of a device pipeline, rather than in the last one and being propagated back. (gxdevice.h, gdevbbox.c, gdevdflt.c, gdevnfwd.c, gdevprn.c, gdevprna.c, gsdevice.c)

Version 5.63 (internal) (11/4/98)

This fileset was driven by the development needs of an external customer, primarily related to asynchronous rendering. It includes a few bug fixes as well.

Incompatible changes

(Procedures) - In the makefiles, changes the name MAKEFILES to TOP_MAKEFILES. (Library) - The pis member of the Type 1 interpreter state was renamed in order to catch places that assumed it was set. (It may now be 0.) This should not affect any client code. - gx_page_queue_dnit and gx_page_queue_finish_dequeue now free the band list information associated with the page_info in the queue entry. An explicit call of gx_page_queue_entry_free_page_info is now required to free this information before any other call of gx_page_queue_entry_free.

Documentation

Fixes problems: - devs.mak incorrectly referred to msdevs.mak rather than pcwin.mak. (devs.mak)

Procedures

Fixes problems: - There was a $ in the makefile that wasn't quoted. (unix-gcc.mak) - The name MAKEFILES has a special meaning in GNU make which only be disabled by using a directive that is a syntactic error for standard 'make' implementations. We had to work around this by changing all occurrences of MAKEFILES to TOP_MAKEFILES. (*.mak) - genconf did the wrong thing for modules with names shorter than 5 characters. (genconf.c)

Drivers

Updates the Canon BJC library, changing the names of the files. This code is still very preliminary. (gdevbjcl.h, gdevbjcl.c)

Interpreter

Fixes problems: - Some Type 1 fonts have a plausible but incorrect (too-small) FontBBox, causing some characters to be clipped. We work around this by enlarging the FontBBox and restarting the rasterization if the outline goes outside the FontBBox. (zchar1.c)

Library

Fixes problems: - gx_default_strip_copy_rop didn't check for zero width before dividing by it. (gdevdrop.c) - Some places that called a procedure returning void tried to use the return value. (gximage.c, gximage1.c, gximage4.c) - The flatness for rendering Type 1 characters was set incorrectly (always set to 0, producing best accuracy at extra cost) for characters not in portrait orientation. (gxtype1.c) - clist_begin_typed_image incorrectly used the memory manager client name "clist_begin_image". (gxclimag.c) - If a page queue entry was created without a page_info, the entry's page_info wasn't initialized, probably causing a crash when attempting to free the (nonexistent) associated band files later. (gxpageq.c) More fully supports the use of saved page_info objects for decoupling banded rendering from band list construction: - Adds the ability to close and free the command list associated with a saved page. (gxclist.h, gxclist.c) - Separates freeing of the band list information associated with a page queue entry from freeing the entry itself. (gxpageq.h, gxpageq.c) - Changes the rendering thread for asynchronous band rendering so that it doesn't try to free the band list information twice. (gdevprna.c) Implements triangles and parallelograms in the band list, primarily for the sake of smooth shading. (gxclpath.h, gxclist.c, gxclpath.c, gxclrast.c) Adds a rectangle merging procedure, parallel to rectangle intersection. This is needed for the FontBBox fix. (gsrect.h) Adds logic for keeping track of what pixel values are used in which bands. Currently this information is not used for anything. (gdevmrop.h, gsropt.h, gxcldev.h, gxclpath.h, gxclrect.c, gxclpath.c, gxclimag.c) Updates a few more files for readability and coding conventions. (gxband.h, gxpageq.c) Updates users of gxband.h and gxpageq.h. (gdevprn.h, gxclist.h, gxpageq.h, gdevprna.c, gxclpage.c, gxclread.c) Moves the definition of the page queue into the (private) implementation file. (gxpageq.h, gxpageq.c)

Version 5.62 (internal) (10/31/98)

This fileset concludes this round of work on (primarily color) performance improvement. It contains almost no new bug fixes.

Incompatible changes

(Library) - Clients that load the CIE caches themselves must now reset the procedures to the _from_cache values. (This affects the PostScript interpreter, but no ordinary library clients.) - gs_cie_compute_wbsd (an internal procedure) was changed to gs_cie_compute_points_sd, with different parameters.

Documentation

Adds information about problems with PDF files copied from Macintosh environments. (doc/Use.htm)

Drivers

Adds a library for generating Canon BJC commands. This code is subject to change without notice! (gdevcbjc.h, gdevcbjc.c)

Interpreter

Fixes problems: - The structures allocated for CIE RenderTables weren't marked correctly for garbage collection, possibly mangling the output. (zcie.c) - The CIE color space procedures weren't reset after the cache was loaded, producing incorrect output now that it matters. (zcie.c, zcrd.c)

Library

Fixes problems: - Under some circumstances, a setbbox didn't take effect. (gxpcopy.c) - The last step of CIE color mapping didn't clamp the very top end of the range correctly. (gsciemap.c) Speeds up bits_replicate_horizontally a bit more. (gsbitops.c) Separates the CIE color mapping code from CIE cache loading, since the file was getting too big. (gscie.h, gscie.c, gsciemap.c) Finishes adding the hooks for skipping steps during CIE color mapping when possible, and implements one case of step-skipping. (gscie.h, gscie.c, gsciemap.c, gscrd.c) Adds more tracing to the CIE color machinery. (gscie.c) Changes the default number of tiles for the colored halftone screen caches from 1 to 4, substantially reducing cache turnover. (gsht1.c, gshtx.c, gxclrast.c)

Version 5.61 (internal) (10/28/98)

More rendering speedups, and fixes for many of the minor problems reported in 5.50.

Docmentation

Fixes problems: - There were still some incorrect references to .txt files. (gs.mak, libpng.mak) - Two references to libpng should have referred to libjpeg. (gs.mak)

Procedures

Fixes problems: - GNU 'make' treats the name MAKEFILES specially. (unix-gcc.mak) - genconf didn't sort libraries in the right order. (genconf.c) - The dependency for ansi2knr, and the invocation of ccgs, didn't include the directory name. (ccgs, unix-cc.mak) - The CC_ and CCAUX rules didn't invoke the new ccgs correctly. (unix-cc.mak) - There was a typo in a comment. (unixtail.mak) - gcc versions of the form 2.7.2.f.1 weren't recognized as having the const-related code generation bug. (unix-gcc.mak) Documents workaround for bugs in newer IRIX compilers. (doc/Make.htm)

Utilities

Fixes problems: - ansi2knr didn't understand the new formatting of the enum_ptrs and reloc_ptrs procedures, which now don't have a left brace on the same line as the macro call that defines the procedure. (ansi2knr.c) Adds a utility for viewing MIFF files. (lib/viewmiff.ps)

Drivers

Fixes problems: - The X driver could report a depth (e.g., 15 bits) that caused problems elsewhere. (gdevxini.c) - With the X driver, if the display is grey-scale or does not have enough colors to allocate a color ramp, Ghostscript crashed in x_map_color_rgb due to an array index overflow. (gdevx.c) - The PDF writer used the X scaling of fonts to determine the point size rather than the Y scaling, which gives the wrong result for synthetic condensed fonts. (gdevpdft.c) - If the last thing written before a flushpage was text, the X driver might fail to display it. (gdevx.c) - The PDF writer didn't free the streams created for image compression, causing a memory leak. (gdevpsdf.c) - pswrite didn't output a command to set the page size. (gdevps.c) Removes an obsolete comment and commented-out line. (gdevxalt.c)

Interpreter (PDF)

Fixes problems: - Explicit (not resource) Indexed color spaces caused an error. (lib/pdf_draw.ps)

Streams

Fixes problems: - The PNGPredictor filters didn't free their row buffer. (spngp.c) - The PNGPredictor filters didn't handle end-of-data correctly. (spngp.c) Changes the eexec filter to ignore % characters when reading ASCIIHex-encoded data. This is contrary to the Adobe documentation, but one badly coded prologue requires it. (seexec.c)

Library

Fixes problems: - The definition of TRANSPARENCY_PER_H_P was in the wrong module, causing it to be ignored. (gdevmrop.h, gdevdrop.c) - There was a typo in the tracing output for init_tile_cursor. (gxcht.c) - gx_get_bits_copy computed the standard raster incorrectly if the destination used a different color representation from the source, causing multi-line transfers to be done incorrectly. (gdevdgbr.c) - Parentheses were missing around the use of width_bits in the definition of bitmap_raster, possibly causing incorrect computation. (gxbitmap.h) - When rendering a Pattern, a singular CTM caused an error even if the Pattern was empty. (gspcolor.c) - The lookup table wasn't allocated for device-originated CRDs. (gscrdp.c) - If an error occurred when setting up to rasterize a band, data_bits could be freed without ever having been initialized. (gxclrast.c) - Processing a CIE-color image with a color space different from the current color space caused an error. (gscie.c) - The speedup for bits_replicate_horizontally had an algorithm error, producing incorrect output. (gsbitops.c) Splits up the memory device implementation of RasterOp, since the file was getting too large. (gdevmem.h, gdevm1.c, gdevm8.c, gdevm16.c, gdevm24.c, gdevm32.c, gdevmrop.c [deleted], gdevmr1.c, gdevmr2n.c, gdevmr8n.c, gsnorop.c) Cleans up a little formatting. (gsbittab.h) Speeds up the default RasterOp implementation some more. (gdevdgbr.c, gdevdrop.c, gdevmem.c) Speeds up testing whether a given halftone level is already present in its cache. (gzht.h, gxht.c) Speeds up 1-bit CMYK halftones a bit more. (gxcht.c) Makes filling always use the (much faster) trapezoid-based algorithm if the region being filled is a rectangle. (gxfill.c)

Version 5.60 (internal) (10/18/98)

This fileset incorporates many performance enhancements for 1-bit CMYK devices, especially for PCL 5c interpretation. This fileset divides the files into subdirectories. In the lists of changed files, files with no explicit subdirectory name are in the src subdirectory. The revised OpenVMS and OS/2 makefiles have not been tested.

Incompatible changes

(Procedures) - The instructions for font compilation in doc/Fonts.htm are different. - The fileset has been split into multiple directories; the source code and makefiles are now in src/. - The top-level makefile requires a definition for BINDIR for the directory to hold the final executable. - Every .dev rule of the form xxx.dev: $(SETyyy) xxx $(ADDMOD) xxx must be changed to $(DD)xxx.dev: $(SETyyy) $(DD)xxx $(ADDMOD) $(DD)xxx (DD for drivers, PSD for PostScript/PDF-interpreter features, GLD for graphics library features). Every -include and -replace option in the makefiles rules, and every element of FEATURE_DEVS and DEVICE_DEVS*, must be changed similarly. This is very unfortunate, especially since people editing FEATURE_DEVS and DEVICE_DEVS* must now know which subsystem implements a particular feature; but we tried 3 different ways to get the generated .dev files out of the top-level directory, and this was the only one we could make work. - Top-level makefiles must define both MAKEFILE and MAKEFILES, the latter to include any subsidiary makefiles that define configuration parameters. Dependencies on $(MAKEFILE) must be changed to $(MAKEFILES). - Color space objects now must either be allocated with the gs_cspace_build_ procedures or initialized with the gs_cspace_init_ procedures: building color spaces "by hand" is no longer allowed. (Library) - There are new required elements of the gs_image_type_t structure. - The binary and colored variants of gx_device_halftone have changed. (No APIs are affected.) - If a device changes its (effective) color mapping algorithm other than as a side effect of put_params, it must call gx_device_decache_colors(dev).

Documentation

Fixes problems: - Some files still referred to .doc files rather than .htm. (gsiparam.h, imain.h) - Version 5.50 was incorrectly identified as a beta version. (doc/News.htm) - The instructions for cross-compilation were seriously incomplete. (doc/Make.htm) Adds a text-only README file. (doc/README) Updates the instructions for font compilation. (doc/Fonts.htm) Updates the instructions for device and feature selection. (doc/Make.htm) Adds material on 8.3 file names, compiler warning messages, and graphics library error codes to the C style guide. (doc/C-style.htm) Adds a note about gx_device_decache_colors. (doc/Drivers.htm) Improves formatting slightly. (doc/Install.htm, doc/Use.htm)

Procedures

Fixes problems: - The Unix install script referred to an obsolete ps2image.ps file. (unixinst.mak) - The Unix CC script had some duplicated definitions. (unix-cc.mak) - The DVX makefile referred to int.mak in GLSRC rather than PSSRC. (dvx-gcc.mak) - rollconv.ps wasn't installed with the other utilities. (unixinst.mak) - Some definitions of MAKEFILE lacked a directory name. (os2.mak, unix-cc.mak, unixansi.mak, watclib.mak) - There were inappropriate dependencies on a file with the literal name `makefile'. (bcwin32.mak, gs.mak, watc32.mak) - Unix systems didn't use -fomit-frame-pointer when possible. (unix-cc.mak, unix-gcc.mak, unixansi.mak, unix-end.mak) Restructures the source files into multiple subdirectories: src/ - files needed at build time: *.mak, *.h, *.c, *.cpp, *.icx, *.rc, *.cmd, ??.bat, *.com, *.rps, *.dif, *.cfg lib/ - files needed at run time: *_*.ps, *.ppd, *.upp, *.bat doc/ - documentation other than man pages: *.htm, *.txt man/ - man pages: *.1 examples/ - sample input data: *.ps, *.eps, *.pdf Also incorporates the font compilation makefile into the main makefile, since the former now depends on parameters defined in the latter. (*.mak) ****** HAVEN'T SETTLED HOW TO HANDLE .ico FILES ****** NOTE: Still need to update: openvms.mak, os2.mak. Updates the Unix install script for the directory split. (unixinst.mak) Updates the font compilation makefile rules to handle alternate directories. (cfonts.mak, int.mak) ****** PROBLEM: cfonts.mak NEEDS CCFONT, BUT int.mak NEEDS CF* FOR ADDING ONE'S OWN FONTS ****** Removes useless dependencies on gs_*.ps files. (int.mak) Moves the .dev files into the GEN directories where they belong. (gs.mak, dvx-tail.mak, msvclib.mak, openvms.mak, os2.mak, pcwin.mak, ugcclib.mak, unixhead.mak, unixtail.mak, unix-end.mak, watc.mak, watclib.mak, winlib.mak, echogs.c, genconf.c) ****** NO_OP FOR dvx HASN'T BEEN VERIFIED ****** NOTE: Still to do: src/bcwin32.mak src/dvx-gcc.mak src/dvx-head.mak src/dvx-tail.mak src/msvc32.mak src/msvccmd.mak src/msvclib.mak src/msvctail.mak src/openvms.mak src/os2.mak src/pcwin.mak src/ugcclib.mak src/watc.mak src/watclib.mak src/watcw32.mak src/wccommon.mak src/wctail.mak src/winint.mak src/winlib.mak Adds a new BINDIR directory for the final executable (and associated files like resource files). After building, only the contents of BINDIR and lib are needed for execution. (gs.mak, unix-end.mak) ****** NEED TO DO openvms.mak, os2.mak, OTHER PC MAKEFILES ****** Updates libpng to version 1.0.2. (libpng.mak)

Utilities

Adds a new switch, -b, to echogs. (echogs.c)

Drivers

Updates the PDF writer for the change in color space initialization. (gdevpdfi.c) Speeds up the pkmraw driver a bit more. (gdevpbm.c) Updates some drivers to use the new CMYK color mapping procedures. (gdevpbm.c, gdevpcx.c, gdevxalt.c) Updates one driver that maintained its own color cache. (gdevxalt.c) Removes some compiler warnings (mostly about "uninitialized" variables). (gdevpdfo.c, gdevpdft.c, gdevpx.c) Adds another driver for the H-P Color LaserJet 5/5M. (gdevcljc.c)

Platforms

Fixes problems: - A change in the MetroWerks C compiler caused the hypot function to become declared. (math_.h)

Interpreter

Updates the compiled font code for updates in the type declarations. (iccfont.c, icfontab.c) Cleans up some more formatting and macros. (ccfont.h, errors.h, icfontab.c, interp.c) Updates clients for the change in color space initialization. (zcsdevn.c, zcsindex.c, zcspixel.c, zcssepr.c, zpcolor.c) Updates the memory validator for the addition of the large-block freelist. (ilocate.c)

Interpreter (PDF)

Fixes problems: - If the final %%EOF was followed by any blanks before the newline, an error would occur. (lib/pdf_main.ps)

Streams

Fixes problems: - The LZWDecode filter wouldn't handle a file that had 4096-256-2+1 data items before the reset. (We think this is a bug in the file, but Acrobat accepts it.) (slzwx.h, slzwd.c) Rearranges code slightly to improve readability. (spdiff.c)

Library

Fixes problems: - Changing the resolution (or any other parameter) of the bbox device from the command line caused an invalid memory access. (gdevbbox.c) - When banding, if the very first drawing operation involved a halftone with non-zero phase, an arithmetic exception occurred. (gxclpath.c) - When banding, the X offset of the band was negated, producing incorrect output when placing multiple source pages on a single output page. (gxclread.c) - When banding, rotated images crossing band boundaries produced incorrect output, because the subrectangle X value was inconsistent with the amount of data transmitted. (gxclimag.c) - When banding, the clipping check didn't take interpolation support into account. (gxclimag.c) - The clipping check for banding used (int) to take the floor of floating point values, which is wrong for negative values. (gxclimag.c) - The bounding box device didn't return an empty bounding rectangle if nothing had been written to it. (gdevbbox.c) - A value was conditional on a debugging switch even if DEBUG wasn't defined. (gxcht.c) - Filling a region with a large colored halftone, a non-default RasterOp, and a non-null RasterOp source could cause only part of the region to be filled. (gxcht.c) ****** NOT FIXED YET ****** - Type 1 fonts that used very large numbers (>= 2^19) caused a rangecheck. We've fixed this for the only case that seems to matter, namely div. (gxtype1.h, gstype1.c) - The memory-based band list allocator failed to return an error code from memfile_next_blk. (gxclmem.c) - When recovering from a low-band-list-memory condition while writing an image, the record of the current image enumeration (cdev->image_enum_id) wasn't updated. (gxclimag.c) - The estimated memory requirement for the band list rasterizer was too small. (gdevprna.c) Adds some tracing to mask clipping. (gxclipm.c) Speeds up masked images by doing mask clipping before halftoning, using a more efficient mask scanning algorithm, and checking for vertical blocks of 1s. (gxclipm.c) Speeds up ImageType 4 images greatly by incorporating the color-key check into the ImageType 1 rendering code. NOTE: the 12-bit case has not been tested. (gxcpath.h, gximage.h, gxi12bit.c, gxicolor.c, gxifast.c, gxiinit.c, gximage4.c, gximono.c, gxiscale.c) Implements passing ImageType 4 images (and potentially others) through the band list. This involves adding image parameter writing and reading procedures to the image type structure. (gscdefs.h, gsiparam.h, gsiparm2.h, gsiparm4.h, gsmatrix.h, gxclpath.h, gxiparam.h, gconf.c, genconf.c, gsmatrix.c, gxclimag.c, gxclist.c, gxclpath.c, gxclrast.c, gxiinit.c, gximage2.c, gximage3.c, gximage4.c) Splits off the generic image support code from the ImageType 1 code. (gxiinit.c [deleted], gximage.c, gximage1.c, gxipixel.c) Removes some vestiges of support for 16-bit environments. (gsmisc.c) Implements bit-planar images, important for PCL interpretation. (gsiparam.h, gximage.h, gxiparam.h, gdevddrw.c, gdevpdfi.c, gdevps.c, gsimage.c, gxclimag.c, gxidata.c, gximage.c, gxipixel.c) ****** NOT TESTED YET ****** Makes closing a memory device that owns its bitmap set the bitmap pointer to 0, for the sake of an application that doesn't handle is_open properly. (gdevmem.c) Speeds up floating-point emulation for single-precision add, subtract, and multiply. (gsfemu.c) Speeds up sampling of transfer functions. (gshtx.c) Makes the CIE cache used fixed-point values if the CPU has slow floating point. (gscie.h) Adds a unique ID to color spaces to allow fast detection of reselecting the same color space. This matters for certain client code that repeatedly reselects the same color space, since selecting certain color spaces is expensive. (gscpixel.h, gscspace.h, gxcspace.h, gscolor2.c, gscpixel.c, gscscie.c, gscspace.c, gspcolor.c, gsstate.c, gximage2.c) ****** NEED TO FIX gxclrast.c TO ALLOC INDEXED COLOR SPACE ****** Speeds up setting Pattern color spaces, by bypassing the install code for the base space. (gspcolor.c) Adds a unique ID to CRDs to allow fast detection of reselecting the same CRD. This matters for certain client code that does this repeatedly. (gscie.h, gscrd.h, gscrd.c) Detects setting the CRD to one with identical PQR components, and bypasses an expensive setup step. (gscie.c) Speeds up converting pixels between representations (gx_get_bits_copy) for devices with up to 4 bits per pixel, by caching the pixel values. (gdevdgbr.c) Speeds up the slow default RasterOp algorithm a little. (gdevdrop.c) Defines standard mapping procedures for 1-bit-per-component CMYK colors. Other code can then test for the presence of these procedures and use more efficient algorithms. (gxdevice.h, gxcmap.c) Speeds up some algorithms in the bbox device by making some recursive calls use a pure color rather than a client-supplied one. (gdevbbox.h, gdevbbox.c) Adds a cache for the black and white pixel values to the device structure. (gxdevcli.h, gxdevice.h, gdevalph.c, gdevnfwd.c, gsdparam.c, gxdcolor.c) Makes the code for colored halftones a little more readable. (gxcht.c) Speeds up color mapping for CMYK devices by copying the color mapping procedures into forwarding devices, when applicable. (gdevcmap.c, gdevmem.c, gsdevice.c, gxclip.c) Removes some compiler warnings (mostly about "uninitialized" variables). (gxcldev.h, gsdevmem.c, gsshade.c, gstype42.c, gxclpath.c, gxfill.c, gximage3.c, gxpath2.c, gxpcopy.c) For the benefit of certain client code that commonly sets a CRD and then doesn't use it, makes loading of the joint CIE caches lazy (at the library level). (gscie.h, gscie.c) Changes CIE color restriction from a macro to a procedure, since it is rarely used. (gscie.c) Adds code and structures for detecting when CIE Decode and/or Encode procedures are simply linear transformations, which would allow collapsing them into the adjacent matrix, but doesn't actually do the collapsing. (gscie.h, gscie.c) Speeds up color halftoning by pre-computing the mask of planes that need to be halftoned, and preconverting multi-plane halftones to binary or solid colors when possible. (gsdcolor.h, gxcht.c, gxdcolor.c, gxdither.c, gxht.c) Optimizes color mapping for 1-bit-per-component CMYK halftones. (gxcht.c) Optimizes null RasterOp sources for black = 1 as well as black = 0. (gxdcolor.c) Modifies the standard allocator so it keeps track of large free blocks as well as small ones, and uses them to satisfy requests when appropriate. (gxalloc.h, gsalloc.c) Speeds up the horizontal bitmap replication code a bit. (Much more is possible.) (gsbitops.c) Changes gs_image_max_planes to gs_image_max_components to reflect its function more accurately. (gdevddrw.c)

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

This file is part of Aladdin Ghostscript. See the Aladdin Free Public License (the "License") for full details of the terms of using, copying, modifying, and redistributing Aladdin Ghostscript.

Ghostscript version 5.70, 20 February 1999