History of Ghostscript versions 9.xx

Table of contents

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

History of Ghostscript versions 8.n
History of Ghostscript versions 7.n
History of Ghostscript versions 6.n
History of Ghostscript versions 5.n
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.


Version 9.14 (2014-03-26)

This is the tenth full release in the stable 9.x series, and is primarily a maintenance release.

Highlights in this release include:

For a list of open issues, or to report problems, please visit bugs.ghostscript.com.

Incompatible changes

No recorded incompatible changes.

Changelog

2014-03-14 10:00:05 +0000
Chris Liddell <chris.liddell@artifex.com>
b65f4e9d7cdd32981680a5486e1c1c320ac4046e

Update version number, release and copyright dates.

gs/Makefile.in
gs/Resource/Init/gs_init.ps
gs/base/gscdef.c
gs/base/version.mak
gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/SavedPages.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/WhatIsGS.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/doc/thirdparty.htm
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1
gs/psi/msvc.mak
gs/psi/winint.mak


2014-03-18 11:41:44 -0700
Ray Johnston <ray.johnston@artifex.com>
20f8aebb83a88ca225b67c3bbf5e6dae936349b0

Fix Segfaults caused by 'vertical stripe' fix (f18fac0).

The done flag is no longer needed and caused us to exit the while
loop before processing enough of the data.

Also, move_landscape_buffer could end up with position_curr ==
position_new so we were moving 'in place' (wasting time). Fix that.

gs/base/gxht_thresh.c


2014-03-17 13:07:37 -0700
Michael Vrhel <michael.vrhel@artifex.com>
7458c4b5eed25b49ba15dcb37b6dd2ec1d6f0089

Fix to turn of BPC when we are using the Gray_to_K ICC profile.

This appears to be a bug in lcms. Will follow up with Marti. Also fix for tiff64nc. In the test
tiff_compression_allowed we were missing the test for the 16 bit case. Surprisingly this commit
results in progressions in the 8 bit device outputs too when we have a gray source and going
to a CMYK device.

gs/base/gsicc_cache.c
gs/devices/gdevtifs.c


2014-03-13 20:35:53 -0700
Ray Johnston <ray.johnston@artifex.com>
c23cde8b44a751a787636a7747b42b2da7911922

Fix sporadic vertical stripes with planar fast image thresholding (pkmraw)

In the landscape code, only the data for the last plane was being moved
to the start of the contone data for the next 32 lines of output. Seen
with -sDEVICE=pkmraw -dUsePlanarBuffer J8_landscape.ps but any landscape
image could have the problem. New code moves all planes and only resets
the ht_landscape parameters after all planes have been processed and
output (via copy_planes).

gs/base/gxht_thresh.c


2014-03-14 09:40:22 +0000
Chris Liddell <chris.liddell@artifex.com>
7784cce96478d8bcec314e2dc8ecb3d3a849c37b

Add missing newline to memento error logging.

CLUSTER_UNTESTED

gs/base/memento.c


2014-03-11 08:31:32 -0700
Ray Johnston <ray.johnston@artifex.com>
c34097f6786f809826a30484e69684adf4915e9a

Fix output color values of pkm and pkmraw for GrayValues > 2.

In the header we indicate the max value is 255, so the output values
need to be scaled to that, not the color_info.max_color. We stay with
255 since many viewers cannot display PPM files with other that 255
as the max (ignoring the max value in the header).

gs/devices/gdevpbm.c


2014-03-13 11:43:24 +0000
James Cloos <cloos@jhcloos.com>
685e801f7de04d087166e24b3373ab16dcca57bc

Bug 695080: fix typo in the pngmono device declaration

which caused pngmono to threshold rather than halftone at or above 150 dpi.

No cluster differences.

gs/devices/gdevpng.c


2014-03-13 13:47:56 +0000
Robin Watts <robin.watts@artifex.com>
303b48577602fb78df5fa40eb2de1d8e73245afa

Bug 695090: Solve memory overwrite with pkmraw in planar mode.

When using -dUsePlanarBuffer with the pnm devices, we run the
underlying rendering in planar mode, but then expect 'getbits'
to return chunky pixels. As such, the memory we allocate to
'getbits' into should be allocated for chunky mode, not for
planar mode.

gs/base/gdevprn.h
gs/base/gsdevice.c
gs/base/gxdevcli.h
gs/devices/gdevpbm.c


2014-03-13 11:19:11 +0000
Chris Liddell <chris.liddell@artifex.com>
f2fde5b9596318796f4ffd8d356116b1bb203ae3

Delete gs_fform.ps

If we want to cache forms, we should implement it properly.

CLUSTER_UNTESTED

gs/lib/gs_fform.ps


2014-03-13 10:53:49 +0000
Andreas Schwab <schwab@linux-m68k.org>
becedfbfdbd9dee77825ff245f48c0acc9d03252

Bug 695058: force correct struct ref_s size

On compilers that tightly pack structures (i.e. don't pad to alignment
boundaries), struct ref_s could end up as 14 bytes instead of 16 bytes,
thus breaking requirement in the garbage collector.

This is less than ideal, and would be better achieved using the same trick
we use for the alignment of obj_header_s in base/gxobj.h, linking the structure
size to the obj_align_mod, but as on the majority of systems struct ref_s is
already 16 bytes, that results in a zero byte array which notable compilers (at
least MSVC, and probably others) to error.

No cluster differences,

gs/psi/iref.h


2014-03-13 09:27:28 +0000
Chris Liddell <chris.liddell@artifex.com>
fdaa74efeebb753db1855eaf6a3a824ecbf1231e

Remove deprecated glyph mapping code.

No cluster differences.

gs/Resource/Init/gs_ttf.ps
gs/Resource/Init/gs_type1.ps


2014-03-12 17:18:25 +0000
Chris Liddell <chris.liddell@artifex.com>
fe0b8fcfb69246cbea99b85f453ed6c3c83f4592

Bug 693380: raise file path/name size limit to 4k

And move as many cases of paths allocated on the stack to heap memory as is
reasonable.

No cluster differences.

gs/base/gdevdevn.c
gs/base/gp.h
gs/base/gsdevice.c
gs/base/gsiodisk.c
gs/base/gsiomacres.c
gs/base/gsparam2.c
gs/devices/gdevtsep.c
gs/devices/vector/gdevxps.c
gs/psi/zfile.c
xps/xpsjxr.c


2014-03-13 10:35:33 +0000
Ken Sharp <ken.sharp@artifex.com>
83b6646951fee8fe153d14d3e2d7da75894b922a

PDF interpreter - fix multiple xref stream reading

Bug #695086 "**** Error: Trailer is not found."

When reading Xref streams, the PDF interpreter resizes its internal xref
tracking objects by looking at the /Size of the stream and making sure
the objects are at least that big. However it did not account for the fact
that an Xref stream may not start with object 0.

In this case the first stream encountered had a /Size of 2, and an /Index
of [6 0]. This meant that we allocated objects of size 2, then tried to store
into location8, which naturally failed.

This commit adds the /Index (starting object number) to the /Size before
ensuring the objects are large enough.

No differences expected

gs/Resource/Init/pdf_main.ps


2014-03-12 21:25:39 -0700
Marcos H. Woehrmann <marcos@inches.(none)>
fadf80da45458db57cffdd90f1ed6c57aa31e51f

Fixed typo in Devices.htm.

gs/doc/Devices.htm


2014-03-12 15:52:34 +0000
Ken Sharp <ken.sharp@artifex.com>
94d070553225e0a8fb38157e081e9496dee8fde5

pdfwrite - remove deprecated code

Before the release of 9.06 I #ifdef'ed a load of code as deprecated. Nobody
has found any problems, so I'm removing the code.

gs/devices/vector/gdevpdf.c
gs/devices/vector/gdevpdfb.h
gs/devices/vector/gdevpdfp.c
gs/devices/vector/gdevpdfu.c
gs/devices/vector/gdevpdfx.h
gs/devices/vector/gdevpdt.h
gs/devices/vector/gdevpdte.c
gs/devices/vector/gdevpdtf.h
gs/devices/vector/gdevpdtt.c
gs/devices/vector/gdevpdtw.c
gs/devices/vector/gdevpsds.c


2014-03-12 13:32:05 +0000
Ken Sharp <ken.sharp@artifex.com>
0598a205e9293fcaf548571624d93f534afa098d

Documentation - remove %ram% from the projects, as it is completed

gs/doc/Projects.htm


2014-03-12 09:33:24 +0000
Ken Sharp <ken.sharp@artifex.com>
8fad68f7c27f16cf78967443322bc4f638649f27

Update documentation for the pdfwrite family

devices.htm - change epswrite references to eps2write, note that support for
language level 1 output is now removed.

drivers.htm - alter pswrite to ps2write

use.htm - alter epswrite to eps2write

issues.htm - remove a surprisingly large number of documented issues which
appear to be no longer issues. Note that epswrite is deprecated.

ps2pdf.htm - improve the documentation of PDF/A and PDF/X output and correct
the places where it was incorrect with the new colour management.

No differences.

gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Issues.htm
gs/doc/Ps2pdf.htm
gs/doc/Use.htm


2014-03-11 09:58:31 -0600
Henry Stiles <henry.stiles@artifex.com>
ee30f349671e3a23d666615f1648eab4a5290b4c

Abbreviated escape sequence improvement.

Abbreviated escape sequences were not handled properly with commands
that hold arbitrary amounts of data, like raster and font related
commands. PCL shorthand is rarely used in this circumstance
but it is legal. Thanks to Hin-Tak for the discovery and analysis of
this problem.

pcl/pcparse.c
pcl/pcparse.h


2014-03-09 16:11:24 +0000
Chris Liddell <chris.liddell@artifex.com>
4c2f426905b4bf300f6b412024d71cd2be6276de

Remove GhostSVG.

No cluster differences.

Makefile
gs/configure.ac
svg/ghostsvg.h
svg/svg.mak
svg/svg_gcc.mak
svg/svg_msvc.mak
svg/svgcolor.c
svg/svgcolorlist.h
svg/svgdoc.c
svg/svgshapes.c
svg/svgtop.c
svg/svgtransform.c
svg/svgtypes.c
svg/svgxml.c


2014-03-09 15:54:06 +0000
Chris Liddell <chris.liddell@artifex.com>
8dacc34a50174bceac7786ce47466d9a71547955

Remove SVG writer from Ghostscript/GhostPDL

No cluster differences.

gs/Makefile.in
gs/configure.ac
gs/devices/devs.mak
gs/devices/vector/gdevsvg.c
gs/psi/msvc.mak


2014-03-06 11:57:00 -0800
Ray Johnston <ray.johnston@artifex.com>
22ebcc33db33aa15399a6836e48953736256eb41

Fix UseFastColor during clist playback.

Discovered with customer 532, the default_match was not set early
enough in gsicc_get_link for the index to be correct, effectively
disabling usefastcolor mode. As a result images could be rendered
with ICC based color transform instead of the 'nocm' fastcolor
methods.

gs/base/gxclimag.c
gs/base/gxclist.h
gs/base/gxclrast.c


2014-03-08 20:29:30 +0000
Chris Liddell <chris.liddell@artifex.com>
f5457548e8162438a43b1aeb2040e34c001adaa4

Use malloc/free for lcms(2) shared lib build.

No cluster differences.

gs/base/gsicc_lcms.c
gs/base/gsicc_lcms2.c
gs/base/lcms.mak
gs/base/lcms2.mak


2014-03-07 17:00:28 +0000
Ken Sharp <ken.sharp@artifex.com>
58121374ed0d12aa38c872eb4d069b75ed5875d5

cast to silence a compiler warning

gs/base/gdevvec.c


2014-03-07 13:41:01 +0000
Ken Sharp <ken.sharp@artifex.com>
94c5ecffe4bf66cc91108d99a802c7c2d3b86e0b

PS interpreter, vector devices and pdfwrite - remove setdash limit of 11

Bug #693916 "setdash does not accept more than 11 elements in the array argument"

The PostScript interpreter was already capable of this, it simply required
the limit check to be removed. The vector device needed to allocate and
free an array of floats, rather than maintain a fixed size array.

pdfwrite was teh most complex as it maintains a stack of gstates, and these
also needed to be modified to allocate and free the dash array. However the
gstate stack wasn't already a garbage collecting structure. Rather than going
to the effort of turning it into one I've opted to allocate the dash pattern
from non-gc memory.

A few PCL files show differences with pdfwrite, because previously pdfwrite
would throw an error (more than 11 elements in the dash array) and the stroked
lines would degenerate into filled rectangles, whereas now they are drawn as
stroked lines with a correct dash pattern. This is much more efficient.

The clist remains unmodified, Ray assures me that it will be handled there
without problems.

gs/Resource/Init/gs_init.ps
gs/base/gdevvec.c
gs/base/gdevvec.h
gs/devices/vector/gdevpdf.c
gs/devices/vector/gdevpdfg.c
gs/devices/vector/gdevpdfx.h


2014-03-05 09:47:52 -0800
Ray Johnston <ray.johnston@artifex.com>
4b16c45c3b834efb9ff9608360d3c053e91b1f23

Fix UseFastColor ignored for pages with transparency.

Found when researching problem from customer 532.

gs/base/gdevp14.c


2014-03-03 12:21:12 -0800
Ray Johnston <ray.johnston@artifex.com>
e63f9d066c001052f5594f09c3a3a59ff80d2d03

Fix problem with -d***Values=16 and bitrgb device.

The max_gray and max_color would confuse the gx_device_must_halftone
macro because setting -dGrayValues=16 would end up setting the
max_gray and max_color to 31 (0x1f) which does NOT halftone. with
the change setting to 16 values doesn't change the bpc if put_params
is called again. Also remove allowing -dGrayValues=32 from supported
choices.

gs/devices/gdevbit.c


2014-03-05 08:54:56 +0000
Ken Sharp <ken.sharp@artifex.com>
b442d9a0c193d2d0114e72e1312e7bcc6e558aab

pdfwrite revert 3894e9c8a3ab125c82048da3bf81515500bb2da0


Bug #695083 " Regression: pdfwrite DEVICE generates extra page with -dLastPage= option"
This wasn't a customer bug report, and it doesn't work well with PCL, when
specifying -dLastPage, so I've decided just to revert it.

A very few PCL files are flagged by the cluster as different, but there are
no bmpcmp diffs.

gs/devices/vector/gdevpdf.c


2014-03-03 17:34:08 +0000
Robin Watts <robin.watts@artifex.com>
9a68412d171e5c998026a13dffcbc90ef9d477b9

Bug 695007: Fix problems with unicode chars in TEMP path.

If there are unicode chars in the temporary path (either that
given by TMPDIR, TEMP or windows own GetTempPath functions)
when opening a scratch file, we mishandle them.

This commit improves the behaviour to treat paths consistently
as UTF8.

This incorporates changes from Paul Gardiner to make the winrtsup.cpp
functions use wide chars. This simplifies the functions and integrates
better with the calling code. Also fix some uses of sizeof where size
in chars was required.

gs/base/gp_mswin.c
gs/base/winrtsup.cpp
gs/base/winrtsup.h


2014-03-04 10:24:47 +0000
Paul Gardiner <paulg-artifex@glidos.net>
f29e49d4b157a84b4793eda614447811b471c047

Fix pointer-usage bug in GetTempFileNameWRT

gs/base/winrtsup.cpp


2014-03-04 15:30:02 +0000
Ken Sharp <ken.sharp@artifex.com>
5b2adda7468241123d9559a98cd469f527dd7e3c

pdfwrite - do not apply the 'Default*' colour spaces

Noticed while testing by Chris.

The PDF spec says that if any of DefaultGray, DefaultRGB or DefaultCMYK are
present in a PDF page, then we should use those to do a conversion to
device-independent colour space for colours specified in the matching Device*
space.

This is broadly equivalent to the UseCIEColor PostScript user parameter but
unlike that parameter the user has no control over it. Previously we applied
this conversion but it seems unreasonable to do this for pdfwrite as this
will convert a PDF using device spaces into a PDF using ICCBased spaces.

Accordingly we now test the device properties and for HigLevel devices we
do *not* perform this conversion.

If the conversion really is desired then setting -dUseCIEColor will perform it.

This results in a very few files showing differences, neither progressions
nor regressions, merely different. However the pdfwrite warning about use
of UseCIEColor does go away.

gs/Resource/Init/pdf_main.ps


2014-03-04 09:25:18 +0000
Chris Liddell <chris.liddell@artifex.com>
2621110f37eb0c94a732578acd24634caec1c25b

Bug 694832: add an explicit flag for TTF notdef

The previous solution for this issue "overloaded" an existing workaround for
pdfwrite. Unfortunately, a clash between pdfwrite's needs and FAPI's meant it
did not work all the time.

So, when loading a TTF for use in a PDF, add a new flag to the font dictionary
to tell the FAPI code whether to render a Truetype notdef.

Several differences show up on the cluster - the following are progressions
compared to Acrobat:
Bug689757.pdf
Bug691031.pdf
Bug691221.pdf
Bug693538.pdf
Bug693646.ps
Bug693711.pdf
keyboard.pdf
CATX1490.pdf
IA3Z0815.pdf

These are different from before, but since Acrobat can't even open these,
I don't much care:
207ee6f24411fc4591d2b5a337c46de8-full.pdf
2123_-_MacExpertEncoding_badly_handled.pdf
764_-_heading_garbage.pdf

gs/Resource/Init/gs_ttf.ps
gs/psi/zfapi.c


2014-03-04 09:49:52 +0000
Ken Sharp <ken.sharp@artifex.com>
0214c1b9c70cd41026e5cda707e582b32489a64c

remove a misleading comment

gs/devices/vector/gdevpdfu.c


2014-03-04 09:47:50 +0000
Ken Sharp <ken.sharp@artifex.com>
095ae57e266ee5168f042c26dd2e9d12273efb28

ps2write - fix missing %%BeginResource comment for FontFile objects

Bug #695082 " ps2write: Some "%%BeginResource" DSC comments have only one "%" character"

FontFile streams were being written with a "%%EndResource" comment, but the
"%%BeginResource" comment was missing.

No differences expected

gs/devices/vector/gdevpdfu.c
gs/devices/vector/gdevpdfx.h
gs/devices/vector/gdevpdtd.c


2014-03-03 14:14:19 +0000
Ken Sharp <ken.sharp@artifex.com>
649848310dd4f9400f63c685748e4f76344ba9d7

ps2write - fix a DSC comment

Bug #695082 "ps2write: Some "%%BeginResource" DSC comments have only one "%" character"

A DSC comment was emitted using a printf format string without escaping the
"%"s

No differences expected.

gs/devices/vector/gdevpdtd.c


2014-02-27 11:28:57 +0000
Ken Sharp <ken.sharp@artifex.com>
f6abeac1c7ab3ee82523353b5373230e2607c0b9

pdfwrite - fix commit 1d1d22976ce5b5e96d862c404ca80f189476bfed

Despite not throwing any regressions, there was a bug in this commit.

A couple of places used the pprintld* routines, which *don't* accept the
%"PRId64" sequence and this led ot us writing an invalid xref.

Fixed here by using gs_sprintf instead.

gs/devices/vector/gdevpdf.c


2014-02-27 09:33:13 +0000
Ken Sharp <ken.sharp@artifex.com>
1d1d22976ce5b5e96d862c404ca80f189476bfed

pdfwrite - fix FastWebView for big-endian devices

Bug #695075 " Creating "optimized" PDF on Big-endian OS gives errors when view the PDF indicating PDF is not right"

This commit applies all the changes supplied by Jonathan Dagresta of SDL,
see the bug report for details.

No differences expected.

gs/devices/vector/gdevpdf.c


2014-02-26 10:38:02 -0800
Ray Johnston <ray.johnston@artifex.com>
30f2c656469f5930b1adc82454706743df68b0d7

Disable threshold array based image optimization for depth > 1.

The monochrome image case in gximono.c already checked for depth == 1
but the gxicolor.c code was missing this. These can be removed when
the gxht_thresh.c code is enhanced for greater bit depths.

gs/base/gxicolor.c


2014-02-26 09:20:37 +0000
Ken Sharp <ken.sharp@artifex.com>
b53c81e38925d05b00ba9068aebc5fcbc519a685

ps2write - add a feature to customise the output for specific devices

Bug #695070 "Customer would like a way to specify printer specific features in ps2write device"

This commit adds two new distiller params, specific to ps2write, PSDocOptions
and PSPageOptions, which are described in detail in the ps2ps2.htm document.

These allow an end user to specify PostScript (normally device-specific
configuration) which can be injected into a DSC compliant file at the documet
level and at the individual page level.

No differences expected

gs/Resource/Init/gs_pdfwr.ps
gs/devices/vector/gdevpdf.c
gs/devices/vector/gdevpdfb.h
gs/devices/vector/gdevpdfu.c
gs/devices/vector/gdevpsdf.h
gs/devices/vector/gdevpsdp.c
gs/doc/Ps2ps2.htm


2014-02-23 09:46:21 -0800
Ray Johnston <ray.johnston@artifex.com>
77fce4a0cfd70b94a90a876cac0310fda1a969ee

Fix bug 695054, segfault caused by stale pointer in pattern-clist device.

The pattern-clist device could be left allocated in stable memory
after the pattern was removed from the pattern cache. The pattern
instance could be freed by a subsequent restore since it was not
in stable memory. GC trace of the chunks would then reference the
stale pinst pointer. Also, the heap pointer needs to be valid in
ialloc_validate_spaces 'state' since it can be used for error output
and this could cause a segfault.

gs/base/gxpcmap.c
gs/psi/ilocate.c


2014-02-24 10:41:23 -0700
Henry Stiles <henry.stiles@artifex.com>
9990bdac31c018de33de2c09053b7e392a26304f

Fix Bug 694685 - Seg faults found by fuzzing in sfopen.

PCL would continue processing with a corrupt font. This could lead to
bad memory accesses as demonstrated by the fuzzing example. For now,
we return an error when a corrupt font is encountered and end the job.
Likely, a lighter approach is called for: continue process without
defining the font. This would be a bit more involved and we'll
consider it if users report HP precedent for the behavior.

pcl/pcsfont.c


2014-02-24 15:14:45 +0000
Ken Sharp <ken.sharp@artifex.com>
b6f8dba649f1be2ba5b9eb1d257f2052f7f2df28

Move ram file system memory to 'stable' memory

The RAM file system was using regular GC'ed memory for its storage, which is
subject to save and restore. The RAM file system should not, of course, be
subject to save and restore!

This commit prevents save and restore affecting the memory for the ramfs

No differences expected.

gs/base/ramfs.c


2014-02-14 18:16:55 +0100
Simon Bünzli <zeniko@gmail.com>
863a1dfb328298a39871e49d218a16781fd42cba

Bug 694880 and bug 694904: prevent heap overflow in opj_j2k_add_tlmarker

Signed-off-by: Henry Stiles <henry.stiles@artifex.com>

gs/openjpeg/libopenjpeg/j2k.c


2014-02-14 18:20:36 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
b17894bfedaf7b76edac15f681a4bd08717c65c0

Bug 694906: fix potential heap overflow in opj_t2_read_packet_header

Signed-off-by: Henry Stiles <henry.stiles@artifex.com>

gs/openjpeg/libopenjpeg/t2.c


2014-02-18 09:36:09 +0000
Chris Liddell <chris.liddell@artifex.com>
7bd3739a888f70edf0270891782a88a547f5e829

Make the OpenJPEG callbacks static.....

and give them names more likely to be unique (just for debugging convenience).

No cluster differences.

gs/base/sjpx_openjpeg.c


2014-02-18 11:22:16 -0800
Ray Johnston <ray.johnston@artifex.com>
174cfd14e4d34a37cdcf2e0372bd0b4334310e8b

Fix pngalpha when PDF has transparency. Bugs 687630, 693024 and 695042.

We needed a pngalpha_put_image procedure to properly collect the pdf14
compositor alpha value. Note that this is NOT simple 0 or 1 alpha, but
the actual effective page level opacity from the PDF. Note that some
viewers may not correctly display these despite this being part of
the PNG spec.

gs/devices/gdevpng.c


2014-02-15 13:54:07 -0800
Ray Johnston <ray.johnston@artifex.com>
b69da60516576d65ce1e27087dc358fef067ec58

Fix bug 695405. The psdcmykog device should not lock num_components.

This regression was introduced with an attempt to fix SeparationOrder
handling, but is not needed because we throw an error when there is
an attempt to set the SeparationOrder, and the device is confused
when the num_components is reset in the open_device procedure.

gs/devices/gdevcmykog.c


2014-02-11 08:07:04 -0800
Ray Johnston <ray.johnston@artifex.com>
3ebdb4596c8fa05656dc3987553217efe72b6b8d

Improve chunk allocator performance using a doubly linked list (bug 694985)

Thanks to Norbert Janssen for the linked list logic. Also make a couple
of other improvements in the free_object logic and use a separate
structure for the freelist to avoid confusion with object nodes.

gs/base/gsmchunk.c


2014-02-14 14:07:11 +0100
Tor Andersson <tor.andersson@artifex.com>
c5ad5b7f373313e9bc7b8991cc9e34506e627e0a

xps: Fix memory leaks in xpszip.c when handling errors.

Thanks to Norbert Janssen.

xps/xpszip.c


2014-02-14 10:12:28 +0000
Ken Sharp <ken.sharp@artifex.com>
1e93c580b175ac086db942c32fab055c6062e8e4

ps2write - more colour conversion work

Bug #694774

When outputting to PostScript we don't preserve certain colour spaces which
either cannot be represented in PDF (CIEBased) or in level 2 PostScript
(ICCBased/Lab/DeviceN) are not preserved. These should be written as device
colours instead, but this wasn't always happening correctly.

This commit should resolve this, and should now make it possible (but still
inadvisable) to use -dUseCIEColor with both pdfwrite and ps2write.

A small number of files show (frankly imperceptible) colour shifts with
ps2write with this change.

gs/devices/vector/gdevpdfc.c
gs/devices/vector/gdevpdfg.c


2014-02-13 14:49:42 +0000
Chris Liddell <chris.liddell@artifex.com>
edbed246ed67fcf24f854795f0d703bcb5d902fe

Bug 695027: use a consistent allocator in the FT server

There was some mixing of memory allocators in the Freetype integration code,
most of the code used the chunk allocator instance created during the
server initialization, but glyph data allocations were using the allocator from
the font object.

With two different FAPI servers in place, and with the right combination of
events, that could mean we'd lose the allocator pointer when destroying
the font object.

We're consistent in that all the memory allocations in the FAPI/Freetype code
are directed through the chunk allocator created for that purpose.

No cluster differences.

gs/base/fapi_ft.c


2014-02-13 14:47:18 +0000
Chris Liddell <chris.liddell@artifex.com>
979d824c9da11e9f366b1d90aed06f9449127997

Bug 695024: fix a typo

In the UFST integration code, we check if the Freetype server is available
and if it is, we punt any non-Microtype fonts to that. The typo is that
the Freetype server is named "FreeType" - the "T" was lower case.

CLUSTER_UNTESTED

gs/base/fapiufst.c


2014-02-13 15:14:49 +0000
Ken Sharp <ken.sharp@artifex.com>
4d349b1ae5852db20fcaca21b357748eb5360817

Bug #695034 Improve handling of word spacing with CIDFonta

Bug #695034 "Numbers and words are overlapping"

Word spacing does not apply to ti CIDFOnts, *except* for 1-byte mappings
where the byte 0x20 has word spacing applied to it.

The previous code attempted to check this by using a heuristic to determine
a single byte mapping in order to avoid adding more entries to the text
enumerator. unfortunately this file defeats that heuristic which meant
that it was necessary to calculate the number of bytes decoded when we
extract one character, and store that information so that the 'move'
routine can apply word spacing if required.

This shows two differences with a cluster run. Bug694436.pdf is very subtly
different, I'm assuming this is a progression. The Sumatra file
850_-_wrong_default_for_asian_fonts.pdf shows very significant improvements
with this commit.

gs/base/gxchar.c
gs/base/gxtext.h


2014-02-11 15:15:56 +0000
Chris Liddell <chris.liddell@artifex.com>
f4584b0e162a96ec143f0057de63c116e649e02b

Bug 695031: don't assume we can read a font file

When we scan system fonts, we were assuming fonts found would be in a format
Ghostscript understands. This is not necessarily the case.

So put the minimal parsing call to get the font's name in a stopped context,
so we can skip the file it's not an understandable format. And clean up the
stack in the event we try such a file.

No cluster differences.

gs/Resource/Init/gs_fonts.ps


2014-02-11 12:14:33 -0800
Michael Vrhel <michael.vrhel@artifex.com>
149b4b33c909c2d67c44c7a820f70209294bee76

Don't allow PS CIE color spaces to be used for transparency group color spaces.

The CIE color spaces are 1-way. In that they map from Device to CIE, not from
CIE to Device. A transparency group color space needs to be able to go both
directions. This fixes the regression 694774

gs/base/gsicc_cms.h
gs/base/gsicc_lcms2.c
gs/psi/int.mak
gs/psi/ztrans.c


2014-02-11 11:18:39 -0700
Henry Stiles <henry.stiles@artifex.com>
c22a604f0dc176fe1ae7545097e8a818e5d38309

Remove final remnants of deprecated CRD code.

pcl/pccid.c
pcl/pcl.mak
pl/pl.mak
pl/plsrgb.c
pl/plsrgb.h
pxl/pxgstate.c
pxl/pximage.c
pxl/pxink.c
pxl/pxl.mak
pxl/pxsessio.c


2014-02-11 08:07:04 -0800
Ray Johnston <ray.johnston@artifex.com>
c240594f3083158ab829cd121159879183bf49c8

Improve the debug 'cname' for chunk_mem_node_add similar to MEMENTO builds.

For normal builds use the caller's cname when allocating the chunk if the
object is in its own chunk. Previously this only was used for MEMENTO builds.
NB: MEMENTO builds put every object in a chunk, so the cname will always be
the caller's, never "chunk_mem_node_add".

gs/base/gsmchunk.c


2014-02-09 11:48:35 -0800
Ray Johnston <ray.johnston@artifex.com>
0eaf9e76f83eff5d0dd5eb1f8d9a5314b9ca44cd

Fix bug 694821. Ignore SeparationOrder with the psdcmykog device.

While this is a DeviceN device with some non-standard components
that can be painted using Separation or DeviceN colorspaces, this
device always outputs all 6 channels and can't deal with a subset
of the channels, so return an error (undefined) for SeparationOrder.
the separation_map remains constant to avoid color distortion if
SeparationOrder is used.

Also make sure that we never add separations (NO_AUTO_SPOT_COLORS)
from the get_color_comp_index procedure.

gs/devices/gdevcmykog.c


2014-02-07 18:13:52 -0800
Ray Johnston <ray.johnston@artifex.com>
a11848051b9abdbe2b750976018d4167a96d2fea

Fix some problems with SeparationOrder handling -- 29-07I.PS

Most importantly, when setting SeparationOrder parameters fail, we
need to use param_signal_error. Otherwise, even though the error code
is returned, the stack for setpagedevice would be missing the param
information and code that caused the error.

Also the num_spot and num_spot_changed were improperly updated when
ENABLE_AUTO_SPOT_COLORS allowed SeparationOrder to add separations.

gs/base/gdevdevn.c


2014-02-11 09:33:13 +0000
Ken Sharp <ken.sharp@artifex.com>
f176e516add62d3a943a755a9294c510c579655d

pdfwrite - fix a bug in the font embedding white list detection

While working on bug #695030 I ran across a bug in the font embedding
white list code. If the bisection of the list exactly hits the target string
exactly then the bisection would fail to find the string.

This commit special cases this and detects the string.

No differences expected.

gs/devices/vector/whitelst.c


2014-02-10 11:17:01 +0000
Ken Sharp <ken.sharp@artifex.com>
fac814792b42dfc2baafe84062ff986b7620cfe3

pdfwrite - alter the example pdfa_def.ps for PDF/A generation

The pdfa_def.ps file is incorrect with the new colour handling, and has long
had a problem with only handling Gray or CMYK.

Its no longer possible to retrieve the ProcessColorModel from systemdict,
we must now use the current device dictionary.

pdfa_def.ps now supports DevuiceGray, DeviceRGB and DeviceCMYK models.

No differences expected

gs/lib/PDFA_def.ps


2014-02-10 11:14:31 +0000
Ken Sharp <ken.sharp@artifex.com>
e17abc0e4574cdefd25032aa1003ff28503b5867

pdfwrite - new color code. Fix the emission of DeviceIndependent colours

Bug #694806 "chars and colors lost during PDF/A transformation"

If we used the same device independent (ICCBased) colour space, but a
different colour, we ended up not writing the new colour. This code fixes
that problem.

No differences expected

gs/devices/vector/gdevpdfg.c


2014-02-10 08:34:54 +0000
Ken Sharp <ken.sharp@artifex.com>
d59e1feb9545b399027907cb2d1a6855c524e0b4

PS interpreter - Fix rotation problem with EPSFitPage

Bug #695016 "Gradient eps file to pdf"

When fitting an EPS Bounding Box to a specified page size, the code looks
at the width and height of both the page and the EPS file, to see if the
EPS will fit 'better' by rotating it.

In this particular case the page is square, but there was no special case
for this, which mean that landscape pages wold be rotated twice, causing
the content to disappear.

This commit special cases square media sizes and does not attempt to rotate
the EPS, no matter what its orientation, as there is clearly no point in
doing so. This prevents the double rotation and resolves the problem.

Tested with landscape, portrait and square media and EPS files, in all
combinations.

No differences expected

gs/Resource/Init/gs_epsf.ps


2014-02-06 09:56:43 -0800
Ray Johnston <ray.johnston@artifex.com>
dc3770910997a17386c65eaa44e73cf7cf5e8339

Fix Windows display device -dDisplayFormat=16#a0800 regression.

Commit 82fc3bd change to msvc.mak removed setting the GX_COLOR_INDEX_TYPE,
and code in base/gxcindex.h set this incorrectly to 'ulong'. Add the code
that was removed and also add conditional compile to set this from
ARCH_SIZEOF_GX_COLOR_INDEX if it is not defined.

Also add a 'compile time assert' that causes the build to fail if the
sizeof(GX_COLOR_INDEX_TYPE) is not equal to ARCH_SIZEOF_GX_COLOR_INDEX.
Thanks to Robin for finding this trick on the web.

gs/base/gxcindex.h
gs/base/lib.mak
gs/psi/msvc.mak


2014-02-06 09:53:55 +0000
Ken Sharp <ken.sharp@artifex.com>
ab3faf9dd8b61b7adc83f370e8caf40f09a442bb

pdfwrite - improved error handling in pdf_close

Bug #695013 " GS not finishing pdf write, creating huge files, when root / partition is full"

we weren't checking the error return when trying to find the end of an
xref section while writing the xref. Any ioerror would havce caused this
problem.

While this fixes the specific instance of the problem, I can't guarantee
that more subtle problems (eg filling disk while writing the PDF file)
don't still exist.

No differences expected.

gs/devices/vector/gdevpdf.c


2014-02-05 14:19:59 +0000
Ken Sharp <ken.sharp@artifex.com>
ff033b6ec050f23cb7b1e6ff52bb48fb45afd9e3

Update jbig2dec standalone build for Windows.

Add the missing jbig2_halftone.c file, and make building without libpng
the default.

CLUSTER_UNTESTED

gs/jbig2dec/msvc.mak


2014-02-04 13:35:04 -0800
Michael Vrhel <michael.vrhel@artifex.com>
a75ff89833289614e0dc2476c822462670f822bc

Remove strdup in gdevxps.c .

In Windows 8 64 bit builds with VS2012/2013 strdup use resulted in a crash. Replaced
with standard strlen/gs_alloc_bytes/strcpy. Note that we need to free this allocation at some point.

gs/devices/vector/gdevxps.c


2014-01-23 09:53:23 +0000
Chris Liddell <chris.liddell@artifex.com>
8033bcb40edf7520682cb14ee41226eddf9c8e5e

Tweak xpsprint build.

Conflicts:
gs/base/msvctail.mak
gs/base/winlib.mak
gs/devices/vector/gdevxps.c

Tweak the xpsprint code to use runtime DLL loading

Conflicts:
gs/base/msvctail.mak

gs/base/msvctail.mak
gs/base/winlib.mak
gs/base/xpsprint.cpp
gs/devices/devs.mak
gs/devices/vector/gdevxps.c
gs/psi/msvc.mak


2014-01-21 12:01:41 +0000
Ken Sharp <ken.sharp@artifex.com>
d10c375e190876fef3f431e17c47dcacda03d567

Add new code for a 'gsprint' alike which uses the XPS print system on
WIndows

Add new code for a 'gsprint' on new versions of Windows, using XPS

gs/base/xpsprint.cpp
gs/devices/vector/gdevxps.c


2014-02-03 07:18:16 -0800
Ray Johnston <ray.johnston@artifex.com>
4eb758e74c73c03b113ba2bf73245f21b1c6de14

Fix writes to freed memory caused by commit 429640.

I had moved the clearing of the ctx to before the gs_malloc_release
call, but this function frees the ctx, so we wrote to freed memory.
Move it back.

gs/psi/iapi.c


2014-01-31 12:24:25 -0800
Ray Johnston <ray.johnston@artifex.com>
363f3bc0d3b6206cc1e0aff0ce2fe954c0295409

Fix bug 694994. Gray and CMYK pdf14 clist accumu devices had wrong color_info.

In cut and pasting the device structures, I negleccted to change the color
info for the macros.

gs/base/gdevp14.c


2014-02-01 12:10:22 +0000
Ken Sharp <ken.sharp@artifex.com>
2f2970c2a35a146f21631612adfca48a0b1bb2b3

PDF interpreter - disable Comment parsing for PDF files

Bug #694987 "PDF metadata messed up for PDF->PDF conversion"

This is caused by parsing DSC comments from an embedded font file. Of course
the font should not contain DSC comments, but it seems FontForge always
embeds such.

There is nothing useful to be gained from *PostScript* comments in a PDF
file, so the simplest solution is to disable comment parsing for the
duration of the PDF file.

This will also avoid problems with PostScript XObjects.

No differences expected

gs/Resource/Init/pdf_main.ps


2014-01-31 15:08:17 +0000
Chris Liddell <chris.liddell@artifex.com>
161559d289a9b4306673c7d7e089182670c5090a

Slightly rejig i/o in inkcov device.

Tweak so that output directed to stdout or stderr go through the graphics
library's own stdout and stderr handlers - that way, it can be seen by
integrators using the Ghostscript API with custom stdio handler methods.

No cluster differences.

gs/base/gdevprn.c
gs/base/gslibctx.h
gs/devices/gdevicov.c


2014-01-31 14:50:55 +0000
Ken Sharp <ken.sharp@artifex.com>
7ef7b0d503fee02da12430ee19a394b23b1bfa6f

pdfwrite - colour conversion, consider sRGB to be RGB

gs/devices/vector/gdevpdfg.c
gs/devices/vector/gdevpdfi.c
gs/devices/vector/gdevpdfp.c


2014-01-31 09:42:38 +0000
Ken Sharp <ken.sharp@artifex.com>
a2a785d3f6111410198c396fe21813ddd41664be

PDF interpreter - add -dUseBleedBox to complete the quartet of Boxes

Bug #694977 "please provide -dUseBleedBox in analogy to crop- and trimbox"

gs/Resource/Init/pdf_main.ps
gs/doc/Use.htm


2014-01-31 08:19:31 +0000
Ken Sharp <ken.sharp@artifex.com>
6c4e66f6a7a1e9fc3ed3beff84549aa3bbbbe795

pdfwrite - remove 2 unused variables

silences compiler warnings

gs/devices/vector/gdevpdfm.c


2014-01-30 11:08:55 -0800
Ray Johnston <ray.johnston@artifex.com>
429640b32e1ffcd324c2b44daa1fb35ef41c01d4

Move final memory (max) usage to gs_malloc_release.

Not all systems (e.g. unix) use the gsapi interface, so the debug
-Z: didn't print the final memory usage as on Windows.

gs/base/gsmalloc.c
gs/psi/iapi.c


2014-01-30 15:32:23 +0000
Ken Sharp <ken.sharp@artifex.com>
ea83541f7fcc1af40cf62f0e7457df74e8b427c4

pdfwrite - more EMBED pdfmrk changes

commit 3e5ae4ea39655643ae352cf4723702a164c10417 omitted a crucial change
which swapped the search order of /FS and /Name. Without that the dict
entries are not correctly named.

This oversight demonstrated a flaw in the error handling resulting in invalid
PDF files being written, which we correct here. If we get an error we close
the 'aside' so that we don't end up writing the PDF trailer to a temporary
file instead of the real PDF file.

No differences expected

gs/devices/vector/gdevpdfm.c
gs/devices/vector/gdevpdfo.c


2014-01-30 10:00:23 +0000
Ken Sharp <ken.sharp@artifex.com>
3e5ae4ea39655643ae352cf4723702a164c10417

pdfwrite - more work on /EMBED pdfmark

As was rather anticipated, commit a91d2576df0e60f6e691a3bd967b51109ae41f22
wasn't sufficient. We were writing an invalid name tree as we were writing
/Limits in the root node. For single entries in the Limits array we only
wrote the single entry, in fact we should write that entry twice (!). The
value associated with each key in the EmbeddedFiles array had the dictionary
we needed stored inside another dictionary with a /FS key. EmbeddedFiles
were introduced in PDF 1.4, not PDF 1.2.

This commit addresses all those problems, Adobe Acrobat Professional can
display the list of embedded files and (for embedded PDF files at least)
can open the embedded file.

gs/devices/vector/gdevpdf.c
gs/devices/vector/gdevpdfm.c
gs/devices/vector/gdevpdfo.c


2013-11-26 11:15:17 -0800
Ray Johnston <ray.johnston@artifex.com>
4e44c995bcc7a2aa6c32e23cb73fd532a93f5b1c

Fix bug 689805: Use a clist for pages with transparency that need lots of RAM

Devices that are not gx_device_printer class try to allocate full page bitmaps
for the stack of transparency buffers. This can kill performance or result in
VMerror during transparency stack pushes. Devices that are gx_device_printer
class automatically used clist mode, but other devices did not. Devices that
do not internally support clist mode are recognized by the return from
gxdso_supports_saved_pages device spec_op.

A gx_device_printer device is used to accumulate the page, then when the
PDF14_POP_DEVICE is performed, the page is sent to the original device
as an image.

NB, both the pdf14clist___ device and the pdf14___ device are kept in the
device chain since we have to be able to accomodate unwinding the gs_state
structure that may point to either as various "restore" ops occur.
Unfortunate, but until we come up with a way to fix the chain of compositors,
this is the best we can do.

Move space_params to gx_device struct in order to allow non-printer devices
control over MaxBitmap, BufferSpace, BandBufferSpace, and BandHeight. The x11
device used MaxBitmap somewhat differently, so it now uses the space_params
value, and sets the default in its 'open' function, rather than the device
prototype. The duplicate 'page_uses_transparency' in space_params is removed,
and all devices have this as a parameter.

Also, get rid if the nasty hacks for detecting pattern-clist devices based on
the device name, and export these for the pdf14 device and other clients.

Finally, (unrelated) remove the #if 0 for testing with small memory on
large memory machines, and get rid of the the description of the '.' option
since this hasn't worked for years, and the command line options can readily
be set anyway.

gs/base/gdevp14.c
gs/base/gdevprn.c
gs/base/gdevprn.h
gs/base/gsdparam.c
gs/base/gsptype1.c
gs/base/gsstate.c
gs/base/gstrans.c
gs/base/gxband.h
gs/base/gxclbits.c
gs/base/gxclimag.c
gs/base/gxclist.c
gs/base/gxclist.h
gs/base/gxclpage.c
gs/base/gxclrast.c
gs/base/gxdevcli.h
gs/base/gxdevice.h
gs/base/gxpcmap.c
gs/base/gxpcolor.h
gs/base/lib.mak
gs/devices/gdevbit.c
gs/devices/gdevplib.c
gs/devices/gdevx.c
gs/devices/gdevx.h
gs/devices/gdevxini.c
gs/doc/Use.htm


2014-01-29 17:32:04 +0000
Ken Sharp <ken.sharp@artifex.com>
a91d2576df0e60f6e691a3bd967b51109ae41f22

pdfwrite - enable the EMBED pdfamrk

Bug #690043 "Can't create a pdf file with attachment"

This turned out to be more complex than I expected. I had planned to lever
off the /Dests code, but....

It seems that our Named destinations support is only PDF 1.1. The specification
was changed ion PDF 1.2 to use a name tree instead of a simple dictionary
and we didn't alter our code. The EmbeddedFiles wasn't supported in PDF 1.1
so it has always needed a name tree.

So in addition to adding the EMBED pdfmark, we now also will write a name
tree for Dests if the CompatibilityLevel is > 1.1. Note that the 'tree'
we write is the simplest possible one and is likely to be sub-optimal, we
write all the entries in the root of the tree. However its legal and should
work, we can extend this later if needs be.

I don't have a good way to test this, but the output looks OK by inspection
and we don't get any regressions.

gs/devices/vector/gdevpdf.c
gs/devices/vector/gdevpdfb.h
gs/devices/vector/gdevpdfm.c
gs/devices/vector/gdevpdfo.c
gs/devices/vector/gdevpdfo.h
gs/devices/vector/gdevpdfu.c
gs/devices/vector/gdevpdfx.h


2014-01-29 13:07:34 +0000
Robin Watts <robin.watts@artifex.com>
2dae08db5c51c9a255b8d18ef011f75c4ee48e9f

Fix non gcc DEBUG builds of pcl.

Simple transposition of lines required.

pcl/pcsfont.c


2014-01-28 17:21:48 +0000
Ken Sharp <ken.sharp@artifex.com>
f471820635cbbaf4f7ed5c9185700ebb51378f0d

PDF interpreter - attempt to recover from degenerate text matrix or CTM

Some PDF files set a degenerate matrix or text matrix, eg

0 0 0 0 0 0 Tm

This causes us a problem with currentpoint and .getpath, both of which
need to invert the CTM. If the CTM is all 0 then it (clearly) can't be
inverted.

The code here emits a warning, in the case of settextposition it simply
does not advance the current point (which seems correct, since the text
will make no changes). In the case where we attempt to grestore (Q) but
preserving the current path, we drop the path and make a new path. This
may well not be correct, but its hard to see what would be.

No differences expected.

gs/Resource/Init/pdf_ops.ps


2014-01-23 09:17:31 +0000
Ken Sharp <ken.sharp@artifex.com>
e46be795d1a682259ebcca3df2ad581150414adf

epsi.ps - change two \r to \n

Apparently gv has a bug and can't handle \r line endings.

Bug #694968

No differences expected.

gs/lib/ps2epsi.ps


2014-01-23 09:09:48 +0000
Ken Sharp <ken.sharp@artifex.com>
03376079a8c05dd2224c057aaa95c508521ce784

vector devices - add a warning message when OutputFile exceeds a limit

Bug #694948

No differences expected.

gs/base/gdevvec.c


2014-01-11 16:53:48 +0000
Hin-Tak Leung <hintak@ghostscript.com>
49bb8200d6c92ddcd191026c0273f8bc229ad9e0

Bug 694873: bare JPEG2000 images without JP2 header in pdf.

To cope with JPEG2000 images without JP2 headers.

This change is essentially the corresponding change in mupdf
(https://code.google.com/p/sumatrapdf/issues/detail?id=937 ,
http://bugs.ghostscript.com/show_bug.cgi?id=691346 ,
test file 937_-_openjpeg_cannot_decode_JP2_structure.pdf),
where one takes a peek at the first few bytes of the stream
before setting the decoding parameters; with the caveat that
in ghostcript, we need to delay most of the stream
initialization - and allocation of resources - until
after seeing the first few bytes, and therefore also
not necessarily de-allocate at stream close.

The cluster test file, openjpeg_166_-_buffer_overflow.pdf,
(https://code.google.com/p/openjpeg/issues/detail?id=166)
is of the same issue.

EXPECTED DIFFERENCES:
937_-_openjpeg_cannot_decode_JP2_structure.pdf
openjpeg_166_-_buffer_overflow.pdf
(Both are progressions.)

gs/base/sjpx_openjpeg.c


2014-01-22 22:06:51 +0100
Till Kamppeter <till.kamppeter@gmail.com>
5d6b18aa6a2a4ece4854ed9af074bb65f41af293

Set correct portrait/landscape orientation on PCL 5c/e output

Fixes bug #693715.

gs/devices/gdevdjet.c
gs/devices/gdevdljm.c
gs/devices/gdevpcl.c
gs/devices/gdevpcl.h


2014-01-20 13:18:23 +0000
Ken Sharp <ken.sharp@artifex.com>
c699e89a897b85d2f1f0a07ecac8d64b53500804

pdfwrite - fix xref when eliding duplicate patterns

commit fe99ca5fd2e3b191a76c7f7d791b72f3603e9fea detected duplicate shading
patterns, and did not emit them into the PDF file, instead using the first
definition. Unfortunately, due to a mis-understanding of the existing code
the xref entry remained assigned, which led to invalid xref tables
being written.

This commit fixes the xref, and adds some (hopefully useful) comments to
the relevant functions to try and avoid a repetition.

No differences expected

gs/devices/vector/gdevpdfu.c
gs/devices/vector/gdevpdfv.c


2014-01-17 12:37:24 -0700
Henry Stiles <henry.stiles@artifex.com>
54927dd449c476b5a8c125e9beb1fbe06bebc45e

Fix 694951 - No output produced.

Allow the HPGL/2 command "PG" to initialize the GL/2 parser at the
beginning of a job.

pcl/pcparse.c


2014-01-15 02:00:12 +0100
Simon Bünzli <zeniko@gmail.com>
b13ef732907219b48757e2f501486f71b9f21030

Bug 694893: prevent overflow in opj_int_ceildivpow2

This can be seen e.g. in:

4241ac039aba57e6a9c948d519d94216_asan_heap-oob_14650f2_7469_602.pdf

Thanks to Mateusz Jurczyk and Gynvael Coldwind of the Google Security
Team for providing the example files.

gs/openjpeg/libopenjpeg/opj_intmath.h


2014-01-14 23:11:43 +0100
Simon Bünzli <zeniko@gmail.com>
5b0c9985e3359aca9b3fcfd94424166aa61a141a

Bug 694880: fix write access violation in opj_j2k_add_tlmarker

A tile_index' current_tpsno may be far larger than the number of tile
parts because opj_j2k_read_sot increases that number just by 10 instead
of growing it to the actually required size.

This can be seen e.g. in:

147af3f1083de4393666b7d99b01b58b_signal_sigsegv_130c531_6155_5136.pdf

Thanks to Mateusz Jurczyk and Gynvael Coldwind of the Google Security
Team for providing the example files.

gs/openjpeg/libopenjpeg/j2k.c


2014-01-14 22:45:49 +0100
Simon Bünzli <zeniko@gmail.com>
7366747076f3b75def52079bd4d5021539a16394

Bug 694949: prevent denial of service with arithmetic decoding

Badly constructed Jbig2 images using arithmetic decoding may result in
a denial of service attack by causing huge images to be created and
initialized from no data at all (at EOS, the arithmetic decoder always
returns the same values instead of failing).

Two cases are prevented with this patch:
* huge generic regions with barely any data to decode it from
* a huge list of height classes with no data at all to decode it from

This can be seen e.g. in:

b534b5caad95dd405735ec9a079fd43b_asan_heap-oob_14bf3ce_6977_5690.pdf

Thanks to Mateusz Jurczyk and Gynvael Coldwind of the Google Security
Team for providing the example files.

gs/jbig2dec/jbig2_arith.c
gs/jbig2dec/jbig2_arith.h
gs/jbig2dec/jbig2_generic.c
gs/jbig2dec/jbig2_symbol_dict.c


2014-01-17 09:35:36 +0000
Ken Sharp <ken.sharp@artifex.com>
24dce021d5f774dd4264011cbd64bb4afb5aa51c

PDF interpreter - Don't set UseCIEColor unless actually required.

The PDF specification says that if a PDF file contains a page which uses
a ColorSpace Resource of DefautlGray, DefaultRGB or DefaultCMYK then this
should be regarded as a "request that such colors be systematically
transformed (remapped) into device-independent CIE-based color spaces.".
Essentially the PDF equivalent of UseCIEColor.

This does rather beg the question of why not specify the colours in a
device-independent space in the first place.....

In any event, in order to achieve this the PDF interpreter pulls some
tricks. We start by defining the Default* resources as the equivalent
Device* spaces and *always* define UseCIEColor to true. Thus whenever
we set a device color space the colour machinery tries to use instead the
appropriate Device* space. Because the color space machinery has an
optimisation to jump straight out when the requested space is the same as
the current space, this means that the UseCIEColor transformation should
have no effect.

However, pdfwrite now emits a warning if UseCIEColor is true, so we want
to avoid unconditionally setting UseCIEColor (I also find it horrifying that
we do this terrible hackery).

This commit borrows code used to set the Default* spaces if they exist on
a page, and uses it to detect such spaces before we call setpagedevice
for each page. We now only set UseCIEColor if the page actually uses one
of the Default* spaces and therefore requires it.

I did consider trying to substitute the defined colour space with the
Default* space whenever a colour space definition takes place and a Default*
space is defined, but gave up as there were simply too many places where
color spaces could be defined.

This code does (somewhat unexpectedly) produce some differences.
These are either progressions or very tiny differences, and I feel that
*not* setting UseCIEColor should be preferable anyway. (The real puzzle
is why some PostScript files seem to differ, but they only differ when
sent to pdfwrite and the PDF is then interpreed. Looks like UseCIEColor
has some strange behaviour with ICCBased spaces).

with pdfwrite:
altona_technical_1v2_x3.pdf - very minor colour shift
altona_technical_v20_x4 - progression on page 7
09-31.ps - difference in gray ramp in CIE space
09-34.ps - indetectable differences in some CIE colours

all devices:
Bug692783.pdf - indetectable shits in background
Catx5720.pdf - slight colour shifts in 3 graphics
1021_-_transparency-issue.pdf - tiny colour shifts
1141_-_background_shading_cropped.pdf - tiny colour shifts

gs/Resource/Init/pdf_main.ps
gs/devices/vector/gdevpdf.c


2014-01-14 20:09:53 +0000
Chris Liddell <chris.liddell@artifex.com>
ec1c4adcc5fab850e4038c4d5392adddd265c67e

Bug 694871: move libjpeg away from gc memory

Change the libjpeg interface code to use a chunk allocator instead of garbage
collected, "unstable" memory.

Previously, the libjpeg integration used "Postscript" memory, that is, memory
that is subject to garbage collection and save/restore operations.

This means that Postscript like:
/In (file) (r) file /DCTDecode filter def
save
<<
...
/ImageSource In
...
>> image
restore
In closefile

would almost certainly cause a crash, since the memory allocated by libjpeg
during the decoding for the "image" operator would be freed by the "restore"
operator, *before* the "closefile" destroyed the filter stream and the
libjpeg context.

If we opt to always wrap the "default" heap allocator in a chunk allocator
then we should probably remove the chunk allocator instances created
specifically for libjpeg.

No cluster differences.

gs/base/gsstruct.h
gs/base/lib.mak
gs/base/sdct.h
gs/base/sdctc.c
gs/base/sdctd.c
gs/base/sdcte.c
gs/base/sjpegc.c
gs/devices/vector/gdevpsdi.c


2014-01-15 12:54:43 +0000
Chris Liddell <chris.liddell@artifex.com>
c95dd5ba2cfd9b36aa3a18e7725089a741b7fa70

Have DSC parser use GS memory handling

The DSC parser was using it's own default memory alloc/free functions which
just called the libc malloc/free.

This tweaks our integration code so the parser will use the Ghostscript memory
management functions.

There are no changes to the parser code, the changes are entirely confined to
integrating the parser with our PS interpreter.

No cluster differences.

gs/psi/zdscpars.c


2014-01-09 23:05:43 +0100
Simon Bünzli <zeniko@gmail.com>
8ec8321df613986e8642e2975f7182072eb4be62

make opj_stream_set_user_data accept a NULL stream

... for consistency with opj_stream_set_* which does so.

gs/openjpeg/libopenjpeg/cio.c


2014-01-09 22:56:54 +0100
Simon Bünzli <zeniko@gmail.com>
d6121c78a0fc6c8cd87c6495e11d327068518c35

prevent assertion under MSVC on impossibly large allocations

MSVC's debug CRT asserts that arguments to malloc and realloc aren't
impossibly large (close to (size_t)-1) which makes testing fuzzed files
impossible with assertions enabled.

Problem found in a test file, 2236.pdf.asan.40.1376 supplied
by Mateusz "j00ru" Jurczyk and Gynvael Coldwind of the Google
Security Team using Address Sanitizer. Many thanks!

gs/openjpeg/libopenjpeg/opj_malloc.h


2014-01-09 22:54:36 +0100
Simon Bünzli <zeniko@gmail.com>
87b08a096bb8ad61f9dbe4811e208d9c9d7fe63b

don't define lrintf for MSVC 2013 (fix compilation breakage)

gs/openjpeg/libopenjpeg/opj_includes.h


2014-01-09 23:04:38 +0100
Simon Bünzli <zeniko@gmail.com>
0f07c3247cc9211e57bb5429634f79c8c762fbfa

fix error message in opj_jp2_read_colr

gs/openjpeg/libopenjpeg/jp2.c


2014-01-09 22:46:48 +0100
Simon Bünzli <zeniko@gmail.com>
2f4b1565c10fe6faa7ed3854a7fa3cd0a6e18511

tweak commit 66d9c0aa17a5abcecd6590e63f0620f7aa51634c

The fix for testcase 1336.pdf.asan.47.376 for bug 694311 was slightly
too strict: The access violation only happens during the MCT decoding
step which might be skipped for some images. This patch moves the test
into opj_tcd_mct_decode to only apply when it's actually required
(which should allow j2kp4-file3-ycc-8bpc.pdf to be read without errors
inside openjpeg itself and leaves handling of components of different
sizes to the calling application/library).

gs/openjpeg/libopenjpeg/tcd.c


2014-01-09 22:40:39 +0100
Simon Bünzli <zeniko@gmail.com>
0eedf7c22a76f089bbe13d76496ae56de38dfbef

tweak commit 99a6f1af177c15f4db475186b79d169c993494ef

Error messages should go to stderr instead of stdout so that tools such
as mudraw -t don't get stdout polluted.

gs/openjpeg/libopenjpeg/t2.c


2014-01-09 22:35:38 +0100
Simon Bünzli <zeniko@gmail.com>
fc884aee2b69c78500e65c3d05bf216791a9ea4a

prevent heap overflow in opj_t2_read_packet_header

Also prevent a double-free of segment data under OOM conditions.

Problem found in a test file, 1802.pdf.SIGSEGV.36e.894 supplied
by Mateusz "j00ru" Jurczyk and Gynvael Coldwind of the Google
Security Team using Address Sanitizer. Many thanks!

gs/openjpeg/libopenjpeg/t2.c


2014-01-09 22:32:37 +0100
Simon Bünzli <zeniko@gmail.com>
83dad6a76536222a3a51146f942e733a2e90ec52

fix potential NULL-pointer dereference

... caused by testing the wrong variable after opj_realloc
(happens only in OOM situations)

gs/openjpeg/libopenjpeg/jp2.c


2013-12-23 00:00:32 +0100
Simon Bünzli <zeniko@gmail.com>
dafa1945a18e79578335693a4e4c6247e2617ee2

jbig2dec: tweak overflow check in jbig2_(re)alloc

If num * size overflows under x64, the value may be negative and still
fit into a 32-bit integer. The proper check unfortunately requires a
division.

Note: The maximum allowed allocation is (size_t)-0x100 instead of
SIZE_MAX so that debug CRTs which check for the allocation of e.g.
(size_t)-1 never assert.

gs/jbig2dec/jbig2.c


2014-01-10 22:56:52 +0100
Simon Bünzli <zeniko@gmail.com>
5eaf740b2c02523ae2ae6454e546cb6700d4e3f3

Bug 694892: buffer overrun in jbig2_comment_ascii

gs/jbig2dec/jbig2_metadata.c


2014-01-10 22:30:16 +0100
Simon Bünzli <zeniko@gmail.com>
8b82970325b2bd9aa993aa16c214a915ec8210e3

follow-up to 8e2f00f15c988d75a4182ecdcdc1a82b4686ef92

This might fix bug 694903.

gs/jbig2dec/jbig2_symbol_dict.c


2014-01-12 22:12:35 +0100
Simon Bünzli <zeniko@gmail.com>
cddfd67f2df1863f8b06770e80e7c97bf970ccbb

Bug 694882: sanitize component mappings

PCLR, CMAP and CDEF data aren't properly sanitized - even after the
fixes from the last fuzzing round. This patch unifies all the required
checks in a new function opj_jp2_check_color which is invoked before
the cdef and cmap values are used.

This can be seen e.g. in:

66ea31acbb0f23a2bbc91f64d69a03f5_signal_sigsegv_13937c0_7030_5725.pdf

Thanks to Mateusz Jurczyk and Gynvael Coldwind of the Google Security
Team for providing the example files.

gs/openjpeg/libopenjpeg/jp2.c


2014-01-09 22:20:37 +0100
Simon Bünzli <zeniko@gmail.com>
f4139d702559649e577a5df9cfd64b0ca6107a7a

don't ignore buffer sizes

Several functions accept a buffer size but never actually check whether
the buffer overflows during reading/writing. This fixes all cases where
a size variable has explicitly been marked as unused (through a (void)
cast).

This was discovered while investigating an assertion caused by
7cc691f332f26802c64cdc47e17bff8b_signal_sigabrt_7ffff6d59425_2247_2509.pdf
among others.

Thanks to Mateusz Jurczyk and Gynvael Coldwind of the Google Security
Team for providing the example files.

gs/openjpeg/libopenjpeg/event.c
gs/openjpeg/libopenjpeg/jp2.c


2014-01-10 11:45:16 -0700
Henry Stiles <henry.stiles@artifex.com>
2c5cd8c29271d8735349353538c4a353f3aa563b

Debug option "-ZI" results improved or corrected with the goal of
creating output that can be reassembled back into PCL.

We have an assembler and disassembler for PXL: pxlasm.py, pxldis.py,
but they do not support PCL. For PCL we will use the GhostPCL
interpreter with -ZI and an upcoming Python program will read that
output and reassemble back to PCL.

pcl/pccid.c
pcl/pcdither.c
pcl/pclookup.c
pcl/pcommand.c
pcl/pcommand.h
pcl/pcpage.c
pcl/pcparse.c
pcl/pcpatrn.c
pcl/pcsfont.c
pcl/pcsymbol.c
pcl/pctext.c
pcl/pcuptrn.c
pcl/pglabel.c
pcl/pgparse.c
pcl/pgvector.c
pcl/rtmisc.c
pcl/rtraster.c
pl/plmain.c


2014-01-11 11:44:36 +0000
Ken Sharp <ken.sharp@artifex.com>
4a267d719148abf961f479ba6c9024bfa2c18bf5

pdfwrite - limit scan line comparison to actual width

Bug #694930 "Valgrind issues found by fuzzing in compute_subimage (gdevpdfd.c:707)"

The local image converter, and specifically mask to clip conversion,
compare consecutive scan lines of an image to see if they are identical.

However, they were using the width of the allocated raster, which can include
alignment padding, rather then the actual width of the image data. This
meant we were comparing uninitialised data. In this case its actually safe
as we would simply create a more complex clip than required, but its
definitely sub-optimal.

This commit changes the comparison to use the number of bits in the image,
rounded up to the nearest byte.

No differences expected.

gs/devices/vector/gdevpdfd.c


2014-01-09 16:08:15 +0000
Ken Sharp <ken.sharp@artifex.com>
20f6eb7d946cda9bd6b141881d1abd13daec911e

More error checking when copying fonts

Bug #694263 is again a fuzzing bug declared to demonstrate Valgrind errors
which for me causes a seg fault.

This again appears to be due to a broken TrueType font. The additional
checking in this commit resolves the problem for me.

gs/devices/gxfcopy.c


2014-01-09 12:04:51 +0000
Ken Sharp <ken.sharp@artifex.com>
49a05084feee92818347fbf888fc2ab784b82122

pdfwrite - initialise some variables to pacify valgrind

Bug #694236 does not give the valgrind warnings described in the bug
report for me, but did complain about the character widths. It seems
that somehow (broken font ?) the values were uninitialised. Here we just
set them to 0.

No differences expected

gs/devices/vector/gdevpdte.c


2014-01-09 11:13:02 +0000
Ken Sharp <ken.sharp@artifex.com>
e9a574ec0e6d13fcf898a7132ce08476af4ea84d

Don't attempt to copy a missing glyph when copying fonts

Bug #694236 for me does not (initially at least) cause a Valgrind warning,
but does cause a seg fault.

The problem is that we have a (presumably broken) TrueType font where we
try to enumerate all the glyphs in the font. The enumeration code returns
a GS_NO_GLYPH, but the font copying code doesn't catch that, and so tries
to copy that glyph. This causes a crash in the name lookup.

The commit here simply adds an additional check that the glyph is not
'GS_NO_GLYPH', if it is we treat it as an error.

No differences expected.

gs/devices/gxfcopy.c


2014-01-09 08:19:51 +0000
Ken Sharp <ken.sharp@artifex.com>
eb42d237028c3fd832664c5e1479483a430f5ed9

DSC parser - silence a compiler warning with a cast

gs/psi/dscparse.c


2014-01-08 10:57:46 -0700
Henry Stiles <henry.stiles@artifex.com>
b2ecdbba02eac6fa19866bd18c83ece7cdd4074d

Possible fix for 694837.

Allow the luratech jbig2 encoder to process 0 input without error like
all other streams encoders. Analysis by Ken Sharp.

gs/base/sjbig2_luratech.c


2014-01-08 16:12:53 +0000
Ken Sharp <ken.sharp@artifex.com>
32df3bf46606f697d7deae86211c897be63a0764

DSC parser - reset scanning at end of job

Currently the DSC parser never leaves 'scan_trailer', which is fine for
one-job-at-a-time usage, but not good for job server or multiple inputs.

This commit modifies the scan-trailer condition so that if a new DSC header
is encountered, *after* we've found a trailer, we reset some aspects of the
DSC parsing.

Note that this doesn't completely reset the parser as that caused memory
problems.

Bug #692208

No differences expected

gs/psi/dscparse.c


2014-01-08 08:26:14 +0000
Ken Sharp <ken.sharp@artifex.com>
cbeeef7f54bd183515f81d42176a049a7f7703a2

pdfwrite - add a warning if -dUseCIEColor is set

With the current color management its not really sensible to set UseCIEColor
(which was always a horrible hack anyway) in order to do color conversion
or management.

So if we see this being done, show the user a warning. We don't want to
raise an error as someone will undoubtedly complain that they have a good
reason for using UseCIEColor with pdfwrite.....

No differences expected.

gs/devices/vector/gdevpdf.c


2014-01-01 20:32:49 -0800
Ray Johnston <ray.johnston@artifex.com>
13b8f94c86efc4b98c7d63774b761bad9783f16c

Enable the pdf14 optimization. Previous commit only collected data.

Somehow, the previous commit that collected the data didn't actually
skip pdf14 transparency on any bands. Also testing showed that fiils
with patterns that needed transparency were not being detected.

We need to save the page mode pdf14_needed state based on the blend_mode
and opacity to restore to the correct setting after smask or transpacrency
group pushes.

Lastly, we punt if the device is not contone, since the colors written
for bands will be contone which are not compatible with the target.

Correct the pdf14_opmode_names to add in the missing PDF14_ABORT_DEVICE.

gs/base/gdevp14.c
gs/base/gstrans.h
gs/base/gxclist.h
gs/base/gxclpath.c
gs/base/gxclrast.c
gs/base/gxclread.c


2014-01-06 14:29:14 +0000
Ken Sharp <ken.sharp@artifex.com>
b86a214d542a91e526599aaadd2e68d896c1edff

pdfwrite - fix another memory allocator

After the previous problem caused by using the non-stable memory allocator
I reviewed all use of this allocator and nonticed that in this case we
allocate using the stable allocator, but were freeing it using the non-stable
allocator.

This probably only leaks memory but its best to fix it.

gs/devices/vector/gdevpdtd.c


2014-01-06 14:27:37 +0000
Ken Sharp <ken.sharp@artifex.com>
465eb2d291a92c8eda46c090c70594b4ef8f0fba

pdfwrite - add a comment explaining about pdev->pdf_mewmory

gs/devices/vector/gdevpdfx.h


2014-01-06 14:27:01 +0000
Ken Sharp <ken.sharp@artifex.com>
18f35e567b9e6760bf60a1f4c04b725cd343d5a9

pdfwrite - minor memory issue

Noticed while reviewing other problems, we didn't check to see if a memory
allocation was successful, and also; if a subsequent fread() failed we would
not free the allocated memory.

gs/devices/vector/gdevpdfo.c


2014-01-06 14:25:06 +0000
Ken Sharp <ken.sharp@artifex.com>
ba099db2df6867215178b7cfc1065eb921105d66

pdfwrite - squelch a compiler warning

undefine PDF_FOR_EPS2WRITE to prevent compiler complaning its redefined.

gs/devices/vector/gdevpdf.c


2014-01-06 10:39:41 +0000
Ken Sharp <ken.sharp@artifex.com>
ecf24042611a96c9d5560ccec845f3b2e4d70b38

pdfwrite - use stable memory for the outline tree

Bug #694868 "Regression: seg faults starting with 0790b03698b27dcf342e0175d2f833c921b5dab2"

The move of the outline tree to a dynamic allocation instead of static
accidentally used memory subject to save and restore instead of stable
memory. Oddly this only caused problems on the Linux debug build.

This commit moves the allocation to stable memory which I *believe* will
solve the problem. NB Chris is going to alter the allocation code so that
a debug build will flag this sort of problem up.

No differences expected.

gs/devices/vector/gdevpdf.c
gs/devices/vector/gdevpdfm.c


2013-12-30 12:50:40 -0800
Michael Vrhel <michael.vrhel@artifex.com>
d4e6b106c336b8ae7db87f4bec6e0afb6993b687

Fixes for issues with the use of DeviceN source profiles

GC definitions were wrong for some of the structures and also name allocation size was wrong.
Fixes bug 694865

gs/base/gsicc_lcms.c
gs/base/gsicc_lcms2.c
gs/base/gsicc_manage.c


2013-12-20 18:19:23 +0000
Robin Watts <robin.watts@artifex.com>
6700dbf0d426ba8d6a707d639159b5b8db00a95c

Pass on an error code rather than ignore it.

gs/base/gdevp14.c


2013-12-22 23:22:42 -0800
Michael Vrhel <michael.vrhel@artifex.com>
17f0dfaf200163d7207f27f3cc34e0a1cf843203

Add missing case for UNKNOWN color space in transparency group.

This is used when the the new group did not specify a color space. We
were incorrectly returning an error. There is no error. The UNKNOWN
information is stored in the clist and when we later get the UNKNOWN
information we known to just keep the current color space.

gs/base/gdevp14.c


2013-12-23 10:30:04 -0800
Ray Johnston <ray.johnston@artifex.com>
72713e784ddaea275498a67e25ab77aedbc0eb9b

Fix bug 69365: Write pattern colors to all bands consistently for images.

Thanks to Michael Vrhel for tracking this down. If a transparent pattern
color is written to all bands after having been written to a band for
an image, the transparency fill_trans_buffer will be NULL because the
group for the image was pushed at 'begin_typed_image' time. We now write
the color to all_bands based on the image extent, consistently.

gs/base/gxcldev.h
gs/base/gxclimag.c
gs/base/gxclpath.c


2013-12-23 15:45:23 +0000
Ken Sharp <ken.sharp@artifex.com>
0790b03698b27dcf342e0175d2f833c921b5dab2

pdfwrite - convert outline tree to dynamic storage

Bug #690429 "convert outline tree from static array to dynamic list"

In the past the outline tree in pdfwrite was a hard coded array with a
maximum depth of 31. This array is now dynamically allocated, so the depth
is limited only by available memory.

No differences expected

gs/devices/vector/gdevpdf.c
gs/devices/vector/gdevpdfb.h
gs/devices/vector/gdevpdfm.c
gs/devices/vector/gdevpdfx.h


2013-12-20 17:54:42 +0000
Robin Watts <robin.watts@artifex.com>
3574d5254bd93dc2b002f93de120043990c3fcda

Remove mistakenly added files.

clustercmd
clusterdatestamp


2013-12-18 07:56:31 -0800
Michael Vrhel <michael.vrhel@artifex.com>
6f8bb99dae2db541b7941d65816581137990be6d

Temp debug patch

gs/base/gdevp14.c
gs/base/gsptype1.c
gs/base/gxpcmap.c


2013-12-20 15:31:10 +0000
Robin Watts <robin.watts@artifex.com>
dcb60221c23d33e65ed2193f1f0e6355f06c12ab

Add more error handling missing from pdf14.

gs/base/gxblend1.c


2013-12-20 15:27:54 +0000
Robin Watts <robin.watts@artifex.com>
d355b00b5915697904a2c0f8a2334050d2c1bf32

Bug 694858: Add some missing error handling.

This solves at least some of the SEGVs.

clustercmd
clusterdatestamp
gs/base/gstrans.c


2013-12-20 10:05:58 +0000
Ken Sharp <ken.sharp@artifex.com>
ba28d0f50d9de48d8961f93044b5dac8139312f2

pdfwrite - update element linked list before freeing element in cos dicts

Bug 694854 "Converting pdf to PDFX standard crashes ghostscript right before the end"

When creating a PDF/X file the code deletes any BleedBox, TrimBox, ArtBox
entries from the page dictionary after writing them (ho idea why...) using
the cos_dict_delete() function.

The function frees the memory, and then updates the linked list of elements
in the dictionary, however it updates the list after freeing the memory. If
the free memory pointed to should alter before the linked list is updated,
then the list will be updated with garbage.

Updating the linked list *before* freeing the memory is a much better way
to proceed.

Because this is only called when creating PDF/X files, no differences are
expected.

gs/devices/vector/gdevpdfo.c


2013-12-19 22:30:39 +0100
Till Kamppeter <till.kamppeter@gmail.com>
615059129740d77fac1db1bbec4a79958d88e3bf

Fixed line conibuation typos in previous commit (d997bc4)

gs/cups/gdevcups.c


2013-12-19 00:41:19 +0000
Robin Watts <robin.watts@artifex.com>
77eb4f71f15365c713f1fec698a87203afaaf984

Add some error checking to pdf14.

When we record an error code, ensure we check it.

gs/base/gdevp14.c


2013-12-19 12:32:23 +0000
Chris Liddell <chris.liddell@artifex.com>
3c913314883114d671d550e5db9efa2192241040

Only issue the "unbalanced q/Q" warning once per page.

Write a flag to the pdfdict to indicate that we've already issued the warning
and skip it from then on for the current page. Reset flag at the end of the
page.

No cluster differences.

gs/Resource/Init/pdf_main.ps
gs/Resource/Init/pdf_ops.ps


2013-12-19 17:03:39 +0100
Till Kamppeter <till.kamppeter@gmail.com>
d997bc49531613205e055c8e4e25d93bb4c762e6

Added "pwgraster" output device

The "pwgraster" output device rasterizes the input into the PWG Raster
format, an industry-standarized raster format for printers, especially
the upcoming IPP Everywhere network printers which are supposed to
work with any hardware-model-specific software (drivers). As PWG
Raster is derived from CUPS Raster it is generated by the "cups"
output device, but calling it with the "pwgraster" name makes it
generating PWG Raster instead of CUPS Raster.

gs/configure.ac
gs/cups/gdevcups.c
gs/devices/devs.mak


2013-12-19 09:40:01 +0000
Ken Sharp <ken.sharp@artifex.com>
81b246414c4624cf476793c2590201de408ea33a

pdfwrite - don't allocate multiple object IDs for shadings

Bug #694853 "PDF/A generation does not fix all errors"

When the code to detect and elide duplicate shadings was added we used the
pdf_substitute_resource function to detect duplicates and drop the new one.

However this function *always* assigned a new object ID if it wasn't a
duplicate, which leaves the original ID dangling (if the object already had
one). This commit simply avoids creating a new ID if the object is not a
duplicate, and already has an ID.

I'm a little nervous about this one, but a cluster push seems to be OK. No
differences expected.

gs/devices/vector/gdevpdfu.c


2013-12-18 18:43:56 +0000
Robin Watts <robin.watts@artifex.com>
1a25414344c0a2c3b9c8947ad120d34845ecb387

Bug 693365: Add find_pdf14_device function, and use it.

This seems to solve the problem with simple6.pdf at least.

gs/base/gdevp14.c
gs/base/gsicc_monitorcm.c
gs/base/gspaint.c
gs/base/gxdevsop.h


2013-12-18 15:26:49 +0000
Robin Watts <robin.watts@artifex.com>
36f97ff44c7e94d1cf033a6495f2876b1976ca66

Bug 694258: Allow for floating point inaccuracies in pattern code.

When calculating the regions 'touched' by pattern repeats, allow for
inaccuracies in the floating point calculations.

gs/base/gsptype1.c
gs/base/math_.h


2013-12-18 15:06:17 +0000
Chris Liddell <chris.liddell@artifex.com>
b0cbadbbb03dffbf5f9ec9e72658f59e0e59238a

Remove floatp references in docs.

CLUSTER_UNTESTED

gs/doc/C-style.htm


2013-12-18 14:53:48 +0000
Chris Liddell <chris.liddell@artifex.com>
cf009c80c4a371ad64cc5c0444d72902657dbfce

Replace the "floatp" with "double"

For historic reasons, floating point parameters used the type "floatp" which
was actually typedef'ed to "double".

To reduce confusion, we now use "double" directly.

No cluster differences.

gs/base/fapi_ft.c
gs/base/gdevdcrd.c
gs/base/gdevdflt.c
gs/base/gdevvec.c
gs/base/gdevvec.h
gs/base/gsalpha.c
gs/base/gsalpha.h
gs/base/gscdevn.c
gs/base/gschar.c
gs/base/gschar.h
gs/base/gscie.c
gs/base/gscie.h
gs/base/gsciemap.c
gs/base/gscolor.c
gs/base/gscolor.h
gs/base/gscolor1.c
gs/base/gscolor1.h
gs/base/gscolor3.c
gs/base/gscolor3.h
gs/base/gscoord.c
gs/base/gscoord.h
gs/base/gscpixel.c
gs/base/gscrd.c
gs/base/gscrdp.c
gs/base/gsdevice.c
gs/base/gsdparam.c
gs/base/gsdps1.c
gs/base/gsfont.c
gs/base/gsfont.h
gs/base/gsfunc0.c
gs/base/gsfunc4.c
gs/base/gshsb.c
gs/base/gshsb.h
gs/base/gsht.h
gs/base/gsht1.c
gs/base/gshtscr.c
gs/base/gshtx.c
gs/base/gshtx.h
gs/base/gsicc.c
gs/base/gsicc_create.c
gs/base/gslib.c
gs/base/gsline.c
gs/base/gsline.h
gs/base/gsmatrix.c
gs/base/gsmatrix.h
gs/base/gspaint.c
gs/base/gspath.c
gs/base/gspath.h
gs/base/gspath1.c
gs/base/gspath2.h
gs/base/gsstate.c
gs/base/gsstate.h
gs/base/gstext.c
gs/base/gstext.h
gs/base/gstparam.h
gs/base/gstrans.c
gs/base/gstrans.h
gs/base/gxccache.c
gs/base/gxchar.c
gs/base/gxchar.h
gs/base/gxchrout.c
gs/base/gxchrout.h
gs/base/gxclimag.c
gs/base/gxclpath.c
gs/base/gxcmap.c
gs/base/gxcolor2.h
gs/base/gxdevcli.h
gs/base/gxdevice.h
gs/base/gxfapi.c
gs/base/gxfmap.h
gs/base/gximag3x.c
gs/base/gximage3.c
gs/base/gxline.h
gs/base/gxmatrix.h
gs/base/gxpath.c
gs/base/gxpath.h
gs/base/gxshade1.c
gs/base/gxshade4.h
gs/base/gxshade6.c
gs/base/gxtmap.h
gs/base/sdcparam.c
gs/base/spprint.c
gs/base/spprint.h
gs/base/stdpre.h
gs/contrib/eplaser/gdevescv.c
gs/contrib/eplaser/gdevescv.h
gs/contrib/lips4/gdevl4v.c
gs/contrib/opvp/gdevopvp.c
gs/devices/gdevcdj.c
gs/devices/gdevclj.c
gs/devices/gdevijs.c
gs/devices/gdevjpeg.c
gs/devices/gdevpxut.c
gs/devices/gdevpxut.h
gs/devices/vector/gdevpdf.c
gs/devices/vector/gdevpdfc.c
gs/devices/vector/gdevpdfd.c
gs/devices/vector/gdevpdfg.c
gs/devices/vector/gdevpdfg.h
gs/devices/vector/gdevpdfj.c
gs/devices/vector/gdevpdfk.c
gs/devices/vector/gdevpdfm.c
gs/devices/vector/gdevpdfo.c
gs/devices/vector/gdevpdfo.h
gs/devices/vector/gdevpdfv.c
gs/devices/vector/gdevpdts.c
gs/devices/vector/gdevpdts.h
gs/devices/vector/gdevps.c
gs/devices/vector/gdevpsdf.h
gs/devices/vector/gdevpsdi.c
gs/devices/vector/gdevpsdu.c
gs/devices/vector/gdevpsf2.c
gs/devices/vector/gdevpx.c
gs/devices/vector/gdevsvg.c
gs/devices/vector/gdevxps.c
gs/psi/idparam.c
gs/psi/idparam.h
gs/psi/imain.c
gs/psi/imain.h
gs/psi/zcolor.c
gs/psi/zgstate.c
gs/psi/zht1.c
gs/psi/zht2.c
gs/psi/zmatrix.c
gs/psi/zpath.c
gs/psi/zpath1.c
gs/psi/ztrans.c
pcl/pccsbase.c
pcl/pcfont.c
pcl/pcht.c
pcl/pcindxed.c
pcl/pcindxed.h
pcl/pcmtx3.c
pcl/pcmtx3.h
pcl/pcommand.c
pcl/pcpage.c
pcl/pcpalet.c
pcl/pcpalet.h
pcl/pcparam.h
pcl/pcpatxfm.c
pcl/pcpatxfm.h
pcl/pcrect.c
pcl/pcsfont.c
pcl/pctext.c
pcl/pgcolor.c
pcl/pgdraw.c
pcl/pgdraw.h
pcl/pgfdata.c
pcl/pggeom.c
pcl/pggeom.h
pcl/pglabel.c
pcl/pgpoly.c
pcl/pgvector.c
pcl/rtgmode.c
pcl/rtraster.c
pl/pjparse.c
pl/pjparse.h
pl/pjparsei.c
pl/pjtop.c
pl/pjtop.h
pl/plchar.c
pl/plfont.h
pl/plsrgb.c
pl/pluchar.c
pxl/pxink.c
pxl/pxpaint.c
pxl/pxpthr.c
svg/svgtop.c
tools/gslite/gslt_test.c
xps/xpstop.c


2013-12-18 11:37:40 +0000
Ken Sharp <ken.sharp@artifex.com>
5ddd13eda3853d53315b7ba656ccd32ad9814c34

ps2write - Don't emit a page size change if the last request failed (and was the same size)

Bug #694852 We check the current media size at the start of every page, and
only emit a new request if the page is a different size to the current size.

However, if the request fails (media not available) we keep on requesting
the media via setpagedevice. This causes duplexing to be disabled, as each
setpagedevice resets the device and ejects the previous page.

This commit still checks the current page size, however, if it is not the
size needed for the page, we then check to see if 'MediaRequested;' is
known. If it is not we set the media, and set MediaRequested to the new
media size. If MediaRequested is known, we check to see if the new media
size is the same as the last one we requested. If it is there's no point
in doing a new request as it will fail again,so we drop the request.

If the new requested media is not the same as the last requested media,
then we do emit a new request, which may or may not be satisfied of course.

This should permit duplexing to work and be slightly faster in the case
where requested media is not available.

gs/devices/vector/opdfread.h
gs/lib/opdfread.ps


2013-12-14 13:13:02 +0000
Chris Liddell <chris.liddell@artifex.com>
2f8b73d56d667334e935071f24f1d6b1860a48e2

Bug 694832: refine when to elide the TTF notdef glyph

Only force the Truetype notdef glyph to be non-marking when the font in
question uses a TTF cmap table other than the symbolic (3.0) cmap table.

Several cluster files show differences - all except one are progressions
with reference to Acrobat, and the exception was "wrong" before and is
slightly differently wrong now (an entirely different underlying issue).

gs/Resource/Init/gs_ttf.ps
gs/psi/zfapi.c


2013-12-17 17:33:05 +0000
Robin Watts <robin.watts@artifex.com>
727b6e87edc234670120dcce040547610736fe0d

Bug 694844: Fix thin stroking of paths with non-idempotent colors.

For non-idempotent colors when stroking we have to construct an entire
path and then fill it, rather than stroking each section as we go.

Unfortunately in the code that implements this, we missed a case - thin
sections can be stroked section by section even in the non-idempotent
case.

We fix that here.

This appears to solve Bug 694844, which was hitting this case.

gs/base/gxstroke.c


2013-12-16 18:13:03 +0000
Robin Watts <robin.watts@artifex.com>
300c3ea8f2c82471c5e57655bd13549f1172c38a

Bug 694842: Fix threshold table generation.

When we generate threshold tables for dithering, we should expect them
to be 'evenly distributed'. This is not the case currently. In the
example given in this bug, we generate an 8x4 dither table. This
contains 32 pixels, all of which can be on or off, hence we have 33
levels, ranging from 0 on to 32 on.

We would further expect our input range to be evenly divided into these
levels - i.e. roughly 256/33 in each band.

This is not the case. The threshold table generated is:

threshold array row 0= 88 120 152 184 176 144 112 80
threshold array row 1= 192 224 208 168 72 40 56 96
threshold array row 2= 232 255 240 136 32 8 24 128
threshold array row 3= 216 248 200 104 48 16 64 160

The operation of our thresholding code is to set a pixel if
contone(x,y) < threshold(x,y), hence our inputs divide into:
0-7,8-15,...240-254,255

Not only does this not have the required 256/33 per region, the top
and bottom regions are far from being even (8 vs 1 entries).

Ideally we should fix this code so generate the correct distribution -
an enhancement bug will be opened for this. For now we will satisfy
ourselves by offsetting the thresholds slightly so that the top and
bottom ranges are at least even. The new code gives:

threshold array row 0= 84 116 148 180 172 140 108 76
threshold array row 1= 188 220 204 164 68 36 52 92
threshold array row 2= 228 252 236 132 28 4 20 124
threshold array row 3= 212 244 196 100 44 12 60 156

gs/base/gsht.c


2013-12-17 10:30:26 +0000
Ken Sharp <ken.sharp@artifex.com>
712d2254dc190baeea795931a470d39f8d43c2bf

Update opdfread.ps with the changes for eps2write. Although we no longer
actually use opdfread.ps, instead we use opdfread.h, we want to keep the
two in sync.

gs/lib/opdfread.ps


2013-12-17 10:29:31 +0000
Ken Sharp <ken.sharp@artifex.com>
730dbe8b0717b2f882067163737eb89708e7e66d

correct a tab in the source, replacing with spaces.

gs/devices/vector/gdevpdfd.c


2013-12-16 17:44:22 +0000
Ken Sharp <ken.sharp@artifex.com>
1f30a9f66b280fad5cb8133e02530c60a038843c

Add new 'eps2write' device which will eventually replace epswrite

No differences expected

gs/devices/devs.mak
gs/devices/vector/gdevpdf.c
gs/devices/vector/gdevpdfb.h
gs/devices/vector/gdevpdfd.c
gs/devices/vector/gdevpdfi.c
gs/devices/vector/gdevpdfu.c
gs/devices/vector/gdevpdfx.h
gs/devices/vector/gdevpdtc.c
gs/devices/vector/gdevpdte.c
gs/devices/vector/gdevpdti.c
gs/devices/vector/gdevpdts.c
gs/devices/vector/gdevpdts.h
gs/devices/vector/gdevpdtt.c
gs/devices/vector/gdevpdtt.h
gs/devices/vector/opdfread.h
gs/psi/msvc.mak


2013-12-16 08:32:12 -0800
Michael Vrhel <michael.vrhel@artifex.com>
abd38464f9b058502c9491873ff7f01f00c406d7

Fix for goof up in loop index variable.

Fixes bug 694811 and 694848. Thanks ken for finding this.

gs/base/gdevp14.c


2013-12-16 12:34:26 +0000
Robin Watts <robin.watts@artifex.com>
8e2f00f15c988d75a4182ecdcdc1a82b4686ef92

Bug 694845: Shailesh Mistrys patch for regression in jbig2dec

Having reverted the problematic patch, this is the fixed version.

gs/jbig2dec/jbig2_symbol_dict.c


2013-12-16 11:45:42 +0000
Robin Watts <robin.watts@artifex.com>
fa8b62e45f07564304d671b57cba7fede5d4729d

Revert "Bug 694124: Shailesh Mistry's patch for valgrind problems."

This reverts commit d166833eb541466104c582980be1e42e0062c738.

gs/jbig2dec/jbig2_symbol_dict.c


2013-12-16 10:08:20 +0000
Chris Liddell <chris.liddell@artifex.com>
bcac8f9cfd8330ec4434b176c150c44af276393e

Force special action to build language_switch

A "normal" attempt to build language_switch will elicit a warning, to actually
make it build, adding "UNSUPPORTED=1" to the (n)make command line is required.

language_switch/pspcl6_gcc.mak
language_switch/pspcl6_msvc.mak


2013-12-15 09:51:50 -0800
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
88a39ea069424045161ff000af5574ba340bb51d

Remove the language switch build from the default make targets.

Makefile


2013-12-14 13:54:31 +0000
Chris Liddell <chris.liddell@artifex.com>
70c1f72389b31e95e9cffb6578a3a94e3052cb44

Bug 694843: reset FAPI font data on "refine" font

For example, a font dict may be copied, so the "FAPI" entry is copied with
the dict, but the new internal font object does not have the FAPI server in
it. We catch that in the "refine font" call - previously here we didn't reset
the font data, just "re-bound" the FAPI server. It turns out with the
language switch build, we need to set the FAPI font data, too.

No cluster differences.

gs/psi/zfapi.c


2013-12-13 15:15:24 +0000
Ken Sharp <ken.sharp@artifex.com>
5b592a88fa8760f5fd4d7a8f082e094bda981a93

pdfwrite - yet more discriminating tests before TrueType font combining

Bug #694833 "german letters adieresis, odieresis and udieresis are missing after conversion to PDF"

This follows on from commit 8b6be8be2cdcefae39339682d45d3c009ab909ac
Bug #694538.

Again we have a random pair of Type 42 fonts which would be compatible to
combine, except that they have differing max composite points and contours.
Mad, but there you go.

No differences expected, we don't see these files from any other source.

gs/base/gstype42.c
gs/base/gxfont42.h
gs/devices/gxfcopy.c


2013-12-12 16:20:59 +0000
Chris Liddell <chris.liddell@artifex.com>
3e8a32f8a884039b851c39b5aceabfd8c8e93198

Inherit CFLAGS from environment in (pdl) configure script

No cluster differences.

config.mak.in
configure.ac
main/pcl6_gcc.mak


2013-12-12 00:58:04 +0000
Robin Watts <robin.watts@artifex.com>
99a6f1af177c15f4db475186b79d169c993494ef

Bug 694119: Shailesh Mistry's patch for Valgrind problems.

Don't read off the end of an empty (or almost empty) buffer.

gs/openjpeg/libopenjpeg/t2.c


2013-12-11 19:06:03 +0000
Robin Watts <robin.watts@artifex.com>
bb123bf027bf7ea0aa5b82ed2626d21f91c57613

Bug 694363: Shailesh Mistry's patch for SEGV.

Avoid buffer overflow due to oversized image dimensions causing
int overflow.

gs/openjpeg/libopenjpeg/j2k.c


2013-12-11 19:02:39 +0000
Robin Watts <robin.watts@artifex.com>
d166833eb541466104c582980be1e42e0062c738

Bug 694124: Shailesh Mistry's patch for valgrind problems.

Detect zero sized symbol dictionary and exit neatly. Avoids overreads.

gs/jbig2dec/jbig2_symbol_dict.c


2013-12-11 09:47:45 -0800
Ray Johnston <ray.johnston@artifex.com>
f42c717329ec13db00f2627bd89ad4c081379fd9

Remove extraneous %d from a debug message (-ZL).

Thanks to Henry for spotting this.

gs/base/gxclutil.c


2013-12-11 16:17:31 +0000
Chris Liddell <chris.liddell@artifex.com>
19d709b45b9173e225bd6e62bb20e9eb5f192254

Bug 694836: remove erroring CIDFont subsitute record

When subsituting a CIDFont we dynamically update the CIDFont resource's .map
dictionary (to ensure the substitute CIDFont is loaded with the correct
"attributes").

If findresource fails with the updated .map dictionary, remove the entry we
just added, to avoid subsequent attempted loads of that CIDFont finding the
erroring .map entry.

No cluster differences.

gs/Resource/Init/gs_ciddc.ps
gs/Resource/Init/pdf_font.ps


2013-12-11 13:03:28 +0000
Ken Sharp <ken.sharp@artifex.com>
b3be65914d6dbe6585dec8576e80c7fb52fffbe4

pdfwrite - fix compiler comparison oddness

Bug #694838 "Artifex Ghostscript 9.10: JBIG2Encode requires CompabilityLevel >= 1.4"

The code compares a float variable with a non-integer constant. Bizzarely
the comparison fails unless the contant is declared as type float as well
(using the x.yf syntax), at least on the Microsoft compiler. Presumably
without this they are evaluated as double.

This commit simply alters the constants to be declared specifically as
floats.

No differences expected.

gs/devices/vector/gdevpdfp.c


2013-12-07 16:16:22 -0800
Ray Johnston <ray.johnston@artifex.com>
2aaae7404988d7443b002907954693749c468347

A better fix for the previous -dEPSFitPage.

Note that -dEPSCrop with -dEPSFitPage is actually done in the C
code.

gs/Resource/Init/gs_epsf.ps


2013-12-07 14:42:07 -0800
Ray Johnston <ray.johnston@artifex.com>
7f4d1c480eb53e2f18bd87a0c3cb0f98faa7281c

Fix EPSFitPage (related to bug 694829.

The EPSFitPage now rotates as well as translating/scaling.

gs/Resource/Init/gs_epsf.ps
gs/Resource/Init/gs_init.ps


2013-12-03 10:09:56 +0000
Ken Sharp <ken.sharp@artifex.com>
ca3d544d51c3e1d63a2fd115dac23255c966ba0e

pdfwrite - add Resources to current substream when starting an SP pdfmark

Bug #689653 "Nested form XObject pdfmarks not working properly"
Bug #689883 "/SP pdfmark inside /BP-/EP pdfmark pair for XObject re-use"

When we use a 'picture' via the SP pdfmark, add the picture resource to
the current substream resources, so that if we are accumulating a substream
(pattern, form, another picture etc) then the Resources for that substream
will contain an entry for the picture. Previously they did not and relied
on inheriting from the page dictionary, which is long since deprecated.

Thanks to Alexander Grahn for diagnosing the problem and supplying the
patch.

No differences expected.

gs/devices/vector/gdevpdfm.c


2013-12-02 16:28:46 -0800
Ray Johnston <ray.johnston@artifex.com>
da944b290302bf9391116b806c4a368b7d185d94

Add debugging for max heap memory allocation for -Z:

This is a minor hack for debug builds that prints out the 'max' usage
which is often of interest. A better method would be to add a memory
proc to print the stats that would be implemented for all allocators.

If so, a 'verbosity' control might be nice for 'max' (max used) and
'leaked' that would print all elements that the allocator knows about
(for leak detection), or 'current' to print current allocated size.

gs/psi/iapi.c


2013-11-30 13:46:49 +0000
Ken Sharp <ken.sharp@artifex.com>
05d2e5cd0b8ce92ddeacca00e8f64d3f7b2e5883

pdfwrite - add garbage collection handlers to Bicubic streams

Bug #694826 "Seg fault with pdfwrite device"

There was an oversight when coding the Bicubic stream downsampling and the
working buffer was not enabled for relocation on garbage collection.

No differences expected.

gs/devices/vector/gdevpsds.c
gs/devices/vector/gdevpsds.h


2013-11-29 09:31:04 +0000
Ken Sharp <ken.sharp@artifex.com>
33b41157c24f27cd912fa1d517e9246af37bbe2f

txtwrite - set the returned glpyh in the text enumerator before executing CDevProc

Bug #698422 "txtwriter driver crashes with this (badly crafted) PDF file"

The txtwrite device was leaving the 'returned' glyph unset when it needed
to run the CDevProc for a CIDFont. This could later cause a crash because
other code would attempt to use the uninitialised variable.

No differences expected.

gs/devices/vector/gdevtxtw.c


2013-11-28 18:24:03 +0000
Robin Watts <robin.watts@artifex.com>
748013087dd75882abbcfe4c630eeddb059be773

Bug 694362: More tweaking in jbig2dec.

Following more discussions with Simon, and testing within MuPDF, it
appears that the original code was correct. I am therefore restoring
the original behaviour, except with a direct jump to cleanup rather
than relying on dropping into the following case.

This will result in just 1 error being given, and is cleaner, to my
mind.

gs/jbig2dec/jbig2_symbol_dict.c


2013-11-28 17:51:02 +0000
Robin Watts <robin.watts@artifex.com>
fa25793292f8e6799ecad1bcd6565206b7566664

More work on bug 694362

Back out some 'unreachable code' that I had accidently added back in.

Remove a couple of unreachable 'break;' statements too.

gs/jbig2dec/jbig2.c
gs/jbig2dec/jbig2_segment.c
gs/jbig2dec/jbig2_symbol_dict.c


2013-11-28 16:43:26 +0000
Robin Watts <robin.watts@artifex.com>
e697fc428f4cca033d0b844cc4bceebffe50e853

Pull changes back from mupdf's version of jbig2dec to gs's.

MuPDF now tracks the version of jbig2dec extracted from gs.
Shelly spotted a couple of minor things that had been lost as
part of his investigation into bug 694362. Pull them back
across.

gs/jbig2dec/jbig2.c
gs/jbig2dec/jbig2_segment.c
gs/jbig2dec/jbig2_symbol_dict.c


2013-11-27 09:38:02 +0000
Ken Sharp <ken.sharp@artifex.com>
01cef1fd7dbaf3ef48dcff9e23875980265f2859

pdfwrite - ignore annotation /AP where the appearance is not a stream

Bug #694809 "Conversion of PDF-file fails with typecheck-error"

The speciment PDF file has an invalid appearance for an annotation:

182 0 obj
<<
/AP << /N << /Yes /null >> >>

The normal appearance should be a dictionary where each key value pair has
a value which is a stream. /null is not a stream.

This commit drops annotations with this problem and emits a warning.

No differences expected.

gs/Resource/Init/pdf_draw.ps


2013-11-27 10:44:28 +0100
Till Kamppeter <till.kamppeter@gmail.com>
87a7fd8afe9af506bf91024d8cc60ef0721450d5

"cups" output device: Support for PPD-less printing and PWG Raster output

1. PWG Raster output: With -sMediaClass=PwgRaster the output is in PWG
Raster format and not in CUPS Raster format. TODO: Create "pwg" or
"pwgraster" output device name for that.

2. Support for PPD-less printing: If the "PPD" environment variable is
not set to a valid PPD file, allow setting unprintable margins via
something like:

"-c '<</.HWMargins[12 12 12 12] /Margins[0 0]>>setpagedevice'"

3. Correct rounding by adding 0.5 to float numbers before converting
them to integer.

gs/cups/gdevcups.c


2013-11-27 08:43:53 +0000
Ken Sharp <ken.sharp@artifex.com>
49f620bbdabaa186b56cb783afd30bcfc8ca40ef

pdfwrite - remove an unused variable to silence a compiler warning

gs/devices/vector/gdevpdfv.c


2013-11-26 16:20:18 +0000
Ken Sharp <ken.sharp@artifex.com>
fe99ca5fd2e3b191a76c7f7d791b72f3603e9fea

pdfwrite - spot reuse of shading dictionaries and don't emit multiple times

Bug #689247 "pdfwrite creates redundant shadings"

Previously we always made a new shading and pattern dictionary every time
we encountered a shading. Taking advantage of the hashing mechanism that
was written to improve performance, we can now spot reuse of shading
dictionaries, and emit only a single copy.

The output from the test file now only contains 106 shadings and patterns
and the compressed file size is reduced by 41% as a result.

No differences expected.

gs/devices/vector/gdevpdfv.c


2013-11-26 09:21:13 +0000
Chris Liddell <chris.liddell@artifex.com>
fb3e5c6278fc7ea5e1bfdb3a23944cdcce13eb5a

Change the order of checks when enumerating PCL fonts.

We need to check whether the MT fonts have populated the font dictionary
before we worry about whether there's a path to find the TTF versions of the
built-in fonts.

No cluster differences.

pl/pllfont.c


2013-11-20 14:55:12 +0000
Chris Liddell <chris.liddell@artifex.com>
9ecb86e69f473d8c981baeca6885d67b23964440

pcl/FAPI MT font fixes.

Fix a problem with parsing out the FCO paths from the FCO list string (we could
run off the end of the string).

Make the "header" byte swapping call conditional on being a little-endian
platform.

Fix a makefile hiccup that resulted in the FCO files being built into the romfs
twice.

CLUSTER_UNTESTED

gs/base/fapiufst.c
main/pcl6_gcc.mak
pl/pllfont.c


2013-11-26 12:07:13 +0000
Ken Sharp <ken.sharp@artifex.com>
90ec17f20be53db00fcbc2ada6931e7cc7b22b9e

pdfwrite - fix dictionary stream hashing

The dictionary stream hashing code didn't initialise the MD5 hash before
using it, which could lead to problems. Also the cos_stream_equal routine
was passing in an MD5 state which would then be reused inside the hashing
code. Although this doesn't seem to cause a problem, and we don't actually
use that state, its safest if we make use a dummy instead.

Problems discovered while working on duplicate shadings.

No differences expected

gs/devices/vector/gdevpdfo.c


2013-11-25 18:26:20 +0000
Robin Watts <robin.watts@artifex.com>
83fb95771604bd85b1b3345f67d83cc99c69bfd9

Bug 694245: Fix valgrind problems.

During stroke calculations, ff we have a non-invertible matrix, then
use 0 as the calculated distance, rather than running with
undefined values. We were failing to check for an error code.

Returning an error code stops rendering, so swallow the error and
continue with 0.

gs/base/gxpdash.c
gs/base/gxstroke.c


2013-11-25 18:39:05 +0000
Robin Watts <robin.watts@artifex.com>
7be77f2a74952c2d7f8f3969ae885a014b51513c

Add missing Makefile header dependency.

gs/base/lib.mak


2013-11-25 09:58:08 -0800
Ray Johnston <ray.johnston@artifex.com>
0d8fcaef61f7af1a032f9dff8d38957b335ee8cc

Remove #define DEBUG_TRACE_PS_OPERATORS inadvertently left enabled.

gs/psi/iinit.c
gs/psi/iinit.h


2013-11-25 14:33:12 +0000
Robin Watts <robin.watts@artifex.com>
7b3a65aab20feac334cac8e5935ba5cbe310ac69

Fix previous commit; align_bitmap_mod is in bytes not bits.

Correct the calculations in the previous commit.

gs/base/gsiparam.h


2013-11-25 13:24:03 +0000
Robin Watts <robin.watts@artifex.com>
b81962611a292e1b2c5306f3d5cdfea832715169

Bug 694601: Fix big endian crash in mem_mono_copy_mono.

While the crash is reported on a big endian device, the problem actually
potentially occurs on little endian systems too. As it happens,
x86, amd64, and many ARM configurations will read happily from unaligned
addresses. Some ARMs and many other processors will not, however, so we
apply a fix that will work properly everywhere.

When calling device level functions, we should ensure that the 'raster'
given is always a multiple of align_bitmap_mod bits.

Thanks to John Wehle for the bug report and suggested fix.

gs/base/gsiparam.h


2013-11-23 21:37:03 -0800
Ray Johnston <ray.johnston@artifex.com>
4a72e695c6ad632a38d27eaaa45bdbad8b5a0fa1

Fix garbage output with --saved-pages due to not doing needed erasepage.

Actions which print, or reallocate to clist mode or page mode, may
need the page to be erased. This includes the 'print' action. Seen
with 12-07C.PS when gs_cet.ps is used.

Also, don't allow "copies n" without a prior "begin".

Silence a few build warnings (missing dependency)

gs/base/gxclpage.c
gs/base/gxclpage.h
gs/psi/iinit.h
gs/psi/imainarg.c
gs/psi/int.mak


2013-11-20 17:03:48 -0800
Ray Johnston <ray.johnston@artifex.com>
006051023733a636fc7e61754489e05fa38acdea

Remove FORCE_SAVED_PAGES_TEST since cluster now supports extras=...

Also clean up some compiler warnings.

gs/psi/imain.c
gs/psi/imainarg.c
gs/psi/iminst.h


2013-10-23 11:36:09 -0700
Ray Johnston <ray.johnston@artifex.com>
54610538e180cb5cb9b80c51f9a8a3d5b9bba5c2

Make order of --saved-pages-test and --saved-pages= options position independent.

The position of these command line options had been required to be the
last option prior to the first file to run, but this is not how most
other command line options operate. This allows the --saved-pages-test
or --saved-pages=begin option to be placed anywhere in the command line.

The debug option to FORCE_SAVED_PAGES_TEST is now in psi/imain.c
and the OMIT_SAVED_PAGES_TEST is removed.

gs/psi/imain.c
gs/psi/imainarg.c
gs/psi/iminst.h


2013-10-05 12:27:58 -0700
Ray Johnston <ray.johnston@artifex.com>
97535718d671b728c47f7bbc35512449c47d2bc1

Fix more Segfaults with --saved-pages and psdcmyk and many differences.

Devices that have devn paramaters could close the device so make sure
and open it. Also set banding_type to BandingAlways while in saved-pages
mode and restore it when we end saved-pages mode.

A few files still segfaulted, and there were many differences because
the page was not erased after the saved-pages "begin".

In gx_saved_page_load, for pages that fit in a single band (as with
large -dMaxBitmap values), reset the ymin and ymax to force rasterizing
the next page's clist.

gs/base/gxclpage.c
gs/base/gxclpage.h
gs/psi/imainarg.c
pl/plmain.c


2013-11-22 17:34:46 +0000
Chris Liddell <chris.liddell@artifex.com>
55d90681fd4eb85fa8d38b965fb31d12cdb133e2

Enable shared library builds on AIX (gcc only)

Add the code to detect AIX (and gcc), and setup the command like arguments
so the "make so" targets works.

There is still a "duplicate symbols" warning on ".main" when linking to the
shared lib - none of the documented options seemed to resolve that.

No cluster differences.

gs/configure.ac


2013-11-22 15:23:00 +0000
Ken Sharp <ken.sharp@artifex.com>
cdd142387a04a6d7ea519838e15204c4d7c681d8

pdfwrite - flush streams before attempting to MD5 hash them

This was discovered in the process of other work. Its possible that when we
MD5 hash a stream, its still partially or fully buffered, not written to
the asides file. This commit makes sure that the streams are flushed first.

No differences expected.

gs/devices/vector/gdevpdfo.c


2013-11-22 12:16:40 +0000
Robin Watts <robin.watts@artifex.com>
82e02b0dc49b51fbe4851a16a669ef83d35a2fae

Bug 694803: Fix truncated psd files.

GS can truncate the number of spots used if we are working with PDF
files, hence not all 6 planes may be written. Fix this here.

gs/devices/gdevcmykog.c


2013-11-22 14:09:34 +0000
Robin Watts <robin.watts@artifex.com>
47584728a68520b754ba97f0bcbf001a19d8271b

Bug 694802: psdcmykog files truncated on MacOS.

It appears that macos will not allow you to read from files opened
as "wb", so use "w+b" instead. I probably should have been using this
anyway.

gs/devices/gdevcmykog.c


2013-11-21 16:51:29 +0000
Robin Watts <robin.watts@artifex.com>
16c29cb9deb49be55c582213469ff6993d26c731

Bug 694798: Fix SEGV with psdcmykog device.

The alignment/padding code was going wrong. In cases where the device
changes size and reallocates, we were attempting to resize the buffer
memory using the aligned pointer rather than the unaligned pointer.

gs/base/gdevmem.c


2013-11-21 15:01:16 +0000
Robin Watts <robin.watts@artifex.com>
1829196ecccb692765c27c9b3eac13367cf50204

Bug 694797: Remove stray code from psdcmykog device.

Some stray code in the close method was causing the device to clear the
file on exit. This only seems to happen in some cases though. Just
removing the code should solve it.

gs/devices/gdevcmykog.c


2013-11-21 14:32:23 +0000
Ken Sharp <ken.sharp@artifex.com>
1eeb45d0537ba8e561f27d6461fc5b62bd042340

pdfwrite - honour device-independent color conversion strategy for images

Bug #694799 "New: incoherent output intent and color space in PDF/A (bis)"

The image colour conversion wasn't writing a device independent colour
space for UseDeviceIndependentColor or sRGB, but was instead writing
the original colour space.

No Differences expected.

gs/devices/vector/gdevpdfi.c


2013-11-20 12:46:01 +0000
Robin Watts <robin.watts@artifex.com>
8a94e4ee285f8b7d2f04edf2d8ac35f687355061

Remove boilerplate from gdevcmykog

gs/devices/gdevcmykog.c


2013-11-19 19:57:33 +0000
Robin Watts <robin.watts@artifex.com>
bbaff51c391f0e3e6c0503da9f355c96a739c1b4

Silence warning.

gs/devices/gdevpsd.c


2013-11-19 10:14:04 -0800
Ray Johnston <ray.johnston@artifex.com>
5af6431204f15f89519aac55c8d8ff42c823ced7

Fix misplelling of 'parent' in the gp files.

gs/base/gp.h
gs/base/gp_dosfs.c
gs/base/gp_macio.c
gs/base/gp_ntfs.c
gs/base/gp_os2fs.c
gs/base/gp_unifn.c
gs/base/gp_vms.c
gs/base/gpmisc.c


2013-11-19 19:18:50 +0000
Robin Watts <robin.watts@artifex.com>
ab73cd1550f558f5e1a82e60d95339b044713976

Solve psdcmykog hang on MacOSX.

Mac gets hung in the collating phase, presumably due to different
handling of eof conditions for read/write file handles.

Also, fix a mistake that can cause SEGVs in non debug versions.

gs/devices/gdevcmykog.c
gs/devices/gdevpsd.c


2013-11-19 17:03:27 +0000
Robin Watts <robin.watts@artifex.com>
9f03f419cc8cc598c2a9b4e94e41d6cfdad61c02

Various small fixes for psdcmykog build issues.

Rename the device. Include it in linux builds by default, along with
fpng.

Fix various warnings.

gs/Makefile.in
gs/base/gdevdevnprn.h
gs/base/lib.mak
gs/base/unix-gcc.mak
gs/base/unixansi.mak
gs/configure.ac
gs/devices/devs.mak
gs/devices/gdevcmykog.c
gs/devices/gdevfpng.c
gs/psi/msvc.mak


2013-11-15 18:30:21 +0000
Robin Watts <robin.watts@artifex.com>
3cee4eb9e3c24e0a2e7c48fddc473590c5a820b6

Make garbage collector private.

Private is better than public.

gs/base/gsgcache.c


2013-11-18 16:20:05 +0000
Robin Watts <robin.watts@artifex.com>
be1e5a0dde242dc41f4e67a629d6bf403ac2938b

Update psdcmykog to use common psd writing functions.

gs/devices/gdevcmykog.c


2013-11-15 17:24:04 +0000
Robin Watts <robin.watts@artifex.com>
bf2404a47b8b2843e37efbb0d242e5b46357b588

Tweak psdcmykog.c to use gdevdevnprn.h functions.

This reduces the boilerplate.

gs/devices/gdevcmykog.c


2013-11-06 17:52:25 +0000
Robin Watts <robin.watts@artifex.com>
8cb60cfe03ab7f1ada9b26eb57342fa9eca62e48

psdcmykog: simple example process_page device

This device demonstrates a range of facilities newly added to
the Ghostscript core. This device exists as an exemplar for these
facilities, and as a mechanism to allow us to cluster test.

gs/devices/devs.mak
gs/devices/gdevcmykog.c
gs/ghostscript.vcproj
gs/psi/msvc.mak


2013-11-18 16:19:12 +0000
Robin Watts <robin.watts@artifex.com>
7089d5416766a4a526b382e57e4436633d29bb9e

Externalise psd writing functions.

This will enable psdcmykog to share the psd writing functions.

gs/base/gdevdevnprn.h
gs/devices/gdevpsd.c


2013-11-15 17:14:14 +0000
Robin Watts <robin.watts@artifex.com>
a1bee59ddf2bf82273359564d6cdb8e0549ae14f

Extract guts of spotcmyk device to be reusable.

Whenever we build a "devicen" based device, there is a lot of repeated
code. Tweak the spotcmyk functions (one such device) into a form where
they can be reused more easily.

Also add cmyk_equiv_colors into this extracted structure. This shouldn't
matter to code that doesn't use the equivalent colors, (i.e. spotcmyk
and devicen will be unaffected), but should allow us to bring the psd
devices into the fold.

gs/base/gdevdevn.c
gs/base/gdevdevnprn.h
gs/base/lib.mak
gs/devices/gdevpsd.c
gs/ghostscript.vcproj


2013-11-18 15:43:32 +0000
Ken Sharp <ken.sharp@artifex.com>
a65b8db506a553334de495a9b27a18811188539a

pdfwrite - new colour code, emit sRGB as ICCBased

Bug #694780 "incoherent output intent and color space in PDF/A"

sRGB was supposed to be written as ICCBased, but the code has a special
check to see if the ICC profile being used is one of the default ones
(ie its our ICC equivalent of Gray, RGB or CMYK) and if it is, we write
the original colour apace out.

Added a boolean to override this behaviour so that when we emit sRGB we do
in fact write the ICCBased equivalent profile for RGB.

No differences expected.

gs/devices/vector/gdevpdfb.c
gs/devices/vector/gdevpdfc.c
gs/devices/vector/gdevpdfg.c
gs/devices/vector/gdevpdfg.h
gs/devices/vector/gdevpdfi.c
gs/devices/vector/gdevpdfk.c
gs/devices/vector/gdevpdft.c
gs/devices/vector/gdevpdfv.c


2013-11-15 13:21:42 +0000
Ken Sharp <ken.sharp@artifex.com>
d2804d480928140577560f673eb6a6419afb9abd

AES decryption - Don't return an error if the input is not a multiple of 16 bytes

Bug #694781 "Regression: error reading PDF files starting with 4885eb2fa363002fdf0980cd189f2a5bb9340f58"

The stream is technically invalid, it should be a multiple of 16 bytes in
length. Acrobat as usual silently ignores the error.

We now emit a warning but carry on.


No differences expected

gs/base/saes.c


2013-11-07 12:36:18 -0800
Ray Johnston <ray.johnston@artifex.com>
b83ce7db814dd026b97bf2e00429459fc9c1f296

Improve collection of color_usage.or bits and track devn colors.

Some of this was in place with cmd_drawing_color_usage, but it was
not used many times, and it just returned 'all'. Also, add the
check for devn colors that are widely used with planar devices
such as psdcmyk.

Also handle the color_usage_array in the setup and teardown of the
BGPrint thread and/or multiple rendering threads.

gs/base/gxclimag.c
gs/base/gxclpath.c
gs/base/gxclrect.c
gs/base/gxclthrd.c


2013-11-14 12:11:02 -0800
Ray Johnston <ray.johnston@artifex.com>
db89e2390033fde0c69ffc01aeff346296336907

Fix SEGV with BGPrint=true -dNumRenderingThreads=2

With BGPrint=true, the icc_cache_list for the rendering threads was
allocated using 'mem', but was being freed using mem->thread_safe_memory.
The BGPrint clist device 'mem' is a chunk allocator but its thread
safe memory is the heap allocator.

gs/base/gxclthrd.c


2013-11-14 17:02:27 +0000
Robin Watts <robin.watts@artifex.com>
026a7ed96060a9f9a11a16857a9549f77ed5042b

Fix alignment of memory buffers in page mode.

The setup buffer call was setting the 'base' member to it's aligned
version, and the caller was then overwriting it with the unaligned
version. Simply remove the override.

gs/base/gdevprn.c


2013-11-14 14:02:05 +0000
Robin Watts <robin.watts@artifex.com>
10b2168ba0a3973ce1e98b8405e01bc7d235464d

Correct raster calculation in get_bits_rectangle for planar case.

gs/base/gdevdgbr.c


2013-11-13 09:29:55 -0800
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
ea5452061ce70ada597888e629e6f6e9ca09ab10

Fix building WIN64=1 with Visual Studio 2013 and add pam to default devices.

gs/psi/msvc.mak


2013-11-13 16:57:46 +0000
Robin Watts <robin.watts@artifex.com>
428f750746c09af66e53eed08a9fabf8dba2fef8

Bug694768: Fix VMerrors during pattern processing.

In a recent commit I moved the line_ptrs into the clist data block.
Don't do this for pattern accumulator operation, as the logic is
different.

gs/base/gxclist.c
gs/base/gxclread.c
gs/base/gxclthrd.c


2013-11-13 15:38:45 +0000
Robin Watts <robin.watts@artifex.com>
d42c77506452de368bebb64e61fd5f0b7347b343

Fix SEGVs caused by icc_cache_cl memory space change.

A few commits ago, we moved the icc_cache_cl used for NRT > 0 to the
thread safe memory handler. This meant it was no longer in gc-able
space, so we therefore removed the enumeration of icc_cache_cl from
the clist structure definitions.

Unfortunately I forgot to move the non-NPR related allocations of
icc_cache_cl to the same thread safe handler, meaning that they were
still being allocated in gc-able memory and causing crashes. For
example:

gs/debugbin/gswin32c.exe -Z@ -o out.pbm -sDEVICE=ppmraw -r300
-dMaxBitmap=400000000 ../ghostpcl/tests_private/comparefiles/Bug690189c.pdf

gs/base/gxclist.c
gs/base/gxclpage.c
gs/base/gxclthrd.c
gs/base/gxp1fill.c
gs/base/gxpcmap.c


2013-11-13 14:03:30 +0000
Robin Watts <robin.watts@artifex.com>
0c50e7ba960e2ed37deb87501d8b966e5d800cd8

Fix crash with NPR > 0 and planar devices.

A command such as:

gs -sDEVICE=psdcmyk -r300 -dMaxBitmap=10000 -dNumRenderingThreads=3
gs/examples/tiger.eps

would crash with a SEGV due to an incorrect calculation for raster in
get_bits_rectangle.

clustercmd
clusterdatestamp
gs/base/gxclthrd.c


2013-11-13 13:35:56 +0000
Ken Sharp <ken.sharp@artifex.com>
f221142fa36adc5a3d1192e534196dd4a7e953b4

PDF interpreter - more heuristics to work around broken PDF files

Bug #594772 " Regression: missing data reading PDF files starting with d5c42d3a14cee808fd889c14805a69adae8eb5b9"

The PDF file is broken, it has a font with a FontMatrix where one of
the values is 0.-4.

Previously we used .pdftokenerror which would detect
this and convert the value to 0 (observed Acrobat behaviour). However at
some point this was modified so that if we are not in a content stream we
convert into a name object instead.

This doesn't work in the case of a matrix. Unfortunately changing it back
broke *many* PDF files. Almost all of them from SumatraPDF and they are
also badly broken but still....

In essence we want to treat broken numbers as '0' and broken anything else
as a name. So the code now tries to decide if the input looks like a broken
number (contains 0-9, ',', '.' or '-' and nothing else). If it looks like a
number we pass it through .pdftokenerror which will convert it to 0. It is
possible for .pdftokenerror to throw an error, though, so we run it in a
stopped context and if it does, we convert to a name instead. If it doesn't
look like a number, we just convert it to a name.

This causes differences in Bug694429.pdf, but the differences are that more
text is now drawn. The output was wrong before, its wrong now, its merely
wrong in a different way.

gs/Resource/Init/pdf_base.ps


2013-11-12 16:19:46 -0700
Henry Stiles <henry.stiles@artifex.com>
4d3dc3a3a6948a49a2e8faed57290da40a774703

Fix 694773 - default raster resolution to the PJL setting when in
HPGL/RTL mode.

pcl/rtgmode.c


2013-11-11 19:07:09 +0000
Robin Watts <robin.watts@artifex.com>
a0a9d6746cf2e911c2db54c756e34e9e52c0723a

Introduce a list of device caches within the clist.

This is only used when NumRenderingThreads > 0, and avoids us recreating
caches every page.

We allocate the cache list with the thread safe allocator. This has the
effect of moving the icc_cache_cl entries out of the thread specific
chunked allocators, and also out of garbage collected memory. We
therefore remove the code to enumerate icc_cache_cl.

Also, this has the effect of fixing a gc enumeration bug where the first
element of the imager state wouldn't have been enumerated.

gs/base/gdevprn.c
gs/base/gxclist.c
gs/base/gxclist.h
gs/base/gxclthrd.c
gs/base/gxclthrd.h


2013-11-12 17:26:13 +0000
Robin Watts <robin.watts@artifex.com>
482b8b302399afda3b14242c56209a76694e0062

Fix reference counting for icc_cache_cl in clist.

Currently we only rc_decrement the icc_cache_cl entry in the bg_print
case. We should really be decrementing in all cases, but we get away
with this because the icc_cache_cl entries are allocated in the
rendering threads own chunked allocator which is destroyed after each
run.

In a soon-to-come commit, icc_cache_cl will be moved out of the
thread specific chunked allocator, and these will become real leaks.

The simple fix is to rc_decrement in all cases.

gs/base/gxclthrd.c


2013-11-12 18:31:50 +0000
Robin Watts <robin.watts@artifex.com>
a0386e872771958c67874ab4ef45eb8f43c63f77

Add 'extras' option to clusterpush.pl

Use:

clusterpush.pl gs lowres extras=-dNumRenderingThreads=3

to specify extra args to supply to all jobs.

clustercmd
clusterdatestamp
gs/toolbin/localcluster/clusterpush.pl


2013-11-11 19:06:41 +0000
Robin Watts <robin.watts@artifex.com>
6d4dc3c736c4cdf9e1728484857c613baf6ba3b4

Silence build warning.

Downcast to the basic device.

gs/devices/gdevfpng.c


2013-11-12 10:33:42 +0000
Chris Liddell <chris.liddell@artifex.com>
f15da3a62aed425e85597b8482daf7ff778beb31

GS_THREADSAFE: don't ignore "basic" fills....

In the default "fill" device method, don't drop the call to
gx_general_fill_path() for the GS_THREADSAFE build.

No cluster differences.

gs/base/gxfill.c


2013-11-11 16:56:11 +0000
Ken Sharp <ken.sharp@artifex.com>
bcb467c754a7a292f2ed65e61953782577e0412d

pdfwrite - set CIDToGIDMap correctly for PDF/A-2 output

Bug #694769 "Fonts changed from TrueType to CID TrueType and not displaying correctly in output PDF"

We opted not to emit CIDSet for PDF/A-2 since its now documented as
optional and I wasn't able to find a CIDSet which would pass Acrobat's
preflight tool.

However, the code also skipped the correct setup of the CIDToGIDMap and we
can't do that or the output will be incorrect.

This commit makes PDF/A-1 and PDF/A-2 behave the same with respect to the
CIDToGIDMap.

No differences expected, we don't test PDF/A production

gs/devices/vector/gdevpdtd.c


2013-11-11 10:42:06 +0000
Chris Liddell <chris.liddell@artifex.com>
f9774c5ae1b9cb12a811d810787b3e21d001a08f

Bug 694767: have configure set some Trio flags.

For systems that lack some math functions.

No cluster differences.

config.mak.in
configure.ac
gs/Makefile.in
gs/configure.ac


2013-11-11 16:14:21 +0000
Chris Liddell <chris.liddell@artifex.com>
efc0ab29473b65f1f0a119023601d987921373c0

Bug 691498: only declare Windows DLL exports once.

Using both the __declspec(dllexport) form *and* the .def file results in export
symbols being declared twice, and warning from the linker (but only on x86_64
for unknown reasons!).

See: http://support.microsoft.com/kb/835326

The original uses of __declspec(dllexport) are left in place, but conditionally
compiled out, just in case.

CLUSTER_UNTESTED

gs/base/gs_dll_call.h
gs/psi/iapi.h


2013-11-11 12:41:02 +0000
Alan Hourihane <alanh@fairlite.co.uk>
48a0dd978939fb6ae7bd445fd7b07bcf3b918948

Bug 694766: rename "internal" SHA symbols

Prevent linker errors when linking to something else that uses SHA, by
prepending "p" (for private) to our "internal" SHA symbols.

gs/base/sha2.c
gs/base/sha2.h


2013-11-11 09:07:07 +0000
Ken Sharp <ken.sharp@artifex.com>
c6d592ef12079f3a1ea7b9218620f813769c3654

pdfwrite - when unable to convert a Shading colour space, fallback to image

Bug #688731 "Huge PDF file with ProcessColorModel=/DeviceCMYK and ColorConversionStrategy=/CMYK"

When we can't convert the colour space of a shading dictioanary to satisfy
the ColorConversionStrategy we currently fall back to the rendering method
used by gx_fill_default, which is to degenerate into parallelograms.

This results in hugs and very slow PDF files.

This commit tests the ColorConversionStrategy when we detect an inability
to include a Shading unchanged, and if the strategy is not 'LeaveCOlorUnchanged'
then we use the ps2write approach and render the shading to an image instead.

This produces smaller faster output and the quality can be controlled by
setting resolution with the -r switch allowing a tradeoff between size and
quality.

If we should be unable to embed a shading for other reasons we will still
fall back to the parallelograms method. We may want to avoid this in all
circumstances, but lets wait for an example before we decide.

No differences expected.

gs/devices/vector/gdevpdfd.c


2013-11-08 18:33:23 +0000
Robin Watts <robin.watts@artifex.com>
db8fcdf94105c55a8886203254e401b601f29a69

Remove dev->num_planes in favour of dev->is_planar.

This removes the need to remember to keep
dev->num_planes == dev->color_info.num_components for all planar
devices.

gs/base/gdevdevn.c
gs/base/gdevdrop.c
gs/base/gdevmem.c
gs/base/gdevmpla.c
gs/base/gdevp14.c
gs/base/gdevppla.c
gs/base/gdevprn.c
gs/base/gsdevice.c
gs/base/gsovrc.c
gs/base/gxclimag.c
gs/base/gxclip.c
gs/base/gxclist.c
gs/base/gxclist.h
gs/base/gxclthrd.c
gs/base/gxdevcli.h
gs/base/gxht_thresh.c
gs/base/gxicolor.c
gs/base/gximono.c
gs/base/gxp1fill.c
gs/base/gxpcmap.c
gs/devices/gdevplib.c


2013-11-08 16:40:10 +0000
Robin Watts <robin.watts@artifex.com>
c0e10e8636386abf427f922390445b0b6cb2bb59

Fix SEGV in psdcmyk.

tests_private/pdf/sumatra/586_-_missing_images_gs_SMask_not_applied.pdf.psdcmyk.300.1

It seems num_planes was getting out of sync with color_info.num_components.

gs/base/gdevp14.c


2013-11-08 17:55:04 +0000
Ken Sharp <ken.sharp@artifex.com>
1cb2458772321dc86117cb45b5b28a1423ccf9b7

pdfwrite - free any allocated memory when initialising stream filters

Bug #694758 "Segmentation Fault"

It seems that the arcane image setup sequence used by pdfwrite can result
in us calling stream 'init' functions more than once for the same stream.
Some of the stream filters (Average and Bicubic) allocate some working
memory in the 'init' procedure, but they don't check to see if the
working memory has already been allocated.

This is primarily a cause of memory leaks, though since the memory is
garbage collected it won't (probably) actually leak. However it *does*
seem to confuse the garbage collector when relocating the stream state
structure. We allocate a buffer 9.9Kb but when we come to use it it has
shrunk to a little over 1Kb.

This commit checks the working memory and if its not NULL then we free it
before re-allocating (we might be re-initialising to a different size) which
resolves the problem for me. However because it changes the memory pattern
its possible this is simply masking the problem. Note that this change
assumes that the structure members will be set to NULL when the structure
is allocated (which it always is at the moment).

No differences expected

gs/devices/vector/gdevpsds.c


2013-11-08 16:08:41 +0000
Chris Liddell <chris.liddell@artifex.com>
656f26c232933c6b3c29d2e6b37574096572f35a

Bug 694622: address a compiler warning.

Use sprintf() instead of gs_sprintf() for "top level" code.

CLUSTER_UNTESTED

gs/psi/dxmain.c


2013-11-08 09:52:25 +0000
Chris Liddell <chris.liddell@artifex.com>
8f2a046ddc81258749e73cfc7a6daf0a43488181

Bug 694624: remove couple of deprecated filters.

Remove the Bounded Huffman and Burrows-Wheeler filters: not required by any
of the interpreters, and not used anywhere else.

No cluster differences.

gs/base/sbhc.c
gs/base/sbhc.h
gs/base/sbwbs.c
gs/base/sbwbs.h
gs/base/shcgen.c
gs/base/shcgen.h
gs/doc/Develop.htm
gs/psi/int.mak
gs/psi/zfilterx.c


2013-11-08 13:26:29 +0000
Robin Watts <robin.watts@artifex.com>
a9567942aa10ef2321627316d6f647819584179d

Solve SEGV due to recentl planar changes.

tests_private/comparefiles/Bug692217.pdf.psdcmyk.72.0 would SEGV.

This was because num_planes was getting out of sync with num_components.

gs/base/gdevp14.c


2013-11-07 17:30:06 +0000
Chris Liddell <chris.liddell@artifex.com>
f59dba325a55dd25ad6b5af4f9579b21bd562eb2

Bug 690878: have ghostpdl use HAVE_FILE64 setting

The GhostPDL configure checked for, but the config.mak.in never used the setting
for HAVE_FILE64.

Add it in.

No cluster differences.

config.mak.in


2013-11-07 17:21:27 +0000
Chris Liddell <chris.liddell@artifex.com>
31120fdcbb3f1ab815ade3763b638b77bd9b3d76

Bug 690776: missing check for HAVE_MKSTEMP64

Oddly, the ghostpdl configure.ac checked for mkstemp64 but config.mak.in did not
have the substitution pattern for the -DHAVE_MKSTEMP64.

So add that in.

No cluster differences.

config.mak.in


2013-11-07 15:37:37 +0000
Dr. Werner Fink <werner@suse.de>
4a4a912b43ae85b8c3d07f6d4727ced14b2e102a

Bug 690571: deal with memory dev/xdev dimensions being different.

For GV (and ghostview) a memory deivce is used. The problem is now
that most time the width and height of the memory device is not
identical with the xdev device its self. Also extrem large bbox
can lead to problems on systems with less physical memory.

This patch avoids these two problems.

No cluster differences.

gs/devices/gdevx.c


2013-11-07 20:12:14 +0000
Robin Watts <robin.watts@artifex.com>
c4357befbf3d09c50c4208bbb5dd9864269bf9b3

Fix previous tweak to clist line_ptrs.

The calculation for the clist line_ptrs used before was broken; I guess
this proves that we weren't relying on it in most cases. This solves
a few SEGVs.

gs/base/gdevppla.c
gs/base/gxclread.c
gs/base/gxclthrd.c


2013-11-07 18:29:46 +0000
Robin Watts <robin.watts@artifex.com>
64a57147f683bfbf4c9f2bfcd978e8bcbd87ad97

Fix SEGV in psdcmyk cluster tests.

tests_private/comparefiles/09_47N.PDF.300.1 SEGVs due to typo in
gx_forward_strip_tile_rect_devn.

gs/base/gdevnfwd.c


2013-11-07 09:49:47 -0800
Ray Johnston <ray.johnston@artifex.com>
1805749a2338844f19a3c7d336fd4707d04b13de

Fix fpng crash, file has_transparency

In clist_playback_band, it checks to see if there is a compositor as
the target, and needs to free it, but it should not close the device
if its is_open is false, since that would forward the close to the
orig_target, closing the memory device. The pdf14 pop_device had
already done the pdf14_close and set the procs to forward.

gs/base/gxclrast.c


2013-11-07 17:23:40 +0000
Robin Watts <robin.watts@artifex.com>
6efb9ed5890e7b56814699f6e374de97602a0a1b

Squash some warnings.

gs/base/gdevmem.c
gs/base/gdevmpla.c
gs/base/gdevp14.c
gs/base/gdevppla.c
gs/base/gsicc_manage.c
gs/base/gsicc_nocm.c
gs/base/gxccman.c
gs/base/gxclthrd.c
gs/base/gximage3.c
gs/base/gxpcmap.c
gs/devices/gdevpsd.c
gs/devices/vector/gdevpdfd.c


2013-11-07 15:47:19 +0000
Robin Watts <robin.watts@artifex.com>
432f71e687183df4971c0bee1932fb57ef0295a1

Tweak clist line_ptrs data.

The clist has always allocated space for the memory device as if
the line_ptrs were to be included within the allocated space, but
has never actually put the line_ptrs into this space.

Consequently the memory device always allocates space for the
line_ptrs itself. This space is then freed on a close_device call.

This can present problems in NumRenderingThreads mode, when
process_page is used. With the existing code, within clist_render_thread,
the buffer device is setup (and the new line_ptrs block is allocated).
The device is then freed at the end of clist_playback_band
(called from clust_render_rectangle). This nukes the line_ptrs
leaving the get_bits_rectangle call from within the process_fn call
to fail when dereferencing NULL.

The fix here is to amend the clist device structure to include the
offset within the block that the line_ptrs should be allocated at.
This offset can then be used to pass in the address of the line_ptrs
to the setup_buffer_device call. This means the line_ptrs survive
device closing.

This still leaves questions (in my mind at least) as to whether the
handling of the device closures within clist_playback_band is correct
or not.

gs/base/gxband.h
gs/base/gxclist.c
gs/base/gxclthrd.c


2013-11-07 10:37:34 +0000
Ken Sharp <ken.sharp@artifex.com>
cfeb9f98b896384ac366f4e30f3653a52de7af87

pdfwrite - add a Resources dictionary to 'Group' dictionaries

Bug #693322 "Acrobat Preflight tool reports missing XObjects"

Crazy Cairo-constructed files can result in Group dictionaries which use
other resources (in this case an ExtGState) and this wasn't possible in
the existing code. This commit adds a Resources dictionary so that it is
now possible to recreate this.

No differences expected

gs/devices/vector/gdevpdft.c


2013-11-07 09:15:38 +0000
Chris Liddell <chris.liddell@artifex.com>
6c5ecdf1a54e9d5a572c11860492abce06523f24

Bug 694718: "reset" MT fonts for each glyph.

Seems some vesions of UFST require the font object to be recreated for each
glyph to work correctly. So when I fixed the optimisation in gxfapi.c to
avoid calling "get_scaled_font()" when the font parameters had not changed, it
exposed the problem with the UFST integration.

To address this, the fapi/ufst code now zeros out the stored scale matrix for
MT fonts, so the code in gxfapi.c always registers the scaling as having
changed. Luckily, recreating the MT font object is not a very expensive
operation.

Also, grab the design units scale from the UFST state structure if the values
haven't been set in the outline structure.

CLUSTER_UNTESTED

gs/base/fapiufst.c


2013-11-07 08:27:47 +0000
Ken Sharp <ken.sharp@artifex.com>
58cdefdeadbceda4833e489b6d94f5895a2d8ea4

pdfwrite - check a return code

Silences a compiler warning (and is the right thing to do of course)

gs/devices/vector/gdevpdft.c


2013-11-06 09:18:19 +0000
Ken Sharp <ken.sharp@artifex.com>
616ff4cc44b00bcf7df97b64c8bdaebbe0620713

pdfwrite - add transparency Group to substream resources

Bug #691352 "cairo pdf mis-distilled."

This fixes the last remaining problem with this old bug. When we were
creating Form XObjects (because of transparency groups) we were assuming
that the from was a child of the page.

However, groups nested within groups (uncommon, except with Cairo's awful
output) can cause a Form XObject to have children which are also Form
XObjects. In this case we need to have the Form (or other substream) add
the child form to its own Resources rather than inheriting them from the
Page.

This also addresses (most of) Bug #693332 though this still leaves a
dangling ExtGState which needs separate investigation.

No Differences expected

gs/devices/vector/gdevpdft.c


2013-11-04 18:32:21 +0000
Robin Watts <robin.watts@artifex.com>
29a06fed84063976abe9864659384e7e371d799e

Add alignment and padding code.

Every time we create a new device in the code, we need to copy
the pad and align values from the 'base' device to the new device.

Build with TEST_PAD_AND_ALIGN defined to force on for pxmraw and psdcmyk.

gs/base/gdevdevn.c
gs/base/gdevmem.c
gs/base/gdevmpla.c
gs/base/gdevppla.c
gs/base/gdevprn.c
gs/base/gxbitmap.h
gs/base/gxclthrd.c
gs/devices/gdevpbm.c
gs/devices/gdevpsd.c


2013-11-01 17:30:00 +0000
Robin Watts <robin.watts@artifex.com>
b3aec5521e0e5d84164285353af20a5163139c3f

Remove is_native_planar.

gs/base/gdevdevn.c
gs/base/gdevdflt.c
gs/base/gdevdrop.c
gs/base/gdevmem.c
gs/base/gdevmpla.c
gs/base/gdevnfwd.c
gs/base/gdevp14.c
gs/base/gdevppla.c
gs/base/gsdevice.c
gs/base/gsovrc.c
gs/base/gxccman.c
gs/base/gxclimag.c
gs/base/gxclip.c
gs/base/gxclist.c
gs/base/gxclrect.c
gs/base/gxdevsop.h
gs/base/gxht_thresh.c
gs/base/gxicolor.c
gs/base/gximage3.c
gs/base/gximono.c
gs/base/gxp1fill.c
gs/base/gxpcmap.c
gs/devices/vector/gdevpdfd.c


2013-11-01 16:47:06 +0000
Robin Watts <robin.watts@artifex.com>
f6946de99dd19c7a883d7edb28b4f52290e3e934

Steps towards supporting aligned and padded buffer devices.

Introduce log2_align_mod, pad and num_planes to the gx_device
structure. Values of 0 will cause no changes to default behaviours.

gs/base/gdevppla.c
gs/base/gdevprn.c
gs/base/gsdevice.c
gs/base/gxclread.c
gs/base/gxdevcli.h
gs/base/gxdevice.h
gs/base/gxdevmem.h
gs/devices/gdevbit.c
gs/devices/gdevplib.c


2013-11-04 17:23:28 +0000
Ken Sharp <ken.sharp@artifex.com>
a8f9934aa6c54830230f749280765ea4e65471d2

pdfwrite - fix some XML emission

Bug #694736 "PDF/A XMP dc:description - wrong element structure"

The dc:creator is specified as a text sequence, but we were also emitting
the dc:description that way, which is clearly wrong.

gs/devices/vector/gdevpdfe.c


2013-11-04 15:09:03 +0000
Ken Sharp <ken.sharp@artifex.com>
f09f7f7cd37f3a52f733019e1d383034dd1c01cf

pdfwrite - revert a4de55 and check for parentheses properly instead

Bug #694735 "PDF/A XMP metadata and DOCINFO synchronization"

The commit a4de55 was incorrect, the PDF/A spec clearly states that the
XML creator is based on the Author. However, when an empty string is
present for the Document Info entry, we should not write the string parentheses
into the XML, this is clearly incorrect.


Still no differences expected.

gs/devices/vector/gdevpdfe.c


2013-11-04 13:41:00 +0000
Ken Sharp <ken.sharp@artifex.com>
a4de55d2fd0fa38e5110e7b5d5cca746528b28f6

pdfwrite - use /Creator instead of /Author for the XML creator entry

Bug #694735 "PDF/A XMP metadata and DOCINFO synchronization"

We were using the Document Info /Author field for the XML 'creator' which
apparently causes at least one PDF/A validator to take offence. Its not
entirely clear to me from the documentation which one is inteded to be
here, so we'll just use /Creator instead.

No differences expected.

gs/devices/vector/gdevpdfe.c


2013-11-04 09:26:47 +0000
Ken Sharp <ken.sharp@artifex.com>
ee0bf17f4912f131f7ad98aab744e571a18ece39

pdfwrite/ps2write colour management, enable the new code

Change the default setting of teh colour management switch so that we
default to using the new code.

If we are creating PDF/A-1, force the old colour management, we can't yet
guarantee that we are getting a version 2 profile.

Add some minimal documentation in ps2pdf.htm, hopefully we will do some
more work in this area before release, and the documentation can be revamped.

This change results in a lot of differences, especially with ps2write. In
the main these are slight shifts in color values caused by using a different
(better) conversion system. However, the new code does a much better job
of handling some kinds of colour spaces, in particular Separation spaces
with ps2write which are now preserved. This leads to a number of progressions
in the test suite.

I've looked at all the differences and I believe they are all either very
minor colour shifts, or progressions.

This is with 'LeaveColorUnchanged', actually converting to different spaces
does result in differences but this can't be cluster tested. I believe these
are all progressions however.

gs/devices/vector/gdevpdfb.h
gs/devices/vector/gdevpdfp.c
gs/doc/Ps2pdf.htm


2013-11-02 12:21:21 +0000
Ken Sharp <ken.sharp@artifex.com>
41e1bdc7ef06bd00874890b36a53d84166ef30d0

pdfwrite - colour code, do not apply range limiting for images

When handling an image in a Lab space, do not reset the range of the space.
We don't need to when preserving an image, and if we use the same space
immediately afterward for linework, the range clamping causes the components
to come out black.

No differences, code is not used yet.

gs/devices/vector/gdevpdfi.c


2013-11-02 12:19:03 +0000
Ken Sharp <ken.sharp@artifex.com>
eada430a0c612f5f50a9fea6416daa048464a5c3

pdfwrite - coiour code, silence some compiler warnings

gs/devices/vector/gdevpdfg.c
gs/devices/vector/gdevpsdu.c


2013-11-01 11:01:02 -0700
Ray Johnston <ray.johnston@artifex.com>
82bfa31f2f423223b002aab74323927e8ee42ea0

Add in some missing checks for failed allocations in gsicc code.

There are a couple of functions that are 'void' that just return,
which seems like should be fixed. Also fix _cmsCalloc in gsicc_lcms.c
to actually clear the memory.

gs/base/gsicc_cache.c
gs/base/gsicc_lcms.c
gs/base/gsicc_manage.c
gs/base/gsicc_nocm.c
gs/base/gsicc_profilecache.c
gs/base/gsicc_replacecm.c


2013-11-01 08:32:45 +0000
Ken Sharp <ken.sharp@artifex.com>
b937b04503837d2ac6f3877478b5500f4bc8ea8a

pdfwrite/ps2write - colour code work

1) Rescale inputs to 0->1 before concretizing if the space is specifically
Lab. Required as the inputs to the ICC profile must be 0->1. gx_remap_color
and its children do this for us, but gx_concretize_color does not.

2) Do not corrupt the device color from the interpreter if we are converting
to a different colour space, use a temporary structure instead.

3) Make sure to use frac2float after concretizing to convert the values.

4) Don't forget to update the saved colour (in the device) after we've
converted colours.

5) Update pdsdf_set_color so that if we are using the new colour code we
get the expected number of output components from the ICC profile attached
to the device, rather than the device 'color_info'. Update all calls to
psdf_set_color so that they pass in the required boolean.

This code is still switched off by default, so no cluster differences will
show up.

gs/devices/vector/gdevpdfc.c
gs/devices/vector/gdevpdfg.c
gs/devices/vector/gdevpdfv.c
gs/devices/vector/gdevpsdf.h
gs/devices/vector/gdevpsdu.c


2013-10-31 07:11:47 -0700
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
5929829c83498b2694bd32cf3579e151c1c99f0d

Added support for VS2013 to msvc.mak.

gs/psi/msvc.mak


2013-10-30 17:56:00 +0000
Robin Watts <robin.watts@artifex.com>
b87f410b4084c84242c254c70c379b96c8fca2d7

Ensure that gdev_prn_dev_spec_op forwards to the real device.

When the clist hijacks all the device entries, it attempts to forward
the dev_spec_op calls to the generic printer device. This doesn't
help when we have a device specific one. Only the printer device
knows what the original procs were, so the best we can do is to have
gdev_prn_dev_spec_op forwarding.

This was important as the adjust_bandheight gxdso call was not making
it through to the underlying device.

gs/base/gdevprn.c
gs/base/gdevprn.h
gs/base/gxclist.h
gs/base/gxclrect.c
gs/base/gxpcmap.c


2013-10-24 21:07:31 +0100
Robin Watts <robin.watts@artifex.com>
bdf630af4252ba87bffa6108840bac53f4754cea

Remove unnecessary code.

The test is unneccessary due to us being within a if.

gs/base/gdevprn.c


2013-10-31 10:10:21 +0000
Chris Liddell <chris.liddell@artifex.com>
9c77012daa9b1903d7be5fc4f239a46df863d0db

Add quotes to conditional for safety.

CLUSTER_UNTESTED

gs/base/msvclib.mak


2013-10-30 14:19:06 -0700
Michael Vrhel <michael.vrhel@artifex.com>
75a8be6597d6ce56182c5391d6be02f997a1aa21

Addition of code to test if current ICC color space is the same as new ICC color space

gs/psi/zcolor.c


2013-10-30 18:30:42 +0000
Chris Liddell <chris.liddell@artifex.com>
5c511841cbe373743165e2248adc583382ca3b2a

Avoid warning for missing (not required) encoding for PDFs

Check earlier for the existence of an encoding entry in a PDF font object,
for font types in which encoding is optional. Avoids a benign but annoying
warning from the PDF interpreter.

No cluster differences.

gs/Resource/Init/pdf_font.ps


2013-10-28 18:45:31 +0000
Chris Liddell <chris.liddell@artifex.com>
c186880d7e3651c8a76e55bc981fc22e4a57ea94

Bug 694733 (part 2): ensure jmp_buf alignment is correct

Move the jmp_buf used by the HP/GL parser to be a local variable, accessed
via a pointer in the state (rather than directly allocated within the state).

This ensures that any alignment requirements are met - specifically, 64 bit
MS Visual Studio 2010 requires that jmp_bufs be aligned to 16 byte boundaries.

No cluster differences.

pcl/pgmand.h
pcl/pgparse.c


2013-10-28 11:08:19 +0000
Chris Liddell <chris.liddell@artifex.com>
16fbdade9a29352ad936455eab65e77a9db6f768

Bug 694733 (part 1): fix incorrect offsets in chunk allocator

When I changed the chunk allocator to honor the alignment value for the
memory manager, I missed a couple of places where the calculation of the offset
to get from the allocated memory address to the address of the chunk node.

No cluster differences.

gs/base/gsmchunk.c


2013-10-26 13:42:34 -0600
Henry Stiles <henry.stiles@artifex.com>
8f491ec1493bcb11583d450a264a1b80d5557217

Fix 694737 - Typeface mask incorrect.

The typeface value is in the first 12 bits and the vendor info in the
next 4 bits of the short value that stores typeface information. We
were extracting the first 11 bits for the typeface. This problem is
not associated with a known bug, and in fact, it is quite unlikely to
result in a problem, but it is incorrect. Thanks to Norbert Janssen
for pointing out the problem.

pcl/pcfsel.c


2013-10-24 20:22:18 -0700
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
1b691ea92ead0590c619ec64a00d93f24452bb2c

Fix Luratech build (by removing spurious JPX_AUTOCONF_CFLAGS= from configure.ac).

gs/configure.ac


2013-10-24 20:03:15 -0600
Henry Stiles <henry.stiles@artifex.com>
5c08e60fc75c940ce6c6df1e75802ce2d72fbd2f

Fix bug 694725 - bad characters in numeric input not processed
correctly.

Thanks to Norbert Janssen for finding and fixing this problem.

pcl/pcparse.c
pcl/pcparse.h


2013-10-24 08:59:12 +0100
Chris Liddell <chris.liddell@artifex.com>
184dcfd570a96328798e36d8e08495eb426d67f9

Allow user to override configure's color index setting

This command line parameter is not listed in the "configure --help" output
as it is really intended for our use, and not generally by end users.

To build with 32 bit colour indices, issue:
./configure --with-large_color_index=0

to build with 64 bit color indices:
./configure --with-large_color_index=1

This works for both Ghostscript and GhostPDL builds.

The only "wrinkle" is that Ghostscript default to:
"--with-large_color_index=1" (so 64 bit indices)

whilst GhostPDL defaults to:
"--with-large_color_index=0" (so 32 bit indices)

This retains the previous default settings.

No cluster differences.

config.mak.in
configure.ac
gs/configure.ac
main/pcl6_gcc.mak


2013-10-22 11:09:23 -0700
Michael Vrhel <michael.vrhel@artifex.com>
38ed5ffaf81405a3e8ff094afbc2ada05eaf630c

Fix for bug in case where alternate color space for DeviceN and separation is CIE

If the CIE color space has a range different than 0 to 1 we need to rescale before using
the equivalent ICC profile. Fixes bug 694731. Note diffs for 09-34.PS match what is
created by Distiller and AR vers. X.

gs/base/gscdevn.c
gs/base/gsciemap.c
gs/base/gscsepr.c
gs/base/gsicc.c
gs/base/gxcie.h
gs/base/lib.mak


2013-10-23 16:09:21 +0100
Robin Watts <robin.watts@artifex.com>
c7cca8f105194908bb1b28b3e6606be51533b6d9

Fix possible (but very unlikely) SEGV and warning.

It is extremely unlikely that options will be NULL, but check to be
sure.

gs/base/gxclthrd.c


2013-10-23 12:53:49 +0100
Robin Watts <robin.watts@artifex.com>
d76e3a434e699f8974f50d98c0b7e82042fdc7ec

Clean a few #defines out of psdcmyk device.

Not needed since the transition away from compressed color encoding
to planar operation.

gs/devices/gdevpsd.c


2013-10-23 14:34:11 +0100
Chris Liddell <chris.liddell@artifex.com>
ad3e3ed7913986cec6acbc1afe0eff0c57627ddc

Bug 694734: handle Type 0 font in annotation

The code to generate an appearance from an annotation with an AP, the code
required the FontBBox, but failed to take account that the FontBBox is not
required in a Type 0 font.

We now handle it by grabbing the FontBBox from the descendant font - for
which a FontBBox is mandatory.

No cluster differences.

gs/Resource/Init/pdf_ops.ps


2013-10-22 08:23:19 +0100
Chris Liddell <chris.liddell@artifex.com>
ee941e19870761a752277f08c82282f53f4d4fee

Bug 694722: force ptr alignment to 8 bytes for HP-UX

Like Solaris/SPARC, HP-UX appears to require pointer alignment to be 8 bytes
even when user space pointers are 32 bits.

No cluster differences.

gs/base/genarch.c


2013-10-21 13:34:36 +0100
Robin Watts <robin.watts@artifex.com>
25db24cbeb52621cd1e2ae3e79d9b06c97143bc3

Add documentation for process_page.

gs/doc/Drivers.htm


2013-10-22 13:08:14 +0100
Robin Watts <robin.watts@artifex.com>
d2612770174079f423d704af4f68f6c85f63905a

Update fpng device to use downscaler.

gs/devices/gdevfpng.c


2013-10-18 18:36:52 +0100
Robin Watts <robin.watts@artifex.com>
ae8611c998beaad5e6f0cd2b85abb1b1995d94c4

Add fpng device.

Example 'fastpng' device for process_page.

gs/devices/devs.mak
gs/devices/gdevfpng.c
gs/ghostscript.vcproj
gs/psi/msvc.mak


2013-10-18 22:14:55 +0100
Robin Watts <robin.watts@artifex.com>
afe18de12b530d8d95a132755516847e8fc3f88e

Add gxdso_adjust_bandheight

Add mechanism for adjusting the bandheight. Intended to allow devices to
exert fine control over bandheight while ghostscript still handles the
gross sizing. An example would be the downscaler ensuring that bands are
multiples of the given downscale.

gs/base/gxclist.c
gs/base/gxdevsop.h


2013-10-22 13:06:40 +0100
Robin Watts <robin.watts@artifex.com>
edd06c70150166780f1360a42499569f3a52903e

Update downscaler to allow for process_page operation.

(No error diffusion in this mode, as bands need to be independent).

gs/base/gxdownscale.c
gs/base/gxdownscale.h


2013-10-21 12:03:42 +0100
Robin Watts <robin.watts@artifex.com>
ca5a608fe9062492f53c80eccb8b78dbdb997499

Add default process_page implementation.

This serves to handle the page mode case.

gs/base/gdevdflt.c
gs/base/gxdevice.h


2013-10-18 18:36:26 +0100
Robin Watts <robin.watts@artifex.com>
a25313d4518a942d74528ee7b6a52c96aa0128b6

Add process_page entry point.

Add clist implementation (both threaded and non-threaded) for process_page.

gs/base/gxcldev.h
gs/base/gxclist.c
gs/base/gxclthrd.c
gs/base/gxclthrd.h
gs/base/gxdevcli.h


2013-10-21 11:54:33 +0100
Ken Sharp <ken.sharp@artifex.com>
d7bff9b2f7230b527765661ea721d4b60e0e4154

pdfwrite - free Named Images stack before clearing local/global named objects

Bug #694136 "Seg faults found by fuzzing in cos_value_free"

If we stored named images in the initial name space then when we closed
the PDF file we would free and delete the local named objects before we
freed the named images stack. If the named images stack included entries
stored in the local named objects stack then we would attempt to free an
object which was already freed.

So we clear the named images stack first, for added safety we ensure we
clear the NI stack before global named objects are freed too.

No differences expected.

gs/devices/vector/gdevpdf.c


2013-10-19 10:50:17 +0100
Ken Sharp <ken.sharp@artifex.com>
8dbe789dec0a8be00942849f768648da60ee3336

pdfwrite - do not compose font name with CMAp when creating a CIDFOnt

Bug #694721 "Issued with font names in pdfwrite device"

When creating a CIDFont for output to a PDF file, we created the name by
composing the CIDFont name with the CMap originally used with the font.
However, this doesn't make sense, the CIDFont we emit is not composed with
that CMap, its usually composed with an Identity CMap. The CIDFont is
still arranged according to the original CMap, but this is the Ordering
of the font, not the CMap being used with it, and we record that Ordering
(should it be useful for anything) in the CIDSystemInfo.

We now do not add the CMap name to the CIDfont name, which allows Acrobat
to do a 'better' job of copy and paste (apparently it passes the font name
along).

No differences expected

gs/devices/vector/gdevpdtf.c


2013-10-18 18:33:21 +0100
Robin Watts <robin.watts@artifex.com>
7936b2643f2577fb70fdf2b8d9e3af5c8058668d

Fix memory leak on error in gxclimag.c

If we fail to allocate pie->buffer, there is no need to free it during
the clean up. On the other hand, it's probably a good idea to free 'pie'.

Also, for good style, if nothing else, avoid pinfo being returned with
a dangling pointer.

gs/base/gxclimag.c


2013-10-17 21:06:02 -0700
Ray Johnston <ray.johnston@artifex.com>
357ec4e2553a80c2bb6df29bb33ad095ac343242

Fix Bug694714. Clamp the ymin/ymax values to valid device coordinates.

In write_image_end_all, we could advance to a band past the end of the
page that didn't have a pcls in the states array, causing a segfault
when garbage values were used.

gs/base/gxclimag.c


2013-10-18 11:35:06 +0100
Ken Sharp <ken.sharp@artifex.com>
b21c6dd0fc782709712307f58fe0685634c6db30

pdfwrite - Improve robustness of type 1 font interpreter

Bug #694214 "Seg faults found by fuzzing in type1_next"

The font is corrupted and one of the glyph instrctions performs a 'return'
without previously executing a subroutine. This caused the font interpreter
to crash.

We now check when executing a return to see if we are not in the main glyph
program, if we are, we return an invalidfont error.

No differences expected

gs/devices/vector/gdevpsfx.c


2013-10-17 12:56:38 +0100
Ken Sharp <ken.sharp@artifex.com>
fc7ead6d34638a521a48debeb9437eac4e82ef98

pdfwrite - some casts to prevent compiler warnings

gs/devices/vector/gdevpdfc.c


2013-10-17 12:08:54 +0100
Ken Sharp <ken.sharp@artifex.com>
3cd2f7878bdae2d954ab27906336a9b87a267cd9

pdfwrite colour code - after concretizing a DeviceN space, don't attempt to convert it again

gs/devices/vector/gdevpdfg.c


2013-10-17 12:07:11 +0100
Ken Sharp <ken.sharp@artifex.com>
bbb32ec3f43405bd794f5d60f58f2d1bb7f5546b

pdfwrite colour - ensure icc_equivalent is set before trying to use it.

gs/devices/vector/gdevpdfc.c


2013-10-17 08:19:33 +0100
Ken Sharp <ken.sharp@artifex.com>
88df0b8fe9cce08b30ae7b12d6a1e8aa104981e2

pdfwrite - check before dereferencing a pointer

Bug #694716 - "seg fault with pdfwrite"

No differences expected

gs/devices/vector/gdevpdfm.c


2013-10-16 09:26:35 -0600
Henry Stiles <henry.stiles@artifex.com>
82fc3bd9f058974403d9f9ff9945391a6b8b20f6

The color index size was not transmitted properly from the MSVC
PCL/PXL/XPS makefiles to the Ghostscript makefile system.

common/msvc_top.mak
gs/base/msvclib.mak
gs/psi/msvc.mak
main/pcl6_msvc.mak


2013-10-16 00:59:19 +0100
Robin Watts <robin.watts@artifex.com>
8e9b3ce974cbd12452ae11ff1ff4cd48e4a261a9

Add downscaler support to pngalpha.

gs/devices/gdevpng.c
gs/doc/Devices.htm


2013-10-15 10:31:33 -0700
Michael Vrhel <michael.vrhel@artifex.com>
a438d95a859b430e58ef448a0995aa13cefac172

Minor fixes for use of equivalent ICC profiles from PS objects with pdfwrite

gs/base/gsicc_cache.c
gs/devices/vector/gdevpdfg.c


2013-10-14 16:56:25 -0700
Michael Vrhel <michael.vrhel@artifex.com>
9a441022bfe6f59dacdca40ce60c37ee02adfa07

Fix for error when nos had shape and alpha_g during compositing.

gs/base/gxblend1.c


2013-10-14 10:30:03 -0700
Michael Vrhel <michael.vrhel@artifex.com>
1c1f1619da98236ea06c4fdb1ea403d5ab990e08

Make sure to set the soft mask opacity to one so that we do not apply the
global path opacity multiple times when we have an opacity and a soft mask
from an image. Fix for Bug 694705

xps/xpsgradient.c
xps/xpsimage.c
xps/xpsopacity.c


2013-10-14 17:14:59 +0100
Ken Sharp <ken.sharp@artifex.com>
a0b7b91e2ca181e06fe11a89c5240e78b6e31aaf

pdfwrite - check return values from 'convert color'

Bug #694221 "Valgrind issues found by fuzzing in choose_DCT_params (gdevpsdi.c:156)"

In the past convert_color could not fail, with ICC handling, it can, so
we need to check the return code and handle errors gracefully.

This would not in fact have caused problems, but we fix it anyway.

gs/devices/vector/gdevpsdi.c


2013-10-11 16:18:32 -0700
Michael Vrhel <michael.vrhel@artifex.com>
d28da52a57923eb76503277d8be2eb0c72165599

Fix free mistake made in knockout commit http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=2d2cc321df4223fd7cf64946ac2fa963fa1cea3d

gs/base/gdevp14.c


2013-10-11 15:33:55 +0100
Chris Liddell <chris.liddell@artifex.com>
561b37fb083fa0dc32ea81b4aaea38607db05814

Remove the -dDisableFAPI hack from the "languages" builds

No cluster differences.

pl/plmain.c


2013-10-11 15:24:43 +0100
Chris Liddell <chris.liddell@artifex.com>
31ca73d856f974c7e1422948b2fb5794af55bf58

Have FAPI honor GridFitTT parameter.

The FAPI code now passes the GridFitTT parameter onto the scaler/renderer
interface code.

The default setting is now "1" for using the bytecode hinting. "0" disables
all TTF hinting, and "2" (with Freetype) enables Freetype's "autohinting"
algorithm. With other scalers the paramter currently has no effect, and
the "2" setting will *always* be scaler dependent.

Causes differences in pretty much every cluster PCL file containing TTF
glyphs as (and I still think this is a bad idea) PCL disables hinting at 300
dpi and above. No differences in PS/PDF/XPS/PXL jobs.

gs/base/fapi_ft.c
gs/base/fapibstm.c
gs/base/fapiufst.c
gs/base/gsfont.c
gs/base/gxfapi.c
gs/base/gxfapi.h
gs/doc/Language.htm
pl/plfapi.c


2013-10-11 09:45:56 +0100
Ken Sharp <ken.sharp@artifex.com>
9c13e3b9e735ba119f58c751a51fc55efef15a0c

xps interpreter - correct high level pattern handling

A silly error was causing fills to be applied twice. For opaque fills this
is merely a performance penalty but for transparent fills the result is
incorrect.

Thanks to Phil McSharry for identifying the problem and supplying a solution.

This shows progressions in a number of test files.

xps/xpspath.c


2013-10-11 08:09:01 +0100
Ken Sharp <ken.sharp@artifex.com>
6e10e787517ae0212ada6b7735542cbb4c41040c

Squash a scan-build compiler warning.

Prevent any possibility of a null-pointer dereference.

gs/base/gsdevice.c


2013-10-10 13:34:37 +0100
Ken Sharp <ken.sharp@artifex.com>
72afba4af187b01fded403d6a986d5de0be741d2

txtwrite - fix UTF-8 output Bug #694690

Thanks to r_one_guy@yahoo.fr for pointing this out and supplying a fix. The
UTF-8 output was incorrect for Unicode values between 0x80 and 0x7FF.

Also, we weren't outputting a BOM for Unicode (UCS2) output.

Not cluster tested

gs/devices/vector/gdevtxtw.c


2013-10-10 12:15:54 +0100
Ken Sharp <ken.sharp@artifex.com>
f924bf4d2bb4243ebe771e7e42bf1df3e41f415a

pdfwrite - don't emit extra blank page with '%d' output file spec

Bug #694576 "Using %d with pdfwrite results in extra, blank page"

Added a flag to the PDF device structure so that we can tell if pdf_close
has been called as the result of outputting a page. If it has not, and
the page is unmarked, and we are outputting in 'file per page' mode, then
we don't emit the page.

However, this leads to a 0 byte output file, so we also need to delete the
current output file. There seemed to be no obvious way to do this, so I
have added a gx_device_delete_output_file very similar to the existing
gx_device_open_output_file and gx_device_close_output_file routines.

No differences expected.

gs/base/gsdevice.c
gs/base/gxdevice.h
gs/devices/vector/gdevpdf.c
gs/devices/vector/gdevpdfb.h
gs/devices/vector/gdevpdfx.h


2013-10-03 15:15:53 +0100
Chris Liddell <chris.liddell@artifex.com>
68fa228ade5d2f7496b96676aaa1f82be4584362

Bug 694519: improve PCL performance with FAPI

Correctly maintain "design_grid" parameter in the font/matrix pair
structure, for FAPI handled TTFs.

Change a "return" to a "return_error".

Retrieving glyph metrics was sub-optimal as my original implementation used
a gs_text_process() call, which uses the entire "show machinery".

This implementation calls gs_fapi_do_char() directly. This has several benefits:
we only need a "skeleton" text enumerator, and a "skeleton" graphics state,
cutting down the local overhead setup. We also cutout a whole lot of setup
done as part of gs_text_begin() and during gs_text_process() itself. Finally,
we avoid a lot of "stuff" related to showing entire strings, when we're only
ever handling a single glyph at a time.

A final optimisation is in the FAPI/FT code: if we're just retrieving metrics,
we no longer take the action of retrieving the glyph from FT - which is not
a very cheap operation.

This commit causes ~100 cluster tests to have pixel shift differences.

gs/base/fapi_ft.c
gs/base/gxccman.c
gs/base/gxfapi.c
gs/base/gxfapi.h
gs/psi/zfapi.c
pl/plfapi.c
xps/xpsfapi.c


2013-10-09 12:25:56 -0700
Michael Vrhel <michael.vrhel@artifex.com>
83565d8264e96312df8c26055aaa0e23e57c4c8d

Add missing reference to $(memory__h) in gsicc_lcms2.c lib.mak

gs/base/lib.mak


2013-09-30 13:14:52 -0700
Michael Vrhel <michael.vrhel@artifex.com>
2d2cc321df4223fd7cf64946ac2fa963fa1cea3d

Knockout non-isolated transparency group support.

Fixes bug 692766

Proper non-isolated knockout group support added.

This commit adds non-isolated knockout group support to gs. Also, previously, non-isolated groups that
had color space mismatches were being forced to be isolated. We now color convert the parent buffer
to the new groups color space to ensure that the group is handled in the way it should.

This work revealed an issue in the color handling of planar buffers which was also fixed.

Also, an issue with clipping to the soft mask boundary during a transparency group pop was was
discovered and fixed as well as an overprint simulation issue in transparency.

Several progressions occurred with this fix.

Fixes bug 692766.

gs/base/gdevp14.c
gs/base/gdevp14.h
gs/base/gscsepr.c
gs/base/gsicc_cache.c
gs/base/gsicc_lcms2.c
gs/base/gstrans.c
gs/base/gxblend.c
gs/base/gxblend.h
gs/base/gxblend1.c
gs/base/lib.mak


2013-10-08 11:25:11 +0100
Chris Liddell <chris.liddell@artifex.com>
1969b28c60d666b5eab0050169b5b9aae1a28db5

Bug 694699: Scale FAPI's font BBox for units.

When FAPI "refined" the FontBBox from the scaler's data, it failed to correctly
take account of the units in which the scaler returned the values.

There was some code which *may* have been an attempt to handle it, but was
wrong in the general case. That's removed in favour of handling it properly.

Several regression files show differences, mainly with pdfwrite/ps2write: many
are pixel differences due to rounding, some are progressions. One was wrong
prior to this commit, and is slightly differently wrong with it.

gs/base/fapi_ft.c
gs/base/fapibstm.c
gs/base/fapiufst.c
gs/base/gxfapi.c
gs/base/gxfapi.h


2013-10-08 13:08:17 +0200
Tor Andersson <tor@ccxvii.net>
8b28b7dfd503146f7e2355a5dad9202b35405256

xps: Look harder for a font name in the 'name' table.

We used to look only for "Mac Roman, English" strings, now also try
"MS Unicode, United States" and "MS Unicode UCS-4, United States" if
the mac roman string can't be found.

xps/xpsfont.c


2013-10-07 16:05:07 +0100
Ken Sharp <ken.sharp@artifex.com>
7276c1f94cfa55aed0554d45858652ee1cac2097

correct a scan-build warning by checking a return value

No differences expected

gs/devices/vector/gdevpdfi.c


2013-10-07 15:05:22 +0100
Ken Sharp <ken.sharp@artifex.com>
1bdb7a9e1a3064b5e8abf29dcdfa9d279715ae34

Have pdfwrite ignore WMode=1 when a font has no Metrics2 entry

This arose while investigating a customer bug. Sadly its not actually
anything to do with the customer problem, but it was incorrect. The spec
says that if a font has WMode 1 but has no Metrics2 entry it should be
treated as horizontal (WMode = 0)

Quality Logic file 16-09.ps shows a progression with this change.

gs/devices/vector/gdevpdte.c
gs/devices/vector/gdevpdtt.c
gs/devices/vector/gdevpdtt.h


2013-10-04 08:17:40 -0700
Robin Watts <robin@peeves.(none)>
cdde8014aa4fe051743fad132f132fd608463744

Bug 694249: Fix JBig2Dec using broken image regions.

When decoding a "generic immediate region" in jbig2dec, if
we detect an error, we should not use the image as it may not
have been entirely initialised.

gs/jbig2dec/jbig2_generic.c


2013-10-02 09:51:31 -0700
Ray Johnston <ray.johnston@artifex.com>
41c13b4cc25b456d3862a73235ddbce09a85a104

Fix Segfaults with --saved-pages.

If the page was not large enough to use Banding mode, the clist_reset
would crash after the print request finished and the page reloaded.
The gx_saved_page_load needs to be after the saved_pages_list is put
back in the device.

Also, the "file_is_new" status was incorrect if pages were saved, but
no printing was done. This was seen with the TIFF devices and psdcmyk.

The psi/imainarg.c has a #define FORCE_SAVED_PAGES_TEST (disabled by
default) to simplify testing on the cluster without modifying command
line parameters.

gs/base/gdevprn.c
gs/base/gxclpage.c
gs/psi/imainarg.c


2013-10-01 17:52:43 +0100
Robin Watts <robin.watts@artifex.com>
dcc172feb018bfe0613f90ce76ce25dd1eafe3ce

Bug 689098: Only dash paths when the dashing would be visible.

If the ctm doesn't expand the dash lengths to be > 1 pixel, then
they can't be seen, so don't bother.

gs/base/gsmatrix.c
gs/base/gxstroke.c


2013-10-01 13:41:28 +0100
Robin Watts <robin.watts@artifex.com>
607370ce1a661d8657d5255056d810551c04d642

Bug 692650 - remove dead code in gxifast.c

A piece of code that was obviously left in a special case due to
cut and pasting can be removed. This will probably not actually
make any difference as a decent compiler (ha!) would optimise
it out anyway, but it's neater to remove it.

gs/base/gxifast.c


2013-10-01 12:44:13 +0100
Robin Watts <robin.watts@artifex.com>
9b43b8b20c6344ccac7fac48151161a51743246b

Add openjpeg files to ghostscript.vcproj

gs/ghostscript.vcproj


2013-09-28 08:29:45 +0100
Ken Sharp <ken.sharp@artifex.com>
29ed18f26f78d3e737b5e73452b1aa1a90088144

Eliminate some scan-build warnings in the ramfs code

The warning in gsioram.c is bogus, but hopefully this change will eliminate
it anyway.

2 lines deleted in ramfs.c were benign but pointless. The final deletion
could have caused a seg fault when memory was exhausted.

No differences expected

gs/base/gsioram.c
gs/base/ramfs.c


2013-09-27 16:03:04 +0100
Ken Sharp <ken.sharp@artifex.com>
be574c5550733da6b2ffa43fbc2099ae01608797

PDF interpreter - update to BPC change for JPEG2000

Bug #694621

If we find a box, which we shoudl not as this is only supposed to be used
when each colour channel has differing depth, we parse teh BPC from that,
and ignore the BPC in the ihdr box.

If the components are not all equal, we use the first one and raise a
warning.

No differences expected

gs/Resource/Init/pdf_draw.ps


2013-09-27 11:24:32 +0100
Ken Sharp <ken.sharp@artifex.com>
6fe7ace41f8afaba72f0f1da7747c062382346fc

PDF interpreter - treat invalid BPC of 128 in JPEG2000 files as 8

The test file has JPEG2000 images (produced by JasPer) which have a BPC
of 128. The valid range for JPEG2000 is 1->38 and for PDF is 1, 2, 4, 8,
12 or 16. Acrobat (of course) opens the file without complaint.

It appears that the image actually has 8 BPC so we specifically treat
this invalid value as 8.

No differences expected.

gs/Resource/Init/pdf_draw.ps


2013-09-26 14:07:19 -0600
Henry Stiles <henry.stiles@artifex.com>
49c0d08e7e04c8c4e1472142461f3ed369089639

Fix 694614 - Properly handle a resolution argument of zero.

pcl/rtgmode.c


2013-09-26 13:55:53 -0600
Henry Stiles <henry.stiles@artifex.com>
0f815674bfda9f940a20bb703d124f27b92de181

Fix 694615 - CCITT filter overflow.

The type of image columns in the graphics library CCITT filter is a
signed integer and PCL was assuming an unsigned and therefore did not
check for possible overflow.

pcl/rtraster.c


2013-09-26 10:31:51 -0600
Henry Stiles <henry.stiles@artifex.com>
3f02bbe5fad16e1f44131cb444e488e96157de5a

Fix 694616 - Fuzzing uncovered a modulo divisor of 0

pcl/rtraster.c


2013-09-17 16:49:51 +0100
Ken Sharp <ken.sharp@artifex.com>
c561232cf26e060b89fc4f3bd4bf5c679731d4db

pdfwrite - add support for form preservation from PostScript

Bug #687561 et al

We add the new operators .beginform and .endform which call device spec_op
methods in order to allow devices to capture form streams. Devices can
also return a matrix to replace the CTM for the course of the form.

Modified pdfwrite to capture and store forms, and set the CTM to the
pdfwrite general matrix (resolution/72).

Added new PDFexecform for use by the PDF interpreter, trying to capture
forms from PDF files is fraught with difficulty because we already capture
transparent forms as forms.

Because some kinds of forms cannot be successfully preserved (only happens
with badly behaved PostScript) we need a way to prevent forms from being
preserved. This option does that.

Examples of badly behaved PostScript can be found in a few Quality Logic
CET tests (use of setgstate in a form to set the CTM to a state prior to
the form execution, and use of setflat with a parameter derived from the
CTM. So we add UNROLLFORMS to the gs_cet file.

gs/Resource/Init/gs_cet.ps
gs/Resource/Init/gs_lev2.ps
gs/Resource/Init/pdf_draw.ps
gs/base/gdevdflt.c
gs/base/gsform1.h
gs/base/gxdevsop.h
gs/devices/vector/gdevpdfb.h
gs/devices/vector/gdevpdfi.c
gs/devices/vector/gdevpdfx.h
gs/doc/Ps2pdf.htm
gs/psi/int.mak
gs/psi/zform.c


2013-09-26 10:34:34 +0100
Chris Liddell <chris.liddell@artifex.com>
a62129ba436ff3a35c92c704a905d21ceae09a88

Bug 694575: workaround for filenameforall in regression tests

(This is slightly hacky!)

For the regression testing, especially the weekly tests, several of the QL
CET files give variable results depending on the exact content of the current
working directory - because they use filenameforall and vary their output based
whether it returns an error (mainly due to the path ending up too long for the
scratch string).

This commit "patches" the filenameforall operator to catch those cases, and
(hopefully) always return with no files, and no errors, thus giving consistent
results between runs.

Cluster differences in the CET files, as expected.

gs/Resource/Init/gs_cet.ps


2013-09-25 18:12:58 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
f9d0691129945b6d0657effcec6e6c440f57a364

Bug 694137 : Prevent accessing outside of array.

gs/openjpeg/libopenjpeg/jp2.c


2013-09-23 14:54:55 +0100
Chris Liddell <chris.liddell@artifex.com>
f945f8b050fb0a64f5de746f253244afa107bff8

Bug 694586: Have chunk allocator honor alignment

Have the chunk memory manager honor the same alignment as the rest
of the memory manager(s).

Fixes potential bus errors on SPARC.

No cluster differences.

gs/base/gsmchunk.c
gs/base/lib.mak


2013-09-23 10:55:34 -0700
Michael Vrhel <michael.vrhel@artifex.com>
b6d163b01a4ecca30503fbd770770b1bd7de73e2

Fix potential access violation and add error checking in pdf14 put image.

Fixes segv in fuzzing Bug 694190

gs/base/gdevp14.c
gs/base/gxblend1.c


2013-09-23 09:56:14 -0700
Michael Vrhel <michael.vrhel@artifex.com>
b8bb26de721811ca80712d8540e9279b4dca5bc9

Add error code checking in image color initialization

Fix for bug 694175

gs/base/gxipixel.c


2013-09-23 08:08:50 -0700
Robin Watts <robin@peeves.(none)>
f39d9824015ff6f909a59f697947f262d2c9c21c

Bug 694289: Avoid SEGVs sue to Xmprintfs with mem = NULL

If no memory pointer is supplied to a printf, then (in threadsafe
builds) return doing nothing or (in non-threadsafe builds) use the
default one.

Also tweak the lib ctx closedown so that we safely closedown
without trying to print anything via undefined print pointers.

gs/base/gslibctx.c


2013-09-23 15:19:04 +0100
Robin Watts <robin.watts@artifex.com>
23ef9ea1fd7193c19c37c9cd00c6aad52a992fd1

Bug 694162: Harden gx_forward_dev_spec_op against SEGVs.

If tdev == 0, don't pass on the call. I cannot reproduce the bug,
but this seems like a sensible precaution.

gs/base/gdevnfwd.c


2013-09-23 14:29:50 +0100
Robin Watts <robin.watts@artifex.com>
8c5cbff3351774ac55704c9c633112922313c74b

Bug 694159: Check return code on color remap.

If return code is ignored, returned device color may be used when
it is not initialised.

gs/base/gsshade.c


2013-09-22 20:56:11 -0700
Michael Vrhel <michael.vrhel@artifex.com>
81b54e2a9237dec0186ad331af845800011ae6d2

Improved error recovery during transparency group popping.

If the creation of the ICC link fails then we attempt a non-ICC mapping. Fix for fuzz segv bug 694191.

gs/base/gdevp14.c


2013-09-22 19:13:04 -0700
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
9f29534318f7a70eb42408a2bdca51dad7181c16

Added ink_cov device (Bug 694501).

Thanks for Billon Marc <billon.m@free.fr> for the patch.

gs/base/macos-mcp.mak
gs/base/macosx.mak
gs/base/openvms.mak
gs/base/unix-gcc.mak
gs/base/unixansi.mak
gs/configure.ac
gs/devices/devs.mak
gs/devices/gdevicov.c
gs/psi/msvc.mak


2013-09-21 22:36:34 -0700
Michael Vrhel <michael.vrhel@artifex.com>
af81a6bf1a5de5d8cc23aaec7ae663c8985767c7

Fix improper error checking in icc color space installation

Fixes fuzzing segv Bug 694192

gs/psi/zicc.c


2013-09-20 23:08:57 -0700
Michael Vrhel <michael.vrhel@artifex.com>
bbb9f59c59f7e229001e9e8413ff6ebf812910de

Add in pdf14 abort compositor action

The fuzzing files have identified that the interpreter was popping the
pdf14 device during a stop. This caused the pdf14 device to think it
was time to do its put_image command since it was done, causing a lot
of potential segv issues. This commit adds an abort compositor action
which will clean up the pdf14 device and set it back up as a pass through
device allowing for a more graceful exit.

gs/Resource/Init/pdf_main.ps
gs/base/gdevp14.c
gs/base/gstrans.c
gs/base/gstrans.h
gs/base/gxdevcli.h
gs/devices/vector/gdevpdft.c
gs/psi/ztrans.c


2013-09-20 12:19:36 -0600
Henry Stiles <henry.stiles@artifex.com>
46b8210665fe111b2fa544eed4a661de831d245e

Include another GL/2 command (SP) which can be used to initialize the
GL/2 interpreter, see related fix with bug #694595 for problem
details.

pcl/pcparse.c


2013-09-19 10:04:17 +0100
Ken Sharp <ken.sharp@artifex.com>
a5fa1ac21714a2dfdbcd3b9d70bc5cd913764ef3

pdfwrite - extend TrueType MaxPoint checking to include CID fonts

Further to commit 8b6be8be2cdcefae39339682d45d3c009ab909ac which added
checks for MaxPoints and NumContours before merging TrueType fonts, this
commit adds the same checks to CIDFonts with TrueType base fonts.

Also, relax the checks somewhat. As long as the new font doesn't have
*more* points, or contours, its safe to merge with the existing font.

No differences expected

gs/devices/gxfcopy.c


2013-09-18 13:56:35 -0700
Michael Vrhel <michael.vrhel@artifex.com>
142b12b12b56aba0d4ec7372c0260c39d2d58d28

Additional error checking fixes from fuzzing files

Fixes Bug 694154

gs/base/gsicc.c
gs/base/gsstate.c


2013-09-18 12:26:43 -0700
Michael Vrhel <michael.vrhel@artifex.com>
2236e20a9604602a12a9fbefc05e162d12954b03

Fix error checking for fuzzing case where pdf14 pattern accumulator target was closed

Fixes 3842.pdf.SIGSEGV.201.3160

gs/base/gdevp14.c


2013-09-18 10:31:50 -0700
Michael Vrhel <michael.vrhel@artifex.com>
c6fbf53542a13b9a8582aef2c50bba7a145a8e49

Error code checking fix.

Fixes Fuzzing Bug http://bugs.ghostscript.com/show_bug.cgi?id=694161

gs/base/gximag3x.c


2013-09-17 11:37:05 -0700
Michael Vrhel <michael.vrhel@artifex.com>
f4a1368a6585d20a218acd236d97706401a1b8c1

Fix for pattern, transparency, clipper interaction issues

Three issues this fixes. One is that if a clipper device is installed during the filling
with a transparency tile, we need to make sure we get the pdf14 device to pop the group
and not use the clipper device.

The second issue was that fit_fill was not getting used properly in the tile filling code.

The third issue was that the wrong dimensions were supplied to gx_trans_pattern_fill_rect when
the pattern was clist based.

This should fix Bug 693365.

gs/base/gdevp14.c
gs/base/gxp1fill.c


2013-09-17 20:02:34 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
3f098349c0ff70a50ebb0341f1e98da2c2330c84

Bug 694132: Resolve uninitialised variable and handle returning error correctly.

gs/base/gdevprn.c
gs/base/gxicolor.c


2013-09-17 08:47:18 -0600
Henry Stiles <henry.stiles@artifex.com>
54ab9a05fbc13ad402aaa63c86d9ec0422bd112a

Fix # 694595 - nothing produced reading PCL files.

This change allows the command BP (Begin Plot) to initiate the HPGL/2
parser for improperly constructed GL/2 files that lack the Enter GL/2
command (<ESC>%1B).

pcl/pcparse.c


2013-09-17 13:50:56 +0100
Robin Watts <robin.watts@artifex.com>
5347e2c3e43a28f64b0e4775945c6a58ee72debf

Bug 691182: Disable interpolation for Type3 postscript images

If we interpolate an image, but not its mask we get nasty edge
effects. We therefore choose not to interpolate either.

gs/psi/zimage3.c


2013-09-13 13:28:16 -0700
Michael Vrhel <michael.vrhel@artifex.com>
b7094e220951fc76656056a426ab7fa1363f38b7

Make sure the mono device that is created for non-FAPI bold font caching has icc procs set.

Fixes bug 694551

Note Enhancement Bug 694593 was opened with this commit so that I will remember to review
the setting of the get_profile procs for these devices.

gs/base/gdevmem.c
pl/plchar.c


2013-09-07 06:05:01 -0700
Michael Vrhel <michael.vrhel@artifex.com>
752aeb0e47fc11aff22618a00dd07576647c192d

Avoid forced white point mapping in CMM when the source profile is derived from CIE PS type.

LittleCMS and perhaps other CMMs have methods to force the white point in the mashed transform
between source and destination color space. The methods used can lead to incorrect results
when the source space is a non-traditional profile like those derived from CIEDEF(G) types.
This fix gets and sets the appropriate flags for the CMM to avoid the white point alignment
when the source space is PS based. Fixes bug 693826

Fixing this bug revealed an issue in the CIEA color space conversion.

Also, fixed old bug, mapping cie ps color spaces to ciexyz to allow ciexyz values larger than 1.0.
Fixes bug 692807.

Started changes to add in V2 profile creation.

Fixed error handling in this part of code also.

gs/base/gscie.h
gs/base/gsciemap.c
gs/base/gsicc.c
gs/base/gsicc_cache.c
gs/base/gsicc_cms.h
gs/base/gsicc_create.c
gs/base/gsicc_lcms.c
gs/base/gsicc_lcms2.c
gs/base/gsicc_manage.c
gs/base/gsicc_manage.h
gs/base/gxcie.h
gs/devices/gdevrinkj.c
gs/devices/gdevxcf.c
gs/devices/vector/gdevpdfk.c


2013-09-12 18:08:53 +0100
Robin Watts <robin.watts@artifex.com>
808e6d525d978b6f083be8eeb2a612b343500693

Bug 694590: Tweak scan converters handling of horizontal lines.

The scan converter only puts horizontal edges into the edge list
if expanding the height of the line by fill adjust causes it to
cover a pixel centre.

Unfortunately, for the fill_adjust = 0.5 case we actually use
adjust_above = 128 and adjust_below = 127, so there is one possible
subpixel offset for which the line will not appear. We therefore
tweak the logic to accept all horizontal lines through in this case.

This produces many diffs, all benign. Sorry Marcos.

gs/base/gxfill.c


2013-09-12 12:21:48 +0100
Ken Sharp <ken.sharp@artifex.com>
002cd5262ccb71010473abfb9069e1fb39f36f12

PDF interpreter - remove the 2D array of objects for large (>64k) objects

Bug #694470

In the past Ghostscript had a limit of 64k entries for arrays and strings
but this proved a problem for some PDF files, so a set of new objects were
defined 'larray' and 'lstring', which were defined as an array of arrays
and an array of strings. New accessor and utility functions were also
created.

With bug 694470 there is an object with an index of 2^32 - 1, which takes
a very long time, as the code allocates more and more sub-arrays.

Now that we have a limit of 2^24 on arrays and strings (which can be increased),
we can remove the 2d array hackery. This causes the bug file to abort almost
immediately while rebuilding the xref. It *should* also provide a modest
performance benefit, and makes the code smaller and easier to deal with.

No differences expected.

gs/Resource/Init/pdf_base.ps
gs/Resource/Init/pdf_main.ps
gs/Resource/Init/pdf_rbld.ps


2013-09-11 16:06:38 -0700
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
d97571b56d7c740e7d6aeee064313b96048a5667

Fixed typo in lib.mak introduced in b5472ea6bf

gs/base/lib.mak


2013-09-11 11:11:35 -0700
Michael Vrhel <michael.vrhel@artifex.com>
6dd5b91bbaf237ca3153722887d5965b0eb3633e

Ensure overprint drawn components are updated with color space changes during transparency.

Fixes bug 694297

gs/base/gdevp14.c
gs/base/gstrans.c


2013-09-11 18:47:45 +0100
Robin Watts <robin.watts@artifex.com>
faea7d6e98d6e7ee0b82d891544a13d703a291f5

Bug 690790: Workaround libpng 64bit build bug.

libpng keeps a jmpbuf in it's structure. jmp_bufs have to be 16 byte
aligned on x64 systems, and the png allocator makes no effort to
align the buffer.

The workaround here changes the PNG allocator to allocate it's main
structure in a larger block than it needs, and to actually use a
block in the middle of this to ensure alignment. A pointer is
kept to the real address of the block for freeing.

gs/libpng/png.c
gs/libpng/pngmem.c
gs/libpng/pngstruct.h


2013-09-11 10:15:26 +0100
Ken Sharp <ken.sharp@artifex.com>
b5472ea6bf6925023febdeab12be9dbd83e811f1

update ramfs code

gs/base/gsioram.c
gs/base/lib.mak
gs/base/ramfs.c


2013-09-07 12:01:22 +0100
unknown <ken@.(none)>
db45b95faa06f8204b9a075323125d7f398c5d06

PDF interpreter - process GoToR actions into pdfmarks for pdfwrite

Bug #693427 "GoToR target file information lost after GS processing"

This commit adds GoToR to the Existing GoTo and Named actions which the
PDF interpreter will convert into pdfmarks. pdfwrite already handles
the GoToR action so no changes were needed there.

No differences expected

New ram file system code

Updated from the patch submitted by Michael Slade in bug #226943. This code
removes a single Unix-ism and rewrites the memory allocations to use the
GS garbage collected memory (as is appropriate for PostScript) instead of
using the system malloc.

No differences expected since we have no files that use the ramfs.

gs/Makefile.in
gs/base/gsioram.c
gs/base/lib.mak
gs/base/ramfs.c
gs/base/ramfs.h
gs/psi/msvc.mak


2013-09-07 12:01:22 +0100
unknown <ken@.(none)>
8425cde6e55dfaa26e64e81f54e044187fb98384

PDF interpreter - process GoToR actions into pdfmarks for pdfwrite

Bug #693427 "GoToR target file information lost after GS processing"

This commit adds GoToR to the Existing GoTo and Named actions which the
PDF interpreter will convert into pdfmarks. pdfwrite already handles
the GoToR action so no changes were needed there.

No differences expected

gs/Resource/Init/pdf_main.ps


2013-09-06 17:58:57 -0500
Robin Watts <robin.watts@artifex.com>
e05fe9d24205f50ee12b97c22a5d1b34fa118ed0

Bug 619917: Add support for configurable timeslice

Add more of the patch from Herbert Swann. Many thanks again!

gs/psi/zcontext.c


2013-09-06 15:35:50 -0500
Robin Watts <robin.watts@artifex.com>
ddc4b6753a40b2cbac503dbef300d339979274c8

Bug 691917: Fix SEGVs in display postscript.

Cutdown version of Herbert Swanns patch.

gs/psi/zcontext.c


2013-09-06 15:49:10 -0500
Chris Liddell <chris.liddell@artifex.com>
64de3a6bf2b3a75123ae406076796f23a773aff1

Bug 693629: fix outdated FSF address information.

No cluster differences.

gs/contrib/gdevbjc_.h
gs/contrib/gdevcd8.c
gs/contrib/gdevdj9.c
gs/contrib/gdevlx32.c
gs/contrib/opvp/gdevopvp.c


2013-06-13 18:07:01 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
66d9c0aa17a5abcecd6590e63f0620f7aa51634c

Bug 694311 : GS openjpeg2 integration

WIP : Update with latest OpenJPEG2. Warning - does not compile yet.

WIP : Update code. Warning - does not compile yet.

WIP : Code compiles but is not cluster tested.

Update to build on xeon and macpro

Use default image creation

Add error/info/warning event handlers.

Update fuzzing patch to allow j2kp4-file3-ycc-8bpc.pdf to process correctly.

Update fuzzing patch to allow bug 691816 to process correctly without blurring.

Patch to cater for eYCC colour space.

Patch for indexed colour spaces and cater for bad BPCC header box.

Cater for alpha channel information.

gs/base/openjpeg.mak
gs/base/sjpx_openjpeg.c
gs/base/sjpx_openjpeg.h
gs/configure.ac
gs/openjpeg/libopenjpeg/CMakeLists.txt
gs/openjpeg/libopenjpeg/bio.c
gs/openjpeg/libopenjpeg/bio.h
gs/openjpeg/libopenjpeg/cidx_manager.c
gs/openjpeg/libopenjpeg/cidx_manager.h
gs/openjpeg/libopenjpeg/cio.c
gs/openjpeg/libopenjpeg/cio.h
gs/openjpeg/libopenjpeg/dwt.c
gs/openjpeg/libopenjpeg/dwt.h
gs/openjpeg/libopenjpeg/event.c
gs/openjpeg/libopenjpeg/event.h
gs/openjpeg/libopenjpeg/function_list.c
gs/openjpeg/libopenjpeg/function_list.h
gs/openjpeg/libopenjpeg/image.c
gs/openjpeg/libopenjpeg/image.h
gs/openjpeg/libopenjpeg/indexbox_manager.h
gs/openjpeg/libopenjpeg/invert.c
gs/openjpeg/libopenjpeg/invert.h
gs/openjpeg/libopenjpeg/j2k.c
gs/openjpeg/libopenjpeg/j2k.h
gs/openjpeg/libopenjpeg/jp2.c
gs/openjpeg/libopenjpeg/jp2.h
gs/openjpeg/libopenjpeg/mct.c
gs/openjpeg/libopenjpeg/mct.h
gs/openjpeg/libopenjpeg/mqc.c
gs/openjpeg/libopenjpeg/mqc.h
gs/openjpeg/libopenjpeg/openjpeg.c
gs/openjpeg/libopenjpeg/openjpeg.h
gs/openjpeg/libopenjpeg/opj_clock.c
gs/openjpeg/libopenjpeg/opj_clock.h
gs/openjpeg/libopenjpeg/opj_config.h
gs/openjpeg/libopenjpeg/opj_config_private.h
gs/openjpeg/libopenjpeg/opj_includes.h
gs/openjpeg/libopenjpeg/opj_intmath.h
gs/openjpeg/libopenjpeg/opj_inttypes.h
gs/openjpeg/libopenjpeg/opj_malloc.h
gs/openjpeg/libopenjpeg/opj_stdint.h
gs/openjpeg/libopenjpeg/phix_manager.c
gs/openjpeg/libopenjpeg/pi.c
gs/openjpeg/libopenjpeg/pi.h
gs/openjpeg/libopenjpeg/ppix_manager.c
gs/openjpeg/libopenjpeg/raw.c
gs/openjpeg/libopenjpeg/raw.h
gs/openjpeg/libopenjpeg/t1.c
gs/openjpeg/libopenjpeg/t1.h
gs/openjpeg/libopenjpeg/t1_generate_luts.c
gs/openjpeg/libopenjpeg/t1_luts.h
gs/openjpeg/libopenjpeg/t2.c
gs/openjpeg/libopenjpeg/t2.h
gs/openjpeg/libopenjpeg/tcd.c
gs/openjpeg/libopenjpeg/tcd.h
gs/openjpeg/libopenjpeg/tgt.c
gs/openjpeg/libopenjpeg/tgt.h
gs/openjpeg/libopenjpeg/thix_manager.c
gs/openjpeg/libopenjpeg/tpix_manager.c


2013-09-04 11:03:02 -0700
Michael Vrhel <michael.vrhel@artifex.com>
a92c4411e302b1b99fe65b5d89d26b87671feff5

Removal of default initialization of ICC profile in languages. The default will be set when the page erase occurs.

Thanks to Henry for catching this.

pcl/pctop.c
pxl/pxpthr.c
pxl/pxtop.c
svg/svgtop.c
xps/xpstop.c


2013-08-30 10:00:41 +0100
Chris Liddell <chris.liddell@artifex.com>
45dfe09a18a7c19c626561d506ab44ee68421c41

Update product string, dates and docs for 9.10 release.

Bring master up to date with gs910 branch

gs/base/version.mak
gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/WhatIsGS.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/doc/thirdparty.htm
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1


2013-08-15 16:53:31 +0100
Robin Watts <robin.watts@artifex.com>
edb56190f321ea9e094cb161f9b94941d49a40ae

Update antidropout downscaler.

The antidropout downscaler is not consistent in the way it detects
'darker' colors; some of the code predicates 'darker' on the color
polarity, other parts of it do not.

Here we make it consistently follow the color polarity.

Also, we correctly take the color polarity from the color space, rather
than from the device. Thanks to Michael Vrhel for making the changes
to make this possible.

gs/base/gxiscale.c
gs/base/sidscale.c


2013-09-03 18:01:55 +0100
Robin Watts <robin.watts@artifex.com>
02ab2adaafb3cc9322e54f0ea4e78952c34818d2

Bug 694561: Fix interpolated landscape images (again).

Don't try to accumulate runs of identical pixels in landscape images.
We weren't aligning the transposed data to bitmap_align, and this was
causing problems. It's unfeasible to do so, and the underlying driver
almost certainly will break down to 1 call per pixel, so we might as
well do that immediately and simplify the code massively.

Also fix some warnings/unused variables.

gs/base/gxcindex.h
gs/base/gxiscale.c


2013-08-24 20:44:10 -0700
Michael Vrhel <michael.vrhel@artifex.com>
bdc103f817778f84efe66f10489c88a9263d279f

Addition of new procedure to color spaces to return the polarity of the color space.

gs/base/gsccolor.h
gs/base/gscdevn.c
gs/base/gscolor2.c
gs/base/gscpixel.c
gs/base/gscscie.c
gs/base/gscsepr.c
gs/base/gscspace.c
gs/base/gsicc.c
gs/base/gspcolor.c
gs/base/gxcspace.h
gs/base/gxdevcli.h


2013-09-03 12:59:05 +0100
Ken Sharp <ken.sharp@artifex.com>
5ae4180ca9d17f367acd068537f0a67a243656b8

PS Interpreter - don't interpolate imagemask data for high level devices

Bug #689460 "imagemask interpolation differs from Adobe"

This is rather a long-running bug. The title isn't really very descriptive
of the problem, as far as I can tell the problem only affects pdfwrite.

In the current implementation, interpolation of imagemasks is handled in
*PostScript*, by inserting the ImScaleDecode filter in front of the image
DataSource. This works well for rendering, but for high level devicees
(particularly pdfwrite) this means that we do not embed the original mask
data, we embed the interpolated data. This makes the PDF file much larger
and also means that when opened with Acrobat Reader, the output does not
match, becuase Acrobat does interpolation by applying what looks like a
Mitchell filter, and promoting the imagemask to 8 bpc.

I did look into applying our current scheme in C, as suggested in comment #18,
but that was inordintely difficult. We can't use the existing 1bpp image
interpolation code, as that promotes to 8bpc and uses a Mitchell filter,
so we lose the sharp edges, which is important for a mask. It probably would
be possible to replicate the PostScript code which adds the ImScaleDecode
filter to the DataSource, but there seems little point in doing this in
C when it could be done more easily in PostScript.

So instead I've chosen to test if the current device is a 'high level'
device and, if it is, not to apply the filter.

With pdfwrite this leads to us producing smaller PDF files, as expected,
and the result in Acrobat matching the one from Distiller.

When testing with the cluster a small number of Genoa test files exhibit
differences. These all use the well known 'turkey' image at very low resolution,
with the old code these were interpolated at 720 dpi and that was the image
data written out. Now we write the original data and interpolate to the
resolution of the actual device at rendering time. In the case of 300 dpi
output this results in small but visible differences.

gs/Resource/Init/gs_img.ps


2013-09-01 12:23:04 +0200
Simon Bünzli <zeniko@gmail.com>
42839db66a6cb026691c2e30af3489ff22d96b35

bug 694281: fix memory leaks and compilation warnings

* jbig2_build_huffman_table leaks LENCOUNT and result under OOM conditions
* jbig2_decode_symbol_dict leaks an image in an error case
* jbig2_symbol_dictionary skips cleanup in an error case
* jbig2_text_region leaks GR_stats in various error and non-error cases
* MSVC reports two "unreachable code" warnings and a "signed/unsigned
mismatch" one

gs/jbig2dec/jbig2.c
gs/jbig2dec/jbig2_huffman.c
gs/jbig2dec/jbig2_segment.c
gs/jbig2dec/jbig2_symbol_dict.c
gs/jbig2dec/jbig2_text.c


2013-09-02 12:26:59 +0100
Chris Liddell <chris.liddell@artifex.com>
1c1395aeeee68d545a3f293d6aa0ec38999879c9

Update font versions in PPD files.

A couple of ppd's contain version numbers for the font files, update them
from 1.05 to 1.10

CLUSTER_UNTESTED

gs/contrib/pcl3/ppd/fonts.ppd
gs/lib/ghostpdf.ppd


2013-09-01 18:48:32 -0700
Ray Johnston <ray.johnston@artifex.com>
f89dd1d4d38db72a9fc7a605072cf2a419e6f190

Fix compiler warnings.

gs/base/gxclpage.c
gs/psi/imainarg.c
gs/psi/int.mak


2013-07-11 13:03:17 -0700
Ray Johnston <ray.johnston@artifex.com>
9c95a9ae56b5051ba8c7c3b3d161932678d3b01d

Enhance gx_saved_page and save_page function to support advanced functions.

By saving the device params in the saved_page struct we can use it more
generally to print pages out of order. This is still compatible with the
rendering of multiple saved pages on a 'master' page for imposition, but
the latter does not use the device params so pages with differing spot colors
or differing destination ICC profiles may be incorrect. To be fixed later.

Several utility functions support lists of saved pages: gx_saved_pages_list_new
to allocate and initialize a saved page list; gx_saved_pages_list_add to alloc
a new saved page object, fill it with the current page and add it to the end of
the list; gx_saved_pages_list_print to print various pages in various orders
from the list; gx_saved_pages_list_free to free the clist files for the saved
pages as well as the saved pages and the saved pages list and to support the
parameter and command line arg, gx_saved_pages_param_process. This function
may be useful for applications as well. See psi/imainarg.c for sample usage
with --saved-pages-test.

Also, the gx_device_printer get and put params have an added saved-pages string
parameter to allow control of this feature.

A new command line option --saved-pages="..." is added that will call the
'process' function. This is implemented for BOTH gs imainarg and plmain used
by the other languages. Also, --saved-pages-test is added for weekly testing
that will collect all pages in a list (--saved-pages=begin) then after the
file is processed, will print all pages (--saved-pages="print normal flush").

The capability is mentioned in doc/Use.htm, and the parameters for the control
string is documented in doc/SavedPages.htm

gs/base/gdevdflt.c
gs/base/gdevppla.c
gs/base/gdevprn.c
gs/base/gdevprn.h
gs/base/gsdparam.c
gs/base/gxclist.c
gs/base/gxclist.h
gs/base/gxclpage.c
gs/base/gxclpage.h
gs/base/gxclread.c
gs/base/gxclrect.c
gs/base/gxclthrd.c
gs/base/gxdevsop.h
gs/base/gxpcmap.c
gs/base/lib.mak
gs/base/string_.h
gs/devices/gdevijs.c
gs/devices/gdevp2up.c
gs/devices/gdevtsep.c
gs/doc/SavedPages.htm
gs/doc/Use.htm
gs/psi/imainarg.c
gs/psi/iminst.h
gs/psi/int.mak
pl/pl.mak
pl/plmain.c
pl/plmain.h


2013-06-11 22:04:00 +0200
zeniko <zeniko@gmail.com>
e7b7ecff0277c0aa7e162edd21842dc4409391ff

Bug 694121: prevent heap overflow

jbig2_decode_symbol_dict checks whether more glyphs are requested than
are available (SDNUMINSYMS + SDNUMNEWSYMS) but has so far failed check
whether there are more than expected (SDNUMEXSYMS); fixes
3324.pdf.asan.3.2585

gs/jbig2dec/jbig2_symbol_dict.c


2013-07-05 13:11:58 +0200
zeniko <zeniko@gmail.com>
f7064096ceac3d6c148096a936e1ea10fd8f0c55

Bug 694111: prevent heap overflow

jbig2_image_compose fails to ensure that the destination rectangle lies
entirely within the destination buffer (in the case of the file
3324.pdf.asan.50.2585, this happens due to a huge value for y). Adding a
new check which makes sure that...

@ y * dst->stride + leftbyte doesn't overflow
@ x and leftbyte don't overflow to the next line
@ h * dst->stride doesn't overflow
@ all values read are within the destination buffer

The file 3324.pdf.asan.50.2585 also demonstrates a memory leak where the
glyph isn't properly released if jbig2_image_compose fails.

gs/jbig2dec/jbig2_image.c
gs/jbig2dec/jbig2_text.c


2013-08-30 13:05:46 +0100
Ken Sharp <ken.sharp@artifex.com>
ca5a118174084f53893978d0c6b71d3a58db41bf

PDF interpreter - synthesize appearance for multiline text widgets

Bug 689761 "Multiline PDF form field does not honor line breaks"

There are several parts to this change. Firstly there was a bug in the code
to detect multiline text widgets, which meant that they were not detected
and instead of flagging a warning and ignoring the widget, we handled it
as if it were a single line. This also meant that we were mishandling combined
fields as tetx fields.

Secondly there is code in pdf-draw.ps which checks to see if we can synthesise
an appearance and if we can it ignores the one provided. Testing with Acrobat
indicates that this is what Acrobat does. However I think this is very wrong
and in testing our code I see about as many files which are better if we
use the appearance stream as are better if we manufacture one. So I've
chosen (for now at least) to use the appearance stream if we're given one.

Finally we now handle multiline text fields. The string is broken up into
multiple strings at the line breaks. The height of the rectangle is divided
by the number of strings, which allows us to space the lines evenly. We
detect and implement the different types of quadding. Note that Acrobat
does not seem to distribute the text the same way we do, but I don't see
any reason to try and mimic it.

Expected Differences
Bug689450.pdf Bug692968.pdf 1503_text_missing .pdf Bug690526.pdf Bug692591.pdf
these files have appearance streams that do not match up with the field values.
1783_CIDToGIDMap...pdf x_-_complex_fomr.pdf using the appearance stream
improves the output because our synthesis is not that great.
comb_and_password.pdf uses a combined field which we previously treated as
text, and which we now ignore.

gs/Resource/Init/pdf_draw.ps
gs/Resource/Init/pdf_ops.ps


2013-08-29 16:47:29 +0100
Robin Watts <robin.watts@artifex.com>
621b010d1a6e12f7754508fee8a860345b4f84df

Bug 694546: Fix undefined behaviour in gdevpbm.

Thanks to jsmeix for reporting this.

gs/devices/gdevpbm.c


2013-08-29 16:23:20 +0200
Tor Andersson <tor@ccxvii.net>
3659374423a9f7b0c4b361ce2e207549ae8b4e25

xps: Check sfnt name table length before accessing array.

Thanks to Shailesh Mistry.

xps/xpsfont.c


2013-08-27 16:03:41 +0200
Tor Andersson <tor@ccxvii.net>
30355133c04d2ab3f270a6ea6ee28ae8fa91021b

xps: Fix memory leak (bug 694469).

Thanks to Shailesh Mistry.

gs/base/gslibctx.c
pl/plmain.c


2013-08-27 16:01:33 +0200
Tor Andersson <tor@ccxvii.net>
8017a6b547e12bc43d16f1057ac5dbf075a47d1e

xps: Check for number of arguments when parsing abbreviated paths.

Thanks to Shailesh Mistry.

xps/xpspath.c


2013-08-27 15:45:09 +0200
Tor Andersson <tor@ccxvii.net>
9a85570458e46327dd8741c16c758669b5918ac4

xps: Avoid infinite loop on syntax errors in abbreviated path geometry.

Thanks to Shailesh Mistry.

xps/xpspath.c


2013-08-27 15:43:14 +0200
Tor Andersson <tor@ccxvii.net>
82fd60791f60a00bbd42b042198d0cc2593c0790

xps: Skip all but the first resource dictionary if there are many.

Thanks to Shailesh Mistry.

xps/xpspage.c
xps/xpsresource.c


2013-08-27 15:42:44 +0200
Tor Andersson <tor@ccxvii.net>
bac315e9d796bff6707e1b96e75d403edddf7303

xps: Ignore empty resource dictionaries.

Thanks to Shailesh Mistry.

xps/xpspage.c
xps/xpsresource.c


2013-08-23 16:17:55 +0200
Tor Andersson <tor@ccxvii.net>
d4d0e216d1327dab177820e2f90cbb2dd38843c6

xps: Check for missing pieces before dereferencing.

Should only be able to happen if .last.piece is missing.

Thanks to Shailesh Mistry.

xps/xpszip.c


2013-08-23 16:11:03 +0200
Tor Andersson <tor@ccxvii.net>
62c8ba4fa3af5fbe395cd4923766ca8a44fc36f1

xps: Check that Canvas.Resources has child node before descending.

Thanks to Shailesh Mistry.

xps/xpsanalyze.c


2013-08-23 16:08:37 +0200
Tor Andersson <tor@ccxvii.net>
8dc38533ab78a63c9c0a5c82ba96c45c0a9edebc

xps: Check the existence of stripbytecounts before using in TIFF decoder.

Thanks to Shailesh Mistry.

xps/xpstiff.c


2013-08-27 17:34:29 +0100
Ken Sharp <ken.sharp@artifex.com>
88bce110851c10455d3165ca748a3371d9c917cc

PostScript interpreter - make setpagedevice and EndPage work more like Adobe

Bug 690667 "Changing PageSize during n-up processing by BeginPage/EndPage generates wrong output"

The test job changes setpagedevice during the course of the job, and the
EndPage takes special action depending on the page count. The first problem
is that we don't reset the count of pages in the device, and Acrobat can
be shown to do so on *any* call to setpagedevice (even if the dictionary
is empty). In zsetdevice() we now reset the page count in the current device
so that he page count is reset, even if the device doesn't change.

Secondly we call .trysetparams before we execute the EndPage routine (if
present). The problem here is that .trysetparams actually modifies the
page device dictionary (and hence the device) and so attributes can change
before the EndPage, in particular the PageSize. The /setpagedevice routine
has been modified to move the execution of EndPage much earlier in the
process. Again testing with Adobe Acrobat shows that the EndPage procedure
is executed if the dictionary argument is empty, and indeed even if the
execution of setpagedevice causes an error.

No differences expected. Note this is a potentially destabilising change.

gs/Resource/Init/gs_setpd.ps
gs/psi/zdevice.c


2013-08-27 15:55:07 +0100
Ken Sharp <ken.sharp@artifex.com>
07ed0d0cb0de6ebc456a08ca0484c0e8a120b472

PDF interpreter - clamp invalid numbers to 0 in Shading Coords

Bug 694542 "Ghostscript failed to convert pdf file to images"

The specimen file contains invalid numbers in the Coords array of every
Shading dictionary. Acrobat (of course) handles this by silently converting
all such numbers to 0.

This commit checks the Coords of the Shading, and if any entry is not a number
(our token parser converts invalid numbers to names) it replaces it with a
xero.

No differences expected

gs/Resource/Init/pdf_draw.ps


2013-08-27 13:20:03 +0100
Chris Liddell <chris.liddell@artifex.com>
e413f6aa426fb63c2e9709ad8d28ab862bc1d44d

Add the font embedding paragraph.

The URW+ fonts are licensed under the GPL, with an additional allowance
for embedding the fonts, and that embedding not affecting the license of
the document in which the font is embedded.

CLUSTER_UNTESTED

gs/LICENSE


2013-08-27 11:21:37 +0100
Ken Sharp <ken.sharp@artifex.com>
8b6be8be2cdcefae39339682d45d3c009ab909ac

pdfwrite - more discriminating tests before TrueType font combining

Bug 694538 "Incorrect embedding of fonts"

The test file does not appear to be the regular output of the MS Windows
PostScript driver, it looks like several files have been stripped and then
added together. A process liable to failure at the best of times.

In this case we end up with a large number of incrementally downloaded,
subset, TrueType fonts. Despite the fact that these are the same font and
in many cases contain the same, or compatible, subsets the fonts are
downloaded several times, which is why I believe this to be a combination
of separately created files.

pdfwrite tries to combine such fonts, and does so quite succcesfully in
this case. However, the individual fonts are not all alike. Some information
in the TrueType table is clearly copied from the original font (eg the
numGlyphs value of 3147) and some is not. In particular the maxPoints
value differs between two otherwise compatible subset fonts (one has additional
glyphs). It seems Acrobat doesn't like this, it sometimes raises an error
and does not display any glyphs whose point count exceeds the maxPoints
value.

This commit adds the maxPoints and maxContours values to the gs_type42_data
structure and tracks them. Fonts are not now considered compatible if
these values are different between them.

This will lead to less font merging, but for sensibly created programs
this will not be a problem, as the driver only downloads the font once. For
programs created by jamming files together it will prevent the situation
where we create a font which Acrobat cannot read.

No differences expected.

gs/base/gstype42.c
gs/base/gxfont42.h
gs/devices/gxfcopy.c


2013-08-26 14:31:28 +0100
Chris Liddell <chris.liddell@artifex.com>
e9b47527ec10d911f8154c60f746985e139606b8

Bump version number

gs/Resource/Init/gs_init.ps
gs/base/version.mak


2013-08-30 10:00:41 +0100
Chris Liddell <chris.liddell@artifex.com>
7fcadf3b8b0ef1662419c15b8d51e36e434804be

Update product string, dates and docs for 9.10 release.

gs/base/gscdef.c
gs/base/version.mak
gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/WhatIsGS.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/doc/thirdparty.htm
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1


2013-08-29 16:47:29 +0100
Robin Watts <robin.watts@artifex.com>
b8d4701f17205624ebffe3d4630c9df87ac095b0

Bug 694546: Fix undefined behaviour in gdevpbm.

Thanks to jsmeix for reporting this.

gs/devices/gdevpbm.c


2013-08-27 13:56:35 +0100
Chris Liddell <chris.liddell@artifex.com>
0680e46d927d1cc02a4bad4c3a90cb9adc3d4580

Bring docs up to date for RC.

gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/WhatIsGS.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/doc/thirdparty.htm
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1


2013-08-26 14:29:57 +0100
Chris Liddell <chris.liddell@artifex.com>
466d8f67a5b1ada99d05777ba33fab48a7d74bc9

Change product string for release candidate

gs/base/gscdef.c



Version 9.10 (2013-08-27)

This is the ninth full release in the stable 9.x series, and is primarily a maintenance release.

Highlights in this release include:

For a list of open issues, or to report problems, please visit bugs.ghostscript.com.

Incompatible changes

No recorded incompatible changes.

Changelog

2013-08-29 16:47:29 +0100
Robin Watts <robin.watts@artifex.com>
b8d4701f17205624ebffe3d4630c9df87ac095b0

Bug 694546: Fix undefined behaviour in gdevpbm.

Thanks to jsmeix for reporting this.

gs/devices/gdevpbm.c


2013-08-26 14:29:57 +0100
Chris Liddell <chris.liddell@artifex.com>
466d8f67a5b1ada99d05777ba33fab48a7d74bc9

Change product string for release candidate

gs/base/gscdef.c


2013-08-25 20:52:36 -0700
Ray Johnston <ray.johnston@artifex.com>
4a319086dd71dbcc3ec71b70277734595647784d

Fix bug 694539. Reading off the end of the cbuf when dash pattern len is max.

The max length dash pattern (currently 11) was used frequently in this file,
and in at least one case, this tripped over a memmove that is way too large in
the top_up_cbuf because the pointer was past the end of the buffer, and the
unsigned int count was 0xffffffff. The root cause was that the cmd_largest_size
used to set the warn_limit did not account for both the dot_length and the
offset.

I corrected cmd_largest_size, added some comments, and added an error message
and ioerror return to top_up_cbuf.

gs/base/gxcldev.h
gs/base/gxclrast.c


2013-08-24 10:36:20 +0100
Ken Sharp <ken.sharp@artifex.com>
2001f469b539a5ccce301ace5d6384b6b7e46888

Fix -dUseCIEColor (part of the whole VM allocation problem)

See commit ae930279498a5961fcf5d70ffe86864883609cbc for a lengthy explanation)
of the background to this problem.

The fix for the original problem involved always creating the device dictionary
for setpagdevice in local VM.

Following on from that we discover the following in zdsp1.c

gstate_check_space(i_ctx_t *i_ctx_p, int_gstate *isp, uint space)
{
/*
* ****** WORKAROUND ALERT ******
* This code doesn't check the space of the non-refs, or copy their
* contents, so it can create dangling references from global VM to
* local VM. Because of this, we simply disallow writing into gstates
* in global VM (including creating them in the first place) if the
* save level is greater than 0.
* ****** WORKAROUND ALERT ******

Now, if we execute the Display PostScript .savelocalstate routine, its vital
that the gstate and all its contents be in global VM in order to satisfy
the test in zdps1.c.

So, any calls to setpagedevice before the call to .savelocal must allocate
the page device dictionary in global VM (as a pointer to the device dictionary
is saved in the gstate)

Thus we need a way to tell setpagedevice to allocate its dictionary in global
VM, even though we usually want it in local VM.

This commit adds a somewhat hacky method for this, we insert a specific key
/..StartupGlobal in the page device dictionary. If setpagedevice finds this
key in the dictionary we allocate the dict in global VM, and remove the key.

We then use this key in a couple of places in gs_init.ps where we execute
setpagedevice *before* we've reached .savelocalstate.

This fixes all the myriad problems with allocation states and gives us a way
to add any more that are required.

I've put a comment into gs_init.ps immediately before /.savelocalstate so
at least in the future it will be easier to figure out where this is required.

I've searched all the initialisation files looking to see if there are any
other likely places (the INITFILES string is parsed before we get to
.savelocalstate) and they all look acceptable. None of the routines actually
execute setpagedevice.

No cluster differences expected as none of this is tested

gs/Resource/Init/gs_init.ps
gs/Resource/Init/gs_setpd.ps


2013-08-23 09:15:32 +0100
Ken Sharp <ken.sharp@artifex.com>
c1510d726063080559e9597db7d4a686f2ca4eae

correct some typos in PDFDocEncoding to UTF8 conversion

Bug #694535 "Typo in charset conversion in gdevpdfe.c"

Credit (and thanks) to Tim Waugh at Red Hat for the fix, applied here.

No differences expected, we clearly don't have any examples that exercise
this particular case in our test suite.

gs/devices/vector/gdevpdfe.c


2013-08-23 08:42:46 +0100
Ken Sharp <ken.sharp@artifex.com>
ae930279498a5961fcf5d70ffe86864883609cbc

More work related to VM mode, setpagdevice and startup conditions

This has a lengthy bug tail attached to it, the summary follows, prior
commits of interest are (ordered by date, earliest first):
073f7be1671e7fa2dbbc75984e593d2279bb05d7
939e32ff3c8841507aed80435269457f3caac6f5
774231a7db63439c72313050a750b219491c172f
39b494d41a814e6b27a5828030e58e0b239044fb

Initially the bug report was #687702 "gs8.15 setpagedevice /invalidaccess",
the problem was caused by a 'fix' for WordPerfect files which assumed a local
VM writeable dictionary returned by currentpagedevice. The fix was to create
a local VM copy of the dictioanry, because its acceptable to store global
objects in local VM, but not vice versa. (073f7be1671e7fa2dbbc75984e593d2279bb05d7)

However, if we start with -dSAFER then, quite early in gs_init.ps, we call
/.setsafe (which called /.locksafe) which ends up executing setpagdevice
in order to set /LockSafetyParams. This causes the page device dictionary to
be allocated in local VM. This should not cause any problems, but.....
setpagedevice stores a pointer to the returned dictionary in the graphics
state, the Display PostScript initialisation code insists that all objects
in the 'savedinitialgstate' be in global VM, and we just allocated the dict
in local VM, so we get an error.

This was fixed in setpagedevice by checking for a 1 element dictioanry
with the specific key '/LockSafetyParams', and creating a global VM dict
instead of a local one. (939e32ff3c8841507aed80435269457f3caac6f5)

We then discovered that GSView sends PostScript containing '.locksafe',
which triggers the check in sepagedevice and sets the VM allocation mode
to global, causing an invalidaccess error. GSView should not be using
undocumented internal routines but it was decided to fix this, even though
a release had just been completed. This was done by creating a new routine
'.locksafeglobal' which sets a key called /LockSafetyParamsGlobal and
having setpagedevice check for that key, if discovered it creates a global
VM dictionary and replaces the key with /LockSafetyParams. Finally /.locksafety
was returned to its original state. (774231a7db63439c72313050a750b219491c172f)

A new release was completed, and it then transpired that, despite having
tested gv briefly, under certain conditions it executes a script (pdf2dsc)
which uses pdf2dsc.ps, which calls .setsafe. This didn't seem terribly
important and so the line was removed from the PS file.

Ray pointed out that the .setsafe routine is (minimally) documented in
use.htm, and it seems is important to the Unix community because of the
'SAFER' switch. So this commit restores /.setsafe (and the line in pdf2dsc.ps)
and creates a new /.setsafeglobal. This is *only* executed in gs_init.ps,
its presence is solely for the benefit of DPS so that the initial gstate
is allocated in global VM, and must not be used anywhere else.

Hopefully we can finally say goodbye to all this mess now.

gs/Resource/Init/gs_init.ps
gs/lib/pdf2dsc.ps


2013-08-22 16:07:29 +0100
Ken Sharp <ken.sharp@artifex.com>
39b494d41a814e6b27a5828030e58e0b239044fb

remove a '.setsafe' from the PS file it doesn't work any more and nobody
should be using undocumented internal routines anyway.

We should probably remove pdf2dsc altogether, it relies on using parts
of the PDF interpreter which, as far as I'm concerned, are subject to
change without notice.

gs/lib/pdf2dsc.ps


2013-08-22 13:33:14 +0100
Ken Sharp <ken.sharp@artifex.com>
dfd7fc9fe152245256e437141dd7780c8313c971

pdfwrite - make the saved gstate stack dynamically allocated instead of static array

Bug #693591 "Infinite loop writing pdf file"
Bug #694531 " "*** File has unbalanced q/Q" infinite loop on seemingly valid file"

The stack of saved gstates in pdfwrite was a statically allocated array of 11
elements. Cairo produces PDF files with insane (and pointless) levels of
Form XObject nesting which can easily break this limit (as well as causing all
PDF consumers to render the files slowly)

This commit replaces the fixed size array with a dynamically allocated array.
For performance reasons we still allocate 11 elements initially, and if we
exhaust the storage, we reallocate 5 elements larger.

This also shows a progression in the test file 'inefficient_tiling.pdf' this
file is produced by LaTeX but I guess it may be using Cairo behind the
scenes.

gs/devices/vector/gdevpdf.c
gs/devices/vector/gdevpdfb.h
gs/devices/vector/gdevpdfg.c
gs/devices/vector/gdevpdfx.h


2013-08-16 10:35:58 +0100
Chris Liddell <chris.liddell@artifex.com>
868bcc0c697619a276e725fd851b5f52079e64a5

Bring master up to date with 9.09 release branch

update docs, version numbers, dates and product string

Update product string, dates and changelog for 9.09 release.

No cluster differences.

gs/base/version.mak
gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/WhatIsGS.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/doc/thirdparty.htm
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1


2013-08-21 14:26:57 +0100
Ken Sharp <ken.sharp@artifex.com>
243c299262d0e5ebac46f517e749a3d45cbe9c46

Fix a compiler warning which exhibited a real problem

In gdevpdfp.c remove a redefinition of 'code'. The 'for' loop uses the
outer definition of 'code', but the inner definition is set by
cos_dict_put_c_key_string() This means that the inner definition is never
used, and the outer one used to control the loop is never changed, defeatimg
the purpose.

The other new compiler warnings in pdfwrite are either not valid (some warnings
are incorrect) or benign and fixing them introduces other warnings.

gs/devices/vector/gdevpdfp.c


2013-08-21 13:23:52 +0100
Ken Sharp <ken.sharp@artifex.com>
077435083eb0d8acb91686ba8b745ec8371e16fd

Correct the evaluation order in filenameforall processing

gs/base/gp_ntfs.c


2013-08-21 10:13:59 +0100
Ken Sharp <ken.sharp@artifex.com>
735589e5b16cf3d31c6bf73ebd75259db9d18f3c

Yet more work on NTFS file enumeration

Bug #686853, SaGS comment #9

We now match the pattern template only at the top level of the recursion,
any directories which match the pattern are enumerated, but their entire
contents are listed.

Multiple path separators are now removed at each level. It should now be
impossible to reach a situation where a returned file has '\/' or similar
contained within it.

Illegal characters ('*' and '?') in the path will now cause no matches to
be returned. These are of course valid after the final separator of the
path and will match filename patterns at that level.

I've checked this with various paths utilising multiple path separators,
mixed use of separators, illegal escaped characters in the path and a modest
variety of patterns. All this with COMPILE_INITS=0 and COMPILE_INITS=1 and
in both cases with GS_NO_UTF8=1 and without specifying GS_NO_UTF8. All seems
to be OK in all cases. None of this is tested by the cluster of course.

CLUSTER_UNTESTED

gs/base/gp_ntfs.c


2013-08-20 10:21:09 +0100
Chris Liddell <chris.liddell@artifex.com>
b0c3a494395db460cbb8e28a6896eebccc6b797a

Ensure we don't overflow the filename buffer.

No cluster differences.

gs/base/gp_unifs.c


2013-08-20 10:23:02 +0100
Ken Sharp <ken.sharp@artifex.com>
c1544d825be1f87ed0821ef0163d08595b5fc0e6

Make the Windows implementation of filenameforall match the Unix version

The Unix version of filenameforall starts in the current working directory
when no directory is specified.

When the pattern length exceeds the available string we should return a
rangecheck error, not an empty string.

When the filename exceeds the available string we should return a
rangecheck error, not a truncated string.

CLUSTER_UNTESTED

gs/base/gp_ntfs.c


2013-08-19 15:06:12 +0100
Ken Sharp <ken.sharp@artifex.com>
d6921b5c5ab2af44c48e0084e4a31bcd7512f183

Allow use of '\\' for filenameforall and friends on Windows

The commit to allow recursive directory enumeration f13bfba removed the
code which translated '\\' into '\', which could lead to incorrect filenames
being returned.

This fix restores that functionality, but we still think everyone would be
better advised to use the PostScript '/' separator instead, which works as
well as '\' does.

CLUSTER_UNTESTED

gs/base/gp_ntfs.c


2013-08-18 21:05:00 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
613554e16d315c8db89653775c1fdcf682f238fe

Add quotes around values for a conditional for VS build.

CLUSTER_UNTESTED

main/pcl6_msvc.mak


2013-08-16 14:00:43 +0100
Ken Sharp <ken.sharp@artifex.com>
7d93cf893d1d2fac826e3c5f81ea92123425216e

Address gp_wgetv not finding *any* environment variables unless compiled with GS_NO_UTF8

The string being passed in as the 'name' was a regular 1 byte C char array.
But _wgetenv expects to be given a wide character string to find and
treats the argument as such. This mean environment variables never matched.

This commit mimics the code for the registry variables, and converts the
name to a wchar before passing to _wgetenv.

CLUSTER_UNTESTED

gs/base/gp_wgetv.c


2013-08-02 09:32:00 +0100
Chris Liddell <chris.liddell@artifex.com>
ae09189f11f59c2d350cca820c880cd48a0657d0

Fix a couple of very minor UFST build issues.

Automatically drop the default Truetype fonts if we're integrating the UFST
(with it's attendant MT fonts).

No cluster differences.

main/pcl6_gcc.mak
main/pcl6_msvc.mak


2013-08-16 12:47:36 +0100
Chris Liddell <chris.liddell@artifex.com>
e67e098fa0b5bf7570453c15ccc98fabf1e561dc

Fix GS_NO_UTF8 build problem with gs_sprintf.

CLUSTER_UNTESTED

gs/base/gp_wgetv.c


2013-08-16 07:58:57 +0100
Ken Sharp <ken.sharp@artifex.com>
774231a7db63439c72313050a750b219491c172f

PS Interpreter - yet more meddling with VM allocation and setpagedevice

Bug #694525 "GSView 5.0 does not work with GPL Ghostscript 9.08"

Rather horrifyingly GSView uses undocumented internal operations of
Ghostscript. In this case the changes to VM allocation mode during setpagedevice
were being circumvented.

This commit changes the way we detect a setpagedevice during startup, previously
we check that the dictionary contained one key called /.LockSafetyParams
and if so assumed that this meant we were in startup, so we set the VM
allocation mode to global for the benefit of Display PostScxript.

GSView ended up triggering that test, which caused a VM allocation error.

We now look for the key /.LockSafetyParamsGlobal instead. If this is present
we set the VM allocation mode to global and *replace* the key with
/.LockSafetyParams instead. This allows accurate detection of the startup
condition.

No differences expected, GSView 5 seems to work and the original bug still
is fixed.

gs/Resource/Init/gs_init.ps
gs/Resource/Init/gs_setpd.ps


2013-08-15 19:56:59 +0100
Chris Liddell <chris.liddell@artifex.com>
4be79a96fe22c988cc4d9edfedac75e6f46e15fa

Bump version number.

The usual cluster differences.

gs/Resource/Init/gs_init.ps
gs/base/version.mak


2013-08-15 16:53:17 +0100
Robin Watts <robin.watts@artifex.com>
43e4db79a40b2ac73eac2bf3732f2e2dcc122d12

Update special antidropout downscaler code.

In hunting for bug 694451, it looked like the problem was in the
special antidropout downscaler for a while, but this turned out
not to be the culprit.

Nonetheless, the code had not been updated to take advantage of the
'Active' region optimisations, so we do that here.

gs/base/sidscale.c


2013-08-15 16:09:24 +0100
Chris Liddell <chris.liddell@artifex.com>
f86ac4209753ea0e9e06a9f4c22a19a8447b5fb5

Some chenges fed back from customer #661 and.....

some function naming tidy ups I've been meaning to do for some time.

The changes from #661 make the code a bit more flexible for different
configurations of the font rendering library.

No cluster differences.

gs/base/fapi_ft.c
gs/base/fapiufst.c


2013-08-15 09:06:30 +0100
Ken Sharp <ken.sharp@artifex.com>
6ba5abfa7325ae980bba37fdc71582eeca152a87

update caption.ps so that it does not mark the page on device deactivation

Bug #694517 "additional page with caption.ps"

The EndPage procedure in caption.ps marks the page in the file with the
defined caption regadless of the reason code for the EndPage. This means
that it marks the page even on device deactivation.

Since commit 3894e9c8a3ab125c82048da3bf81515500bb2da0 pdfwrite will emit
pages that are marked, even if no showpage is executed (this is to match
observed Acrobat Distiller behaviour) and this means that an extra 'blank'
page is emitted on device deactivation.

This commit simply modifies caption.ps so that it only writes the caption
if the reason for calling EndPage is *not* device deactivatyion.

gs/lib/caption.ps


2013-07-31 07:45:02 +0100
Chris Liddell <chris.liddell@artifex.com>
a65df0454d1a8de06d2d342100408482c9ec101b

Bring master up to date with 9.08 release branch.

Change product string for release candidate.

No unexpected cluster differences.

Update version and product strings for release candidate.

Update news and history for 9.08 release.

Update release date for 9.08 release.

gs/base/gscdef.c
gs/base/version.mak
gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/WhatIsGS.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/doc/thirdparty.htm
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1
gs/psi/winint.mak


2013-08-14 16:42:49 +0100
Robin Watts <robin.watts@artifex.com>
c07d6c816052686d29efdee5e94567066baaf75a

Remove stray cluster products.

These should never have been committed.

clustercmd
clusterdatestamp


2013-08-14 08:59:31 +0100
Ken Sharp <ken.sharp@artifex.com>
2c369110313fda917820faf3657dee55158b538b

PS Interpreter - populate the /OutputDevice resource

Bug #689500 "/OutputDevice category is empty"

This commit uses the devices built into the executable to populate the
/OutputDevice resource. The bug thread suggests using devicedict but we
can't do that in gs_res.ps because it isn't set up until later. So we
duplicate the code used to populate devicedict.

According to the PLRM the only required member of the OutputDevice resource
instance is the PageSize, I've chosen to copy the same values as Adobe Acrobat
Distiller, but these can be changed if this proves to be a limitation.

Two additional changes were required, exposed by the Quality Logic test file
09-59.ps

In gdevdevn.c devn_get_params() it is possible for the function to be called
with pequiv_colors set to NULL, this caused a seg fault. Modified the code
so that it doesn't attempt to dereference a NULL pointer.

The file 09-59.ps uses setpagedevice to set each possible instance of the
OutputDevice resources, this can cause problems with some devices as it
doesn't actually send a file. In particular with the mswinpr2 device on
Windows, but it also caused errors on Linux. Since this is a CET file,
gs_cet.ps was modified to delete the OutputDevice resource category and
create a new empty one.

Expected Differences
430-01.ps enumerates all the entries in /OutputDevice and so has a *lot*
more data to print.

gs/Resource/Init/gs_cet.ps
gs/Resource/Init/gs_res.ps
gs/base/gdevdevn.c


2013-08-13 00:04:57 -0700
Michael Vrhel <michael.vrhel@artifex.com>
b89761f06d297f8555f346e9c0a7850fc549c668

Fix for problem with double application of alpha when composing isolated groups.

gs/base/gxblend1.c


2013-08-13 13:48:52 -0700
Ray Johnston <ray.johnston@artifex.com>
6c7d9d1191ed4afad16f7bc4089a43bb18190a96

Fix bug 694514. Don't use clist HL images in pattern-clist when interpolated.

Since patterns that are put in the clist are large, interpolating multiple
times for every band intersected by the pattern can kill performance.

clustercmd
clusterdatestamp
gs/base/gxclimag.c
gs/base/lib.mak


2013-08-13 15:30:55 +0100
Chris Liddell <chris.liddell@artifex.com>
d7c310e59953aacdeb642ce202c0911071a80d31

Bug 694513: force chars to signed on AIX with Luratech

The Lutatech JBIG2 decoder requires signed chars, so add the requisit flags for
for the Luratech build to ensure that happens.

No cluster differences.

gs/configure.ac


2013-08-09 17:02:40 -0700
Ray Johnston <ray.johnston@artifex.com>
e9f0f0eb05ee0abea13deabab6617d20e1913e83

Fix bug 694455. Incorrect CTM when rendering SMasks.

The clippath was incorrect due to the CTM. As specified in 7.5.4 of the PDF spec:

The mask's coordinate system is defined by concatenating the transformation
matrix specified by the Matrix entry in the transparency group's form dictionary
(see Section 4.9.1, "Form Dictionaries") with the current transformation matrix
at the moment the soft mask is established in the graphics state with the gs
operator.

This fixes the customer's file and also results in a progression on
comparefiles/Bug693681.pdf where extra data was previously showing.

gs/Resource/Init/pdf_draw.ps


2013-08-09 16:00:23 +0100
Ken Sharp <ken.sharp@artifex.com>
e72c03d49e6c0e107afa32b5b2b8a6cf9d43b663

PDF Interpreter - undo commit 946f63b5748a5a19c369a1d42e653c69cd57075e

Marcos wants to have files produce an error, so we don't run them in a
stopped context any more.

In fact it appears that later work means none of these files exit the
interpreter on error any more, they do produce PostScript error messages
though.

1305_-_crypt_filter_length_ignored.pdf.pdf
1479_-_does_not_render.pdf
1931_-_crypt_version_5_revision_6.pdf
692248_-_recursive_ObjStm_ref.pdf
692248_-_wrong_ObjStm_ref.pdf.pdf
694313_-_double-free_during_reparation_fails_.pdf
694313_-_empty_xref.pdf
Adobe_LiveCycle_DRM_protection_sample_Adobe.APS_-_adbe.pdrl.v0_fails_.pdf
MSVR_176_-_missing_range_check_in_pdf_repair_fails_.pdf
MSVR_201_-_missing_CIDSystemInfo.pdf
annotations_without_font.pdf
double_indirect_reference.pdf
huge_cmap_values.pdf
recursive_indirect_reference.pdf
recursive_outline.pdf
repairing_leaks_object.pdf
x_-_SumatraPDF1.1DOS.pdf


all now produce errors again

gs/Resource/Init/pdf_main.ps


2013-08-09 15:15:53 +0100
Chris Liddell <chris.liddell@artifex.com>
44800428c346804af98b1d9b2e86b6d8e61b858b

Delete the ._.DS_Store .DS_Store files.....

which cause problems decompressing release archives on OS X.

gs/lcms2/Projects/mac/.DS_Store
gs/lcms2/Projects/mac/._.DS_Store


2013-08-09 13:50:19 +0100
Ken Sharp <ken.sharp@artifex.com>
010e9990d734a8a2361663338b1fbd605d0ca052

PDF interpreter and pdfwrite - better handling of Outlines and Dests

Bug #690253 "'pdfmark destination page' error while splitting a PDF: confusing output and invalid links."

Several parts to this, we had already removed the 'ERROR' from the message
emitted when a DEST or OUT pdfmark pointed to a page outside the valid range.

This commit makes pdfmark produce an error when an Outline has an invalid
range (DEST laready did). We also wrap pdfmark invocations in 'stopped' so
that we can trap the error. This allows us to elide Links and Outlines to
invalid pages (previously the links remained, but did nothing useful).

Since the bug was raised, we now also use the '%d' syntax to split PDF
files. This would still produce invalid links, because the page number
would not be invalid.

We now check the OutputFile when opening a PDF file, and if it contains
'%d' we set a couple of flags which will skip Outline and Dest link creation
as these would never be correct.

gs/Resource/Init/pdf_main.ps
gs/devices/vector/gdevpdfm.c


2013-08-08 08:50:23 +0100
Ken Sharp <ken.sharp@artifex.com>
a850d6c6d14f3a40bb8d40e471bf4822ead8580d

PDF Interpreter - update to 073f460af5bb37edb1849c5d6235048598100437

Bug #694508 "Regression: error writing PDF file starting with
72b397ecb4f5be3fdbf6da4a90a306d259ec3e93"

The commit 073f460af5bb37edb1849c5d6235048598100437 had an error in the
handling of named actions, which I didn't previously have a test case for.
NB the commit in the bug title is incorrect, I'm not clear on why Marcos
thought this was the commit which introduced the error.

This commit fixes that and allows me to test the named actions, which now
work correctly.

gs/Resource/Init/pdf_main.ps


2013-08-07 13:18:16 +0100
Ken Sharp <ken.sharp@artifex.com>
073f460af5bb37edb1849c5d6235048598100437

PDF interpreter - improve handling of pdfmarks when we have multiple input files

Bug #688542 "Bookmarks Get Lost In PDF"
Bug #688829 "Merging PDF files using gs: outlines and links not updated"

The pdfmarks generated by the PDF interpreter for Outlines and Links use the
page number relative to the start of the current input file. For single
input files this works fine, but when we have multiple input files, we end
up with outlines and links pointing to the wrong place.

To resolve this we need to know, at the start of any PDF file, how many pages
have already been processed, and then we will add this value to the nominal
page number when creating the pdfmarks.

Hin-Tak provided a solution (#688829) that used globaldict, which Alex rejected
for that reason. This commit executes currentpagedevice at the start of every
PDF input file, and stores in in /CumulativePageCount. We can then use this
to generate pdfmarks which are correct.

Even if PDF and PostScript input files are mingled, the PDF-generated pdfmarks
will still be correct.

We won't make any attempt to correct PostScript input, if you are creating a
PostScript program, you should get it right. If you really must merge, then
use pdfwrite to create the individual PDF files, and then merge those.

It is possible that other types of generated pdfmark will need similar
alteration, we'll tackle those as they turn up.

gs/Resource/Init/pdf_main.ps


2013-08-05 17:42:53 +0100
Ken Sharp <ken.sharp@artifex.com>
22e66c90bf173e4787717137a25833b4aa823993

PDF interpreter - increased checking of Outlines, to avoid errors

Bug #694503 "Regression: output pdf file blank starting with 0c8150ab6b2b8ceaa17cc1b1933d523764ffe114"

After attempting to recover from broken objects, it was possible to
throw an error when processing Outlines, because the recovered object
was of the wrong type. This could cause PDF files with broken /Outlines to
fail with pdfwrite, where previously they would write a file, but drop the
/Outlines. (this only occurs wiht pdfwrite, because we ignore Outlines
when rendering)

This commit restores the previous behaviour by checking the type of the returned
object.

gs/Resource/Init/pdf_main.ps


2013-08-05 13:46:02 +0100
Ken Sharp <ken.sharp@artifex.com>
72b397ecb4f5be3fdbf6da4a90a306d259ec3e93

PDF interpreter run .reusablestreamdecode in 'stopped' to handle errors

Bug #694437 " Infinitely many warnings: **** File has unbalanced q/Q operators (too many Q's) ****"

The infinite recursion is due to not updating the current file position, and
rerunning the same code, which results in the same error.

To handle this we wrap the exeuction of reusablestreamdecode in a 'stopped'
context, so that we cna capture the error, and move the file pointer as
required. The job still throws warnings, but the resulting PDF is the same
as displayed by Acrobat with the original file.

gs/Resource/Init/pdf_draw.ps


2013-08-02 22:26:09 +0100
Chris Liddell <chris.liddell@artifex.com>
dc77b50bdb6abe88446dc7cdb9d7bd77a90dbfea

Bug 694502: reverse of dictomark for PDFs

The order with which the key/value pairs in a <<>> (apparently) differs between
Postscript and PDF. Postscript pushes the objects onto the stack, then pops
them in pairs, so the order is reversed compared to the order they were
encountered. PDF handles them in the order they were encountered.

This is, of course, only a problem when there are duplicate keys.

Thus in PS "<< /a 1 /a 2>>" the key "/a" ends up with the value "1". In PDF, "/a" gets
the value "2".

No cluster differences.

gs/psi/int.mak
gs/psi/zdict.c


2013-08-02 16:51:33 +0100
Ken Sharp <ken.sharp@artifex.com>
d22c7a5b454ca8e021eb6b71c87627bfb8546edb

Improve use of stopped to guard against PDF interpreter exit

Improvements to commit 946f63b5748a5a19c369a1d42e653c69cd57075e:

1) Add an error message so that the file does not silently fail to process.

2) Check PDFSTOPONERROR and do not run in a stopped context if this is set.

gs/Resource/Init/pdf_main.ps


2013-08-02 15:13:18 +0100
Ken Sharp <ken.sharp@artifex.com>
946f63b5748a5a19c369a1d42e653c69cd57075e

run PDF files totally in a stopped context to prevent interpreter exit on error

What it sys on the tin..... Several recent bug reports cause the interpreter
to exit if it provokes a PostScript error. Running the PDF file in a stopped
context prevents that from happening.

Bug #694472, but many others up to #694449 are affected similarly.

gs/Resource/Init/pdf_main.ps


2013-08-02 11:15:09 +0100
Ken Sharp <ken.sharp@artifex.com>
709c87fb7837993cb96eaa508c66381c1696ebdf

add extra error checking of the Trailer dictionary

Bug #694474 the file is badly damaged, and Acrobat won't open it. The only
problem from our perspective is that the error generated causes the
interpreter to exit (because there is no Trailer dict). Added more checks
before use to ensure we don't generate errors with missing (empty) trailer
dictionaries.

A number of other files no longer cause errors when run with the cluster.

gs/Resource/Init/pdf_main.ps
gs/Resource/Init/pdf_rbld.ps


2013-08-02 09:39:17 +0100
Ken Sharp <ken.sharp@artifex.com>
0c8150ab6b2b8ceaa17cc1b1933d523764ffe114

Attempt to handle broken object definitions (garbage on stack)

If we have certain kinds of broken object definitions we can end up with
more than one object on the stack when we encounter an endobj (or a new
object definition before encountering an endobj for the previous object).
Previously we would throw an error and ignore the object (define it as null)
now we attempt to recover by removing objects from the stack until we have
a stack of the form 'n n object' where the 'n' represents an integer.

The bug #694443 now runs to completion although the output is empty. Given
how badly broken this file is I don't propose to do any more with it.

gs/Resource/Init/pdf_base.ps


2013-07-31 15:09:47 +0100
Ken Sharp <ken.sharp@artifex.com>
2667fbaa1c6c5ba84acc04ccc5b7b97723c09ad1

PDF interpreter - remove lower limit on PDF files, improve broken file handling

At some time in the past we set a lower limit of 400 bytes for PDF files,
regarding anything less as invalid. While this may or may not be true, it
prevents us repairing broken files that small. Removed the limit.

When repairing a broken xref, we attempt to use the last startxref to find
the tgrailer dictionary. If the startxref is followed by anything other than
an integer we should ignore it.

These both arise from Bug #694443 "/undefined in xref". The bug is not fixed
because the file exhibits still more faults.

Expected differences:
The files 694317_-_minimal.pdf, broken_EOF_object_overwrites_good_object,
missing_endobj_swallows_following_obj and missing_page_tree.pdf no longer
produce errors.

gs/Resource/Init/pdf_main.ps
gs/Resource/Init/pdf_rbld.ps


2013-07-31 07:41:57 +0100
Chris Liddell <chris.liddell@artifex.com>
91a5d41eb1fea65adb1110ffa2a3b769263b7635

Bump version for pending release.

No unexpected cluster differences

gs/Resource/Init/gs_init.ps
gs/base/version.mak


2013-08-21 14:15:15 +0100
Chris Liddell <chris.liddell@artifex.com>
952b06580b96045a6b052af9a1842d9f770ccd1b

Update product string, dates and changelog for 9.09 release.

gs/base/gscdef.c
gs/base/version.mak
gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/WhatIsGS.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/doc/thirdparty.htm
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1


2013-08-20 10:21:09 +0100
Chris Liddell <chris.liddell@artifex.com>
ba1dedf24849295e107df180a291eba99bb33531

Ensure we don't overflow the filename buffer.

No cluster differences.

gs/base/gp_unifs.c


2013-08-20 10:23:02 +0100
Ken Sharp <ken.sharp@artifex.com>
36088d57f45958b3647b21f5ee3908377f113682

Make the Windows implementation of filenameforall match the Unix version

The Unix version of filenameforall starts in the current working directory
when no directory is specified.

When the pattern length exceeds the available string we should return a
rangecheck error, not an empty string.

When the filename exceeds the available string we should return a
rangecheck error, not a truncated string.

CLUSTER_UNTESTED

gs/base/gp_ntfs.c


2013-08-19 15:06:12 +0100
Ken Sharp <ken.sharp@artifex.com>
167ca10abb0a90c4a28a381223afd6fb80347282

Allow use of '\\' for filenameforall and friends on Windows

The commit to allow recursive directory enumeration f13bfba removed the
code which translated '\\' into '\', which could lead to incorrect filenames
being returned.

This fix restores that functionality, but we still think everyone would be
better advised to use the PostScript '/' separator instead, which works as
well as '\' does.

CLUSTER_UNTESTED

gs/base/gp_ntfs.c


2013-08-16 10:35:58 +0100
Chris Liddell <chris.liddell@artifex.com>
36c5b40dd44d7ef8de4aeba40c5d6c817882b594

update docs, version numbers, dates and product string

gs/Resource/Init/gs_init.ps
gs/base/version.mak
gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/WhatIsGS.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/doc/thirdparty.htm
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1


2013-08-16 10:26:47 +0100
Chris Liddell <chris.liddell@artifex.com>
e1c028424f6900412241c076f11f4d9f2409cdb0

Set product string for release candidate 1

gs/base/gscdef.c


2013-08-16 14:00:43 +0100
Ken Sharp <ken.sharp@artifex.com>
397abe5622f0a1a9963617fbf1509015563be6fc

Address gp_wgetv not finding *any* environment variables unless compiled with GS_NO_UTF8

The string being passed in as the 'name' was a regular 1 byte C char array.
But _wgetenv expects to be given a wide character string to find and
treats the argument as such. This mean environment variables never matched.

This commit mimics the code for the registry variables, and converts the
name to a wchar before passing to _wgetenv.

CLUSTER_UNTESTED

gs/base/gp_wgetv.c


2013-08-16 12:47:36 +0100
Chris Liddell <chris.liddell@artifex.com>
8b5a86bad386569f921d0322bf113fa82b3d4529

Fix GS_NO_UTF8 build problem with gs_sprintf.

CLUSTER_UNTESTED

gs/base/gp_wgetv.c


2013-08-16 07:58:57 +0100
Ken Sharp <ken.sharp@artifex.com>
182beda4d5199210c4c796c8c501e6e4bb5aa2de

PS Interpreter - yet more meddling with VM allocation and setpagedevice

Bug #694525 "GSView 5.0 does not work with GPL Ghostscript 9.08"

Rather horrifyingly GSView uses undocumented internal operations of
Ghostscript. In this case the changes to VM allocation mode during setpagedevice
were being circumvented.

This commit changes the way we detect a setpagedevice during startup, previously
we check that the dictionary contained one key called /.LockSafetyParams
and if so assumed that this meant we were in startup, so we set the VM
allocation mode to global for the benefit of Display PostScxript.

GSView ended up triggering that test, which caused a VM allocation error.

We now look for the key /.LockSafetyParamsGlobal instead. If this is present
we set the VM allocation mode to global and *replace* the key with
/.LockSafetyParams instead. This allows accurate detection of the startup
condition.

No differences expected, GSView 5 seems to work and the original bug still
is fixed.

gs/Resource/Init/gs_init.ps
gs/Resource/Init/gs_setpd.ps


2013-08-15 12:23:23 +0100
Robin Watts <robin.watts@artifex.com>
dde6d480e632eefbe5ccd42bc52b456582514a2a

Bug 694451: Solve problems with interpolated landscape images.

The portrait image code accumulates pixels into scanlines, and then
plots the whole scanline at once. The landscape image code follows
this lead by accumulating pixels into 'scancolumns' and then plots
the whole column at once.

Unfortunately this accumulation for columns goes wrong in the case
where we are working at < 8 bpp (as the transposition of rows to
columns fails). This causes images with runs of identical pixels in
to be 'squished' vertically.

We work around this here in the < 8 bpp case by repeating the writes
of each pixel so whole bytes are filled. This is suboptimal, but
doing anything else is tricky with the macros the way they are.

gs/base/gxiscale.c


2013-08-14 14:43:00 +0100
Chris Liddell <chris.liddell@artifex.com>
951be31dd84da8f355bfada103ce7e62d5e8c3b2

Update release date for 9.08 release.

gs/base/gscdef.c
gs/base/version.mak
gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/WhatIsGS.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/doc/thirdparty.htm
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1


2013-08-09 15:15:53 +0100
Chris Liddell <chris.liddell@artifex.com>
d3d413364f81c379754b7738c58bb7b74b7ed3c4

Delete the ._.DS_Store .DS_Store files.....

which cause problems decompressing release archives on OS X.

gs/lcms2/Projects/mac/.DS_Store
gs/lcms2/Projects/mac/._.DS_Store


2013-08-09 09:10:37 +0100
Chris Liddell <chris.liddell@artifex.com>
e656ce0949b0e8cb8bebc22c820b279b9c2eefa0

Update news and history for 9.08 release.

gs/doc/History9.htm
gs/doc/News.htm


2013-08-08 14:53:48 +0100
Chris Liddell <chris.liddell@artifex.com>
80d7e88123fe9df85cdaeb345c133e3043ddda15

Update version and product strings for release candidate.

gs/base/version.mak
gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/WhatIsGS.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/doc/thirdparty.htm
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1
gs/psi/winint.mak


2013-07-31 07:45:02 +0100
Chris Liddell <chris.liddell@artifex.com>
b836761d02ca5829e9ff3f5a64437c3bf29b10db

Change product string for release candidate.

No unexpected cluster differences.

gs/base/gscdef.c


2013-08-20 10:21:09 +0100
Chris Liddell <chris.liddell@artifex.com>
ba1dedf24849295e107df180a291eba99bb33531

Ensure we don't overflow the filename buffer.

No cluster differences.

gs/base/gp_unifs.c


2013-08-20 10:23:02 +0100
Ken Sharp <ken.sharp@artifex.com>
36088d57f45958b3647b21f5ee3908377f113682

Make the Windows implementation of filenameforall match the Unix version

The Unix version of filenameforall starts in the current working directory
when no directory is specified.

When the pattern length exceeds the available string we should return a
rangecheck error, not an empty string.

When the filename exceeds the available string we should return a
rangecheck error, not a truncated string.

CLUSTER_UNTESTED

gs/base/gp_ntfs.c


2013-08-19 15:06:12 +0100
Ken Sharp <ken.sharp@artifex.com>
167ca10abb0a90c4a28a381223afd6fb80347282

Allow use of '\\' for filenameforall and friends on Windows

The commit to allow recursive directory enumeration f13bfba removed the
code which translated '\\' into '\', which could lead to incorrect filenames
being returned.

This fix restores that functionality, but we still think everyone would be
better advised to use the PostScript '/' separator instead, which works as
well as '\' does.

CLUSTER_UNTESTED

gs/base/gp_ntfs.c


2013-08-08 14:53:48 +0100
Chris Liddell <chris.liddell@artifex.com>
80d7e88123fe9df85cdaeb345c133e3043ddda15

Update version and product strings for release candidate.

gs/base/version.mak
gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/WhatIsGS.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/doc/thirdparty.htm
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1
gs/psi/winint.mak


2013-07-31 07:45:02 +0100
Chris Liddell <chris.liddell@artifex.com>
b836761d02ca5829e9ff3f5a64437c3bf29b10db

Change product string for release candidate.

No unexpected cluster differences.

gs/base/gscdef.c


2013-07-31 07:38:05 +0100
Chris Liddell <chris.liddell@artifex.com>
5f71fefc4425c86e682a58c6f692f99978fafdb8

Remove reference to cups/gstopxl from configure.ac

No cluster differences

gs/configure.ac


2013-07-30 17:53:00 +0100
Chris Liddell <chris.liddell@artifex.com>
2db3d0bc1d7bc9e223ac0bcf79c28c234eb906cd

Tidy some MSVC build issues:

Remove spurious explicit "/DDEBUG" directive when linking genarch.exe.

Set debug options for "aux tools" when doing a debug build.

Fix MSVC "clean" target to handle "aux" directory. We weren't deleting all
the files.

CLUSTER_UNTESTED

gs/base/msvccmd.mak
gs/base/msvclib.mak
gs/base/msvctail.mak
gs/base/winlib.mak


2013-07-30 20:40:22 +0200
Till Kamppeter <till.kamppeter@gmail.com>
1c22d3214dff6fedd7b8aaba092dd52eb3b415fd

Merge branch 'master' of ghostscript.com:/home/git/ghostpdl


2013-07-30 11:48:07 -0600
Henry Stiles <henry.stiles@artifex.com>
216b2692178e1113ab7252bf700cd980f5939a89

Fix 694434, fix incorrect parsing of corrupt file.

Invalid PJL was not properly ignored upon parsing.

pl/pjparse.c


2013-07-30 20:29:01 +0200
Till Kamppeter <till.kamppeter@gmail.com>
9304a21699a6c17579fae32f44f5c92a37c13e2d

Moved CUPS filters gstoraster and gstopxl to cups-filters

As Ghostscript's CUPS filters gstoraster and gstopxl need changes to
allow PPD-less printing on IPP printers and these changes introduce
a new dependency on the libcupsfilters library of the cups-filters
project, we have moved these filters to cups-filters now.

In addition, the pdftoraster filter for Poppler-based conversion
of PDF input to CUPS Raster is also not part of Poppler but part
of cups-filters. So we get a more symmetric distribution.

Also maintenance of the filters will get easier this way, especially
duplicate code can move into libcupsfilters.

cups-filters is a free software package hosted by OpenPrinting and it
contains all CUPS filters needed by CUPS under Linux and additional
utilities for CUPS. The filters are not part of the CUPS project at
Apple any more since CUPS 1.6.x.

See
http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters

gs/Makefile.in
gs/configure.ac
gs/cups/colord.c
gs/cups/colord.h
gs/cups/cups.mak
gs/cups/gstopxl.in
gs/cups/gstoraster.c
gs/cups/gstoraster.convs
gs/cups/pxlcolor.ppd
gs/cups/pxlmono.ppd


2013-07-30 10:05:49 +0100
Chris Liddell <chris.liddell@artifex.com>
91d104f9800b8e8e655a5cc1895b626ad57e40e5

Remove debug statement.....

.....left in by mistake.

CLUSTER_UNTESTED

gs/psi/msvc.mak


2013-07-29 23:56:56 -0700
Michael Vrhel <michael.vrhel@artifex.com>
e736e0a6730ee7e047bfd1ad701055eec6dffe85

Fix for Bug 694439. We were not checking the code when we had invalid proc

During the creation of a DeviceN colorspace we were not following up with
an error condition.

gs/psi/zcolor.c


2013-07-29 13:34:17 -0700
Ray Johnston <ray.johnston@artifex.com>
5e303dc64dbe55a5ce42e766e5d6a9753a9d387d

Fix Windows sscanf %p incompatibility with Trio sprintf.

Windows is internally consistent, but writes %p as 8 or 16 hex chars
and it's sscanf expects that format. Trio follows the linux style of
%p which has a leading "0x" followed by the characters. Reading an
address from a string is required for memfile_fopen and memfile_unlink
which are changed to use gs_sscanf which is added to gssprintf.*

gs/base/gssprintf.c
gs/base/gssprintf.h
gs/base/gxclmem.c
gs/base/lib.mak


2013-07-29 13:28:09 -0700
Ray Johnston <ray.johnston@artifex.com>
51309bce92631066e36f117a2e012e05877d6b76

Remove unused local declaration of a dev_spec_op.

gs/devices/gdevplib.c


2013-07-17 14:29:28 +0100
Chris Liddell <chris.liddell@artifex.com>
ebc7505be6340baa73b9c281ef6c593305be3aac

Changes to allow building gs for WinRT/ARM

The contents of the windows-arm-msvc.h file may need modified.

No cluster differences.

gs/arch/windows-arm-msvc.h
gs/base/lib.mak
gs/base/msvccmd.mak
gs/base/msvctail.mak
gs/base/winlib.mak
gs/base/winplat.mak
gs/base/winrtsup.cpp
gs/ghostscript_rt.vcxproj
gs/openjpeg/libopenjpeg/opj_includes.h
gs/psi/gsdllARM32metro.def
gs/psi/msvc.mak


2013-07-25 18:44:48 +0100
Robin Watts <robin.watts@artifex.com>
eddf4893e0e31b1801298eca37d68cd308408283

Push optimisations back into lcms2.

They don't work as well as a plugin factory. I am discussing why this
is the case with Marti.

gs/base/gsicc_lcms2.c
gs/base/lcms2.mak
gs/base/lib.mak
gs/ghostscript.vcproj
gs/lcms2/include/lcms2_extras.h
gs/lcms2/src/cmsxform.c
gs/lcms2/src/extra_xforms.c


2013-07-25 18:30:06 +0100
Robin Watts <robin.watts@artifex.com>
2c2bae08a0a4ec697e95f1732db1246a9fd3401a

Enable our optimisations for lcms2 as a transform factory.

Not all enabled as there seem to be some problems. Talking to
Marti about this now.

gs/base/gsicc_lcms2.c
gs/base/lib.mak
gs/lcms2/src/extra_xform.h
gs/lcms2/src/extra_xforms.c


2013-07-25 11:27:20 +0100
Ken Sharp <ken.sharp@artifex.com>
6ddaa1b971f4d6f96bd57d82484399df82035d9a

pdfwrite - new colour code

We were not using the converted colours for certain spaces, because we were
modifying the 'paint' values, instead of the drawing colour values.

gs/devices/vector/gdevpdfg.c


2013-07-18 15:03:56 +0100
Robin Watts <robin.watts@artifex.com>
b1e63d6e5776c700bf01cb5c1038e8f0b57d29ca

Import LCMS 2.5

Move our optimisations out into an 'extras' plugin, disabled for now.

gs/base/gsicc_lcms2.c
gs/base/lcms2.mak
gs/ghostscript.vcproj
gs/lcms2/AUTHORS
gs/lcms2/ChangeLog
gs/lcms2/Makefile.am
gs/lcms2/Makefile.in
gs/lcms2/NEWS
gs/lcms2/Projects/.gitignore
gs/lcms2/Projects/VC2010/jpegicc/jpegicc.vcxproj
gs/lcms2/Projects/VC2010/lcms2.rc
gs/lcms2/Projects/VC2010/lcms2.sln
gs/lcms2/Projects/VC2010/lcms2_DLL/lcms2_DLL.vcxproj
gs/lcms2/Projects/VC2010/lcms2_static/lcms2_static.vcxproj
gs/lcms2/Projects/VC2010/linkicc/linkicc.vcxproj
gs/lcms2/Projects/VC2010/psicc/psicc.vcxproj
gs/lcms2/Projects/VC2010/testbed/testbed.vcxproj
gs/lcms2/Projects/VC2010/tiffdiff/tiffdiff.vcxproj
gs/lcms2/Projects/VC2010/tifficc/tifficc.vcxproj
gs/lcms2/Projects/VC2010/transicc/transicc.vcxproj
gs/lcms2/aclocal.m4
gs/lcms2/configure
gs/lcms2/configure.ac
gs/lcms2/doc/LittleCMS2.4 API.pdf
gs/lcms2/doc/LittleCMS2.4 Plugin API.pdf
gs/lcms2/doc/LittleCMS2.4 tutorial.pdf
gs/lcms2/doc/LittleCMS2.5 API.pdf
gs/lcms2/doc/LittleCMS2.5 Plugin API.pdf
gs/lcms2/doc/LittleCMS2.5 tutorial.pdf
gs/lcms2/include/Makefile.in
gs/lcms2/include/lcms2.h
gs/lcms2/include/lcms2_extras.h
gs/lcms2/src/Makefile.in
gs/lcms2/src/cmscam02.c
gs/lcms2/src/cmscgats.c
gs/lcms2/src/cmscnvrt.c
gs/lcms2/src/cmserr.c
gs/lcms2/src/cmsgamma.c
gs/lcms2/src/cmsgmt.c
gs/lcms2/src/cmsintrp.c
gs/lcms2/src/cmsio0.c
gs/lcms2/src/cmsio1.c
gs/lcms2/src/cmslut.c
gs/lcms2/src/cmsmd5.c
gs/lcms2/src/cmsmtrx.c
gs/lcms2/src/cmsnamed.c
gs/lcms2/src/cmsopt.c
gs/lcms2/src/cmspack.c
gs/lcms2/src/cmspcs.c
gs/lcms2/src/cmsplugin.c
gs/lcms2/src/cmsps2.c
gs/lcms2/src/cmssamp.c
gs/lcms2/src/cmssm.c
gs/lcms2/src/cmstypes.c
gs/lcms2/src/cmsvirt.c
gs/lcms2/src/cmswtpnt.c
gs/lcms2/src/cmsxform.c
gs/lcms2/src/cmsxform.h
gs/lcms2/src/cmsxform_extras.c
gs/lcms2/src/extra_xform.h
gs/lcms2/src/extra_xforms.c
gs/lcms2/src/lcms2.def
gs/lcms2/src/lcms2_internal.h
gs/lcms2/testbed/Makefile.in
gs/lcms2/testbed/testcms2.c
gs/lcms2/utils/common/vprf.c
gs/lcms2/utils/jpgicc/Makefile.in
gs/lcms2/utils/jpgicc/jpgicc.c
gs/lcms2/utils/linkicc/Makefile.in
gs/lcms2/utils/linkicc/linkicc.c
gs/lcms2/utils/psicc/Makefile.in
gs/lcms2/utils/psicc/psicc.c
gs/lcms2/utils/tificc/Makefile.in
gs/lcms2/utils/tificc/tificc.c
gs/lcms2/utils/transicc/Makefile.in
gs/lcms2/utils/transicc/transicc.c


2013-07-24 13:35:45 +0100
Ken Sharp <ken.sharp@artifex.com>
25a2563e775d849c17885305a4e459a328c2761b

pdfwrite - new colour code, handle 'RGB' same as sRGB for allowed spaces

We were trying to write Shading dictionaries with invalid colour spaces,
this way we degenerate to rectangles which is ugly but works.

gs/devices/vector/gdevpdfg.c


2013-07-23 09:45:02 -0700
Ray Johnston <ray.johnston@artifex.com>
a8384d57fad56058d494616ba196401542a540bc

Fix bug 694423. Segfault in clist image writing at some resolutions.

There was an incorrect check for past the end of the page (obo).

gs/base/gxclimag.c


2013-07-23 14:02:41 +0100
Ken Sharp <ken.sharp@artifex.com>
af38eee8f23f51f74e67cc52d2b72e2dd365bace

pdfwrite - new colour code

Concretize_color doesn't work the way I thought it did. Instead of returning
components in the original base space, it returns components for the current
ProcessColorModel, this has resulted in the removal of several steps.

Modified the code which writes converted base spaces for Separation and
DeviceN spaces, so that the space can be used for images, as well as for
linework.

The code is now no longer crashes when the ColorConversionStrategy is
CMYK.

There are still some oddities with CIE/RGB to CMYK conversion, there are
some problems with CMYK output with type 4 images. Still need to test
Gray and RGB strategies, and redo LeaveColorUnchanged and UseDeviceIndependentCOlor
with the latest changes.

gs/devices/vector/gdevpdfg.c
gs/devices/vector/gdevpdfg.h
gs/devices/vector/gdevpdfi.c


2013-07-22 16:38:22 +0100
Ken Sharp <ken.sharp@artifex.com>
c0d9447b67dcef12d9d321a128985ee77e46fabd

pdfwrite - new colour conversion code, fix Indexed Separation/DeviceN

The previous code for converting the base space of a Separation or DeviceN
space didn't cater for the possibility of a /Indexed space. This code now
does.

In addition we do a better job of identifying when a base space needs
converted, there was similar problem here leading to us converting (eg)
CMYK to CMYK.

There are some oddities with RGB->CMYK conversion that I need to discuss
with Michael.

gs/devices/vector/gdevpdfc.c
gs/devices/vector/gdevpdfg.c
gs/devices/vector/gdevpdfg.h


2013-07-19 13:22:55 -0700
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
9b1a5d0dce3a375ccd4be010d50b3d91929bb982

Fixed a couple of errors in previous commit.

gs/base/gscie.c
gs/base/gxhintn.c


2013-07-19 13:10:48 -0700
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
37aca23d758c3b5cb53da10aaeccd623f625e01a

Remove C++ style comments.

These cause issues with some versions of the AIX C compiler.

gs/base/gscdevn.c
gs/base/gscie.c
gs/base/gxhintn.c
gs/base/sjbig2.c
gs/base/sjpx_openjpeg.c


2013-07-18 09:10:54 -0400
James Cloos <cloos@jhcloos.com>
7f764e594f2f23bac77748693d1c8e886af5b103

Remove MaxBufferedTotal, MaxBufferedArea and MaxBufferedCount

If MaxBitmap is set but MaxBufferedTotal and/or MaxBufferedArea are too small
some documents will fail to display.

X servers and client boxen have much more ram than they did 10–20 years ago;
limiting the size of client-side caches beyond what MaxBitmap supports has
little remaining value.

So deprecate and remove those limits.

Signed-off-by: Henry Stiles henry.stiles@artifex.com

gs/devices/gdevx.c
gs/devices/gdevx.h
gs/devices/gdevxini.c
gs/doc/Use.htm


2013-07-17 21:43:23 +0100
Chris Liddell <chris.liddell@artifex.com>
11dca09b381cac3a85625d7a408ccdf7458b1f9e

Bug 694421: use correct .notdef in CIDType 2 fonts

When cmap table is too short for the CID we're looking for, use the CharStrings
dictionary to get the GID of the .notdef glyph instead of throwing an error.

No cluster differences.

gs/psi/zfapi.c


2013-07-15 23:17:44 +0000
Hin-Tak Leung <hintak@ghostscript.com>
94196ed84e5b8d264522b378972472ad4b54ed90

Silent a "Value not read" compiler warning.

It is true that the value is no longer used after this point,
therefore no need to update further. Though it might be
confusing if its value for its intended meaning is used
again in the future, say, to detect broken input files.
Comment it out for now.

pxl/pxvendor.c


2013-07-15 14:37:10 -0600
Henry Stiles <henry.stiles@artifex.com>
777307f9e2aa4c2d74e96dd9c3f1630677c680a6

Fix 694416, the default DCT color transform was not set up correctly.

The fix was derived directly from MuPDF and is consistent with the
documentation.

gs/base/sdctd.c


2013-07-13 12:27:55 +0100
Chris Liddell <chris.liddell@artifex.com>
9834a3b011070a5565b5dcc536f6c2eace10569c

Changes to allow mingw DLL build

Building the mingw DLL still uses the "so" target.

Also, tidy up and rationalise the way the "so" target works on OS X. It no
longer relies on a special subtarget.

No cluster differences.

gs/Makefile.in
gs/base/unix-dll.mak
gs/base/unixhead.mak
gs/configure.ac


2013-07-14 23:30:50 +0000
Hin-Tak Leung <hintak@ghostscript.com>
37b9962406c99564f6ac16e37540a45cfae5d557

Bug 693661 - implement HP CLJ 3500/3550/3600 emulation

The actual subject of the bug report is
"pcl6 interpreter exited with error code -995".

This patch adds two new files, pxl/pxvendor.{c,h} which implement
HP CLJ 3500/3550/3600 emulation, plus small associated changes
in existing files.

Included and somewhat less related are:

- a small change of pl/plmain.c to not repeat repeated error messages,
- switching some 12-year-old debug code from '|' (experimental)
to '|' (interpreter), to make genuine exp code devel easier.
- a minor bug fix to px_attribute_names in
pxl/pxptable.c reported elsewhere which affects debug messages,
- some stubs in pxl/pxsessio.c and tools/pxldis.py
for HP 1011/1012/1015 emulation.

Where/what those are should be fairly obvious.

No cluster differences.

gs/base/gdevpxat.h
gs/base/gdevpxen.h
pl/plmain.c
pxl/pxl.mak
pxl/pxptable.c
pxl/pxsessio.c
pxl/pxstate.h
pxl/pxvendor.c
pxl/pxvendor.h
tools/pxldis.py


2013-07-12 12:56:50 +0100
Ken Sharp <ken.sharp@artifex.com>
f3fdc7a37f529f0562a4290d3fce4cced2cd4820

PDF interpreter - set colour nad space at the time the relevant operators execute

In the past we have only set the colour space and colour values for stroke
and fill when we actually perform a stroke or fill operation. At the time
the space and colour was set we would simply store the data.

This can cause problems with a sequence like this:

/CS0 cs 0.2 0.1 0 0 scn
q
....
f
Q

q
....
f
Q

Each time we set the colour and space we then restore back to a point
before that space was set. On the next fill we need to set the space again.
If the colour space is an expensive one to set (eg ICCBased) then we waste
a lot of time.

The 'simple' solution is to set the colour space at the time it is set in
the PDF file. However, this also meant setting the colour values at the
time they are set (or we could get space and colour unsynchronised). This
further led to the discovery that the transparency code can set colours in
a different space to the saved space (eg for an SMask). So it was necessary
to have an additional set of routines, one which simply stores the state
and one which stores and sets it to be the current space/colour.

The time taken for the specimen file is reduced from approximately 4.5
minutes to around 3.5 seconds. In addition the file CATX1101.pdf shows a
progression with pdfwrite (gray drop shadow was missing). Because pdfwrite
no longer swaps colour spaces so frequently with text, text is more often
emitted as a single operation, which leads to smaller files (15% smaller
in one case) but does show some very minor (1 pixel) positioning changes
in text.

gs/Resource/Init/pdf_draw.ps
gs/Resource/Init/pdf_ops.ps


2013-06-11 22:49:05 +0200
zeniko <zeniko@gmail.com>
c15166f8be1e1081e5b2beecf46b25f1cbd14d5f

Bug 694125: prevent heap underflow

jbig2_decode_mmr_line checks the arguments to jbig2_set_bits since the
fixes to issue 693050, however these checks still allow for the starting
index to be negative which results in a write underflow; fixes
2860.pdf.asan.9.2069

gs/jbig2dec/jbig2_mmr.c


2013-07-11 08:39:34 +0100
Chris Liddell <chris.liddell@artifex.com>
076ffc56da93051fb14930394b2026e1821f3cb7

Bugs 693828: pull in new URW+ GPL fonts.

Also 693827, 688557, 691909, 690896 and 687297.

Many differences: most files that use the standard font set change. Changes of
note are that in Nimbus L Sans Italic several of the "symbol" glyphs (like
/plus, /plusminus etc) used to be italicised and are now not. This actually
matches the Adobe equivalent font.

Also there are some cases of the /M glyph being narrower than previously, again
this is correct wrt to the Adobe equivalent.

gs/Resource/Font/CenturySchL-Bold
gs/Resource/Font/CenturySchL-BoldItal
gs/Resource/Font/CenturySchL-Ital
gs/Resource/Font/CenturySchL-Roma
gs/Resource/Font/Dingbats
gs/Resource/Font/NimbusMonL-Bold
gs/Resource/Font/NimbusMonL-BoldObli
gs/Resource/Font/NimbusMonL-Regu
gs/Resource/Font/NimbusMonL-ReguObli
gs/Resource/Font/NimbusRomNo9L-Medi
gs/Resource/Font/NimbusRomNo9L-MediItal
gs/Resource/Font/NimbusRomNo9L-Regu
gs/Resource/Font/NimbusRomNo9L-ReguItal
gs/Resource/Font/NimbusSanL-Bold
gs/Resource/Font/NimbusSanL-BoldCond
gs/Resource/Font/NimbusSanL-BoldCondItal
gs/Resource/Font/NimbusSanL-BoldItal
gs/Resource/Font/NimbusSanL-Regu
gs/Resource/Font/NimbusSanL-ReguCond
gs/Resource/Font/NimbusSanL-ReguCondItal
gs/Resource/Font/NimbusSanL-ReguItal
gs/Resource/Font/StandardSymL
gs/Resource/Font/URWBookmanL-DemiBold
gs/Resource/Font/URWBookmanL-DemiBoldItal
gs/Resource/Font/URWBookmanL-Ligh
gs/Resource/Font/URWBookmanL-LighItal
gs/Resource/Font/URWChanceryL-MediItal
gs/Resource/Font/URWGothicL-Book
gs/Resource/Font/URWGothicL-BookObli
gs/Resource/Font/URWGothicL-Demi
gs/Resource/Font/URWGothicL-DemiObli
gs/Resource/Font/URWPalladioL-Bold
gs/Resource/Font/URWPalladioL-BoldItal
gs/Resource/Font/URWPalladioL-Ital
gs/Resource/Font/URWPalladioL-Roma


2013-07-11 08:33:35 +0100
Chris Liddell <chris.liddell@artifex.com>
283427799129175b4b6338e718aca0c26d917a54

Make W/W* "context" survive text operations.

If we have a text operation between a W/W* operator and the path operation that
ends the W/W* context, we end up entering an infinite loop because the W/W*
context prevents us from writing the changes to the graphics state required
to render the text.

To handle this, we now end the W/W* context, and store the dictionary
temporarily while we complete the text operation, then restore W/W* context
after.

It is not clear how this is supposed to interact with the clipping text
rendering modes, but on the basis of solving an infinite loop, I'm committing
this, and will address issues if they arise.

No cluster differences.

gs/Resource/Init/pdf_ops.ps


2013-07-09 10:58:01 +0100
Ken Sharp <ken.sharp@artifex.com>
0903afb23777cfee2cb2a5015990c174e6a54742

pdfwrite - Fix image writing code when converting colour spaces (old CMS code)

Bug #694401 "pdfwrite produces incorrect pdf file"

The command line for this bug specifies -dPDFSETTINGS=/ebook. This sets a
number of parameters, specifically it sets ColorConversionStrategy to sRGB.
The input file contains an image in DeviceGray with 1 bit per component,
the specified colour conversion strategy means we convert this to RGB.

The original image was drawn with a resolution of 200 dpi, which does not
trigger monochrome downsampling in this setup (300 dpi). However when
converted into a colour image it does trigger downsampling as the threshold
for colour images is 72 dpi in this configuration.

The combination of colour conversion and image downsampling seriously
confused the horrific code in pdfwrite, and led to use writing out the wrong
amount of data for the image as well as corrupting the image data as it
passed through the filters.

This patch sorts this out by setting various parameters, and copying/restoring
them as required to initialise the various filters correctly.

For some reason this shows a difference with test file Bug691425.pdf but the
visual appeaance is the same.

gs/devices/vector/gdevpdfi.c


2013-07-09 07:54:37 +0100
Ken Sharp <ken.sharp@artifex.com>
a9f3d46240cda455d8f42feee2350f40fa26e3e7

Fix a benign compiler warning

Check a return code and take appropriate action, this was a pre-existing
fault flagged up when the code changed with the prior commit.

gs/devices/vector/gdevpdtt.c


2013-07-08 08:09:12 -0600
Henry Stiles <henry.stiles@artifex.com>
8accdfa6986e7247103e80b7c12dd6b39ddf8a4c

Remove code supporting obsolete color spaces.

pcl/pccid.c


2013-07-06 21:05:06 -0600
Henry Stiles <henry.stiles@artifex.com>
392041413cb1d11dff0af986b41f871c19287f56

Remove Java based PCL viewer and its supporting code.

pcl/pcpage.c
pl/pjparse.c
pl/plmain.c
pl/plmain.h
tools/viewer/Gpickle.java
tools/viewer/GpickleObserver.java
tools/viewer/GpickleThread.java
tools/viewer/Gview.java
tools/viewer/JavaDoc/allclasses-frame.html
tools/viewer/JavaDoc/deprecated-list.html
tools/viewer/JavaDoc/gpickle.html
tools/viewer/JavaDoc/gpickleobserver.html
tools/viewer/JavaDoc/gpicklethread.html
tools/viewer/JavaDoc/gview.html
tools/viewer/JavaDoc/help-doc.html
tools/viewer/JavaDoc/index-all.html
tools/viewer/JavaDoc/index.html
tools/viewer/JavaDoc/nav.html
tools/viewer/JavaDoc/overview-tree.html
tools/viewer/JavaDoc/package-frame.html
tools/viewer/JavaDoc/package-list
tools/viewer/JavaDoc/package-summary.html
tools/viewer/JavaDoc/package-tree.html
tools/viewer/JavaDoc/packages.html
tools/viewer/JavaDoc/serialized-form.html
tools/viewer/JavaDoc/stylesheet.css
tools/viewer/Nav.java
tools/viewer/README


2013-07-06 21:04:35 -0600
Henry Stiles <henry.stiles@artifex.com>
2035b67856e69b75c5466d44fd287f1d0cd721b3

Debug statement to indicate implicit raster exit.

pcl/rtgmode.c


2013-07-05 09:07:05 +0100
Ken Sharp <ken.sharp@artifex.com>
34e2ae40bff4d288da83dcd739e50287bf7c3c2e

pdfwrite - implement idioms for PScript 5 artificial bld text

Bug #688007 "cjk bold fonts printed many times"

The artifical emboldening of fonts in the pscript 5 DLL works by drawing
the same text 4 times in slightly different positions. THis causes
pdfwrite to emit 4 sets of text.

Here we implement idiomns for the range of 'show' operations valid in
Pscript5, and if the device supports text rendering modes we draw the text
only once in text rednering mode 2 (fill and then stroke). The Pscript5
code uses 'sBdx' to determine the offset of the text, but this is actually
a constant derived by dividing the target print resolution by 300. We use
a fixed figure derived heuristically instead.

During the work it became apparent that the existing code in pdfwrite to
handle stroked text didn't work properly as it could emit stroke
parameters during the course of a text object, which Acrobat ignores. SO
the code has been altered to exit the text object whenever text is
stroked. This is inefficient as we might not need to emit any stroke
parameters, but it solves the problem, and text rendering modes are not
widely used.

This shows a small progression in pdf-t3-simple.pdf and some small
differences in other files.

gs/Resource/IdiomSet/Pscript5Idiom
gs/devices/vector/gdevpdtt.c


2013-07-05 16:16:27 -0600
Henry Stiles <henry.stiles@artifex.com>
27332dab4d0b6ec7bab5cafef86a693c5d600dd7

Partially address 694378 - mispositiosed graphics.

Implement the GL Frame Advance (FR) technical extension with a simple
page feed.

pcl/pgconfig.c
pcl/pgmand.h


2013-07-02 13:03:51 +0100
Chris Liddell <chris.liddell@artifex.com>
a8d0fa19f927d045b81ec0380ea7448de38176d9

Disable OpenJPEG SSE on Windows again.

Shelly reports that enabling SSE in Windows causes crashes in most of the
JPX test jobs. At least for the present, disable it.

CLUSTER_UNTESTED

gs/psi/msvc.mak


2013-07-03 09:50:54 +0100
Ken Sharp <ken.sharp@artifex.com>
3123e3ad0299dbc1cefc77f342e5f23e7be28a71

Fix a minor compiler warning in the previous commit

gs/devices/vector/gdevpdfd.c


2013-07-03 09:05:16 +0100
Ken Sharp <ken.sharp@artifex.com>
489253b834075391d7826bc81ef52ede34f8289f

pdfwrite - better identify rectangular clips, and emit as rectangles

Bug #687931 "GS produces large PDF files"

The file uses *many* rectangular clips to draw through, previously pdfwrite
mostly emitted these as a sequence of lines, because only a small class of
clip paths could be identified as rectangular.

This commit levers the existing gx_path_is_rectangle to identify many more
rectangular clip paths, and emit them using the 're' operator instead, which
is more compact on output.

The specimen file now produces 30% smaller PDF files.

This does introduce some differences, in the main these are very small single
pixel or one pixel wide lines. In the case of the Quality Logic test suite, the
'frame' for the tests is drawn through a clip, and one edge is now slightly
wider, since it better matches the width of the other edges this is a
progression. It affects a large number of QL tests.

gs/base/gxcpath.c
gs/base/gxpath.h
gs/devices/vector/gdevpdfd.c


2013-07-02 10:31:48 +0100
Ken Sharp <ken.sharp@artifex.com>
939e32ff3c8841507aed80435269457f3caac6f5

More work on setpagedevice and global allocation mode

The commit 073f7be1671e7fa2dbbc75984e593d2279bb05d7 solved one problem,
but introduced another. Specifically Ghostscript feiled to start when
-dSAFER was specified.

The reasons are convoluted, the background is as follows:

Adobe interpreters appear to always return a local VM writeable dictionary
from currentpagedevice (despite that fact that the spec clearly says its
read-only). WordPerfect files have, in the past at least, relied upon this
and tried to write to the dictionary.

To solve this, our currentpagedevice copies child dictionaries to dictionaries
allocated in local VM (and writeable). This fails if we attempt to do a
setpagedevice while the VM allocation mode is local, because the parent
dictionary is in global VM, and we then attempt to put locally allocated
children in it.

The earlier commit resolved this by forcing the VM allocation mode to local
during the course of setpagedevice, which meant that the dictionary returned
by currentpagedevice was allocated in local VM, so it was safe to put the
child dictionaries in it.

But, if we run with -dSAFER, the in gs_init.ps we do an early call to
setpagedevice in order to set /.LockSafetyParams. We do this while the VM
allocation mode is global. Note that setpagedevice stores a pointer to the
returned dictionary in the graphics state. Now, when we run the Display
PostScript startup code, it insists that all objects in the 'savedinitialgstate'
must be in global VM. But we've saved the current page deice there, and it
was allocated in local VM, which leads to an error.

So in order to satisfy the WP bug, we need to have the children allocated in
local VM. In order to call setpagedevice when the allocation mode is global
we need to create the page device dict in local VM. In order to satisfy the
DPS code, we need to allocate the page device dict in global VM.

Oops.

This commit attempts to work around this by setting the VM allocation mode
to local for the course of setpagedevice, but *not* when we are executing
the code for -dSAFER.

This is a hacky solution, and I suspect prone to failure, but probably only
if we change the startup code, which we rarely do.

No diffrences expected

gs/Resource/Init/gs_setpd.ps


2013-06-29 15:53:58 +0100
Ken Sharp <ken.sharp@artifex.com>
06d63d8edfd5d8eac76b96ea2e66f5cf165b6997

Fix a typo in txtwrite, this may be related to bug #694389

gs/devices/vector/gdevtxtw.c


2013-06-29 09:38:53 +0100
Ken Sharp <ken.sharp@artifex.com>
f560b73066ee787678a31973bca411bedc6ca0f6

fix a minor compiler warning

gs/psi/zdevice.c


2013-06-28 09:18:49 +0100
Ken Sharp <ken.sharp@artifex.com>
13105ccf9c02d29058ab0ff3f9bdb48387ec7b6e

Invalidate device refs on the operand stack when we change device

Bug #690925 "SEGV after "gsave nulldevice currentdevice grestore setdevice"

currentdevice stores a reference containing a pointer to the current device
structure on the operand stack. If we close the device, then attempt to do
'setdevice' using the stored pointer from the operand stack we can get a
seg fault if we have restored away the device, because the device structure
memory has been released.

Altered nulldevice and setdevice so that when we change devices we scour
the operand stack looking for saved references to devices. If we find any
we NULL the pointer to the device. This allows us to check for a NULL device
pointer in setdevice and raise an error instead of crashing.

No differences expected.

gs/psi/zdevice.c


2013-06-27 14:58:13 -0600
Henry Stiles <henry.stiles@artifex.com>
d5d3b85af33c679927e908154482fab576922fc0

Fix bug #694355, incorrect rendering of raster image.

This problem is very similar to bug #693111, and I don't think we have
a clear handle on how the interpreter should behave when locked out
commands are received in raster mode (with RTL). For this problem we
don't shut down graphics when receiving the render algorithm command,
the other bug involved a transparency command. A new bug will be
opened to review both of these bugs. Although, both fixes are
effective and safe, I'm afraid they don't address the underlying
issue.

pcl/pcpalet.c


2013-06-27 14:51:50 -0600
Henry Stiles <henry.stiles@artifex.com>
7b7cb6d314aab998d8b40e1ff782149aebbf06a2

Reassign devices owned by Alex.

doc/who_owns_what.txt


2013-06-27 15:41:49 +0100
Ken Sharp <ken.sharp@artifex.com>
1fc07e783d8758e4bfdc8b8ebe68a875b30568ae

commit 9034712 used abs, which oddly caused many timeouts. Multiplying by
-1 instead seems to solve this.....

gs/base/gsptype1.c


2013-06-27 15:39:19 +0100
Ken Sharp <ken.sharp@artifex.com>
9034712f22eff916280f4555d88237da99bcaeda

When clamping pattern BBox to page, make sure to scan in proper direction

Bug #694385 "endless loop in pattern"

The code for clamping the pattern BBox to the page starts left and below the
page, and then scans across and up detecting if any part of the pattern is
on the page.

Unfortunately, this didn't account for negative xstep and ystep. Because
we are only scanning the area, the easiest solution is just to abs() the
values, so that we are sure to scan left-right and bottom-top.

No differences expected.

gs/base/gsptype1.c


2013-06-08 09:12:30 -0700
Michael Vrhel <michael.vrhel@artifex.com>
c27113ab96a8010b59652bde975eec68865aebb5

Change in behavior for overprint. Fixes bugs 694295 694296 and 694067

With this change we now do simulated overprinting of cmyk AND spot colorants
for contone cmyk devices by default. If -dSimulateOverprint=false is specified we
will not simulate overprinting of any colors.

Also, cmyk simulation of spot colors with separation devices is not handled.
i.e. if you specify -dSimulateOverprint=true -dMaxSpots=0 -sDEVICE=tiffsep1
you will see the spot colors blended in CMYK space if overprint has been
specified in the document.

Note that not all overprint situations can be simulated accurately with this
approach. For example, if I have a spot color that resulted in a CMYK value
of 0 0 100 0 after the alternate tint transform and then I did an overprint with
a CMYK value of 0 0 1 0, the color should still be a bright yellow but will actually
be almost no color. The issue is that we can not distinguish this case from one
where we had first laid down a CMYK of 0 0 100 0 followed by the overprint of 0 0 1 0
which should be a light yellow. The documentation has been updated to point this out.

I reviewed all the diffs that came up in the bmpcmp and reviewed the Ghent overprint
files.

gs/base/gscdevn.c
gs/base/gscsepr.c
gs/base/gsdparam.c
gs/base/gsicc.c
gs/base/gsicc_manage.c
gs/base/gsovrc.c
gs/base/gsstate.c
gs/base/lib.mak
gs/doc/Use.htm


2013-06-26 17:16:35 +0100
Ken Sharp <ken.sharp@artifex.com>
073f7be1671e7fa2dbbc75984e593d2279bb05d7

Ensure all objects created for use during setpagdevice are in local VM

Bug #687702 "gs8.15 setpagedevice /invalidaccess"

The problem is caused by currentpagdevice returning a dictionary allocated
in the current (global) VM. We later create an OutputAttributes dictionary
which is in local VM, and store it in the dictionary returned. This fails
of course.

Since these objects are only used internally to construct various intermediate
structures during the course of a setpagedevice, the easiest solution to this
is to force the VM allocation mode to local for the duration of setpagedevice.

No differences expected.

gs/Resource/Init/gs_setpd.ps


2013-06-26 13:18:43 +0100
Chris Liddell <chris.liddell@artifex.com>
bcc1052afdec7b4da66c832c97bcba990a1863e0

Bug #686853 "filenameforall enumerates incompatible with Adobe"

Fix the Unix/Linux file enumeration code to correctly recurse into
directories.

This causes differences in many of the Quality Logic Postscript LL3 test suite
tests because it can now overflow the size of the "scratch" string used in the
tests and that results (correctly) in a rangecheck error from filenameforall.

Obviously, that depends on from where in the directory hierarchy the executable
is being run, and the contents of the directory structure below that.

gs/base/gp_unifs.c


2013-06-24 15:20:03 +0100
Ken Sharp <ken.sharp@artifex.com>
f13bfba957c536630a241351df49c5007a0664d9

rework the NTFS file enumeration to rescurse into sub-directories

Bug #686853 "filenameforall enumerates incompatible with Adobe"

Existing code did not recurse into sub-directories whereas Adobe interpreters
do (but they do not list sub-directory names, just their contents).

In addition the Linux and Windows code has long been incompatible, because
the Linux code *does* list the sub-directory names, even though it doesn't
recurse into them.

With this patch the NTFS file system code now recurses and lists the
sub-directory contents in the same fashion as Adobe.

The Linux file system code needs work. After discussion with Chris we have
decided not to proceed with the same work on VMS, OS/2 or DOS, as we don't
even have systems to test the code compilation, let alone its execution.

All these Operating Systems are obselete, and nobody ahs complained about
the existing code in many years, so we don't expect to offer a bounty
for adding this. However, if anyone has access to an appropriate system and
wants to offer us a patch, we will probably adopt it.

No differences expected, the cluster doesn't run NTFS.

gs/base/gp_ntfs.c


2013-06-26 13:17:41 +0100
Ken Sharp <ken.sharp@artifex.com>
16733f6f179bcb98c371915a738b01a4e1f26ac2

Add some Encodings listed in the PLRM

Bug #688710 "Fix the Encoding resource category"

As noted int he bug thread I so not consider it worthwhile to tackle some
of the propsed work described there. However the CE Encoding is missing,
as are also the ExpertEncoding and ExpertSubsetEncoding resources.

This commit adds all three resources and the NotDefEncoding which is present
in Adobe Acrobat Distiller. We also revisit the patch (gs-cvs rev
6834) originally committed against this bug, which prevented the Subversion
source control directory being enumerated as an Encoding resource. Since we
no longer use Subversion, and the current system doesn't rely on hidden
sub-directories, this is no longer required.

No differences expected

gs/Resource/Encoding/CEEncoding
gs/Resource/Encoding/ExpertEncoding
gs/Resource/Encoding/ExpertSubsetEncoding
gs/Resource/Encoding/NotDefEncoding
gs/Resource/Init/gs_fntem.ps


2013-06-25 09:05:10 +0100
Hin-Tak Leung <hintak@ghostscript.com>
341dfa13b8ad4afadf8b2a8a7302422755911b36

Bug 690692: more robust check for TTF/OTF files

No cluster differences.

gs/Resource/Init/gs_ttf.ps


2013-06-25 08:55:08 +0100
Chris Liddell <chris.liddell@artifex.com>
200dc18647ae24995e28607f838d77affbfc7638

Set colors up correctly when rendering Type 3 glyph

In the 'd1' operator, if the glyph metrics are clearly wrong, we fall back to
rendering the glyph uncached. The original code failed to do the required
color setup in this path through the code.

The simplest solution, rather than repeat the same code, is to call the 'd0'
operator, after appropriate stack manipulations.

Noticed in passing working on an issue from customer 532.

No cluster differences.

gs/Resource/Init/pdf_font.ps


2013-06-20 13:24:01 -0700
Ray Johnston <ray.johnston@artifex.com>
10f6e526ec702fd8b74405d3e7461b428bdbdf31

Fix wrong GrayDetection when images have MultipleDataSources true - cust 801.

Since we already had a buffer, we unpack the samples from the planes into the
buffer using 'spread' to space them so they form a chunky pixel buffer for
row_has_color. Refactor the unpacking into the buffer out of row_has_color to
the caller where we have the planes array. Note that the buffer returned from
the 'unpack' proc may be the original data source so we save that for calling
row_has_color.

gs/base/gxclimag.c


2013-06-21 07:43:15 +0100
Chris Liddell <chris.liddell@artifex.com>
8ff1b883db9e7d2cd8c940a5ea7f0e4bad78903d

Move winrt platform build into "base".

One file required for the winrt platform was being built in psi/msvc.mak, this
moves it to winlib.mak with the rest of the platform.

CLUSTER_UNTESTED

gs/base/winlib.mak
gs/psi/msvc.mak


2013-06-19 19:10:21 +0100
Chris Liddell <chris.liddell@artifex.com>
b405fdcb395f2b48226af7a55a714d4dd3d50a75

Define GS_NO_UTF8 for mingw

Noticed in passing, GS_NO_UTF8 is needed for mingw.

No cluster differences.

gs/configure.ac


2013-06-19 18:14:13 +0100
Chris Liddell <chris.liddell@artifex.com>
14a88dcf3fb49d1fd31b0a6500e22c7d066a1185

Enable SSE2 code in openJPEG on Windows.

CLUSTER_UNTESTED

gs/psi/msvc.mak


2013-06-19 17:04:31 +0100
Chris Liddell <chris.liddell@artifex.com>
10de1e0bf9f3abd9c74401258388067c6e2ec36f

valgrind: fix invalid read error in png devices

Noticed passing, several of the png devices left the downscale factor and
min feature size entries in the device uninitialized.

No cluster differences.

gs/devices/gdevpng.c


2013-06-19 16:25:17 +0100
Chris Liddell <chris.liddell@artifex.com>
f1b0e276370fd632ac7e18c39cffe9972fe67444

Bug 693934: CCITT Fax decode - cope with negative run length

In various places in the fax decode code we coped with the run length being
negative - in just a few we didn't.

We'll now cope gracefully with negative run lengths in places.

No cluster differences.

gs/base/scfd.c


2013-06-19 16:29:42 +0200
Till Kamppeter <till.kamppeter@gmail.com>
b871884a283bbe8d908f47844ffff4cf6f009803

White-space clean-up in gstoraster

gs/cups/gstoraster.c


2013-06-19 15:26:12 +0200
Till Kamppeter <till.kamppeter@gmail.com>
1149c245e70fcf6b0445f0958a7c1bb972b26f63

Fixed also the suppression of color management via colord in gstoraster

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712045.

gs/cups/gstoraster.c


2013-06-19 14:52:25 +0200
Till Kamppeter <till.kamppeter@gmail.com>
1b87b820854525f9709f19f3bb932e4f75210637

Make colord-supplied ICC profile getting applied by gstoraster

Patches from Debian bug #712045:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712045

Thanks to Alexey Galakhov for the bug report and the patches.

gs/cups/gstoraster.c


2013-06-19 11:32:19 +0100
Ken Sharp <ken.sharp@artifex.com>
daceba62fcce274fc62e750ac186b3a9026554ad

PDF interpreter - ignore invalid /DecodeParams for streams

Bug #694353 "**** File has unbalanced q/Q operators (too many Q's) **** endless loop"

The PDF file is invalid, it has a /Filters array with 2 elements, and a
/DecodeParams array with 1 element. The DecodeParams array must have either
the same number of elements as the Filters, or not be present (default).

We now test the length of each array and ignore the DecodeParams if the lengths
are not the same (as we have no way to know which Params relate to which Filter)

No differences expected

gs/Resource/Init/pdf_base.ps


2013-06-19 08:53:01 +0100
Chris Liddell <chris.liddell@artifex.com>
1c9ac1bc3caaad5d2ea9e277d1b89a5c56b31c5c

Bug 694357: allow override of gcc's __SSE__ define

OpenJPEG uses gcc's "built-in" preprocessor define of __SSE__ to determine
whether to use its SSE2 code. As we have a configure option to disable SSE2
use in Ghostscript, that option now also overrides the gcc define thus
disabling SSE2 in OpenJPEG, too.

This currently only works for gcc.

No cluster differences.

gs/configure.ac


2013-06-18 16:50:17 +0100
Chris Liddell <chris.liddell@artifex.com>
fea396d5d3202bf3c6b1207b5c8a17b979d0bb4f

Bug 694318: remove reference to freed resource

When we're about to free a PDF resource object in pdfwrite, make sure we remove
references to it in the substream stack.

No cluster differences

gs/devices/vector/gdevpdf.c
gs/devices/vector/gdevpdfu.c


2013-06-18 12:02:01 +0100
Ken Sharp <ken.sharp@artifex.com>
95cd6ab8bf3a8866a5a10571a0c034869a4ba064

PDF interpreter - handle empty cref by rebuilding it.

Bug #694342 "Error: /typecheck in --run-- reading PDF file"

The PDF interpreter didn't notice that an empty xref (the xref token
immediately followed by the trailer token) was not a valid xref. Later we
would attempt to use the empty xref, and fail.

We now check the length of 'Objects' when we find the trailer token and if
it is 0 we throw an error. This causes the PDF itnerpreter to rebuild the
xref table by rescanning the whole file.

gs/Resource/Init/pdf_main.ps


2013-06-18 08:20:04 +0100
Chris Liddell <chris.liddell@artifex.com>
bd2887990301b12c2b11df323ee726855129a637

Bug 694354: cope being unable to read a candidate font file

On Unix, things like directories can be opened as "files". In the font code,
we attempt to open a candidate font file, and if that fails, handle it. We
then read some data from the file to validate it as a suitable font file. If
the data we read reveals it to be an unsuitable file, we handle that.

We were not handling the case where we could open the "file" but could not
read from it.

No cluster differences.

gs/Resource/Init/gs_fonts.ps


2013-06-17 15:46:52 +0100
Chris Liddell <chris.liddell@artifex.com>
bd08091d295effb51de2cc7e739870e7b2628e38

Bug 694319: "finalize" a font stream before return an error.

pdfwrite and pswrite could, in the event of an error during font writing, leave
the "stream" for the font in a) an invalid state, and b) in place for the
continued writing of the output file.

This caused memory corruption, seg fault etc.

No cluster differences.

gs/devices/vector/gdevpdtb.c


2013-06-17 13:01:43 +0200
Till Kamppeter <till.kamppeter@gmail.com>
489811e366495db7374f2cf3c71bd4a9bdf77360

Prevent gstoraster from hanging on Ghostscript failure

Thanks to Olivier Blin for this patch.

Original discription in the bug report (bug 693336):

When gs fails and the input file is bigger than the pipe capicity
(65536 bytes on Linux), gstoraster will hang. In this case, write()
will block because the pipe is full and no reader is emptying it. The
gs child process becomes a zombie, and write() will not fail until its
zombie is gone, which never happens with the current code.

This patch fixes the issue by adding a child reaper, which will make
write() fail when the child dies, either because of the SIGCHLD signal
coming, or because of a broken pipe error in write().

gs/cups/gstoraster.c


2013-06-17 08:52:37 +0100
Chris Liddell <chris.liddell@artifex.com>
579e9024d1bc358fe12bcceb00e1ba1797e473ec

Bug 694319 (related): bounds checking T1 op stack

Add some lower bounds checking for the operand stack, to one of the Type 1
charstring interpreters used by pdf/ps2write.

This fixes one of the memory corruption problems with Bug693711.pdf.

No cluster differences.

gs/base/gxtype1.c


2013-06-15 10:00:35 +0100
Ken Sharp <ken.sharp@artifex.com>
0c9e630460084182f0347570b38aa606a5a8a2e8

pdfwrite - silence a Valgrind warning by initialising a variable

The memory is uninitialised because the file provokes an error, and
pdfwrite gets confused about which file it is supposed to be in, The net
result is that an MD5 hash is not generated and we end up with some memory
not being initialised.

This simply sets the memory to 0 which silences Valgrind, it makes no
attempt to improve the output.

No differences expected.

gs/devices/vector/gdevpdfe.c


2013-06-14 09:59:55 -0700
Ray Johnston <ray.johnston@artifex.com>
65744368052b127b596014d55a6ea776808a6640

Fix gs_pdf14_device_color_mon_set and remove compiler warnings.

The previous function only set the value to false, and this should
set the value to the bool 'monitoring' that is the second arg.

gs/base/gdevp14.c
gs/base/gsicc_monitorcm.c


2013-06-14 11:04:31 +0100
Chris Liddell <chris.liddell@artifex.com>
cb2e0f784882696e930e5077ecb1a2feef76fadf

Fix pointer confusion in gs_private_st_ptrs2_final()

The order of the pointer arguments in one of the "sub-macros" used in the
definition of gs_private_st_ptrs2_final() was wrong.

No cluster differences.

gs/base/gsstruct.h


2013-06-12 12:39:13 -0700
Ray Johnston <ray.johnston@artifex.com>
f75e1cf3d4f4e4e809e94efc29b4046fe07f00c5

Fix Graydetection for pages after the first color page for cust 801.

We need to restore pageneutralcolor if graydetection is true, but also
we need to reestablish the monitoring color procedures, so we add a
gsicc_mcm_begin_monitor for the purpose. We change the pdf14 device
hook to allow the target device monitoring to be turned on or off.

gs/base/gdevp14.c
gs/base/gdevp14.h
gs/base/gdevprn.c
gs/base/gscms.h
gs/base/gsdevice.c
gs/base/gsicc_cache.c
gs/base/gsicc_cms.h
gs/base/gsicc_monitorcm.c
gs/base/gsicc_nocm.c
gs/base/gsicc_replacecm.c
gs/devices/gdevpbm.c


2013-06-13 08:12:35 +0100
Chris Liddell <chris.liddell@artifex.com>
5dd1d9a83d41ea9d2542e435172ff4fa7c163828

Bug 690639: change the order we do character mapping in TTFs

Instead of combining the encoding from the PDF with the Adobe Glyph List to
get a comprehensive list of glyph name mappings, then building a character
code to GID mapping from that, and (potentially) using the TTF post table to
fill in any gaps, we now build a mapping directly from the AGL, then (possibly)
fill in any gaps from the TTF post table, and *finally* fill in any remaining
gaps using the PDF's encoding.

This handles a case where the contents of the TTF cmap table don't match the
contents of the post table.

No cluster differences.

gs/Resource/Init/gs_ttf.ps


2013-06-11 18:51:18 +0100
Robin Watts <robin.watts@artifex.com>
e209e22862bd7af4362e08f1aa8f0025341356f0

Add tiffscaled32 device (32bpp CMYK output with downscaling)

Update documentation.

gs/base/gxdownscale.c
gs/base/macos-mcp.mak
gs/base/openvms.mak
gs/base/unix-gcc.mak
gs/base/unixansi.mak
gs/devices/devs.mak
gs/devices/gdevtsep.c
gs/doc/Devices.htm
gs/psi/msvc.mak
main/pcl6_gcc.mak
main/pcl6_msvc.mak


2013-06-09 13:54:46 -0400
Chris Liddell <chris.liddell@artifex.com>
617143bb943a6540c751195c60b68387f2b06b88

Bug 694270: (valgrind) initialize structure

Initialize the Type 1 state structure before using it.

No cluster differences.

gs/devices/gxfcopy.c


2013-06-05 10:06:46 -0700
Michael Vrhel <michael.vrhel@artifex.com>
1cf483079386814249cfa831cfbe7491b59dc602

Fix for bug 694293. We are improperly clipping to the soft mask bounding box.

If the background alpha value for the softmask is something other than 0 we cannot
clip to the soft mask bounding box as regions that are outside this area will be
using the background alpha as their softmask value. Also, we were not accounting
for the different size of the softmask when compositing. Progressions occurred in
three test files with this fix in addition to fixing the customer file.

gs/base/gdevp14.c
gs/base/gxblend1.c


2013-05-16 14:52:31 +0100
Chris Liddell <chris.liddell@artifex.com>
61961d2828e427134f32a90f7477b4c91aae0c57

Bug 694065: address libtiff issues with WinRT build

The defaullt libtiff I/O functions use some methods proscribed in the WinRT world.

Ghostscript does not rely on these defaults, supplying our own I/O hooks
when we invoke libtiff.

So, if we're building libtiff into GS (as in the default and preferred
configuration), we leave out those default calls, and replace them with stubs
to keep the linker happy. Currently, these are empty stubs, and apply to all
builds, which may cause issues if anyone relies on linking to our built-in
libtiff, and uses these calls. If that proves to be the case, we can easily
fill-in the stubs with appropriate code, but working through the GS I/O
calls.

This also has the advantage that any port to a weird platform, we only
need to port the Ghostscript I/O, and we don't have to worry about libtiff.

If we're using a "shared" libtiff, these stubs are not included.

Unfortunately, libtiff does not pass around a context to the memory
management functions, so we currently still have no method of using the
Ghostscript memory manager.

Update to libpng 1.6.2

libpng 1.6.x dispenses with one of the function calls (lstrlenA) not allowed
in the WinRT build.

The other (ExitProcess) we work around in the makefiles, replacing it
with a simple "exit". This should never be a problem since we actually
rely on setjmp/longjmp for libpng error handling, and libpng code checks
for that option before it will get to the "exit" call.

Re-enable TIFF and PNG devices for WinRT

Rename 'PLATFORM' to 'GSPLATFORM'

nmake (at least in VS2012) defines 'PLATFORM' for certain configurations
which interfered with our use of it, so make it more Ghostscript-centric.

No cluster differences.

gs/base/gs.mak
gs/base/gstiffio.c
gs/base/gstiffio.h
gs/base/macos-mcp.mak
gs/base/msvclib.mak
gs/base/openvms.mak
gs/base/openvms.mmk
gs/base/png.mak
gs/base/tiff.mak
gs/base/unixhead.mak
gs/base/winlib.mak
gs/configure.ac
gs/devices/devs.mak
gs/devices/gdevtfax.c
gs/devices/gdevtfnx.c
gs/devices/gdevtifs.c
gs/devices/gdevtifs.h
gs/devices/gdevtsep.c
gs/libpng/ANNOUNCE
gs/libpng/CHANGES
gs/libpng/CMakeLists.txt
gs/libpng/INSTALL
gs/libpng/LICENSE
gs/libpng/Makefile.am
gs/libpng/Makefile.in
gs/libpng/README
gs/libpng/aclocal.m4
gs/libpng/arm/arm_init.c
gs/libpng/arm/filter_neon.S
gs/libpng/autogen.sh
gs/libpng/config.guess
gs/libpng/config.h.in
gs/libpng/config.sub
gs/libpng/configure.ac
gs/libpng/contrib/examples/README.txt
gs/libpng/contrib/examples/iccfrompng.c
gs/libpng/contrib/examples/pngpixel.c
gs/libpng/contrib/examples/pngtopng.c
gs/libpng/contrib/gregbook/Makefile.sgi
gs/libpng/contrib/gregbook/Makefile.unx
gs/libpng/contrib/gregbook/readpng.c
gs/libpng/contrib/gregbook/readpng2.c
gs/libpng/contrib/gregbook/writepng.c
gs/libpng/contrib/libtests/fakepng.c
gs/libpng/contrib/libtests/gentests.sh
gs/libpng/contrib/libtests/makepng.c
gs/libpng/contrib/libtests/pngstest.c
gs/libpng/contrib/libtests/pngunknown.c
gs/libpng/contrib/libtests/pngvalid.c
gs/libpng/contrib/libtests/readpng.c
gs/libpng/contrib/libtests/tarith.c
gs/libpng/contrib/libtests/timepng.c
gs/libpng/contrib/pngminim/README
gs/libpng/contrib/pngminim/decoder/makefile
gs/libpng/contrib/pngminim/decoder/pngusr.dfa
gs/libpng/contrib/pngminim/decoder/pngusr.h
gs/libpng/contrib/pngminim/encoder/README
gs/libpng/contrib/pngminim/encoder/makefile
gs/libpng/contrib/pngminim/encoder/pngusr.dfa
gs/libpng/contrib/pngminim/encoder/pngusr.h
gs/libpng/contrib/pngminim/preader/makefile
gs/libpng/contrib/pngminim/preader/pngusr.dfa
gs/libpng/contrib/pngminim/preader/pngusr.h
gs/libpng/contrib/pngminus/makefile.std
gs/libpng/contrib/pngminus/png2pnm.c
gs/libpng/contrib/pngminus/pnm2png.c
gs/libpng/contrib/pngsuite/README
gs/libpng/contrib/pngsuite/ftbbn0g01.png
gs/libpng/contrib/pngsuite/ftbbn0g02.png
gs/libpng/contrib/pngsuite/ftbbn0g04.png
gs/libpng/contrib/pngsuite/ftbbn1g04.png
gs/libpng/contrib/pngsuite/ftbwn0g16.png
gs/libpng/contrib/pngsuite/ftbwn1g16.png
gs/libpng/contrib/pngsuite/ftp0n0g08.png
gs/libpng/contrib/pngsuite/ftp0n1g08.png
gs/libpng/contrib/tools/README.txt
gs/libpng/contrib/tools/checksum-icc.c
gs/libpng/contrib/tools/chkfmt
gs/libpng/contrib/tools/cvtcolor.c
gs/libpng/contrib/tools/fixitxt.c
gs/libpng/contrib/tools/intgamma.sh
gs/libpng/contrib/tools/makesRGB.c
gs/libpng/contrib/tools/sRGB.h
gs/libpng/contrib/visupng/PngFile.c
gs/libpng/contrib/visupng/PngFile.h
gs/libpng/contrib/visupng/VisualPng.c
gs/libpng/depcomp
gs/libpng/example.c
gs/libpng/install-sh
gs/libpng/libpng-config.in
gs/libpng/libpng-manual.txt
gs/libpng/libpng.3
gs/libpng/libpngpf.3
gs/libpng/ltmain.sh
gs/libpng/missing
gs/libpng/png.5
gs/libpng/png.c
gs/libpng/png.h
gs/libpng/pngconf.h
gs/libpng/pngerror.c
gs/libpng/pngget.c
gs/libpng/pnginfo.h
gs/libpng/pngmem.c
gs/libpng/pngpread.c
gs/libpng/pngpriv.h
gs/libpng/pngread.c
gs/libpng/pngrio.c
gs/libpng/pngrtran.c
gs/libpng/pngrutil.c
gs/libpng/pngset.c
gs/libpng/pngstruct.h
gs/libpng/pngtest.c
gs/libpng/pngtest.png
gs/libpng/pngtrans.c
gs/libpng/pngwio.c
gs/libpng/pngwrite.c
gs/libpng/pngwtran.c
gs/libpng/pngwutil.c
gs/libpng/projects/owatcom/libpng.wpj
gs/libpng/projects/owatcom/pngstest.tgt
gs/libpng/projects/visualc71/README.txt
gs/libpng/projects/visualc71/libpng.vcproj
gs/libpng/projects/visualc71/pngtest.vcproj
gs/libpng/projects/vstudio/WARNING
gs/libpng/projects/vstudio/libpng/libpng.vcxproj
gs/libpng/projects/vstudio/pnglibconf/pnglibconf.vcxproj
gs/libpng/projects/vstudio/pngstest/pngstest.vcxproj
gs/libpng/projects/vstudio/pngtest/pngtest.vcxproj
gs/libpng/projects/vstudio/pngunknown/pngunknown.vcxproj
gs/libpng/projects/vstudio/pngvalid/pngvalid.vcxproj
gs/libpng/projects/vstudio/readme.txt
gs/libpng/projects/vstudio/vstudio.sln
gs/libpng/projects/vstudio/zlib.props
gs/libpng/projects/vstudio/zlib/zlib.vcxproj
gs/libpng/scripts/README.txt
gs/libpng/scripts/checksym.awk
gs/libpng/scripts/chkfmt
gs/libpng/scripts/def.dfn
gs/libpng/scripts/descrip.mms
gs/libpng/scripts/dfn.awk
gs/libpng/scripts/intprefix.dfn
gs/libpng/scripts/libpng-config-head.in
gs/libpng/scripts/libpng.pc.in
gs/libpng/scripts/libtool.m4
gs/libpng/scripts/ltoptions.m4
gs/libpng/scripts/ltsugar.m4
gs/libpng/scripts/ltversion.m4
gs/libpng/scripts/lt~obsolete.m4
gs/libpng/scripts/macro.lst
gs/libpng/scripts/makefile.32sunu
gs/libpng/scripts/makefile.64sunu
gs/libpng/scripts/makefile.aix
gs/libpng/scripts/makefile.bc32
gs/libpng/scripts/makefile.beos
gs/libpng/scripts/makefile.bor
gs/libpng/scripts/makefile.cegcc
gs/libpng/scripts/makefile.darwin
gs/libpng/scripts/makefile.dec
gs/libpng/scripts/makefile.dj2
gs/libpng/scripts/makefile.elf
gs/libpng/scripts/makefile.freebsd
gs/libpng/scripts/makefile.gcc
gs/libpng/scripts/makefile.hp64
gs/libpng/scripts/makefile.hpgcc
gs/libpng/scripts/makefile.hpux
gs/libpng/scripts/makefile.ibmc
gs/libpng/scripts/makefile.intel
gs/libpng/scripts/makefile.knr
gs/libpng/scripts/makefile.linux
gs/libpng/scripts/makefile.mips
gs/libpng/scripts/makefile.msc
gs/libpng/scripts/makefile.msys
gs/libpng/scripts/makefile.ne12bsd
gs/libpng/scripts/makefile.netbsd
gs/libpng/scripts/makefile.openbsd
gs/libpng/scripts/makefile.sco
gs/libpng/scripts/makefile.sggcc
gs/libpng/scripts/makefile.sgi
gs/libpng/scripts/makefile.so9
gs/libpng/scripts/makefile.solaris
gs/libpng/scripts/makefile.solaris-x86
gs/libpng/scripts/makefile.std
gs/libpng/scripts/makefile.sunos
gs/libpng/scripts/makefile.tc3
gs/libpng/scripts/makefile.vcwin32
gs/libpng/scripts/makevms.com
gs/libpng/scripts/options.awk
gs/libpng/scripts/pnglibconf.dfa
gs/libpng/scripts/pnglibconf.h.prebuilt
gs/libpng/scripts/pnglibconf.mak
gs/libpng/scripts/prefix.dfn
gs/libpng/scripts/sym.dfn
gs/libpng/scripts/symbols.def
gs/libpng/scripts/symbols.dfn
gs/libpng/scripts/vers.dfn
gs/libpng/test-driver
gs/libpng/test-pngtest.sh
gs/libpng/test-pngvalid-full.sh
gs/libpng/test-pngvalid-simple.sh
gs/libpng/tests/pngstest
gs/libpng/tests/pngstest-0g01
gs/libpng/tests/pngstest-0g02
gs/libpng/tests/pngstest-0g04
gs/libpng/tests/pngstest-0g08
gs/libpng/tests/pngstest-0g16
gs/libpng/tests/pngstest-2c08
gs/libpng/tests/pngstest-2c16
gs/libpng/tests/pngstest-3p01
gs/libpng/tests/pngstest-3p02
gs/libpng/tests/pngstest-3p04
gs/libpng/tests/pngstest-3p08
gs/libpng/tests/pngstest-4a08
gs/libpng/tests/pngstest-4a16
gs/libpng/tests/pngstest-6a08
gs/libpng/tests/pngstest-6a16
gs/libpng/tests/pngstest-error
gs/libpng/tests/pngtest
gs/libpng/tests/pngunknown-IDAT
gs/libpng/tests/pngunknown-discard
gs/libpng/tests/pngunknown-if-safe
gs/libpng/tests/pngunknown-sAPI
gs/libpng/tests/pngunknown-sTER
gs/libpng/tests/pngunknown-save
gs/libpng/tests/pngunknown-vpAg
gs/libpng/tests/pngvalid-gamma-16-to-8
gs/libpng/tests/pngvalid-gamma-alpha-mode
gs/libpng/tests/pngvalid-gamma-background
gs/libpng/tests/pngvalid-gamma-expand16-alpha-mode
gs/libpng/tests/pngvalid-gamma-expand16-background
gs/libpng/tests/pngvalid-gamma-expand16-transform
gs/libpng/tests/pngvalid-gamma-sbit
gs/libpng/tests/pngvalid-gamma-threshold
gs/libpng/tests/pngvalid-gamma-transform
gs/libpng/tests/pngvalid-progressive-interlace-size
gs/libpng/tests/pngvalid-progressive-interlace-standard
gs/libpng/tests/pngvalid-progressive-interlace-transform
gs/libpng/tests/pngvalid-progressive-standard
gs/libpng/tests/pngvalid-standard
gs/psi/msvc.mak
gs/psi/os2.mak


2013-06-05 08:17:22 +0100
Ken Sharp <ken.sharp@artifex.com>
0de588b3705131067078d9cac84d5bc6ff0a77e9

pdfwrite - squelch a couple of minor compiler warnings

No differences expected

gs/devices/vector/gdevpdfg.c


2013-06-04 13:46:07 -0700
Ray Johnston <ray.johnston@artifex.com>
1271b370117a9622fc255df665c007487e16296f

Fix bug 694290 caused by an image totally off the page.

This went away with the change to clipping, commit e0ba422, but we
might as well fix this long standing issue as well.

gs/base/gxclimag.c


2013-06-04 13:01:21 -0700
Ray Johnston <ray.johnston@artifex.com>
55fbadd981f3ca78f0920342a7ebaca4eab20cfa

Fix SEGV when -ZL is used.

The stream state memory is NULL, so use local_memory when printing.

gs/base/gxclread.c


2013-06-04 10:52:14 -0700
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
d38f691578b52aa954ec9354b59919026d7e46f7

Fixed GhostPCL -DPACIFY_VALGRIND missing symbol issue.

pl/plplatf.c


2013-06-04 18:34:45 +0100
Ken Sharp <ken.sharp@artifex.com>
7719dd1084cf57cb415b8a64ea2ee09a6eb39ee2

pdfwrite - silence valgrind warning

Bug #694267
"Valgrind issues found by fuzzing in process_text_modify_width (gdevpdte.c:1104)"

I'm pretty sure this is functionally benign because the values read are not
actually used, but setting them to zero silences the warning.

No differences expected.

gs/devices/vector/gdevpdtt.c


2013-06-04 13:14:52 +0100
Ken Sharp <ken.sharp@artifex.com>
549cf6ae1bf57fc8d84d0598f04a861378e0e5ea

pdfwrite - colour management, convert Separation and DeviceN base spaces

When the input is DeviceN or Separation, the color conversion strategy is
Gray, RGB or CMYK, and the alternate space is not compatible, convert the
alternate space. We do this by constructing either an exponential (Separation)
or sampled (DeviceN) function, we sample the end points of each ink,
convert the alternate space representation to the requested device space
and use those as the data points ofr the function.

The representation probably isn't that great, since it linearly interpolates
between the (very few) sample points, but it does the job adequately, and
preserves the Separation/DeviceN space while still creating an appropriate
colour space in the output.

No differences expected, this code not in use yet.

gs/devices/vector/gdevpdfc.c
gs/devices/vector/gdevpdfc.h
gs/devices/vector/gdevpdfg.c


2013-06-04 09:44:33 +0100
Ken Sharp <ken.sharp@artifex.com>
662c5022b6731a4cff0c026c0ef62322aaaf396c

pdfwrite - additional error checking on named destinations

Bug #694194 "Seg faults found by fuzzing in pdfmark_DOCVIEW"

The routine for creating a named destination could return an error if the
destination page was outside the valid range (-2 in this case), but the
DOCVIEW pdfmark wasn't testing the returned value.

Added code to give a meaningful error and return a rangecheck error when this
occurs.

No differences expected.

gs/devices/vector/gdevpdfm.c


2013-06-03 13:10:10 -0700
Ray Johnston <ray.johnston@artifex.com>
e0ba4228f11f9a5af359915878176efee8dc73f5

Fix clipping bugs 693509 and 690036.

The Adobe scan conversion rules call for the clip path to use the same
rule as for filling. Thus we need to apply the 'adjust' to do the any part
of pixel rule. Differences are expected, but bmpcmp doesn't show any.

gs/base/gxcpath.c


2013-06-03 08:31:56 +0100
Chris Liddell <chris.liddell@artifex.com>
761e413514c7f9374f54e8ffef3c1d7ebf824e28

Bug 694272: bounds check TTF outline points flags

Reading the points "flags" from the TTF stream, we weren't bounds checking when
the flag value is a repeated one, so we could trundle off the end of the buffer.

No cluster differences.

gs/base/ttfmain.c


2013-05-31 09:46:10 -0700
Ray Johnston <ray.johnston@artifex.com>
1eef08f4aaf485a18422e9fbcfd6ac8cbfb03cdb

Temporarily disable BGPrint for the cups device until differences fixed.

By using gdev_prn_output_page background printing is not performed.

gs/cups/gdevcups.c


2013-05-30 15:48:33 -0700
Michael Vrhel <michael.vrhel@artifex.com>
483e100c06e647d8ba2d68beef09c1c241fd328d

Addition of ETS code and project into gs/toolbin/halftone

gs/toolbin/halftone/ETS/COPYING.txt
gs/toolbin/halftone/ETS/Makefile_avec
gs/toolbin/halftone/ETS/Makefile_sse2
gs/toolbin/halftone/ETS/README.txt
gs/toolbin/halftone/ETS/_eb_sse2.s
gs/toolbin/halftone/ETS/build.bat
gs/toolbin/halftone/ETS/eb_avec.c
gs/toolbin/halftone/ETS/eb_avec.h
gs/toolbin/halftone/ETS/eb_sse2.s
gs/toolbin/halftone/ETS/ei03.pdf
gs/toolbin/halftone/ETS/ets.c
gs/toolbin/halftone/ETS/ets.h
gs/toolbin/halftone/ETS/ipview.html
gs/toolbin/halftone/ETS/test_ets.c
gs/toolbin/halftone/ETS/tm.h
gs/toolbin/halftone/ETS/win32/ETS.sln
gs/toolbin/halftone/ETS/win32/ETS.vcproj


2013-05-30 15:40:34 -0700
Michael Vrhel <michael.vrhel@artifex.com>
69cce78d20f9ee34954812e72ad6f3e4bf085374

Addition of -dPreBandThreshold information into documentation

gs/doc/Use.htm


2013-05-29 21:59:45 -0700
Ray Johnston <ray.johnston@artifex.com>
0c55548b5fbf6fabdc7c5766c162b0cd67597627

Fix incorrect Gray Detection on pages after the first color page.

Reported by customer 801. The pageneutralcolor element of the icc_struct
was not being reset, so once it was set for 'color' all subsequent pages
would be seen as color.

gs/base/gdevprn.c


2013-05-30 13:47:20 +0100
Chris Liddell <chris.liddell@artifex.com>
b09746cd4c822c2a72f146e74ff48c4ca4a94807

Bug 694059: support all available TIFF compressions

Previously, we weren't allowing certain valid (but possibly not terribly
sensible) combinations of bit depth and compression - for those, tiffsep
would silently ignore the setting and use a default.

This has been relaxed, although certain combinations are not supported by
libtiff are still proscribed (CRLE/G4/G3 and multibit per sample - for
example, 8 bits per sample cannot be combined with CCITT Group 4 fax).
Those now generate an error message and a rangecheck error.

No cluster differences.

gs/devices/gdevtifs.c
gs/devices/gdevtsep.c


2013-05-30 14:41:07 +0200
Till Kamppeter <till.kamppeter@gmail.com>
c374882e38fdac7ef766c9ac1ec8674e02bd56bc

Added support for printer calibration to the gstoraster CUPS filter

For doing calibration printouts the color management in the print filter
chain needs to get turned off. This is done by calling Ghostscript with the
"-dUseFastColor" command line option. Inhibiting color management can be done
via colord, with a command like

colormgr device-inhibit /org/freedesktop/ColorManager/devices/<printer> 0

or by sending the calibration print job with the option "color-management=off".

Thanks to Richard Hughes for the patch.

gs/cups/colord.c
gs/cups/colord.h
gs/cups/gstoraster.c


2013-05-29 11:24:02 -0700
Ray Johnston <ray.johnston@artifex.com>
89c224b029357002c48660dae98de2d1e560d4e0

Fix for too many entries in an image Decode array reported by cust 532.

This is an out-of spec file, but as usual, since Adobe handles it, so we do too.
Allow too many by setting over_error to 0 when we load the Decode array.

This required a change to dict_float_array_param so that it will load the
requested number of elements (and return that count) when over_erro == 0.

Also clean up the indenting and get rid of the unused decode_size variable.

gs/psi/idparam.c
gs/psi/zimage.c


2013-05-29 11:46:45 -0700
Ray Johnston <ray.johnston@artifex.com>
6ceadc6f2da001b183d700186e6b5e622bcb22cf

Add missing include when GS_NO_UTF8=1

gs/base/gp_wgetv.c


2013-05-29 17:24:32 +0100
Ken Sharp <ken.sharp@artifex.com>
2d04d5942b3e97b06a7ac4ed767a6c481d4421f4

pdfwrite - improve handling of Unicode names

Bug#694277 " Improve pdfmark processing to handle unusual names in named destinations"

We can't handle Unicode names in PDF, technically we should write these as
strings and enter them in the names table, but we don't have a mechanism for
that for pdfmarks.

Instead we leave them as names using the special processing in pdfwrite, but
extended with additional markers. When writing these out pdfwrite converts
the NULLs to an arbitrary string. This works adequately for the bug as
these are named destinations, but its possible that other kinds of names
might be visible in the PDF application and would give the wrong result.

So this is at best a patch.

No differences expected.

gs/Resource/Init/gs_pdfwr.ps
gs/devices/vector/gdevpdfr.c
gs/devices/vector/gdevpdfu.c


2013-05-28 11:17:21 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
c2503db1c461d7d3af7c8f69a193fb978d8377b3

Bug 694138: Fix component number validation in ICC colorspace

gs/psi/zcolor.c


2013-05-24 17:40:42 +0100
Robin Watts <robin.watts@artifex.com>
69ea64d08a97da7afcfb0790f916f1ff4adf115e

Fix MuPDF fuzzing SEGV

Move the indexing of an array AFTER the check for whether the
index is suitable.

gs/jbig2dec/jbig2_text.c


2013-05-24 16:22:47 +0100
Robin Watts <robin.watts@artifex.com>
f40a8ab6a7326d1643852e7c9049a9b875131824

JBIG2Dec: MUPDF fuzzing SEGV fixes

The changes herein solve SEGVs (and valgrind failures) seen when
fuzzing mupdf. The following are some files that show these up:

tests_private/fuzzing/mupdf/280.pdf.SIGSEGV.93c.2002
tests_private/fuzzing/mupdf/1112.pdf.SIGSEGV.9ab.128
tests_private/fuzzing/mupdf/1136.pdf.SIGSEGV.93c.154

gs/jbig2dec/jbig2_generic.c
gs/jbig2dec/jbig2_symbol_dict.c


2013-05-27 09:23:35 +0100
Ken Sharp <ken.sharp@artifex.com>
c00e028429fa7bbbe1f3902286d5b3710b670815

pdfwrite - better support for PageLabels

Bug #693929 " Regression: Error: /undefined in --run--"

This code now properly flattens a PageLabels number tree into a single node
tree, which it converts to a string for inclusion in the output.

In addition to flattening the tree we also perform considerable error checking
on the tree construction, and we limit the number of page elements to 1000.
This is because PostScript strings are limited to 64k and we use a string to
pass the data to the device for inclusion. If we exceed 1000 elements then
we simply abort the PageLabels (and print a warning on the back channel)

No differences expected, this is not a printing eleent

gs/Resource/Init/gs_pdfwr.ps


2013-05-26 13:08:46 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
3282874fbe636652df435fdacef4ebc3f3ee426b

Bug 694087: Detect and correct wrong /Subtype of CID font

This attribute appears to be tested again somewhere else.
Changing the attribute to the correct value clears the bug.

gs/Resource/Init/pdf_font.ps


2013-05-26 03:01:24 -0400
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
9567219b7bd46b1d8a7cfc318788e7dc24bebc21

Bug 694021: Patch for seg fault related issues

The seg fault is due to the the image decoder trying to use an uninitialized
GR_stats. This also uncovered a few other errors that are covered here :-
1) GR_stats is now initialised in all places to prevent it reaching
jbig2_arith_decode with fake values
2) jbig2_arith_decode has been updated to prevent access outside of the
jbig2_arith_Qe array which now returns an error in such cases.
3) all uses of jbig2_decode_refinement_region now check for a returning error
and act accordingly.

gs/jbig2dec/jbig2_arith.c
gs/jbig2dec/jbig2_symbol_dict.c
gs/jbig2dec/jbig2_text.c


2013-05-26 02:02:38 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
7131b2045a957089f2c7eec227c23f5fbe4ee1e7

Bug 694100: Fix yet another automatic PDF file closure.

Read PDF file more carefully during testing for the stream xref
and validate the tokens to avoid reading past the EOF and
closing the file.

gs/Resource/Init/pdf_main.ps


2013-05-24 16:17:45 +0100
Ken Sharp <ken.sharp@artifex.com>
2f08dfcd4db7f6a95ac9ee983692d922c09a1ffd

pdfwrite - ignore overly complex PageLabels for now

The current PageLabels code doesn't handle anything except the simplest
case (/Nums at the page tree root), so ignore anything more complex so
that we don't throw an error.

More work to do, I want to handle a proper tree.

No differences expected.

gs/Resource/Init/gs_pdfwr.ps


2013-05-24 16:02:21 +0100
Chris Liddell <chris.liddell@artifex.com>
66695586781291ca37d190c537784ccf94595428

Add trio directory to zip archive target.

CLUSTER_UNTESTED

gs/psi/winint.mak


2013-05-24 13:41:41 +0100
Chris Liddell <chris.liddell@artifex.com>
735c3bbfecc9bbb5792c85558b4641568e316b9d

Bug 691784 - jbig2dec WIN32 DLL with configure

See http://bugs.ghostscript.com/show_bug.cgi?id=691784

CLUSTER_UNTESTED

gs/jbig2dec/configure.ac


2013-05-21 00:47:46 +0100
Robin Watts <robin.watts@artifex.com>
b44040bb9550d403313baec2bed084f1de50093a

Fix typo in previous commit.

I'd forced the valgrind code on to ensure it was tested, and forgot to
disable it before commit.

gs/base/gxclipm.c


2013-05-20 19:18:36 +0100
Robin Watts <robin.watts@artifex.com>
94bf81402c991ca8feb59012078b19b5b5d6a5dd

Bug 693803: Add PACIFY_VALGRIND code for clip_runs_enumerate.

gs/base/gxclipm.c


2013-05-20 15:10:07 +0100
Robin Watts <robin.watts@artifex.com>
ebbcd5b9e67b45c8d7187730d131ff43060aa247

Bug 693807: Add PACIFY_VALGRIND code to mem_true32_copy_mono.

Mask of uninitialised bits at the end of a tile row.

gs/base/gdevm32.c


2013-05-17 11:02:12 -0700
Robin Watts <robin@peeves.(none)>
54683cf9303c3b9146492a9a3a5f5fbc3a7521bc

Bug 693965: Fix SEGV in fuzzing test (corrupt image)

Second attempt to commit this; the first time had a typo in.

The first error given by valgrind is due to the image in this
file being a 16bpp one with a horizontal flip. This tickles
an incomplete case within the interpolation code. Not
surprising as there are more options in that code than anyone
should be expected to cope with. The code is fixed here.

This leads on to the cause of the crash; the image has a matrix
with a HUGE x shift on it. This upsets some of the floating
point calculations used to calculate the render rectangle.

This code has been hardened now to cope with such errors.

gs/base/gxipixel.c
gs/base/gxiscale.c


2013-05-20 12:14:00 +0100
Robin Watts <robin.watts@artifex.com>
0956abfbb0b53ecd1e8e276d6b2c603a720e6187

Revert "Bug 693965: Fix SEGV in fuzzing test (corrupt image)"

This reverts commit 1f80c02083b222e3f005c46e91ab4597de323371. Committed
too early, sorry.

gs/base/gxipixel.c
gs/base/gxiscale.c


2013-05-20 09:30:18 +0100
Ken Sharp <ken.sharp@artifex.com>
a8487e333554f19bf8d529b9e7893ad4e16448d1

Ensure that PCL bitmap glyphs with no data still execute setcachedevice

This grew out of Bug #694069, in the course of resolving that problem it
transpired that, if there was no data available for a downloaded bitmap
character, the PCL interpreter simply returned.

In conjunction with pdfwrite, this caused an endless loop due to the character
cache being overfilled. We only check the availability of space in the
character cache in setcachedevice, so its safer to make sure that we do
call it, thereby avoiding the overfilling.

No differences expected.

pl/plchar.c


2013-05-18 14:42:23 -0700
Ray Johnston <ray.johnston@artifex.com>
36f1de9b5a937d535cb44bb088572b76a9c5bcbd

Fix BGPrint mode (copy_paste error that disabled background printing.

gs/base/gdevprn.c


2013-05-17 11:02:12 -0700
Robin Watts <robin@peeves.(none)>
1f80c02083b222e3f005c46e91ab4597de323371

Bug 693965: Fix SEGV in fuzzing test (corrupt image)

The first error given by valgrind is due to the image in this
file being a 16bpp one with a horizontal flip. This tickles
an incomplete case within the interpolation code. Not
surprising as there are more options in that code than anyone
should be expected to cope with. The code is fixed here.

This leads on to the cause of the crash; the image has a matrix
with a HUGE x shift on it. This upsets some of the floating
point calculations used to calculate the render rectangle.

This code has been hardened now to cope with such errors.

gs/base/gxipixel.c
gs/base/gxiscale.c


2013-05-16 07:34:06 +0100
Chris Liddell <chris.liddell@artifex.com>
f0ff05b449b4ecc9332029faf7e7b186b3e18052

Add words about shared libs on OS X.

CLUSTER_UNTESTED

gs/doc/Make.htm


2013-05-15 06:54:53 -0700
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
eccbb7c6c0c267f6e3b7a2381b0b019140f3d831

Added singlePagePDF mode to clusterpush.pl.

gs/toolbin/localcluster/clusterpush.pl


2013-05-14 16:28:22 -0600
Henry Stiles <henry.stiles@artifex.com>
853678e7bd4303cd5a1b5e74dfe257fd896a106c

Remove obsolete USECIEColor option in PCL and PXL.

pcl/pccid.c
pcl/pcstate.h
pl/pjparse.c
pxl/pxcet.txt
pxl/pximage.c
pxl/pxink.c
pxl/pxpthr.c
pxl/pxsessio.c
pxl/pxstate.h


2013-05-14 15:33:24 -0600
Henry Stiles <henry.stiles@artifex.com>
593afcba2b670c6b1051d39d2a73ce1b386b871c

Remove obsolete scripts

pxl/pxprint.bat
pxl/pxprint.tcl


2013-05-14 17:39:47 +0100
Robin Watts <robin.watts@artifex.com>
397e20418223e2faba856ae80e7945faa1a10e99

Add gsicc_monitorcm.c to Win32 project.

gs/ghostscript.vcproj


2013-05-14 17:24:57 +0100
Ken Sharp <ken.sharp@artifex.com>
37b08e30586434098c9f6b8dc35fa25de39f468d

pdfwrite - when using %d in OutputFile, empty glyphs from cache

Bug #694069

When we are using '%d' in the Output File Name, we throw away the PDF font
resource after every page, but the intperpreter glyph cache remains filled.

This is a problem for type 3 fonts (specifically their PCL equivalents), as
we won't rerun the glyph description to capture it for a type 3 font, so
the glyphs don't get captured.

To solve this we empty any existing cache entry before attempting to run the
glyph. This runs into some more awkwardness with a specific kind of broken
font (no chacracter data) in some QL test files. We work around that too.

gs/devices/vector/gdevpdtt.c


2013-05-14 11:04:02 +0100
Chris Liddell <chris.liddell@artifex.com>
e76dc46756e89a14a3348bce12a633d32e4fa831

Allow command line override for endian setting.

Due bugs in certain versions of autoconf, we use an explicit check for
endianness instead of the built-in macro. This can result in problems when
cross compiling.

This override allows command line options to pre-empt the explicit check.

No cluster differences.

configure.ac
gs/configure.ac


2013-05-14 09:27:08 +0100
Ken Sharp <ken.sharp@artifex.com>
4692f1abb037f49bd5158fb6a988076fdc14754d

pdfwrite - really make all TrueType fonts symbolic

If we don't subset TrueType fonts, we still want to mark them as symbolic,
because we never emit a /Encoding, and without that Acrobat (but not
other readers) is unable to display some glyphs correctly.

No differences expected.

gs/devices/vector/gdevpdtd.c


2013-05-11 16:30:36 -0700
Ray Johnston <ray.johnston@artifex.com>
c03495a2c2df7f03d537dbbd53aedc014e0577d0

Add documentation for BGPrint and GrayDetection.

gs/doc/Language.htm


2013-05-09 20:47:31 -0700
Ray Johnston <ray.johnston@artifex.com>
7a8612112478196d8f047a556fdbb15d17aec7d0

Add PSFitPage and FitPage options to allow fitting PS files to a page.

The FitPage option is added as a convenience to set all three *FitPage
options, so -dFitPage is the same as -dEPSFitPage -dPDFFitPage -dPSFitPage.
The -dPSFitPage option is new and works by establishing the default
Polcies PageSize to 13.

When the Policy is 3 or 13, the page size matching logic rotates, scales,
and center a PostScript file's requested page size on the best fit medium.
When the Policy is 13, the the match_page_size enables the scaling down
(as with Policy 3) as well as up.

Only populate the InputAttr dictionary with the current page size if
FIXEDMEDIA is set (explicitly, or impiled by -g) so that only that
page size is available for match_page_size.

When the policy is 13, we enable the PageSize in the setpagedevice
merged request even if FIXEDMEDIA is set.

The make_adjustment_matrix has the check for factor < 1 removed since
this is accounted for in the caller setting the 'scale' boolean (larger).

The documentation in doc/Use.htm is updated for both the -dPSFitPage
option and the -dFitPage option.

gs/Resource/Init/gs_init.ps
gs/Resource/Init/gs_setpd.ps
gs/doc/Use.htm
gs/psi/zmedia2.c


2013-05-13 17:03:47 +0100
Chris Liddell <chris.liddell@artifex.com>
790240763991cf42b98b37c9dec22bf67df4c90d

Use the srcdir variable in configure for Luratech

One of the Luratech paths in the configure script wasn't using the srcdir
variable so would not work correctly for "out of tree" building.

No cluster differences.

gs/configure.ac


2013-05-11 10:30:46 +0100
Ken Sharp <ken.sharp@artifex.com>
606f3279e00ae250bf883ce45b90d276943ffe84

pdfwrite - don't cache high level pattern filled glyphs

Bug #693946 "High level pattern commit causes a regression"

If we use the cache when a glyph is filled with a high level pattern we will
get incorrect rendering, as the pattern was not passed down to the low level
routines. So make sure we don't cache glyphs under these conditions, nor
consult the cache for existing cached glyphs.

Expected Differences
14-07.bin and 19-10.bin should now work correctly

gs/devices/vector/gdevpdtt.c


2013-05-10 09:57:00 +0100
Ken Sharp <ken.sharp@artifex.com>
32954e1a310eb4a3673a0eb815be8d618e17aad4

epswrite - flush stream before writing page trailer

Bug #694061 "epswrite generates bad file"

The code (quite deliberately) writes the page trailer *directly to the file*
before flushing the stream. This resulted in the page trailer being emitted
part way through a path construction and fill. The fill is completed by the
flushing of the stream.

In this commit we flush the stream first.

No differences expected, the cluster does not test epswrite.

gs/devices/vector/gdevps.c


2013-05-10 08:31:44 +0100
Ken Sharp <ken.sharp@artifex.com>
ca6408d4bda6c899374984ba7705e734ff6c9d59

documentation - remove duplicated epswrite section in devices.htm

gs/doc/Devices.htm


2013-05-09 09:43:34 +0100
Chris Liddell <chris.liddell@artifex.com>
1f5bc0eb4bbb1c9512f8c63e953b9d2cd76ca563

Bug 693964: handle missing FistChar and Widths

When tailoring scaling a substitute font (based on the Widths array),
handle non-spec compliant files which are missing FirstChar and Width
entries from FontDescriptor dictionaries for non-base14 fonts.

No cluster differences.

gs/Resource/Init/pdf_font.ps


2013-05-08 17:00:27 -0700
Robin Watts <robin@peeves.(none)>
3aa5eb75e645d70f315193869179ec88ff20691c

Bug 693377: Fix warning in rinkj device due to pointer cast.

Cast via size_t to avoid warning.

gs/devices/rinkj/evenbetter-rll.c


2013-05-08 20:28:46 +0000
Robin Watts <robin.watts@artifex.com>
d8926b7746b8acbf870b3aed93ba2a4ee799e94b

Bug 693377: Fix some 32bit specific warnings in gdevmjc.c

gs/contrib/japanese/gdevmjc.c


2013-05-08 13:24:14 -0700
Robin Watts <robin@peeves.(none)>
d838c5de6baa30cec31542ae8998fe3d3a5e4b31

Bug693377: Squash some warnings in libtiff

Avoid warnings about casting pointer to int of a different size
by casting via size_t. Should be ptrdiff_t really, but we don't
have that in all cases.

gs/tiff/libtiff/tif_unix.c


2013-05-08 19:25:36 +0100
Robin Watts <robin.watts@artifex.com>
040915cc3ab82a9b0be77fa4dd27caa330f2ab5c

Squash some warnings.

In gs/base/gsroprun1.h we cast a pointer to an int and then & 3
to find alignment. Given ints are always > 2 bits, this is always
safe, but the compiler whinges anyway. We'd like to use ptrdiff_t
instead to avoid the whinging, but it's not defined. So define
our own using the ARCH_ macros.

In gs/base/gxclrect.c, we check for the size of a type, and then
shift down by it. The compiler complains that the shift may be
too large to be defined in C, not realising that this is precisely
what we have just checked. We work around this by shifting in 2
stages.

gs/base/gsroprun1.h
gs/base/gxclrect.c


2013-05-08 11:16:05 -0600
Henry Stiles <henry.stiles@artifex.com>
ae3839979568fcb7e4a158cff48eed037830878a

Miscellaneous warning and scan build fixes.

gs/devices/gdevpxut.c
gs/devices/vector/gdevsvg.c
pcl/pcsfont.c
pcl/pctext.c
pxl/pxsessio.c


2013-05-08 13:13:02 +0100
Paul Gardiner <paul@glidos.net>
b652073e14ebfccf7324ae05f9bf871502560bf4

WinRT: add build instructions

gs/doc/Make.htm


2013-05-08 13:31:22 +0100
Chris Liddell <chris.liddell@artifex.com>
4b4cde01cf5be3d9caa813532ca93603a36d2f20

Bug 688949: allow Ghostscript to build outside src tree

These changes allow you to run the Ghostscript configure script and make from
outside the source tree. Allowing the use of a "build directory" so the
source directory stays unadulterated.

The cluster test through up a load of compiler warnings, but none of them are
new, as far as I can tell.

No cluster differences.

gs/Makefile.in
gs/configure.ac
gs/cups/cups.mak
gs/devices/devs.mak


2013-05-07 17:11:19 -0600
Henry Stiles <henry.stiles@artifex.com>
9eb9408b3ccfdb8f0cf54d8ca9adcc79a102319a

Fix 693412 fix duplex and number of copies interaction.

Add pcl duplex command if the page count is divisible by the number of
copies not the raw page count to properly collate duplexing jobs.
Patch contributed by Binaria Digital.

gs/devices/gdevdljm.c


2013-05-07 15:40:50 +0100
Paul Gardiner <paul@glidos.net>
9429a2dbfe6609939185970beb4789bd438624af

Support building for WinRT

.gitignore
gs/base/gp_msdll.c
gs/base/gp_mswin.c
gs/base/gp_ntfs.c
gs/base/gp_win32.c
gs/base/gp_wpapr.c
gs/base/gp_wsync.c
gs/base/windows_.h
gs/base/winrtsup.cpp
gs/base/winrtsup.h
gs/ghostscript_rt.vcxproj
gs/psi/iapi.c
gs/psi/msvc.mak
main/pcl6_msvc.mak
winrt/GhostPDL.sln


2013-05-07 15:34:00 +0100
Chris Liddell <chris.liddell@artifex.com>
19dc7b855696c15a074067e883a13588aca8774d

Bug 691555: two jbig2dec patches for libpng14 Cygwin/MinGW

from yselkowitz@users.sourceforge.net

Adding "-lpng -lz" to LIBS causes everything to be linked against them,
whether or not they need them. Only the jbig2dec executable uses
libpng; libjbig2dec does not, so this causes a needless dependency on
libpng and zlib. Instead, define a separate PNG_LIBS variable and use
it in jpeg2dec_LDADD.

libtool requires the -no-undefined flag on PE platforms (Cygwin/MinGW)
in order to make a shared library due to the unique requirements of
DLLs.

No cluster differences.

gs/jbig2dec/Makefile.am
gs/jbig2dec/configure.ac


2013-05-07 15:11:10 +0100
Ken Sharp <ken.sharp@artifex.com>
cfa7da5e8b995023ab56186de1fe1e007619b63f

vector device - ensure colour changes are not restored away by clip

Bug #693951 "pswrite/epswrite is changing colors when creating an eps or an ps file from a ps file"

When an image is degenerated into trapezoids, then when writing the trapezoids
we first set the colour, then ensure any clip path is satisfied, then emit
the trapezoid and fill it.

However, if a clip path *is* pending, then it will emit a 'grestore' which
restores away the colour we initially set. This commit ensures that if a
clip is pending, we set the colour again after completing the clip.

No differences expected.

gs/base/gdevvec.c


2013-05-07 11:56:16 +0100
Chris Liddell <chris.liddell@artifex.com>
8128a2c74d319c430a76cca5620a6f4a77505e46

Bug 693253: have the "-h" output mention fontconfig

When Ghostscript is built to use fontconfig to try to find font files (in
addition to the "normal" paths), include a note in the "-h" output
that states fontconfig may be used.

No cluster differences.

gs/psi/imainarg.c


2013-04-15 18:35:36 +0100
Chris Liddell <chris.liddell@artifex.com>
e64ac4c83a4ae07dc15c4cacd7b60cba6294899a

Bug 693843: Add a gs_sprintf() function, and supporting code

Same as sprintf() but certain to be unaffected by localization.

Utilizes the "trio" string library, also added here. There is one modification
to trio, in trio.c and labelled with "/* GS Modification */" - by default, trio
is a little aggressive in the point it switches to exponent notation, and the
patch brings is more line with what we need/expect.

trio also includes a sscanf() function which we can utilise if required.

See the gs-sprintf branch for the individual commits - especially those in the
trio source, should a trio update ever be pulled in.

This causes rounding differences in the pdfwrite/ps2write output in a number
of the cluster files. They all appear to be pixel variations.

common/msvc_top.mak
common/ugcc_top.mak
gs/Makefile.in
gs/base/fapiufst.c
gs/base/gdevdevn.c
gs/base/gdevp14.c
gs/base/gp_macio.c
gs/base/gp_mswin.c
gs/base/gp_wgetv.c
gs/base/gs.mak
gs/base/gsalloc.c
gs/base/gsdevice.c
gs/base/gsdparam.c
gs/base/gsfcmap.c
gs/base/gsicc_create.c
gs/base/gsicc_manage.c
gs/base/gsiodisk.c
gs/base/gspmdrv.c
gs/base/gssprintf.c
gs/base/gssprintf.h
gs/base/gxblend.c
gs/base/gxblend1.c
gs/base/gxclmem.c
gs/base/gxhintn.c
gs/base/gxpath.c
gs/base/gxpcmap.c
gs/base/lib.mak
gs/base/md5main.c
gs/base/mkromfs.c
gs/base/sdcparam.c
gs/base/sjbig2.c
gs/base/spprint.c
gs/base/stdio_.h
gs/base/trio.mak
gs/base/unix-gcc.mak
gs/base/unixansi.mak
gs/base/winlib.mak
gs/base/wrfont.c
gs/base/write_t1.c
gs/base/write_t2.c
gs/contrib/eplaser/gdevescv.c
gs/contrib/gdevcd8.c
gs/contrib/gdevdj9.c
gs/contrib/gdevhl12.c
gs/contrib/gdevxes.c
gs/contrib/gomni.c
gs/contrib/japanese/dviprlib.c
gs/contrib/japanese/gdevfmlbp.c
gs/contrib/japanese/gdevfmpr.c
gs/contrib/japanese/gdevj100.c
gs/contrib/japanese/gdevlbp3.c
gs/contrib/japanese/gdevmag.c
gs/contrib/japanese/gdevnpdl.c
gs/contrib/lips4/gdevl4r.c
gs/contrib/lips4/gdevl4v.c
gs/contrib/pcl3/src/gdevpcl3.c
gs/cups/gdevcups.c
gs/devices/gdev3b1.c
gs/devices/gdev8510.c
gs/devices/gdevccr.c
gs/devices/gdevdjet.c
gs/devices/gdevijs.c
gs/devices/gdevl31s.c
gs/devices/gdevpng.c
gs/devices/gdevsppr.c
gs/devices/gdevsun.c
gs/devices/gdevtifs.c
gs/devices/gdevtsep.c
gs/devices/gdevupd.c
gs/devices/gdevwpr2.c
gs/devices/gdevxini.c
gs/devices/vector/gdevpdf.c
gs/devices/vector/gdevpdfb.c
gs/devices/vector/gdevpdfe.c
gs/devices/vector/gdevpdfg.c
gs/devices/vector/gdevpdfi.c
gs/devices/vector/gdevpdfm.c
gs/devices/vector/gdevpdfo.c
gs/devices/vector/gdevpdfr.c
gs/devices/vector/gdevpdft.c
gs/devices/vector/gdevpdfu.c
gs/devices/vector/gdevpdfv.c
gs/devices/vector/gdevpdtb.c
gs/devices/vector/gdevpdtc.c
gs/devices/vector/gdevpdtf.c
gs/devices/vector/gdevpdti.c
gs/devices/vector/gdevpdtt.c
gs/devices/vector/gdevpdtw.c
gs/devices/vector/gdevps.c
gs/devices/vector/gdevpsf1.c
gs/devices/vector/gdevpsf2.c
gs/devices/vector/gdevsvg.c
gs/devices/vector/gdevtxtw.c
gs/devices/vector/gdevxps.c
gs/psi/dmmain.c
gs/psi/dpmain.c
gs/psi/dscparse.c
gs/psi/dwimg.c
gs/psi/dwmainc.c
gs/psi/dxmain.c
gs/psi/int.mak
gs/psi/iparam.c
gs/psi/iutil.c
gs/psi/iutil2.c
gs/psi/msvc.mak
gs/psi/zbfont.c
gs/psi/zdouble.c
gs/psi/zfapi.c
gs/psi/zfont2.c
gs/trio/CHANGES
gs/trio/FILES
gs/trio/Makefile.in
gs/trio/README
gs/trio/autogen.sh
gs/trio/compare.c
gs/trio/configure.in
gs/trio/doc/doc.h
gs/trio/doc/doc_dynamic.h
gs/trio/doc/doc_printf.h
gs/trio/doc/doc_register.h
gs/trio/doc/doc_scanf.h
gs/trio/doc/doc_static.h
gs/trio/doc/footer.html
gs/trio/doc/header.html
gs/trio/doc/trio.cfg
gs/trio/doc/trio.css
gs/trio/example.c
gs/trio/html/group___dynamic_strings.html
gs/trio/html/group___printf.html
gs/trio/html/group___scanf.html
gs/trio/html/group___special_quantities.html
gs/trio/html/group___static_strings.html
gs/trio/html/group___user_defined.html
gs/trio/html/index.html
gs/trio/html/modules.html
gs/trio/html/trio.css
gs/trio/install-sh
gs/trio/maketgz
gs/trio/regression.c
gs/trio/strio.h
gs/trio/trio.c
gs/trio/trio.h
gs/trio/triodef.h
gs/trio/trionan.c
gs/trio/trionan.h
gs/trio/triop.h
gs/trio/triostr.c
gs/trio/triostr.h
main/pcl6_gcc.mak
main/pcl6_msvc.mak
pcl/pcfontpg.c
pcl/pcht.c
pcl/pcstatus.c
pl/dwimg.c
pl/dwmainc.c
pl/pjparse.c
pl/plmain.c
pxl/pxerrors.c
pxl/pxfont.c
pxl/pxpthr.c
svg/svg_msvc.mak
xps/xps_msvc.mak
xps/xpsttf.c
xps/xpszip.c


2013-05-07 08:24:06 +0100
Ken Sharp <ken.sharp@artifex.com>
07ba8bea8e98084a156edac611a4ae92545edf06

fix commit 2adc88900956d92433e1d97ca3a22170a462f098

Seems there was a typo in this commit, which is fixed here.

gs/base/gxclread.c


2013-05-07 08:18:12 +0100
Ken Sharp <ken.sharp@artifex.com>
50533c139389cdfa7c652eb60b973239033aebc3

pdfwrite - get rid of some compiler warnings

gs/devices/vector/gdevpdtb.c


2013-05-02 17:03:57 -0700
Ray Johnston <ray.johnston@artifex.com>
2adc88900956d92433e1d97ca3a22170a462f098

Finish GrayDetection implementation and add pnmcmyk example device.

The pnmcmyk device will output a P5 pgm file if the page source colors
are all (near) neutral, otherwise will output PAM P7 32-bit CMYK.
This device is intended to be an example for a customer.

Note that there is a conditional compile based on PESSIMISTIC_CMYK_NEUTRAL
that, if defined, will assume that if any C, M, or Y component has a value
greater than DEVICE_NEUTRAL the page will be treated as color (even if all
three components are 100%). This may be what the customer requested.
The default comparison is based on the C, M, and Y components be close to
each other (similar to RGB).

Also disable graydetection during clist playback. We don't need worry about
page mode because colors are already processed as the image is rendered
into the page buffer, but high level images in the clist would slow down
if graydetection was performed again.

gs/base/gsicc_monitorcm.c
gs/base/gxclread.c
gs/devices/devs.mak
gs/devices/gdevpbm.c
gs/psi/msvc.mak


2013-05-06 17:03:10 +0100
Ken Sharp <ken.sharp@artifex.com>
b04bd6b0bb5098b809b3d06f69e2eb55905af648

pdfwrite - DO not leave dangling references in font/matrix cache

Bug #693948 "%d not working with pcl"

Under some conditions (TrueType fonts, but not CID TT), we end up adding the
font to the font/matrix cache. However, the font we add is a copy of the
original.

If we are using %d to emit multiple files, then we free our copies after
every page. However, we did not purge the cache, leading to stale pointers
in it. If we then reused a font we could end up trying to use a stale
pointer with unfortunate results.

This commit adds a 'notify' procedure so that we clear copied fonts from
the cache when they are released.

This caused one difference in the regression tests, which I do not understand
but is not visilby different....

Signed-off-by: Ken Sharp <ken.sharp@artifex.com>

gs/devices/vector/gdevpdtb.c


2013-05-06 07:47:00 -0600
Henry Stiles <henry.stiles@artifex.com>
0a3d34cfec18ffd3ae1c6fd29dc3c6d4755fe5a3

Fix font state variables not propely initialized and add character
angle state in PXL Pass Thru mode.

We note several progression in T427.BIN and C705.BIN with the change.

pxl/pxpthr.c


2013-04-29 09:40:19 -0700
Ray Johnston <ray.johnston@artifex.com>
73957305ae44e43174cd8173b94c35f9f4ca55b4

Add gdev_prn_bg_output_page (and _seekable) to support BGPrint.

Some devices are not compatible with background printing, if they are
not thread safe (use globals) or update the device structure.
Simple updates to the device structure can be handled in a device's
own output_page function that performs any actions needed before
calling gdev_prn_bg_output_page, then performing any action needed
after the page is printed (or started in the background). The cups
device is an example of this.

If the page is printed in the background, it uses a clone of the device
structure, so any changes to that structure will not be reflected in
the foreground device.

The devices were reviewed and those that were changed to use gdev_prn_bg
output_page proc should be safe for background printing, but only
those that are used in regression testing have been tested by forcing
BGPrint=true.

gs/base/gdevprn.c
gs/base/gdevprn.h
gs/cups/gdevcups.c
gs/devices/devs.mak
gs/devices/gdev3852.c
gs/devices/gdev4081.c
gs/devices/gdev4693.c
gs/devices/gdev8510.c
gs/devices/gdevadmp.c
gs/devices/gdevatx.c
gs/devices/gdevbit.c
gs/devices/gdevbj10.c
gs/devices/gdevbmp.c
gs/devices/gdevccr.c
gs/devices/gdevcdj.c
gs/devices/gdevcfax.c
gs/devices/gdevcif.c
gs/devices/gdevclj.c
gs/devices/gdevcljc.c
gs/devices/gdevcslw.c
gs/devices/gdevdfax.c
gs/devices/gdevdjet.c
gs/devices/gdevdjtc.c
gs/devices/gdevdm24.c
gs/devices/gdevepsc.c
gs/devices/gdevepsn.c
gs/devices/gdevescp.c
gs/devices/gdevfax.c
gs/devices/gdevhl7x.c
gs/devices/gdevicov.c
gs/devices/gdevimgn.c
gs/devices/gdevjbig2.c
gs/devices/gdevjpeg.c
gs/devices/gdevjpx.c
gs/devices/gdevl31s.c
gs/devices/gdevlbp8.c
gs/devices/gdevlj56.c
gs/devices/gdevlp8k.c
gs/devices/gdevlxm.c
gs/devices/gdevmgr.c
gs/devices/gdevmiff.c
gs/devices/gdevn533.c
gs/devices/gdevo182.c
gs/devices/gdevokii.c
gs/devices/gdevpbm.c
gs/devices/gdevpcx.c
gs/devices/gdevperm.c
gs/devices/gdevphex.c
gs/devices/gdevpjet.c
gs/devices/gdevplan.c
gs/devices/gdevplib.c
gs/devices/gdevpng.c
gs/devices/gdevpsd.c
gs/devices/gdevpxut.c
gs/devices/gdevpxut.h
gs/devices/gdevrinkj.c
gs/devices/gdevsgi.c
gs/devices/gdevsj48.c
gs/devices/gdevsppr.c
gs/devices/gdevstc.c
gs/devices/gdevsunr.c
gs/devices/gdevtfax.c
gs/devices/gdevtfnx.c
gs/devices/gdevtknk.c
gs/devices/gdevtsep.c
gs/devices/gdevxcf.c
gs/devices/vector/gdevlj56.c
gs/devices/vector/gdevpxut.c
gs/devices/vector/gdevpxut.h


2013-04-10 20:24:02 -0700
Ray Johnston <ray.johnston@artifex.com>
c947a5c62b9eef2b2b2afcab986a5b7bbb8fc3ad

Add BGPrint prn device parameter to render clist pages while parsing.

This enhancement closes the clist files of the page, then starts a
printing thread (prn_print_page_in_background) to write out the page
and returns to allow parsing of the next page into a new set of clist
files while the 'bg printing' thread writes out the data, performing
compression and other conversion that the BGPrint=false mode performs
in the main (parsing) thread.

If NumRenderingThreads > 0, the band rendering will also be performed
for multiple bands in separate threads.

Thus, the parsing of pages after the first will potentially overlap
the rendering and writing of the previous page. No queue is maintained,
so the overlap is limited to the next page.

If bg_print.device is not NULL, then we have a page that was rendered
in the background that we may need to wait for before pprinting the next
page or exiting. After we call the prn_finish_bg_print, we may need to
re-open the printer in case it was closed (most commonly due to %d in
the fname).

When printing in foreground mode, the bg_print.device will be NULL.

Note, We can't use the icc_table created for the foreground since it may
be in GC'd memory (it must be created with the thread's allocator).

The equivalent_cmyk_colors are needed by the backgorund print device.
Add .EquivCMYKColors device parameter which is an array of 5 integers per
spot color. The first integer is 'valid' followed by the 'frac' C, M, Y
and K values. This allows the gs_putdeviceparams to have the spot color
information.

The foreground device was relying on the print_page procedure to free
the separation names from a page before starting the next page. Move
this to gdev_prn_output_page instead. Also since this is common, we
don't need it in gdevpsd and gdevtsep print_page functions.

Expected difference when BGPrint=true is 99-01-fixed.PS for all devices
due to adding the .EquivCMYKColors device parameter.

gs/base/gdevdevn.c
gs/base/gdevprn.c
gs/base/gdevprn.h
gs/base/gxclist.h
gs/base/gxclpage.c
gs/base/gxclthrd.c
gs/base/gxclthrd.h
gs/base/lib.mak
gs/devices/gdevplib.c
gs/devices/gdevpsd.c
gs/devices/gdevtsep.c


2013-05-05 10:05:52 +0100
Ken Sharp <ken.sharp@artifex.com>
a5874589447b76a99eef2114acd12633beed7424

squelch a couple of minor compiler warnings

pcl/pcpatrn.c
pl/plchar.c


2013-05-04 09:13:12 +0100
Ken Sharp <ken.sharp@artifex.com>
e99c0e5b704954d61bfe5a26c410fdb01a3c48ae

Initialise a pointer to non-NULL to silence static analysis warning

The 'dereference of a non-NULL pointer' is incorrect, its not possible to
reach the questionable de-reference with the pointer NULL but it seems the
static analyser can't detect that. This should silence it.

gs/devices/vector/gdevpsdi.c


2013-05-04 09:11:32 +0100
Ken Sharp <ken.sharp@artifex.com>
601084bf86031eea15312c27718d13a7beda85a9

Include a prototype for gs_next)ids to silence a compiler warning

pcl/pcpalet.c


2013-05-03 10:37:50 +0100
Chris Liddell <chris.liddell@artifex.com>
a5a841b816c528b6f16a83ec02020db5953dde79

Update CFLAGS for debug build with gcc.

Add debug flags so that as many versions as possible of gcc will include the
macro expansion data in the debug build.

No cluster differences.

gs/configure.ac


2013-05-03 10:32:16 +0100
Chris Liddell <chris.liddell@artifex.com>
7db1a288da4d7838ec801e69f3e2f6bf46598aaa

Slightly de-macro-fy scfd.c

There were two macros used which were *way* too big for "good practice"
coding ("get_run" and "invert_data", and one changed for convenience
("skip_data").

Changing them to functions and testing shows a few seconds penalty for the
entire test suite - an acceptable trade, IMHO.

No cluster differences.

gs/base/scfd.c


2013-05-03 10:19:34 +0100
Chris Liddell <chris.liddell@artifex.com>
e7de6bf79a5702b79f1960af937955c7f6627e02

Bug 693940: remove deprecated call from gs/ijs/configure.ac

Thanks to James Cloos for pointing it out.

No cluster differences.

gs/ijs/configure.ac


2013-04-29 09:02:03 +0100
Ken Sharp <ken.sharp@artifex.com>
9cd48ce016f8ce490d32679dab5de3cd781f6f85

Add high level pattern support to PCL and HPGL

Unlike the PXL interpreter, but like XPS, the coding has been done in the
implementation routines rather than at the interpreter level. There are two
reasons for this; firstly the PCL interpreter already called gx_dev_set_color
and secondly the HPGL interpreter makes extensive use of macros which weren't
readily amenable to being altered in a way which would have allowed the
gs_error_Remap_Color error to be propogated upwards as required.

There are some differences with this commit, they are either very minor or
progressions (in my opinion).

gs/base/gsptype1.c
gs/base/gsptype1.h
pcl/pcdraw.c
pcl/pcpatrn.c
pcl/pctop.c
pcl/pgdraw.c
pl/plchar.c


2013-04-30 11:09:57 +0100
Ken Sharp <ken.sharp@artifex.com>
1c6f8a9297a2b16c22145a0328734ed137c02215

pdfwrite - handle Intellifonts as type 3 fonts

In order to deal with high level patterns used as the fill colour for an
Intellifont, we need to handle Intellifonts as type 3 fonts, just like
the stick font, and PCL bitmap fonts.

This results in numerous differences; in general text is bolder at
low resolution, the file 23-15.bin exposes a probable GS bug where the
glyphs are clipped at higher resolutions.

However, text can now be searched (also copy/paste), and the PDF files are
potentially smaller due to not having to emit each glyph description every
time it is used.

gs/devices/vector/gdevpdtd.c
gs/devices/vector/gdevpdte.c
gs/devices/vector/gdevpdtf.c
gs/devices/vector/gdevpdti.c
gs/devices/vector/gdevpdts.c
gs/devices/vector/gdevpdtt.c
gs/devices/vector/gdevpdtw.c


2013-05-02 09:56:04 +0100
Ken Sharp <ken.sharp@artifex.com>
437fd175241212c5dad1f045857956f12a588774

pdfwrite - fix some compiler warnings introduced with the palette colour fix

pxl/pxgstate.h
pxl/pxink.c
pxl/pxpaint.c
pxl/pxparse.c


2013-04-29 17:39:07 +0100
Ken Sharp <ken.sharp@artifex.com>
1c69af7f3e9830c39eb81961e90691e2ec847342

pdfwrite - fix buffer overrun in CIDToGIDMap

Bug #693854 "PDFA/2b conversion crashes often"

When converting TrueType fonts into CIDFOnts, because we are creating a PDF/A
output file, the calculated length of the CIDToGIDMap could be out by one
as the first CID is 0.

This later led to us writing beyond the end of the buffer, which could cause
real problems, depending on what was overwritten.

No differences expected.

gs/devices/vector/gdevpdtd.c


2013-04-29 16:18:57 +0100
Ken Sharp <ken.sharp@artifex.com>
6664f4554a5d63560f94ea99214a9ad289e8e925

Merge branch 'PCL_palette'


2013-04-26 12:57:40 +0100
Ken Sharp <ken.sharp@artifex.com>
7086f246fa047bcb9f3e9cfaacfbdae709058b91

Allow devices to inform the PCL interpreter that it must not alter palettes

Bug #692786 "Problem with HPGL paletted colour"

pdfwrite (and potentially other devices) can't cope with situations where the
interpreter alters the 'palette' (the lookup table in a /Indexed space) after
the space has been set to be the current color space.

However, if we unilaterally preserve the palette, it seems that this causes
performance problems (see bug #692786.

Here we add a new special op 'needs_invariant_palette' which allows a device
to communicate this. We alter the PCL interpreter to inquire the device's
requirements, and aler pdfwrite to communicate its needs.

This results in > 300 differences with pdfwrite, all of them progressions

gs/base/gdevdflt.c
gs/base/gxdevsop.h
gs/devices/vector/gdevpdfi.c
pcl/pcpalet.c


2013-04-29 13:01:42 +0100
Ken Sharp <ken.sharp@artifex.com>
e4ce3d9147ca6a4f2bdd9a0319b4b7d606492799

pdfwrite - add missing line from last commit

gs/devices/vector/gdevpsdi.c


2013-04-29 11:27:14 +0100
Ken Sharp <ken.sharp@artifex.com>
efdd46d415d7b117a6c5fcadd7c40facdd0db6af

pdfwrite - implement bicubic downsampling

Bug #693832 "Implement bicubic image downsampling in pdfwrite"
Bug #693917 "pdfwrite only downsamples by integer scales"

Adopting the patch from Math supplied in Bug #693832 resolves both
these problems. No cluster differences as the cluster doesn't test this
feature.

gs/devices/vector/gdevpsdi.c
gs/devices/vector/gdevpsds.c
gs/devices/vector/gdevpsds.h


2013-04-27 08:18:18 +0100
Chris Liddell <chris.liddell@artifex.com>
9fac58e19010c5f0772289052082d98f5d89e9a3

Use "seekable" rather than "positionable"

At Ray's suggestion, tweak the names from the previous commit.

No cluster differences.

gs/base/gdevprn.c
gs/base/gdevprn.h
gs/devices/gdevbmpa.c
gs/devices/gdevdfax.c
gs/devices/gdevsgi.c
gs/devices/gdevtfax.c
gs/devices/gdevtfnx.c
gs/devices/gdevtsep.c


2013-04-25 19:21:36 +0100
Chris Liddell <chris.liddell@artifex.com>
8bf1c216211d1bf036369fd731fafd1b30eff168

Have gdev_prn_open_printer_seekable() work sensibly

If gdev_prn_open_printer_seekable() gets called with the seekable flag set,
and it can't return a seekable file object, return an error, rather than
silently ignore the flag.

Add a generic gdev_prn_output_page_positionable() function to replace the one
that was dedicated to the TIFF devices, and update the TIFF devices and the
two other devices which require positionable output files to use it.

No cluster differences.

gs/base/gdevprn.c
gs/base/gdevprn.h
gs/devices/gdevdfax.c
gs/devices/gdevsgi.c
gs/devices/gdevtfax.c
gs/devices/gdevtfnx.c
gs/devices/gdevtifs.c
gs/devices/gdevtifs.h
gs/devices/gdevtsep.c


2013-04-25 12:01:31 +0100
Chris Liddell <chris.liddell@artifex.com>
46d3a7b65de05a0268ce969f8070064bc14913e5

Bug 693704: Use font name to determine italic-ness

Allow the font name analysis to override the Italic Flags field from the font
descriptor in determining if a font is italic or oblique.

This results it progressions (when compared to Acrobat, and several other PDF
readers) in these cluster files:

prfmm.pdf
CATX2445.pdf
fts_23_2308.pdf
1265_-_portable_collection.pdf
x_-_Times_New_Roman_wrongly_substituted_regression.pdf

gs/Resource/Init/pdf_font.ps


2013-04-25 07:48:11 +0100
Chris Liddell <chris.liddell@artifex.com>
239b3af18363a77785837af64842afe0bc433c67

Small doc updates.

State clearly that the TIFF devices must use a seekable file for output.

Update the description of CropBox - largely paraphrasing the PDFRM.

CLUSTER_UNTESTED

gs/doc/Devices.htm
gs/doc/Use.htm


2013-04-24 19:56:45 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
27a54e4b455c4295e5effc8bb6a392b6a44f118c

Bug 693933: Fix division by 0 in monotony check.

Monotony checking procedure caused division by 0 when the start and
the end points of the interval were the same. Any function on such a
domain is now considered monotonic.

gs/base/gsfunc3.c


2013-04-24 12:17:54 -0700
Ray Johnston <ray.johnston@artifex.com>
ce3ca09ca7e0b489187fc9788aaa795707f17ed1

Fix broken windows build due to missing #include "stat_.h"

gs/base/gp_mswin.c


2013-04-24 08:27:41 +0100
Chris Liddell <chris.liddell@artifex.com>
55bbe8836df1bb8e521a6fb4e79a91d7e0702fb1

Bug 693932 (related): generate meaningful error

Add a gp_fseekable() function, and use it to check the file object opened in
gdev_prn_open_printer_seekable(). If the file is not seekable, print an error
message and return an IOerror.

No cluster differences.

gs/base/gp.h
gs/base/gp_mswin.c
gs/base/gp_os2.c
gs/base/gp_unifs.c
gs/base/gp_vms.c
gs/devices/gdevtifs.c


2013-04-22 15:56:11 -0700
Michael Vrhel <michael.vrhel@artifex.com>
e67086e1d63d449900570b30e2b2e1c91ed187a4

Initial commit of adding neutral color monitoring

This commit adds in the command line option -dGrayDetection=true/false. When set, the special CMM procedures
will be inserted to monitor the presence of non-neutral colors. When a non-neutral color is encountered
no additional monitoring will be preformed. Monitoring is done during the clist writing phase and as such
high level images are also monitored. CMYK Colors are consider non neutral if C=M=Y=0 (or very close). RGB
colors are considered neutral if R=G=B or very close and CIELAB colors are considered neutral if a=128 and b=128
or very close. A fuzzy range can be set for how close we need to be via defines in the code. The
current values were set based upon using images that were created to be monochrome in Photoshop using ICC
profiles. Testing for this was performed for a variety of image types. The remaining part of this project,
which relates to bug number 693583 is to do something useful with the presence of monochrome only data during
the clist playback phase. The values pageneutralcolor = true and graydetection, which are member variables in
cmm_dev_profile_t, during clist playback will indicate that the page is neutral. Note that the clist playback
device should set pageneutralcolor = false during the actual playback to avoid continued monitoring of
high level image data, which would occur as the data is pushed through the CMM. graydetection is the
device parameter and as such, pageneutralcolor only has meaning when graydetection = true.

gs/base/gdevp14.c
gs/base/gdevp14.h
gs/base/gscms.h
gs/base/gsdparam.c
gs/base/gsequivc.c
gs/base/gsicc_cache.c
gs/base/gsicc_cache.h
gs/base/gsicc_cms.h
gs/base/gsicc_lcms2.c
gs/base/gsicc_manage.c
gs/base/gsicc_monitorcm.c
gs/base/gsicc_nocm.c
gs/base/gsicc_replacecm.c
gs/base/gxclimag.c
gs/base/gximage.c
gs/base/gxiparam.h
gs/base/gxipixel.c
gs/base/lib.mak


2013-04-23 00:54:24 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
07abd0c0bbddef1eed84969e9d8b7ba5f548d0d9

Bug 687604: Reject out-of-bounds access to cvt table.

Revert the patch b550e8c460daa0647fd1f4ce63ae3c73edc75a5c because
it is not needed now, but it causes SEGV when cvt table is missing.

gs/base/ttinterp.c


2013-04-22 21:28:57 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
6f51cd7b9d5c2e5185eec30579238bb14863a5e5

Bug 693930: Accept and ignore null entries in the page tree.

gs/Resource/Init/pdf_main.ps


2013-04-21 19:20:12 -0600
Henry Stiles <henry.stiles@artifex.com>
11638a77454ace993bf106dab3cd7e182bf1e250

Fix 693836, valgrinds reports read of uninitialized value.

The loop accessed memory past the end of each source line. This did
not result in an error because we would exit the loop before the data
was used, but nonetheless it is an invalid read outside the memory
allocation so we rearrange the loop conditions to avoid it.

gs/base/gdevm24.c


2013-04-21 11:29:08 +0100
Chris Liddell <chris.liddell@artifex.com>
a63c1486c770a810a6cfa24ab397ee3c3c798816

Bug 687604: work around another broken TT font

Fallback to rendering unhinted if Freetype returns an Invalid_Reference error.

No cluster differences.

gs/base/fapi_ft.c


2013-04-19 17:29:04 +0100
Ken Sharp <ken.sharp@artifex.com>
5ec87a6d6971f059c4135af3fddd17b34f20c7ae

pdfwrite - actually assign the structure members to 0

gs/devices/vector/gdevpdte.c


2013-04-19 14:41:21 +0100
Ken Sharp <ken.sharp@artifex.com>
9155d0f3ee7bb9ffc6cb63b21402b5219c7335f2

pdfwrite - initialise some structure members to pacify valgrind

pdf_glyph_widths already sets these to zero, so we only need to bother if
we aren't using pdf_glyph_widths.

No differences expected.

gs/devices/vector/gdevpdte.c


2013-04-19 09:35:18 +0100
Chris Liddell <chris.liddell@artifex.com>
0d3f3ab6ceeaf2b95f9318845bce770cf44efad7

Bug 693925: Add some checking for ufst configure option

The two configure scripts now check for the existence of the specified UFST
directory, and for the existence of fapiufst.mak in that directory.

No cluster differences.

configure.ac
gs/configure.ac


2013-04-19 10:03:45 +0100
Ken Sharp <ken.sharp@artifex.com>
7e62f84b93a517ac43ebb5d26912a0786b37916e

pdfwrite - fix transparency preservation with PDF/A-2

An oversight with the introduction of PDF/A-2 could lead to transparency
not being preserved, because we tested only the request for PDF/A without
checking the level required.

No Differences expected, not tested by the cluster.

gs/devices/vector/gdevpdft.c


2013-04-19 00:13:18 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
4b0ccdcd37d8bf5924bd9572994535c5a1b20169

Bug 693869: work around errors in dash offset calculation

Make sure that the offsed doesn't exceed the total length of
the dash pattern. Fix out-of-bounds access and a corresponding
Valgrind warning.

gs/base/gsline.c


2013-04-18 11:04:49 -0600
Henry Stiles <henry.stiles@artifex.com>
52d113e470047ea70485de785bc9a3b68731127c

Fix typo in SVG output device (bug #693922) by Shailesh Mistry.

gs/devices/vector/gdevsvg.c


2013-04-18 09:06:08 +0100
Ken Sharp <ken.sharp@artifex.com>
f521500bdc2d39ad5f2caf91b3630a1370a08a5f

Add high level pattern support to the PXL interpreter

Also, fix a possible Seg fault in pdfwrite, which was uncovered by this
work.

As might be expected this commit does introduce a fairly large number of
differences in the regression tests. I've looked at them all and I'm happy
that they are minor differences rather than faults.

gs/devices/vector/gdevpdfb.c
pxl/pxfont.c
pxl/pxgstate.c
pxl/pximage.c
pxl/pxink.c
pxl/pxl.mak
pxl/pxpaint.c
pxl/pxparse.c


2013-04-18 08:34:41 +0100
Chris Liddell <chris.liddell@artifex.com>
23e6bd304db08011b67b7f45dfcf23885fc0c8a3

Bug 693921: "refresh" pointer when rendering glyph

Before we call into the gs_fapi_do_char(), refresh the context pointer in the
FAPI server data - in case the context has been moved by a GC since the font
was created.

No cluster differences.

gs/psi/zfapi.c


2013-04-17 17:46:16 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
ece14831a4301dd0291184e1f27729b73d6f350b

Bug 693919: Replace malformed numbers with 0.

Scan BBox elements and replace non-numbers with 0. Our PDF tokenizer
usually assumes that malformed numerals are names.

gs/Resource/Init/pdf_main.ps


2013-04-17 14:30:10 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
d9a327b4e24043fb153996fdd18a367483d13521

Bug 693920: Add missing dereference of an indirect object.

gs/Resource/Init/pdf_draw.ps


2013-04-17 12:29:11 +0100
Chris Liddell <chris.liddell@artifex.com>
4dfe603dc49aeee09457ea7a0734d7484e0467ea

Add tiff-config directory to .gitignore.

CLUSTER_UNTESTED

.gitignore


2013-04-15 19:10:25 +0100
Chris Liddell <chris.liddell@artifex.com>
b1254130df0da4c311e9761b5784a12c6dad1dc9

Have tiff configure run in separate directory.

Run libtiff's configure script in a separate directory to prevent poluting
libtiff's source directory.

the Ghostscript distclean target has been revised to remove the tiff config
directory, and the ghostpdl makefile has new distclean and maintainer-clean
targets.

No cluster differences.

Makefile
common/msvc_top.mak
configure.ac
gs/Makefile.in
gs/base/gs.mak
gs/base/lcupsi.mak
gs/base/tiff.mak
gs/base/unix-gcc.mak
gs/base/unixansi.mak
gs/configure.ac
gs/psi/msvc.mak
gs/toolbin/localcluster/clusterpush.pl
main/pcl6_gcc.mak
main/pcl6_msvc.mak
svg/svg_msvc.mak
xps/xps_msvc.mak


2013-04-17 09:23:19 +0100
Chris Liddell <chris.liddell@artifex.com>
1c006433024cb996022db86a7e7ec59f103e8efb

Remove the deprecated macos-fw.mak

CLUSTER_UNTESTED

gs/base/macos-fw.mak
gs/doc/Develop.htm


2013-04-17 09:24:22 +0100
Chris Liddell <chris.liddell@artifex.com>
28acb04f77ba58b1507c32d52402e2ff8eaa2e40

Raise the default VMThreshold from 1Mb to 8Mb

This seems like a fair change based on modern hardware and, in particular
modern PDF files. In some cases this results in a significant speed
improvement. It may increase overall memory usage, but testing suggests only
by an insignificant amount in the vast majority of cases.

No cluster differences.

gs/psi/zvmem2.c


2013-04-15 09:38:56 +0100
Chris Liddell <chris.liddell@artifex.com>
407cc61e87b0fd9d44d72ca740af7d3c85dee78d

"starting_arg_file" should only apply once.

The "starting_arg_file == true" setting should apply to the *first* call to
lib_file_open() in the context of a given call to runarg(). Previously, it
remained set for the entire duration of the runarg() call, resulting in the
current directory being searched for any resource files required by the job.

We also want "starting_arg_file == false" when runarg() is called to execute
Postscript from a buffer, rather than a file argument.

There is a very small chance this may cause problems with some strange scripts
or utilities, but I have been unable to prompt such an issue. If one does arise,
we may have rethink this entirely.

No cluster differences.

gs/psi/imainarg.c
gs/psi/zfile.c


2013-04-13 23:21:50 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
3648ad1d3d1f47df3e4a6e36ff5160e2bff25079

Remove spurious address-of operator.

gs/base/gscscie.c


2013-04-13 01:36:44 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
ed31bf693b457ecd13cfa4fc67f12288241448ce

Bug 691389: Pacify Valgrind; zero image flip buffer.

When the image has less than 8 scanlines, flipping includes the wild
end of the buffer and causes warnings in memflip8x8().

gs/base/gxifast.c


2013-04-10 20:13:05 +0100
Robin Watts <robin.watts@artifex.com>
cd414f3582ef95a3b0fd941e62370053126cba5c

Avoid potential out of bounds memory accesses

In image_render_mono we have code that skips forwards multiple
pixels at a time without checking for hitting the end of the
buffer. Fix that here.

gs/base/gximono.c


2013-03-24 11:23:01 +0000
Chris Liddell <chris.liddell@artifex.com>
ecc7a199e9307475c37fea0c44d24b85df814ead

Bug 693488: Improved glyph name aliasing.

Implement a more flexible approach to glyph name aliasing which handles all the
names in the Adobe Glyph List.

Thanks to John Wehle ( john@feith.com ) for this implementation.

For the time being, you can use "-dUSEOLDGLYPHALIASING" to revert to the old
code - assuming all goes well, that option will be removed for the release
following 9.09.

No cluster differences.

gs/Resource/Init/gs_ttf.ps
gs/Resource/Init/gs_type1.ps


2013-04-11 17:22:11 +0100
Ken Sharp <ken.sharp@artifex.com>
4c27c7d63acbf4500eab8d056541535ed5010b5c

ps2write - do not emit CIEBased spaces as ICCBased for PostScript

This was an oversight when I was trying to preserve CIEBased colour spaces,
it turns out that its not possible to preserve them, and I accidentally left
the code emitting them as ICCBased, which doesn't work in PostScript.

We now fall back to the old approach, in future we hope to use LCMS2 to
create a CIEBased space from the ICCBased profile for us.

No differences expected, code not enabled by default

gs/devices/vector/gdevpdfc.c


2013-04-02 12:26:09 +0100
Chris Liddell <chris.liddell@artifex.com>
9ff3e23fcf1c73e83e4bbb797b9033c7a25bf255

Bug 693804: (valgrind) initialize gs_fapi_raster

It's easiest to set the entire struct to zeros, since we need to initalize
nearly the entire structure anyway, before passing to the scaler/renderer.

No cluster differences

gs/base/gxfapi.c


2013-04-02 17:23:24 +0100
Chris Liddell <chris.liddell@artifex.com>
55c01c51ac53d244affde7b683f1f4cff24bcc46

Bug 693785: (valgrind) make gx_hld_saved_color_equal() do explicit checks

gx_hld_saved_color_equal() originally did a simple memcmp(), but due to padding
and GC considerations, that isn't reliable, so it needs to compare the contents
of the structure explicitly.

This does cause some differences in the PCL cluster tests with pdfwrite.

gs/base/gxhldevc.c
gs/base/lib.mak


2013-04-03 16:42:24 +0100
Chris Liddell <chris.liddell@artifex.com>
312d3c7655e2484e27160478e3120796cf9bbe10

Bug 693736: (valgrind) rejig a call to a function pointer

This is just a rejig to a functionally equivalent form that valgrind seems happier with.

It makes no real difference, but reduces the valgrind "noise" at no expense.

No cluster differences.

gs/psi/igc.c


2013-04-10 16:11:05 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
d73d2d365efc7331bf1dbfe70e427e8ead829778

Bug 693738: Trap bit run search

Fix a valgrind warning. Create a termination zone filled with
alternating bit pattern to guarantee that a search for a bit run
ends within the termination zone.

gs/base/scfd.c


2013-04-08 22:42:24 -0700
Ray Johnston <ray.johnston@artifex.com>
a3225b70cb1b92ca0f657d99b3bc496e6046fc39

Fix valgrind issue, bug 693735. image_render_mono condition using UMR.

The psrc scanning loop did not stop at the end of the data in some
cases. Since data past the image would tend to be variable, this
would usually stop scanning fairly soon and the 'fit_' macro logic
in fill/copy routines would make sure to limit the painting to a
valid area. Strange that this didn't show up in image artifacts.

gs/base/gximono.c


2013-04-10 00:56:15 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
897c36aa8cd754448bab5b712e48d46e2b117478

Bug 693798: Fix buffer overrun.

When jbig2dec detects that a run of pixels exceeds the image width,
it clamps the beginning and end of the run to the image width+1.
Probably, this is done to make runs that are entirely outside of the
image to leave no marks. This patch adds 1 byte to the image
buffer to ensure that writing 1 byte beyond the image line is valid.

gs/jbig2dec/jbig2_image.c


2013-04-09 15:15:00 +0100
Ken Sharp <ken.sharp@artifex.com>
5f5524b1f2ab76aff70b2b4a896b9474bdfb9501

pdfwrite - prevent rounding errors in TrueType widths

See Bug #693825

Rounding errors converting TrueType widths into PostScript/PDF led to us
emitting lots of tiny glyph movements. These were visually imperceptible
but led to larger than necessary output, because of all the tiny shifts.

This commit fixes the widths from TrueType fonts to the nearest integer
which makes it much more likely they will match the entries in the /W or
/Widths arrays, and thus not result in tiny movements.

The file in Bug #698325 is 5% smaller with this change, and the output PDF
file does actually match the original more closely (when using a high zoom
factor and careful inspection)

This does (unsurprisingly) cause a lot of differences in the test suite,
but I've looked at all of them and can see no definite problems. The
differences are pretty much single pixel shifts and this can sometimes
cause low resolution output to be slightly better, or slightly worse.

gs/devices/vector/gdevpdte.c


2013-04-09 08:33:01 +0100
Ken Sharp <ken.sharp@artifex.com>
f7567c53867f01e9dd33a1f882bb489dc765b869

pdfwrite - correct tracking of current point with word spcaing

Bug #693285 "gs adds spaces and breaks formatting of original pdf file"

This one is quite subtle and caused by a number of interacting issues.

Firstly the design grid conversion of TrueType fonts can lead to TT CIDFonts
ending up with very slightly different widths from the font to the widths in
the /W array (rounding errors). When emitting text we then use the TJ operator
and emit tiny movements for each glyph.

The second part then, is the limit we have of 50 movements per TJ operation.
There's no indication why we have this limit but I assume its some ancient
version of Acrobat. When we get to 50 moves we close the current line of text
and begin a new one.

The third part is that, in order to start the new line from the correct x offset
(so it lines up properly with the previous line), we keep a running track of
the current position and use that to tell us where to start the new line.
This value was getting the word spacing value applied to it whenever the
current character was a space (0x20). However, we only apply the word spacing
to *single* byte encodings in PDF (unlike PostScript) and the font in this
particular file doesn't have a single byte range.

To fix this we need to know if the text came from a (a)widthshow operation
from PDF, or from PostScript. Fortunately the text enumerator already has
a 'single_byte_space' member which tells us this. If it was from PDF we then
need to check if the character encoded used 1 byte or more than one, and
not apply the word spacing if it used more than 1. To this end we now pass
in the number of bytes to process_text_modify_width.

This change exhibits progressions in fts_20_2001.pdf and fts_22_2202.pdf

gs/devices/vector/gdevpdtc.c
gs/devices/vector/gdevpdte.c
gs/devices/vector/gdevpdtt.h


2013-04-09 09:12:01 +0100
Chris Liddell <chris.liddell@artifex.com>
496d8d3b8ea3d560dc260b1d03d9ed45b38e6960

Bug 693842: Fix a typo in gp_vms.c

There was a "=" instead of "==" mistake in the file name validation code.

Thanks to jond666@hotmail.com for pointing it out.

CLUSTER_UNTESTED

gs/base/gp_vms.c


2013-04-09 09:05:59 +0100
Chris Liddell <chris.liddell@artifex.com>
17bc8825debb794fc83f832b96da1ef9eead6aa4

Bug 693846: Fix configure inclusion of gdevjbig2.dev

There was an error in the configure so that we ended up using "jbig2.dev" in
both the FEATURE_DEVS and DEVICE_DEVS lists.

It now, correctly, uses gdevjbig2.dev in the DEVICE_DEVS list.

No cluster differences.

gs/configure.ac


2013-04-05 12:24:34 -0600
Henry Stiles <henry.stiles@artifex.com>
a4ae7c831da7e113665ae53e02b215c62bc3dbbd

Fix 693841, the symbol set parameter could be read uninitialized.

pxl/pxfont.c


2013-04-05 09:52:35 -0600
Henry Stiles <henry.stiles@artifex.com>
002551b7baa1e6e0a10670672d34870c3e229925

Read the old page size from the device, not from PCL's state.

The current paper selecting design could already have the new
requested page size in PCL's state at this point in the code; it was
possible to miss selecting a new paper size even though there was a
paper size change.

pcl/pcpage.c


2013-04-05 09:48:36 -0600
Henry Stiles <henry.stiles@artifex.com>
c77af98a0ff3d54ce52fb043149cef0a1b83e311

More lenient interpretation of the PJL language variable.

Accept any language variable string that contains the substring "GL"
to indicate the job should be processed in RTL/HPGL-2 mode.

pcl/pctop.c


2013-04-05 09:46:03 -0600
Henry Stiles <henry.stiles@artifex.com>
2892a755b3cc1e56f859046154f249afde1dcca0

Initialize PCL completely before XL Passthrough.

pxl/pxpthr.c


2013-04-02 17:12:04 -0600
Henry Stiles <henry.stiles@artifex.com>
86c33715ecf80e58ae4bde341820a6c76b23c288

Fix memory corruption problem with HPGL/2 page sizes.

Setting a page size in the HPGL/2 code depended on memory in a local
stack frame. This problem was introduced when custom page size
support was added to PCL which resulted in reorganizing the paper type
set up. Unfortunately HPGL/2 - RTL mode was not updated to use the
new paper setup when the PCL change was made.

pcl/pcpage.c
pcl/pcpage.h
pcl/pgconfig.c


2013-04-04 15:47:47 +0100
Robin Watts <Robin.Watts@artifex.com>
87b4d9c7abb36040079e099600cd31a5917be31d

Remove unneeded tests from ENABLE_VALGRIND macros.

Now gs_alloc_fill is called correctly, I can back out these extra
tests.

gs/base/gsmdebug.h


2013-04-04 15:17:03 +0100
Chris Liddell <chris.liddell@artifex.com>
673511c63137ff5cf5dddcacd7ff5f1cc9f42fd3

Correct a mistake in the memory alloc header code.

In the -Z@ case, I had left offsets in place for filling freed memory in
i_resize_string() which could cause gs_alloc_fill() to be called with a
negative length.

No cluster differences.

gs/base/gsalloc.c


2013-04-04 01:12:45 +0100
Robin Watts <Robin.Watts@artifex.com>
773c42ffc7e1e96c0bd99c7f577090c8b0684577

Fix ENABLE_VALGRIND problems.

gs_alloc_fill was having a bad interaction with
VALGRIND_MAKE_MEM_UNDEFINED in corner cases.

gs/base/gsmdebug.h


2013-04-02 14:45:20 +0100
Robin Watts <robin.watts@artifex.com>
2e9a498db41d0d601ab736687d332b2ab3de2a54

Add valgrind.h dependencies to lib.mak to avoid warnings.

gs/base/lib.mak


2013-03-28 07:53:23 +0000
Chris Liddell <chris.liddell@artifex.com>
5403b7384b203c6b462f8ed3190b7962c929769c

Add an ID to memory allocations.

This is to aid following objects through GC.

This is fairly straight forward with gs_struct_.... type allocations where
there is a memory manager header structure associated with the allocation,
so the ID is added to that.

But so called "string" allocations (i_alloc_string() and co) are more tricky
because these have no header, so these have the ID "tacked on" at the beginning
of the memory allocation. This means that the memory manager and the garbage
collector need to "just know" that the extra bytes exist.

The assigning and incrementing of the ID variable (normally) on happen in a
debug build. The ID variable itself can be left out by adding:
-DGS_USE_MEMORY_HEADER_ID=0

(or equivalent) to the compiler command line.

Finally, in a debug build, there is a get_mem_hdr_id() convenience function
you can call from a debugger - it takes a pointer to block of memory, and
returns the ID assigned to the allocation. Obviously, if the function is called
on memory automatically allocaed on the stack, it will probably cause bad
things to happen.

No cluster differences.

gs/base/gsalloc.c
gs/base/gxobj.h
gs/psi/igcstr.c


2013-04-02 03:47:24 -0700
Robin Watts <robin@peeves.(none)>
693c516ad22bb79d7c8c85329ff6a53dc82505fc

Memento: Improve interaction with valgrind.

Ensure that blocks headers are correctly marked accessible/
unaccessible.

gs/base/memento.c


2013-04-02 11:14:41 +0100
Ken Sharp <ken.sharp@artifex.com>
b0264dc9764935e548042597ca5d3c08bc513d31

pdfwrite - initialise a return code

Spotted by scan-build, the return code is uninitialised when both stream
and dictionary have previously been hashed. This would not normally cause a
problem, but its best to be safe.

No differences expected.

gs/devices/vector/gdevpdfo.c


2013-04-01 16:57:37 -0700
Robin Watts <robin@peeves.(none)>
9182dfdce82310e96fbb7b92759dcc913e0f6a2e

Update valgrind.h to include helgrind header too.

Cope with the version of helgrind being too old that it doesn't
provide the required macros and causes missing symbol errors.

gs/base/gsinit.c
gs/base/gxclfile.c
gs/base/gxclist.c
gs/base/gxclmem.c
gs/base/valgrind.h
gs/psi/imain.c


2013-04-01 10:32:28 -0700
Robin Watts <robin@peeves.(none)>
4e4883fdd27201e35b93e9fbdbe5d1f2380a030b

Memory squeezing: Unchecked error codes.

Fix unchecked error codes in gs_output_page.

gs/base/gsdevice.c


2013-04-01 09:51:40 -0700
Robin Watts <robin@peeves.(none)>
952405f72db6ba9f706e75f7cbf66193a575ec98

Bug 693824: Valgrind problems in interpolated images.

The first of the valgrind problems reported here is a false
positive; when scaling just a subsection of an image we
scale extra 'support' pixels. Due to the way this works we
end up scaling a few extra lines/columns around the rectangle
we actually need. Some of the input values to these extra
lines are not copied in, hence we see valgrind complaining
about uninitialised values.

We fix this with some PACIFY_VALGRIND code to memset the
input buffers to 0.

This commit also fixes valgrind errors seen later due to
us trying to color convert color values outside of the
active region; we fix this by restricting the area we
color convert. This will give speedups in some cases.

gs/base/gxiscale.c
gs/base/siscale.c


2013-04-01 08:31:11 -0600
Henry Stiles <henry.stiles@artifex.com>
07c3453ee6545e660fe1f7215b0ba5f540b7cd7b

Change ownership of JBIG2 to Alex.

CLUSTER_UNTESTED

doc/who_owns_what.txt


2013-04-01 06:20:14 -0700
Robin Watts <robin@peeves.(none)>
050745afeddbaf506ab4dd92661d583ba6e3eb06

Valgrind: Fix spurious warnings in gc

The Ghostscript object headers have a union of bitfields; these are
arranged so that they are all of the form 1 bit, then n-1 bits
(where n is a power of 2), so they pad nicely to a nice size.

Specifically they are designed to work like this (as far as I can
make out) to allow the 'alone' bit to be preserved during gcs
when the n-1 bit fields are used. Valgrind, I think, finds this
problematic.

The fix in this commit is simply to initialise both the alone bit
and the padding bits at the same time (any even halfway decent
compiler should combine these into a single byte write, so we
should actually find this new safer code is faster than the previous
single bit initing code). This is safe because the other unions
are only used during gc.

Cluster testing shows no differences, and local valgrind runs
appear cleaner.

gs/base/gsalloc.c
gs/base/gxobj.h
gs/psi/igcref.c
gs/psi/isave.c


2013-03-31 04:07:53 -0700
Robin Watts <robin@peeves.(none)>
b319291a7a57de7344122269ae56deb65121de60

Memory squeezing fix: zsave: Fix SEGV

When freeing saved spaces due to an allocation failure, unlink the
space from the linked list of saved ones to prevent gc SEGV later.

gs/psi/isave.c


2013-03-30 04:26:01 -0700
Robin Watts <robin@peeves.(none)>
fe31fceb7870b24bcf9c5b477f76943abacce75f

Memory Squeezing: crash in gc after zsave.

Ensure that the save structure is set up enough to be safely gc'd
on allocation.

gs/psi/isave.c
gs/psi/zvmem.c


2013-03-30 03:34:04 -0700
Robin Watts <robin@peeves.(none)>
d88779e3579db3c9c134ec7c5ee54e7ab4579399

Memory Squeezing: gsicc_manage.c: Check for allocation failures

In faviour places we allocate pname, and then use it without
checking. Simply add checks.

gs/base/gsicc_manage.c


2013-03-30 09:26:53 +0000
Ken Sharp <ken.sharp@artifex.com>
97d4e9f31bb0f5d1f8feb97106fc5879bb9a4fcb

pdfwrite - ensure a variable is initialised

I can't see a way that this could cause the valgrind complaint in bug
#693813, but its the only variable in the offending line which is not
explicitly initialised. So initialise it here just in case.

No differences expected.

gs/devices/vector/gdevpdfc.c


2013-03-29 17:43:14 -0700
Robin Watts <robin@peeves.(none)>
f23d8aca44eee8ab1e289b350c968b074b8bec76

Memory Squeezing: JPEG compression; avoid double free.

The JPEG compression stream state calls gs_jpeg_destroy, but this may be
called earlier. If this does get called earlier, ensure that we leave the
stream in a state where it won't access freed memory.

gs/devices/vector/gdevpsdu.c


2013-03-29 14:16:38 -0600
Henry Stiles <henry.stiles@artifex.com>
852e5451e741515551edd55916a3cf49a5a2540e

Fix bug 693576 - bad pxl file generated.

It was possible for the XL driver to produce XL drawing commands
without setting the color space in advance. Thanks to Hin-Tak Leung
for the fix.

gs/devices/vector/gdevpx.c


2013-03-29 11:46:35 -0700
Robin Watts <robin@peeves.(none)>
00ccf0ce1304f3f6a9493138f2fb0cb00f3326f9

Memory squeezing: JPEG encoding stream release

When destroying a JPEG encoding stream, we assume that the setup got
far enough to have allocated a jmpbuf and a compression struct. Add
some checks so we cope if this is not the case.

gs/base/sdcte.c
gs/base/sjpegc.c


2013-03-29 11:14:29 -0700
Robin Watts <robin@peeves.(none)>
a68c6641b8b576c88c497d8089b17bc7ec32d383

Memory squeezing: LCMS2: BuildGrayInputMatrixPipeline leak

Avoid leak in allocation failure case.

gs/lcms2/src/cmsio1.c


2013-03-29 09:31:07 -0700
Robin Watts <robin@peeves.(none)>
31f437e09d443e1f1ae78f4f909728b45d550695

Memory Squeezing: LCMS2: CLUTElemDup

Check for allocation failures and tidy up if found.

gs/lcms2/src/cmslut.c


2013-03-29 10:01:18 -0600
Henry Stiles <henry.stiles@artifex.com>
ebf32c26d8224ab7c81766c0d516986fd1ce4027

Fix more gnu indent unwanted side effects.

We still have a bit more to do but this fixes the most egregious
problems.

pcl/pccsbase.c
pcl/pcht.c
pcl/pcstatus.c
pcl/pcsymbol.c
pcl/pcsymbol.h
pcl/pctext.c
pcl/pctop.c
pcl/pgchar.c
pcl/pgcolor.c
pcl/pgconfig.c
pcl/pgframe.c
pcl/pggeom.c
pcl/pglabel.c
pcl/pglfill.c
pcl/pgparse.c
pcl/pgpoly.c
pcl/pgvector.c
pcl/rtmisc.c
pcl/rtrstcmp.c
pl/pjparse.c
pl/pjparsei.c
pl/plftable.h
pl/plmain.c
pl/plplatfps.c
pl/pltop.c
pxl/pxerrors.c
pxl/pxfont.c
pxl/pxgstate.c
pxl/pxparse.c
pxl/pxptable.c
pxl/pxsessio.c
pxl/pxstate.c


2013-03-29 08:29:31 -0700
Robin Watts <robin@peeves.(none)>
0250740ec53e8df3f2fcfd96a725574996256524

Memory squeezing fix: LCMS2: avoid AllocateToneCurveStruct returning partial built struct.

Simply add an extra check on the last allocation.

gs/lcms2/src/cmsgamma.c


2013-03-29 08:22:34 -0700
Robin Watts <robin@peeves.(none)>
321c5a324977410d7fac84be174453460a3210a9

Memory squeezing: More LCMS2 fixes.

Fix some broken error code, add some checking where it was missing, and
fix a potential leak.

gs/lcms2/src/cmscnvrt.c
gs/lcms2/src/cmslut.c


2013-03-29 12:43:33 +0000
Robin Watts <robin.watts@artifex.com>
44f807320c741d07a38bc565752160ecb8c6f71b

Memory squeezing fix: lcms2 cmsPipeline construction

When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.

The fix here is to change cmsPipelineInsertStage to check and return
an error value. All calling code is then checked to test this return
value and cope.

gs/base/gsicc_cache.c
gs/lcms2/include/lcms2.h
gs/lcms2/src/cmscnvrt.c
gs/lcms2/src/cmsgmt.c
gs/lcms2/src/cmsio1.c
gs/lcms2/src/cmslut.c
gs/lcms2/src/cmsopt.c
gs/lcms2/src/cmstypes.c
gs/lcms2/src/cmsvirt.c


2013-03-29 10:23:50 +0000
Ken Sharp <ken.sharp@artifex.com>
8591cc53337147e77e4249a007df12cd17319d08

pdfwrite - initialise structure member 'stream_md5_valid

Bugs #693759, #693760, #693761

Found by valgrind, there were conditions under which the member would not
be initialised before we tested it, initialising it to 0 ensures this can't
happen.

In practice this is unlikely to ever cause a problem, but its best to be safe
as we could conceivably attempt to access invalid memory locations if this
member isn't initialised.

No differences expected.

gs/devices/vector/gdevpdfo.c


2013-03-28 17:51:17 -0700
Robin Watts <robin@peeves.(none)>
1ef00832581e1167dd3fd33ab499bcd1d895b218

Memory squeezing bug: lcms2 MatrixElemTypeFree

Destructors should cope with NULL.

gs/lcms2/src/cmslut.c


2013-03-28 17:26:36 -0700
Robin Watts <robin@peeves.(none)>
47d384ef4ef6a57b346a05f320a06b08309ed2d9

Memory squeezing fix: gsicc_get_link_profile

Check the return from gsicc_get_profile_handle_buffer for validity
before using it.

gs/base/gsicc_cache.c


2013-03-28 17:18:11 -0700
Robin Watts <robin@peeves.(none)>
3dc5a28f2c7fc587f4207a593d2aa32d9565d4c9

Memory squeezing fix: gsicc_alloc_link

Ensure that the gsicc_link_t has a valid wait pointer so that its
destructor can work safely in the event of the wait semaphore failing
to allocate.

gs/base/gsicc_cache.c


2013-03-28 21:12:18 +0000
Robin Watts <robin.watts@artifex.com>
b1d518660381c8cec7f603ef05eea85e1d683817

Another memory squeeze fix.

Avoid SEGV in gsicc_alloc_link_entry and callers.

gs/base/gsicc_cache.c
gs/base/gsicc_manage.c
gs/base/gsicc_nocm.c
gs/base/gsicc_replacecm.c


2013-03-28 14:25:53 -0600
Henry Stiles <henry.stiles@artifex.com>
c8e63f3b0096aac611da379b57590dca9c549aca

Fix 693730, portion of output missing resulting from type overflow.

PCL was storing image's source width and height in unsigned short
integers which is not sufficient for very large HPGL/RTL plots.

pcl/rtraster.c


2013-03-28 19:42:34 +0000
Robin Watts <robin.watts@artifex.com>
865db37918a99bdaea8825cb1173389c6541b318

Another memory squeezing fix.

Check allocations for failures. Free objects in the cleanup path.

gs/base/gsicc_manage.c


2013-03-28 19:16:56 +0000
Robin Watts <robin.watts@artifex.com>
045235372355a640bdf637a6065bfc8597e00b8e

More memory squeezing fixes.

Fix unchecked allocations, and ensure functions are capable of
distinguishing failed allocations from failing to finish normally
for some other reason.

gs/base/gsicc_cache.c
gs/base/gsicc_manage.c


2013-03-28 17:26:44 +0000
Robin Watts <robin.watts@artifex.com>
fd3220b62484c434a7c64a4f1382a0d05c82c664

Memory squeezing fixes.

Unchecked allocations and return codes in the parameter handling.

gs/base/gsdparam.c
gs/base/gsicc_manage.c


2013-03-28 13:53:51 +0000
Ken Sharp <ken.sharp@artifex.com>
120c7069563bc01b5d23d2632803607248c5fca4

pdfwrite fix previous commit

Commit 0069ae367e670a80b35d9d333c99acd71dc94108 had a 'typo' and used
the wrong member of a structure to append a hash. Because the member was
too small this caused memory corruption and later crashes.

Of course this only exhibits with the same hand-crafted test file....

No differences expected

gs/devices/vector/gdevpdfo.c


2013-03-28 13:09:11 +0000
Ken Sharp <ken.sharp@artifex.com>
0069ae367e670a80b35d9d333c99acd71dc94108

pdfwrite - fix stream MD5 hashing

Objects in pdfwrite use an MD5 hash to check for equality. The hash is lazily
created, and stored for later reuse.

The stream object hashing wasn't adding the hash of the dictionary associated
with the stream to the hash of the stream contents. This meant that 2 streams
with the same data, but different associated dictionaries, could be wrongly
identified as equal.

In practice this condition is likely to be extremely rare, it was detected
while working on the colour code and was caused by using a hand-crafted
PostScript file which reused many components when constructing multiple
colour spaces.

No differences expected

gs/devices/vector/gdevpdfo.c


2013-03-27 17:34:41 -0700
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
0e58a662c5eaa811eafa512e9cc97ae5e1303351

Add non-redudannt (nr) option to clusterpush.pl

gs/toolbin/localcluster/clusterpush.pl


2013-03-27 16:34:39 -0600
Henry Stiles <henry.stiles@artifex.com>
76f9208424f41e4177cda4a468af1b0bb6a5e166

Preliminary parsing code for the PXL VendorUnique operator.

Some lower end HP color laser printers use an undocumented diminutive
PXL-like language based on the VendorUnique operator. This commit
fleshes out enough of the parsing to get through the PXL in the test
file attached to 693661 without a syntax error. We've not done
anything to implement VendorUnique commands beyond parsing.

gs/base/gdevpxat.h
pxl/pxparse.c
pxl/pxptable.c
pxl/pxsessio.c


2013-03-27 20:48:31 +0000
Robin Watts <robin.watts@artifex.com>
5f148d93b1c954f28fead816acb5fe7131797cf4

Memory squeezing fix

If ialloc_init fails part way through, we attempt to free the allocated
objects, but we do so incorrectly as the object we get passed back is
actually internal to the allocation that was made (and there were actually
multiple allocations).

We add a function to do this properly, together with a stern warning
that this should only be used for allocation error cleanup.

gs/base/gsalloc.c
gs/base/gsalloc.h
gs/psi/ialloc.c


2013-03-27 09:20:42 -0700
Robin Watts <robin@peeves.(none)>
3f07b338211b112f8af3e95dcff87269e770a311

Another memory squeeze fix.

Ensure enumerator is initialised enough to survive gc in case
of later failures.

gs/base/gp_unifs.c
gs/psi/imain.c


2013-03-27 14:46:06 +0000
Robin Watts <robin.watts@artifex.com>
2ed2393f5a82952ba92e543a43cb39dd44c3050b

Memory squeezing fix

Check for allocation failure.

gs/psi/zcontext.c


2013-03-27 14:34:33 +0000
Robin Watts <robin.watts@artifex.com>
6f7940e28090a0f4c850e7adad4554c79fb01fb8

More memory squeezing fixes

Clear allocated structures so they can be destructed safely in the
event of later failures.

gs/base/gsfont.c
gs/base/gxccman.c


2013-03-27 14:07:17 +0000
Robin Watts <robin.watts@artifex.com>
0466008b327a5b16a051e234e4725ebfa84912f6

Another memory squeezing problem.

Check the result of the allocation in gx_cache_char_init before
using it.

gs/base/gxccman.c
gs/base/gxfcache.h
gs/psi/imain.c


2013-03-27 10:00:27 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
3d94f55fdc7babe5cbcf35aa0d3bdf43077a3de9

Fix formatting bugs in halftone generators.

gs/toolbin/halftone/gen_ordered/gen_ordered.c
gs/toolbin/halftone/gen_stochastic/gen_stochastic.c


2013-03-27 11:58:19 +0000
Robin Watts <robin.watts@artifex.com>
0d7042456a3b0c4da39d5e9bbb46b5e5379c6dc7

Another memory squeezing fix.

Ensure that the op_array_tables in the interpreter context are set
up enough that they can safely be garbage collected if allocations
fail.

gs/psi/imain.c


2013-03-27 03:52:51 -0700
Robin Watts <robin@peeves.(none)>
3b19ec49702466fa4a05a8b41087ef32c130806d

More memory squeezing fixes.

Lack of check on allocation success.

gs/psi/icontext.c
gs/psi/iinit.c
gs/psi/imainarg.c
gs/psi/zfont.c
gs/psi/zpcolor.c


2013-03-26 14:48:04 -0700
Robin Watts <robin@peeves.(none)>
4848f7302726acef5ac8c98030ec1a14ddab06b6

More memory squeezing fixes.

Mostly unchecked allocation failures when setting up the gstate.

gs/base/gscolor.c
gs/base/gsptype1.c
gs/base/gsstate.c
gs/base/gxchar.c
gs/base/gxdcolor.h


2013-03-26 13:09:49 -0700
Robin Watts <robin@peeves.(none)>
7d2e030ab25d8b31af22f0532ef813b0ff70e361

Fix various memory squeezing errors.

Mostly these are unchecked allocations, but some are errors in the
cleanup paths.

gs/base/gslibctx.c
gs/base/gsmalloc.c
gs/psi/gs.c
gs/psi/imain.c
gs/psi/interp.c
gs/psi/zgstate.c


2013-03-26 08:42:14 -0600
Henry Stiles <henry.stiles@artifex.com>
a56fae81ef7f77b1ab6dadf38b1ea7539cfca0e4

Free path upon fill failing - noticed in code review of ff515a6.

pxl/pxpaint.c


2013-03-25 15:03:42 -0600
Henry Stiles <henry.stiles@artifex.com>
fca91ea554583d6f298f1c803ccf4d395b5dc94f

Fix the fallout of a gnu indent bug introduced with the indentation
change, commit bc86bd6.

Unfortuntaly, gnu indent 2.2 adds new blank lines after each local
variable declaration when the user requests that blocks of local
declaration be separated from the procedure body with a blank line.
This fix removes the extraneous blank lines.

pcl/pcbiptrn.c
pcl/pccid.c
pcl/pccsbase.c
pcl/pcdither.c
pcl/pcdraw.c
pcl/pcfont.c
pcl/pcfontpg.c
pcl/pcfrgrnd.c
pcl/pcfsel.c
pcl/pcht.c
pcl/pcindxed.c
pcl/pcjob.c
pcl/pclookup.c
pcl/pcmacros.c
pcl/pcmtx3.c
pcl/pcommand.c
pcl/pcpage.c
pcl/pcpalet.c
pcl/pcparse.c
pcl/pcpatrn.c
pcl/pcpatxfm.c
pcl/pcrect.c
pcl/pcsfont.c
pcl/pcstatus.c
pcl/pcsymbol.c
pcl/pctop.c
pcl/pcuptrn.c
pcl/pcursor.c
pcl/pcwhtidx.c
pcl/pgchar.c
pcl/pgcolor.c
pcl/pgconfig.c
pcl/pgdraw.c
pcl/pgfdata.c
pcl/pgfont.c
pcl/pgframe.c
pcl/pggeom.c
pcl/pginit.c
pcl/pglabel.c
pcl/pglfill.c
pcl/pgmisc.c
pcl/pgparse.c
pcl/pgpoly.c
pcl/pgvector.c
pcl/rtgmode.c
pcl/rtmisc.c
pcl/rtraster.c
pcl/rtrstcmp.c
pl/dwimg.c
pl/dwmainc.c
pl/dwreg.c
pl/pjparse.c
pl/pjparsei.c
pl/plalloc.c
pl/plchar.c
pl/pldict.c
pl/plfapi.c
pl/plfont.c
pl/plht.c
pl/pllfont.c
pl/plmain.c
pl/plsrgb.c
pl/plsymbol.c
pl/pluchar.c
pl/plufont.c
pl/plulfont.c
pl/plvocab.c
pxl/pxffont.c
pxl/pxgstate.c
pxl/pximage.c
pxl/pxink.c
pxl/pxpaint.c
pxl/pxparse.c
pxl/pxpthr.c
pxl/pxsessio.c
pxl/pxstate.c
pxl/pxstream.c
pxl/pxtop.c
pxl/pxvalue.c


2013-03-25 08:47:42 -0600
Henry Stiles <henry.stiles@artifex.com>
d2a1f2e9de96d9fe70225302fd304309a19ef787

Fix reading uninitialized point (bug #693655), remove obsolete
supported conditional configurations and refactor.

A logical error in paint_path resulted in reading the cursor
uninitialized. Early in XL development NEWPATH_AFTER_PAINT and
NO_SCALED_DASH_PATTERN were added to support incorrect language in the
specification but their behavior is well established after 3 major
revisions of the PCL-XL language can be safely removed allowing
simplification of this code.

Even with those changes the paint_path procedure was much too complex
to be understandable, it is easy to see how a logical error would go
unnoticed. We try to refactor the code such that client procedures
take on some of the lifting and get rid of the gotos in hopes of
having something cohesive and correct.

pxl/pxpaint.c


2013-03-21 08:11:33 -0600
Henry Stiles <henry.stiles@artifex.com>
30273c4a9d9949f55dd4553dab614f1d36177377

Remove outdated definition.

PXL always resets the path after drawing single objects (rectangle,
ellipse, etc.) and newer versions of the specification document this
correctly consequently the compiler directive and alternate behavior
can be removed.

pxl/pxpaint.c


2013-03-26 10:20:25 +0000
Ken Sharp <ken.sharp@artifex.com>
7319905b5ba4dc3a3a66a4fa1489b653deb335fc

pdfwrite - prevent dereference of NULL pointer when no BG/UCR info present

Bug #693728 " Incompatible and large PDF output, and a crash with -dUCRandBGInfo=/Preserve"

The input is XPS and XPS has no concept of BG/UCR, so the pointer to the
information is NULL. If we had set the parameter -dUCRandBGInfo=/Preserve
then we would attempt to dereference the NULL Pointer.

We now check the pointer before attempting to dereference it.

No differences expected.

gs/devices/vector/gdevpdfg.c


2013-03-23 13:17:59 -0700
Ray Johnston <ray.johnston@artifex.com>
e76a62ee67c16f41f891a01011c7111e31643ebb

Fix MSVC support of command line FEATURE_DEVS_EXTRA and DEVICE_DEVS_EXTRA

In gs.mak these were both being set, which replaces the definition with nmake.
Without these, the definition defaults to an empty string anyway.

gs/base/gs.mak


2013-03-25 16:28:44 +0000
Ken Sharp <ken.sharp@artifex.com>
f54adf86c0f25bf9bc391e8df1af5e7ddfc0aca7

pdfwrite - always fallback for type 4 images if we change colour space

Type 4 (chroma keyed) images can't readily have their colour space changed,
if we are going to a space with fewer components. For example, if we convert
a CMYK image to Gray, then many different CMYK values will map to the same
gray value, leading to parts of the image being masked which should not be.

Technically it is possible to change colour space the other way, but it is
easier for now to simply cause all such images to use the fallback code if
we are changing colour space.

gs/devices/vector/gdevpdfi.c


2013-03-25 16:24:53 +0000
Ken Sharp <ken.sharp@artifex.com>
e3160bc0c25969e6807161f798548b763222e585

Change the colorSpace header entry in generated profiles to make pdfwrite happy

The generated profiles for certain kinds of colour space were being created
as 3CLR and 4CLR, which is absolutely fine in the general case. However,
the new pdfwrite code uses the internal 'icc_equivalent' profile generated
for a CIEBased PostScript colour space (previously pdfwrite generated its
own profile).

But The PDF Reference says that only Gray, RGB, CMYK and Lab are permissible
values for the header. So here we pretend that the generated profiles are
in either RGB or CMYK, so that the emitted PDF will be valid.

Because the profiles are only used to convert into a CIE device-independent
colour space, which will later be converted into a device space, this 'lie'
should not cause any problems (these spaces are not currently emitted at any
other point, and are never used as device profiles).

No differences expected

gs/base/gsicc_create.c


2013-03-22 10:32:07 +0000
Chris Liddell <chris.liddell@artifex.com>
563a2c68351388047d4a21501f8e042a45d0a8db

Bug 693720: make tiffsep(1) depend on the planar device

Update the makefiles to reflect that tiffsep is now a planar based device.

Also fix some of the directory settings.

No cluster differences.

gs/base/msvctail.mak
gs/base/unix-end.mak
gs/devices/devs.mak


2013-03-22 10:21:47 +0000
Ken Sharp <ken.sharp@artifex.com>
2132b46fea22c8b3fc60d18eba0c2ae58162421c

pdfwrite - only process pagelabels for pdfwrite device

Bug #693721 "Regression: file cannot be read starting with
5784bfbfba7191cacce5309e88afac0851287460"

The pagelabels are handled as device parameters rather than pdfmarks, because
the pdfmark syntax can't handle the variety of page labels possible in a
PDF file.

Of course only the pdfwrite device can handle this device parameter, so we
need to only perform this if the current device is pdfwrite.

No differences expected, cluster only tests full builds, inclusive of
the pdfwrite device.

gs/Resource/Init/pdf_main.ps


2013-03-22 01:38:24 +0000
Robin Watts <robin.watts@artifex.com>
86b1d9bea8fbd9f0e7b89730a041f1edd35ee20a

Add mujstest to list of possible user clusterpush jobs.

gs/toolbin/localcluster/clusterpush.pl


2013-03-13 13:14:22 -0700
Ray Johnston <ray.johnston@artifex.com>
b9bb3f30028c552be77554b1e7c273625d115d95

Fix bug 693079. Reduce stack usage for pattern_clist playback.

There were a couple of rather large structures on the stack in
clist_playback_band and in the tile filling. This file goes to
4 levels deep of clist_playback_band -- once for the main clist,
then patterns nested 3 deep.

gs/base/gxclrast.c


2013-03-21 12:55:07 -0700
Ray Johnston <ray.johnston@artifex.com>
9428436fa107096fd9826af8ff1a77a8616d4819

Fix compiler warning.

gs/base/gxclip2.h


2013-03-21 10:57:17 -0700
Ray Johnston <ray.johnston@artifex.com>
e4ddd5fbb12bce97f75d8039a863d32b81e2e67f

Fix bug 693718: 09-03.PS clist problem with DeviceN devices and patterns.

The clist device doesn't write masked DeviceN colors, so masked
patterns use the gx_default_fill_path method, but the pattern logic
optimizes masks that are solid to delete the mask (which is more
efficient), but then the color must be converted to a non-masked
color i.e., gx_dc_type_devn instead of gx_dc_type_devn_masked.

This file was very resolution sensitive because the pattern was
only solid at specific resolutions.

Testing shows significant improvement on comparefiles/PP0001G0.pdf.psdcmyk.300.1

gs/base/gxclip2.c
gs/base/gxp1fill.c


2013-03-21 17:19:09 +0000
Chris Liddell <chris.liddell@artifex.com>
52ee1397fa772e6534843dcff6540fa9cb5b5f11

Change jbig2dec license to AGPL to match Ghostscript.

And remove an obsolete ".cvsignore" file.

CLUSTER_UNTESTED

gs/jbig2dec/.cvsignore
gs/jbig2dec/COPYING
gs/jbig2dec/LICENSE


2013-03-21 11:39:14 +0000
Chris Liddell <chris.liddell@artifex.com>
1d8da78f4ed1e472f7cfa4589122fc3392959563

Bug 693613: add an explicit memory parameter to gs_path_enum_copy_init()

In zpathforall() the path enumerator object is allocated with the current
allocator for the Postscript VM mode. But gs_path_enum_copy_init() used the
memory pointer from the graphics state for all it's allocations, and also to
set the path enumerator's "memory" pointer.

Clearly there was the potential for problems there: in this case, the current
VM mode was global, but the graphics state was allocated in local. In this
scenario, we immediately do a GC on *local* VM after zpathforall() and before
we reach path_continue(). Because the path enumerator was allocated in global
VM, we skip it during this GC, meaning the copied path and its contents (in
local VM) were not marked, the memory considered free, and overwritten during
the compaction phase.

By adding an explicit memory parameter to gs_path_enum_copy_init() we can
ensure that all the allocations for the path enumerator are consistent, and that
the memory pointer in the enumerator is also correct.

No cluster differences.

gs/base/gspath.h
gs/base/gspath1.c
gs/psi/zpath1.c
gs/psi/zupath.c


2013-03-20 18:20:37 +0000
Robin Watts <Robin.Watts@artifex.com>
8f4156a67dae6b3d6ba627a2003617ba773a19ff

Bug 693714: Fix valgrind warnings in downsampler.

When using the special downscalers for 2/3/4, I was miscalculating
the input pointer for the right to left passes, leading to UMRs.
Fixed here.

Surprised that no one has complained of bad rendering!

gs/base/gxdownscale.c


2013-03-20 08:38:39 +0000
Ken Sharp <ken.sharp@artifex.com>
59d1b2b25262c7995e4060ec8388abf059efcf3e

Fix a couple of benign compiler warnings.

gs/devices/vector/gdevpdfg.c


2013-03-19 16:55:06 +0000
Ken Sharp <ken.sharp@artifex.com>
af327b13f517a5a7e74ccafd4c325dd378f509c3

pdfwrite - fix non-standard ranges in CIE spaces converted to ICC wiht linework

Bug #693698 "Wrong color in file with pdfwrite"

The specimen file claims to be Lab but actually isn't. The colour components
are scaled to 0->100, 0->255, 0->255 instead of 0->100, -128 -> 127, -128 -> 127

While the shading and image code scales the input values into 0->1 when emitting
an equivalent ICCBased space, the linework code did not.

This commit addresses that, and also adds code to deal with the same
issue in the new colour code.

There are a few cluster differences but the results are visually identical
or extremely similar.

gs/devices/vector/gdevpdfc.c
gs/devices/vector/gdevpdfg.c
gs/devices/vector/gdevpdfg.h


2013-03-19 09:38:01 +0000
Chris Liddell <chris.liddell@artifex.com>
0ce371636903391f165830d84dcbf6bc50a889bf

Bug 693611: add missing pointer to pdf14_device gc funcs

The pclist_device was missing from pdf14_device_enum_ptrs() and
pdf14_device_reloc_ptrs().

No cluster differences.

gs/base/gdevp14.c


2013-03-19 09:55:13 +0000
Ken Sharp <ken.sharp@artifex.com>
46391b4a374db77027733598ec58989eb1d31e47

pdfwrite - fix problem with discontinuous xref tables and 64-bit file sizes

Bug #693710 "Regression: Missing output with pdfwrite and 32-bit build"

The update to use 64-bit offsets for file sizes missed a case when finding
the end of an xref section. This only occurs when an object has been reserved
for future use, and then not actually used (eg a Destination for a Link on a
page which is not then produced).

Corrected the type from ulong to gs_offset_t.

No differences expected.

gs/devices/vector/gdevpdf.c


2013-03-18 20:19:48 -0600
Henry Stiles <henry.stiles@artifex.com>
bc86bd69e26b93a38ab7ee06fa2d77fb836b7c84

Indent PCL and XL in accordance with the indentation rules in
gs/doc/C-style.htm.

The program GNU indent was used to make the changes and we expect
there will be some manual cleanup over the next few days.

pcl/pcbiptrn.c
pcl/pcbiptrn.h
pcl/pccid.c
pcl/pccid.h
pcl/pccolor.c
pcl/pccoord.h
pcl/pccprint.c
pcl/pccsbase.c
pcl/pccsbase.h
pcl/pcdict.h
pcl/pcdither.c
pcl/pcdither.h
pcl/pcdraw.c
pcl/pcdraw.h
pcl/pcfont.c
pcl/pcfont.h
pcl/pcfontpg.c
pcl/pcfontst.h
pcl/pcfrgrnd.c
pcl/pcfrgrnd.h
pcl/pcfsel.c
pcl/pcfsel.h
pcl/pcht.c
pcl/pcht.h
pcl/pcident.c
pcl/pcident.h
pcl/pcimpl.c
pcl/pcindxed.c
pcl/pcindxed.h
pcl/pcjob.c
pcl/pclookup.c
pcl/pclookup.h
pcl/pcmacros.c
pcl/pcmisc.c
pcl/pcmtx3.c
pcl/pcmtx3.h
pcl/pcommand.c
pcl/pcommand.h
pcl/pcpage.c
pcl/pcpage.h
pcl/pcpalet.c
pcl/pcpalet.h
pcl/pcparam.h
pcl/pcparse.c
pcl/pcparse.h
pcl/pcpatrn.c
pcl/pcpatrn.h
pcl/pcpattyp.h
pcl/pcpatxfm.c
pcl/pcpatxfm.h
pcl/pcrect.c
pcl/pcsfont.c
pcl/pcstate.h
pcl/pcstatus.c
pcl/pcsymbol.c
pcl/pcsymbol.h
pcl/pctext.c
pcl/pctop.c
pcl/pctop.h
pcl/pctpm.h
pcl/pcuptrn.c
pcl/pcuptrn.h
pcl/pcursor.c
pcl/pcursor.h
pcl/pcwhtidx.c
pcl/pcwhtidx.h
pcl/pcxfmst.h
pcl/pgchar.c
pcl/pgcolor.c
pcl/pgconfig.c
pcl/pgdraw.c
pcl/pgdraw.h
pcl/pgfdata.c
pcl/pgfdata.h
pcl/pgfont.c
pcl/pgfont.h
pcl/pgframe.c
pcl/pggeom.c
pcl/pggeom.h
pcl/pginit.c
pcl/pginit.h
pcl/pglabel.c
pcl/pglfill.c
pcl/pgmand.h
pcl/pgmisc.c
pcl/pgmisc.h
pcl/pgparse.c
pcl/pgpoly.c
pcl/pgstate.h
pcl/pgvector.c
pcl/rtgmode.c
pcl/rtgmode.h
pcl/rtmisc.c
pcl/rtmisc.h
pcl/rtraster.c
pcl/rtraster.h
pcl/rtrstcmp.c
pcl/rtrstcmp.h
pcl/rtrstst.h
pl/dwimg.c
pl/dwimg.h
pl/dwmainc.c
pl/dwreg.c
pl/dwreg.h
pl/pjparse.c
pl/pjparse.h
pl/pjparsei.c
pl/pjtop.c
pl/pjtop.h
pl/plalloc.c
pl/plapi.h
pl/plchar.c
pl/plchar.h
pl/pldict.c
pl/pldict.h
pl/pldraw.c
pl/pldraw.h
pl/plfapi.c
pl/plfapi.h
pl/plfont.c
pl/plfont.h
pl/plftable.h
pl/plht.c
pl/plht.h
pl/plimpl.c
pl/pllfont.c
pl/pllfont.h
pl/plmain.c
pl/plmain.h
pl/plparse.h
pl/plplatf.c
pl/plplatf.h
pl/plplatfps.c
pl/plsrgb.c
pl/plsrgb.h
pl/plsymbol.c
pl/plsymbol.h
pl/pltop.c
pl/pltop.h
pl/pltoputl.c
pl/pltoputl.h
pl/pluchar.c
pl/plufont.c
pl/plufstlp.c
pl/plufstlp.h
pl/plufstlp1.c
pl/plulfont.c
pl/plvalue.c
pl/plvalue.h
pl/plvocab.c
pl/realmain.c
pxl/pxbfont.c
pxl/pxbfont.h
pxl/pxdict.h
pxl/pxerrors.c
pxl/pxerrors.h
pxl/pxffont.c
pxl/pxfont.c
pxl/pxfont.h
pxl/pxgstate.c
pxl/pxgstate.h
pxl/pximage.c
pxl/pximpl.c
pxl/pxink.c
pxl/pxoper.h
pxl/pxpaint.c
pxl/pxparse.c
pxl/pxparse.h
pxl/pxptable.c
pxl/pxptable.h
pxl/pxpthr.c
pxl/pxpthr.h
pxl/pxsessio.c
pxl/pxstate.c
pxl/pxstate.h
pxl/pxstream.c
pxl/pxtop.c
pxl/pxvalue.c
pxl/pxvalue.h


2013-03-18 16:26:48 +0000
Chris Liddell <chris.liddell@artifex.com>
962b4bd30b0b85ee5c55d548144e0d4c073a7bfb

Remove unnecessary traling $(D) from a "-I" compiler option.

No cluster differences.

gs/base/lib.mak


2013-03-18 10:59:37 +0000
Ken Sharp <ken.sharp@artifex.com>
ec0a5d96d02576c53cef22fe3e9bde5547c2f4ee

pdfwrite - improve handling of broken fonts

Bug #693711 "pdfwrite segfault"

The specimen file contains two fonts which are badly broken, in one case
the broken data stream decodes to a 'return' operation without a prior
'callsubr'. This caused the SEAC detection code to attempt to free memory
using uninitialised data, which caused a seg fault. We now detect the call
stack depth, and return an error if we return when no subroutine is executing.

This caused a later heap error, as did the other font, because the regular
type 1 font interpreter also didn't like the font data, and returned an error.
This caused us not to write a FontFile resource, but the FontDescriptor
writing code tried to write one anyway. Fixed by checking that there is a
FontFile before trying to write one.

The specimen file now runs to completion, but will not embed the broken
fonts. As a result it will only work 'correctly' on systems which have the
missing fonts available. Although given that these fonts are broken, it
seems unlikely these will work anyway.

No differences expected.

gs/base/gxtype1.c
gs/devices/vector/gdevpdtd.c


2013-03-18 08:36:00 +0000
Chris Liddell <chris.liddell@artifex.com>
fe7e1a32165f96d20d696c6b0349d338f1ec3666

Bug 693712: fix the header search path

The new devices directory wasn't correctly added to the list of "-I" compiler
options.

No cluster differences.

gs/base/lib.mak


2013-03-17 17:46:54 -0600
Henry Stiles <henry.stiles@artifex.com>
ba5fb31f9029bf622bea24ac47e089c514981f7f

Warning cleanup.

pcl/pcl.mak
pcl/pcpage.c
pcl/pctext.c
pl/pjparse.c
pl/plfont.c
pxl/pxerrors.c
pxl/pxfont.c
pxl/pxl.mak


2013-03-17 09:49:46 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
473fec16b9ff829b28d0c291eb4fc929f221d3c6

Bug 693658: Avoid overflows in image positioning.

Check for overflows to handle cases when CTM or ImageMatrix is too big.

gs/base/gxifast.c
gs/base/gxipixel.c


2013-03-16 10:38:07 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
884590d08f332a06ebf3e5db996c32210a5fc8c0

Bug 689658: Reject excessive values in CIE color spaces.

Reject CIE color spaces that have any of the attributes out of
-10000..10000 range to avoid overflows and division by 0.
This range should be sufficient for any real world color usage.

gs/psi/zcolor.c
gs/psi/zcrd.c


2013-03-16 09:08:05 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
56f34c8243ad078882df0f08cbfc10c6943fb3fe

Bug 693658: Improve validation of image parameters

To avoid overflow, check that parameter is withing the given range
before the parameter is converted to int. Stop interpolation of 0-width
or 0-length images because interpolation code divides by 0 in this case.

gs/base/gxiscale.c
gs/psi/idparam.c
gs/psi/zimage.c


2013-03-15 10:48:15 -0600
Henry Stiles <henry.stiles@artifex.com>
93bcd2277fe838838c760c4fea827d18a445ba8f

Bug 692722: Fix garbage in win32 console when using unicode filename.

In Unicode build, wide-char arguments are first converted to UTF-8 and
may be sent to stdout/stderr. So we must switch the console code page
to CP_UTF8 during main_utf8() execution to avoid utf-8/local-codepage
collision.

Thanks to Mathieu Lafon for the patch.

pl/dwmainc.c


2013-03-15 14:32:21 +0000
Chris Liddell <chris.liddell@artifex.com>
773c69e46e70bdd5482676437dafd2ca83397643

Bug 693699: replace all fopen calls with gp_fopen

Only exceptions are those in the platform specific code, and mkromfs.c.

Also, add a preprocessor define so that any unintential calls directly to
fopen will cause an error.

No cluster differences.

gs/base/fapi_ft.c
gs/base/gp_dvx.c
gs/base/gp_macio.c
gs/base/gp_mswin.c
gs/base/gp_os2.c
gs/base/gp_unifs.c
gs/base/gp_unix.c
gs/base/gp_unix_cache.c
gs/base/gp_vms.c
gs/base/gsdevice.c
gs/base/gsicc_create.c
gs/base/gsicc_lcms.c
gs/base/gsicc_lcms2.c
gs/base/gsicc_manage.c
gs/base/gsiodev.c
gs/base/gsiodisk.c
gs/base/gsiomacres.c
gs/base/gsroprun.c
gs/base/gxblend.c
gs/base/gxblend1.c
gs/base/gxiodev.h
gs/base/gxpcmap.c
gs/base/lib.mak
gs/base/mkromfs.c
gs/base/stdio_.h
gs/base/strmio.c
gs/contrib/japanese/dviprlib.c
gs/contrib/japanese/gdevdmpr.c
gs/contrib/pcl3/eprn/eprnparm.c
gs/contrib/pscolor/test.c
gs/devices/vector/gdevtxtw.c
gs/psi/apitest.c
gs/psi/gserver.c
gs/psi/int.mak
gs/psi/zfile.c
gs/psi/ziodev2.c
pl/pjparse.c
pl/plmain.c
svg/svg.mak
svg/svgtop.c
xps/xpszip.c


2013-03-15 10:13:05 +0000
Chris Liddell <chris.liddell@artifex.com>
5d49dbfa9c33dc67f7e5dbb0294056976de33521

Bug 693702: fix handling of large glyphs in FAPI/UFST

There was a logical error in the fallback case when a glyph ends up too big
for a temporary bitmap allocation in the UFST code which caused us to render
the "notdef" glyph instead of fallback to using the glyph outline to render
uncached.

CLUSTER_UNTESTED

gs/base/fapiufst.c


2013-03-14 11:59:19 -0600
Henry Stiles <henry.stiles@artifex.com>
b243adea0a7684fdb1fe755166816bafddca7666

Documentation typo fixed.

CLUSTER_UNTESTED

doc/ghostpdl.pdf
doc/ghostpdl.tex
doc/ghostpdl.txt


2013-03-14 09:11:07 +0000
Ken Sharp <ken.sharp@artifex.com>
5265796a4b8cb3d05dd72695373381135cb99c50

Remove two unused variables and a redundant function call

Flagged by compiler warnings, two variables are unused, and a function call
to set one of them is not required.

No differences expected

gs/psi/zcolor.c


2013-03-13 13:39:54 -0600
Henry Stiles <henry.stiles@artifex.com>
da27879315a810e24fc881680a2ea5e8345c9bc2

Fix trace device to compile with the new directory structure.

The trace devices were located in the lib.mak file and stopped working
(the compile broke) when gdevtrac.c was moved to the new devices/
directory.

gs/base/lib.mak
gs/devices/devs.mak


2013-03-13 14:10:55 +0000
Chris Liddell <chris.liddell@artifex.com>
044c2d5eefff2d1c92dc830b4b424856228cd083

Remove psmono, psgray and psrgb devices.

Only vestige of pswrite remaining is epswrite.

No cluster differences.

doc/who_owns_what.txt
gs/Makefile.in
gs/base/macos-mcp.mak
gs/base/openvms.mak
gs/base/openvms.mmk
gs/base/unix-gcc.mak
gs/base/unixansi.mak
gs/configure.ac
gs/devices/devs.mak
gs/devices/gdevpsim.c
gs/doc/Devices.htm
gs/psi/msvc.mak
gs/psi/os2.mak
gs/toolbin/pre.chk


2013-03-13 13:33:18 +0000
Ken Sharp <ken.sharp@artifex.com>
fe10fefa06fe8405a05d4370ab6deaf14e06b122

Fix '0' return handling from dict_find_string in colour code

Bug #693685 - Wrong assumption about dict_find_string()

It seems that dict_find_string can return 0 when a string is not found in a
dictionary. This commit updates the code to deal with this (apparently unusual)
case.

No differences expected

gs/psi/zcolor.c


2013-03-11 16:17:49 -0400
Chris Liddell <chris.liddell@artifex.com>
8a95c1dff88559acbe451fa4b402fdae7f1818b3

Remove pswrite device.

epswrite and, by implication, the pswrite source remain - for now......

No cluster differences.

doc/who_owns_what.txt
gs/base/macos-mcp.mak
gs/base/macosx.mak
gs/base/openvms.mak
gs/base/openvms.mmk
gs/base/unix-gcc.mak
gs/configure.ac
gs/devices/devs.mak
gs/devices/vector/gdevps.c
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Issues.htm
gs/doc/Projects.htm
gs/doc/Use.htm
gs/psi/msvc.mak
gs/psi/os2.mak
gs/toolbin/pre.chk
main/pcl6_gcc.mak
main/pcl6_msvc.mak


2013-03-13 10:27:56 +0000
Chris Liddell <chris.liddell@artifex.com>
ea86d8b5f40deff1b226c0a1bc98685f7ce34a02

Fix a missing "!endif" in msvclib.mak

CLUSTER_UNTESTED

gs/base/msvclib.mak


2013-03-12 13:29:45 -0700
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
a7b3f0ce56a0c86b3b9b1c815d0c0a402e2cb3f6

Add pdfwrite option to clusterpush.pl to run only pdfwrite and ps2write tests.

gs/toolbin/localcluster/clusterpush.pl


2013-03-11 23:09:22 +0000
unknown <ken@.(none)>
b0a5422d62b83d961a2caa5bd271d25e08495b25

Check return codes when handling CIE colour space parameters

We weren't checking some parameters, which could lead to seg faults

Bug #693659

gs/psi/zcie.c


2013-03-11 23:05:55 +0000
unknown <ken@.(none)>
b3b835e19f8a248a16ed68394c16b1e8899cf6ac

pdfwrite - limit number of pages to limit in spec

Bug #693658 - file 35a5e3ba_39da0975_973319ae_a18c13ca_ce4ba9eb.SIGSEGV.b0b

Reserving pages overflowed an integer, causing us not to reserve enough pages
we now clamp to 2^32 -1 (see PDF spec, page numbers are defined as integers)

This now runs out of memory and aborts the pdfmark.

No differences expectedd

gs/devices/vector/gdevpdfu.c


2013-03-11 17:01:39 -0400
Chris Liddell <chris.liddell@artifex.com>
943ae1102814d5248fea59b3029fa8723a47527b

Bug 693644: Remove leftover stuff about pdfopt and dumphint

No cluster differences

gs/Resource/Init/gs_init.ps
gs/base/unixinst.mak
gs/doc/Develop.htm
gs/doc/Psfiles.htm
gs/doc/Use.htm
gs/man/de/pdfopt.1
gs/man/pdfopt.1


2013-03-11 15:40:36 -0400
Chris Liddell <chris.liddell@artifex.com>
9c78f0146d0983382b54e15433c44faabc6fffcc

Bug 693686: Improve heurisic for vertical metrics from FT

Freetype "derives" vertical metrics when a font does not contain any, so we
use a heuristic to decide whether to use them, or not. With the revised FAPI
for use with the non-PS/PDF languages, the "heurstic" was "augmented" with an
unsuitably simple test - so now that simple test has been replaced with
an improved heuristic which works for both PS and PCL.

No cluster differences.

gs/base/fapi_ft.c
gs/base/gxfapi.c


2013-03-10 14:55:13 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
a9fa9038c30384eb8bc07aa53d115f6b9d94e46f

Bug 693658: Reject encoding array with non-name entries.

gs/psi/zfapi.c


2013-03-09 20:50:32 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
a431d5193985ed563a04ec71a053ddfe14026326

Bug 693681: Thansform group /BBox by /Matrix

gs/Resource/Init/pdf_draw.ps


2013-03-08 17:19:43 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
2cdd97670587903d4198ef7455742f0363502bb8

Bug 693659: Check that halftone 5 has /Default component.

gs/psi/zht2.c


2013-03-08 16:54:05 +0000
Chris Liddell <chris.liddell@artifex.com>
5f5f13ff649293cb66fa8ddcdad4a1e9bedf437f

Bug 693683: remove not needed header.

CLUSTER_UNTESTED

gs/base/fapiufst.c


2013-03-07 16:56:10 -0700
Henry Stiles <henry.stiles@artifex.com>
26a55d3991398f16a71d8369944ac75ab55aa94c

Bug 693453, remove unnecessary confusing check for a null parameter.

The width parameter is a prerequisite and does not need to be null
checked.

pl/plchar.c


2013-03-08 11:08:40 +0000
Ken Sharp <ken.sharp@artifex.com>
d337f132f69f31957b4b409a7958b45bdc2089fe

pdfwrite - Auto-rotation. Prefer auto-rotate over DSC comments

When auto-rotation is not /None we check both the heuristically determined
auto-rotate value and (for PostScript input) any DSC document or page level
comments.

Previously where these conflicted we used the DSC comments, but this seems
obtuse when the user has asked for auto-rotation. This reverses the default
so that auto-rotation will be preferred.

Also updated the documentation which incorrectly stated that Orientation
DSC comments were ignored.

Expected differences
A few files are now rotated where previously they were not

gs/devices/vector/gdevpdf.c
gs/doc/Ps2pdf.htm


2013-03-08 10:45:30 +0000
Chris Liddell <chris.liddell@artifex.com>
2ec451c463a73f66891356081f1bc9d3972a0358

Remove a pointless relative path in the VS project

CLUSTER_UNTESTED

gs/ghostscript.vcproj


2013-03-08 10:29:33 +0000
Chris Liddell <chris.liddell@artifex.com>
4aa99bb81e72592ed9adcdf6cfec8fadc001ba62

Add the VS project changes for the new devices dir

These changes somehow went awol when I committed the directory reorg.

CLUSTER_UNTESTED

gs/ghostscript.vcproj


2013-03-07 23:44:25 -0800
Ray Johnston <ray.johnston@artifex.com>
7cc7b0adb8203fbc94ce4613e4eefa12d9de0b2c

Fix compiler warning and trailing whitespace issues.

gs/base/gsequivc.c


2013-03-07 16:18:47 -0800
Ray Johnston <ray.johnston@artifex.com>
7fd565cebe1add96bf09527530c1f30365090cc5

Clean up some indents that used tabs.

gs/base/gdevp14.c


2013-01-12 19:41:09 -0800
Ray Johnston <ray.johnston@artifex.com>
6c4990bb6f8f4e5d7484b9b183ea9caaa5eaedee

Remove force of -Z: used during development.

gs/psi/imain.c


2012-08-27 15:57:59 -0700
Ray Johnston <ray.johnston@artifex.com>
abc6c492a11f63ee416ecd287d980a0cb134421e

Finally get rid of band_complexity and write/read color_usage_array from clist.

This also gets rid of the hackish fixed length band_color_usage in the page_info
in favor of a dynamically allocated structure that has one entry per band.

A few minor git gripes cleaned up for the commit (trailing whitespace) in the
affected files.

gs/base/gdevppla.c
gs/base/gdevppla.h
gs/base/gdevprn.c
gs/base/gdevprn.h
gs/base/gxband.h
gs/base/gxcldev.h
gs/base/gxclimag.c
gs/base/gxclist.c
gs/base/gxclist.h
gs/base/gxclpath.c
gs/base/gxclread.c
gs/base/gxclrect.c
gs/base/gxclthrd.c
gs/base/gxclutil.c
gs/base/gxdevbuf.h
gs/devices/gdevijs.c
gs/devices/gdevplib.c
gs/devices/gdevpng.c
gs/psi/imain.c


2012-05-09 09:31:46 -0700
Ray Johnston <ray.johnston@artifex.com>
aa5ee8102a4a98c8cef55b4ee9f347b9bdf94036

Optimize PDF 1.4 transparency when using the clist.

Keep track of the bbox for the actual transparency rect in each band,
and skip pdf14 compositor actions on playback for bands with an empty
bbox. Bands that only paint to the page level with alpha == 1 don't
need the compositor. -Z: prints the number of bands skipped.

gs/base/gdevp14.c
gs/base/gdevprn.c
gs/base/gsropt.h
gs/base/gxband.h
gs/base/gxcldev.h
gs/base/gxclimag.c
gs/base/gxclist.c
gs/base/gxclist.h
gs/base/gxclpath.c
gs/base/gxclrast.c
gs/base/gxclread.c
gs/base/gxclrect.c
gs/base/gxclutil.c
gs/base/lib.mak


2013-03-07 14:06:36 -0800
Ray Johnston <ray.johnston@artifex.com>
dde01090d9251f0752583fa0524d0db7e5b1531d

Fix indeterminate results caused by UMR of render_cond.

Seen with tests_private/pdf/PDFIA1.7_SUBSET/CATX4988.pdf and other
files (psdcmyk device). Function capture_spot_equivalent_cmyk_colors
uses a 'temp_profile' but didn't initialize the rendercond
array which could change the link profile that was generated.
Also (just in case) set the devicegraytok element.

gs/base/gsequivc.c


2013-03-06 11:17:49 -0800
Ray Johnston <ray.johnston@artifex.com>
b2716c4d4862d357d52e3046f512bf4a93b71296

Fix missing dependency of gxpcolor.h

gs/base/lib.mak


2013-03-07 14:05:59 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
0deeb9ece0637d0d1e8f2d6d03cea3e245330856

Bug 693659: Check that CalRGB is a dictionary.

gs/psi/zcolor.c


2013-03-07 13:40:58 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
4e43623be06fc7dbae01071ab78b5e9f9e70f133

Bug 693659: Check that halftone name is a name.

gs/psi/zht2.c


2013-03-07 12:41:53 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
8f972acdde3a09fc37e76826dafec44f8d9ee603

Bug 693659: Check for file name buffer overflow.

gs/psi/zfile.c


2013-03-07 09:15:07 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
2e32682a2530afae04e2d1988da06740d92f7808

Bug 693659: Skip empty strings in sfnts array.

gs/psi/zfapi.c


2013-03-07 00:45:41 +0000
Robin Watts <robin.watts@artifex.com>
6961e71d7b6b9162f6b75fae60469175a4c8d43e

Bug 692862: Fix stroking problem with antialiasing

The fix for bug 691228 causes problems in some cases; when joining
two segment that are directly in line with the next, we add a
circular line cap to ensure correct rendering. Which side of this
end cap we end up on depends on which direction the line then
continues in.

gs/base/gxstroke.c


2013-03-06 09:30:38 -0800
Ray Johnston <ray.johnston@artifex.com>
d3d66fddadc345aab1139397e10b1ab200af2c99

Fix infinite recursion (caused segfault) introduced with commit 70ba7029.

The fix to mem_planar_fill_rectangle_hl_color did not account for the
devn_masked color type which can also be handled.

gs/base/gdevmpla.c


2013-03-06 10:15:14 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
0f541c553afe098f84f19557e4a19bb18e803b91

Bug 693659: Reject functions with 1-point domain.

gs/psi/zfunc.c


2013-02-26 18:01:40 +0000
Chris Liddell <chris.liddell@artifex.com>
f1488c5aff54f37ee67759827d4298592af5dbc8

Move output devices to their own directory.

Also put the vector devices in their own directory, so we have:
gs/devices

and

gs/devices/vector

This is a first pass - further refinement may be required!

No cluster differences.

common/msvc_top.mak
common/ugcc_top.mak
gs/Makefile.in
gs/autogen.sh
gs/base/Makefile.in
gs/base/configure.ac
gs/base/contrib.mak
gs/base/devs.mak
gs/base/gdev3852.c
gs/base/gdev3b1.c
gs/base/gdev4081.c
gs/base/gdev4693.c
gs/base/gdev8510.c
gs/base/gdev8bcm.c
gs/base/gdev8bcm.h
gs/base/gdevadmp.c
gs/base/gdevagl.c
gs/base/gdevagl.h
gs/base/gdevatx.c
gs/base/gdevbit.c
gs/base/gdevbj10.c
gs/base/gdevbjc.h
gs/base/gdevbjcl.c
gs/base/gdevbjcl.h
gs/base/gdevbmp.c
gs/base/gdevbmp.h
gs/base/gdevbmpa.c
gs/base/gdevbmpc.c
gs/base/gdevccr.c
gs/base/gdevcdj.c
gs/base/gdevcfax.c
gs/base/gdevcif.c
gs/base/gdevclj.c
gs/base/gdevcljc.c
gs/base/gdevcp50.c
gs/base/gdevcslw.c
gs/base/gdevdfax.c
gs/base/gdevdjet.c
gs/base/gdevdjtc.c
gs/base/gdevdljm.c
gs/base/gdevdljm.h
gs/base/gdevdm24.c
gs/base/gdevdsp.c
gs/base/gdevdsp.h
gs/base/gdevdsp2.h
gs/base/gdevepsc.c
gs/base/gdevepsn.c
gs/base/gdevescp.c
gs/base/gdevevga.c
gs/base/gdevfax.c
gs/base/gdevfax.h
gs/base/gdevherc.c
gs/base/gdevhl7x.c
gs/base/gdevicov.c
gs/base/gdevifno.c
gs/base/gdevijs.c
gs/base/gdevimgn.c
gs/base/gdevjbig2.c
gs/base/gdevjpeg.c
gs/base/gdevjpx.c
gs/base/gdevl256.c
gs/base/gdevl31s.c
gs/base/gdevlbp8.c
gs/base/gdevlj56.c
gs/base/gdevlp8k.c
gs/base/gdevlxm.c
gs/base/gdevmac.c
gs/base/gdevmac.h
gs/base/gdevmacpictop.h
gs/base/gdevmacttf.h
gs/base/gdevmeds.c
gs/base/gdevmeds.h
gs/base/gdevmgr.c
gs/base/gdevmgr.h
gs/base/gdevmiff.c
gs/base/gdevmswn.c
gs/base/gdevmswn.h
gs/base/gdevmsxf.c
gs/base/gdevn533.c
gs/base/gdevo182.c
gs/base/gdevokii.c
gs/base/gdevos2p.c
gs/base/gdevp2up.c
gs/base/gdevpbm.c
gs/base/gdevpcfb.c
gs/base/gdevpcfb.h
gs/base/gdevpcl.c
gs/base/gdevpcl.h
gs/base/gdevpcx.c
gs/base/gdevpdf.c
gs/base/gdevpdfb.c
gs/base/gdevpdfb.h
gs/base/gdevpdfc.c
gs/base/gdevpdfc.h
gs/base/gdevpdfd.c
gs/base/gdevpdfe.c
gs/base/gdevpdfg.c
gs/base/gdevpdfg.h
gs/base/gdevpdfi.c
gs/base/gdevpdfj.c
gs/base/gdevpdfk.c
gs/base/gdevpdfm.c
gs/base/gdevpdfo.c
gs/base/gdevpdfo.h
gs/base/gdevpdfp.c
gs/base/gdevpdfr.c
gs/base/gdevpdft.c
gs/base/gdevpdfu.c
gs/base/gdevpdfv.c
gs/base/gdevpdfx.h
gs/base/gdevpdt.c
gs/base/gdevpdt.h
gs/base/gdevpdtb.c
gs/base/gdevpdtb.h
gs/base/gdevpdtc.c
gs/base/gdevpdtd.c
gs/base/gdevpdtd.h
gs/base/gdevpdte.c
gs/base/gdevpdtf.c
gs/base/gdevpdtf.h
gs/base/gdevpdti.c
gs/base/gdevpdti.h
gs/base/gdevpdts.c
gs/base/gdevpdts.h
gs/base/gdevpdtt.c
gs/base/gdevpdtt.h
gs/base/gdevpdtv.c
gs/base/gdevpdtv.h
gs/base/gdevpdtw.c
gs/base/gdevpdtw.h
gs/base/gdevpdtx.h
gs/base/gdevpe.c
gs/base/gdevperm.c
gs/base/gdevphex.c
gs/base/gdevpjet.c
gs/base/gdevplan.c
gs/base/gdevplib.c
gs/base/gdevplib.h
gs/base/gdevpm.h
gs/base/gdevpng.c
gs/base/gdevps.c
gs/base/gdevpsd.c
gs/base/gdevpsdf.h
gs/base/gdevpsdi.c
gs/base/gdevpsdp.c
gs/base/gdevpsds.c
gs/base/gdevpsds.h
gs/base/gdevpsdu.c
gs/base/gdevpsf.h
gs/base/gdevpsf1.c
gs/base/gdevpsf2.c
gs/base/gdevpsfm.c
gs/base/gdevpsft.c
gs/base/gdevpsfu.c
gs/base/gdevpsfx.c
gs/base/gdevpsim.c
gs/base/gdevpsu.c
gs/base/gdevpsu.h
gs/base/gdevpx.c
gs/base/gdevpxut.c
gs/base/gdevpxut.h
gs/base/gdevrinkj.c
gs/base/gdevs3ga.c
gs/base/gdevsco.c
gs/base/gdevsgi.c
gs/base/gdevsgi.h
gs/base/gdevsj48.c
gs/base/gdevsnfb.c
gs/base/gdevsppr.c
gs/base/gdevstc.c
gs/base/gdevstc.h
gs/base/gdevstc1.c
gs/base/gdevstc2.c
gs/base/gdevstc3.c
gs/base/gdevstc4.c
gs/base/gdevsun.c
gs/base/gdevsunr.c
gs/base/gdevsvg.c
gs/base/gdevsvga.c
gs/base/gdevsvga.h
gs/base/gdevtfax.c
gs/base/gdevtfax.h
gs/base/gdevtfnx.c
gs/base/gdevtifs.c
gs/base/gdevtifs.h
gs/base/gdevtknk.c
gs/base/gdevtrac.c
gs/base/gdevtsep.c
gs/base/gdevtxtw.c
gs/base/gdevupd.c
gs/base/gdevvglb.c
gs/base/gdevwddb.c
gs/base/gdevwdib.c
gs/base/gdevwpr2.c
gs/base/gdevwprn.c
gs/base/gdevx.c
gs/base/gdevx.h
gs/base/gdevxalt.c
gs/base/gdevxcf.c
gs/base/gdevxcmp.c
gs/base/gdevxcmp.h
gs/base/gdevxini.c
gs/base/gdevxps.c
gs/base/gdevxres.c
gs/base/gxfcopy.c
gs/base/gxfcopy.h
gs/base/lib.mak
gs/base/macos-mcp.mak
gs/base/macosx.mak
gs/base/minftrsz.c
gs/base/minftrsz.h
gs/base/msvclib.mak
gs/base/opdfread.h
gs/base/openvms.mak
gs/base/openvms.mmk
gs/base/pcwin.mak
gs/base/rinkj/evenbetter-rll.c
gs/base/rinkj/evenbetter-rll.h
gs/base/rinkj/rinkj-byte-stream.c
gs/base/rinkj/rinkj-byte-stream.h
gs/base/rinkj/rinkj-config.c
gs/base/rinkj/rinkj-config.h
gs/base/rinkj/rinkj-device.c
gs/base/rinkj/rinkj-device.h
gs/base/rinkj/rinkj-dither.c
gs/base/rinkj/rinkj-dither.h
gs/base/rinkj/rinkj-epson870.c
gs/base/rinkj/rinkj-epson870.h
gs/base/rinkj/rinkj-screen-eb.c
gs/base/rinkj/rinkj-screen-eb.h
gs/base/ugcclib.mak
gs/base/unix-dll.mak
gs/base/unix-gcc.mak
gs/base/unixansi.mak
gs/base/whitelst.c
gs/base/whitelst.h
gs/base/winlib.mak
gs/configure.ac
gs/contrib/contrib.mak
gs/devices/contrib.mak
gs/devices/devs.mak
gs/devices/gdev3852.c
gs/devices/gdev3b1.c
gs/devices/gdev4081.c
gs/devices/gdev4693.c
gs/devices/gdev8510.c
gs/devices/gdev8bcm.c
gs/devices/gdev8bcm.h
gs/devices/gdevadmp.c
gs/devices/gdevatx.c
gs/devices/gdevbit.c
gs/devices/gdevbj10.c
gs/devices/gdevbjc.h
gs/devices/gdevbjcl.c
gs/devices/gdevbjcl.h
gs/devices/gdevbmp.c
gs/devices/gdevbmp.h
gs/devices/gdevbmpa.c
gs/devices/gdevbmpc.c
gs/devices/gdevccr.c
gs/devices/gdevcdj.c
gs/devices/gdevcfax.c
gs/devices/gdevcif.c
gs/devices/gdevclj.c
gs/devices/gdevcljc.c
gs/devices/gdevcp50.c
gs/devices/gdevcslw.c
gs/devices/gdevdfax.c
gs/devices/gdevdjet.c
gs/devices/gdevdjtc.c
gs/devices/gdevdljm.c
gs/devices/gdevdljm.h
gs/devices/gdevdm24.c
gs/devices/gdevdsp.c
gs/devices/gdevdsp.h
gs/devices/gdevdsp2.h
gs/devices/gdevepsc.c
gs/devices/gdevepsn.c
gs/devices/gdevescp.c
gs/devices/gdevevga.c
gs/devices/gdevfax.c
gs/devices/gdevfax.h
gs/devices/gdevherc.c
gs/devices/gdevhl7x.c
gs/devices/gdevicov.c
gs/devices/gdevifno.c
gs/devices/gdevijs.c
gs/devices/gdevimgn.c
gs/devices/gdevjbig2.c
gs/devices/gdevjpeg.c
gs/devices/gdevjpx.c
gs/devices/gdevl256.c
gs/devices/gdevl31s.c
gs/devices/gdevlbp8.c
gs/devices/gdevlp8k.c
gs/devices/gdevlxm.c
gs/devices/gdevmac.c
gs/devices/gdevmac.h
gs/devices/gdevmacpictop.h
gs/devices/gdevmacttf.h
gs/devices/gdevmeds.c
gs/devices/gdevmeds.h
gs/devices/gdevmgr.c
gs/devices/gdevmgr.h
gs/devices/gdevmiff.c
gs/devices/gdevmswn.c
gs/devices/gdevmswn.h
gs/devices/gdevmsxf.c
gs/devices/gdevn533.c
gs/devices/gdevo182.c
gs/devices/gdevokii.c
gs/devices/gdevos2p.c
gs/devices/gdevp2up.c
gs/devices/gdevpbm.c
gs/devices/gdevpcfb.c
gs/devices/gdevpcfb.h
gs/devices/gdevpcl.c
gs/devices/gdevpcl.h
gs/devices/gdevpcx.c
gs/devices/gdevpe.c
gs/devices/gdevperm.c
gs/devices/gdevphex.c
gs/devices/gdevpjet.c
gs/devices/gdevplan.c
gs/devices/gdevplib.c
gs/devices/gdevplib.h
gs/devices/gdevpm.h
gs/devices/gdevpng.c
gs/devices/gdevpsd.c
gs/devices/gdevpsim.c
gs/devices/gdevrinkj.c
gs/devices/gdevs3ga.c
gs/devices/gdevsco.c
gs/devices/gdevsgi.c
gs/devices/gdevsgi.h
gs/devices/gdevsj48.c
gs/devices/gdevsnfb.c
gs/devices/gdevsppr.c
gs/devices/gdevstc.c
gs/devices/gdevstc.h
gs/devices/gdevstc1.c
gs/devices/gdevstc2.c
gs/devices/gdevstc3.c
gs/devices/gdevstc4.c
gs/devices/gdevsun.c
gs/devices/gdevsunr.c
gs/devices/gdevsvga.c
gs/devices/gdevsvga.h
gs/devices/gdevtfax.c
gs/devices/gdevtfax.h
gs/devices/gdevtfnx.c
gs/devices/gdevtifs.c
gs/devices/gdevtifs.h
gs/devices/gdevtknk.c
gs/devices/gdevtrac.c
gs/devices/gdevtsep.c
gs/devices/gdevupd.c
gs/devices/gdevvglb.c
gs/devices/gdevwddb.c
gs/devices/gdevwdib.c
gs/devices/gdevwpr2.c
gs/devices/gdevwprn.c
gs/devices/gdevx.c
gs/devices/gdevx.h
gs/devices/gdevxalt.c
gs/devices/gdevxcf.c
gs/devices/gdevxcmp.c
gs/devices/gdevxcmp.h
gs/devices/gdevxini.c
gs/devices/gdevxres.c
gs/devices/gxfcopy.c
gs/devices/gxfcopy.h
gs/devices/minftrsz.c
gs/devices/minftrsz.h
gs/devices/rinkj/evenbetter-rll.c
gs/devices/rinkj/evenbetter-rll.h
gs/devices/rinkj/rinkj-byte-stream.c
gs/devices/rinkj/rinkj-byte-stream.h
gs/devices/rinkj/rinkj-config.c
gs/devices/rinkj/rinkj-config.h
gs/devices/rinkj/rinkj-device.c
gs/devices/rinkj/rinkj-device.h
gs/devices/rinkj/rinkj-dither.c
gs/devices/rinkj/rinkj-dither.h
gs/devices/rinkj/rinkj-epson870.c
gs/devices/rinkj/rinkj-epson870.h
gs/devices/rinkj/rinkj-screen-eb.c
gs/devices/rinkj/rinkj-screen-eb.h
gs/devices/vector/gdevagl.c
gs/devices/vector/gdevagl.h
gs/devices/vector/gdevlj56.c
gs/devices/vector/gdevpdf.c
gs/devices/vector/gdevpdfb.c
gs/devices/vector/gdevpdfb.h
gs/devices/vector/gdevpdfc.c
gs/devices/vector/gdevpdfc.h
gs/devices/vector/gdevpdfd.c
gs/devices/vector/gdevpdfe.c
gs/devices/vector/gdevpdfg.c
gs/devices/vector/gdevpdfg.h
gs/devices/vector/gdevpdfi.c
gs/devices/vector/gdevpdfj.c
gs/devices/vector/gdevpdfk.c
gs/devices/vector/gdevpdfm.c
gs/devices/vector/gdevpdfo.c
gs/devices/vector/gdevpdfo.h
gs/devices/vector/gdevpdfp.c
gs/devices/vector/gdevpdfr.c
gs/devices/vector/gdevpdft.c
gs/devices/vector/gdevpdfu.c
gs/devices/vector/gdevpdfv.c
gs/devices/vector/gdevpdfx.h
gs/devices/vector/gdevpdt.c
gs/devices/vector/gdevpdt.h
gs/devices/vector/gdevpdtb.c
gs/devices/vector/gdevpdtb.h
gs/devices/vector/gdevpdtc.c
gs/devices/vector/gdevpdtd.c
gs/devices/vector/gdevpdtd.h
gs/devices/vector/gdevpdte.c
gs/devices/vector/gdevpdtf.c
gs/devices/vector/gdevpdtf.h
gs/devices/vector/gdevpdti.c
gs/devices/vector/gdevpdti.h
gs/devices/vector/gdevpdts.c
gs/devices/vector/gdevpdts.h
gs/devices/vector/gdevpdtt.c
gs/devices/vector/gdevpdtt.h
gs/devices/vector/gdevpdtv.c
gs/devices/vector/gdevpdtv.h
gs/devices/vector/gdevpdtw.c
gs/devices/vector/gdevpdtw.h
gs/devices/vector/gdevpdtx.h
gs/devices/vector/gdevps.c
gs/devices/vector/gdevpsdf.h
gs/devices/vector/gdevpsdi.c
gs/devices/vector/gdevpsdp.c
gs/devices/vector/gdevpsds.c
gs/devices/vector/gdevpsds.h
gs/devices/vector/gdevpsdu.c
gs/devices/vector/gdevpsf.h
gs/devices/vector/gdevpsf1.c
gs/devices/vector/gdevpsf2.c
gs/devices/vector/gdevpsfm.c
gs/devices/vector/gdevpsft.c
gs/devices/vector/gdevpsfu.c
gs/devices/vector/gdevpsfx.c
gs/devices/vector/gdevpsu.c
gs/devices/vector/gdevpsu.h
gs/devices/vector/gdevpx.c
gs/devices/vector/gdevpxut.c
gs/devices/vector/gdevpxut.h
gs/devices/vector/gdevsvg.c
gs/devices/vector/gdevtxtw.c
gs/devices/vector/gdevxps.c
gs/devices/vector/opdfread.h
gs/devices/vector/whitelst.c
gs/devices/vector/whitelst.h
gs/psi/int.mak
gs/psi/msvc.mak
gs/psi/winint.mak
gs/psi/zfapi.c
main/pcl6_gcc.mak
main/pcl6_msvc.mak
pl/pl.mak
svg/svg_gcc.mak
svg/svg_msvc.mak
xps/xps_gcc.mak
xps/xps_msvc.mak


2013-03-06 01:43:29 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
6207ac0c8158b28bd2e9ff8633dd94fc91d98057

Bug 693659: fix integer overflow in Type 2 font parser.

gs/psi/zfont2.c


2013-03-06 00:44:26 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
4147f14b1460c35620cb117821fcb01f3b7a1e3d

Bug 693659: Improve argument validation in ArcfourDecode operator.

gs/psi/zfarc4.c


2013-03-05 19:08:49 -0800
Ray Johnston <ray.johnston@artifex.com>
70ba7029bc563bab7a24bff27decad5feceba4f8

Fix indeterminate page background with plank and comparefiles/104-01.ps

This file uses the PS erasepage operator to paint the background to
a non-white value. The mem_planar_fill_rectangle_hl_color used the
'devn' colors without checking the type. With the plank device these
colors were 'pure' or 'ht_binary' so the devn values were bogus.
If the color type was binary, an address was used as color values.
A pure color was OK as long as the number of planes did not exceed
the size of the gx_color_index and the bytes in the color index
corresponded to the planes.

Also add warning (DEBUG build) if mem_planar_strip_tile_rect_devn
ever uses non-devn colors.

Progressions with 104-01.ps, 12-05.PS, 12-07B.PS and 29-07A.PS

gs/base/gdevmpla.c
gs/base/lib.mak


2013-03-05 22:24:56 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
04986f44befa8d71e64a94fafc31ee000c48cc78

Bug 693659: Add check for 0 pointer to zlib message.

gs/base/szlibd.c


2013-03-05 11:52:58 -0800
Ray Johnston <ray.johnston@artifex.com>
675682cee0a3dc6cd346084489712505f5ff3ee4

Fix image_color_cache_init to avoid using out of range data.

If the indexed color space hival is less than the num_entries in
the color_cache, the code would just convert using values past
the end of the lookup data, and image_render_mono_ht did not
clamp values either.

Seen with pbmraw sumatra/x_-_integer_overflow_in_fz_newpixmap.pdf
This file shows clear progression, some other files show differences
but all seem trivial and are pcl files. Maybe a ROP problem.

gs/base/gxipixel.c


2013-03-05 12:48:14 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
69858556e95a2762ef48109ab7b265f2e87e2272

Bug 693659: Fix access to /Colorants entry in DeviceN CSA.

gs/psi/zcolor.c


2013-03-05 01:40:11 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
0950755f0dc971ebe2387a587688075751eb0905

Bug 693659: Fix underflow checking in Type 2 parser.

gs/psi/zfont2.c


2013-03-05 12:16:51 +0000
Chris Liddell <chris.liddell@artifex.com>
486ee97ee8e11cc1edce8998d0a85907c16721f5

Bug 693674: introduce memory limit for UFST bitmaps

Previously, UFST had "unlimited" memory for glyph bitmaps. This appears to allow
bitmaps large enough to cause an overflow in the UFST rendering code.

Now there is a limit on the memory UFST can allocate for a bitmap (tied to the
maximum "interim" bitmap Ghostscript will allocate when creating an entry for
the glyph cache).

This has two benefits: prevents the crash by avoiding the rendering overflow in
UFST, and prevents us from pointlessly allocating huge glyph bitmaps in cases
where we really want to render from an outline anyway.

No cluster differences.

gs/base/gxchar.c
gs/base/gxchar.h
gs/base/gxfapi.c
gs/base/gxfapiu.c


2013-03-05 10:29:02 +0000
Ken Sharp <ken.sharp@artifex.com>
26b50d7d18681f25ae0a435830fb291814b889b1

pdfwrite - new colour code, fix image conversion to base space

An oversight in the code led to images (other than imagemasks) not being
converted to the specified process colour.

No differences expected

gs/base/gdevpdfi.c


2013-03-05 10:08:54 +0000
Ken Sharp <ken.sharp@artifex.com>
db3494dbb682781aca7651ffc60d80a8eeefec72

pdfwrite - new colour code fix a Seg fault with Sep/DeviceN

When converting Separation or DeviceN spaces to a device space we actually
(currently) write them as ICCBased spaces. But the 'convert' flag was left
at non-zero, leading to us attempting to convert. Since the original space
wasn't recorded, this caused a seg fault.

No differences expected

gs/base/gdevpdfi.c


2013-03-04 20:43:19 -0800
Ray Johnston <ray.johnston@artifex.com>
1625318452fd5e8045b69ed440f17ce58625efce

Further improvement and cleanup on clist_copy_planes and the reader.

The clist writer clist_copy_planes (should be / is) never called with
plane_height == 0, so we pre-calculate the maxheight and use that to
clamp re.height, rather than doing the /=2 that copy_mono does. Also
use data_bits_size rather than cbuf_size (even though they are currently
the same) as the limit for holding all planes of uncmopressed data (for
the reader call to copy_planes -- NOT including the compression tag byte)

Also add documentation for copy_planes to doc/Drivers.htm

0002-Change-fill_rectanble_hl_color-calling-sequence-to-i.patch

gs/base/gxclbits.c
gs/base/gxcldev.h
gs/base/gxclimag.c
gs/base/gxclrast.c
gs/base/gxclrect.c
gs/base/gxht_thresh.c
gs/base/gxp1fill.c
gs/doc/Drivers.htm


2013-03-04 17:52:27 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
b4420888ddc9764177a89c1c3d36c64a1253f7b6

Bug 693658: Add DSC continuation support to all operators.

gs/psi/dscparse.c


2013-03-04 21:45:02 +0000
Ken Sharp <ken.sharp@artifex.com>
498b2eaa9c0476ba7a5223b554a620776a831442

pdfwrite - fix a compiler warning

gs/base/gdevpdfg.c


2013-03-04 15:04:07 +0000
Ken Sharp <ken.sharp@artifex.com>
e1c4496d4b0706d125b43dc9b0a8e3c4a1c93e50

pdfwrite/ps2write - new colour work correct handling of complex /Indexed spaces

Fix conversion of complex Indexed spaces to device spaces. There are some
odd differences, which I think are due to some kind of rouding in the
Indexed spaces, need to consult with Michael.

No differences expected.

gs/base/gdevpdfg.c


2013-03-04 09:53:22 +0000
Ken Sharp <ken.sharp@artifex.com>
2aab19e3b28a001b0f3d3b1424ee54078f420afb

pdfwrite/ps2write - New colour conversion, fix default space detection

When we get a /Indexed space, we check the base space and if it is an ICC
space we further check to see if it is a space which we substituted for
one of the device spaces, and if the current strategy means we should not
convert such a space.

Some missing braces meant that if the test failed we didn't write the colour
space at all.

No differences expected

gs/base/gdevpdfg.c


2013-03-04 09:50:44 +0000
Ken Sharp <ken.sharp@artifex.com>
4b7bdcea310131174c051bf6f92b9dc2416bc9c3

pdfwrite/ps2write - New colour code, remove suprious checks

There are some checks against colour space conversions which are appropriate
for the old code, but not the new, and which fall back to 'LeaveColorUnchanged'
if triggered.

Only perform these checks if we are using the old colour conversion code to
prevent the warning and fallback.

No differences expected.

gs/base/gdevpdfc.c


2013-03-03 15:35:16 -0800
Ray Johnston <ray.johnston@artifex.com>
ef4a83251dc9e404deba855ff4838f405b81db3d

Fix clist problems with writing and reading bitmaps when planes > 1

When writing, plane data size did not include the height, so sometimes
cmd_write_buffer would be called between writing the planes. During
reading, we need to top up the cbuf for all planes including the first
(pln==0). Also fix some formatting issues.

gs/base/gxclrast.c
gs/base/gxclrect.c


2013-03-02 20:48:34 -0800
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
da11422e0d11cad9a0de1615f11f525a1788c442

Add the ability to write HSI compressed Raw files to fuzzy.c.

gs/toolbin/tests/fuzzy.c


2013-03-02 21:06:19 -0700
Henry Stiles <henry.stiles@artifex.com>
b87b6dc49e4720cb8d4da0715a823263e84c5e85

Merge branch 'newbranch' - should have been names xpswrite_branch.

gs/base/Makefile.in
gs/base/configure.ac
gs/psi/msvc.mak
main/pcl6_gcc.mak
main/pcl6_msvc.mak


2013-03-02 20:37:28 -0700
Henry Stiles <henry.stiles@artifex.com>
c9c89a9628730bfdbe709023735206deb200b378

Fix problem with multipage output in xpswrite.

It turns out that any device graphics routine has to access the stream
through the vector device call gdev_vector_stream() to guarantee
beginpage will be called. A better solution to this problem would be
to decouple the begin page procedure call and accessing the current
stream.

gs/base/gdevxps.c


2013-03-02 19:54:57 -0700
Henry Stiles <henry.stiles@artifex.com>
8b5840b6e797f2fa6c81c409dcbc14e51b207ab6

A first rough cut of the XPS writing device.

This version is limited to high level path drawing and rectangles so
it is quite limited.

gs/base/Makefile.in
gs/base/configure.ac
gs/base/devs.mak
gs/base/gdevxps.c
gs/psi/msvc.mak
main/pcl6_gcc.mak
main/pcl6_msvc.mak


2013-03-01 00:56:04 -0500
Math <mlafon@gmail.com>
7e04ea83379ea210c227f87c9e859e0a3ab2ebfd

Bug 693507: check for out-of-bounds access

Report error in get_next_word() functions on out-of-bounds access and
handling of this error in both arithmetic and huffman decoders.

When decoding a corrupted document, the arithmetic decoder can hit the end
of the Jbig2 stream. The problem was that get_next_word() returned 0 in
that case and that this lead to an infinite loop.

gs/jbig2dec/jbig2.c
gs/jbig2dec/jbig2_arith.c
gs/jbig2dec/jbig2_arith_iaid.c
gs/jbig2dec/jbig2_arith_int.c
gs/jbig2dec/jbig2_generic.c
gs/jbig2dec/jbig2_huffman.c
gs/jbig2dec/jbig2_huffman.h
gs/jbig2dec/jbig2_priv.h
gs/jbig2dec/jbig2_refinement.c
gs/jbig2dec/jbig2_symbol_dict.c
gs/jbig2dec/jbig2_text.c


2013-02-28 13:57:05 -0800
Ray Johnston <ray.johnston@artifex.com>
9173f87798321425604340241a2ce3bf20ed9cf0

Remove debug statement inadvertently committed with SMask fix.

gs/Resource/Init/pdf_draw.ps


2013-02-28 15:58:39 +0000
Robin Watts <robin.watts@artifex.com>
3037c72c3fd81f11813c3a7fdc94a870e17e5c30

Bug 693615: fix typos in utf8 conversion.

Thanks to Chris Dance for pointing these out.

gs/base/gp_wutf8.c


2013-02-26 12:04:54 -0800
Ray Johnston <ray.johnston@artifex.com>
a4e3e55ca44958a72a3879a565255a2acba8eae5

Bug 693115: Fix Smask handling in the interpreter and prevent multiple rendering

The SMask was being rendered before every object, and a subsequent SMask
set with a 'gs' operator (ExtGState) was being rendered with a previous
SMask rather than simply replacing it. By setting the SoftMask to a new
value (neither //null, nor the paramdict) we can still detect that a
SMask is in effect, and thus create transparency groups as needed, but
we no longer render the mask multiple times, improving performance.
In .execmaskgroup, after rendering the SMask into a mask_stack maskbuf,
zap it, using 'where' to find the ExtGState dictionary that holds it.

All differences seen with cluster regression are either progressions
or are very minor except sumatra/VOX.pdf with pdfwrite, but this was
broken previously. Now it's still broken, but differently.

gs/Resource/Init/pdf_draw.ps
gs/Resource/Init/pdf_ops.ps


2013-02-27 14:00:16 +0000
Robin Watts <robin.watts@artifex.com>
0df3602a923dff2e834fdd0191b6fd2b8ef523b5

Fix Profile build on Windows

It seems that the profile: target isn't being recognised in the makefile.
Possibly because profile has special meaning to nmake? I cannot see an
alternative profile: target anywhere in our makefiles.

As a fix, I have added profile-target: and we now invoke that.

gs/ghostscript.vcproj
gs/psi/msvc.mak


2013-02-26 18:23:26 -0800
Michael Vrhel <michael.vrhel@artifex.com>
d6f83c3aec8ad94b013df125f9feae719c52b941

Fix for an issue found in Bug 69365. Color space linearity check in shading code.

The transparency device, if one exists should be used with this check.

gs/base/gxshade6.c


2013-02-26 13:44:47 +0000
Robin Watts <robin.watts@artifex.com>
1f4996e6547bb89cbd92868224a2101c773c886b

Avoid warning in gp_local_arg_encoding_get_codepoint.

gs/base/gp_win32.c


2013-02-25 16:44:35 +0000
Ken Sharp <ken.sharp@artifex.com>
d62df7283d8618f92b2956b1d36e23c9f0075dd3

txtwrite - fix fallback to single characters.

There were some serious logical flaws in the Unicode creation, when there
is no Unicode information available and we try to manufacture some.

The glyph name matching was completely broken, and not only failed to match
glyph names but broke the fallback to the original character codes too.

This seems to do a much better job (and no longer crashes either).

No differences expected, we don't test txtwrite

gs/base/gdevtxtw.c


2013-02-25 08:22:15 -0800
Robin Watts <robin@peeves.(none)>
ce794d70d543d4d7de8615dcdc249516c05ff87b

Bug 693655: Fix valgrind error in stroking.

The code was treating gaps like dashes, which is fine
except for the fact that gaps have no tangent entry
and so we were accessing off the end of a buffer in some
cases.

gs/base/gxstroke.c


2013-02-25 08:02:00 +0000
Chris Liddell <chris.liddell@artifex.com>
c73f7af0cbd7305d8b61c2f3de973e8f163971d0

Remove the executable bits from gdevsvg.c permissions.

CLUSTER_UNTESTED

gs/base/gdevsvg.c


2013-02-21 16:58:33 -0700
Henry Stiles <henry.stiles@artifex.com>
95f7ded85191aa93f0c6792cb7dccc0447c698bd

Fix PXL PassThrough test file failure.

C705.BIN failed due to unitialized PCL state variables when switching
from PXL to PCL mode. Certainly this problem is a regression and must
have happened when the new variables were added to PCL, but the fix is
straightforward and we dispense with the usual postmortem history
investigation.

pxl/pxpthr.c


2013-02-21 19:40:22 +0000
Chris Liddell <chris.liddell@artifex.com>
380f18a0d97ce4b67b26e011aac391a4a1024b8e

Update Make.htm....

.. to reflect that we now support the "ppc" architecture for universal
binaries on OS X.

CLUSTER_UNTESTED

gs/doc/Make.htm


2013-02-21 14:39:25 +0000
Chris Liddell <chris.liddell@artifex.com>
95ce731715a326cd345cd00b93bfc6e2588d8a33

Bug 693645: Add a PPC section to the predefined MacOS X arch.h

As a side effect of this, we should now be able to build universal binaries
that include PPC.

No cluster differences.

gs/arch/osx-x86-x86_64-gcc.h
gs/arch/osx-x86-x86_64-ppc-gcc.h
gs/base/configure.ac


2013-02-20 12:14:45 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
52be57a96605ad59c0b3146611276e5ee237cb7e

Bug 693646: Add /PageCount system parameter

This parameter is documented in PLRM 3 and required by some test files.
Genoa tests also require /PageCount to be non-decreasing even when
the job switches between pagedevice and nulldevioce.

gs/psi/icontext.c
gs/psi/icstate.h
gs/psi/zusparam.c


2013-02-19 10:40:32 +0000
Chris Liddell <chris.liddell@artifex.com>
f9bb4bd85d718e1db84d5f1e2a7685b0b3288df6

Bug 693631: Handle a missing metric in the FAPI/UFST code.

CLUSTER_UNTESTED

gs/base/fapiufst.c


2013-02-18 11:34:06 +0000
Robin Watts <robin.watts@artifex.com>
fb3f60161917b1dcb04616a2787b4398be467603

Bug 693212: Fix strange artifacts with thin lines.

Ghostscript includes special code for 'thin' lines. These are
a fudge at best.

To avoid dropouts in such lines, caused by the end points of various
lines not being drawn, we introduced a further fudge (see bug 687721).
This would restore the end points on lines in some circumstances.
This fudge causes the effect reported in bug 693212.

The correct fix should be to completely remove thin line support from
gs, as at best we are fudging a fudge. Given that this seems unlikely
to happen, we will make do for now by tweaking the fudge introduced
for bug 687721 so that it triggers in fewer cases (specifically, it
will never trigger for horizontal or vertical lines).

This is more in keeping with the intention of that change anyway.

This does produce diffs, but no disastrous ones.

gs/base/gdevddrw.c


2013-01-17 15:33:30 +0000
Robin Watts <robin.watts@artifex.com>
6811e33b61f3434af519b3af5e4d4aec742848ef

pdf14_compose_group speedups

Following on from previous commit (pdf14_mark_fill_rectangle speedups)
we apply similar ideas to pdf14_compose_group.

1) Reverse loops to count downwards.

2) Increment tos_pixel and nos_pixel after each pixel to avoid having
to add x to their index everywhere.

3) Reduce the number of variables used within the loop.

These fixes do not go as far as the pdf14_mark_fill_rectangle ones
did; there is still scope for more optimisations here.

gs/base/gxblend1.c


2012-09-25 12:39:12 +0100
Robin Watts <robin.watts@artifex.com>
4c1a3aac35f1b4b7711c2e9e2f0f38fe121f51db

Command line argument character encoding handling rework.

Recap of the situation: Historically gs has always taken command
line args in whatever the 'local' encoding of that OS is; for windows
this means they are encoded as per the currently selected codepage;
for mac/linux this tends to mean utf8.

Similarly, whenever gs goes to access a file, it would pass the filenames
to the platform specific file opening code - on windows this would
assume that it was in the local encoding, and on linux would assume
utf8.

There are downsides to dealing with codepage encoding - not least the
fact that some files can't be accessed easily, or that the behaviour
of PS programs may change according to what platform we are on.

Last year we added code so that gs on windows would run as a unicode app,
and would take the supplied unicode argv and convert to utf8 before
passing them to the core of gs. The file reading functions would then
convert from utf8 back to unicode before opening the files. This
code was disabled by default, but seemed to work well in tests.

1 objection was raised to this - namely that we were redefining the
meaning of the entry points (to take utf8 rather than locally encoded
args) and that this might break legacy code. So, it was suggested that
we add a new entry point specifically for utf8, and that we deprecate
the old entry point.

In starting this work, I spotted another problem; gs supports the
'@file' arg (where more command line args can be given in a file).
The current solution of rewriting the command line args does not
address this.

Instead, we update the gsargs arg handling code with a 'get_codepoint'
function pointer. We update the arg_next function to use this to
decode the supplied args (or OPTIONS or file contents) into simple
unicode characters. We then write these into the returned arg
string as utf8 (or in the case of GS_NO_UTF8 builds, as 8 bit 'clean'
characters).

This commit adds a new gsapi_set_arg_encoding function, that allows
the caller to set the encoding used for the args/strings supplied
to the subsequent functions. By default, 'local' encoding is assumed,
hence preserving existing behaviour. By calling:

gs_set_arg_encoding(minst, GS_ARG_ENCODING_UTF8);

we can get the UTF8 encoding that we desire. We leave ourselves scope
for supporting other encodings (such as EBCDIC?) in the future.

The commit also changes it so that the gs always runs with UTF8 encoding
internally by default; to avoid it, make with 'GS_NO_UTF8=1'.

For the benefit of windows users we implement UTF16LE encoding (i.e.
wchar_t's). And we expose this through the gsapi level as
gsapi_run_fileW (and gsapi_init_with_argsW) so that .net can bind
nicely to it without any casting trickery being required.

Many thanks to Sags for his tireless efforts and comments while
this work was underway.

gs/base/gdevwpr2.c
gs/base/gp.h
gs/base/gp_mswin.c
gs/base/gp_ntfs.c
gs/base/gp_wgetv.c
gs/base/gp_win32.c
gs/base/gp_wutf8.c
gs/base/gsargs.c
gs/base/gsargs.h
gs/base/gsdll.h
gs/base/windows_.h
gs/doc/API.htm
gs/psi/dwdll.c
gs/psi/dwdll.h
gs/psi/dwmain.c
gs/psi/dwmainc.c
gs/psi/dwnodll.c
gs/psi/dwtext.c
gs/psi/dwtext.h
gs/psi/gsdll.c
gs/psi/gsdll2.def
gs/psi/gsdll32.def
gs/psi/gsdll32metro.def
gs/psi/gsdll64.def
gs/psi/gsdll64metro.def
gs/psi/iapi.c
gs/psi/iapi.h
gs/psi/imainarg.c
gs/psi/imainarg.h
gs/psi/iminst.h
gs/psi/msvc.mak
language_switch/pspcl6_msvc.mak
main/pcl6_msvc.mak
pl/dwmainc.c
pl/plmain.c


2013-02-18 10:28:30 +0000
Robin Watts <robin.watts@artifex.com>
f8337b57ab9a311f19b86ed0508bdd0fef8fdded

Remove repeated TAG settings.

Spotted by Henry, these have been there since before time began (or
since before the git history at least).

gs/base/gspaint.c
gs/base/gstext.c


2013-02-16 08:41:45 +0000
Chris Liddell <chris.liddell@artifex.com>
45ae250e1537eaf71367ac306154ee383a437b88

Bug 693643: add UseBigTIFF initializers to tiffpack/lzw

No cluster differences.

gs/base/gdevtfax.c


2013-02-15 12:19:20 +0000
Ken Sharp <ken.sharp@artifex.com>
ed7fe80176219a7755b8c1fe12ff0ae23c536d49

ps2write - improve handling of complex colour spaces

Part of the rework on colour handling.

When we write complex spaces (eg /Indexed with a /CIEBased space) and we
use the underlying space (CIEBased) on its own, we only write the underlying
space once, and refer to it form the complex space.

However if we use the underlying space first, then it gets 'resolved', ie
it has all the indirect references replaced. When we then use the complex
space, any references in the underlying space have already been resolved.

Normally this is not a problem because when we try to resolve any indirect
references, we check to see if the object is an indirect reference by testing
a number of its features. This works well but *if* the tint transform is
already resolved, *and* it has fewer than 2 elements, then this would provoke
an error, because the code did not test the length of the array (after already
checking its type) before attempting to extract objects form it.

This patch merely checks the array length and assumes it is not an indirect
reference if the array is too short.

No differences expected.

gs/base/opdfread.h


2013-01-31 10:44:39 +0000
Chris Liddell <chris.liddell@artifex.com>
f39a68d4f1a1ba7674c5d57fa9347e01526fe6c3

Merge the doc updates from 9.07 branch onto master

Update documentation for release candidate 1

Revise release date and product string for 9.07 release.

Color feature news additions.

gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/WhatIsGS.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/doc/thirdparty.htm
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pdfopt.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1


2013-02-14 10:11:39 +0000
Ken Sharp <ken.sharp@artifex.com>
df71c577b5ff73c0ec8aa632d92ffbe90215e344

ps2write - colour conversion work Indexed colour spaces

When dealing with /Indexed colour spaces we concretize to the base space,
if there is no ICC profile associated with the base space then we can't
use it to get the number of colour components to convert, so use the
base space Num_components instead.

Prevents crashes with Indexed spaces with complex base types (for example
/CIEBased spaces)

No differences expected.

gs/base/gdevpdfg.c


2013-02-14 08:23:49 +0000
Ken Sharp <ken.sharp@artifex.com>
329259532c31ba1b762cdea12d64a332ee0d2cf8

pdfwrite - include a definition to silence a compiler warning

gs/base/gdevpdfg.c


2013-02-13 13:44:54 +0000
Ken Sharp <ken.sharp@artifex.com>
536e65260e103bc37705f03350ec4b01c37515a0

ps2write - detect the 'standard' ICC replacements for device space

When we get an ICCBased space which is our replacement for one of the device
spaces, detect it and emit the original space instead.

Should lead to many more device spaces being preserved properly when the
colour conversion strategy is LeaveColorUnchanged.

No differences expected

gs/base/gdevpdfg.c


2013-02-13 08:17:20 +0000
Ken Sharp <ken.sharp@artifex.com>
9220fe3bacb5a8b82cc7a6b25fb8d6db2456b0da

pdfwrite - silence more compiler warnings

gs/base/gdevpdfp.c


2013-02-13 08:17:03 +0000
Ken Sharp <ken.sharp@artifex.com>
b4b0bc9738f132c21ea2f5e8a15c60422bee1e5b

pdfwrite - silence some compiler warnings

gs/base/gdevpsds.c


2013-02-12 12:47:02 -0800
Ray Johnston <ray.johnston@artifex.com>
6b6dabb3ce69162c88a616a61f086164cbe91460

Initial commit of the Stochastic Threshold Array generation program.

gs/toolbin/halftone/gen_stochastic/gen_stochastic.c
gs/toolbin/halftone/gen_stochastic/gen_stochastic.sln
gs/toolbin/halftone/gen_stochastic/gen_stochastic.vcproj


2013-02-12 09:08:03 -0800
Michael Vrhel <michael.vrhel@artifex.com>
389fbbbc82693094357d95276a4362d701e380b1

Update header in screen generation code.

gs/toolbin/halftone/gen_ordered/gen_ordered.c


2013-02-12 14:57:06 +0000
Ken Sharp <ken.sharp@artifex.com>
602e9553829fe955055da289ca010d72e7b86f7f

pdfwrite/ps2write - first part of reworking colour management

This commit provides a new path through the pdfwrite code and uses the ICC
CMS for linework/text, which it did not previously use. The image code already#
used the CMS, at least in part.

There is a 'place holder' switch called PDFUseOldCMS, defaulting to true
at the moment, which controls whether we use the old path or the new.

The new colour code already shows marked improvements with the LeaveColorUnchanged,
in particular /Separation and /Indexed /Device* colour spaces are now preserved
when going to PostScript, which they were not before.

There are also some changes which affect the embedding of ICCBased spaces, and seem
to improve a small number of these.

When enabled this does cause a *large* number of differences, however these
are all either progressions, or very minor differences, invisible to the naked eye.

gs/base/gdevpdfb.h
gs/base/gdevpdfg.c
gs/base/gdevpdfi.c
gs/base/gdevpdfk.c
gs/base/gdevpdfp.c
gs/base/gdevpdfx.h
gs/base/gdevpsdf.h
gs/base/gdevpsdi.c
gs/base/gdevpsds.c
gs/base/gdevpsds.h


2013-02-11 13:19:09 +0000
Ken Sharp <ken.sharp@artifex.com>
12798e902f56cc647fbf213ad632d52114b90687

pdfwrite - fix type 1 to type 2 font converter

Bug #693633 "Font character missing in PDF output - appears in other devices and older versions"

Type 2 fonts are required to start the path operations with a moveto class
operation, not a lineto, type 1 fonts do not have this restriction. So when
converting from type 1 to type 2 we must detect if the initial operation is
a 'line' or a 'move' and emit an explcit 'move' in the case where the first
operation is a line.

The code to do this was assuming that if there were operands on the stack
this meant that the glyph width (from the hsbw operator) was present.
However, this is not true if the font contains any hinting operations as
the width must be emitted as part of those hints.

This caused the code to emit confused and invalid type 2 CharStrings.

Fixed by adding a boolean to track whether the stack contains the glyph
width or not, and test that instead of the number of operands.

No differences expected

gs/base/gdevpsfx.c


2013-02-07 14:42:10 -0800
Ray Johnston <ray.johnston@artifex.com>
f15e0f899fd19162d5de8e0963c58f160bd49796

Bug 693621: Clist logic didn't properly reset after erasepage.

The "normal" page rendering logic works because it flushes the buffer
memory to the clist, then after the page is printed, it clears out
the clist data for the next page. By changing the clist_fillpage to
do this (without actually rendering anything) we now clear out the
clist for a new page. This has the advantage that any clist operations
accumulated prior to the fillpage will be discarded, INCLUDING any
previous fillpage operations which gets rid of duplicate fillpage
actions which can be time consuming, particularly on embedded systems
or printers.

gs/base/gxclrect.c


2013-02-07 17:51:46 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
415da137afa2a64cdd6e2bc679c3c269e0d96c73

Bug 693617: Don't allow nesting of BT operators.

Check whether BT operator is executed in a text context and close
the external context.

gs/Resource/Init/pdf_ops.ps


2013-02-06 16:55:44 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
591a6e95b11f07611f612a691c7e06e169c1fe93

Bug 392622: Fix handling of big CMap objects.

Add a missing error code check, which caused SEGV when an index points
beyond the CMap. Fix PS code that truncated CMmaps to 2^17 - 4 bytes.

gs/Resource/Init/pdf_font.ps
gs/psi/zfapi.c


2013-02-06 10:17:26 -0700
Henry Stiles <henrys@henrysx6.(none)>
a6628fdb771f71c20ad55db026de79d507b42e03

Remove unused GC definitions and declarations.

PCL does not use garbage collection. Having unused definitions
clutters up the code and gives the false impression the code will work
with the ghostscript garbage collector built in. The various routines
to enumerate and relocate pointers have never been maintained and are
surely out of date.

pcl/pccid.h
pcl/pccsbase.c
pcl/pccsbase.h
pcl/pcdither.c
pcl/pcdither.h
pcl/pcdraw.c
pcl/pcfrgrnd.c
pcl/pcfrgrnd.h
pcl/pcht.c
pcl/pcht.h
pcl/pcindxed.c
pcl/pcindxed.h
pcl/pclookup.c
pcl/pclookup.h
pcl/pcpalet.c
pcl/pcpalet.h
pcl/pcpatrn.c
pcl/pcpatrn.h
pcl/pcpattyp.h
pcl/pcuptrn.c
pcl/rtraster.c
pcl/rtrstcmp.h
pxl/pxgstate.h
pxl/pximage.c
pxl/pxparse.c


2012-08-01 14:07:49 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
53e2990bde0966173a954e51c388e4d26af40c15

Fix lcms2 64-bit value decoding on big endian systems
that lack 64-bit types or have these types missed by configuration.

Conflicts:
gs/lcms2/src/cmsplugin.c

gs/lcms2/src/cmsplugin.c


2013-02-04 18:15:39 -0700
Henry Stiles <henry.stiles@artifex.com>
81d51fb27178b2a218403ffe350695f27cfa76dd

Fixes Bug 693616 - GhostPCL locks up with -dFirstPage.

The GL/2 parser should cancel the current command for errors or it is
possible for the parser to continue without advancing causing an
infinite loop.

pcl/pgconfig.c
pcl/pgparse.c


2013-02-04 14:01:09 -0700
Henry Stiles <henry.stiles@artifex.com>
a14ef732dade2dce6de07edf3a4c10294671a11e

Fix bug #693608 duplexing command not feeding page.

The PCL select side duplex command does a formfeed unconditionally,
the other duplex command which sets the duplexing mode does a
conditional (if page is marked form feed). Before this fix we had
both conditionally feed.

pcl/pcjob.c


2013-02-04 18:32:32 +0000
Ken Sharp <ken.sharp@artifex.com>
25291a2f9b01504fbbe70153c07920b016b9f010

pdfwrite - alter escapement of text strings in outlines

Bug 693614 "pdfmark: accented character "c" in titles of generated
PDF bookmarks is not displayed properly"

I believe this is actually an Acrobat bug, the text string emits the
Unicode 0x01 0x0d as a binary 0x01 and an escaped character '\n'. This
follows the rulses for text strings. However Acrobat files to display
the Title correctly.

Running the file through Distiller I find that the string is emitted as
0x01 '\015', the octal representation of 0x0d.

This commit alters the escapement of characters in outlines so that they
always end up as octal escapes. This seems to pacify Acrobat.

No differences expected

gs/base/gdevpdfm.c


2013-02-04 09:56:21 +0000
Ken Sharp <ken.sharp@artifex.com>
2b0a50081bc45d7b28b4c3dcb1a19a46a66d4216

pdfwrite - fix bug with 64-bit file offsets to permit large files

Bug #693610 " Regression: pdfwrite seg fault with the 32 bit build
starting with 9b10f8c659ffc643ab71c6180a70da4f39075578"

When doing the work to use 64-bit file offsets, and thus permit files in
excess of 4GB, I missed an instance.When creating the xref table, if an
object is unused (which is rare but possible), we need to scan past it in
the xref offsets temporary file. We do this by calculating the position of
the next object id in the file.

However, instead of using the size of a gp_offset_t (which is what is written
into the file) we were still using the size of an unsigned long. Because
these are the same on a 64-bit build the regular cluster test doesn't catch
this.

Fixed simply by using the correct size. No differences expected, as explained
above this only exhibits on platforms where gp_offset_t and unsigned long
have different sizes.

gs/base/gdevpdf.c


2013-01-30 16:36:00 +0000
Chris Liddell <chris.liddell@artifex.com>
060b8b1f34bb73a44978729dd3a49db25861bbab

pdfwrite: don't try to free static allocated string

If a font is identified as one of the base 14, the font name in BaseFont is
just a pointer to the entry in the statically declared "standard_font_info"
table.

Avoid freeing the name if it's marked "is_standard".

No cluster differences.

gs/base/gdevpdtf.c


2013-01-30 16:22:21 -0700
Henry Stiles <henry.stiles@artifex.com>
e982362054609c92d84aa9688246e39a65c4d860

Bug 693030 - duplexing page problem fixed in PXL output device.

Upon media changes or even duplexing changes the PXL device did not
switch back to the front page. Thanks to Hin-Tak Leung for fixing
this.

gs/base/gdevpx.c
gs/base/gdevpxut.c


2013-01-30 14:07:41 -0700
Henry Stiles <henry.stiles@artifex.com>
140bfcf881a24e4f915e467a89b8a96592551846

Fix Bug #692914 - Postscript MediaType lost.

Thanks to Hin-Tak Leung for adding support for MediaType to PXL output
drivers.

gs/base/gdevlj56.c
gs/base/gdevpx.c
gs/base/gdevpxut.c
gs/base/gdevpxut.h


2013-01-30 13:51:51 +0000
Chris Liddell <chris.liddell@artifex.com>
9fb635f0a6e1695b7a88822c75e22d40a9ba5116

Bug 693572 (redux): handle missing a glyph outline - again.

It turns out that some devices (pdfwrite!) have a problem with receiving a
completely empty path for an outline glyph, so......

If the outline is missing, create a path with just a moveto and closepath.

No cluster differences.

gs/base/fapi_ft.c


2013-01-30 13:37:47 +0000
Chris Liddell <chris.liddell@artifex.com>
508a79ca38cb857229f0e29236e95059a8d54799

Bug 693398: avoid marking/reloc'ing unsuitable pointer

The gx_image_enum object contains a pointer (cie_range) to the CIE range in
the color space, if it's for an image in certain types of CIE space. The
pointer points *into* an area of allocated memory, and not to the "top" of
the allocated block. As a result, when garbage collection tries to relocate,
there isn't a valid header structure, and the values it ends up using for the
relocation are nonsense.

Removing the cie_range pointer from the GC pointer enumeration is not
because the color space structure and it's contents can move. Since this is
a fairly rare case, and the CIE range lookup is trivial, the cie_range
pointer is replaced with a boolean (so we decide *whether* to use the range
only once), and then the range itself is retrieved at the time it's used.

No cluster differences.

gs/base/gxi12bit.c
gs/base/gxicolor.c
gs/base/gximage.h
gs/base/gximono.c
gs/base/gxipixel.c


2013-01-27 14:03:05 -0800
Ray Johnston <ray.johnston@artifex.com>
803a59ecfd925dafe325d263ecf0a1734113ffef

Bug 693590: MT rendering has wrong 'supports_devn' and incomplete color_info

Shadings use the comp_bits, comp_mask and comp_shift which must match
the main thread's setting, so we copy the color_info from the clist
device.

Also the thread's icc_struct->supports_devn must correspond to the main
thread's device (regressions with psdcmyk detected this).

gs/base/gxclthrd.c


2013-01-29 17:45:45 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
1ae60ab98eef2d376b65f9c50ba2840b1577030b

Bug 693026: Fix SEGV when @FILE can't open.

Argument processing happens early during Ghostscript start-up process.
Be prepared, that not all structures have been initialized yet.

gs/base/gsargs.c
gs/base/gsargs.h
gs/base/gsiodev.c
gs/psi/imainarg.c
pl/plmain.c


2013-01-29 15:12:04 +0000
Chris Liddell <chris.liddell@artifex.com>
f372552beb9105a8768b6b3002bf29b6a7b7278b

Bug 693599: Change the function configure checks for in liblcms2.

The lcms2 API changed at 2.2, adding the cmsGetTransformOutputFormat()
call. When we're checking if we can use the system's lcms2, change the
autoconf check to look for cmsGetTransformOutputFormat().

No cluster differences.

gs/base/configure.ac


2013-01-29 10:32:30 +0000
Chris Liddell <chris.liddell@artifex.com>
56337a050812f072a2669b395119e016cb750e60

Add the make fix from 1fbd0191 to the Mac specific subtarget.

CLUSTER_UNTESTED

gs/base/unix-dll.mak


2013-01-29 10:12:00 +0000
Chris Liddell <chris.liddell@artifex.com>
1fbd0191d1801fc49e362374a7ca6a387e03b9f8

Work around a make problem with "so" target

GNU make 3.82 appears to have a bug which causes problems with our "so"
targets. The "so" targets rely on recursice make calls to build various
subtargets, the shared library and the two executables that link to the shared
library.

On the final recursive make call (to build the executables), GNU make 3.82
wrongly identifies that one dependency (psbase.dev) has changed, and decides it
must rebuild the shared library. By this stage, however, the compiler options
have been setup to build an executable, rather than the shared library.

As a result, we build an executable with the name of the shared lib, and
then try to link that into an executable, which results in linker errors.

As it happens, the use of recursive make calls means we can safely drop a
dependency, which will prevent make from re-evaluating the problematic target,
and thus avoiding the problem arising.

CLUSTER_UNTESTED

gs/base/unix-dll.mak


2013-01-29 09:30:56 +0000
Chris Liddell <chris.liddell@artifex.com>
980a1a28a010fcbfa62208f022454e5fa6b8dc2c

Bump version number to 9.08.

gs/Resource/Init/gs_init.ps
gs/base/version.mak


2013-02-12 15:44:33 +0000
Chris Liddell <chris.liddell@artifex.com>
76b4193e5d8cb280f4795b0e959657ad695ad54d

Revise release date and product string for 9.07 release.

Color feature news additions.

gs/base/gscdef.c
gs/base/version.mak
gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/WhatIsGS.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/doc/thirdparty.htm
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pdfopt.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1


2012-08-01 14:07:49 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
8fbcb3a68ca46ff9f56863d19a7c3342b53c220e

Fix lcms2 64-bit value decoding on big endian systems
that lack 64-bit types or have these types missed by configuration.

Conflicts:
gs/lcms2/src/cmsplugin.c

gs/lcms2/src/cmsplugin.c


2013-01-31 10:44:39 +0000
Chris Liddell <chris.liddell@artifex.com>
885d3646213fc2dfacf7a49d6d546e15eaff190e

Update documentation for release candidate 1

gs/doc/API.htm
gs/doc/C-style.htm
gs/doc/Commprod.htm
gs/doc/DLL.htm
gs/doc/Deprecated.htm
gs/doc/Details8.htm
gs/doc/Details9.htm
gs/doc/Develop.htm
gs/doc/Devices.htm
gs/doc/Drivers.htm
gs/doc/Fonts.htm
gs/doc/Helpers.htm
gs/doc/History1.htm
gs/doc/History2.htm
gs/doc/History3.htm
gs/doc/History4.htm
gs/doc/History5.htm
gs/doc/History6.htm
gs/doc/History7.htm
gs/doc/History8.htm
gs/doc/History9.htm
gs/doc/Install.htm
gs/doc/Issues.htm
gs/doc/Language.htm
gs/doc/Lib.htm
gs/doc/Make.htm
gs/doc/News.htm
gs/doc/Projects.htm
gs/doc/Ps-style.htm
gs/doc/Ps2epsi.htm
gs/doc/Ps2pdf.htm
gs/doc/Ps2ps2.htm
gs/doc/Psfiles.htm
gs/doc/Readme.htm
gs/doc/Release.htm
gs/doc/Source.htm
gs/doc/Unix-lpr.htm
gs/doc/Use.htm
gs/doc/WhatIsGS.htm
gs/doc/Xfonts.htm
gs/doc/gs-vms.hlp
gs/doc/thirdparty.htm
gs/man/dvipdf.1
gs/man/font2c.1
gs/man/gs.1
gs/man/gslp.1
gs/man/gsnd.1
gs/man/pdf2dsc.1
gs/man/pdf2ps.1
gs/man/pdfopt.1
gs/man/pf2afm.1
gs/man/pfbtopfa.1
gs/man/printafm.1
gs/man/ps2ascii.1
gs/man/ps2epsi.1
gs/man/ps2pdf.1
gs/man/ps2pdfwr.1
gs/man/ps2ps.1
gs/man/wftopfa.1


2013-01-31 09:28:04 +0000
Chris Liddell <chris.liddell@artifex.com>
dbcde58e3c01b4b9f996d9e962a074e46697698d

Add "Release Candidate 1" to GS_PRODUCTFAMILY

Fix release date.

gs/base/gscdef.c
gs/base/version.mak


2013-01-30 16:22:21 -0700
Henry Stiles <henry.stiles@artifex.com>
1db3e495532a23b3c736dd54215ecb82374837fe

Bug 693030 - duplexing page problem fixed in PXL output device.

Upon media changes or even duplexing changes the PXL device did not
switch back to the front page. Thanks to Hin-Tak Leung for fixing
this.

gs/base/gdevpx.c
gs/base/gdevpxut.c


2013-01-30 14:07:41 -0700
Henry Stiles <henry.stiles@artifex.com>
6e13685e1768771f87c94bdb2aaaab4d011d601c

Fix Bug #692914 - Postscript MediaType lost.

Thanks to Hin-Tak Leung for adding support for MediaType to PXL output
drivers.

gs/base/gdevlj56.c
gs/base/gdevpx.c
gs/base/gdevpxut.c
gs/base/gdevpxut.h


2013-01-30 13:51:51 +0000
Chris Liddell <chris.liddell@artifex.com>
9c11bdaf7701b2736060ce291ae22fb0105ffaf5

Bug 693572 (redux): handle missing a glyph outline - again.

It turns out that some devices (pdfwrite!) have a problem with receiving a
completely empty path for an outline glyph, so......

If the outline is missing, create a path with just a moveto and closepath.

No cluster differences.

gs/base/fapi_ft.c


2013-01-30 13:37:47 +0000
Chris Liddell <chris.liddell@artifex.com>
4704c9dc5d345fa6d81513fe9d5ea13aa199ae01

Bug 693398: avoid marking/reloc'ing unsuitable pointer

The gx_image_enum object contains a pointer (cie_range) to the CIE range in
the color space, if it's for an image in certain types of CIE space. The
pointer points *into* an area of allocated memory, and not to the "top" of
the allocated block. As a result, when garbage collection tries to relocate,
there isn't a valid header structure, and the values it ends up using for the
relocation are nonsense.

Removing the cie_range pointer from the GC pointer enumeration is not
because the color space structure and it's contents can move. Since this is
a fairly rare case, and the CIE range lookup is trivial, the cie_range
pointer is replaced with a boolean (so we decide *whether* to use the range
only once), and then the range itself is retrieved at the time it's used.

No cluster differences.

gs/base/gxi12bit.c
gs/base/gxicolor.c
gs/base/gximage.h
gs/base/gximono.c
gs/base/gxipixel.c


2013-01-29 17:45:45 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
295a195f85ced8b965f65bbc1fe6c3cf78c36e51

Bug 693026: Fix SEGV when @FILE can't open.

Argument processing happens early during Ghostscript start-up process.
Be prepared, that not all structures have been initialized yet.

gs/base/gsargs.c
gs/base/gsargs.h
gs/base/gsiodev.c
gs/psi/imainarg.c
pl/plmain.c


2013-01-27 14:03:05 -0800
Ray Johnston <ray.johnston@artifex.com>
ab9615d43302f03ce57fdd8e849ec52e870983e4

Bug 693590: MT rendering has wrong 'supports_devn' and incomplete color_info

Shadings use the comp_bits, comp_mask and comp_shift which must match
the main thread's setting, so we copy the color_info from the clist
device.

Also the thread's icc_struct->supports_devn must correspond to the main
thread's device (regressions with psdcmyk detected this).

gs/base/gxclthrd.c


2013-01-29 15:12:04 +0000
Chris Liddell <chris.liddell@artifex.com>
62df74b7ef081a9f35028b493843a4624048f7af

Bug 693599: Change the function configure checks for in liblcms2.

The lcms2 API changed at 2.2, adding the cmsGetTransformOutputFormat()
call. When we're checking if we can use the system's lcms2, change the
autoconf check to look for cmsGetTransformOutputFormat().

No cluster differences.

gs/base/configure.ac


2013-01-29 10:32:30 +0000
Chris Liddell <chris.liddell@artifex.com>
3c7aa3543e098620d70c5df143513718d3e83b12

Add the make fix from 1fbd0191 to the Mac specific subtarget.

CLUSTER_UNTESTED

gs/base/unix-dll.mak


2013-01-29 10:12:00 +0000
Chris Liddell <chris.liddell@artifex.com>
3233283cfe4370fb826998d14954e4870155c80e

Work around a make problem with "so" target

GNU make 3.82 appears to have a bug which causes problems with our "so"
targets. The "so" targets rely on recursice make calls to build various
subtargets, the shared library and the two executables that link to the shared
library.

On the final recursive make call (to build the executables), GNU make 3.82
wrongly identifies that one dependency (psbase.dev) has changed, and decides it
must rebuild the shared library. By this stage, however, the compiler options
have been setup to build an executable, rather than the shared library.

As a result, we build an executable with the name of the shared lib, and
then try to link that into an executable, which results in linker errors.

As it happens, the use of recursive make calls means we can safely drop a
dependency, which will prevent make from re-evaluating the problematic target,
and thus avoiding the problem arising.

CLUSTER_UNTESTED

gs/base/unix-dll.mak



Version 9.09 (2013-02-14)

The 9.09 release was quickly superseded by 9.10 after a bug was found that prevented -dUeCIEColor from working was discovered. Please use 9.10.

Version 9.07 (2013-02-14)

This is the seventh full release in the stable 9.x series.

Highlights in this release include:

For a list of open issues, or to report problems, please visit bugs.ghostscript.com.

Incompatible changes

No recorded incompatible changes.

Changelog

2013-01-30 16:22:21 -0700
Henry Stiles <henry.stiles@artifex.com>
1db3e495532a23b3c736dd54215ecb82374837fe

Bug 693030 - duplexing page problem fixed in PXL output device.

Upon media changes or even duplexing changes the PXL device did not
switch back to the front page. Thanks to Hin-Tak Leung for fixing
this.

gs/base/gdevpx.c
gs/base/gdevpxut.c


2013-01-30 14:07:41 -0700
Henry Stiles <henry.stiles@artifex.com>
6e13685e1768771f87c94bdb2aaaab4d011d601c

Fix Bug #692914 - Postscript MediaType lost.

Thanks to Hin-Tak Leung for adding support for MediaType to PXL output
drivers.

gs/base/gdevlj56.c
gs/base/gdevpx.c
gs/base/gdevpxut.c
gs/base/gdevpxut.h


2013-01-30 13:51:51 +0000
Chris Liddell <chris.liddell@artifex.com>
9c11bdaf7701b2736060ce291ae22fb0105ffaf5

Bug 693572 (redux): handle missing a glyph outline - again.

It turns out that some devices (pdfwrite!) have a problem with receiving a
completely empty path for an outline glyph, so......

If the outline is missing, create a path with just a moveto and closepath.

No cluster differences.

gs/base/fapi_ft.c


2013-01-30 13:37:47 +0000
Chris Liddell <chris.liddell@artifex.com>
4704c9dc5d345fa6d81513fe9d5ea13aa199ae01

Bug 693398: avoid marking/reloc'ing unsuitable pointer

The gx_image_enum object contains a pointer (cie_range) to the CIE range in
the color space, if it's for an image in certain types of CIE space. The
pointer points *into* an area of allocated memory, and not to the "top" of
the allocated block. As a result, when garbage collection tries to relocate,
there isn't a valid header structure, and the values it ends up using for the
relocation are nonsense.

Removing the cie_range pointer from the GC pointer enumeration is not
because the color space structure and it's contents can move. Since this is
a fairly rare case, and the CIE range lookup is trivial, the cie_range
pointer is replaced with a boolean (so we decide *whether* to use the range
only once), and then the range itself is retrieved at the time it's used.

No cluster differences.

gs/base/gxi12bit.c
gs/base/gxicolor.c
gs/base/gximage.h
gs/base/gximono.c
gs/base/gxipixel.c


2013-01-29 17:45:45 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
295a195f85ced8b965f65bbc1fe6c3cf78c36e51

Bug 693026: Fix SEGV when @FILE can't open.

Argument processing happens early during Ghostscript start-up process.
Be prepared, that not all structures have been initialized yet.

gs/base/gsargs.c
gs/base/gsargs.h
gs/base/gsiodev.c
gs/psi/imainarg.c
pl/plmain.c


2013-01-27 14:03:05 -0800
Ray Johnston <ray.johnston@artifex.com>
ab9615d43302f03ce57fdd8e849ec52e870983e4

Bug 693590: MT rendering has wrong 'supports_devn' and incomplete color_info

Shadings use the comp_bits, comp_mask and comp_shift which must match
the main thread's setting, so we copy the color_info from the clist
device.

Also the thread's icc_struct->supports_devn must correspond to the main
thread's device (regressions with psdcmyk detected this).

gs/base/gxclthrd.c


2013-01-29 15:12:04 +0000
Chris Liddell <chris.liddell@artifex.com>
62df74b7ef081a9f35028b493843a4624048f7af

Bug 693599: Change the function configure checks for in liblcms2.

The lcms2 API changed at 2.2, adding the cmsGetTransformOutputFormat()
call. When we're checking if we can use the system's lcms2, change the
autoconf check to look for cmsGetTransformOutputFormat().

No cluster differences.

gs/base/configure.ac


2013-01-29 10:32:30 +0000
Chris Liddell <chris.liddell@artifex.com>
3c7aa3543e098620d70c5df143513718d3e83b12

Add the make fix from 1fbd0191 to the Mac specific subtarget.

CLUSTER_UNTESTED

gs/base/unix-dll.mak


2013-01-29 10:12:00 +0000
Chris Liddell <chris.liddell@artifex.com>
3233283cfe4370fb826998d14954e4870155c80e

Work around a make problem with "so" target

GNU make 3.82 appears to have a bug which causes problems with our "so"
targets. The "so" targets rely on recursice make calls to build various
subtargets, the shared library and the two executables that link to the shared
library.

On the final recursive make call (to build the executables), GNU make 3.82
wrongly identifies that one dependency (psbase.dev) has changed, and decides it
must rebuild the shared library. By this stage, however, the compiler options
have been setup to build an executable, rather than the shared library.

As a result, we build an executable with the name of the shared lib, and
then try to link that into an executable, which results in linker errors.

As it happens, the use of recursive make calls means we can safely drop a
dependency, which will prevent make from re-evaluating the problematic target,
and thus avoiding the problem arising.

CLUSTER_UNTESTED

gs/base/unix-dll.mak


2013-01-28 17:32:15 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
bbfbdf7574e6ac46b65b76b06dea6a4e94d35f31

Bug 693284: Prevent read access violation.
Check whether there's enough data.

gs/jbig2dec/jbig2_symbol_dict.c


2013-01-28 16:34:20 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
7ba5e87d05bb2bfff4e475fa21bd8558896ca053

Bug 693284: Detect missing glyphs and fail.

gs/jbig2dec/jbig2_symbol_dict.c
gs/jbig2dec/jbig2_text.c


2013-01-28 15:34:38 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
33794a10191cf1e5c1b41410ee068ba71cf3825c

Bug 693284: Conditional inclusion of memento header.

gs/jbig2dec/jbig2.h


2013-01-28 13:34:01 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
ccae004db8b875086995353c299cee196dd326fb

Bug 693284: Break an infinite loop.

gs/jbig2dec/jbig2_symbol_dict.c


2013-01-28 11:56:37 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
4b6594315066b8ded562111472aa5933c6c54238

Bug 693284: Fix 32 vs 64-bit typ[e mismatch.

gs/jbig2dec/jbig2_symbol_dict.c


2013-01-28 11:09:04 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
eea1deb225c19ab7a29b7ccdb33290d757853f1b

Bug 693284: Don't shift 32-bit value by 32.

gs/jbig2dec/jbig2_huffman.c


2013-01-28 09:03:30 +0000
Chris Liddell <chris.liddell@artifex.com>
9cf877b78dbe7d077d1369b07bdaf73ba8415e01

Handle cases where pointer alignment does not match pointer size.

On some hardware, pointer alignment does not necessarily match the size
of a pointer - handle that in genarch.

No cluster differences

gs/base/genarch.c


2013-01-28 08:55:02 +0000
Chris Liddell <chris.liddell@artifex.com>
8120955272fe1c9d1a8182c2dbba44758d3d3091

Fix unaligned pointer access.

In pdf_add_subset_prefix() change so that the hashing code accesses
the buffer byte at a time, rather than short at a time, and increment
through the buffer "sizeof(short)" bytes at a time. The former ensures
we never risk an unaligned memory access on strict alignment
architectures, and the latter ensures we hash all the relevant data
correctly.

No cluster differences.

gs/base/gdevpdtb.c


2013-01-28 08:57:12 +0000
Ken Sharp <ken.sharp@artifex.com>
daeb0a9a52f865e9088c29511fd397d8356ca775

pdfwrite - record the usage of outlines, articles, named dests and labels

When linearising, I forgot to add the dictionaries, referenced from the
Catalog, for Outlines, Threads, Named desintations and Page Lanels to
the usage record. This meant these dictionaries were accidentally
dropped from the final PDF file.

Here we just record their usage.

No diffrences expected.

gs/base/gdevpdf.c


2013-01-27 14:06:05 -0500
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
07d5a619b525898759a7468631a6cb775edf5bd6

Bug 691246: Handle inverted symbol region.

Propagate combination operator and also fix an error in coding XNOR
logical operation.

gs/jbig2dec/jbig2_generic.c
gs/jbig2dec/jbig2_image.c
gs/jbig2dec/jbig2_page.c


2013-01-27 01:46:17 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
0e140900d2f1eca99ad64c5bdef131cddc55e5ef

Bug 693513: Detect and reject negative parameters.

Fix detection of negative width and height attributes.
Add detection of negative number of dictionary symbols.

gs/jbig2dec/jbig2_symbol_dict.c


2013-01-26 21:47:12 -0700
Henry Stiles <henry.stiles@artifex.com>
152d0cec22438acbb6a5cd50a65b0f9f8c729195

Fix bug #693586 - clist error message.

The error was caused by sending image data to the library after the
page was output, now graphics mode is flushed and closed before the
page is output. The bug was introduced by ea54a03 which closed
graphics mode at the time of "end job" which could occur after output
page. We do need to leave that commit intact as the job could end
without outputting a page, and the raster state would not be cleaned
up.

pcl/pcpage.c


2013-01-26 21:43:50 -0700
Henry Stiles <henry.stiles@artifex.com>
386b7ab3dcdf165d6a9cae58a871e0bb78b7bdac

dwmainc.c include file dependencies added to makefile.

main/pcl6_msvc.mak


2013-01-26 19:58:46 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
e40d514124722e7babf4acaf1db5eb4e372b5f72

Bug 693496: Fix 16-bit gray image on CMYK devices on 32-bit platforms.

Use platform-independent way (memcmp) to compare color values instead of
instead of relying on the word sizes. Old code missed some of the
color components on 32-bit computers.

gs/base/gxi12bit.c


2013-01-25 22:46:38 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
81a36cc82e8680ac6bf7f0808402bf6ff02920ea

Bug 693587: Make EOL check a little more strict.
Don't skip space character after finding \r. Just peek for the following
\n and stop scanning.

gs/Resource/Init/pdf_base.ps


2013-01-25 15:29:12 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
a438b95a287f36b721331c50a4c47985616a0c19

Bug 693584: Fix annotation scaling.

Fix incorrect scaling of annotations with appearance subdirectories. Old code
always failed to find the actual appearance dictionary and used identity
scaling in such cases.

gs/Resource/Init/pdf_draw.ps


2013-01-25 09:50:41 -0800
Michael Vrhel <michael.vrhel@artifex.com>
5fa93a84163a0e2680ead7e76425c92da24bce5c

Another documentation update of the color architecture.

gs/doc/GS9_Color_Management.pdf
gs/doc/GS9_Color_Management.tex


2013-01-24 21:42:03 -0800
Michael Vrhel <michael.vrhel@artifex.com>
52cb8e94511a3a5acd8d3a21f6a22cf24d52962e

Update of color management document for 9.07 release

gs/doc/GS9_Color_Management.pdf
gs/doc/GS9_Color_Management.tex


2013-01-24 12:58:58 -0700
Henry Stiles <henry.stiles@artifex.com>
210c9344792bcf95c540f93428562c34104ffb28

Set stdio streams to binary, bug #693543.

This is exactly the same solution used in gs/base/dwmainc.c. The
commit also removes extraneous include files. Updating the associated
dwmain makefile target with the new include file dependencies is
forthcoming.

pl/dwmainc.c


2013-01-24 12:05:41 +0000
Chris Liddell <chris.liddell@artifex.com>
400e64a36f1f18e3642b705d926c49c42adc8599

Bug 693571: properly close allocator chunk during save

During a save operation, we "close" the open chunk and save the state of the
current generation of an allocator before creating a new generation and opening
a new chunk for the new generation.

After doing that, we try to eliminate any redundant changes listed for the
"saved" allocator instance. That can end freeing memory in the "closed" chunk,
leaving it in an unstable state, and causing the garbage collector to try to
validate already freed memory.

In drop_redundant_changes() we now call alloc_open_chunk() and
alloc_close_chunk() so that, in event we do disard changes (thus freeing
memory), the allocator is left in an internally consistent state, and
avoids confusing the chunk validation code during garbage collection.

No cluster differences.

gs/psi/isave.c


2013-01-24 11:56:25 +0000
Chris Liddell <chris.liddell@artifex.com>
149811fa66aaaf272a1377e9df1a79f3752e0299

Update int_freed_top in the correct chunk

In i_free_object() we were identifying the correct chunk for the memory
address we were freeing, but then always updating int_freed_top in the
current chunk. This could cause us to fail to consolidate free blocks when
we possibly could, or to attempt to do so when it would be pointless.

So we now identify whether the address is in the current chunk, and write
int_freed_top in that, or use the actual chunk pointer for the freed
memory block.

No cluster differences.

gs/base/gsalloc.c


2013-01-24 11:44:39 +0000
Chris Liddell <chris.liddell@artifex.com>
0f0a42367372cffeb80e32a4244dc74031fda077

Use the correct memory pointer for glyph cache init

The PS interpreter initialised the glyph cache using the "imemory"
pointer for the cache memory. But if the cache gets resized via
a setuserparams or setcacheparams, the graphics libarary would then
use the "stable_memory" pointer to free the original memory, and allocate
the new. Thus illiciting warning about "memory not owned by allocator" when
running with -ZA

Switch the PS interpreter initialisation to also use "stable_memory".

No cluster differences.

gs/psi/zfont.c


2013-01-24 11:36:16 +0000
Chris Liddell <chris.liddell@artifex.com>
3b2819779786467f3ed6799242947d811186a29a

Change the memory pointer used for if_debug2m()

The cmem pointer can be null in stream_finalize() if it is called from the
garbage collector. Use the memory pointer from the stream object instead.

No cluster differences.

gs/base/stream.c


2013-01-23 16:11:32 +0000
Chris Liddell <chris.liddell@artifex.com>
57744bd8af3b06cea888b7a66c8349c5096b748d

Bug 693572: handle missing a glyph outline.

We purposefully ignore some errors during glyph creation. In that event,
the path creation for an outline glyph, we weren't checking for the
outline being missing.

No cluster differences.

gs/base/fapi_ft.c


2013-01-23 09:06:04 +0000
Ken Sharp <ken.sharp@artifex.com>
bb8f4582d893aab544597599b9498e38dfa12de4

ps2write - Don't add PageLabels to the Catalog when we get a relevant pdfmark

Bug 693551 " Regression: "Error handled by opdfread.ps : rangecheck" starting with 5784bfbfba7191cacce5309e88afac0851287460"

opdfread.ps doesn't know what to do with a PageLabel, so don't emit them

Not sure why this didn't show up in the original cluster test

gs/base/gdevpdfp.c


2013-01-23 08:19:24 +0000
Ken Sharp <ken.sharp@artifex.com>
5874ad1dfa17839d499db8b041a5fc9bdbfd6b22

Properly initialise 'clip' device

Bug #693575 "segfault with ps2write and -dDisablePAPI"

Although labeled as a PS writer problem this is in fact a general bug. In
gx_image_fill_masked we call gx_image_fill_masked_start() with a pointer
to a gx_device * which we expect to be filled in.

This will be the device which accumulates the clip, if the current target
device can accumulate clips then we use it, otherwise we set up an
accumulation device.

However there was a path through gx_image_fill_masked_start which did not
set the device, leading to the variable being left uninitialised and
causing a later crash.

This patch initialises the variable to the current device before calling
gx_image_fill_masked_start and also fixes the code path in that routine
so that it always fills in the device. Just to be safe.

No differences expected.

gs/base/gximask.c


2013-01-23 08:46:58 +0100
Till Kamppeter <till.kamppeter@gmail.com>
5420903e1cbccc8c27c8e9f82c21efd9fef36366

Silenced compiler warnings in cups/gdevcups.c.

gs/cups/gdevcups.c


2013-01-22 20:25:18 -0800
Ray Johnston <ray.johnston@artifex.com>
f0f048ae68e9b93b536a52c783b566652ab72b3e

Bug 693573; Prevent multiple free when MT rendering cannot start any threads

When the MT rendering fails to start any device after the thread's
chunk allocator was set up, multiple free of the allocator would occur
because the thread's 'memory' was not set to NULL.

gs/base/gxclthrd.c


2013-01-22 21:24:17 -0700
Henry Stiles <henry.stiles@artifex.com>
76fa834e14471fb54e3dd23802a8c8f53d7fda0e

Fix warning, missing declaration, in the previous commit
ea54a0304934c570a51ca5eec216b0480f2b5be5

pcl/pcl.mak
pcl/pctop.c


2013-01-22 20:07:57 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
81ea731e97a93a5c9e3f59d7f67f8b3aa5c495c8

Bug 693570: Clear operand stack finishing PDF page.

Clear all objects that may be left behind by PDF command streams.
Stray composite objects interfere with a restore operator at the
end of the page.

gs/Resource/Init/pdf_main.ps


2013-01-22 18:04:09 -0700
Henry Stiles <henry.stiles@artifex.com>
298abec0432d87b25e57b2ab549b1817f396e851

Remove a bogus comment, lineprinter font is bound.

pl/plftable.h


2013-01-22 17:51:08 -0700
Henry Stiles <henry.stiles@artifex.com>
ea54a0304934c570a51ca5eec216b0480f2b5be5

Fixes interpreter crash see bug #693543.

If a PCL job exited in the middle of a raster stream graphics mode was
not terminated properly at the end of the job, instead we tried to
shut down graphics later at the time of interpreter shutdown which
leads to a unordered freeing of resources.

pcl/pctop.c
pcl/rtgmode.c


2013-01-22 21:06:37 +0100
Till Kamppeter <till.kamppeter@gmail.com>
188e13b462ce0d606735b53e22bdba667e391c00

CUPS Raster "cups" device: Improvements for pages size matching with PPD

These changes improve the matching of the sizes of the incoming pages with
the page sizes available for thr printer according to the PPD file.

Instead of stopping to searcg through the PPDs page sizes when a size
gets found which fits within the limits, we always go through all page
sizes to find the best match. We consider the best match the size with
the name given on the command line/by the input file and matching the
size of the current page within the limits, second level is a match of
size and margins and third level is only matching the size. If there
is more than one match of the same level, the product of the
horizontal and vertival size deviation counts.

In addition, we let the gstoraster wrapper CUPS filter for Ghostscript
call Ghostscript with all parameters on the command line (especially
also the page size name) also when the input is PostScript.

gs/cups/gdevcups.c
gs/cups/gstoraster.c


2013-01-18 13:14:15 -0800
Ray Johnston <ray.johnston@artifex.com>
2ae1a17c87e2e0d6de13d3a354129ff09668bb32

Fix Bug 693422. SEGV due to transparency and patterns

This change disables the check when doing the pattern_cache_lookup,
since transparency ops that set the colorspace may have been omitted
from bands where they are not needed, but a large pattern may have
been written to all bands. Thanks to Alex for finding this.

gs/base/gsptype1.c


2013-01-17 14:25:25 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
96a8e3595982078f0bfd6a93cb51e420f25fdc31

Bug 693550: Consider max color index -1 as 255.

gs/Resource/Init/pdf_draw.ps


2013-01-17 18:44:10 +0000
Robin Watts <robin.watts@artifex.com>
57a5089f1e2c2a83eceec81dfa2facf5f9fb51e0

Bug 693541: Fix color setup in pdf14_create_clist_device.

When we create a pdf14 clist device (a pdf14cmykspot device, in this
case) in pdf14_create_clist_device, we are at pains to set the
num_components and max_components appropriately. At no point do we
similarly sanitise the depth however.

The fix applied here is an exact parallel to the first commit for
this bug.

gs/base/gdevp14.c


2013-01-17 12:22:34 -0700
Henry Stiles <henry.stiles@artifex.com>
8e57017fa3eaeb1c2034eb0925e0da2f38e286d3

Fixes 693552 - regression with polygon handling.

The previous fix, b2796b4d58, did not properly handle the pathological
case of adding an HPGL/2 sub-polygon to an empty polygon path.

pcl/pgpoly.c


2013-01-17 17:58:01 +0000
Robin Watts <robin.watts@artifex.com>
2a3bf5a4865d2d97e46742d14814758bb70abf53

Bug 693541: Fix 'undefined filename' error

If '%' is used in a separation name (say "45% 286 overprinting 186"),
then when the file is opened, we interpret the % as a format specifier
and we complain. Simple fix is to replace '%' with '_' when generating
the tif filenames.

The file now runs further, and hits another (unrelated) pattern cache
problem.

gs/base/gdevtsep.c


2013-01-15 13:31:50 +0000
Robin Watts <robin.watts@artifex.com>
045ad34f5074874c38e77919db920c5ed45dc5f5

Bug 693541: Fix planar depth calculation from color_info.

At various places in the code, we assume that for a planar device:

dev->color_info.depth = dev->color_info.num_components * plane_depth

This is NOT necessarily the case (due to tag planes etc).

We therefore avoid the need for this calculation by adjusting the
return value from gxdso_is_native_planar; rather than returning 0
or 1 (for not-planar or planar), we now return 0 or the depth of
the planes.

The logic in pdf14_create_clist_device is updated to use this. This
gets the file mentioned in the bug through to another (seemingly
unrelated) crash that I will investigate next.

gs/base/gdevdrop.c
gs/base/gdevmpla.c
gs/base/gdevp14.c
gs/base/gdevppla.c
gs/base/gxclimag.c
gs/base/gxclist.c
gs/base/gxclist.h
gs/base/gxcolor2.h
gs/base/gxdevsop.h
gs/base/gxht_thresh.c
gs/base/gxicolor.c
gs/base/gximono.c
gs/base/gxp1fill.c
gs/base/gxpcmap.c


2013-01-16 12:08:24 -0800
Ray Johnston <ray.johnston@artifex.com>
37e07e95a5588c2feaba60bbf506a7a9e433a43c

Fix bug 693557: SEGV regression with NumRenderingThreads > 0 in pattern_load

This was due to the pdf14 device changing num_components during clist playback
when it had not changed during writing the clist. When a pattern tried to load
it failed the check that the depth of the pattern matched the depth of the
device. This was traced to picking the pdf14cmyk device during rendering instead
of the pdf14CMYKspot device because the thread's max_components was set to 4,
not 14 (as during clist writing). Fix the MaxSeparations in gsdparam to return
max_components instead of num_components, then fix devn_get_params to pass the
PageSpotColors param and the setting of num_components in devn_put_params to
ignore max_separations since that doesn't make sense.

gs/base/gdevdevn.c
gs/base/gsdparam.c


2013-01-16 21:54:23 +0000
Robin Watts <robin.watts@artifex.com>
cb51890a39bb97de55c5ce4734c55cba060d8e79

pdf14_mark_rectangle speedups

Customer 532 report 3 files that perform slower than they would like.
Profiling of these files shows that they all make heavy use of
fill rectangle calls on a pdf14 device. This means lots of time
is spent in pdf14_mark_fill_rectangle, and the subsidiary function
it calls, art_pdf_composite_pixel_alpha_8.

This commit introduces various optimisations:

1) We avoid the collation/decollation copies for the additive
case by using a new function (art_pdf_composite_alpha_8_fast) that
takes the planeheight as an arg. This may do the collation/decollation
internally if required.

2) We pull the logic for the 2 fast cases out of
art_pdf_composite_pixel_alpha_8_fast.

3) We rejig the loops to count downwards where possible.

4) We reduce the number of variables in use within the loop by
updating rowstride/alpha_g_off/shape_off/tag_off etc before the
loop.

5) We modify the values of src_alpha and shape before the loop to
avoid repeated calculations within the loops.

6) We add a special case loop to handle the num_comp == 1 && additive
case (as typically seem with monochrome or grayscale devices). This uses
an even simpler art_pdf_composite_alpha_8_fast_mono routine (no loops
and fewer multiplies).

Feedback from customer 532 is that these changes (backported to their
8.71 based system) gives a noticable speedup.

gs/base/gdevp14.c
gs/base/gxblend.c
gs/base/gxblend.h


2013-01-11 09:55:22 -0800
Michael Vrhel <michael.vrhel@artifex.com>
ed38aa2fffd43cc0b38a4a0d1d66ec304ef0924e

Fix for issue with transparency B stroke fill operation with softmask

During a B operation (Stroke and fill) with transparency we push a knockout group to make sure
the stroke blows away the fill rather than blending. When there was a softmask present, we
were not passing along the soft mask for the fill portions during the group compositing operation.

gs/base/gxblend.c
gs/base/gxblend.h
gs/base/gxblend1.c


2013-01-10 12:17:08 -0800
Ray Johnston <ray.johnston@artifex.com>
1bc2a56f913ff1fa3f7af06000a4c6dd5c948afd

Fix bug 693361: Rendering threads unsafe use of main thread allocator.

The PCL main thread allocator is not thread safe, and the rendering
threads would end up using this allocator to form link profiles (in
the lcms logic) because the device profile had the 'memory' allocator
set to the main thread's allocator.

The fix found by Robin Watts was to use the thread's device (which
have a copy of the device profile with the thread's memory allocator,
set by gs_putdeviceparams) in the call to create_buf_device.

gs/base/gxclthrd.c


2013-01-10 12:08:03 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
79e780b55d1e832895b3a9c6aa13017a57d1ca72

Big 693185: Suppress unbalanced q/Q warning.

When the stream run is aborted, the processed part is likely to have
more q than Q. Reporting this fact to the user is misleading, because
it's an interpretation artifact rather than the file property.

gs/Resource/Init/pdf_base.ps
gs/Resource/Init/pdf_main.ps


2013-01-09 13:26:43 +0000
Ken Sharp <ken.sharp@artifex.com>
e8d295679c4b6eabe71256b748282be048b27c05

pdfwrite - when handling PaintType 2 fonts, cater for rotatedt text

We handle PaintType 2 fonts in PDF output by leaving them as regular type 1
fonts but setting the text rendering mode to 1 (stroke). Naturally we also
have to calculate an appropriate stroke width based on the font matrix,
text point size and, for PDF, the text matrix.

Previously we handled rotated FontMatrix entries, but didn't check for a
rotated text matrix, which led to a multiplication by 0 and setting the
stroke width much too narrow.

No differences expected.

gs/base/gdevpdtt.c


2013-01-09 02:12:56 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
339fcbd26065c2771a33ea8c805ff70bd097684a

Bug 693033: Build shading in stopped context.

Move shading dictionary construction into a stopped context. New code
just drops a shading that cannot be constructed or rendered instead of
aborting the whole stream run.

gs/Resource/Init/pdf_draw.ps


2013-01-08 14:17:44 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
cf46f4c8ce91e6d62c902e58c79267934eed6eda

Bug 693420: Add missing initialization of sim_overprint.

Valgrind detects that sim_overprint is not initialised in this case.
Normally, gcc has it set to 0 and produces normal output. Setting it
to 1 creates the same incorrect output as reported.

gs/base/gsicc_manage.c


2013-01-08 17:45:46 +0000
Chris Liddell <chris.liddell@artifex.com>
bb5a79b39e4ada667ac2e9c91179da29bafbd129

Fix "fallback" to know about Microtype fonts

In the event that FAPI fails to handle a font, there is a (temporary) fallback
to the AFS code.

That fallback *must* not be used for the Microtype fonts loaded via UFST, since
the font loading code uses the error return to determine that we've loaded all
the fonts from the FCO.

No cluster differences.

pl/plfapi.c


2013-01-08 17:03:21 +0000
Chris Liddell <chris.liddell@artifex.com>
693b5421da925b627b7ce573ea7346b5d3611de9

Bug 693538: tweak TTF cmap format 4 parsing.

Empty segments in the cmap table (that is, those where the start character code
is the same as the end code) aren't ignored, we correctly "fake" a one entry
segment. It seems, however, that we should *not* do that when the start and
end codes are zero - in that case, we should ignore it.

No cluster differences.

gs/Resource/Init/gs_ttf.ps


2013-01-08 08:47:01 +0000
Chris Liddell <chris.liddell@artifex.com>
3cc531830906a291d4d088e31936a92d7324e53c

Switch Ghostscript/GhostPDL to Affero GPL

As discussed on IRC, e-mail and at the last staff meeting.

COPYING
LICENSE
gs/LICENSE
gs/doc/COPYING
gs/doc/Commprod.htm
gs/doc/Readme.htm
gs/doc/WhatIsGS.htm
gs/examples/cjk/all_ac1.ps
gs/examples/cjk/all_ag1.ps
gs/examples/cjk/all_aj1.ps
gs/examples/cjk/all_aj2.ps
gs/examples/cjk/all_ak1.ps
gs/examples/cjk/gscjk_ac.ps
gs/examples/cjk/gscjk_ag.ps
gs/examples/cjk/gscjk_aj.ps
gs/examples/cjk/gscjk_ak.ps
gs/examples/cjk/iso2022.ps
gs/examples/cjk/iso2022v.ps


2013-01-07 22:05:54 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
e49f26eedd54120b615487db37dbdc1429685f79

Bug 693539: Add duplex option to gslp utility.

Commit a contributed patch that adds a duplex option to gslp script.

gs/lib/gslp.ps


2013-01-07 13:29:03 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
2f85458194f235cf9236214b49c385e9bad4e11e

bug 693485: Handle single '~' as EOF in PDF

Accept single '~' as a valid end of stream indicator in PDF files.
Acrobat Reader accepts this kind of PDF files without warnings.

gs/base/sa85d.c


2013-01-07 13:53:14 +0000
Chris Liddell <chris.liddell@artifex.com>
27df0d4971de23a82f0284c28aeb6e36cf355e46

Bug 693532: Fix GTK+ 2.x fallback.

The conditions under which to test for and use GTK+ 2.x were incorrect.

No cluster differences.

gs/base/configure.ac


2013-01-07 08:33:05 +0000
Chris Liddell <chris.liddell@artifex.com>
e639c0764cc50640135528fa6b0faac233bd87d2

Fix indeterminism with FAPi and artificial bold glyphs

Copy the raster lines from the FAPI bitmap into a temporary, appropriately
aligned buffer before doing the "smearing".

Also ensure that the FAPI settings for XL downloaded font and emboldening are
correct.

Potentially affects all PCL/PXL test files with emboldening and XL fonts.

gs/base/gxfapi.c
pl/plfapi.c


2013-01-04 20:34:47 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
def5e256da42d12cf8103fa7481380b6df84aa96

Bug 93512: Add -dUseArtBox option.

ArtBox is often the smallest of all boxes. This option can be useful
when the file should be cropped to the smallest box without loss of
the contemt. Thanks to Marcos for the patch.

gs/Resource/Init/pdf_main.ps
gs/doc/Use.htm


2013-01-04 02:39:34 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
5124cc05570819036a7bf689dbed91f57f74ba24

Bug 693528: trap errors in ToUnicode CMap

Read ToUnicode CMap in a stopped context. Ignore the CMap if
reading fails.

gs/Resource/Init/pdf_font.ps


2013-01-02 17:21:24 +0000
Ken Sharp <ken.sharp@artifex.com>
af5ba82a0c147b207d276a1acb9daa7bf7665227

pdfwritre - change fixed buffer for CIDSystemInfo to dynamic allocation

Bug #693514 "Broken PDF produced from PostScript by Windows 8 Microsoft
PS Class Driver"

The problem is that the CIDSystemInfo Registry and Ordering produced by
the Microsoft XPS to PS device is > 32 characters. The code to write the
CIDSystemInfo used a fixed buffer of 32 characters. If that overflowed we
returned a limitcheck which caused pdfwrite to attempt a type 3 fallback
which also failed.

Changed the code to (more logically) allocate a buffer for the temporary
usage. Also if this fails we return a VMerror which doesn't trigger an
attempt to fall back to type 3.

No Expected Differences

gs/base/gdevpdtw.c


2012-12-28 18:32:37 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
bc70bf785efcb1a3f9c995b5d8b4c1c29dc881e5

Bug 693511: Ignore spurious ET operator

Ignore ET operator when it appears outside of BT context and issue
a warning.

gs/Resource/Init/pdf_ops.ps


2012-12-28 10:20:44 -0800
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
fea783c88450639227cfc456557ce16c348c9a67

Fixed minor typo in documentation.

gs/doc/Make.htm


2012-12-25 13:27:35 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
ec5b8eb0ccf0fc6881a6ffd2d190aa40e1faef1c

Bug 693490: Warn about searching external contexts.

gs/Resource/Init/pdf_main.ps


2012-12-25 12:58:02 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
23e7e3054c095cd5157f2f7768f95a75b86f9779

Bug 693490: Search all XObject resources.

Adobe Acrobat appears to search all nested XObjects for resource names
contrary to the PDF specification. This patch follows the reference
implementation and saves a pointer to XObject resource dictionary on
the graphic state. When a resource cannot be found in a standard way,
the stack of graphic states is searched.

gs/Resource/Init/pdf_draw.ps
gs/Resource/Init/pdf_main.ps


2012-12-22 12:21:38 -0800
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
b25fb04f7210656dd987cf23151aec08f4a9f2ee

Documentation update (Bug 693491).

gs/doc/Make.htm


2012-12-22 09:57:10 -0800
Michael Vrhel <michael.vrhel@artifex.com>
6ca50ddca3268fe4626279c591e6fe3dce4c4228

Have the PDF14 device properly set up some of its color info

The lack of setting the comp_bits components in the color info when we have
the pdf14 CMYKSpot device caused an issue in the shading code. Fixes
Bug 693480.

gs/base/gdevp14.c


2012-12-13 11:23:41 -0800
Michael Vrhel <michael.vrhel@artifex.com>
1276ea02ac198b92788e3f6fac704c6ae2c2c4c7

Enable proper blending to occur when we draw transparency patterns.

This fixes Bug 693498. Previously we were not getting the blending information to
the group that we push to draw into. Also, there was a difference in how the clist
and non-clist pattern cases had to be handled. In the clist case, we do not know
what the blend mode for a group encompassing the pattern would be until the pattern is
run through the clist. Hence its logic with respect to transparency required a change.
Also fixed a bug that occurred when we used the -Zv debug option.

gs/base/gdevp14.c
gs/base/gsptype1.c
gs/base/gxblend.h
gs/base/gxblend1.c


2012-12-14 11:45:41 +0000
Chris Liddell <chris.liddell@artifex.com>
316c27810d36e234fa4b254765e35268cfadbc27

Remove some debugging code

left in accidentally.

No cluster differences.

gs/base/configure.ac


2012-12-13 16:10:03 +0000
Chris Liddell <chris.liddell@artifex.com>
e5508fa002678eff5012ce09621d2b94c66e55a5

Allow opt out of GNU make feature.

As we currently only use one GNU make only feature, allow the user
to opt out of it at configure time with "--without-gnu-make".

Tested with Sun make and Sun dmake.

No cluster differences.

gs/base/Makefile.in
gs/base/configure.ac


2012-12-13 18:44:14 +0000
Robin Watts <robin.watts@artifex.com>
da6307c97ac317a41e518c1db659a9dd88188669

Fix pthreads error handling mistake.

This bug was inherited from the mupdf example code I stole it from.
It seems that pthreads signals errors as non zero, not negative.

gs/psi/apitest.c


2012-12-13 16:56:09 +0000
Robin Watts <robin.watts@artifex.com>
776fe65eb131dd05728d8a448b6e4ce8dea5a9e0

Document GS_THREADSAFE option

gs/doc/API.htm


2012-12-13 15:44:23 +0000
Chris Liddell <chris.liddell@artifex.com>
e4e84ee2f724710d3a34119c13a621bd32c283d2

Bug 693501: have configure detect and handle memalign

OpenJPEG uses memalign, if available, but has a rather poor test for it being
available.

This change has configure check for memalign, and augment the compiler command
line to replace memalign with a normal malloc for the OpenJPEG code.

So, several BSD variants, AIX etc should now build okay.

No cluster differences.

gs/base/configure.ac


2012-12-13 14:59:19 +0000
Chris Liddell <chris.liddell@artifex.com>
bbc2e3b761fd58e1cfe155840c0b948e71c5f37d

Fix the SHARE_ZLIB build.

Add an EXTRALIBS variable for the aux programs (AUXEXTRALIBS) so that
the "-l" directives get included, and in the correct position on the
compiler/linker command line.

No cluster differences.

gs/base/Makefile.in
gs/base/unix-aux.mak


2012-12-12 10:23:27 -0800
Michael Vrhel <michael.vrhel@artifex.com>
ee7fdd12e17fad500202234e04035d85fb70ebd0

Perform range restriction after tint transform of separation color.

Fixes bug 693497. Thanks to Alex for solving the issue before I even had a look at it.

gs/base/gscsepr.c


2012-12-09 09:48:14 -0800
Chris Liddell <chris.liddell@artifex.com>
363443d8b2e8373541a886ed16ad281bfd6d31f4

Fix memory leaks from FAPI/FT glyph data buffers.

No cluster differences.

gs/base/fapi_ft.c


2012-12-08 17:53:34 -0800
Chris Liddell <chris.liddell@artifex.com>
078175e8df7835ff4df00e53b256a9c7fbd32ed7

Fix pl_fapi_passfont() return code.

For now we want to fall back to the AFS code if FAPI can't handle a font.

No cluster differences.

pl/plfapi.c


2012-12-08 22:29:57 -0800
Ray Johnston <ray.johnston@artifex.com>
a8e20d4064e3df5fbb347a0cc8176635ce842e33

Fix ARCH_SIZEOF_GX_COLOR_INDEX that mistakenly got committed in git-confusion.

ARCH_SIZEOF_COLOR_INDEX was in a local branch that got had the problem and
got pushed when trying to work from my confused git repo.

gs/base/gxclutil.c


2012-12-08 14:46:27 -0800
Ray Johnston <ray.johnston@artifex.com>
9305f19f4ce60e9fbd3e15d1f22ceaa28502f95b

Get rid of compiler warnings when SIZEOF_GX_COLOR_INDEX is 4.

gs/base/gxclutil.c


2012-12-08 10:57:04 -0800
Chris Liddell <chris.liddell@artifex.com>
024697aa2aec80c2e162a2e7a0707006b418e0e3

Fix a little bitrot in the trace device(s).

CLUSTER_UNTESTED

gs/base/gdevtrac.c


2012-12-07 21:07:17 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
482da0636bf70aea3bd44839e27eee650e430982

Bug 690778: revert big resource hack.

Revert most of the commit 93ffd5c00fef9f616fa6785106935344f6db69b5,
which worked around 64K limit in resource dictionaries. gs now can
create big objects directly.

gs/Resource/Init/pdf_base.ps
gs/Resource/Init/pdf_main.ps


2012-12-05 20:36:59 +0000
Chris Liddell <chris.liddell@artifex.com>
01d43e701413c63dc3d7f85b4c5d748b7b7da8c9

Add some missing header dependencies.

No cluster differences.

pl/pl.mak


2012-12-05 19:32:45 +0000
Chris Liddell <chris.liddell@artifex.com>
0e107d4c37b14c21f5d855b70443873e9e9e9a8e

Make MAX_TOKEN big enough for large paths

Recommended by Nelson Beebe - his work reviewed a large number of common (and
not so common) environments, and the largest allowable "monolithic" path is
4096 characters, so I've made MAX_TOKEN that size.

No cluster differences.

gs/base/genconf.c


2012-12-05 12:44:38 +0000
Chris Liddell <chris.liddell@artifex.com>
49571b9821b825cafd9691a7d25dfdeebbf9dd7d

Various fixes for FAPI/UFST.

Allow the "old school", non-FAPI PCL/UFST build to continue to work.

Add support for UFST 5.x with FAPI.

For XL format downloaded TTFs, disable hinting.

This causes differences in ~161 cluster PCL test files - that is, files that
have XL format downloaded Truetype fonts in them.

config.mak.in
configure.ac
gs/base/configure.ac
gs/base/fapi_ft.c
gs/base/fapiufst.c
gs/base/gxfapi.c
gs/base/gxfapiu.c
gs/psi/zfapi.c
main/pcl6_gcc.mak
pl/pl.mak
pl/plfapi.c
pl/plftable.h
pl/pllfont.c
pl/plulfont.c


2012-12-04 08:39:14 +0000
Chris Liddell <chris.liddell@artifex.com>
59d840fc9bdcf7d7ebb03d4d2d3f1e4d5d927d14

Bug 693479: add missing CID to glyph index step

For TTF CIDFonts loaded from disk (usually as a substitute), and using an
Identity ordering, there was a missing step to get from the CID to the TTF
GID. This caused problems when a PDF included a non-identity CIDToGIDMap.

No cluster differences.

gs/psi/zfapi.c


2012-12-03 17:32:56 +0000
Ken Sharp <ken.sharp@artifex.com>
5b4cea1173891c7c7252eb790af8357c9065a5ce

pdfwrite - improve locaFormat fix

commit 4d20aa6061c6bc802c1ff8e031cfb434dd7fd490 sets the top byte of the
locaFormat in the HEAD table to be the same as 'indexToLocFormat. It
should actually always be 0, fixed here.

gs/base/gdevpsft.c


2012-12-03 12:10:12 +0000
Ken Sharp <ken.sharp@artifex.com>
4d20aa6061c6bc802c1ff8e031cfb434dd7fd490

pdfwrite - fix incorrect TrueType locaFormat.

Some TrueType fonts have the locaFormat specified incorrectly in little
endian format. Our code always writes short loca entries, and sets the
low order byte of the locaFormat to 0 (short entries).

It wasn't setting the high order byte, because it should never be
anything other than 0. However these incorrect fonts set the high order
byte instead of the low order. It seems TrueType consumers treat the format
as 0 or NOT 0 rather than chekcing the value, which meant we were leaving
the format incorrectly set.

This simple patch sets both bytes of the format in the HEAD table and fixes
the problem.

Expected differences
Bug691850.pdf and Bug691035b.pdf show significant progressions

gs/base/gdevpsft.c


2012-12-01 09:44:56 +0000
Ken Sharp <ken.sharp@artifex.com>
3a4439baee68c440da7164daf55de04a4d48609a

pdfwrite - fix bug in commit a3d00daf5f9abb1209cb750a95e23bc6951c1c63

missed an entry in the PDFDocEncoding lookup table, also fixed a minor
error message and corrected an index.

No differences expected.

gs/base/gdevpdfe.c


2012-11-30 17:03:02 -0800
Michael Vrhel <michael.vrhel@artifex.com>
8ebecfe095e4585523fcbddbe1785473e0374b54

Fix so that the blackpoint is set to a proper enumerated value

Fixes bug 692530

gs/base/gdevpsd.c
gs/base/gdevrinkj.c
gs/base/gdevxcf.c


2012-11-30 16:51:48 -0800
Michael Vrhel <michael.vrhel@artifex.com>
c8fc6c53f0bce4be54c016ddd78f6cfe4d44419a

Avoid inserting the ICC profile into the halftoned TIFF output files.

Fixes bug 693060

gs/base/gdevtifs.c


2012-11-30 17:04:59 +0000
Robin Watts <robin.watts@artifex.com>
0bc3c907260275bf96a4d3e894e4a8146ddbb856

Remove .DS_Store files from lcms2 directory

These seem to upset at least one unzipping utility on the Mac, and
they serve no useful purpose for us.

gs/lcms2/Projects/mac/LittleCMS/.DS_Store
gs/lcms2/Projects/mac/LittleCMS/._.DS_Store


2012-11-30 16:02:22 +0000
Ken Sharp <ken.sharp@artifex.com>
a3d00daf5f9abb1209cb750a95e23bc6951c1c63

pdfwrite - convert non-UTF-16BE doc info to UTF-8 assuming PDFDocEncoding

Bug #693477 "Encoding of pdf metadata do not comply with pdf standard"

When processing Document info there is a pdfwrite parameter 'PDFDSCEncoding'
which, if present, is used to process the string into ASCII. However, if
this parameter is not supplied, we don't re-encode the string at all. Since
the XML must be UTF-8, this is potentially a problem.

Since we cannot know the source of the docinfo string (existing PDF, DOCINFO
pdfmark, or DSC comments in PostScript) we cannot make any judgement about
the encoding of the string data in the absence of PDFDSCENcoding. So we
choose to assume that its encoded using PDFDocEncoding if it does not
have a UTF-16BE BOM (which is the only other format permitted).

This should at least mean that the Docinfo and XML match and are legal.

No differences expected, the cluster doesn't check the XML

gs/base/gdevpdfe.c


2012-11-30 07:55:46 -0700
Henry Stiles <henry.stiles@artifex.com>
bb97932923e94ef0806909718da693bf7655631f

Fix 693269 - CCITT raster not using monochrome palette.

The RTL CCITT raster compression modes always use monochrome colors (a
palette with 1 bit per index). In our code this is somewhat awkward
requiring rebuilding the PCL raster and part of the graphics library
state as the compression mode can be changed after raster mode has
been entered and initialized with a color palette.

pcl/pccid.c
pcl/pccid.h
pcl/pcpalet.h
pcl/rtgmode.c
pcl/rtgmode.h
pcl/rtrstst.h


2012-11-30 07:46:01 -0700
Henry Stiles <henry.stiles@artifex.com>
df30839b4058ba92dd85883516258ce08eaca628

Bug 693437 - Improves PCL font selection.

We do not have perfect emulation of PCL font selection by attribute,
but this change does move us closer to the HP behavior. In particular
any font family attribute command (bold, italic etc.) cancels a
pending font selection by id, (i.e. the next selection will not use
the font id as a selection criteria).

pcl/pcfont.c
pcl/pcfont.h
pcl/pcfontpg.c
pcl/pcfsel.c
pcl/pcsfont.c
pcl/pcsymbol.c
pcl/pctext.c


2012-11-29 09:00:30 +0000
Chris Liddell <chris.liddell@artifex.com>
64ada98bdec11021ada90ddd21b8d9cdd9ee61a2

Make genconf's token buffer big enough for long paths

Thanks to Chen Qi ( Qi.Chen@windriver.com ) for pointing out the problem.

No cluster differences.

gs/base/genconf.c


2012-11-29 08:05:34 +0000
Chris Liddell <chris.liddell@artifex.com>
e02795887e3dd4fb75aaa90dc0bcf6d861246f4c

Bug 693474: Make ps2pdf14 script executable

CLUSTER_UNTESTED

gs/lib/ps2pdf14


2012-11-29 01:55:36 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
9e89056ce7f1998ac22cb274fd0ed29458ee5d35

Bug 693476: don't dump producer info for valid files

Don't dump producer info when the file is valid but GS cannot
process it for some reason. For instance, when the password is
missing or invalid.

gs/Resource/Init/pdf_sec.ps


2012-11-27 11:57:49 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
9b59e4d156deae8afd6c8eecad3ce8b83b2d7664

Bug 693450: Add platform-dependent validation for file name characters.

Add a new function to the portability layer that verifies, whether
a given character can be used in a file name. Convert separation
names to valid file names.

gs/base/devs.mak
gs/base/gdevtsep.c
gs/base/gp.h
gs/base/gp_dosfs.c
gs/base/gp_macio.c
gs/base/gp_ntfs.c
gs/base/gp_os2fs.c
gs/base/gp_unifn.c
gs/base/gp_vms.c


2012-11-27 01:04:52 -0500
Alex Cherepanov <alex.cherepanov@artifex.com>
f27a0b8a47f0faadb6797132d6b9ef00a1823529

Make PDF path construction operators more robust.

Ignore the path construction operator that fails for some reason,
and continue. Also correct the pdfemptycount value during form
processing to match reality.

gs/Resource/Init/pdf_draw.ps


2012-11-21 10:15:49 +0000
Ken Sharp <ken.sharp@artifex.com>
6f18589768e763238b5c45e46ba55dfef7dd59ae

pdfwrite - properly set the PreserveSMask parameter for non-transparent output

The PDF interpreter has historically handled SMasks by passing them directly to
the device, when the device is pdfwrite. This was altered to use a device
parameter rather than checking the3 device name.

This did not alter the functionality, which has always bee incorrect when
pdfwrite is not preserving transparency. We now alter the value of the
device parameter if we are instead rendering the transparent content to an
image. SMasks should now behave correctly when using PDF/A-1, PDF/X or
when setting the CompatibilityLevel to less than 1.4.

No differences expected as this is not cluster tested.

gs/base/gdevpdfp.c


2012-11-20 17:19:44 +0000
Chris Liddell <chris.liddell@artifex.com>
481e7652bffc369fd0b7bc5b52aebde2328c4c5d

Don't use return_error() for something not really an error

Quietens down the -Z# output.

No cluster differences.

gs/base/fapi_ft.c


2012-11-19 19:38:59 +0000
Ken Sharp <ken.sharp@artifex.com>
123c7fbf7f31e42dff306a6d0b993224387b1b3c

pdfwrite - further TrueType composite glyph improvement. Bug #693444

When we encounter a TrueType composite glyph, we add the 2 component glyphs
to the table of names, so that we generate a correct CMAP subtable in the
embedded subset font.

However, the name is based on the GID of the glyph, and if the GID happens
match a name in the font Encoding (type 42 font) *and* we use the glyph
which really corresponds to that name (but obviously has a different GID)
then we would end up with the wrong CMAP generated.

By not removing the GS_MIN_GLYPH_INDEX bias we create a new name which is
numeric and based on the GID. This guarantees no name collisions.

This leads to a regression in an XPS test file, but I think it is of the
'wrong before, differently wrong now' category and propose to ignore it on
that basis. (its a change in spacing, which cannot be directly affected by
this change.

gs/base/gxfcopy.c


2012-11-18 09:51:34 -0700
Henry Stiles <henry.stiles@artifex.com>
787b044f67826cfc0c8b9fda01728cb602b4c212

Bug #693111 fix refinement.

Refine the fix 8bec29de to add a configuration option so individual
commands can be selected for the unusual behavior of being ignored in
raster mode. I don't think we have a solid understanding of this
problem and this makes the fix significantly less likely to result in
a regression.

pcl/pcommand.h
pcl/pcparse.c
pcl/pcpatrn.c
pcl/rtgmode.c
pcl/rtgmode.h


2012-11-17 10:57:53 -0700
Henry Stiles <henry.stiles@artifex.com>
8bec29de4c0b67873d1e33e77296eed410be172e

Fixes Bug 693311 - Black rectangle output instead of expected image.

Normally if the PCL interpreter receives a command while processing
raster or an image, the command is ignored and raster is shut down.
These so called "locked out" commands do not close out the raster on
plotters using the HPGL/2-RTL emulation.

pcl/pcparse.c
pcl/rtgmode.c
pcl/rtgmode.h


2012-11-16 14:56:12 +0000
Chris Liddell <chris.liddell@artifex.com>
6a00be33f0127db231ca42f97e1f8b6ca4f69ecf

Bug 693451: avoid notdef "special casing" for cid fonts.

Bug692320.pdf should display as before the FAPI work.

gs/base/fapi_ft.c


2012-11-14 16:52:27 -0800
Michael Vrhel <michael.vrhel@artifex.com>
9cb6ee748223ec3373151047d921d75bbeffc4e9

Fix for issues with icc output intent

Proper rendering of the output rendering intent Ghent test files to RGB based devices require that
the output intent profile is used as a proofing profile. Unfortunately littleCMS does not allow one
to specify different rendering intents to use when connecting a group of profiles together. This
is needed to render these files correctly. The solution was to create a device link profile for the
first rendering intent (e.g perceptual) when going from source to proof. Then the remainder of the
transforms are handled in a relative colorimetric manner from proof to destination and possibly through
the device's link profile.

gs/base/gsicc_cache.c
gs/base/gsicc_lcms2.c


2012-11-13 23:20:39 +0000
Chris Liddell <chris.liddell@artifex.com>
8ebb6896c6f7ba59a6e7dec1267a65a66f817f1c

Use consistent ctm scale for metrics retrieval.

This minimises differences at different resolutions, and uses a scale chosen to
minimise rounding errors.

Also, fix handling of missing glyph in the glyph metrics retrieval function.

Lots of cluster differences in PCL/PXL tests.

pl/plfapi.c


2012-11-13 23:18:17 +0000
Chris Liddell <chris.liddell@artifex.com>
a372bbae80c5b14cf68d2893db790acfef4a4f86

Remove (temporarily?) the Makefile exclusion.

We can't simply exclude Makefile, since the GhostPDL top Makefile is not a derived file.

CLUSTER_UNTESTED

gs/toolbin/localcluster/clusterpush.pl


2012-11-13 18:02:39 +0000
Chris Liddell <chris.liddell@artifex.com>
1e05c7a541280979e0884f8ea1c1cee6eba8f229

Fix the language_switch Windows build with new fapi code.

CLUSTER_UNTESTED

language_switch/pspcl6_msvc.mak


2012-11-13 17:01:53 +0000
Ken Sharp <ken.sharp@artifex.com>
e1af42f1cca2cfb1f3f0c2d9e59e46bb8697fa27

pdfwrite - amended white list for font DRM

Copied again from teh Adobe web site, but mergin with the old list rather
than replacing. It looks like Adobe have changed some of their font names.

This shows a difference in fonts.pdf, beacuse we are now permitted to embed
Mathematical Pi. THis is a progression

gs/base/whitelst.c


2012-11-13 12:59:17 +0000
Chris Liddell <chris.liddell@artifex.com>
c54b37f8a5ad111dbfad499ba1c642ba404f5e93

Fix a couple of Windows build issues with the new fapi code

CLUSTER_UNTESTED

gs/base/winlib.mak
main/pcl6_msvc.mak
xps/xps_msvc.mak


2012-06-01 15:44:11 +0100
Chris Liddell <chris.liddell@artifex.com>
58937f6debfbed7675a0ce5cb8d0aa629e3fa7b8

Extend/modify FAPI for use by PDLs other than PS/PDF.

All languages take a -dDisableFAPI option which reverts to the AFS code.

On Unuix type systems
./configure --disable-fapi

and on Windows, adding "FT_BRIDGE=0"

create builds without the FAPI font handling.

Both of these will be removed as the FAPI code matures.

Move Font API from psi into base.

Split the FAPI functions into the interpreter dependent ones, and the "core"
functions. Move the core functions into the graphics library.

Change fapi.dev to fapi_ps.dev

Since the old fapi.dev is now split into core and PS dependent parts, the
old fapi.dev gets renamed as fapi_ps.dev

Basic TrueType support thru FAPI for pcl and pxl.

Doesn't include artificial boldening.

Basic FAPI functions working with XPS interpreter.

(Mostly) Make PCL/UFST work through gs_fapi API

Bug 693188: don't skip glyphs with degenerate matrices

In commit 752397ab, the fix for Bug 692263 was to skip over glyphs when the
matrix in force for the glyph had a zero scale in either dimension.

It seems that this approach had potentially unfavourable side effects in the
glyph cache.

So, when we encounter a degenerate matrix rendering a glyph, we now force a
minimal, non-zero scale before attempting to render the glyph. This placates
the glyph cache.

Cluster testing shows (tiny) progressions in Bug689006.pdf, Bug690179.pdf,
and Bug692634.ps, and pixel differences, not identifiable as progressions
or regressions in Bug690497.pdf and 12-07C.PS.

Conflicts:

gs/psi/fapiufst.c
gs/psi/ifapi.h
gs/psi/zfapi.c

Revise gs_fapi_available and zFAPIavailable so they can check for
a specific fapi server being available (as well as just fapi itself being
available.

Tidy up header includes, and header dependencies.

Typos, warnings and dependency mistakes.

Handle FAPI having no servers gracefully in PCL and XPS

Use existing API to retrieve glyph metrics.

Fix some PCL/PXL spacing problems.

Improve handling of notdefs in PCL/PXL

Some reformatting.

Update fapi call in xps and fix some merge mistakes.

Change gs_fapi_do_char() parameters to gs_glyph and gs_char types.

Handle GS_NO_CHAR value better.

Remove deprecated char_code entry

Provide method for client to request ttf cmap in fapi.

Skip "unencodable" glyphs (that is character codes whose "decoding" results
in a gs_no_glyph glyph value).

Fix (finally, I think) the PCL notdef problems, and PCL text orientation.

Also, a GL spacing problem. Amend the Postscript size to work with these
changes.

FAPI API and warnings clean up.

Identify glyph index or otherwise....

...in the FAPI PS world.

fix a missing dependency

Include stdint_.h in gxfapi.h....

so int64_t is available. Add dependency.

Fix typo in dependency.

Changes to build gs_fapi on Windows.

Fix a typo

<sigh> another "notdef" handling revision

Add PCL/XL glyph boldening (bitmap smearing) to FAPI.

Remove some debug code accidentally left in.

Provide a "-dDisableFAPI" command line option for pcl/pxl/xps.

It's added in a very noddy way for two reasons: it needs acted upon
before the interpreter is initialised, and second to make it more
obvious to remove when we've gained confidence in the new fapi code.

Split fapi server builds out of lib.mak and into separate makefiles.

Add one commercial server build to the Ghostscript/GhostPDL build system, so
it no longer needs built separately.

Also fix a couple of dependency typos/errors.

Some tweaks to get the build changes working on Windows

Delete makefile....

Revise build changes.

Cluster differences in every PCL/PXL/XPS file with text display in a Truetype/Opentype font (including CFF).

common/msvc_top.mak
common/ugcc_top.mak
config.mak.in
configure.ac
gs/Resource/Init/gs_fapi.ps
gs/base/Makefile.in
gs/base/configure.ac
gs/base/fapi_bs.mak
gs/base/fapi_ft.c
gs/base/fapibstm.c
gs/base/fapiufst.c
gs/base/gconf.c
gs/base/genconf.c
gs/base/gscdefs.h
gs/base/gsinit.c
gs/base/gslibctx.h
gs/base/gxfapi.c
gs/base/gxfapi.h
gs/base/gxfapiu.c
gs/base/gxfapiu.h
gs/base/gxfont.h
gs/base/lib.mak
gs/base/stub.mak
gs/base/winlib.mak
gs/base/wrfont.c
gs/base/wrfont.h
gs/base/write_t1.c
gs/base/write_t1.h
gs/base/write_t2.c
gs/base/write_t2.h
gs/psi/fapi_ft.c
gs/psi/fapibstm.c
gs/psi/fapiufst.c
gs/psi/ifapi.h
gs/psi/int.mak
gs/psi/msvc.mak
gs/psi/wrfont.c
gs/psi/wrfont.h
gs/psi/write_t1.c
gs/psi/write_t1.h
gs/psi/write_t2.c
gs/psi/write_t2.h
gs/psi/zfapi.c
language_switch/pspcl6_gcc.mak
main/pcl6_msvc.mak
pcl/pcfontpg.c
pcl/pcfsel.c
pcl/pcl.mak
pcl/pcsfont.c
pl/pl.mak
pl/plchar.c
pl/plchar.h
pl/plfapi.c
pl/plfapi.h
pl/plfont.c
pl/plfont.h
pl/plftable.c
pl/plftable.h
pl/pllfont.c
pl/pllfont.h
pl/plmain.c
pl/pluchar.c
pl/plufont.c
pl/plufstlp.c
pl/plufstlp.h
pl/plufstlp1.c
pl/plulfont.c
pxl/pxfont.c
pxl/pxl.mak
xps/ghostxps.h
xps/xps.mak
xps/xps_msvc.mak
xps/xpscff.c
xps/xpsfapi.c
xps/xpsfapi.h
xps/xpsttf.c


2012-11-12 20:05:31 -0700
Henry Stiles <henry.stiles@artifex.com>
a971121e9e50c672908f1b3185f42d497adf0b02

New PCL-XL paper sizes fixing part of bug 693399.

Thanks to Hin-Tak Leung for providing these new non standard paper
sizes to support Ricoh specific PCL-XL.

gs/base/gdevpx.c
gs/base/gdevpxen.h
gs/base/gdevpxut.c


2012-11-12 18:24:08 -0700
Henry Stiles <henry.stiles@artifex.com>
b2796b4d588d83730c1d97c7fc035454cfe8157a

Fix part of bug #693415. HPGL's command to create a sub-polygon
closed paths unconditionally.

Thanks to Norbert Janssen for providing a fix to conditionally close
the path only if the current pen is down. The fix revealed another
problem where PCL was not creating a new sub-path when the current pen
was up and drawing a circle (CI). This is remedied with issuing a
"moveto" not "gapto" when starting the circle. Currently the only
means of doing a moveto explicitly is to temporarily disable the "hpgl
path mode" while calling the gs_moveto() procedure. This arrangement
will likely be improved in the future by adding a gapto function to
the graphics library language interface.

These changes result in fixing the original source problem and several
improvements in the PCL CET. A few new minor discrepancies
(regressions) were found in the CET's and another test (all documented
in the bug), these were either inconsequential or deferrable and we
feel this change is substantial progress and should not be held up for
the other issues to be addressed.

pcl/pgdraw.c
pcl/pgpoly.c
pcl/pgvector.c


2012-11-12 10:43:00 -0800
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
586d4a1669b0be9c05f7fcc45cbfc72a0dde5026

Present clusterpush.pl from pushing Makefile(s).

gs/toolbin/localcluster/clusterpush.pl


2012-11-12 13:23:48 +0000
Chris Liddell <chris.liddell@artifex.com>
2c38e570321bb56e8c2d2a897502d207028e1c83

Bug 693436: Resolve issues with FTS and 64 bit PS ints

There was a number parsing case I had missed in special casing CPSI_mode for
QL test compatibility.

Also, there were some issues with gs_cet.ps - some of the objects it replaced were left
writeable, and/or were off the wrong type.

Cluster differences: we should now be able to pass all the FTS tests by using gs_cet.ps.

gs/Resource/Init/gs_cet.ps
gs/psi/iscannum.c


2012-11-12 13:23:09 +0000
Ken Sharp <ken.sharp@artifex,com>
e6759327b6b8338491bf86ac3aa0179f47dc047d

pdfwrite - revert white list change which seemed to cause errors

gs/base/whitelst.c


2012-11-12 11:23:50 +0000
Ken Sharp <ken.sharp@artifex,com>
24de0d2174103bb98d0c3ffbdf09c1081bbc98ef

pdfwrite - update the 'white list' of fonts

Some TrueType fonts have unintentional DRM applied, this commit updates
the Adobe 'white list' of fonts which may be embedded, even if the DRM
flags say otherwise.

No differences expected

gs/base/whitelst.c


2012-11-11 09:33:12 -0700
Henry Stiles <henry.stiles@artifex.com>
39e56129466aa8d0b84c8c1267dbaef9dcefd2bd

Fixes 693399, PXL file errors out when color palette is too large.

The color palette should be truncated upon overflow, previously we
produced an error. Thanks to Hin-Tak Leung for the analysis and fix.

pxl/pxink.c


2012-11-11 08:41:03 -0700
Henry Stiles <henry.stiles@artifex.com>
774e27302ec3b228f6cef6abf04c18066edd5525

Hin-Tak Leung's fix for bug 693413 - large output file size due to
images being decimated to rectangles.

The fix allows any orthogonal image, given the color information can
be properly represented in a PXL, to be converted directly to a PXL
image. The change has not been cluster tested, the PXL device is
tested in the overnight testing and there is no practical means to
test the device's code change with all test files locally, so the
commit also serves as a test submission.

gs/base/gdevpx.c


2012-11-09 12:34:01 -0700
Henry Stiles <henry.stiles@artifex.com>
a8de3e6dc0152b137c38078d80a3c40517095f91

Fixes 693385 Font id selection wrong when using SI (Shift In) and SO
(Shift out) commands and inappropriate switch to ID in font selection.

The SO and SI were decaching the current font table, effectively
changing font ID selection to family selection. 2 additional and
closely related changes were provided by Norbert Janssen: the selected
by id state was being disabled during font selection even if font
selection had no effect and upon selection be id we were decaching
both font tables.

All of these changes are certainly in the right direction but seem to
have unmasked some obscure problems which will be addressed in a
separate bug. Here are the expected regression test files for this
commit:

tests_private/pcl/pcl5ccet/18-20.BIN
tests_private/pcl/pcl5ccet/19-05.BIN
tests_private/pcl/pcl5ccet/19-11.BIN
tests_private/pcl/pcl5ccet/19-12.BIN
tests_private/pcl/pcl5ccet/19-13.BIN
tests_private/pcl/pcl5ccet/19-14.BIN
tests_private/pcl/pcl5efts/fts.0280
tests_private/pcl/pcl5efts/fts.0341
tests_private/pcl/pcl5efts/fts.0380

pcl/pcfont.c
pcl/pcfsel.c
pcl/pctext.c


2012-11-06 15:51:23 +0000
Chris Liddell <chris.liddell@artifex.com>
a0a4fd51a9c17a1b17d0cc9eccfef51e96ea8d04

Bug 693430: missing "fallback" for DecodeParams entry

In a ResuableStreamDecode filter with an array of subfilters (/Filter entry
in the parameter dictionary). If teh DecodeParams array also exists, and has
one or more entries set to "null", we weren't pushing an empty dictionary
onto the stack for the subsequent call to the filter operator.

The equivalent code for a totally absent DecodeParams array was already
correct.

No cluster differences.

gs/Resource/Init/gs_frsd.ps


2012-11-05 21:30:48 +0000
Robin Watts <robin.watts@artifex.com>
048b221e76fba80663f073f8312802bcdf168c52

Bug 693166: Speed images through the clist.

In investigating bug 693166 Ray spotted that the calculation of which
bands were touched by images was slack in the presence of a clipping
path - he proposed a simple patch to fix this.

Unfortunately it had a knock on effect where vertical offsets could be
introduced into the topmost band. This is fixed here by a second small
change in image_band_box.

Cluster testing shows 10 small changes, all well within the usual
clist differences.

gs/base/gxclimag.c


2012-11-05 09:16:10 -0700
Henry Stiles <henry.stiles@artifex.com>
782d5c4083217d7225a843bf6bad254dca4c2e8c

Fixes bug #693429 process raw HPGL files.

The PCL parser will now recognize HPGL files if the files start with
the commands "IN" or "DF" and if the parser is using the RTL
personality.

pcl/pcl.mak
pcl/pcparse.c
pcl/rtmisc.c
pcl/rtmisc.h
pcl6/pcl6.xcodeproj/project.pbxproj


2012-11-02 22:55:24 -0700
Michael Vrhel <michael.vrhel@artifex.com>
119f9ced7dc9be5f412ed587381627babb29d3ed

Fix for missing code to grab the device profile. Thanks to sags for finding this.

gs/base/gsicc_cache.c


2012-11-01 16:05:13 +0000
Robin Watts <robin.watts@artifex.com>
0cefc049bdd1eee78f14c97129627af766e022c9

Fix tiffsep and introduce tiffscaled4 device.

The tiffsep device was supposed to be able to be called with
-dBitsPerComponent set to 1,2,4 or 8 to allow differing bit
depths of output. This setting would work for the separation
planes, but would not produce a composite when bpc was not 8
due to the code not supporting that.

We add code here to generate composites in 1,2 and 4 bit modes
too, along with some sanity checking of the compression mode.

We also add a tiffscaled4 mode where we produce 1bpc cmyk from
a downscaled dither of 8bpc cmyk.

gs/base/devs.mak
gs/base/gdevtsep.c
gs/base/gxdownscale.c
gs/base/unixansi.mak
gs/psi/msvc.mak
main/pcl6_gcc.mak
main/pcl6_msvc.mak


2012-11-01 15:24:04 +0000
Ken Sharp <ken.sharp@artifex,com>
9b10f8c659ffc643ab71c6180a70da4f39075578

pdfwrite/ps2write - enable 64-bit file handling

Subsequent to commit c81c8f1b8740c484ec332080b5ce5f718357694d it is now
possible to have 64-bit offsets returned by stell, and this makeds it possible,
for the first time, to write PDF files > 4GB.

There's a fair amount of reworking in here, but we can now produce very large
temporary files, and from that produce very large PDF and PostScript output.

There are some restrictions; no stream can exceed 2GB and no font can exceed 2GB

As might be expected this is *not* well tested as we don't actually have any
test files which exercise this. I have tested PDF and PostScript file production
with a single file which produces a 10GB temporary file, a 7 GB PDF file and a 6GB
PostScript file.

The resulting PDF file opens with Adobe Acrobat and can Ghostscript, and the
PostScript file can be consumed by Adobe Distiller and Ghostscript.

Nevertheless, bugs are possible.

No differences expected as this is not lcuster tested.

gs/base/gdevpdf.c
gs/base/gdevpdfb.c
gs/base/gdevpdfo.c
gs/base/gdevpdfu.c
gs/base/gdevpdfx.h
gs/base/gdevpdti.c
gs/base/gdevpsf1.c
gs/base/gdevpsf2.c
gs/base/gdevpsft.c


2012-10-29 17:28:05 -0600
Henry Stiles <henry.stiles@artifex.com>
84498da1627a85e340c7670b8c7a617e38b9efb7

Support PJL language string HP-GL/2.

The language string HP-GL/2 now selects the "RTL" mode in PCL. It
should also be used to select the language HP-GL/2 upon language
switch, but only one language string is supported per emulation, and
the feature is not really needed. Any HPGL/2 rtl file should select
the PCL emulation anyway because of the character of the input stream
and the HP-GL/2 PJL command will select the RTL personality.

pcl/pctop.c


2012-09-25 11:19:21 +0100
Chris Liddell <chris.liddell@artifex.com>
c81c8f1b8740c484ec332080b5ce5f718357694d

64 bit stream offsets and 64 bit PS integers objects

Revise the stream and "gp_" file APIs to support file sizes >4Gb (on suitable
systems).

I've added a gs_offset_t type which, by default is a 64 bit signed type (this
matches the standard lib's 64 bit "off_t" type). For ports that may want to
use an alternative type, define "GS_OFFSET_T" to the desired type on the
compiler command line.

By default, Ghostscript will now use 64 bit integer objects in Postscript. Again,
for porting ease, one can opt for 32 bit integer objects by defining PSINT32BIT=1
on the compiler command line.

The handling of integer objects in various operators has been "augmented" so that
when working in "CPSI compatibility mode", intepreting and manipulating integer
objects will see them "clamped" to 32 bit signed values. This allows Ghostscript
to still pass the Quality Logic tests which spuriously rely on 32 bit integer
objects.

There is a minor tweek in the PS interpreter's handling of Truetype fonts (*not*
Type 42), where the algorithm used to create an XUID relied on 32 bit integers.

There is a small performance penalty in this, but my testing suggests that it is
smaller than the time resolution of our testing capabilities (i.e. there are
greater variances between test runs than between the 32 and 64 bit objects code).

We can now interpret PDF files >4Gb.

In addition, the graphics library will now include inttypes.h (in stdint_.h) if
it is available in order to make the "PRI...." printf and co formatting macros
available. If inttypes.h is not available, there are fallback definitions of the
most used of those. These can also be defined on the compiler command line for
specific ports, if required.

A custom "PRI..." macro has been added in the Postscript interpreter,
"PRIpsint", which is defined appropriately when integer objects are 64 or
32 bit.

This commit does *not* revise the device API to handle 64 bit integer values
(in the one case where this is required, we use a string to hold the 64 bit value,
I suggest continuing this, so the device API remains consistent across ports).

I do expect a bug tail with this, as we start to encounter more >4Gb PDFs.

Cluster differences are restricted to the 3 QL Postscript test jobs that have
ended up in comparefiles (and thus are not run with the gs_cet.ps setup).

config.mak.in
configure.ac
gs/Resource/Init/gs_ttf.ps
gs/base/Makefile.in
gs/base/configure.ac
gs/base/devs.mak
gs/base/gdevpsf2.c
gs/base/gdevpsft.c
gs/base/gdevtifs.c
gs/base/gp_mswin.c
gs/base/gp_unifs.c
gs/base/gsiorom.c
gs/base/gxclist.c
gs/base/gxclrast.c
gs/base/lib.mak
gs/base/scommon.h
gs/base/sfxfd.c
gs/base/sfxstdio.c
gs/base/std.h
gs/base/stdint_.h
gs/base/stdpre.h
gs/base/stream.c
gs/base/stream.h
gs/base/strmio.c
gs/base/strmio.h
gs/base/tiff.mak
gs/psi/btoken.h
gs/psi/fapi_ft.c
gs/psi/idebug.c
gs/psi/ilocate.c
gs/psi/int.mak
gs/psi/interp.c
gs/psi/iparam.c
gs/psi/iref.h
gs/psi/iscan.c
gs/psi/iscan.h
gs/psi/iscanbin.c
gs/psi/iscannum.c
gs/psi/iutil.c
gs/psi/opextern.h
gs/psi/zarith.c
gs/psi/zfapi.c
gs/psi/zfcid0.c
gs/psi/zfileio.c
gs/psi/zfjpx.c
gs/psi/zfrsd.c
gs/psi/zmisc.c
gs/psi/zrelbit.c
gs/psi/ztype.c
pl/pl.mak
pl/plfont.h
pl/pllfont.c


2012-10-30 13:05:11 +0000
Robin Watts <robin.watts@artifex.com>
dfde821467a4770499b52fbfb2c665a74ed379c0

Fix silly dependency typo in lib.mak.

Thanks to Chris for pointing this out.

gs/base/lib.mak


2012-10-29 20:20:22 +0000
Robin Watts <robin.watts@artifex.com>
aa7d7ffcc390b05a8e36b6cf85e4688ae69c2a85

Fix interpolation code to behave consistently in the presence of pdf14.

There are special cases in the setup of the image interpolation code
designed to kick in in the presence of halftoning devices and either
limit the amount or change the nature of the interpolation done.

The test for this is confused by the presence of a pdf14 device though.

We move the special cases down into a device specific op call to avoid
this. This also means that devices can have finer control over exactly
when these operations are used.

One possibility would be to expose them as device params, but I haven't
done that here yet.

gs/base/gdevdflt.c
gs/base/gxdevsop.h
gs/base/gxiscale.c
gs/base/lib.mak
gs/ghostscript.vcproj


2012-10-28 16:00:01 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
49f1bba50c096dee3230e5221db4d5275b8e12e7

Fix optional content support for inline images. Because of the lack
of test cases, the old code has never been tested.

gs/Resource/Init/pdf_draw.ps


2012-10-27 19:10:13 -0700
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
88bf2cb37c0cb1c88ea03abb567dc7e0afdfef47

Refined the list of files to exclude in clsuterpush.pl.

gs/toolbin/localcluster/clusterpush.pl


2012-10-22 17:31:27 +0100
Robin Watts <robin.watts@artifex.com>
045e544c507b151daebc19aaf21a8b13b6c4a844

Support rotated images with interpolation.

See bug 690246.

Testing this on the cluster with a patch that enables interpolation
for all landscape jobs reveals no problems.

gs/base/gxcindex.h
gs/base/gximage.h
gs/base/gxipixel.c
gs/base/gxiscale.c


2012-10-25 16:43:37 -0700
Michael Vrhel <michael.vrhel@artifex.com>
f4b2deea2aa129048014771c19ef9fb3c317de7e

Addition of support for the black preservation methods in littleCMS

This is for bug 692223. With this commit now have support to specify black preservation on a object level (e.g. graphic, image or text).

gs/base/gscms.h
gs/base/gsdparam.c
gs/base/gsicc_cache.c
gs/base/gsicc_manage.c
gs/base/gsicc_manage.h
gs/doc/Use.htm


2012-10-26 01:04:03 +0100
Robin Watts <robin.watts@artifex.com>
9c3de1fb29628f83ae7d48238e0dd0f3f35ecda1

Fix typo in last commit.

Missing 'int' in definition.

gs/base/gxiscale.c


2012-10-25 20:44:53 +0100
Robin Watts <robin.watts@artifex.com>
d68bdb872b1071e42dd937ca7526e5e2cfc9bca7

Fix problem in interpolation code.

When interpolating, if we are in an indexed space, we should
only offset by 1 component per sample, not as many components
as there are in the base space.

This shows up problems with the forthcoming landscape commit,
but is fixed here separately as it is actually unrelated.

gs/base/gxiscale.c


2012-10-25 13:44:22 +0100
Ken Sharp <ken.sharp@artifex,com>
97e17a24e89bb0f893fd43af35e774054e41eadc

ps2write - while stripping OtherSubrs, don't try to index off stack

The code assmued that a Callsubr operator woudl be preceded by the subr index
but in this case the subr index is provided by another Subr (crazy font...).

All we need to do is cdheck the stack index, and if its 0, not index from the
stack but simply write the Callsubr operator.

Fixed Bug #693325

Expected Differences
tpc2.ps should no longer seg fault on the cluster with ps2write.

gs/base/gdevpsf1.c


2012-10-24 19:10:36 +0100
Robin Watts <robin.watts@artifex.com>
c31725843fc3195970d12baad2916bf4dc3a5097

Bug 693407: Portion of image missing with interpolation

The 'only interpolate the portion of the bitmap required' code was
going wrong in the case of X flipped bitmaps.

gs/base/gxipixel.c
gs/base/gxiscale.c


2012-10-24 10:02:00 -0700
Michael Vrhel <michael.vrhel@artifex.com>
f25f5e6f94ada1b3908b85ac68cabe2b9831d803

Enable default spot name usage when output profile is NCLR

Previously I had added the requirement that we used something like
-sICCOutputColors="Cyan, Magenta, Yellow, Black, Orange, Violet"
when using an NCLR ICC profile for the device profile (valid only for
tiffsep and psdcmyk devices). This was to ensure proper naming of the
profile colorants. It was pointed out by a customer that they would
prefer to have a set of default names so this was now added.
If -sICCOutputColors is not specified and we are using an NCLR ICC profile,
then we will have spot colors from the profile named ICC_COLOR_0, ICC_COLOR_1
etc.

gs/base/gdevpsd.c
gs/base/gdevtsep.c
gs/base/gsicc_manage.c


2012-10-23 16:35:54 -0600
Henry Stiles <henry.stiles@artifex.com>
793971fc49dd62d02d92f4761c40f63a29eabd67

Setting the default line attributes was done 2 places in the code.

pcl/pglfill.c


2012-10-22 16:24:46 -0600
Henry Stiles <henry.stiles@artifex.com>
270fade3cd436aa8abe8d1ef00f4db4ba1f766f3

Bug #693381, Norbert Jannsen's fix to track and home the pcl cursor
appropriately.

pcl/pcommand.c
pcl/pcpage.c
pcl/pcpage.h
pcl/pcstate.h
pcl/pcursor.c


2012-10-12 19:46:00 +0100
Robin Watts <robin.watts@artifex.com>
68dd69edbd8e2728207f18435be933bdca461a6f

Make stcolor device threadsafe by removing static.

Remove from list of unthreadsafe devices.

gs/base/configure.ac
gs/base/gdevstc.c
gs/base/gdevstc.h
gs/base/gdevstc4.c


2012-10-22 14:47:05 +0100
Robin Watts <robin.watts@artifex.com>
36d9731f83201002df6a91699f86e84c8d8530b1

Fix -Zb decode flags.

Some of the debugging code that had been changed to provide memory
pointers to the debugging print functions was attempting to
retrive a memory pointer from a stream that was on the stack.
Stack based streams have null memory pointers, resulting in SEGVs
when the pointers were used.

Revert these calls back to the non threadsafe ones.

gs/base/gximage.c


2012-10-21 11:49:26 -0600
Henry Stiles <henry.stiles@artifex.com>
16423bc7bb7c800122f04ec16869a88dcb6d69b0

Fixes 693395 default screen vector fill percentage incorrect.

Another inconsistency across HP devices: HP plotters apparently
default to a 50% fill if the Screened Vector (SV) command requests
shading but doesn't specify a percentage. On HP Printers the command
is ignored if the percentage is not provided explicitly.

pcl/pglfill.c


2012-10-16 19:15:34 -0700
Michael Vrhel <michael.vrhel@artifex.com>
0442ce0c95ffb9a33eba5c2303172e029883f2fb

Add in support for spot color overprinting with standard CMYK devices

Currently only the psdcmyk and tiffsep devices provide simulation of spot
color overprinting. With the following commit it is possible to get
simulation of overprinting with other CMYK based devices. This is done
using the command line option -dSimulateOverprint. The simulation is
achieved by having the overprint device blend the CMYK colorant with what
ever has currently been drawn.

gs/base/gdevp14.c
gs/base/gdevp14.h
gs/base/gscdevn.c
gs/base/gscms.h
gs/base/gscsepr.c
gs/base/gscspace.c
gs/base/gsdparam.c
gs/base/gsovrc.c
gs/base/gsovrc.h
gs/base/gstrans.h
gs/base/gxblend.h
gs/base/gxblend1.c
gs/base/gxcspace.h
gs/base/gxoprect.c
gs/base/gxoprect.h


2012-10-19 17:32:57 +0100
Ken Sharp <ken.sharp@artifex,com>
19f407d322ba43e1aff403f625bd4d2a723f5e65

pdfwrite - bug #691653 Regression: /undefined in --run-- with pdfwrite starting with r11667

The underlying problem is related to writing an ICCBased space corresponding
to an Lab space. However, the fallback when this fails does actually work.

The fault was caused by us writing out (and referencing from the page object)
broen Shading, colourpsace and Pattern entries, which were never actually used.

By removing the references from the page (but continuing to emit the broken
objects) 'corrects' this, and other files.

Expected Differences : bug689880.pdf should now work.

gs/base/gdevpdfg.c
gs/base/gdevpdfu.c
gs/base/gdevpdfv.c


2012-10-17 23:02:51 -0700
Michael Vrhel <michael.vrhel@artifex.com>
7d028b4cb4693468b2cb842a156a52f127262e55

Update source color example file.

gs/toolbin/color/src_color/objsrc_profiles_example.txt


2012-10-17 21:35:16 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
515767b6e4fb37b6259fbe0d6dec429f0d1727f9

Bug 693390: recover yet another broken PDF file

Recognize and fix a case when <</ColorSpace/DeviceRGB>> is used instead of CSA.
Also fix a real bug that prevented definition /DefaultXXX color spaces as
device color spaces by PDF file.

gs/Resource/Init/pdf_draw.ps
gs/Resource/Init/pdf_main.ps


2012-10-16 18:45:22 -0700
Michael Vrhel <michael.vrhel@artifex.com>
cf41720e6d559213802caa3f47edb82182cc7565

The manner in which the icc profile serial header structure was defined is plagued with alignment problems

This fix avoids the use of the sizeof operation to specify the size of the serial header portion.
Thanks to Robin for his help in tracking down this issue.

gs/base/gscms.h
gs/base/gsicc.c
gs/base/gsicc_manage.c
gs/base/gxclist.c


2012-10-17 09:49:09 +0100
Chris Liddell <chris.liddell@artifex.com>
a4cbd97bfe01b2c850902d8ee0983eda61fdb64d

Bug 693389: add inkcov device to Windows build.

CLUSTER_UNTESTED

gs/psi/msvc.mak


2012-10-16 08:51:58 +0100
Ken Sharp <ken.sharp@artifex,com>
2741c775675f23403470cb680adbd0025e716e70

add the 'debugaux' directory to the ignore list for Git

.gitignore


2012-10-13 02:42:15 -0700
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
ba77ca58e9ccf711a975b69c888f34e5371e4628

Fix issue with ./configure not correctly checking for files in contrib.

For reasons that aren't clear the code "!(test ...)" doesn't work in
bash on AIX; this commit replaces it with "! test ...". Hopefully this
won't fail on some other operating system.

gs/base/configure.ac


2012-10-12 19:06:08 +0100
Robin Watts <robin.watts@artifex.com>
d5904741b3e29c481bf0411c7fadd2c297b66828

Remove statics from lxm3200 device.

Remove this from the list of unthreadsafe devices.

gs/base/configure.ac
gs/contrib/gdevlx32.c
gs/psi/msvc.mak


2012-10-12 18:33:55 +0100
Robin Watts <robin.watts@artifex.com>
f8d61ad9460e59381ca9239c383ec3f91d2e1679

Fix cdj970 and fmlbp devices to be threadsafe.

Avoid use of global variables.

Remove these from the list of unthreadsafe devices.

gs/base/configure.ac
gs/contrib/gdevdj9.c
gs/contrib/japanese/gdevfmlbp.c


2012-10-12 17:54:51 +0100
Robin Watts <robin.watts@artifex.com>
cb6bedc4c5b81c4cb074d1c784573fd96165cc8e

Fix cp50 device to avoid use of global.

Move 'int copies' into the device structure.

Remove cp50 from list of un-threadsafe devices.

gs/base/configure.ac
gs/base/gdevcp50.c
gs/psi/msvc.mak


2012-10-12 16:53:18 +0100
Robin Watts <robin.watts@artifex.com>
50ecd470347d33cef82fabb02b555f6854345485

Fix contrib bjc devices to avoid global use.

Should now be threadsafe, so remove these devices from the list of
thread unsafe ones.

gs/base/configure.ac
gs/contrib/gdevbjc_.c
gs/contrib/gdevbjc_.h
gs/contrib/gdevbjca.c
gs/psi/msvc.mak


2012-10-12 16:01:47 +0100
Chris Liddell <chris.liddell@artifex.com>
96e2afac86b8241e4e2dd758d2caf0c6434a102a

Fix the check for duplicate entries.......

....in the list of devices excluded from a threadsafe build.

No cluster differences.

gs/base/configure.ac


2012-10-12 12:39:53 +0100
Robin Watts <robin.watts@artifex.com>
821d4c00e4507c0f68fd1eafb00622cbabcd1343

Remove calls to gs_lib_ctx_get_non_gc_memory_t from contrib devices.

This leaves the only calls to gs_lib_ctx_get_non_gc_memory_t being
from the lcms v1 wrapper code (expected as lcms v1 is not thread
safe), and from the gp_check_interrupts implementations (though these
should no longer be required).

Update the list of "not thread safe" devices in configure.ac; lots
of devices are now thread safe. The ones that remain 'not thread safe'
are those that use static variables (see bug 693376).

gs/base/configure.ac
gs/contrib/gdevcd8.c
gs/contrib/gdevdj9.c
gs/contrib/gdevgdi.c
gs/contrib/gdevln03.c
gs/contrib/gdevlx32.c
gs/contrib/gdevlx7.c
gs/contrib/gdevmd2k.c
gs/contrib/gdevop4w.c
gs/contrib/gdevxes.c
gs/contrib/gomni.c
gs/contrib/japanese/gdev10v.c
gs/contrib/japanese/gdevalps.c
gs/contrib/japanese/gdevdmpr.c
gs/contrib/japanese/gdevespg.c
gs/contrib/japanese/gdevfmlbp.c
gs/contrib/japanese/gdevfmpr.c
gs/contrib/japanese/gdevj100.c
gs/contrib/japanese/gdevlbp3.c
gs/contrib/japanese/gdevmag.c
gs/contrib/japanese/gdevmjc.c
gs/contrib/japanese/gdevnpdl.c
gs/contrib/japanese/gdevp201.c
gs/contrib/japanese/gdevrpdl.c
gs/contrib/lips4/gdevl4r.c
gs/contrib/lips4/gdevlprn.c
gs/contrib/pcl3/eprn/eprnparm.c
gs/contrib/pcl3/eprn/gdeveprn.c
gs/contrib/pcl3/src/gdevpcl3.c


2012-10-12 10:22:38 +0100
Chris Liddell <chris.liddell@artifex.com>
10c70931c243f9d53c2df8b5f9e92fc93acfd4c9

Add a --enable-threadsafe option to configure

This adds -dGS_THREADSAFE to the CFLAGS, *and* filters the devices to remove
non-threadsafe ones.

The list of non-threadsafe devices is near the top of configure.ac (search
for NTS_DEVS).

No cluster differences.

gs/base/configure.ac


2012-10-11 19:50:58 +0100
Robin Watts <robin.watts@artifex.com>
7012db5af074788bf7bf14ef3718fe72eae3e701

Add Release-contrib and Debug-contrib VS Configuration.

Also make the existing Debug-cups configuration show up in the solution
properties.

Building for any of these configurations only affects the ghostscript
builds.

common/msvc_top.mak
gs/base/winlib.mak
gs/ghostscript.vcproj
gs/psi/msvc.mak
main/pcl6_msvc.mak
win32/GhostPDL.sln


2012-10-11 18:50:38 +0100
Robin Watts <robin.watts@artifex.com>
415be58773ac3ebedbe92c6cbdaa5cda9efebc9a

Fix windows compilation of pcl3 devices.

The pcl3 devices include support for a pagecount module that doesn't
work under windows. The documentation for these devices suggests that
they can be made to work by predefining EPRN_NO_PAGECOUNTFILE and
editing the dependencies in the makefile to remove the need for
pagefile.c.

This commit simplifies that by making that symbol be defined
automatically on a windows build, and nobbling pagefile.c with a

gs/contrib/pcl3/eprn/eprnparm.c
gs/contrib/pcl3/eprn/pagecount.c
gs/contrib/pcl3/eprn/pagecount.h


2012-10-11 18:49:02 +0100
Robin Watts <robin.watts@artifex.com>
1d45b315e8f88b2d78eccba1a5943e59b3b6b14e

Fix typo in commit/commit.mak

The compile rule for gdevp201.obj was broken in a way that doesn't
matter on unix, but upsets nmake.

gs/contrib/contrib.mak


2012-10-11 08:54:32 -0700
Robin Watts <robin@peeves.(none)>
70e02af6a3a80586a506c18343aca7c297cbaae6

Fix GS_THREADSAFE builds.

mkromfs.c needed to not define some functions in GS_THREADSAFE cases.

gxclutil.c had a mismatch between code to collect stats and code to
print it.

gs/base/gxclutil.c
gs/base/mkromfs.c


2012-10-11 15:25:22 +0100
Robin Watts <robin.watts@artifex.com>
70488a2214a0ae36ad8ec0ca8b4ae0dff9745eb3

Tweak gscms interface to avoid use of globals.

Previously the only way to implement gscms_get_clrtname was to use a
static buffer and to return a pointer to it. We change the interface
so that gscms_get_clrtname takes a memory pointer, and allocates
space for the returned thing.

The LCMS2 implementation of this still uses a 256 byte stack based
buffer as part of it's operation (so could potentially have problems
with colorants longer than 256 bytes), but there is no way to avoid
this in the current LCMS interface.

gs/base/gsicc_cms.h
gs/base/gsicc_lcms.c
gs/base/gsicc_lcms2.c
gs/base/gsicc_manage.c


2012-10-10 20:25:02 +0100
Robin Watts <robin.watts@artifex.com>
8e3cac4974512416582461af4776120de5b08c07

Disable stat collection in GS_THREADSAFE builds.

The collection of statistics for debugging is implemented in a
non-threadsafe way. Disable it in GS_THREADSAFE builds.

gs/base/gxcldev.h
gs/base/gxclpath.c
gs/base/gxclutil.c
gs/base/gxfill.c
gs/base/gxfill.h
gs/base/gxifast.c
gs/base/gxshade6.c
gs/base/scfe.c
gs/base/ttinterp.c
gs/contrib/pcl3/eprn/mediasize.c
gs/contrib/pcl3/src/pclcap.c


2012-10-10 16:25:10 -0700
Ray Johnston <ray.johnston@artifex.com>
dcd936432eb37fc5e3590a9377b1e3521ce70042

Fix typo that was setting pattern clist BandHeight using size.x instead of .y

This (AFAICT) didn't hurt because the clist_init_bands forced patterns to be
nbands == 1, but was wrong and may confuse code that relies on BandHeight.

gs/base/gxpcmap.c


2012-10-10 15:25:08 +0100
Robin Watts <robin.watts@artifex.com>
20693cec8d771eb16412a3296c0a16bbbf2ec852

Ensure that all devices have non-NULL memory pointers.

We use the memory pointers to get to the lib_ctx, hence having NULL
memory pointers in device structures causes headaches.

Checking the comments in gxdevcli.h it seems that memory should
be NULL iff it's in a static prototype. Therefore anywhere that uses
gx_device_init and passes a NULL pointer is suspect.

Some places call gx_device_init and then set the memory pointer
manually afterwards, to ensure that the reference counting is setup
so that it does not attempt to free the device structure when all
instances are gone. This is to indicate that the device structure
is on the stack.

As a neater alternative to this, we offer a gx_device_init_on_stack
function that does the same thing, but makes this explicit.

gs/base/gsdevice.c
gs/base/gxacpath.c
gs/base/gxclip.c
gs/base/gxclip2.c
gs/base/gxclip2.h
gs/base/gxdevcli.h
gs/base/gxmclip.c
gs/base/gxmclip.h
gs/base/gxp1fill.c
gs/psi/zupath.c


2012-10-09 16:17:53 +0100
Robin Watts <robin.watts@artifex.com>
3231e8923e2bf4d535340a4d4a4335457c8ad1cf

gp_check_interrupts GP_THREADSAFE fixes.

When building with GP_THREADSAFE, gs_lib_ctx_get_non_gc_memory_t is
not defined. This will cause at least 2 versions of gp_check_interrupts
to fail. We patch them here to at least compile correctly.

Also fix some places where the memory pointers used were invalid.

Also fix a couple of calls to process_interrupts with explicitly NULL
memory pointers.

gs/base/gp_macpoll.c
gs/base/gp_mspol.c
gs/base/sfxstdio.c
gs/base/stream.c
gs/psi/iscan.c


2012-10-09 16:15:37 +0100
Robin Watts <robin.watts@artifex.com>
1793f3733ddb587a92efae41e188b7131eb2aa57

Second attempt at fixing debugging printing with clists.

The band file reading stream does not have a valid memory pointer
as the structure is allocated on the stack, and to have a valid
memory pointer would make the stream attempt to free the structure
on a close.

Here we add a 'local_memory' pointer that we use both for debugging
printing, and for calls to process_interrupts.

gs/base/gxclread.c


2012-10-10 16:18:49 +0100
Chris Liddell <chris.liddell@artifex.com>
586f1f5e9a29e1826b70cdd5aa1a77aa6b835f33

Provide way for output pagesize to image size in view___.ps tools.

For viewjpeg.ps and viewgif.ps this adds new procedures "viewJPEGgetsize" and
"viewGIFgetsize" which return the dimensions of the input impage, thus allowing
the caller to set the page size.

For viewmiff.ps, viewpbm.ps, viewpcx.ps they take a new parameter "FITPAGE"
which tell the utilities to fit the page to the image - they still honour the SCALE
parameter, which is also used when setting the pagesize.

CLUSTER_UNTESTED

gs/lib/viewgif.ps
gs/lib/viewjpeg.ps
gs/lib/viewmiff.ps
gs/lib/viewpbm.ps
gs/lib/viewpcx.ps


2012-10-09 21:17:00 -0700
Michael Vrhel <michael.vrhel@artifex.com>
0dc01b095200fa4e04a9934c58ad97ff50c56916

Addition of an internal CMM for direct color replacement of text, graphic and image RGB or CMYK colors

This option is used with the -sSourceObjectICC file. Similar to the option to set None to request that
no color management be used for a particular object type, here we use the keyword Replace to indicate
that for that object type the colorants will be replaced by the method set up in gsicc_replacecm.c
Currently to demonstrate its usage it provides a "negative" color mapping operation.

gs/base/gdevp14.c
gs/base/gscdevn.c
gs/base/gscms.h
gs/base/gscsepr.c
gs/base/gsicc.c
gs/base/gsicc_cache.c
gs/base/gsicc_cms.h
gs/base/gsicc_manage.c
gs/base/gsicc_manage.h
gs/base/gsicc_nocm.c
gs/base/gsicc_replacecm.c
gs/base/gxclimag.c
gs/base/gxcmap.c
gs/base/gxi12bit.c
gs/base/gxicolor.c
gs/base/gximono.c
gs/base/gxiscale.c
gs/base/gxshade.c
gs/base/lib.mak
gs/ghostscript.vcproj
xps/xpsgradient.c


2012-10-09 13:17:25 -0600
Henry Stiles <henry.stiles@artifex.com>
a650680c5be1e034b8d4a5f6cd2704ae65182e43

Fixes 693370 - the default join should be none not mitered.

pcl/pgdraw.c


2012-10-08 17:24:48 +0100
Robin Watts <robin.watts@artifex.com>
6f7a425bbc0b560a776a76293b4a1fdaffc76248

Bug 693328: Ensure that clist reader/writer devices stay in sync.

The number of components records in reader/writers can get out of
sync due to some 'limiting' code in the writer not being present in
the reader.

My first attempt at fixing this was to copy those few lines from
pdf14_create_clist_device into gs_pdf14_device_push, but this caused
SEGVs in some non-clist cases (72dpi CATX9004.pdf unbanded for example).

Staring at the code a bit it seems odd to open a device and then change
the number of colors in it; changing the number of colors *then* opening
it makes much more sense. I have therefore moved the limiting code up
a few lines in both pdf14_create_clist_device and gs_pdf14_device_push
and everything seems much happier.

2 diffs shown in the cluster, 1 clearly a progression, 1 neutral.

gs/base/gdevp14.c


2012-10-08 19:35:17 +0100
Robin Watts <robin.watts@artifex.com>
92f024cba125df4729f6a51fdf7b59e46fc71457

Revert commit dcdc149 which broke various cluster tests.

It seems that we can't put a valid mem pointer into the clist
stream reading code, as the stream code takes this as an indication
that the stream state should be freed on closedown.

gs/base/gxclread.c


2012-10-08 17:31:01 +0100
Robin Watts <robin.watts@artifex.com>
b07dca2069a45793b70cb7faf51f53d932144a28

Fix multi-threaded rendering use of wrong gs_memory_t.

When we create rendering threads, we create a gs_memory_t * for each.
The idea is that every thread should exclusively use its own gs_memory_t
to avoid conflicts. The gsicc_cache was being setup to use the incorrect
one.

This was found (by Ray) when investigating bug 693361. This solves
this particular error, but does not completely solve the bug.

gs/base/gxclthrd.c


2012-10-08 17:28:52 +0100
Robin Watts <robin.watts@artifex.com>
dcdc149c49b2556e2038df4eab0da7f49de46100

Fix clist stream memory initialisation.

The clist file playback stream has never had it's memory pointer setup
correctly - probably because it has never needed it. Now it does need it
due to to the debugging print functions.

gs/base/gxclread.c


2012-10-08 17:28:32 +0100
Robin Watts <robin.watts@artifex.com>
98946c1f9c015a6bbbb55a9401e4eeca47ce7147

Whitespace tweak.

gs/base/gxclrast.c


2012-10-08 10:30:29 +0100
Ken Sharp <ken.sharp@artifex.com>
f9c849768bdb3553ffeac74b74b04749e91bf4d5

pdfwrite - when resizing arrays due to incrementally downloaded fonts, increase CIDToGODMapLength

When TrueType fonts are incrementally downloaded, its possible for new character
codes to exceed the number of glyphs originally defined in the TrueType tables.

When this happens we resize various entries in our copy of the font. However
the change to dynamically storing CIDToGIDMap and CIDSet (for PDF/A) omitted
to increase the variable recording the array size (although the array was correctly
resized).

This led to glyphs with CIDs higher than the initial number of glyphs not having
an entry in CIDToGIDMap, and tehrefore being treated as /.notdef

No differences expected.

gs/base/gdevpdtf.c


2012-10-07 19:30:21 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
6cbb5969cc2edab6417c673194f1c1d019d275ef

Bug 693339: Replace malloc() with GS memory allocators in JPX code.

We have 2 implementations of JPX decoding filters based on Luratech
and OpenJpeg libraries. The Luratech one is now clean. The API to
the library supports custom memory allocators.

The OpenJpeg case is more difficult. The calls to malloc() in the
wrapper code has been eliminated, but the library calls malloc()
directly. To use a custom allcator one has to extend the API and
change the signatures of all functions that allocate memory.

gs/base/lib.mak
gs/base/sjpx_luratech.c
gs/base/sjpx_luratech.h
gs/base/sjpx_openjpeg.c
gs/base/sjpx_openjpeg.h
gs/psi/zfjpx.c


2012-10-07 11:26:17 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
7f4726e7764a09b8d68927924e54d1ad23e284d1

Bug 691931: Patch to resolve error in the number parser, the file now renders paths correctly
but not the text which is not currently supported.

svg/ghostsvg.h
svg/svgshapes.c
svg/svgtypes.c


2012-10-07 11:19:00 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
8785fa4c81b377abc633cd0baeffb7abd85b45d7

Bug 693239: Prevent segfault due to optional width/height attributes.

svg/svgdoc.c


2012-10-05 22:48:58 -0600
Henry Stiles <henry.stiles@artifex.com>
119de6b66bf1874c545b221a974ce88c78e462e8

more warning fixes

pl/plufont.c


2012-10-05 22:48:11 -0600
Henry Stiles <henry.stiles@artifex.com>
341865d2554ef04c0f873344f2a2d582a8353944

more warning fixes

pl/plulfont.c


2012-10-05 22:39:06 -0600
Henry Stiles <henry.stiles@artifex.com>
22ab5ef64b6364534012abecdf29b76402e7a08f

warning cleanup

pl/pluchar.c


2012-10-05 13:11:16 -0700
Michael Vrhel <michael.vrhel@artifex.com>
f5513b716ce5ce510120e2a08a766281d2b00c28

Allow use of Device Link ICC Profile for source objects

With the -sSourceObjectICC=filename option, it is now possible to specify a device link source
profile for CMYK/RGB graphic, image and text objects. When such a profile is specified, the mapping
will go from source directly to device values. Note that the use of a proofing profile is not
possible and the device profile itself is not used in this transformation. However the device link
profile that is associated with the device and specified with -sDeviceLinkProfile is included
in the transform.

gs/base/gscms.h
gs/base/gsicc_cache.c
gs/base/gsicc_cms.h
gs/base/gsicc_lcms.c
gs/base/gsicc_lcms2.c
gs/base/gsicc_manage.c


2012-10-05 06:40:12 +0100
Ken Sharp <ken.sharp@artifex.com>
44687f1488b97bc007c6cfb02d4a25bcb3fd94e0

pdfwrite - linearisation, correctly prevent buffer overrun

Picked up by the compiler on the Mac.the test was impossible, because a byte
cannot exceed a value of 255. The value (whcih triggers a buffer flush and reset)
shuold of course have been 254, as it now is.

No differences ewxpected

gs/base/gdevpdf.c


2012-10-04 10:43:51 -0700
Michael Vrhel <michael.vrhel@artifex.com>
fc7c0751108e823d311418bfed920a5a4b3ed37b

Expansion of spot color replacement to handle the mixing of DeviceN Colors

The named color profile structure will now also be used for mixing of DeviceN colorants.
This includes an update of the example to show the results.

gs/base/gscdevn.c
gs/base/gscsepr.c
gs/base/gsicc_cache.c
gs/base/gsicc_cache.h
gs/base/lib.mak
gs/toolbin/color/named_color/named_color_table.txt
gs/toolbin/color/named_color/named_colors.pdf


2012-10-04 19:19:58 -0600
Henry Stiles <henry.stiles@artifex.com>
c0b2a6eb8b26af6f1cea99efd97354ee3c22f28a

These header files should have been added with the warning message
cleanup commit (deeef25).

pcl/rtmisc.h
pl/plchar.h


2012-10-04 13:32:47 -0600
Henry Stiles <henry.stiles@artifex.com>
deeef25f35ff78e75a5ad6d056c481f1b1013c66

Warning cleanup.

pcl/pcdraw.c
pcl/pcfsel.c
pcl/pcindxed.c
pcl/pcl.mak
pcl/pcpatrn.c
pcl/pcstatus.c
pcl/pcuptrn.c
pcl/pgfdata.c
pcl/pgfdata.h
pcl/pgfont.c
pcl/pgmand.h
pcl/rtmisc.c
pl/pl.mak
pl/plchar.c
pl/plfont.c
pl/plfont.h
pl/plplatf.c
pl/plsrgb.c
pl/pluchar.c
pxl/pxffont.c
pxl/pxfont.c
pxl/pxfont.h
pxl/pxgstate.h
pxl/pxl.mak
pxl/pxpthr.c
pxl/pxpthr.h
pxl/pxstate.c
pxl/pxstate.h
pxl/pxtop.c


2012-10-02 21:51:18 -0700
Michael Vrhel <michael.vrhel@artifex.com>
18f1da650322713395aceafb25f495149c8f0cda

Turn on ability to specify no color management from the srcgtag structure for different objects

With this, it is possible in the srcgtag structure to specify that we will not do color management
for RGB or CMYK graphic, image and text objects. This is done by specifying the keyword None after
the particular tag. For example "Graphic_CMYK None" in the file that is used with the -sSourceObjectICC
command option. In the above case, all CMYK source graphics would be mapped using the unmanaged color
methods (e.g. 255-X) Also we added in support for preserveK, override source ICC and black point
compensation on an object based case. Had to worry about the case where the profile passes through
the clist in the commit and had to add in a new parameter to the profile to ensure that the rendering
conditions are associated with the source profile. Also fixed a bug to keep from changing the number of
channels in the link format.

gs/base/gdevp14.c
gs/base/gscms.h
gs/base/gscsepr.c
gs/base/gsicc.c
gs/base/gsicc_cache.c
gs/base/gsicc_lcms2.c
gs/base/gsicc_manage.c
gs/base/gsicc_nocm.c
gs/base/gxclimag.c
gs/base/gxclist.c
gs/base/gxclist.h
gs/base/gxcmap.c
gs/base/gxi12bit.c
gs/base/gxicolor.c
gs/base/gximono.c
gs/base/gxiscale.c
gs/base/gxshade.c
xps/xpsgradient.c


2012-10-04 10:02:02 +0100
Chris Liddell <chris.liddell@artifex.com>
44616dd78f9af00a47a4c27e5491537df28cd964

Eliminate last_char global variable.

last_char value is now stored in the pl_font_s structure.

pl/plchar.c
pl/plfont.c
pl/plfont.h


2012-10-03 09:29:47 +0100
Ken Sharp <ken.sharp@artifex.com>
37e1da602cff3378b3d985637dc582f206aa5cd8

txtwrite - fix a typo causing text to be incorrect

When the text operation was TEXT_FROM_CHARS or TEXT_FROM_SINGLE_CHAR the code
was referencing the 'bytes' structure member, not the 'chars' structure member.

Also fixed a potential signed/unsigned mismatch in pdfwrite and a 32/64 bit
mismatch in txtwrite, both picked up by Henry. It would be nice to know why
the 'new compiler warnings' check didn't flag these, possibly they predate
that check.

No differences expected.

gs/base/gdevpdf.c
gs/base/gdevtxtw.c


2012-10-01 10:48:01 -0700
Michael Vrhel <michael.vrhel@artifex.com>
ae25729f69a9ece10d6fdbb0c0c213c4e27aea7c

Change to a more sane storage of the color rendering conditions to s common structure type

As more conditions variables are introduced, e.g. rendering intent, black point compensation, preserve black
etc. it has become clear that we need a structure for these variables making it easy to introduce new ones.
Also clean up a lot of the usage methods to ensure that proper override occurs without having to set a
pile of command line options.

gs/Resource/Init/gs_lev2.ps
gs/base/gdevp14.c
gs/base/gscms.h
gs/base/gscspace.c
gs/base/gsdevice.c
gs/base/gsdparam.c
gs/base/gsequivc.c
gs/base/gsicc_cache.c
gs/base/gsicc_lcms2.c
gs/base/gsicc_manage.c
gs/base/gsicc_manage.h
gs/base/gstrans.c
gs/base/gxclimag.c
gs/base/gxcmap.c
gs/psi/zusparam.c


2012-10-02 20:37:15 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
f1a459c6e695f065f036db4a8946ae726ee69eac

Bug 693285: Apply update of original patch from zeniko. We now check that the symbol dictionary
being imported is not empty. Also prevent seg faults resulting from the threadsafe update.

gs/base/sjbig2.c
gs/jbig2dec/jbig2_symbol_dict.c


2012-10-02 13:18:25 -0600
Henry Stiles <henry.stiles@artifex.com>
80dc061ed4717eef205be05e764ac4f1b8c67632

fix mismatched parameter type, possibly associated with bug #693362

pcl/pgfont.c
pl/plchar.c
pl/plfont.c
pl/plfont.h


2012-10-02 12:48:13 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
281b221f4632ba243efa325663dfb223d42028ff

Add missing initialisation of override_bp

Fix a Valgrind warning and a possible cause of indeterminism.

gs/base/gsicc_manage.c


2012-10-02 13:26:48 +0100
Chris Liddell <chris.liddell@artifex.com>
7c47cd47fc96a2f8af5723dbe777526a7fc64c9a

White space and warning fixes for bigtiff commit.

No cluster differences.

gs/base/gdevtfax.c
gs/base/gdevtifs.c
gs/base/gdevtsep.c


2012-10-02 11:07:09 +0100
Ken Sharp <ken.sharp@artifex.com>
5784bfbfba7191cacce5309e88afac0851287460

Add preservation of PageLabels from input PDF files when using pdfwrite

Bug #692901 "Preserve Page labels from input PDF when the output is PDF"

Because hte defined pdfmark /PAGELABEL is not flexible enough to handle all
the possible kinds of page labels in PDF, and because it transpires we don't
emit pdfmarks when producing PostScript with ps2write, this feature does
not use teh pdfmark syntax.

It does work in a broadly similar way, we create a string from the PageLabels
entry in the Catalog dictionary (if present) and then pass that via put_params
with a parameter naem of pdfpagelabels (pdfmark uses a name of pdfmark).

This string is then stored in the Catalog dictionary, and emitted when the
output PDF is created.

I'm unable to test this against the original report, as no specimen PDF file
was provided.

No differences expected, this makes no changes in rendering.

gs/Resource/Init/gs_pdfwr.ps
gs/Resource/Init/pdf_main.ps
gs/base/gdevpdfp.c


2012-09-28 09:23:36 +0100
Chris Liddell <chris.liddell@artifex.com>
79af8e5bff7321b6985ea0bd5dd5b4a5a4c2590a

Provide bigtiff output option.

All the tiff devices now support the device parameter "-dUseBigTIFF" which
tells them to write their output in "bigtiff" format, rather than "normal"
tiff.

In the event that we overflow the allowed file size in normal tiff, the existing
error message is augmented with a hint to try bigtiff output.

To implement the above warning has meant adding warning and error handling hooks
for libtiff, and also adding file I/O hooks for libtiff.

This requires libtiff version >=4.0.0, so linking with older libtiff versions
will cause us to ignore the UseBigTIFF setting.

No cluster differences.

gs/base/gdevtfax.c
gs/base/gdevtfnx.c
gs/base/gdevtifs.c
gs/base/gdevtifs.h
gs/base/gdevtsep.c


2012-10-01 08:41:11 +0100
Ken Sharp <ken.sharp@artifex.com>
b81847783db2c17e11d40feeb0812ff7d129aca9

Bug #691319 - Preserve Flags (/F) from Text annotations

When creating pdfmarks for the benefit of pdfwrite, the PDF interpreter
only handles two types of annotation, Text and Link. We were handling the
Flags entry for Link annotations, but not for Text annotations.

Here we preserve the Flags for text annotations too.

No differences expected, not tested by cluster.

gs/Resource/Init/pdf_main.ps


2012-09-28 14:40:35 +0100
Ken Sharp <ken.sharp@artifex.com>
4b9424c7bf7c74613cd004195592d41893dd3bd5

Remove more traces of pdfopt from the repository and documentation

gs/doc/Develop.htm
gs/doc/Ps2pdf.htm
gs/doc/Psfiles.htm
gs/lib/pdfopt
gs/lib/pdfopt.bat


2012-09-28 14:34:27 +0100
Ken Sharp <ken.sharp@artifex.com>
260ddb3e53ffe852a8994dd00719931ca3f2beec

With the addition of linearisation to pdfwrite, pdfopt.ps has become
redundant. Since it is difficult to maintain, has a number of bugs, and is
believed not to work properly anyway, it is now deprecagted and hence
removed from the repository.

gs/lib/pdfopt.ps


2012-09-28 13:08:06 +0100
Ken Sharp <ken.sharp@artifex.com>
f2a40a3a7edd6d27caeaa19f7f644adf31ee972c

pdfwrite - linearisation completion

Update ps2pdf.htm documentation

CHange parameter name to 'FastWebView'

Don't writ the xref on the initial file, as we don't need it and it makes
the original file slightly smaller, which reduces the chances that we will
have to pad the linearised file. (The linearised file must be no smaller
than the original, because we do not close the file, we just seek around and
rewrite it). Same with the trailer dictionary.

Fix 'rewrite object' so that dictioanry and array objects can be of any size
previously we had assunmed they would be less than 64k, but some complex
files broke that.

If the linearised file is smaller than the original, we need to add white
space to bring it up to the same size, or we will be left with garbage at
the end. Worse, the garbage may well contain a partial invalid xref.

Remove the check for one page files as Adobe specifically allows linearising
single page documents....

gs/base/gdevpdf.c
gs/base/gdevpdfp.c
gs/doc/Ps2pdf.htm


2012-09-28 07:54:54 +0100
Chris Liddell <chris.liddell@artifex.com>
3c23fe12abb6a158abf1c515601db7b2f94c5463

Reinstate tiffsep1 and svgwrite in the device lists

I accidentally left out tiffsep1 when I consolidated the two lists of TIFF
devices, so putting it back now.

svgwrite was removed a while ago due to being incomplete and flaky, but there
has been ongoing interest in the device, some patches posted, so reinstate it
to make it easier for people to test/debug/develop.

It's included in the "FILES" class of devices.

No cluster differences.

gs/base/configure.ac


2012-09-27 10:18:27 -0700
Michael Vrhel <michael.vrhel@artifex.com>
3a0483fddf55e091aafa1bd4822bd77b19b481b3

Update Use.htm with ICC command updates.

gs/doc/Use.htm


2012-09-27 10:06:51 -0700
Michael Vrhel <michael.vrhel@artifex.com>
666890f41d3ca928498a8652fa7d102cd9f22191

Update color document with recent changes.

gs/doc/GS9_Color_Management.pdf
gs/doc/GS9_Color_Management.tex


2012-09-27 17:21:16 +0100
Ken Sharp <ken.sharp@artifex.com>
53547c0892c48e248a146667f280886b362befc1

pdfwrite - linearisation, fix some seg faults

The code was inadvertently incrementing an array index twice, leading to
out of bounds memory access, and consequent memory corruption.

No differences expected, this is not cluster tested.

gs/base/gdevpdf.c


2012-09-24 23:15:43 -0700
Michael Vrhel <michael.vrhel@artifex.com>
408cbb83103ba9cf6996eeebaa02995cd9f535ad

Addition of support for allowing control over the use of black point compensation in color management

Black point compensation is a new extended graphic state entry in the extended graphic
state with PDF 2.0 . This change adds it to the graphic state. This update also allows
the same type of override control for black point that we currently have for the
rendering intent. This includes specification of its use by source object type with
the use of -sSourceObjectICC for source RGB and CMYK graphic, images and text objects.
Alternatively, control can be achieved for the whole document via object type
by specification -dBlackPtComp=0/1. Alternatively, you can specify control
on an object based method using -dGraphBlackPt=0/1
-dImageBlackPtComp=0/1 -dTextBlackPtComp=0/1. All of these
will require the setting of -dOverrideBP to ensure that the document content does not
interfere with the command line setting. Note that these are not true/false settings
but integer values like the rendering intent. This is to allow the easy expansion
to other black point compensation options as described by Bug 692223.

gs/Resource/Init/gs_lev2.ps
gs/base/gdevp14.c
gs/base/gscms.h
gs/base/gscsepr.c
gs/base/gscspace.c
gs/base/gsdparam.c
gs/base/gsequivc.c
gs/base/gsicc.c
gs/base/gsicc_cache.c
gs/base/gsicc_lcms2.c
gs/base/gsicc_manage.c
gs/base/gsicc_manage.h
gs/base/gsstate.c
gs/base/gsstate.h
gs/base/gstrans.c
gs/base/gxclimag.c
gs/base/gxcmap.c
gs/base/gxi12bit.c
gs/base/gxicolor.c
gs/base/gximono.c
gs/base/gxiscale.c
gs/base/gxistate.h
gs/base/gxshade.c
gs/psi/zcolor3.c
gs/psi/zusparam.c
gs/toolbin/color/src_color/objsrc_profiles_example.txt
xps/xpsgradient.c


2012-09-26 11:02:22 +0100
Robin Watts <robin.watts@artifex.com>
1770ca69b258c571565d9a6fc7bb9fb0ebd539e4

Bug 693357: Fix typo

In the big debugging printf commit of the other day, I introduced a
typo into the luratech jbig2 code. Fixed here.

gs/base/sjbig2_luratech.c


2012-09-26 10:52:46 +0100
Robin Watts <robin.watts@artifex.com>
45ba06c92cf7cb290b1c76f4380606323579e5b9

Fix DEBUG mode SEGVs; bug 693359

In at least a couple of places I was reading a memory pointer from a
structure that wasn't filled in. Simple fixes here.

This solves the crashing with -ZBb in any file with an image pointed
out by Henry on irc.

I'm sure there will be more such problems due to the wide ranging
nature of the commit that changed this; hopefully all will be as
simple to solve as this.

gs/base/gxipixel.c
gs/base/gxp1fill.c


2012-09-26 09:06:22 +0100
Ken Sharp <ken.sharp@artifex.com>
3894e9c8a3ab125c82048da3bf81515500bb2da0

pdfwrite - emit partial pages

previously, if an input file made marks on the page but did not call
showpage (or equivalent in other languages), pdfwrite would write all the
objects to the file, but would not add the final partial page to the Pages
tree, which meant that the final page didn't appear.

It seems that Adobe Acrobat behaves differently, and produces the final page
under these conditions. This commit changes our behaviour to match the
observed Adobe behaviour.

This was noticed when running some Quality Logic test files, it appears that
the cluster runs in a mode where these partial pages were always emitted
anyway (because of the CET conformance hacks) so there are only a few files
which display any differences.

gs/base/gdevpdf.c


2012-09-25 19:43:21 +0100
Robin Watts <robin.watts@artifex.com>
1deb66b8f5e53f8a560ced10fe777a55e42fc6f2

Fix garbage collection troubles with icc code.

Historically, due to lcms/lcms2 allocating stuff using malloc/free
the profiles haven't been subject to garbage collection. When I
fixed gscms_create/destroy not being called properly, this caused
lcms2 to start allocating blocks properly with the gs allocators.

To ensure that these blocks weren't unexpectedly garbage collected
away, I modified one of the calls from gsicc_cache.c to the gscms
layer to pass in a non_gc memory pointer. This worked well, but I
missed a second call in which I should have done the same.

Fixed here. This cures bug 693349.

gs/base/gsicc_cache.c


2012-09-21 12:34:16 -0700
Ray Johnston <ray.johnston@artifex.com>
873455f29e399fc5f7b489c50cfb869fdc26cb0d

Simplify mkromfs build dependencies, add needed debug and error printing.

Since mkromfs minimal memory implementation left the gs_lib_ctx set to NULL,
the errwrite and outwrite functions would de-reference a NULL causing a
Segmentation violation if gp_unix ever printed anything. This removes the
need for the gsmisc.o altogether and removes the need for gslibctx.o and
the dummy gscms functions.

gs/base/mkromfs.c
gs/base/unix-aux.mak


2012-09-24 09:25:35 -0700
Michael Vrhel <michael.vrhel@artifex.com>
bb0ef5ed637757290a88709fa1543585b29ccc54

Update color management documentation with information about NCLR ICC profile usage.

gs/doc/GS9_Color_Management.pdf
gs/doc/GS9_Color_Management.tex


2012-09-24 09:22:41 -0700
Michael Vrhel <michael.vrhel@artifex.com>
5176cb8c3882de51e413880ec2818a45a9d7c139

Fix a few typos.

gs/doc/Use.htm


2012-09-21 22:48:37 -0700
Michael Vrhel <michael.vrhel@artifex.com>
8227d2d46b516b75a4383466eb243b725f3124b0

Support for the use of N-CLR ICC output profiles extended to the tiffsep device.

The documentation on the use of this option was also updated.

gs/base/gdevdevn.h
gs/base/gdevpsd.c
gs/base/gdevtsep.c
gs/doc/Use.htm


2012-09-20 22:55:45 -0700
Michael Vrhel <michael.vrhel@artifex.com>
8a1ca14aab8f3ef6a7ffaa554d4e1d348b7561a7

Bulk of work to demonstrate the use of DeviceN ICC output profile.

This adds support to the psdcmyk device as well as the required changes in
the graphics library. Through the use of the LIMIT_TO_ICC define in gdevpsd, it is
possible to limit the colorants to those defined by the ICC output profile.
Setting to 1 will limit it setting to 0 will allow all spots (up to the maximum)
to be created. If spot names in the document match those in the command line
with -sICCOutputColors, then those colorants and hence separation will be treated
the same.

gs/base/gdevpsd.c
gs/base/gscdevn.c
gs/base/gscms.h
gs/base/gscsepr.c
gs/base/gsequivc.c
gs/base/gsicc.c
gs/base/gsicc_manage.c
gs/base/gsicc_manage.h
gs/base/gxcmap.c
gs/base/gxistate.h
gs/base/lib.mak


2012-09-21 18:49:41 +0100
Robin Watts <robin.watts@artifex.com>
51bc075100060ca1f90dd5d3d6c467597202d27d

Import LCMS 2.4 (patched)

Here we import LCMS 2.4 with our existing patches into gs.

Cluster testing this shows various changes; most of these are just
small rounding issues. It is possible that some of this is due to
Marti adopting our revised 16 -> 8 code and having pushed it further
through the code than we had.

Also there are changes to the black point compensation code designed
to more accurately match Adobe. For some test files that have
deliberately extreme profiles we get noticably different results.
Supposedly this is because those profiles do not round trip nicely,
but after discussing it with Michael he says it's nothing to worry
about.

gs/base/lcms2.mak
gs/ghostscript.vcproj
gs/lcms2/AUTHORS
gs/lcms2/ChangeLog
gs/lcms2/Makefile.in
gs/lcms2/Projects/.gitignore
gs/lcms2/Projects/BorlandC_5.5/lcms2.rc
gs/lcms2/Projects/BorlandC_5.5/lcmsdll.lk
gs/lcms2/Projects/BorlandC_5.5/lcmsdll.lst
gs/lcms2/Projects/VC2008/lcms2_DLL/lcms2_DLL.vcproj
gs/lcms2/Projects/VC2008/lcms2_static/lcms2_static.vcproj
gs/lcms2/Projects/VC2010/jpegicc/jpegicc.vcxproj
gs/lcms2/Projects/VC2010/lcms2.sln
gs/lcms2/Projects/VC2010/lcms2_DLL/lcms2_DLL.vcxproj
gs/lcms2/Projects/VC2010/lcms2_DLL/lcms2_DLL.vcxproj.filters
gs/lcms2/Projects/VC2010/lcms2_static/lcms2_static.vcxproj
gs/lcms2/Projects/VC2010/lcms2_static/lcms2_static.vcxproj.filters
gs/lcms2/Projects/VC2010/linkicc/linkicc.vcxproj
gs/lcms2/Projects/VC2010/psicc/psicc.vcxproj
gs/lcms2/Projects/VC2010/testbed/testbed.vcxproj
gs/lcms2/Projects/VC2010/tiffdiff/tiffdiff.vcxproj
gs/lcms2/Projects/VC2010/tifficc/tifficc.vcxproj
gs/lcms2/Projects/VC2010/transicc/transicc.vcxproj
gs/lcms2/Projects/mac/._.DS_Store
gs/lcms2/Projects/mac/LittleCMS/._.DS_Store
gs/lcms2/Projects/mac/LittleCMS/Info.plist
gs/lcms2/Projects/mac/LittleCMS/LittleCMS.xcodeproj/mariama.mode1v3
gs/lcms2/Projects/mac/LittleCMS/LittleCMS.xcodeproj/mariama.pbxuser
gs/lcms2/Projects/mac/LittleCMS/LittleCMS.xcodeproj/project.pbxproj
gs/lcms2/aclocal.m4
gs/lcms2/configure
gs/lcms2/configure.ac
gs/lcms2/doc/LittleCMS2.3 API.pdf
gs/lcms2/doc/LittleCMS2.3 Plugin API.pdf
gs/lcms2/doc/LittleCMS2.3 tutorial.pdf
gs/lcms2/doc/LittleCMS2.4 API.pdf
gs/lcms2/doc/LittleCMS2.4 Plugin API.pdf
gs/lcms2/doc/LittleCMS2.4 tutorial.pdf
gs/lcms2/include/Makefile.in
gs/lcms2/include/lcms2.h
gs/lcms2/include/lcms2_extras.h
gs/lcms2/include/lcms2_plugin.h
gs/lcms2/src/Makefile.am
gs/lcms2/src/Makefile.in
gs/lcms2/src/cmscam02.c
gs/lcms2/src/cmscgats.c
gs/lcms2/src/cmscnvrt.c
gs/lcms2/src/cmserr.c
gs/lcms2/src/cmsgamma.c
gs/lcms2/src/cmsgmt.c
gs/lcms2/src/cmshalf.c
gs/lcms2/src/cmsintrp.c
gs/lcms2/src/cmsio0.c
gs/lcms2/src/cmsio1.c
gs/lcms2/src/cmslut.c
gs/lcms2/src/cmsmd5.c
gs/lcms2/src/cmsmtrx.c
gs/lcms2/src/cmsnamed.c
gs/lcms2/src/cmsopt.c
gs/lcms2/src/cmspack.c
gs/lcms2/src/cmspcs.c
gs/lcms2/src/cmsplugin.c
gs/lcms2/src/cmsps2.c
gs/lcms2/src/cmssamp.c
gs/lcms2/src/cmssm.c
gs/lcms2/src/cmstypes.c
gs/lcms2/src/cmsvirt.c
gs/lcms2/src/cmswtpnt.c
gs/lcms2/src/cmsxform.c
gs/lcms2/src/cmsxform.h
gs/lcms2/src/cmsxform_extras.c
gs/lcms2/src/lcms2.def
gs/lcms2/src/lcms2_internal.h
gs/lcms2/testbed/Makefile.am
gs/lcms2/testbed/Makefile.in
gs/lcms2/testbed/testcms2.c
gs/lcms2/utils/common/utils.h
gs/lcms2/utils/common/vprf.c
gs/lcms2/utils/common/xgetopt.c
gs/lcms2/utils/delphi/lcms2dll.pas
gs/lcms2/utils/jpgicc/Makefile.in
gs/lcms2/utils/jpgicc/jpgicc.c
gs/lcms2/utils/linkicc/Makefile.in
gs/lcms2/utils/psicc/Makefile.in
gs/lcms2/utils/tificc/Makefile.in
gs/lcms2/utils/tificc/tificc.c
gs/lcms2/utils/transicc/Makefile.in
gs/lcms2/utils/transicc/transicc.c


2012-09-21 19:07:48 +0100
Robin Watts <robin.watts@artifex.com>
2346369bb7536062946d409f940e865791afc34a

Fix typo in previous commit; return NULL in void function.

MSVC and gcc both accept it with a warning, hence I didn't spot it.
Sorry.

gs/base/gslibctx.c


2012-08-25 00:38:56 +0100
Robin Watts <robin.watts@artifex.com>
0eae840336f244e5b0d195109e1dd9e104396d87

Arrange for gscms_create/destroy to be called correctly.

gscms_create should be called before any other cms call is made,
but it's not being. It not being called has meant that lcms has
always been using malloc/free rather than the gs allocation
functions. Fix some bugs in those allocation functions that show
up now they are used.

Also ensure that pointers are correctly enumerated.

Ensure that cms set context pointer actually makes it into links.

Update gscms interface to ensure that errors on gscms_create can
be responded to.

This work has exposed a problem wrt the context pointer in the
gscms interface, so we fix that here too.

The theory has always been that we can drop new and different
CMS engines into ghostscript, by wrapping each one with some code
that implements the gscms_ functions from gsicc_cms.h.

While this interface was developing, I started to add support for
a context pointer, but looking back at it, it seems I never
completed the work and it was left in a state where it was useless.

After much discussion with Michael, we've decided that the best way
to proceed is to arrange for gscms_create to be called when gs
starts up (just after the base level allocator is created), and for
gscms_destroy to be called as gs exits (just before the base level
allocator is destroyed).

This base level allocator is passed into gscms_create/gscms_destroy
so it can safely allocate memory. Furthermore, we have done away
with explicitly passing the cms_context pointer around, as it was
not really any use in its current form. Instead, we have added
functions to get/set the context pointer in the gs_lib_ctx.

void *gs_lib_ctx_get_cms_context( const gs_memory_t *mem );
void gs_lib_ctx_set_cms_context( const gs_memory_t *mem, void *cms_context );

As the gscms functions take mem pointers in all the interesting
places, this should be sufficient.

As mkromfs calls the gs lib ctx init stuff, we have had to add stubs
for gscms_create/destroy to mkromfs.c.

gs/base/gscms.h
gs/base/gsicc_cache.c
gs/base/gsicc_cache.h
gs/base/gsicc_cms.h
gs/base/gsicc_lcms.c
gs/base/gsicc_lcms2.c
gs/base/gsicc_manage.c
gs/base/gsicc_nocm.c
gs/base/gslibctx.c
gs/base/gslibctx.h
gs/base/gsmalloc.c
gs/base/mkromfs.c


2012-09-21 13:52:25 +0100
Robin Watts <robin.watts@artifex.com>
8ef93d4d8f33149cb7d244da52d47e82a11f9019

Fix LCMS threading issue with plugin registration.

When registering a plugin, allocations can be done. This can result
in calls back to the user supplied malloc functions, which assume
that a cmsContext will be supplied. In the current code there is
no way to pass a cmsContext into the plugin registration.

We therefore add a new function cmsPluginTHR that does take such a
context.

Currently this isn't called yet, as gscms_create/destroy aren't correctly
called.

gs/lcms2/include/lcms2.h
gs/lcms2/src/cmscnvrt.c
gs/lcms2/src/cmsgamma.c
gs/lcms2/src/cmsopt.c
gs/lcms2/src/cmspack.c
gs/lcms2/src/cmsplugin.c
gs/lcms2/src/cmstypes.c
gs/lcms2/src/lcms2_internal.h


2012-09-20 20:12:27 +0100
Robin Watts <Robin.Watts@artifex.com>
81946ddaca41eb0726d4435a6217b3e017bd7a8c

Patch LCMS threading bug.

LCMS maintains a ContextID for the sake of the allocator callbacks.
In the call sequence through, it was losing this and ending up with
the allocators being called with NULL.

Simple fix.

gs/lcms2/src/cmssamp.c


2012-09-20 17:18:39 +0100
Ken Sharp <ken.sharp@artifex.com>
7a70a32618642f17104747dc2f5785775b42495b

pdfwrite - linearisation, correctly renumber resoruces in arrays

The code to renumber resources was only checking for indirect references in
dictionaries, we need to check arrays as well.

No differences expected.

gs/base/gdevpdf.c


2012-09-20 15:47:08 +0100
Ken Sharp <ken.sharp@artifex.com>
455ecb61885dcceccb23fb16518bb1790c40eb40

pdfwrite - linearisation bug fixes

Allow return code to be 0 when seeking so we don't lose the first part of
the linearised file.

If the input job makes marks on the final page, but does not call showpage,
we discard the final page. This can lead to resources being marked as 'used'
on pages that no longer exist. We now ignore such usage.

Fix an 'off by 1' error when indexing an array using paeg numbers
(page numebrs are 1->n, array is 0->n-1)

Put a #ifdef round some debug prints so they don't end up in the cluster log

Some resources are only used by other resources (eg Encoding) and should take
on the Page Usage of their parent. If the parent resource was shared we werne't
correclty updating the child with all the pages the parent was used on.

Some memory was being double freed causing seg faults.

No differences expetced as cluster doesn't test linearisation.

gs/base/gdevpdf.c


2012-09-19 16:42:42 +0100
Robin Watts <Robin.Watts@artifex.com>
cd4826a3a5e3000df0e5f787e3b6ceec88c43885

Remove gs_lib_ctx_get_non_gc_memory_t in GS_THREADSAFE builds.

gs_lib_ctx_get_non_gc_memory_t relied on a static to implement it,
so is incompatible with multi-threaded builds. Removing it
causes various devices/bits of code to break. We fix the
important (i.e. mostly non-contrib) devices that use it here.

We also rework the gscms/lcms interface code to avoid it too.

With this commit in, helgrind apitests tiger to ppmraw as being
clean.

gs/base/gdevrinkj.c
gs/base/gdevxcf.c
gs/base/gsicc_cache.c
gs/base/gsicc_cms.h
gs/base/gsicc_lcms.c
gs/base/gsicc_lcms2.c
gs/base/gsicc_manage.c
gs/base/gsicc_manage.h
gs/base/gslibctx.c
gs/base/gslibctx.h
gs/psi/zicc.c


2012-09-19 16:16:32 +0100
Robin Watts <Robin.Watts@artifex.com>
9ccfc96d8885b419437f985baa7d26db3ff1950a

Add some PACIFY_VALGRIND magic for helgrind.

Various bits of code (notably gs_debug, some clist function pointers
and some constants in lcms) are held in statics. We accept that
gs_debug is going to be thread unsafe and choose to ignore it.
The others are initialised multiple times (to the same values) and
then never changed.

Helgrind is not smart enough to see that these are repeatedly
updated to the same values, so flags an error every time they are
written to.

We therefore add a bit of Valgrind magic before these places to
tell it to ignore these addresses when checking.

gs/base/gsinit.c
gs/base/gxclfile.c
gs/base/gxclist.c
gs/base/gxclmem.c
gs/lcms2/src/cmserr.c
gs/lcms2/src/cmswtpnt.c
gs/psi/imain.c
pl/plplatf.c
pl/plplatfps.c


2012-09-19 16:11:58 +0100
Robin Watts <Robin.Watts@artifex.com>
9171c68f18ba278aa72df4a30ba89bb5400bdd79

Disable various bits of debugging stats etc for GS_THREADSAFE

Various bits of code use statics to gather statistics in DEBUG
builds; disable these in GS_THREADSAFE builds as they are
incompatible with multi-threaded operation.

gs/base/gdevm24.c
gs/base/gdevm40.c
gs/base/gdevm48.c
gs/base/gdevm56.c
gs/base/gdevm64.c
gs/base/gxclip.c
gs/base/gxfill.c
gs/psi/idict.c
gs/psi/idstack.c
gs/psi/interp.c


2012-09-19 13:05:20 +0100
Robin Watts <Robin.Watts@artifex.com>
2e03d8c5aac80eb56cb9097a316dc36bf311d380

Update LCMS2 to avoid race condition in Tag handling.

LCMS2 as supplied (in both 2.3 and 2.4 at least) is broken w.r.t
multitasking due to a race condition in the Tag handling.

When a TagTypeHandler is needed, it is looked up from a system table.
The existing code then writes into this table with the ContextID and
calls the handler. This is a race condition if 2 threads are using
the same TagTypeHandler at a time.

The fix implemented here is to copy the TagTypeHandler structure to a
local one, write the ContextID into that, and then call through that.

gs/lcms2/src/cmsio0.c


2012-09-13 00:40:03 +0100
Robin Watts <robin.watts@artifex.com>
6777c88fab2afc3e6558fda1dfb51110088ede61

Introduce GS_THREADSAFE define and modify printing calls.

Lots of debugging/error information is printed using eprintf and
dlprintf etc. These functions do not take a gs_memory_t * and are
not safe for use within code that runs under multiple instances
created by gsapi.

Introduce new versions (dmprintf, dmlprintf etc) that DO take a
gs_memory_ *, and move as much of ghostscript/ghostpdl's usage
over to these as possible. I have not touched the contrib directory,
and some locations in the code do not easily have a gs_memory_t
to hand, so I have left them be.

If the GS_THREADSAFE define is made during building, then the
functions that don't take an explicit memory handle are #defined
away to nothing.

If the GS_THREADSAFE define is made, we disable the gsapi check that
checks for a single init.

gs/base/gdebug.h
gs/base/gdevabuf.c
gs/base/gdevbbox.c
gs/base/gdevdbit.c
gs/base/gdevdevn.c
gs/base/gdevdevn.h
gs/base/gdevdflt.c
gs/base/gdevdrop.c
gs/base/gdevfax.c
gs/base/gdevhl7x.c
gs/base/gdevifno.c
gs/base/gdevijs.c
gs/base/gdevjpx.c
gs/base/gdevm1.c
gs/base/gdevm24.c
gs/base/gdevmr1.c
gs/base/gdevmr8n.c
gs/base/gdevnfwd.c
gs/base/gdevp14.c
gs/base/gdevpbm.c
gs/base/gdevpdf.c
gs/base/gdevpdfu.c
gs/base/gdevperm.c
gs/base/gdevplan.c
gs/base/gdevplib.c
gs/base/gdevprn.c
gs/base/gdevpsd.c
gs/base/gdevpsds.c
gs/base/gdevpsf2.c
gs/base/gdevpsft.c
gs/base/gdevpsfx.c
gs/base/gdevpx.c
gs/base/gdevrinkj.c
gs/base/gdevsppr.c
gs/base/gdevsvg.c
gs/base/gdevsvga.c
gs/base/gdevtrac.c
gs/base/gdevtsep.c
gs/base/gdevx.c
gs/base/gdevxcf.c
gs/base/gdevxcmp.c
gs/base/gp_unifs.c
gs/base/gp_unix.c
gs/base/gsalloc.c
gs/base/gsalphac.c
gs/base/gscdevn.c
gs/base/gschar0.c
gs/base/gscie.c
gs/base/gsciemap.c
gs/base/gscoord.c
gs/base/gscsepr.c
gs/base/gscspace.c
gs/base/gsequivc.c
gs/base/gserrors.h
gs/base/gsfcmap1.c
gs/base/gsfont.c
gs/base/gshsb.c
gs/base/gsht.c
gs/base/gsht1.c
gs/base/gshtscr.c
gs/base/gsicc.c
gs/base/gsicc_cache.c
gs/base/gsicc_manage.c
gs/base/gsicc_profilecache.c
gs/base/gsimage.c
gs/base/gslib.c
gs/base/gslibctx.c
gs/base/gsmalloc.c
gs/base/gsmchunk.c
gs/base/gsmemory.c
gs/base/gsmisc.c
gs/base/gsovrc.c
gs/base/gspath.c
gs/base/gspath1.c
gs/base/gsptype1.c
gs/base/gsrefct.h
gs/base/gsstate.c
gs/base/gsstruct.h
gs/base/gstrans.c
gs/base/gstype1.c
gs/base/gstype2.c
gs/base/gstype42.c
gs/base/gxacpath.c
gs/base/gxalloc.h
gs/base/gxblend.c
gs/base/gxblend1.c
gs/base/gxccache.c
gs/base/gxccman.c
gs/base/gxchar.c
gs/base/gxclbits.c
gs/base/gxcldev.h
gs/base/gxclimag.c
gs/base/gxclip.c
gs/base/gxclip2.c
gs/base/gxclipm.c
gs/base/gxclist.c
gs/base/gxclmem.c
gs/base/gxclpath.c
gs/base/gxclrast.c
gs/base/gxclread.c
gs/base/gxclrect.c
gs/base/gxclthrd.c
gs/base/gxclutil.c
gs/base/gxcmap.c
gs/base/gxcpath.c
gs/base/gxdcconv.c
gs/base/gxdevndi.c
gs/base/gxdtfill.h
gs/base/gxfapiu.c
gs/base/gxfill.c
gs/base/gxfillsl.h
gs/base/gxfilltr.h
gs/base/gxht.c
gs/base/gxi12bit.c
gs/base/gxicolor.c
gs/base/gxidata.c
gs/base/gxifast.c
gs/base/gximag3x.c
gs/base/gximage.c
gs/base/gximage3.c
gs/base/gximono.c
gs/base/gxipixel.c
gs/base/gxiscale.c
gs/base/gxmclip.c
gs/base/gxp1fill.c
gs/base/gxpath.c
gs/base/gxpath.h
gs/base/gxpcmap.c
gs/base/gxpflat.c
gs/base/gxstroke.c
gs/base/gxtype1.c
gs/base/lib.mak
gs/base/sbwbs.c
gs/base/scfd.c
gs/base/scfe.c
gs/base/sdctd.c
gs/base/sdcte.c
gs/base/sfilter2.c
gs/base/sfxfd.c
gs/base/sfxstdio.c
gs/base/shc.h
gs/base/shcgen.c
gs/base/sidscale.c
gs/base/siscale.c
gs/base/sjbig2.c
gs/base/sjbig2_luratech.c
gs/base/sjpx_luratech.c
gs/base/slzwd.c
gs/base/slzwe.c
gs/base/std.h
gs/base/stream.c
gs/contrib/pcl3/eprn/eprnparm.c
gs/contrib/pcl3/eprn/eprnrend.c
gs/contrib/pcl3/eprn/gdeveprn.c
gs/contrib/pcl3/src/gdevpcl3.c
gs/cups/gdevcups.c
gs/psi/fapiufst.c
gs/psi/ialloc.c
gs/psi/iapi.c
gs/psi/idebug.c
gs/psi/idict.c
gs/psi/idisp.c
gs/psi/idstack.c
gs/psi/igc.c
gs/psi/igcref.c
gs/psi/igcstr.c
gs/psi/igcstr.h
gs/psi/ilocate.c
gs/psi/imain.c
gs/psi/imainarg.c
gs/psi/iname.c
gs/psi/interp.c
gs/psi/ireclaim.c
gs/psi/isave.c
gs/psi/iscan.c
gs/psi/zcie.c
gs/psi/zcolor.c
gs/psi/zcontext.c
gs/psi/zdscpars.c
gs/psi/zfapi.c
gs/psi/zfcid0.c
gs/psi/zfile.c
gs/psi/zfjbig2.c
gs/psi/zfjpx.c
gs/psi/zicc.c
gs/psi/zpcolor.c
gs/psi/zvmem.c
pcl/pccid.c
pcl/pccid.h
pcl/pccsbase.c
pcl/pcfont.c
pcl/pcfsel.c
pcl/pcindxed.c
pcl/pcmacros.c
pcl/pcpage.c
pcl/pcparse.c
pcl/pcpatrn.c
pcl/pcsfont.c
pcl/pcsymbol.c
pcl/pctext.c
pcl/pctop.c
pcl/pgconfig.c
pcl/pgdraw.c
pcl/pginit.c
pcl/pglabel.c
pcl/pgmisc.c
pcl/pgparse.c
pcl/pgvector.c
pl/pjparse.c
pl/plchar.c
pl/plfont.c
pl/pllfont.c
pl/plmain.c
pl/plsrgb.c
pl/plsymbol.c
pl/plsymbol.h
pl/pluchar.c
pl/plulfont.c
pxl/pxffont.c
pxl/pxfont.c
pxl/pxgstate.c
pxl/pximage.c
pxl/pxink.c
pxl/pxparse.c
pxl/pxpthr.c
pxl/pxsessio.c
svg/svgshapes.c
svg/svgtop.c
xps/ghostxps.h
xps/xpsanalyze.c
xps/xpscff.c
xps/xpsdoc.c
xps/xpsglyphs.c
xps/xpsgradient.c
xps/xpsimage.c
xps/xpspage.c
xps/xpspath.c
xps/xpsresource.c
xps/xpstop.c
xps/xpsttf.c
xps/xpsxml.c
xps/xpszip.c


2012-09-18 05:06:55 -0700
Robin Watts <robin@peeves.(none)>
1fa1eca3be2955e1ed1f8433c18d06417ea85f4c

Perl script to drive apitest.

Runs over a given set of devices/set of test files. Run apitest on each
checking that output/stdout/stderr etc are the same for all threads.

gs/toolbin/apitest.pl


2012-09-09 07:58:30 -0700
Robin Watts <robin.watts@artifex.com>
4c74f2aa1128c39a2f75a6626f6a59d4f854dc94

Simple apitest program.

Requires pthreads. Build with "make apitest" within gs.

Invoke with a ghostscript like command line: e.g.

bin/apitest -sDEVICE=pdfwrite -o outfile.%d. examples/tiger.eps

The command line must have a -o in it, because it rewrites the
"outfile.%d." to be "outfile.%d.THREADNUM" where THREADNUM is 0 to 9
(change NUM_THREADS in psi/apitest.c to change this).

stdout and stderr are redirected to each stdout.THREADNUM and
stderr.THREADNUM respectively.

gs/base/ugcclib.mak
gs/base/unix-end.mak
gs/base/unixlink.mak
gs/psi/apitest.c
gs/psi/iapi.c
gs/psi/int.mak


2012-09-18 09:54:01 +0100
Ken Sharp <ken.sharp@artifex.com>
88077be834a9034282355e76bac1e76b66778483

Add a newline to the end of the file because Visual Studio won't correctly
compile it otherwise.

gs/base/gscms.h


2012-09-17 22:47:51 -0700
Marcos H. Woehrmann <marcos.woehrmann@artifex.com>
8d274958209aed769e9804d0704c199b8f5cb4af

Added 'relaxtimeout' option to clusterpush.pl (and to the documentation).

gs/toolbin/localcluster/clusterpush.pl
gs/toolbin/localcluster/clusterpush.txt


2012-08-12 04:32:52 -0700
Michael Vrhel <michael.vrhel@artifex.com>
82c3d60735ef1a7e702db6833c1c709edeaca1d4

Initial work towards adding in support for use of DeviceN ICC color profiles as the output profile.

gs/base/gdevpdfk.c
gs/base/gscms.h
gs/base/gsdparam.c
gs/base/gsequivc.c
gs/base/gsicc_manage.c
gs/base/gsicc_manage.h


2012-09-17 08:53:10 +0100
Ken Sharp <ken.sharp@artifex.com>
928e28bc3521f479eb997eddfd8cffcb7a042cea

pdfwrite - improve Outline handling when processing a subset of pages from PDF input

The Outline pdfmarks could get confused if a leaf node was elided due to its
Viwe or Dest page lying outside the range of pages processed from a PDF file.
This could lead to nesting going wrong and trying to create more than 32 levels
of nodes.

This commit moves the checking of the Dest and View pages from the PDF interpreter
into pdfwrite, which means pdfwrite now needs to pick up the FirstPage and
LastPage switches. If a destination page lies outside the processed range we
need to preserve it (so that the tree works out properly), but we don't write
the View or Dest property, so that we don't point to non-existent pages.

No differences epxected this is not cluster tested.

gs/Resource/Init/pdf_main.ps
gs/base/gdevpdfb.h
gs/base/gdevpdfm.c
gs/base/gdevpdfp.c
gs/base/gdevpdfx.h


2012-09-14 23:09:51 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
486dd619f9a705e4f9871974a5f0833964c1f32a

Bug 688288: Finish transparency structure cleanup

Finish the cleanup started by rev. 0025b68a2df. Remove implementation
of zdiscardtransparencygroup and zdiscardtransparencymask operators from
the code base and their invocation from PDF interpreter.

gs/Resource/Init/pdf_draw.ps
gs/Resource/Init/pdf_main.ps
gs/psi/ztrans.c


2012-09-14 11:11:46 +0100
Ken Sharp <ken.sharp@artifex.com>
4808e18412d21da480ed7a7628015941fc596a08

pdfwrite - track form depth when creating forms with BP pdfmark

Bug #693327

In order to properly set the co-ordinate space for patterns inside forms
we need to know the form's default co-ordinate space. To do this we keep
a record of the nested form depth. However this wasn't being updated when
we created a new form with the /BP pdfmark.

This commit fixes that.

gs/base/gdevpdfm.c


2012-09-14 09:59:22 +0100
Ken Sharp <ken.sharp@artifex.com>
dfcfd64d31e6e6c5e07dfcb793e0c781e180afd0

pdfwrite, ps2write, txtwrite - add support for RTL DL

Commit 062c0b5847519633e4349cf3a1f0830e529c4842 implements the HPGL/RTL
Download Character (DL) operation. This commit adds support for the new
font type defined as part of that update.

Text using the DL font should now be preserved as text using a type 3 font
in pdfwrite or ps2write, permitting search and copy operations, and should
be extracted properly by the txtwrite device.

No differences expected

gs/base/gdevpdtd.c
gs/base/gdevpdte.c
gs/base/gdevpdtf.c
gs/base/gdevpdti.c
gs/base/gdevpdts.c
gs/base/gdevpdtt.c
gs/base/gdevpdtw.c
gs/base/gdevtxtw.c


2012-09-12 10:34:22 -0700
Michael Vrhel <michael.vrhel@artifex.com>
0025b68a2df2f7c68cdcf4ebe0b3b9901c6a3698

Clean up of some of the transparency structures

The graphic state had vestiges of someones attempt to put the transparency
stack into the graphic state. This is confusing for those looking at the code.
This clean up is suggested in Bug 688288.

gs/base/gdevp14.c
gs/base/gdevpdfb.h
gs/base/gdevpdfg.c
gs/base/gdevpdft.c
gs/base/gdevpdfx.h
gs/base/gsistate.c
gs/base/gsstate.c
gs/base/gstparam.h
gs/base/gstrans.c
gs/base/gstrans.h
gs/base/gxdevcli.h
gs/base/gxistate.h
gs/base/gzstate.h
gs/psi/ztrans.c


2012-09-13 15:58:33 +0100
Ken Sharp <ken.sharp@artifex.com>
bfae0b91bbe273318284a01d67b746b365827bb6

ps2write - correct %%BoundingBox comment

The upper right y co-ordinate of the bounding box was being incorrectly
set. Also added the %%HiResBoundingBox comment. Although this is not a
DSC 3 standard comment it is widely used.

No diffrences expected.

gs/base/gdevpdfu.c


2012-09-13 14:53:15 +0100
Ken Sharp <ken.sharp@artifex.com>
44d00dd1bd34e2fb735d4682b73d880e208f92bd

pdfwrite - improve subset font prefix generation

We generate the prefix for a subset font by creating a hash from the
usage pattern of glyphs in a font. If the font was already subset, and
'compact' (ie glyphs are used in order from 1 to n), then it was possible
to generate the same prefix for two differetn subsets of the same font.

In fact this is always possible, but here we add a heuristic which uses
the MD5 hash we create for stream objects as an additional hash when
generating the subset prefix. This does not guarantee that name collisions
won't occur but should reduce the incidence still further.

No differences expected.

gs/base/gdevpdtb.c
gs/base/gdevpdtb.h
gs/base/gdevpdtd.c
gs/base/gdevpdtd.h
gs/base/gdevpdtf.c


2012-09-13 14:48:25 +0100
Ken Sharp <ken.sharp@artifex.com>
e8cfe956fe45fa949d22b10e2af665506e49fde4

pdfwrite - linearisation, cater for unused objects

If we had an object which wasn't used on any page then we would try to add
it to the page or shared hints, which we obviously shouldn't, and which could
potentially cause a seg fault.

With this change we simply don't add such objects to the hints.

gs/base/gdevpdf.c


2012-09-13 08:31:24 +0100
Ken Sharp <ken.sharp@artifex.com>
23d410c021a2b038ac5535e9eb028d6a808801ea

pdfwrite - squash compiler warnings

a couple of compiler warnings on debug print messages.

gs/base/gdevpdf.c


2012-09-12 16:27:04 +0100
Ken Sharp <ken.sharp@artifex.com>
8e1ab0bc7410ec278f489a2e0c469a23b7aa17e9

pdfwrite - fix ridiculous typo in last commit....

gs/base/gdevpdf.c


2012-09-12 16:17:41 +0100
Ken Sharp <ken.sharp@artifex.com>
119717599c8ab62b037f61b8f042a1eeae39b2f4

pdfwrite - linearisation fix stupid mistake causing infinte loop

gs/base/gdevpdf.c


2012-09-12 12:54:54 +0100
Ken Sharp <ken.sharp@artifex.com>
a010600d3d99b16251fbfa5fede57d4583978632

pdfwrite - fix another compiler warning

This warning didn't show up previously, I have no idea why.

gs/base/gdevpdf.c


2012-09-12 10:08:27 +0100
Ken Sharp <ken.sharp@artifex.com>
aa335a8a51261060aab8726fd300161d3b6f4334

pdfwrite - linearisation, tidy up compiler warnings

also remove an accidentally commited change which led to us writing
invalid xref tables.

gs/base/gdevpdf.c


2012-09-06 11:33:42 -0700
Michael Vrhel <michael.vrhel@artifex.com>
fc538635d876a99e7cfc32b4c525126093fea67a

Add in option of -dPreBandThreshold=true/false to specify thresholding prior to clist

When halftoning, it may be advantageous from a memory storage to halftone an image pre-clist.
This adds code to check if the halftoned image at device resolution is smaller than the source
image. It it is, then the image will by default be rendered before going into the clist.
This option is turned off through the use of the device parameter -dPreBandThreshold=false

gs/base/gscms.h
gs/base/gsdparam.c
gs/base/gsequivc.c
gs/base/gsicc_manage.c
gs/base/gxclimag.c
gs/base/lib.mak


2012-09-11 12:51:05 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
8c77c16ad0f4e2bd107f6fa1a024c412e889a0ba

Convert BitsPerComponent to an integer when we get a float.

gs/Resource/Init/pdf_draw.ps


2012-09-11 09:53:46 -0600
Henry Stiles <henry.stiles@artifex.com>
062c0b5847519633e4349cf3a1f0830e529c4842

HPGL/RTL DL (Download Character) implementation.

gs/base/gxftype.h
pcl/pgchar.c
pcl/pgfdata.c
pcl/pgfdata.h
pcl/pgfont.c
pcl/pgfont.h
pcl/pglabel.c
pcl/pgmand.h
pcl/pgstate.h


2012-09-07 13:13:30 -0600
Henry Stiles <henry.stiles@artifex.com>
423501bbe9be110622edf4ef001edbd289136ee0

A silly typo in an accessor function.

Fortunately, this function is mainly used only for debugging purposes.

pcl/pccid.c


2012-09-12 14:39:10 +0100
Ken Sharp <ken.sharp@artifex.com>
1245d1ad8e4400b6689132d32ee174041eaa60e4

pdfwrite - sanitise linearisation file accesses to be 64-bit

Change all the fteel/fseel calls to use gp_***_64 so that we don't trip
over a maximum 4Gb.

gs/base/gdevpdf.c


2012-09-10 16:14:15 -0700
Michael Vrhel <michael.vrhel@artifex.com>
5a1438b9f9d27be7e423300f563833a9d0d03ee4

Fix for an indeterminism in the fast thresholding code

A byte of nonsense data was getting included with the image data to which we were thresholding
in very special resolution cases.

gs/base/gxicolor.c
gs/base/gximono.c


2012-09-10 21:48:00 +0100
unknown <ken@.(none)>
3904374b1a567ecbad3d496fc0cdac354225224a

pdfwrite - linearisation, memory cleanup

Free all the memory used in the course of producing a linearised PDF file.

No differences expected, not tested by cluster

gs/base/gdevpdf.c


2012-09-09 18:43:52 -0400
Alex Cherepanov <alex.cherepanov@artifex.com>
3a56f4eb5a9f15795725374b297edab0fb8ebc5d

Bug 693045: Correctly restore PS stack when PDF stream run aborts.

gs/Resource/Init/pdf_draw.ps


2012-09-09 11:33:53 -0700
Tor Andersson <tor.andersson@artifex.com>
7de89cff326888d9129b0ae6e4d003fd538b8321

Merge 'gs/jbig2dec/' from jbig2dec.git using git-subtree

git-subtree-dir: gs/jbig2dec
git-subtree-mainline: faac14fb1532533a811649cef2b68cf95ec50fdf
git-subtree-split: 7a82fc0abd135e08875ec4941ba43e832bc1b7f3

gs/jbig2dec/.cvsignore
gs/jbig2dec/.gitignore


2012-08-29 16:19:55 +0100
Chris Liddell <chris.liddell@artifex.com>
7a82fc0abd135e08875ec4941ba43e832bc1b7f3

Remove dependence on jbig2dec auto-generated files

Also provide a workaround for LCMS2 on systems without sqrtf().

No cluster differences

os_types.h


2012-08-24 15:19:29 +0100
Chris Liddell <chris.liddell@artifex.com>
3a424b8fa0e30b76b49b9c2f2fe167e5dc653073

Update the libpng check to a non-deprecated API call.

configure.ac


2012-08-23 15:09:41 +0100
Robin Watts <robin.watts@artifex.com>
07abb8a54e2d910e3b5a73341b7912948e0d0b61

Bug 693298; Memento tweak for memset compile problem.

Don't define memset if someone has already #defined it. Thanks to
William Bader.

memento.c


2012-08-23 15:03:03 +0100
Robin Watts <robin.watts@artifex.com>
5e5cff776abeb065e2c4ef5092256486fc3a2d35

Revert "Move memento include from jbig2.h to jbig2_priv.h"

This reverts commit 91744cfb2fe5d8b5b66d31077b4b22c6b3c905a2.

This broke the memento build of gs due to the #defining of
free/realloc. For now, we'll have to live with the include
in the public header.

jbig2.h
jbig2_priv.h


2012-08-23 13:34:43 +0100
Robin Watts <robin.watts@artifex.com>
91744cfb2fe5d8b5b66d31077b4b22c6b3c905a2

Move memento include from jbig2.h to jbig2_priv.h

There is no need to expose memento outside of jbig2. Thanks to
zeniko for the discussion in bug 693284 that lead to this.

jbig2.h
jbig2_priv.h


2012-08-13 17:03:22 +0100
Chris Liddell <chris.liddell@artifex.com>
13cc9dc158f12c3f446579655e942e44ac158634

Update copyright headers.

config_win32.h
jbig2.c
jbig2.h
jbig2_arith.c
jbig2_arith.h
jbig2_arith_iaid.c
jbig2_arith_iaid.h
jbig2_arith_int.c
jbig2_arith_int.h
jbig2_generic.c
jbig2_generic.h
jbig2_halftone.c
jbig2_halftone.h
jbig2_huffman.c
jbig2_huffman.h
jbig2_hufftab.h
jbig2_image.c
jbig2_image.h
jbig2_image_pbm.c
jbig2_image_png.c
jbig2_metadata.c
jbig2_metadata.h
jbig2_mmr.c
jbig2_mmr.h
jbig2_page.c
jbig2_priv.h
jbig2_refinement.c
jbig2_segment.c
jbig2_symbol_dict.c
jbig2_symbol_dict.h
jbig2_text.c
jbig2_text.h
jbig2dec.c
memcmp.c
memento.c
memento.h
os_types.h
pbm2png.c


2012-08-06 17:13:39 +0200
Sebastian Rasmussen <sebras@gmail.com>
48fd721f3fb53b3fd10456e508b06d808ee9e647

Bug 693256: Free GR_/GB_stats......

....as long as retaining them is yet to be implemented

jbig2_symbol_dict.c


2012-08-06 15:24:43 +0100
Chris Liddell <chris.liddell@artifex.com>
28cc0cf46dc9455545631e54070edc2a8adc15e0

Remove files for unsupported build tools.

Jamfile
SConstruct


2012-06-08 15:51:43 +0100
Robin Watts <Robin.Watts@artifex.com>
536620333aa7b752506626dce651ede08e2cdbc9

Enable Memento to be used with jbig2dec

./configure or ./autogen.sh as usual, then
"make XCFLAGS=-DMEMENTO".

This involves duplicating memento within jbig2dec. We disable the GS
specific build hacks, and add just one more; if GSBUILD is defined
then jbig2 uses the version of memento from base, rather than the version
of memento from inside jbig2. This avoids any potential problems with
version skew.

Makefile.am
jbig2.h
memento.c
memento.h


2012-07-03 22:52:19 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
e37802e46e06e7c3d9f01d626b244771bcad76a1

Bug 693050 : Fix compiler warnings

jbig2_halftone.c


2012-07-02 22:49:17 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
1b311c624ce08c9c702ba4e88e2b0d787830334d

Bug 693050 : Fix valgrind error in 0CF9 folder

jbig2_refinement.c


2012-07-02 21:53:20 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
50d99ce72e1722427415ac745445dc1ca7e67c83

Bug 693050 : Fix error handling in 0717 folder

jbig2_halftone.c
jbig2_mmr.c


2012-06-23 23:57:19 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
576c7d4162890ecee3b7322fd5665a8ae3c2d6d7

Bug 693050 : Fix error handling in dcbd folder

jbig2_page.c


2012-06-23 23:00:47 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
7feea483a0354e13c42ffa239b9b0c2d00f08428

Bug 693050 : Fix error handling in 9557 folder

jbig2_symbol_dict.c


2012-06-23 22:14:43 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
6f9608495e1f4b1fcac518378a44e8704d943dd7

Bug 693050 : Fix memory leak in 4faa folder

jbig2_symbol_dict.c


2012-06-23 21:12:19 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
9df6dfdae0f2ffba6f1335a8a6c5e2a2274e0d84

Bug 693050 : Fix error handling in 2908 folder

jbig2_halftone.c


2012-06-22 22:25:44 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
8033c8336691c0b833cde32d47f4bbf8d7f4d4f2

Bug 693050 : Fix memory leak in 146f folder

jbig2_mmr.c
jbig2_symbol_dict.c


2012-06-22 16:56:39 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
a8ca8ed551e2897c422d0b6d46f1bd8ce30311b9

Bug 693050 : Fix minor typos and memory leak in 040d folder

jbig2_arith.c
jbig2_image.c
jbig2_symbol_dict.c
jbig2_text.c


2012-06-20 18:18:02 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
76c000e507efff47e6f625bddef0a93323a7cc9d

Bug 690723 : Prevent over writing unallocated memory when parsing an image

jbig2_mmr.c


2012-06-15 19:22:52 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
9cf138eae6a1ac6554ecc3414224fecb0ba2ec2b

Bug 693050 : Fixes CERT reported issues labelled DestAv

jbig2.c
jbig2_priv.h
jbig2_symbol_dict.c
jbig2_symbol_dict.h


2012-06-14 17:06:16 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
1c933c8c1d2beb7b6c6747c29fec58c6d6b8a02c

Bug 693050 : Fixes CERT reported issues labelled SourceAvNearNull

jbig2_image.c
jbig2_symbol_dict.c
jbig2_text.c


2012-06-06 17:16:53 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
3eff8ef1daf4de5232cb432fd685f6befdac1906

Bug 693050 : Fixes CERT reported issue labelled HeapError

jbig2.c
jbig2_image.c
jbig2_metadata.c
jbig2_priv.h
jbig2_symbol_dict.c
jbig2_text.c


2012-06-05 16:39:39 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
08bc90379a7bd5d8eead94ae872f6fc6cc93a6fb

Bug 693025 : Correct memory leaks reported by Zeniko

jbig2_symbol_dict.c


2012-05-31 17:51:51 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
017f11f142bdea0965f453d64a31ef02b3271cba

Bug 693025: Correct typos reported by Zeniko

jbig2_huffman.c
jbig2_symbol_dict.c


2012-05-30 17:42:29 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
90f453a7ea397418ed33966e6b94650efd99284f

Bug 693050 : Fixes CERT reported issue labelled DestAvNearNull

jbig2_image.c
jbig2_page.c
jbig2_symbol_dict.c
jbig2_text.c


2012-05-27 23:35:06 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
26565665591e250cfbda9bc6d8834f8a2922d206

Bug 693050 : Fixes CERT reported issue labelled BranchAvNearNull

jbig2_symbol_dict.c


2012-05-27 22:47:02 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
bb27f271e4b508d63ca4f572b733e36977f0cbc4

Bug 693050 : Fixes CERT reported issue labelled BlockMoveAv

jbig2_symbol_dict.c


2012-05-27 21:43:27 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
dbf31907db5654184b9e7bca5d700f72deccc9fa

Bug 693050 : Fixes CERT reported issue labelled SegFaultOnPc

jbig2_generic.c
jbig2_image.c


2012-05-14 18:08:00 +0100
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
4886f1c69e712a730399da308bfb1b731a652cbb

Bug 693025: Updated patch from Zeniko to fix various crashes and leaks

jbig2_halftone.c
jbig2_huffman.c
jbig2_image.c
jbig2_refinement.c
jbig2_segment.c
jbig2_symbol_dict.c
jbig2_text.c


2012-02-09 00:00:31 +0000
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
a27094d1833bf10c9ab3b612182aa23f4eb3044f

Bug 690974: This patch from Gorac implements the generic refinement region decoding procedure for when TPGRON is TRUE.

jbig2_refinement.c


2012-02-08 23:13:13 +0000
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
a43f448139d0a72688c9191adab0718b9ef43ec5

Bug 690870: This patch prevents the image compositing occurring if the src is outside of the clip region.

jbig2_image.c


2012-01-25 19:21:08 +0000
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
33e85ea71051ad64ca4bb8b874dcf8bed9b66e62

Bug 691254: This patch prevents the seg fault in Jbig2_042_14.pdf.

jbig2_symbol_dict.c
jbig2_text.c


2012-01-24 13:20:11 +0000
Robin Watts <robin.watts@artifex.com>
1d120cab65c74fe97e4e4512f6a034f0fba0cac5

Tweak jbig2dec to cope better with NULLs.

Fix various destructors in jbig2dec to cope with being called
with image = NULL. This cures a problem in mupdf where it SEGVs
when called on "1239 - skip invalid content streams.pdf" from the
sumatra test set.

jbig2_image.c


2012-01-13 10:40:50 -0700
Henry Stiles <henry.stiles@artifex.com>
b1bfe4ae823054ac2dc94af15246fa489304cf80

Bug 691230, basic jbig2 halftone image support.

Thanks to George Gottleuber for this work.

jbig2_halftone.c
jbig2_halftone.h
jbig2_mmr.c
jbig2_mmr.h
jbig2_segment.c


2012-01-10 22:24:35 +0000
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
a42adfaa785b05670af63f8767c3ff55636c6686

Bug 691267: Check all realloc error paths.

jbig2.c
jbig2_huffman.c
jbig2_page.c
jbig2_symbol_dict.c
jbig2_text.c


2011-11-29 20:33:16 +0000
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
1fddee262691d23dc283965c0dbe0e0de2c85bf9

Bug 691267: jbig2dec needs to check malloc() return values

This fix checks all return paths to ensure that the appropriate error
is returned on failure from any malloc() call within jbig2dec.

jbig2.c
jbig2_arith.c
jbig2_arith_iaid.c
jbig2_arith_int.c
jbig2_generic.c
jbig2_halftone.c
jbig2_huffman.c
jbig2_image.c
jbig2_metadata.c
jbig2_page.c
jbig2_refinement.c
jbig2_segment.c
jbig2_symbol_dict.c
jbig2_text.c


2011-11-20 10:29:47 +0000
Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
f680c2d09d76172f7adee998608a8df0b8d2828c

Fix 691958: check for an image before marking a page complete. Also update return code to handle errors correctly.

jbig2_page.c


2011-06-01 16:22:40 +0100
Robin Watts <Robin.Watts@artifex.com>
609901fe1d5496caeae2289ee20d7be965e413b0

Tweak jbig2dec os_types.h for android mupdf build.

If HAVE_STDINT_H is defined we are supposed to be getting our definitions
from stdint.h. Instead the header defines them anyway. Fix this. This showed
up when building MuPDF for Android.

os_types.h


2011-05-11 15:39:06 -0600
Henry Stiles <henry.stiles@artifex.com>
6e49f7e6d0c680ad0962cf7c620d67aa943c48a7

Fixes bug #689870 - add proper big endian number accessors.

Previously only an unsigned accessor was provided and it was being
used to read both signed and unsigned quantities.

jbig2.c
jbig2_halftone.c
jbig2_page.c
jbig2_priv.h
jbig2_segment.c
jbig2_symbol_dict.c
jbig2_text.c


2011-05-11 15:18:11 -0600
Henry Stiles <henry.stiles@artifex.com>
ae98887d657761ac4d15881da559bb9ae24f26e7

Fixes 690889, potential null dereference.

Prevent a theoretical (no test file) null dereference. There are
several of these cases identified by by static analysis. We believe
the authors intent was to pass the word stream if the arithmetic state
was not set, as in the other call of the same function.

jbig2_symbol_dict.c


2010-08-11 16:17:45 +0000
Henry Stiles <henry.stiles@artifex.com>
ea866acb21033fd3cfe345352852ea1202ce2e32

Fix bug # 691532. Do not attempt to clone an image that does not exist, each completed page should have an associated image. We'd like to handle this corrupt file with a better fix, for example the absence of an end page segement is clearly a problem with respect to the specification, but Adobe and Artifex have chosen to support other "off spec" streams so more subtle and less obvious error checking is needed. Thanks to Tim Waugh for analysis on this problem.

git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11622 a1074d23-0009-0410-80fe-cf8c14f379e6

jbig2_page.c


2010-07-30 11:03:27 +0000
Till Kamppeter <till.kamppeter@gmail.com>
ca94f2ac3ab6cdbb6a36a72cae385afb4f25d4e8

On Tru64 the integer types are in inttypes.h and not in stdint.h as in VMS

Bug 691463, required for jbig2dec.

git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11563 a1074d23-0009-0410-80fe-cf8c14f379e6

os_types.h


2010-07-20 09:46:34 +0000
masaki <masaki@a1074d23-0009-0410-80fe-cf8c14f379e6>
c29b63557cb191f2b9371a06a73a11bc4b8f5544

Add support for user defined huffman table.

This code adds support for segment type 53 segments, which supplies
inline huffman code table. Bug 689853.

Many thanks to Justin Greer.

git-svn-id: svn+ssh://svn.ghostscript.com/svn/ghostscript/trunk/gs/jbig2dec@11526 a1074d23-0009-0410-80fe-cf8c14f379e6
(cherry picked from commit e51f8e400e4502d7a6d60ee31890a195f55d1b64)

Signed-off-by: Masaki Ushizaka <masaki@ghostscript.com>

jbig2_huffman.c
jbig2_huffman.h
jbig2_segment.c
jbig2_symbol_dict.c
jbig2_text.c


2010-07-20 08:01:29 +0000
Masaki Ushizaka <masaki@ghostscript.com>
d26c7e4f39f76fe70cc61d6dc14d05a042a9be48

Fix jbig2_image_set_pixel function prototype

The declaration of jbig2_image_set_pixel was differenct between
jbig2_image.h and jbig2_image.c (int value vs bool value). And
prevented compiling it by MSVC comiler in C++ mode.
This patch fixes it. Bug #691461.

jbig2_image.h
jbig2_image_pbm.c
jbig2dec.c


2010-07-16 09:13:41 +0000
Masaki Ushizaka <masaki@ghostscript.com>
c5d61c78c0de785b74b86d4e5298e3cc7b9e2b68

A little fix to allocating memory size

jbig2_huffman.c


2010-07-15 00:49:09 +0200
Tor Andersson <tor.andersson@gmail.com>
e12fa07da845515911db8be2f7cfa8ef551061ba

Use the jbig2_new and jbig2_renew macros instead of calling
jbig2_alloc and jbig2_realloc directly. Also adds a few typecasts
and #defines required to compile the source as C++.

jbig2.c
jbig2_arith.c
jbig2_arith_iaid.c
jbig2_generic.c
jbig2_halftone.c
jbig2_huffman.c
jbig2_image.c
jbig2_metadata.c
jbig2_page.c
jbig2_priv.h
jbig2_refinement.c
jbig2_segment.c
jbig2_symbol_dict.c
jbig2_text.c
jbig2dec.c


2010-07-15 00:42:38 +0200
Tor Andersson <tor.andersson@gmail.com>
31dd7ef66dbd1c34df08365aa3c36e6391617f37

Update VERSION define in config_win32.h

config_win32.h


2010-07-15 00:41:46 +0200
Tor Andersson <tor.andersson@gmail.com>
941b73315a166fe07e0f1a1b81171477285280f7

Add Makefile.unix -- a simple makefile for unix-like systems.

Makefile.unix


2010-07-15 00:35:58 +0200
Tor Andersson <tor.andersson@gmail.com>
f6066822041bbffd7169fd4bfc19c48daae8f155

Fix memory leak of the word stream struct.

jbig2_text.c


2010-06-22 06:12:54 +0000
masaki <masaki@a1074d23-0009-0410-80fe-cf8c14f379e6>
ad707fba426702631466973e6e80c48d16398b88

Fix for bug 689836 and 691248.

Bug 689836 - Huffman tables with only positive values are decoded incorrectly
Bug 691248 - jbig2dec doesn't handle 042_11 (Huffman Symbol Region)

This patch fixes mulfunctions seen on standard huffman table K, L, M and N.
A difference will be seen on tests_private/comparefiles/Bug690360.pdf.
This file was affected by table K mulfunction and this is a improvement.

git-svn-id: http://svn.ghostscript.com/ghostscript/trunk/gs/jbig2dec/@11415 a1074d23-0009-0410-80fe-cf8c14f379e6
(cherry picked from commit d59bf48fcaefb0cb531d90cb748c173198a10f54)

Signed-off-by: Masaki Ushizaka <masaki@ghostscript.com>

jbig2_hufftab.h


2010-06-22 05:59:23 +0000
masaki <masaki@a1074d23-0009-0410-80fe-cf8c14f379e6>
606ce11fc930769a5bdf920a5902c158be8b3d5f

Added test code for every line of each standard huffman tables.

git-svn-id: http://svn.ghostscript.com/ghostscript/trunk/gs/jbig2dec/@11413 a1074d23-0009-0410-80fe-cf8c14f379e6
(cherry picked from commit aae02dab94f439a69744f4686c81d5633c8816a6)

Signed-off-by: Masaki Ushizaka <masaki@ghostscript.com>

jbig2_huffman.c


2010-05-15 06:27:41 +0000
hintak <hintak@a1074d23-0009-0410-80fe-cf8c14f379e6>
a54c8df662d4ab88afef6fcaa6c324030224d77d

try to make 'make -f base/unix-gcc.mak so' work

When not run through ./configure, HAVE_CONFIG_H isn't defined and
the jbig2 codes drop through to generic unknown unix platform - so we put some
generic unix values here.

git-svn-id: http://svn.ghostscript.com/ghostscript/trunk/gs/jbig2dec/@11254 a1074d23-0009-0410-80fe-cf8c14f379e6
(cherry picked from commit 27d16d20f97555d2874d9f04b374053ccd0731b7)

Signed-off-by: Masaki Ushizaka <masaki@ghostscript.com>

os_types.h


2010-05-14 04:18:42 +0000
hintak <hintak@a1074d23-0009-0410-80fe-cf8c14f379e6>
6ef4989dcc7b51c9e8565258aa2a8a63e43d6b35

uint8_t type located in usual header on HP-UX needed for jbig2dec ; bug 688184

git-svn-id: http://svn.ghostscript.com/ghostscript/trunk/gs/jbig2dec/@11238 a1074d23-0009-0410-80fe-cf8c14f379e6
(cherry picked from commit 15d65a1fded828b25ca20886cd3ca8bb7522a96f)

Signed-off-by: Masaki Ushizaka <masaki@ghostscript.com>

os_types.h


2010-04-21 07:20:14 +0000
masaki <masaki@a1074d23-0009-0410-80fe-cf8c14f379e6>
f51764fe4b4b31733ac1dc5c3d103106b9594c8d

A fix for a regression introduced by r11074 (bug 690094).

As I changed image number to be incremented when 'exflag' is false,
the problem of 'exrunlength' when SDHUFF == 1 was unveiled.
This fixes it.
JBIG2 images with SDHUFF == 1 should have been having trouble
between r11074 and this revision. No other difference expected.

git-svn-id: http://svn.ghostscript.com/ghostscript/trunk/gs/jbig2dec/@11093 a1074d23-0009-0410-80fe-cf8c14f379e6
(cherry picked from commit 44b9be2b31622c91b8cb3e4acc6160269630d838)

Signed-off-by: Masaki Ushizaka <masaki@ghostscript.com>

jbig2_symbol_dict.c


2010-04-15 09:53:33 +0000
masaki <masaki@a1074d23-0009-0410-80fe-cf8c14f379e6>
342ea4778d0ab98d8aabbaf62c2866afb804359d

A fix for 690094, "missing letters replaced by little vertical lines".

This problem was in jbig2dec function jbig2_decode_symbol_dict().
The image number was not incremented correctly when it built
symbol dictionary.
No difference expected, other than JBIG2 pdf files suffered by
this problem.

git-svn-id: http://svn.ghostscript.com/ghostscript/trunk/gs/jbig2dec/@11074 a1074d23-0009-0410-80fe-cf8c14f379e6
(cherry picked from commit 75a5fa486571d0a9696976c290960f1bfdc7191b)

Signed-off-by: Masaki Ushizaka <masaki@ghostscript.com>

jbig2_symbol_dict.c


2010-04-14 02:31:58 +0000
masaki <masaki@a1074d23-0009-0410-80fe-cf8c14f379e6>
eb629c8ff915730ff737ca6e4d564cc88ddafb22

Fixed jbig2dec command getopt() parameter for -v option.

Not used by ghostscript itself but worth for standalone debugging.

git-svn-id: http://svn.ghostscript.com/ghostscript/trunk/gs/jbig2dec/@11067 a1074d23-0009-0410-80fe-cf8c14f379e6
(cherry picked from commit c72d87c7d7b32f0d33d5e5b9e72aca701dd80e01)

Signed-off-by: Masaki Ushizaka <masaki@ghostscript.com>

jbig2dec.c


2010-04-14 02:26:16 +0000
masaki <masaki@a1074d23-0009-0410-80fe-cf8c14f379e6>
b1ddf3c7a00c9f216f9a0bbd1285376c1e121dec

Fixed an indent. No influence on code.

git-svn-id: http://svn.ghostscript.com/ghostscript/trunk/gs/jbig2dec/@11066 a1074d23-0009-0410-80fe-cf8c14f379e6
(cherry picked from commit a6717367dee7a863788d74522e5ace5b548d80e1)

Signed-off-by: Masaki Ushizaka <masaki@ghostscript.com>

jbig2_symbol_dict.c


2010-04-13 09:50:08 +0000
masaki <masaki@a1074d23-0009-0410-80fe-cf8c14f379e6>
f901b18ac90d291b98a1463e92f8d26c6f320c3e

A fix for 691081, 691206, and part of 690094.

From r9769, jbig2dec wasn't capable of decoding some JBIG2 files
and throwing a error "jbig2dec FATAL ERROR runlength too large in
export symbol table (XXX > XX - XX) (segment 0xXX)".
This was caused by accidentaly bound checking export symbol table
size with number of non-export symbol. This fixes it.
No differences expected, other than JBIG2 files suffered from this
problem.

git-svn-id: http://svn.ghostscript.com/ghostscript/trunk/gs/jbig2dec/@11057 a1074d23-0009-0410-80fe-cf8c14f379e6
(cherry picked from commit e2c24fec806a2a84427ecfff9a9bbd078ca460bd)

Signed-off-by: Masaki Ushizaka <masaki@ghostscript.com>

jbig2_symbol_dict.c


2010-02-02 11:09:54 -0800
Ralph Giles <giles@ghostscript.com>
58b513e3ec60feac13ea429c4aff12ea8a8de91d

Bump versioning for the 0.11 release.

The libtool shared library versioning starts with this release.

CHANGES
configure.ac
jbig2dec-0.11/CHANGES
jbig2dec.1


2010-02-02 11:03:37 -0800
Ralph Giles <giles@ghostscript.com>
fa1bd62f45b780d5c8cbadaf66a25b03688590c5

The inclusion of JBIG2 in PDF 1.4 is no longer new news.

README


2010-02-02 11:03:05 -0800
Ralph Giles <giles@ghostscript.com>
da42a22f05eb8af12a797c12bee3e5c121fe2842

Correct a whitespace formatting issue in the usage text.

jbig2dec.c


2010-02-02 11:01:42 -0800
Ralph Giles <giles@ghostscript.com>
dd0c94f5c32a01ff8b7d502071495ba475fe8f8a

Fix a manpage grammar error.

jbig2dec.1


2010-02-02 11:01:10 -0800
Ralph Giles <giles@ghostscript.com>
373b4606ef4b573e855b6be78fabd2496112da3b

Update change log for the 0.11 release.

CHANGES
jbig2dec-0.11/CHANGES


2009-11-23 16:49:06 -0800
Ralph Giles <giles@cirrus.local>
a841c2481b35b7bf1bf5970a11ac750ff3a3ee2c

Implement generic region decode with typical prediction.

Patch from Gorac. Ghostscript bugs 690791 and 690913.

jbig2_generic.c


2009-11-20 09:46:39 -0800
Ralph Giles <giles@ghostscript.com>
ad742b847dbb39b1376664d77fae0f8b31ae65f0

Skip generic regions using TPGDON and issue a warning.

We don't yet implement this, and discarding the data is better than
proceeding with the incorrect decoding proceedures, which generally
just produce noise. Ghostscript bug 690791.

jbig2_generic.c


2009-11-16 11:17:51 -0800
Ralph Giles <giles@ghostscript.com>
fd7cb7fa6152573ab11ebfbce45582fa1652f117

Correct bitmap offsets when setting transposed text.

Previously, the code was switching width and height, not just S and T
coordinates. We now properly decode the 042_19.jb2 test file.

Thanks to Drugo Pedrouvene for pointing out the issue. Bug 690923.

jbig2_text.c


2009-10-29 22:00:35 -0700
Ralph Giles <giles@ghostscript.com>
dcf0bd8c4288ff30d152b3741bc78c9fa055e49c

Make -v print only info-level messages by default.

Previously -v set the verbosity level to 9. Anything 3 or greater
prints all debug messages, which can be quite overwhelming when
individual decode elements are traced. Now the default with -v is 2.

Run jbig2dec --verbose=3 to recover the old behaviour.

jbig2dec.1
jbig2dec.c


2009-10-29 21:59:47 -0700
Ralph Giles <giles@ghostscript.com>
c1fddcf71a0cd81c02f7b52b757ea20c05f4292a

Improve grammar in the usage message.

jbig2dec.c


2009-10-29 21:49:49 -0700
Ralph Giles <giles@ghostscript.com>
cf7917e8948a9296cd6bfdb0a1615287b88b769f

Fix comment formatting.

jbig2dec.c


2009-10-29 21:19:54 -0700
Ralph Giles <giles@ghostscript.com>
7018021f8232f62ff9c6822092405dd0467abb09

Update the COPYING file to the text of the GPLv3.

The jbig2dec package is still licensed GPLv2 or later, but we want
to encourage use under the GPLv3.

COPYING


2009-10-29 16:52:50 -0700
Ralph Giles <giles@ghostscript.com>
f8e18fdeb01cdbd9530804077beed6cac38ef077

Have the scons build automatically determine the version string.

SConstruct tries to call 'git describe --tags' which produces a version
string based on the most recent tag, with the number of commits and
current commit hash appended if HEAD isn't a tagged revision.

If that command fails (i.e. building from a release tarball or another
version control system) it attempts to read the CHANGES file and uses
the first version number there.

SConstruct


2009-10-29 16:29:04 -0700
Ralph Giles <giles@ghostscript.com>
f34a521eba46e811287fb4f35519fc32f0b6d4e8

Update the version number in the scons build description.

SConstruct


2009-10-29 16:04:42 -0700
Ralph Giles <giles@ghostscript.com>
077b6518dffc75dc74fc5e6990c8529f44cb47a0

Remove the include of ~/.jamrules.

This was part of Tor's original commit, and was intended to set some
common default options among projects. However, it generates a warning
when the file is not available, and we now set thing like optimization
level and warning flags directly.

Jamfile


2009-10-29 15:59:57 -0700
Ralph Giles <giles@ghostscript.com>
bba07df1f607891f15bec1f1ace673f23d8360e2

The jam build no longer requires a config.h.

Instead it sets the needed defines itself.

Jamfile


2009-10-28 13:45:00 -0700
Ralph Giles <giles@ghostscript.com>
fe50e6202700ad508c7f91e04330a962970ead5f

Remove _parse_ from the segment decode routines.

Our use wasn't consistent here; some decoders were jbig2_foo() and
others were jbig2_parse_bar(). Prefer the shorter names and keep
_parse_ only for the header and dispatch routines which don't themselves
decode the segment bodies.

jbig2_metadata.c
jbig2_metadata.h
jbig2_page.c
jbig2_priv.h
jbig2_segment.c
jbig2_text.c


2009-10-28 12:22:40 -0700
Ralph Giles <giles@ghostscript.com>
d2849e9e31de7cb3a921f9c69a9a4ecfd06feb02

Remove an unused variable.

jbig2_halftone.c


2009-10-28 12:19:57 -0700
Ralph Giles <giles@ghostscript.com>
b108cbcfc9a2c7d10e70bd2bdc3a3a938ea3adb7

Add prototypes for the publicly referenced halftone functions.

Corrects a missing prototype warning.

jbig2_priv.h


2009-10-28 12:07:19 -0700
Ralph Giles <giles@ghostscript.com>
47bd82353ae27eb2c53e7253c39b70ef2e147ab2

Build optimized with debugging symbols and all warnings under jam.

Previously we used the default rules which are just 'cc'. This aligns
the behaviour with the other builds and lets of take advantage of jam's
cleaner output to see warnings more easily.

Jamfile


2009-07-24 16:33:01 -0700
Ralph Giles <giles@ghostscript.com>
20e5cd8ca494d3e715bcc38701cfd5923225415d

Fix a typo in a debug statement.

jbig2_image.c


2009-07-16 01:52:01 -0700
Ralph Giles <giles@ghostscript.com>
b76f84cbe3982b71357c727c208401d6645ecad3

Clone and release the page images returned to the client.

jbig2_page.c


2009-07-16 01:32:29 -0700
Ralph Giles <giles@ghostscript.com>
70a3ad1514050d5babcc18fb1bd327db1cfbfdc8

Remove a specious comment.

Originally I thought we might need to access pages in random order,
but I don't think this is necessary.

jbig2_page.c


2009-07-16 01:56:34 -0700
Ralph Giles <giles@ghostscript.com>
56d7948b4d9f3825a20f0cb6cc26a0a3b6ae34f1

Check more return codes from jbig2_image_new().

There are still a number of unchecked instances in jbig2_symbol_dict.

jbig2_generic.c
jbig2_halftone.c
jbig2_page.c
jbig2_refinement.c
jbig2_text.c


2009-07-15 22:28:42 -0700
Ralph Giles <giles@snow.ghostscript.com>
19dabb532ae37749fdb6c06447e2dfcf0e216e9b

Check for NULL before freeing metadata or symbol segment results.

This protects against segfault during early termination.

jbig2_segment.c


2009-07-15 22:28:03 -0700
Ralph Giles <giles@ghostscript.com>
2e9e3314b4264e547ce9372b4bcd2f20c50b5357

Document that jbig2_data_in() can return -1 on fatal errors.

jbig2.c


2009-07-15 22:11:21 -0700
Ralph Giles <giles@ghostscript.com>
f96255c8451e2d07406e2bd5f513f1d0aec34f29

Check the return code from jbig2_data_in().

This avoids printing multiple 'Not a JBIG2 file header' errors on
corrupt or invalid files.

jbig2dec.c


2009-06-17 13:01:40 -0700
Ralph Giles <giles@ghostscript.com>
1fde432da43cbe5bc34f3a95ee5d2f2466090e52

Add the jbig2dec manpage to the automake install and dist targets.

Makefile.am


2009-06-17 12:29:38 -0700
Ralph Giles <giles@ghostscript.com>
ff59dbf7c7302a1a55768e0cdcbcdd4661b0b77c

Manpage updates.

List the file.jbig2 and the embedded global+page stream pair
invocations separately, since they are exclusive.

Give a more complete description and elaborate on some of the options.

Use dot-macros instead of backslash commands for most of the formatting.
This isn't any less confusing because of the need to use double quotes
to enforce whitespace when alternating styles, but I still find it
more reasonable.

Fix a couple of spelling errors.

jbig2dec.1


2009-06-17 12:26:10 -0700
Ralph Giles <giles@ghostscript.com>
e11f98fa775d99a531f18f5f4bffc754a205ce8f

Add a manpage for the jbig2dec example client.

Contributed by Sebastian Rassmussen.

jbig2dec.1


2009-06-12 17:16:00 -0700
Ralph Giles <giles@ghostscript.com>
e20020b1bd4fae157236fc9716cafa17481e3171

Build a shared library with GNU libtool.

Previously we used autoconf and automake, but just build a static
library. This commit checks for libtoolize in autogen.sh and adds
support for libtool to the configure.an and Makefile.am scripts.

We use this to build both static and dynamic versions of the jbig2dec
library, including soname versioning for the later.

Based on a patch by Sebastian Rasmussen.

Makefile.am
autogen.sh
configure.ac


2009-05-29 07:25:13 -0700
Ralph Giles <giles@ghostscript.com>
5ae432288a105122d92f490d2d9cf212dae8aab4

Initialize the pattern dict data offset to zero before first use.

Warning flagged by Coverity.

jbig2_halftone.c


2009-05-28 23:20:21 -0700
Ralph Giles <giles@ghostscript.com>
37e002db7ffce8121bd060c86fd9f0609879e99b

Bump version after the 0.10 release.

CHANGES
configure.ac


2009-05-28 21:49:29 -0700
Ralph Giles <giles@ghostscript.com>
0d287050828a5878bb61e6971220d25674bae77e

Set release date and package version for the 0.10 release.

CHANGES
configure.ac


2009-05-28 21:11:06 -0700
Ralph Giles <giles@ghostscript.com>
29d7c56e2aea052d51f33820a3f68f4e4a636c08

Add some missing files to the automake build for distribution.

Makefile.am


2009-05-28 20:39:36 -0700
Ralph Giles <giles@ghostscript.com>
95e63680521ba68e3c21ca1e2bf9fee3a2c1958d

Update changes with major points since the last release.

CHANGES


2009-04-01 15:52:17 -0700
Ralph Giles <giles@ghostscript.com>
4e62b3968d0d897bb9a24ba7f75504f476e33ba6

Bounds check exported symbol run-lengths. CVE-2009-0196.

The final symbol dictionary is built from a combination of symbols
from referenced dictionaries and new symbols coded in the current
segment. Because the symbols can be composed and refined, not all
coded symbols are necessarily exported.

The list of symbols to export from those constructed by the decoding
process is coded as a series of on/off run-lengths. Previously we
accepted the value read as the run-length, even though this could
result in writing off the end of the exported symbol array. This
commit checks the read value against the number of elements remaining
in the export array and throws a fatal error if there is an overflow.

Thanks for Alin Rad Pop of Secunia Research for pointing out the issue.

jbig2_symbol_dict.c


2009-05-22 23:21:48 +0200
Ralph Giles <giles@ghostscript.com>
86e0b052dc32de4e0f9a3cbc7dbf27211a2b3182

Fix the jam build to work without config.h.

Previously, the Jamfile assumed a config.h had be created, usually by
running the configure script, but possibly also created manually. This
is extra work for those wanting a quick build. Therefore we pass some
defines on the compiler command line instead.

These are also likely to be wrong: we assume libpng is available on
all non-windows platforms. It's an incremental improvement, however,
and actual build-time configuration based on detected resources is
difficult in Jam.

Jamfile


2009-05-22 23:14:33 +0200
Ralph Giles <giles@ghostscript.com>
8e6b447d8bddabc0acd5834fa493110b1bb3e9c7

Provide fallbacks in jbig2dec.c if PACKAGE and VERSION aren't defined.

Normally, the configure script defines PACKAGE and VERSION, based on
its initializers. However, config.h is in fact optional, so we shouldn't
assume these are set. Since we use these to implement the command
'jbig2dec --version', we provide fallbacks in the source file to
simplify compiling outside the autotools build.

jbig2dec.c


2009-04-16 00:08:49 -0700
Ralph Giles <giles@ghostscript.com>
3c7c73d634dda170455d3cd7a1ef08a038e63cbb

Add a missing include in the halftone code.

jbig2_decode_pattern_dict() calls jbig2_decode_generic_mmr() but
wasn't including jbig2_mmr.h which declares that function.

Fixes a compiler warning on gcc and clang.

jbig2_halftone.c


2009-04-15 19:26:39 -0700
Ralph Giles <giles@ghostscript.com>
d1a03359b9f267714f60662dc021eef4054ae202

Check the return value of sscanf when parsing pbm dimensions.

This is a follow-on to the previous commit. It shouldn't be
possible to reach the sscanf with less than one digit in the
parse buffer, but we abort anyway in case sscanf can't find
anything. If the code could proceed from that point with an
uninitialized value in the dim array the call to jbig2_image_new()
could request excessive resources.

jbig2_image_pbm.c


2009-04-15 18:41:10 -0700
Ralph Giles <giles@ghostscript.com>
83c67854e5e0fd06045bd5e8fc53f98e1ddb9b76

Move an eof check out of a while loop where it was never called.

This section was flagged by coverity. Not because the eof check was
never executed, but because of casting away the possible EOF return
value of fgetc() inside the while condition. The isdigit() call would
still terminate the while on eof, and the worst that would happen
is that the allocated image would be smaller than intended and the
eof would be caught after trying to read the data, so this was not
a serious issue.

This commit removes the meaningless eof check inside the digit-copying
while loop and adds a specific check before. It also avoids copying the
first non-digit character to the parse buffer, which should resolve the
coverity warning.

jbig2_image_pbm.c


2009-04-01 17:40:01 -0700
Ralph Giles <giles@ghostscript.com>
9b525fc5d325e559dae1f9fb7d3956b8407df3d5

Ask git to ignore normal build products.

.gitignore


2009-04-01 17:38:47 -0700
Ralph Giles <giles@ghostscript.com>
da580ddc6398b1818fc20036b79a89a7856b0296

Correct a typo in a debug message.

jbig2_image.c


2009-04-01 17:38:19 -0700
Ralph Giles <giles@ghostscript.com>
c0c36828c7ded70a82bb65affd3cf10ef7ddc5ea

Remove a debug printout.

This was added in f1d00697, but isn't necessary beyond the initial
testing prior to that commit.

jbig2_huffman.c


2009-03-31 21:35:17 -0700
Ralph Giles <giles@ghostscript.com>
76b6b9ec30859f32293286b3837f17a8252d010c

Close the output pbm file after writing to it.

Resource leak reported by Coverity.

jbig2_image_pbm.c


2009-03-31 21:32:38 -0700
Ralph Giles <giles@ghostscript.com>
ceb71749c865a4a4cd4c5a6ed0b052dff533a76c

Rename a local variable to avoid shadowing a function argument.

The code was correct, but confusing. Resolves a Coverity warning.

jbig2_text.c


2009-03-31 21:29:09 -0700
Ralph Giles <giles@ghostscript.com>
fdefccb83e29b399d3c3935ed2ada533fb57bdd0

Remove unnecessary header includes.

jbig2.c


2009-03-31 21:24:16 -0700
Ralph Giles <giles@ghostscript.com>
261eb20b93e2fa36f34748be10232160955719cd

Remove an unnecessary header include.

jbig2_refinement.c


2009-03-30 18:35:21 -0700
Ralph Giles <giles@ghostscript.com>
f1d00697525dd2d7a5f63f96e01ad0d99e673b13

Restore the proper size of the huffman symbol length histogram.

The previous size as 256 KB, but LENCOUNT's highest index is PREFLEN
(or LENMAX - 1, but LENMAX is the largest value of PREFLEN) and that
comes from a byte member of a Jbig2HuffmanEntry. Therefore 256 members
are all that is necessary, or 1 KB on most machines.

This was changed in commit a0531af8 (jbig2dec svn c430) apparently in
the mistaken belief that it needed to scale with the size of the table
itself. In that revision the previous stack allocation of 256 elements
was replaced with the 1k, which later became 64k, generally overflowing
the stack. While 256 elements is a reasonable stack allocation, it's
safer to continue using the heap.

jbig2_huffman.c


2009-03-30 18:17:55 -0700
Ralph Giles <giles@ghostscript.com>
63e0436a711c59f7fae6cfd721b90428ae19a7b3

Dynamically allocate and initialize the huffman symbol length histogram.

Previously we allocated it on the stack, but it's quite large (256K)
and we were assuming it was initialized to zero. Issue flagged by
Coverity.

jbig2_huffman.c


2009-03-30 18:00:39 -0700
Ralph Giles <giles@ghostscript.com>
45f462f813cfef6be8f6755ebe02e8744222b3b1

Initialize Jbig2TextRegionParams.sbrat even when it is not used.

This avoids valgrind warnings in a later debug message which
unconditionally prints them out. After a patch by Alex Cherepanov,
ghostscript svn commit 9578.

jbig2_text.c


2009-03-30 17:45:50 -0700
Ralph Giles <giles@ghostscript.com>
e2e186837bedf8211405c14b75c54849241193cd

Only define vnsprintf on MSVC versions prior to 9.

Visual Studio 2008 defines vnsprintf() in its stdio.h and our mapping
from _vnsprintf() conflicts. After a patch by Michael Vrhel, ghostscript
svn commits 8734 and 8735.

config_win32.h


2009-02-27 00:09:03 -0800
Ralph Giles <giles@ghostscript.com>
aaed7c2e751f82d585f9b4d94601b48bfd196b6f

Protect refinement debug image dumps from the normal debug build.

jbig2_refinement.c


2009-02-26 23:53:08 -0800
Ralph Giles <giles@ghostscript.com>
5f76927a09fc65adff87042eb0667ded96fef537

Add the (unfinished) halftone source to the Jam build.

Jamfile


2009-02-26 23:46:59 -0800
Ralph Giles <giles@ghostscript.com>
4d45e847d00a560fcd9a4ae917cda83a6dbf1686

Update the contact address in the file headers.

config_win32.h
jbig2.c
jbig2.h
jbig2_arith.c
jbig2_arith.h
jbig2_arith_iaid.c
jbig2_arith_iaid.h
jbig2_arith_int.c
jbig2_arith_int.h
jbig2_generic.c
jbig2_generic.h
jbig2_halftone.c
jbig2_huffman.c
jbig2_huffman.h
jbig2_hufftab.h
jbig2_image.c
jbig2_image.h
jbig2_image_pbm.c
jbig2_image_png.c
jbig2_metadata.c
jbig2_metadata.h
jbig2_mmr.c
jbig2_mmr.h
jbig2_page.c
jbig2_priv.h
jbig2_refinement.c
jbig2_segment.c
jbig2_symbol_dict.c
jbig2_symbol_dict.h
jbig2_text.c
jbig2_text.h
jbig2dec.c
memcmp.c
os_types.h
pbm2png.c


2009-02-26 18:02:37 -0800
Ralph Giles <giles@ghostscript.com>
4d57cb4f565736e5a8473876dcd56464cd3aba70

Regularize the headers and clean up some additional whitespace.

jbig2.c
jbig2_generic.c
jbig2_mmr.c
jbig2_priv.h
jbig2_symbol_dict.c
jbig2_symbol_dict.h


2009-02-24 18:29:48 -0800
Ralph Giles <giles@ghostscript.com>
75de8111f83acd49a2eb75bed348cb4fac9f1e97

Remove trailing whitespace.

autogen.sh
jbig2.h
jbig2_arith.h
jbig2_arith_iaid.h
jbig2_arith_int.h
jbig2_generic.c
jbig2_generic.h
jbig2_huffman.h
jbig2_image.h
jbig2_image_pbm.c
jbig2_image_png.c
jbig2_metadata.h
jbig2_mmr.h
jbig2_symbol_dict.c
jbig2_symbol_dict.h
jbig2_text.c
jbig2_text.h
memcmp.c


2009-02-24 17:13:38 -0800
Ralph Giles <giles@rain.(none)>
4db6758c0acf306c07cea834e22414d2db42b56a

Remove Id and other svn keyword substitution lines.

These were sometimes helpful in backtracking from isolated source
copies to a specific revision in a centralized version control
system, but git has poor support for such things. They are also
much less necessary now that public source repositories are a
more common part of development workflows.

Jamfile
Makefile.am
autogen.sh
config_win32.h
configure.ac
jbig2.c
jbig2.h
jbig2_arith.c
jbig2_arith.h
jbig2_arith_iaid.c
jbig2_arith_iaid.h
jbig2_arith_int.c
jbig2_arith_int.h
jbig2_generic.c
jbig2_generic.h
jbig2_halftone.c
jbig2_huffman.c
jbig2_huffman.h
jbig2_hufftab.h
jbig2_image.c
jbig2_image.h
jbig2_image_pbm.c
jbig2_image_png.c
jbig2_metadata.c
jbig2_metadata.h
jbig2_mmr.c
jbig2_mmr.h
jbig2_page.c
jbig2_priv.h
jbig2_refinement.c
jbig2_segment.c
jbig2_symbol_dict.c
jbig2_symbol_dict.h
jbig2_text.c
jbig2_text.h
jbig2dec.c
memcmp.c
os_types.h
pbm2png.c
test_jbig2dec.py


2008-05-26 18:52:22 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
d5db893a4dfe988b1ecea14595f3c7605ee166ea

Work around broken streams created by Xerox WorkCentre products, where
the final segment length is written as -1. Ghostscript bug 689841.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@468 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_page.c


2008-05-17 00:08:26 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
2dea640032a72f9756cdccd54352c10b18348f56

More whitespace cleanup.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@467 ded80894-8fb9-0310-811b-c03f3676ab4d

config_win32.h
jbig2_arith_iaid.c
jbig2_halftone.c
jbig2_huffman.c
jbig2_hufftab.h
jbig2_metadata.c
jbig2_priv.h
jbig2dec.c
os_types.h
pbm2png.c
sha1.c


2008-05-16 23:58:59 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
f125f9553a1e3c8088cf59df7c983aef3785641a

Only check for a code length antecedent under RUNCODE32. RUNCODE33 and
RUNCODE34 specify a repeat of zero so a previous code length isn't
necessary.

Thanks to Justin Greer for catching this. Ghostscript bug 689835.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@466 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_text.c


2008-05-16 23:48:20 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
c744e7207254f6719eb011a3a0b4984fdfa369dd

Clean up trailing whitespace.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@465 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2.c
jbig2_arith.c
jbig2_arith_int.c
jbig2_generic.c
jbig2_image.c
jbig2_mmr.c
jbig2_page.c
jbig2_refinement.c
jbig2_segment.c
jbig2_symbol_dict.c
jbig2_text.c


2008-05-09 13:54:32 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
e4e8acebad09764a3be793082de99bd1679ef0c0

Runcodes 33 and 34 repeat a zero code length symbol id, not the previous
symbol like runcode 32.

Thanks to Justin Greer for the fix. Ghostscript bug 689824.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@464 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_text.c


2008-05-09 13:41:01 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
46555913d6ed4b5479b50f45564ed94c478af863

Support for aggregate symbol coding, patch from Ghostscript trunk.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@463 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_refinement.c
jbig2_symbol_dict.c
jbig2_text.c
jbig2_text.h


2008-05-09 13:38:29 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
e3092e1ff329e834e0e131ada149c692cff01688

Windows build fixes. Patch from Ghostscript trunk.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@462 ded80894-8fb9-0310-811b-c03f3676ab4d

config_win32.h
msvc.mak
os_types.h


2008-05-07 21:37:02 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
381e60a9cbb6b42136e67e4dd48e67cb438b5a2d

Update copyright headers. Ownership has been transferred
to Artifex.




git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@461 ded80894-8fb9-0310-811b-c03f3676ab4d

config_win32.h
jbig2.c
jbig2.h
jbig2_arith.c
jbig2_arith.h
jbig2_arith_iaid.c
jbig2_arith_iaid.h
jbig2_arith_int.c
jbig2_arith_int.h
jbig2_generic.c
jbig2_generic.h
jbig2_halftone.c
jbig2_huffman.c
jbig2_huffman.h
jbig2_hufftab.h
jbig2_image.c
jbig2_image.h
jbig2_image_pbm.c
jbig2_image_png.c
jbig2_metadata.c
jbig2_metadata.h
jbig2_mmr.c
jbig2_mmr.h
jbig2_page.c
jbig2_priv.h
jbig2_refinement.c
jbig2_segment.c
jbig2_symbol_dict.c
jbig2_symbol_dict.h
jbig2_text.c
jbig2_text.h
jbig2dec.c
memcmp.c
os_types.h
pbm2png.c


2008-05-07 21:30:33 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
86131c28d05eb84cbd8878c2fc6d3a6282b79cbc

Set eol-style on the source files.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@460 ded80894-8fb9-0310-811b-c03f3676ab4d

config_win32.h
jbig2_arith_iaid.c
jbig2_arith_iaid.h
jbig2_arith_int.c
jbig2_arith_int.h
jbig2_image_png.c
jbig2_metadata.h
jbig2_mmr.h
pbm2png.c


2007-11-09 01:13:21 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
4446e2678f3bd9faa211a5d5bd50ac8f8c461a42

Change the license from GPLv2 to GPLv2 or later.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@459 ded80894-8fb9-0310-811b-c03f3676ab4d

LICENSE


2007-10-25 22:20:54 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
416c12b80383fe829edf8e986a0d5c860f8fabe6

Set appropriate ignores.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@458 ded80894-8fb9-0310-811b-c03f3676ab4d


2007-10-25 22:13:42 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
e2a295a921ad73b46c69bc33c67d8717b94d9b4e

Remove some gcc warnings.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@457 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_generic.c
jbig2_image.h
jbig2_page.c
jbig2_refinement.c
jbig2_symbol_dict.c
jbig2_text.c


2007-10-25 22:13:23 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
639e20afb817afd493b3802643f3dcf363962fce

Update autogen.sh to detect automake 1.10 and later.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@456 ded80894-8fb9-0310-811b-c03f3676ab4d

autogen.sh


2007-10-25 21:57:25 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
6f92ef3754dff5fdf82a809662476c330b25e20c

Add AM_PROG_CC_C_O as requested by automake 1.10.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@455 ded80894-8fb9-0310-811b-c03f3676ab4d

configure.ac


2007-02-06 08:10:58 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
ad85e74393cfb2667ea1f15756502ea2bc3cf3d9

Add a new header for declaring the public text region functions.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@454 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_text.h


2007-02-05 23:42:18 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
41b78a49bf9e00d0d78532581b7e72836935f3d5

Export jbig2_decode_text_region() for use in aggregate symbol encoding
and stub out the setup for the call. Work in progress implementing
support for this function.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@453 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_refinement.c
jbig2_symbol_dict.c
jbig2_text.c


2007-02-05 22:59:10 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
4cec0516180e0a8a79e88de5fbb12a28b3f64439

Rewrite the test script to use a custom test class.

Previously we used the python unittest module, but we don't use most of
its features, and it's quite weak for this kind of file-based external
testing. So we lose on using a familiar api, but this doesn't add much
code, and we can now add long-desired features like 'xfail' results.

This grew out of work revising the Ghostscript test code for
parallelization.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@452 ded80894-8fb9-0310-811b-c03f3676ab4d

test_jbig2dec.py


2006-07-27 00:54:08 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
94071092c25507e1dd00451f89c0e82d45f65503

Bump version number, post release.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@449 ded80894-8fb9-0310-811b-c03f3676ab4d

CHANGES
configure.ac


2006-07-26 23:57:39 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
9c04190c5824e209be28d5079787c3f05b5c1b3e

Update version info for the 0.9 release.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@447 ded80894-8fb9-0310-811b-c03f3676ab4d

CHANGES
configure.ac


2006-05-15 21:16:42 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
3421407ecff3d48427a0a848f58a0d1affe2c44b

Correct a typo resulting in inproper glyph placement with transposed text and a top left reference corner. Fixes bug 688645.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@446 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_text.c


2006-02-17 20:25:07 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
34abc7a906ef9716d01ec93d74036a0be53a742c

Update my email address; artofcode.com no longer works.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@445 ded80894-8fb9-0310-811b-c03f3676ab4d

sha1.c


2005-12-18 18:12:33 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
3753ca9c4e9543d34f6e20c5c55eef15fc6afcf8

Correct an invalid return value. Thanks to Leonardo for pointing this
out.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@444 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_text.c


2005-12-06 01:50:08 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
d94bdb63779c6d3bfa43197c791912cb954ae109

Update changelog.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@443 ded80894-8fb9-0310-811b-c03f3676ab4d

CHANGES


2005-12-06 01:47:35 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
a9d42d067a6cd01c9f1fd73b00ff9c69c6ba85c6

The SBDSOFFSET field is a *signed* 5 bit integer, so we need to sign
extend when reading the field to get the proper value. We now correctly
handle the 042_20.jb2 test stream.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@442 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_text.c


2005-12-05 23:39:55 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
994516f6db541df5f57d3de4851313af6a260f68

Add -DJBIG2_DEBUG to the default scons build.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@441 ded80894-8fb9-0310-811b-c03f3676ab4d

SConstruct


2005-12-03 07:26:21 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
49d3aed4dd6a1adc1ab03702cf324103febae1e6

Fix data for Huffman table B.12.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@440 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_hufftab.h


2005-12-03 03:35:00 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
49519f4cfa5ca7d4f06ab11261e86a0d5aa55c64

Correct an operator precedence bug that was corrupting reading of uncompressed
collective bitmaps. Also improve debugging messages.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@439 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2005-12-01 23:56:54 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
0d020e4fcfa9039853e76f0456e65805cff3d19d

Promote artimetic debug printout code to JBIG2_DECODE_ARITH from
plain JBIG2_DEBUG to cut down on noise.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@438 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_arith.c


2005-12-01 21:52:38 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
391a059aad7b801f004b01e17663a4024294d6ef

Handle immediate lossless generic regions the same as immediate generic
regions. Fixes bug 688397.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@437 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_segment.c


2005-09-01 04:13:36 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
b78900486172244c39187e89a085b12f2b6abdb1

Some minor corrections and bug fixes.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@436 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c
jbig2_text.c


2005-08-31 16:41:42 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
6a99885954277048b0d73840941dc47ede4c103a

Make a Jbig2WordStream return zeros past the end of the defined
buffer, as can happen when the huffman decoder tries to fill
its 'next_word' lookahead near the end of a segment.

Previously, we just relied on there being some data we could
read (and then ignore) which usually worked, but caused a
segfault with the 688080.pdf test file due to chance read
buffer alignment.



git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@435 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2.c


2005-08-30 02:05:05 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
8acccc58c83123286b0954053a7dd899de5a0630

Fix some small bugs and add additional error checking to the
huffman decoding support.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@434 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_huffman.c
jbig2_text.c


2005-08-28 00:10:20 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
e2ff5e373bd8ecda6db43c6b6414c8a3f3248297

Comment clean-up.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@433 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_huffman.c
jbig2_text.c


2005-08-25 08:14:21 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
d23b5e5b4d8fabdf51d202094ac4259d59dcc974

Work-in-progress commit of huffman text region support. Fix a number
of bugs in jbig2_huffman_get_bits() and implement symbol id huffman
table decode (a custom table is always included inline in the text
region segment header.)

However, the constructed table gives an out-of-bounds symbol id on
the first read with the UBC test file.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@432 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_huffman.c
jbig2_text.c


2005-08-23 06:09:55 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
d2d97abc0be98770dc506620f5f8921900e55e5e

Work-in-progress commit of huffman text region support. Initial implemetation of symbol id huffman
table decode.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@431 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_text.c


2005-08-17 20:03:18 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
a0531af83d6d29abe2fccb488fa7b741d68cb3fd

Hack around the lack of subtree support in jbig2_huffman_table_build()
by allocating a bigger flat table. This should be fixed the correct
way at some point, but lets us proceed with huffman text region
decoding implementation in the meantime.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@430 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_huffman.c


2005-08-16 23:57:25 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
5bbd972edf6b6441248d4201cd61767fa521cc97

Work-in-progress commit. Partial implementation of Huffman text region
support.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@429 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_text.c


2005-08-16 21:41:38 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
d22a2ed8db5f8d99345b08762cabebcbc5873d64

Copy out the collective bitmap symbols for huffman symbol dictionaries.

Also, some additional debug print pruning.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@428 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2005-08-16 21:16:22 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
3c04507a4138266c8266cc01886ca70ae8a9fa93

Implement reading an uncompressed collective symbol bitmap.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@427 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2005-08-16 20:38:03 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
338f0fbd294ee0dc9cbfabd7a15cce0ac657a708

Remove huffman debugging printouts. Preserve the state dump functions
for future use, but #ifdef protect them.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@426 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_huffman.c
jbig2_huffman.h
jbig2_symbol_dict.c


2005-08-16 20:20:08 +0000
ray <ray@ded80894-8fb9-0310-811b-c03f3676ab4d>
df910b6ffff7ae54db6c2d2430709ebb911eda49

Fix for shift right 32 bits of unsigned int being treated as shift right 0.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@425 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_huffman.c


2005-08-04 07:05:05 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
720e508d03bae14bf0e412abb37ad08ecde72e46

Work-in-progress commit of halftone dictionary implementation. This
is enabled in the scons build, but not the standard one.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@423 ded80894-8fb9-0310-811b-c03f3676ab4d

SConstruct
jbig2_halftone.c
jbig2_segment.c


2005-08-04 07:03:05 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
3fb9f08036565d4bd4147283e2e685217b6e4b55

bstract the GB_stats size calculation into a function.
Also some comment cleanup.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@422 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_arith.h
jbig2_generic.c
jbig2_generic.h
jbig2_text.c


2005-07-28 00:59:59 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
45a5c57347f7b7569808933207bb03c8edf30315

Warning cleanup. Implement an unoptimized version of the REPLACE image
composition operator.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@421 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_image.c


2005-07-27 23:55:54 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
9d9c7e26944b07cda1c81242b66aea7bbdfc1150

Some code cleanup. Remember the external combination op for region
segments and use it. Also add the missing REPLACE operator to the
enum (but not yet implemented in the compositor). Only some routines
can use this one. Also add some missing prototypes.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@420 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_priv.h
jbig2_refinement.c
jbig2_segment.c
jbig2_text.c


2005-07-27 23:49:03 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
dcb83f94c6dc0280a8edeb4dc303fc1451bcd881

Fix an off-by-one in reading the SBDEFPIXEL and SBCOMBOP fields of
the text region segment flags, which caused us to clear the region
background to the wrong value. Bug 688244.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@419 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_text.c


2005-07-27 17:29:03 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
4a8c95e32a1a05dbf5587ff2262ea225f2dd6c2b

Commit an off-by-one fix from Alex Cherepanov related to bug 688244.

Also #ifdef protect a debug image dump that was preventing compilation
in Ghostscript.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@418 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2005-07-27 08:29:56 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
0d128dbed01e775befd59050c415b5aa7f21562d

Work in progress commit of huffman support. This version is still buggy and
includes some serious debug spew.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@417 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_huffman.c
jbig2_symbol_dict.c


2005-07-13 16:51:13 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
4cc11bea50d585804e93b985e7d7e8504990911b

Work-in-progress check in of huffman symbol dictionary support.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@416 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_huffman.c
jbig2_huffman.h
jbig2_symbol_dict.c


2005-07-13 16:28:44 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
1b6a01e666d0dbcd355c0b84fba43c1d02fb4b37

Move a repeated calculation out of a loop.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@415 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_image.c


2005-06-20 11:09:19 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
46ff1e6277a432b9e1d18784ab5c30fc40b45476

Minor cleanup of unimplemented huffman sections.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@414 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2005-06-19 14:16:14 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
1eb7ae738d7af4508d7cbc547c0e386d55821820

Properly initialize the decode result field of the segment header struct
to NULL to avoid problems on free. Bug 688053.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@413 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_segment.c


2005-06-15 14:09:35 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
84de63772c46a85128b6ada79cd2203918c7dec2

Fail on fatal symbol dict decoding errors.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@412 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2005-06-08 14:23:43 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
e5bdc75cc8afaf2630953f1784381cc6c9305e36

Add support for striped page decode. We still return a full
page buffer, so there is no savings in memory footprint.

We now decode 042_9.jb2 from the UBC test streams.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@411 ded80894-8fb9-0310-811b-c03f3676ab4d

CHANGES
jbig2.h
jbig2_generic.c
jbig2_image.c
jbig2_page.c
jbig2_priv.h
jbig2_refinement.c
jbig2_segment.c


2005-06-08 14:23:23 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
d954b0f143afbf16da24b2ea0a54d88b39af4129

Work in progress commit to support huffman text regions. Parse
and intantiate the huffman tables for text region decoding.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@410 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_text.c


2005-06-08 14:20:45 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
b28d531ea50bf15cc80cb068192b47b57a8916ce

Implement remaining standard huffman tables.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@409 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_huffman.h
jbig2_hufftab.h


2005-06-08 14:19:35 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
2ff386d420a62438df630a8b0ba3a022469cd3f8

Turn on -Wall when compiling with gcc.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@408 ded80894-8fb9-0310-811b-c03f3676ab4d

configure.ac


2005-05-24 03:49:47 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
0a9dae0a3c665ce5c758f1575e0c8f08075aaf3c

Update the arith and huffman tests to run with the new code. We now
compile with -DTEST and link to the rest of the library since that's
required to access the allocator. In theory, that means we have duplicate
symbols, but GNU ld seems to cope. If it's a problem the test programs can
be split into separate source files.

Note that the arith test doesn't actually verify its results; it just
prints the results when compiled with -DJBIG2_DEBUG.



git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@407 ded80894-8fb9-0310-811b-c03f3676ab4d

Makefile.am
jbig2_arith.c
jbig2_huffman.c
jbig2_symbol_dict.c


2005-05-18 00:42:24 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
d78f4fbaac91f43bd14ac7d54c60e8edb0fa5bfe

Attempt to hook the self tests into the scons build. This is supposed
to work with the development version, but does not.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@406 ded80894-8fb9-0310-811b-c03f3676ab4d

SConstruct


2005-05-11 07:14:25 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
cc3a563ea709064bf47147bd817a962e368a5c2a

Export the pre-defined huffman tables for external use.

Read the huffman fields of the symbol dictionary header and allocate
appropriate tables and decoder context. This is a prerequisite for
handling huffman-coded symbol dicts.i

Part of the fix for bug 688009.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@405 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_huffman.c
jbig2_huffman.h
jbig2_hufftab.h
jbig2_symbol_dict.c


2005-05-03 02:27:12 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
34b95add346fa8b27064e007da4e86eadc466bbd

Allocate a huffman decoder for symbol dictionaries that require it.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@404 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2005-05-03 02:25:08 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
67a0de3abce1a5ea08260cf937754ecfadbe7b41

Update the huffman decoder interface.
Move hufftab.h with the static table definitions to only be included once
from huffman.c.
Use the client-replaceable jbig2_alloc() instead of bare malloc().
Add a 'free' call for the huffman state. This just calls jbig2_free().


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@403 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_huffman.c
jbig2_huffman.h
jbig2_hufftab.h


2005-05-03 01:10:27 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
1e2d6eade5dd4755e15db66e539256aa407b6d08

Re enable the huffman and arithmetic coder unit tests.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@402 ded80894-8fb9-0310-811b-c03f3676ab4d

Makefile.am


2005-05-02 20:49:28 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
7fa4382f2f5cac1f1471617a23c9d1affa994e18

Alter our portability fallback implementation of memcmp() to properly return
negative values is the first argument is "less than" the second. The previous
one was fine for our purposes, but could cause problems if it was accidentally
used by client applications.

Thanks to Ray Johnston for pointing this out.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@401 ded80894-8fb9-0310-811b-c03f3676ab4d

memcmp.c


2005-04-28 04:44:30 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
65885f2808d815a4ce41d4712c19dc1dac61b6ab

Add the changelog to the distribution.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@400 ded80894-8fb9-0310-811b-c03f3676ab4d

Makefile.am


2005-04-28 04:37:42 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
40379d7c353d1326615e08e64684fdc4065544ec

Add experimental scons build file.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@399 ded80894-8fb9-0310-811b-c03f3676ab4d

SConstruct


2005-04-28 04:36:32 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
0c358eca216ac6fb627a0d920c7fb9eb3f53d014

Fix implicit cast warnings from MSVC. Bug 687988.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@398 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2005-04-28 04:35:55 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
26c310efdb8e8a914c36ffe7a4944448144adeef

Bump the version number for new development work.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@397 ded80894-8fb9-0310-811b-c03f3676ab4d

CHANGES
configure.ac


2005-04-28 04:31:34 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
b67e1875a83632bc7e43e44d0a98ccc64c030b94

Update version and changelog for the 0.8 release.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@395 ded80894-8fb9-0310-811b-c03f3676ab4d

CHANGES
configure.ac


2005-04-06 18:14:30 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
c49714a02996d398353fe76f51ef084dcaa99602

Add an explicit cast to quiet a warning on MSVC. Bug 687988.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@393 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2005-04-06 00:29:36 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
2561fd5c9ed06af167a245e2a09732a68655c8fb

Add a cast to in checking a range against an unsigned value.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@392 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2005-04-05 23:40:12 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
cf7b160a37331362d7bcff571e13e57d20193377

Minor comment cleanup.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@391 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_image_pbm.c


2005-04-05 23:39:53 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
c5393dfc4025b41895565f5b2a2f1786bffdf980

dd a missing break; in the segment release dispatch. Release of symbol
dictionary segments was falling through and causing a double free of
the result. Bug 688004.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@390 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_segment.c


2005-01-19 19:31:33 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
c04c341b8cfbd2ee7b58269147a41bf6c24d7b7e

#ifdef out the cygwin stdint-from-sys/types fixup. Newer cygwin seems to provide
them all, but still not define stdint.h. Bug 687873.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@389 ded80894-8fb9-0310-811b-c03f3676ab4d

os_types.h


2005-01-04 07:05:39 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
fdc9d09b305474bffc749d23b51e025bba7fa567

Correct some memory leaks in text region decoding: properly free arith
and word stream state, and release refined glyph images after
compositing.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@388 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_text.c


2005-01-04 07:04:17 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
3cf2d67fafefb607c8d436f2185d092457274cdb

Correctly free the (dynamic) glyph array when freeing a symbol
dictionary.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@387 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2005-01-04 05:17:39 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
ad0de34366fd42c8f95d519dccb91115c4278580

Also correctly free the integer arith coding contexts in symbol
dictionary decode.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@386 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2005-01-04 05:07:45 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
bff29a59cb009b2cb0b397c137e8576e9f3acb0b

Properly free the arith and word stream states in symbol dictionary decoding.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@385 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2005-01-04 04:53:16 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
81b746740b074f5a0a8b539bc4954dad5c5797be

Properly free some segment results when the segment header structures
are freed. Symbol dictionaries are released, intermediate segment images
are released if they haven't already been released and nulled after
their use in the decode process, and metadata structures are properly
freed.

Resolves all known leaks with the first 7 ubc test streams.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@384 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2.c
jbig2_refinement.c
jbig2_segment.c


2005-01-04 04:41:56 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
304420e16947853c697c9f50eb9e7c3cdd64f80c

Properly free tag and value strings from inside the metadata struct. We
now assume we own those pointers, which is fine if jbig2_metadata_add()
is used to construct them.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@383 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_metadata.c


2005-01-04 04:40:18 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
e641718f01a0a45ec8cfc89602daa345bb9383f8

Minor cleanup: remove an unnecessary check before releasing an immediate
text region after decode and composite, and simply reference to the page
image itself.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@382 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_text.c


2005-01-04 00:53:10 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
e3a50c85fa43ebff2b3164e05cf3988c326cfb27

Properly free arithmetic coding and word stream states after region
decode. Also use the allocator defined in the library context instead
of raw malloc for the arith state.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@381 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_arith.c
jbig2_generic.c
jbig2_refinement.c


2005-01-04 00:34:16 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
de271483ae5bf0ee87b73b44d9d433d4ca6a920a

Properly free the decoded page image array on context free.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@380 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2.c


2005-01-04 00:32:36 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
f72323e48008adb89a21bf01770a9583f456ff36

Simplify the ubc teststream hashes.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@379 ded80894-8fb9-0310-811b-c03f3676ab4d

test_jbig2dec.py


2004-12-23 12:53:49 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
eb7f46063eb1b3e220c13839ef622c29bcf5834f

Properly mask the last row byte in the shift == 0 compositor
case. Fixes bug 687843.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@374 ded80894-8fb9-0310-811b-c03f3676ab4d

CHANGES
jbig2_image.c


2004-12-23 12:07:53 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
99672eb6ce4dad97c3ff22f9768b0073f730331e

update changelog.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@373 ded80894-8fb9-0310-811b-c03f3676ab4d

CHANGES


2004-12-23 11:54:43 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
6f0b0d1802ad565e908adac9601e650bdfb8af94

Implement a slow general fallback for image compositing. This adds
support for non-OR composition operators.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@372 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_image.c


2004-12-22 09:34:29 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
7d9a6439364da7ea94311d69f877ae37485fd1f7

Clarify variable references to better match the spec.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@371 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_text.c


2004-12-22 01:36:38 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
b62aa9dd9154eba7122c56cab886207dce972cb1

Trivial whitespace fix.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@370 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_page.c


2004-12-21 22:59:04 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
afe3a66d19d98cf0017f4c7b433ae65b2286e259

replace individual memset calls for clearing images with a new
jbig2_image_clear() utility function.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@369 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2.h
jbig2_image.c
jbig2_page.c
jbig2_text.c


2004-12-21 01:05:59 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
d264e8daa8c30ea3d4d43e287bcc97462f244e9e

Initialize the initial text region segment bitmap to zero.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@368 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_text.c


2004-12-21 00:35:02 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
50493055b3f099f6670df3ab2011af8085ba49c5

Re-assign the return value of jbig2_realloc() when growning the page
size array. Previously it was dropped which could cause crashes on some
systems processing documents with more than 4 pages. Thanks to Jan
Patera for reporting this.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@367 ded80894-8fb9-0310-811b-c03f3676ab4d

CHANGES
jbig2_page.c


2004-12-13 20:00:09 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
28e7ac27b12c59c271eacca8eb70dc97fe991c5b

Fix and error return. The normal 'return jbig2_error(ctx, JBIG2_SEVERITY_FATAL,...)'
idiom doesn't work when the function returns a pointer instead of an error code.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@366 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2004-12-08 22:49:47 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
a065bcb4b13998d875073212087b2a84aa132cc7

Bump version number post-release, and correct a CHANGES typo.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@365 ded80894-8fb9-0310-811b-c03f3676ab4d

CHANGES
configure.ac


2004-12-08 21:00:32 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
afc8acb7f41c4569e208301153449c2fd8dbd9da

Set the release date.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@360 ded80894-8fb9-0310-811b-c03f3676ab4d

CHANGES


2004-12-08 20:49:19 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
0577ac1d30bd76622e9c2cd36ff573b3e144b19c

Error if the symbol id indicated for refinement in a refagg symbol
dictionary segment is out of range. UBC test stream 042_13 triggers
this, we don't fix this here, only handle the error more verbosely.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@359 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_symbol_dict.c


2004-12-07 01:37:45 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
0aa9e029d3d78790d747b8fd6c62f2f6ffe403f5

Bump the version number for release.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@358 ded80894-8fb9-0310-811b-c03f3676ab4d

configure.ac


2004-12-07 01:23:24 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
422bfff0efc1eaedd88e5aa876a96ae36fbd13bb

Add jbig2_refinement.c to the Jam and MSVC builds.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@357 ded80894-8fb9-0310-811b-c03f3676ab4d

Jamfile
msvc.mak


2004-12-06 05:37:42 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
389ea3e65131d1644f3c894bd67c6dc433ccb0ec

Code cleanup. The refinement region decode procedures use a 'GR' prefix
in the spec even when the function is identical to the 'GB' prefix
variables in the generic region procedures. Change our code to match.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@356 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_refinement.c


2004-12-06 05:36:28 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
65b51e728aed87dfeb43227218be0c5cc4d642af

Correct the test for the nominal generic region template 0 AT pixel
positions. The previous change invoked the optimized routine for the
wrong template, causing a regression with ubc test stream 042_10.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@355 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_generic.c


2004-12-05 04:15:42 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
5bbe12052a1a34c065451a2c10741021caf6887c

Update the changelog


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@354 ded80894-8fb9-0310-811b-c03f3676ab4d

CHANGES


2004-12-05 04:15:13 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
801c41b10d75f023ff2387aac576f5f3c152a308

Add an unoptimized generic decoder for generic region template 0. We now
properly decode UBC test stream 042_7.jb2.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@353 ded80894-8fb9-0310-811b-c03f3676ab4d

jbig2_generic.c


2004-12-05 03:48:36 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
2b6179196091f01a58c17a79024d7ee5243ab8a2

Add a generic but unoptimized handler for generic region arithmetic
template 3, and an optimized but untested handler for the default AT
pixel position. We now properly decode 042_6.jb2 from the UBC test
suite.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@352 ded80894-8fb9-0310-811b-c03f3676ab4d

CHANGES
jbig2_generic.c


2004-12-04 02:29:17 +0000
giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
b8fc23e4731a172600282a65e9602ff1963bfead

Implement non-standard AT positions in the unoptimized version
of the r