2007-03-15T00:02:10.064485Z Ralph Giles

Handle empty log messages.

[toolbin/split_changelog.py]

2007-03-14T21:35:45.571769Z Ralph Giles

Remove romfs.dev from FEATURE_DEVS_ALL. It is no longer optional.

[src/Makefile.in]

2007-03-14T21:15:00.798517Z Ralph Giles

Update revision, dates, and list of open bugs for release.

[doc/History7.htm doc/Projects.htm doc/History8.htm man/dvipdf.1 man/ps2ascii.1 doc/Use.htm doc/Readme.htm doc/Source.htm doc/Deprecated.htm doc/Maintain.htm man/ps2epsi.1 doc/Install.htm src/gscdef.c doc/API.htm doc/Issues.htm doc/DLL.htm doc/Drivers.htm man/pfbtopfa.1 doc/Release.htm doc/Commprod.htm doc/Xfonts.htm doc/Devices.htm doc/Language.htm man/gs.1 src/version.mak src/dwsetup.rc man/pf2afm.1 doc/Ps2ps2.htm doc/Fonts.htm man/printafm.1 doc/Ps2pdf.htm doc/Develop.htm doc/Helpers.htm man/pdf2dsc.1 doc/Psfiles.htm doc/Lib.htm doc/gs-vms.hlp doc/Htmstyle.htm man/font2c.1 man/gsnd.1 man/pdfopt.1 src/winint.mak doc/News.htm man/pdf2ps.1 man/ps2pdf.1 doc/Testing.htm doc/Make.htm doc/Details8.htm doc/Unix-lpr.htm doc/C-style.htm doc/Ps-style.htm doc/History1.htm doc/History2.htm man/gslp.1 man/wftopfa.1 doc/History3.htm doc/History4.htm man/ps2pdfwr.1 doc/Ps2epsi.htm man/ps2ps.1 doc/History5.htm doc/History6.htm]

2007-03-13T22:40:29.048961Z leonardo

Fix (stroking) : Apply the right math for computing always_thin,

DETAILS :

The old code estimated the line width with 
an empiric formula, which doesn't look well defined.
Replacing it with a right math.
See comment in code.

[src/gxstroke.c]

2007-03-13T22:35:51.420875Z leonardo

Fix (stroking) : Apply the right math for computing always_thin,

DETAILS :

The old code estimated the line width with 
an empiric formula, which doesn't look well defined.
Replacing it with a right math.
See comment in code.

[doc/pscet_status.txt src/gxstroke.c]

2007-03-11T20:47:13.652729Z leonardo

pscet_status.txt : Closing 11-06-5.

[doc/pscet_status.txt]

2007-03-11T17:43:34.501551Z leonardo

Fix (user paths) : Wrong current point after uappend closepath.

DETAILS :

The old code missed the subpath starting point after uappend.
Also removing the code for copying current point from path 
in user path operations, because gs_upmergepath now performs this job fine.

[doc/pscet_status.txt src/gspath.c src/zupath.c]

2007-03-11T16:29:11.261904Z Alex Cherepanov

Rename "ref dash_pattern" to avoid confusion with "float dash_pattern[]".

[src/zgstate.c src/igstate.h]

2007-03-11T13:46:54.105020Z leonardo

Fix : MSVC compiler warnings.

DETAILS :

The patch
http://ghostscript.com/pipermail/gs-cvs/2007-March/007345.html
is incomplete.
More const qualifiers are now removed.

[src/zimage.c src/gxiparam.h src/gxcmap.c src/iimage.h src/gximage.c src/gximage1.c src/gximage3.c src/gsipar3x.h src/gximage4.c src/gxclrast.c src/gximag3x.c src/gdevpdfi.c src/gsiparam.h src/gsiparm3.h src/gsiparm4.h]

2007-03-11T09:10:05.985706Z leonardo

pscet_status.txt : Improving assignments.

[doc/pscet_status.txt]

2007-03-09T20:41:25.398262Z Ray Johnston

Add a utility to dump out information about PDF files. Fix
for customer #259.

DETAILS:

This is intended as an example since most customers will want
specific info, but it also is slightly handy.

We may want to do 'pdf_info' scripts and .bat files in lib/
but these can be added later.

   usage: gs -dNODISPLAY -q -sFile=____.pdf [ options ] toolbin/pdf_info.ps

          where "options" are:
          -dDumpMediaSizes          MediaBox and CropBox for each page
          -dDumpFontsUsed           List fonts used
          -dShowEmbeddedFonts       only meaningful with -dDumpFontsUsed

Sample 'full' output looks like:


examples/annots.pdf has 6 pages.
Title: Microsoft Word - Links.doc
Author: August D. Coby
Creator: ADOBEPS4.DRV Version 4.24
Producer: Acrobat Distiller 4.0 for Windows
CreationDate: D:20000420231130Z
ModDate: D:20040413162329-07'00'

Page 1 MediaBox: [ 612 792 ] CropBox: [ 612 792 ]
Page 2 MediaBox: [ 612 792 ] CropBox: [ 612 792 ]
Page 3 MediaBox: [ 612 792 ] CropBox: [ 612 792 ]
Page 4 MediaBox: [ 612 792 ] CropBox: [ 612 792 ]
Page 5 MediaBox: [ 612 792 ] CropBox: [ 612 792 ]
Page 6 MediaBox: [ 612 792 ] CropBox: [ 612 792 ]

Fonts Used:
ArialMT
IBKJPF+ArialMT
JBAHHI+ArialMT

[toolbin/pdf_info.ps]

2007-03-08T17:24:28.272086Z Raph Levien

Remove unnecessary zeroing out of reference count of indexed color space
map structure. Eliminates warnings when run with -Z?

[src/zcsindex.c]

2007-03-08T00:27:45.225750Z Ray Johnston

Missing (yet another) dependency -- string_.h. It probably was not
a problem.

[src/int.mak]

2007-03-07T21:22:02.986768Z Ralph Giles

Update the makefile with new header dependencies added in r7198.

[src/int.mak]

2007-03-07T20:35:24.409027Z Stefan Kemper

Fix image banding error with high level images ctm.

Fixes ridt91.eps (ppmraw/300dpi/banded)

[src/gxclimag.c]

2007-03-07T00:12:53.750515Z Timothy Osborn

Changed assignment from Igor to Tim for items marked same-as some items already marked OK.

[doc/pscet_status.txt]

2007-03-06T21:40:32.469232Z leonardo

Fix (Type 1 interpreter) : Account the replaced side bearing in setcurrentpoint.

DETAILS :

When the side bearing is replaced with Metrics or Metrics2,
the old code didn't account that while executing setcurrentpoint,
so that further outline poles go to wrong (unreplaced) coordinates.
Fixes CET 16-03-2.

[doc/pscet_status.txt]

2007-03-06T21:37:14.025835Z leonardo

Fix (Type 1 interpreter) : Account the replaced side bearing in setcurrentpoint.

DETAILS :

When the side bearing is replaced with Metrics or Metrics2,
the old code didn't account that while executing setcurrentpoint,
so that further outline poles go to wrong (unreplaced) coordinates.
Fixes CET 16-03-2.

[src/gstype1.c src/gstype2.c src/gxtype1.c src/gxtype1.h]

2007-03-06T19:46:12.663281Z Ralph Giles

Resolve version control Id line issues flagged by the regression run.

[doc/pscet_status.txt src/gxhintn1.c doc/Testing.htm doc/Psfiles.htm lib/jobseparator.ps]

2007-03-06T17:24:58.366068Z leonardo

Fix (TT interpreter) : memory leaks with PCL (continued).

DETAILS :

The last patch doesn't compile with gcc due to a redundsnt typedef.

[src/gxttfb.c]

2007-03-06T14:35:00.233763Z leonardo

Fix (TT interpreter) : memory leaks with PCL.

DETAILS :

1. The old code created gx_ttfMemory instance per font,
   but only the first one is used. Others are leaks.
   The new code create one instance per font directory.
   The new field gs_font_dir::ttm works for that.

2. For proper lock count on memory errors, don't call Context_Destroy 
   if Context_Create was not called.

3. In ttobjs.c don't use exec->current_face for accessing ttfMemory,
   because PCL closes fonts when they are not active
   in the TT interpreter. The new field Execution_Context::memory
   works for that.  

[src/gxfcache.h src/gxttfb.c src/gsfont.c src/ttfmemd.c src/ttfmain.c src/ttobjs.c src/ttobjs.h]

2007-03-05T21:50:20.543548Z Raph Levien

Remove stray debug print that was left in previous commit (colorspace
refcount patch).

[src/gscscie.c]

2007-03-05T21:09:35.951840Z Raph Levien

Non-backwards compatible change: use consistent reference count allocation
discipline for color spaces. Previously, color spaces were allocated on
stack, on the heap, as sub-structures within other color space structures,
and were very commonly copied. Reference counting was used for the "params"
block of some, but not all, color spaces, but there were correctness
problems with that logic.

In addition, a number of "const" qualifiers have been removed, because
the action of bumping the reference count on an object is not consistent
with the C semantics of const.

This change is required to resolve problems with enhancement 688924. It
should also help with memory leaks.

Other clients, such as the PCL interpreter, will require changes to be
compatible. For simple device colorspaces, the change to gs_setcmykcolor()
(gscolor1.c) is representative of the code change required.

[src/gsimage.c src/zimage.c src/zshade.c src/gslibctx.c src/gscscie.c src/gdevpdfb.c src/gdevpdfc.c src/gdevpdfg.c src/gxclrast.c src/zpcolor.c src/zicc.c src/gspcolor.c src/gdevps.c src/gdevpdfi.c src/gsicc.c src/gscdevn.c src/zcssepr.c src/gdevpdfk.c src/zcie.c src/gdevpdfg.h src/lib.mak src/gsicc.h src/gscdevn.h src/zcspixel.c src/gsrefct.h src/gdevpsdi.c src/gdevpdfv.c src/zcolor.c src/gscolor.c src/gsiparam.h src/gxshade6.c src/gscssub.c src/gdevp14.c src/gsstate.c src/gxclpath.c src/gsptype1.c src/zcsdevn.c src/gscpixel.c src/gxcmap.c src/gsptype1.h src/icsmap.h src/gsistate.c src/gscpixel.h src/gxshade.c src/gximag3x.c src/zcsindex.c src/gscspace.c src/gscolor1.c src/gscolor2.c src/zcolor2.c src/gscolor3.c src/gscspace.h src/gxistate.h src/gscolor2.h src/gxpcmap.c src/gxcspace.h src/gxcdevn.h src/gxcolor2.h src/gscsepr.c src/gscindex.h src/gscsepr.h]

2007-03-05T17:12:51.517731Z Timothy Osborn

Reassinged shading issues to Igor

[doc/pscet_status.txt]

2007-03-05T05:30:38.914444Z Raph Levien

Make sure that memory for jpeg_decompress_data gets allocated from the
same memory as the stream structure that owns it. Previously, the
stream structure would be allocated in global, and the jddp in stable
local, which is a violation of GC invariants. Fixes bug 689118, which
was a GC crash in the regression file H00216q.pdf.

[src/zfdctd.c]

2007-03-04T21:31:28.032123Z leonardo

pscet_status.txt : Closing 11-24-3 .

[doc/pscet_status.txt]

2007-03-04T18:25:04.375026Z Alex Cherepanov

Fix X mirroring for all color modes of the interpolated image.
The mirroring was missing from non 8 bits/colorant modes resulting
in the mirrored output images.

[src/gxiscale.c]

2007-03-04T17:08:25.140696Z leonardo

Fix (user paths) : Remove the uneven behavior with uappend.

DETAILS :

1. uappend was fixed to ignore the incorrfect placement of ucache 
   in the CPSI compatibility mode. 
   However in contradiction to other user path operators,
   CPSI has no uneven behavior with uappend, 
   so changing upath back to the regular behavior.

2. Don't change current point if uappend fails.
   Likely it was an inaccuracy in a recent patch.

3. Change other user path assignment for more efficiency.

[doc/pscet_status.txt src/zupath.c]

2007-03-04T16:41:00.611078Z Ray Johnston

Free up any previous line_ptrs in a memory (image) device before
allocating new ones. This allows multiple calls to setup_buf_device
without leaking memory (as seen with the PCL allocator that does
not have garbage collection).

[src/gdevprn.c]

2007-03-04T16:37:32.768972Z Ray Johnston

The index file should not be compressed. It is small, and if it ever did
get compressed, it would SEVERELY impact performance since the entire
list gets processed on every band.

[src/gxclist.c]

2007-03-03T03:51:56.270202Z Alex Cherepanov

Fix a stack nix-up that occured when cm operator was used inside BT/ET block.
Bug 688985, customer 580.

[lib/pdf_draw.ps]

2007-03-02T05:55:00.252985Z Henry Stiles

accommodate parsing of undocumented color treatments (689100) which
appear to have no effect.

[src/gdevpxen.h]

2007-03-01T20:17:09.177569Z leonardo

Fix (pdfwrite) : Handle a text with degenerate CTM.

DETAILS :

The old code failed with undefinedresult when writing
a text to output with degenerate CTM. 
The new code writes it somehow to provide searchability.
See comment in code.
Such text is not visible in rendering.
We don't care about 'Tj' optimization
because such cases are rare.

[src/devs.mak]

2007-03-01T20:15:49.273788Z leonardo

Fix (pdfwrite) : Handle a text with degenerate CTM.

DETAILS :

The old code failed with undefinedresult when writing
a text to output with degenerate CTM. 
The new code writes it somehow to provide searchability.
See comment in code.
Such text is not visible in rendering.
We don't care about 'Tj' optimization
because such cases are rare.

[src/gdevpdts.c]

2007-03-01T15:27:39.443405Z leonardo

Fix (graphics) : Imprecise current point after drawing an arc (continued).

DETAILS :

The old code uses 'fixed' representation for an angle of an arc.
It appears insufficiently precise.
The new code performs the angle computations in doubles.
The patch intentionally doesn't change the algorithm. 

[doc/pscet_status.txt src/gspath1.c]

2007-03-01T12:50:10.538308Z leonardo

Fix (fuzzy.c) : An incorrect image difference format for multipage files.

DETAILS :

The old code created a single header for the image difference,
which describes the first page only. Further pages were written
with no header. 

Also the output buffer length was incorrect
when pages have different sizes. 
It caused heap corruption.

The new code creates a new file for each page difference.

[toolbin/tests/fuzzy.c]

2007-03-01T02:26:03.339465Z Alex Cherepanov

When a chain of decoding filters encounters EOF, close the last filter in
the chain. This seems to contradict PLRM3 but matches the observed behavior
of Adobe interpreters. Bug 688745, customer 384.

DETAILS:
Contrary to PLRM3, Adobe interpreters close disk files and filters equaly.
Old Ghostscript code was inconsistant and closed the first and the last
filters in the chain, or the last 2 filters depending whether the first file
is a disk file or a filter.

[src/stream.c]

2007-02-28T18:49:49.409416Z leonardo

Fix (fuzzy.c) : Multipage files processed incorrectly.

DETAILS :

When ppmraw writes several pages into a single file, it places a header before 
each image data. The old fuzzy.c does not expect headers, and reads headers as image data. 
This change provodes parsing an own header for each page.

[toolbin/tests/fuzzy.c]

2007-02-28T17:03:28.849858Z Alex Cherepanov

Validate arguments of the operator startjob. Fix CET 31-10-02.

[doc/pscet_status.txt lib/gs_lev2.ps]

2007-02-27T21:11:08.978663Z leonardo

Fix (graphics) : Imprecise current point after drawing an arc.

DETAILS :

1. gs_arc_add_inline took current point from fixed point coords in path. 
   Implementing PRECISE_CURRENTPOINT for it.

2. gs_imager_arc_add made private because it changes the interface
   and none of our interpreters call it.

3. pis->subpath_start is set from arc if a path starts with an arc.

[doc/pscet_status.txt src/gspath1.c src/gspath.h]

2007-02-26T16:24:17.305323Z Alex Cherepanov

Fix indeterministic behavior of fuzzy.c with -w > 1. Initialize the rest of
the window buffer that would be uninitialized before half_win lines is read.

[toolbin/tests/fuzzy.c]

2007-02-25T20:46:03.985068Z Alex Cherepanov

Set upper font cache limit to 1e8 bytes in CPSI compatibility mode.
Fix CET 27-02-01.

[doc/pscet_status.txt src/gsfont.c]

2007-02-25T19:26:44.964185Z Alex Cherepanov

Fix MSVC-specific code added to fuzzy.c in the rev. 7743.

[toolbin/tests/fuzzy.c]

2007-02-25T19:13:16.641987Z Stefan Kemper

Banding fix where triangles where incorrectly detected and rendered
as parallelograms when rendering out of the clist.  Triangles are only used
to fill bevel joins so this occurs infrequently, and the use of fuzzy 
comparisons will hide all but the largest stroke width errors.  

Corrects many pcl CET banding/nobanding differences:
28-01 
28-02
28-03
28-04
28-05
28-06
28-07
28-10
29-01		   
29-02
29-08
29-10
29-11
30-01
30-04
30-16
30-19
30-23
31-01
31-02
31-03
31-04
31-05
31-06
31-07
31-08
31-09
31-10
31-11
32-01
32-02
34-03
36-04
36-05

[src/gxclrast.c]

2007-02-25T13:58:08.233607Z leonardo

Fix (fuzzy.c) : Further improvements.

DETAILS :

1. The old code read past EOF.
   It happens because the EOF condition doesn't appear when reading
   the last byte of a page, which is the last byte of the file.
   Actually EOF happens when attempting to read bytes after the last
   byte of a page. It caused the old code to think that an extra
   page presents at file end, and to perform a dummy comparizon of the extra page
   as it would appear with repeating the last raw of the file.
   Due to that the old code consumes nearly twice CPU time than neccesary.
   Fixed with comparing the file position with the file legth in image_pnm_feof.

2. image_get_rgb_scan_line didn't return an error code when
   insufficient data presents in the file.

3. Optimized fuzzy_diff_images with using memcmp for
   a faster comparizon of rows. Skip the heavy analyzis of differences
   when entire rows are equal.

[toolbin/tests/fuzzy.c]

2007-02-25T05:06:47.526811Z Alex Cherepanov

Clean up pscet_status.txt and add comments to a few entries.

[doc/pscet_status.txt]

2007-02-25T02:09:12.060125Z Alex Cherepanov

In Level 3, operator setscreen takes the value of AccurateScreens from the user
parameter even with the dictionary argument. PLRM p682. Partly fix CET 09-49-02

[doc/pscet_status.txt lib/gs_dps2.ps]

2007-02-24T15:32:48.711895Z Alex Cherepanov

Set /errorinfo to null in the error handler when it undefined.
Fix missing 'null' in CET 09-47c and 09-47j.

[doc/pscet_status.txt lib/gs_init.ps]

2007-02-23T23:03:23.452670Z Ray Johnston

Fix memory leak (PCL) due to extra gstate creation. PS did not leak thanks
to the Garbage Collector.

DETAILS:

If a pattern PaintProc did a gsave/grestore the grestore would detect that
the base graphics state did not have an underlying 'saved' graphics state
and would create one (due to the need for PostScript to always have two
graphics states on this graphics state stack/list). When gx_pattern_load
freed the graphics state it created, the (possible) underlying graphics
state would not get freed. Since the PostScript allocator (that supported
garbage collection) would locate and free the unconnected graphics state
this was not seen with PostScript.

The gs_state_free_chain function was created in case there are other clients
that need this function (pdfwrite ?)

[src/gsstate.h src/gxpcmap.c src/gsstate.c]

2007-02-23T22:05:37.560889Z Alex Cherepanov

Use stricter validation of the pattern dictionary parameters to
match CET 18-02c and 18-02d.

DETAILS:
In particular, don't accept the degenerative matrix, unnormalized, or empty
bounding box. The difference in the operand stack in CET 18-02c is not yet
fixed. Adobe doesn't restore operands of rectfill operator when an error
happen in the PaintProc procedure but Ghostscript does.

[doc/pscet_status.txt lib/gs_lev2.ps src/zpcolor.c lib/pdf_ops.ps]

2007-02-23T18:32:39.440312Z Timothy Osborn

Changed status to AOK for 09-47B-11 Test05 and Test06

[doc/pscet_status.txt]

2007-02-23T17:31:15.655333Z Timothy Osborn

Changed status to AOK for 09-47B-11 Test10 and Test11

[doc/pscet_status.txt]

2007-02-23T17:04:07.479609Z Timothy Osborn

Changed status to AOK for 09-47B-10 Test10 and Test11

[doc/pscet_status.txt]

2007-02-23T13:29:37.822169Z L. Peter Deutsch

Changes the 'token' operator so it does not pop the operand on an
invalidaccess error, for Adobe compatibility.

[src/ztoken.c]

2007-02-22T15:39:15.380404Z Alex Cherepanov

Set bottom limit of 100000 on the font cache size in the compatibility
mode to match Adobe interpreters.  Partial fox for CET 27-07-01.

[doc/pscet_status.txt src/gsfont.c]

2007-02-22T03:10:49.737762Z Alex Cherepanov

Don't include systemdict, globaldict, and userdict into the array of
dictionaries that is pushed to the operand stack on dictstackoverflow.
Partly fix CET 20-02-02.

[doc/pscet_status.txt src/interp.c]

2007-02-22T00:39:53.016232Z Ray Johnston

Previous CPSI_PPM files had been run with a (bogus) RenderingIntent
ProcSet in force that (among other things) redefined the 'show' op
as a procedure. This ProcSet appears to be a method to use different
color matching depending on the type of imaging operation (fill, stroke,
show, image, shfill).

The casper.ghostscript.com:/home/ray/PSLL3/CPSI_PPM directory is now
updated with the results obtained when the RenderingIntent ProcSet is
disabled. The interesting thing is that many pages that CPSI previously
could not render now work (some that did render now do not) and that
GS now matches several more files than previously. 

The status indicates "OK" where GS matches CPSI (close enough) and
removes the 'cpsi missing' where we now have CPSI results available.
Some pages are changed to "DIFF" status and assigned, indicating that
a fix (or an intelligent review) is needed.

Please email me with any questions.

[doc/pscet_status.txt]

2007-02-21T22:16:53.963317Z Alex Cherepanov

Change the parameter validation order in execstack to match CET 20-03.

[doc/pscet_status.txt src/zcontrol.c]

2007-02-21T20:24:45.557583Z Ray Johnston

Fix regression on 124-01.ps. Emulate bizarre Adobe behavior so that the
procedure operand of a 'for' is not executed when BOTH the initial value
and the increment are 0 (or 0.0). Seen with CET 28-07 and FTS 124-01
and verified with custom test file against CPSI.

EXPETECTED DIFFERENCES:

None (this time).

[src/zcontrol.c]

2007-02-21T15:02:42.033266Z Ray Johnston

Fix for language_switch build 'invalidrestore. Allow filter allocation in
systemVM as needed by .runstring and .runstringbegin in gs_init.ps. This 
fixes problem intoduced by rev 7629.

EXPECTED DIFFERENCES.

None. Note that CET 23-12W that was fixed with rev 7629 is OK with this
change since the 'use_space' is not limited by 'save_space'.

[src/zfilter.c]

2007-02-21T14:43:50.287589Z Alex Cherepanov

Make redefined /quit a procedure to match CET 28-10-01.

[doc/pscet_status.txt lib/gs_lev2.ps]

2007-02-21T01:14:19.825556Z Alex Cherepanov

Reclassify CET 23-12W-4 as OK. 

[doc/pscet_status.txt]

2007-02-21T00:16:24.688423Z Ray Johnston

Fix CET 28-05-2, Adobe CPSI and Tek do not execute procedure if increment
value is 0. The PLRM does not mention increment value == 0.

EXPECTED DIFFERENCES.

None.

[doc/pscet_status.txt src/zcontrol.c]

2007-02-20T23:54:19.102684Z Alex Cherepanov

Require resource category to be a name in the findresource operator.
Convert 1st operand to a name if it's a string. Fix CET 23-13-04.

[doc/pscet_status.txt lib/gs_res.ps]

2007-02-20T23:35:19.366880Z Alex Cherepanov

Fix CET 20-23-01 - undefine /deviceinfo from systemdict in gs_cet.ps

[doc/pscet_status.txt lib/gs_cet.ps]

2007-02-20T20:54:55.794850Z Alex Cherepanov

Reclassify 20-27-1 as AOK. Contents of $error is device-dependent.

[doc/pscet_status.txt]

2007-02-20T19:38:26.900624Z Ralph Giles

Minor modifications to the parallel job launch script. Take an -r option 
to mark the report with a revision number, and add more stats to the 
output.

[toolbin/tests/run_parallel]

2007-02-20T19:25:10.472981Z Ray Johnston

Update comments on some pages and change some assignments to Alex that
are error message differences. Two more pages resolved.

[doc/pscet_status.txt]

2007-02-20T16:40:21.043788Z Timothy Osborn

Changed status to OK for 09-47I-3 Test11

[doc/pscet_status.txt]

2007-02-20T16:25:41.041973Z Timothy Osborn

Editing change for 09-47B-7, Test01 and Test02

[doc/pscet_status.txt]

2007-02-20T16:23:39.231043Z Timothy Osborn

Changed status to AOK for 09-47B-7, Test01 and Test02

[doc/pscet_status.txt]

2007-02-20T03:55:36.436290Z Alex Cherepanov

Fix CET 29-02 - increment page count after copypage operation.

[doc/pscet_status.txt lib/gs_init.ps]

2007-02-19T20:22:08.118775Z Stefan Kemper

Fix for banding of some images not matching non-banding output.
Added check for an invariant that the translation matches in the 
two matrixes used in rendering.  In this case the non-high level image
path is taken.  A better solution would be to a single matrix, as this will
increase the display list size for some files.

Fixes banding differences in:

035-01.ps
148-11.ps
148.16.ps
1_2001.pdf
455690.pdf
Bug687832.pdf
Bug687840.pdf
a.pdf
adesso4.pdf
bc_02a01_cal.pdf
dave.pdf
file2.pdf
foo.pdf
john_clippedimage.pdf
messenger.pdf
messenger16.pdf
ngnews1.pdf
rotate180.pdf
rotate270.pdf
rotate90.pdf

pcl5ccet/15-03.BIN + ufst
  

[src/gxclimag.c]

2007-02-19T06:16:13.609799Z Ray Johnston

Change 35_all-6 to OK since regression testing shows that it is now OK.

[doc/pscet_status.txt]

2007-02-19T03:19:41.021316Z Alex Cherepanov

Move redefinition of product, version, revision, and serialnumber in CET
prologue from userdict to systemdict to meet CET 20-15-01.

[doc/pscet_status.txt lib/gs_cet.ps]

2007-02-19T00:38:04.570312Z Alex Cherepanov

Reproduce the algorithm used by Adobe to grow the dictionary
to match CET 20-01-01.

[doc/pscet_status.txt src/idict.c]

2007-02-17T15:55:51.631627Z Alex Cherepanov

Reclassify 20-25-01 as OK because it matches Tek and PhotoPrint is
clearly wrong here.

[doc/pscet_status.txt]

2007-02-17T14:14:09.648281Z Alex Cherepanov

Throw /invalidfont error when glyph 0 is accessed but it is missing from
the type 32 font,

DETAILS:
CET 35_all-12 checks, among other things, how glyphshow operator handles
type 32 fonts without glyph 0. This patch add a check to the BuildGlyph
procedure of type 32 font for the missing 0 glyph that throws /invalidfont
error. The offending command name is retrieved from the text enumeration
structure using a new operator: .getshowoperator

[doc/pscet_status.txt src/zcharx.c src/int.mak src/zfont32.c lib/gs_typ32.ps]

2007-02-16T20:40:10.924118Z leonardo

pscet_status.txt : Improving some assignments.

[doc/pscet_status.txt]

2007-02-16T19:46:05.775757Z Henry Stiles

assign unassigned problems.  Add NF category.  NF means "not fixing"
in the near term.  It should be used if we don't have short term plans
to fix a problem.

[doc/pscet_status.txt]

2007-02-16T19:08:03.918575Z Ralph Giles

Improve the encapsulation of the raster db by adding exists() and 
mtime() methods instead of checking the stored files directly in
the caller.

[toolbin/tests/rasterdb.py toolbin/tests/gscheck_raster.py toolbin/tests/gscheck_pdfwrite.py]

2007-02-16T15:27:49.350851Z leonardo

Fix (stroking) : An imprecise miter limit check. Thanks to
Ray Johnston for analyzing this problem and identifying the type
of fix.

DETAILS :

The old code used cap points for computing the miter tangent.
However cap points do not precisely represent the stroke direction
due a rounding to 'fixed'.

The new code uses the precise stroke direction. The new field
partial_line::vector is used to pass the direction for zero length
dashes.

[doc/pscet_status.txt src/gxstroke.c]

2007-02-16T13:25:42.400099Z Alex Cherepanov

Fix error reporting in CET 35_all-06. Add font type 32 to the check for CIDFont
resources, which was missing from the rev. 7574 patch. 

[doc/pscet_status.txt src/zchar.c]

2007-02-16T07:44:07.172841Z leonardo

Fix (type 1 hinter) : An inaccurate estimation of matrix precision.

DETAILS :

The old code doesn't account the Y scale due to a misprint.
It is risky of a fixed overflow while transforming a glyph
to the device space. We didn't detect such glitches in practice.

[src/gxhintn.c]

2007-02-15T10:58:50.217005Z Ralph Giles

Further atomicize the output of the test result lines.

[toolbin/tests/gstestutils.py]

2007-02-15T07:59:50.909402Z leonardo

Fix (type 1 hinter) : An improvement for very small matrices.

DETAILS :

Debugged with this :

/Courier findfont 0.000000000000000000000000000000001 scalefont setfont
72 72 moveto
(ASDFGGH) show
showpage

In fraction_matrix__set the old code computed this->bitshift = 137,
and then 

	this->denominator = 1 << this->bitshift 
	
gave a nonsnse result 512. 
Here is the assembler code for the latter statement built with MSVC8 :

	mov         ecx,dword ptr [eax+14h] 
	shl         edx,cl 

It simply drops higher bytes.
Looks as MSVC compiler bug.

The new code replaces it with strong zero.

[src/gxhintn.c]

2007-02-15T03:43:27.194732Z Alex Cherepanov

Clear the current point in strokepath operator when the original path is empty
to match CET 11-21-07 and 11-28-09.

[doc/pscet_status.txt src/gspaint.c]

2007-02-14T20:47:43.847581Z leonardo

pscet_status.txt : Consider 18-02G-1 as a possible duplicate of 12-01-5.

[doc/pscet_status.txt]

2007-02-14T18:23:43.641152Z Alex Cherepanov

Avoid large memory allocation that can happen when random data are recognized
as a binary object sequence. Add a preliminary syntax check before allocation
of a reference array for a binary object sequence. Bug 688833, customer 1130.

[src/iscanbin.c]

2007-02-14T18:19:39.165881Z Ralph Giles

Updates the the parallel regression running. Construct a report out of 
the log dump, and add a commandline option to run make_testdb instead of 
run_regression.

[toolbin/tests/run_parallel]

2007-02-14T17:31:05.436990Z Henry Stiles

Add analysis from Jan that might be useful in addressing 12-01-05.

[doc/pscet_status.txt]

2007-02-13T21:44:37.122483Z leonardo

Fix (type 1 hinter) : Consider quazi-degenerate CMT as degenerate.

DETAILS :

This improvement is done for PCL tests 18-08.BIN, 18-09.BIN .

[src/gxhintn.c]

2007-02-12T20:12:44.367608Z Timothy Osborn

Changed status to AOK for 09-34-2, 09-34-3, 09-34-7, 09-34-12, 09-34-15, 12-02-18, 12-05-3, 12-07B-10

[doc/pscet_status.txt]

2007-02-12T14:06:50.930532Z Alex Cherepanov

Change the order of allocations because alloc_save_change_alloc() leaves
alloc_change_t structure it allocates in the state that causes SEGV in GC
if where member is not initialized. Bug 688833, customer 1130.

DETAILS:
Allocation of alloc_change_t structure without further initialization happened
when allocation of a new run of references failed. The latter may be easily
triggered by interpretation of random bytes as a binary object sequence.

[src/ialloc.c]

2007-02-12T12:02:52.582461Z leonardo

Fix (interpreter) : Must not remove cshow, kshow procedure operands.

DETAILS :

This improvement is done for CET 13-12-4.

[doc/pscet_status.txt src/zchar.c]

2007-02-12T08:28:32.685785Z leonardo

Fix (interpreter) : Provide a right execution stack on *show errors.

DETAILS :

This improvement is done for CET 13-12-4.
The old code left --%op_show_continue-- on estack when error occors in kshow.

The new code defines a nes field gs_tect_enum_s::enum_client_data,
which stores the initial operator. If an error happens,
op_show_restore puts the initial operator on estack
instead the continuation operator.

Left hand type casts :

	*(op_proc_t *)&penum->enum_client_data = zshow

used to quiet MSVC compiler warnings about function<-->data casts.

[src/gstext.c src/zchar.c src/gxtext.h]

2007-02-11T09:45:31.388669Z leonardo

pscet_status.txt : Improving some inaccurate assignments.

[doc/pscet_status.txt]

2007-02-11T09:00:04.714548Z leonardo

pscet_status.txt : Taking text/character rendering problems 11-07-1, 16-03-2, 16-03-3 .

[doc/pscet_status.txt]

2007-02-09T16:56:36.182205Z Stefan Kemper

Fix logic expression error preventing -dLeadingEdge=[2,3] from running.

[src/gsdparam.c]

2007-02-08T21:07:22.862698Z leonardo

Fix (interpreter) : Early check for degenerate CTM in 'kshow'.

DETAILS :

Debugged with CET 13-12-4.
Note here we don't fix all *show operators,
but provide a minimal change for CPSI compatibility against CET tests
(gstext.c).

Minor change : a misspelled comment in gxchar.c .

[src/gxchar.c src/gstext.c]

2007-02-08T13:33:56.049298Z leonardo

Fix (interpreter) : 'noaccess' must be idempotential operator.

DETAILS :

Debugged with CET 24-09-1.

Also removing an obsolete comment.

Occasionally discovered a regression with 20-15-1.

[doc/pscet_status.txt src/ztype.c]

2007-02-07T21:42:46.099570Z Alex Cherepanov

Check the content of the /Encoding array when the font is created
to detect invalid fonts early and match CET test 16-04-01.

[doc/pscet_status.txt src/zbfont.c]

2007-02-07T17:19:23.733270Z leonardo

Fix (interpreter) : 'definefont', 'show', 'setcachedevice' error inconformity (continued).

DETAILS :

The previous patch has been committed from a wrong revision of ztype.c.

[src/ztype.c]

2007-02-07T16:44:43.843090Z leonardo

pscet_status.txt : Taking 13-12-4 because I fixed a similar problem.

[doc/pscet_status.txt]

2007-02-07T16:30:26.521710Z leonardo

Fix (interpreter) : 'definefont', 'show', 'setcachedevice' error inconformity.

DETAILS :

1. The old code throws different errors than CPSI 
   when a FontMatrix is zero (gstext.c, gxchar.c).

2. With CPSI 'noaccess' trows 'invalidaccess' with read-only dictionaries (ztype.c).

3. 'definefont' must return a read-only object (see PLRM) (gs_fonts.ps).

Debugged with CET 13-13-6, 13-15-3.

[doc/pscet_status.txt src/gxchar.c src/gstext.c lib/gs_fonts.ps src/ztype.c]

2007-02-07T09:39:44.364923Z leonardo

pscet_status.txt : Restoring 09-36-5 as it was in rev 7617.

[doc/pscet_status.txt]

2007-02-07T09:30:56.041828Z leonardo

pscet_status.txt : Restoring 09-36-5 as it was in rev 7617.

[doc/pscet_status.txt]

2007-02-06T11:07:48.194380Z leonardo

Fix (TT font loader) : Removing a dead code.

DETAILS :

This change is algorithmically eauivalent :

    <00030001> .findcmap {
      something1
    } {
      something2
      <00010000> .findcmap {
        something3
      } {
        something4
        <00030001> .findcmap {      %removed
          UNREACHABLE               %removed
        } {                         %removed
          somthing5
        } ifelse                    %removed
      } ifelse
    } ifelse

beacuse something* don't affect .findcmap, and the latter has no side effect .
Actually it dead a long ago.

[lib/gs_ttf.ps]

2007-02-06T09:50:48.237761Z leonardo

Fix (TT font loader) : Account PDF Encoding with embedded symbolic TT fonts 
that include cmap platformID=3 specificID=1 .

DETAILS :

Bug 689083 "PDF embedded TrueType fonts display with wrong characters".

Embedded fonts have symbolic flag and Encoding entry.
In this case PDF 1.6 spec requires to ignore Encoding 
and to create a translation table based on cmap 3.0 or 1.0 .
However the test document does not provide these cmap tables,
so it falls into the "dafault" case (PDF spec 1.6 page 403) :

  "If a character cannot be mapped in any of the ways described above, 
  the results are implementation-dependent."

The old code applied AdobeGlyphList for this case.
It appears different than Acrobat 7 does.
This patch accounts the document's Encoding entry.

Thus the Adobe's implementation dependent behavior appears
to be contradicting to general Adobe's requirement for symbolic fonts.

Please note that ignoring the document's encoding
may give a wrong searchability if the document does not provide ToUnicode.
This one does provide, but we believe that's not general.

[lib/gs_ttf.ps]

2007-02-06T03:26:52.252449Z Alex Cherepanov

Pad short look-up table in the Indexed color space with 0's in PDF documents
when the table comes from a stream. Bug 688987, customer 580.

DETAILS:
Adobe Acrobat 5 detects that the look-up table is short when the table is
a string, unfiltered stream, or ASCIIHexDecode'd stream. When the stream is
FlateDecode'd the length of the decoded data is ignored and the raw memory
in the buffer is used. In most cases it's 0. We pad all streams and pass
strings intact.

[lib/pdf_draw.ps]

2007-02-05T17:21:59.005556Z Ray Johnston

One now AOK, minor cleanup on a few other comments.

[doc/pscet_status.txt]

2007-02-05T16:58:07.399023Z leonardo

Fix (PDF interpreter) : Allow 2-byte ToUnicode CMap for 1-byte fonts.

DETAILS :

Bug 689073 "conversion to PDF fails with rangecheck error".

First, the supplied test case is definitely incorrect.
because it's ToUnicode cmap defines bfchar codes,
which fall outside any code space range defined in the CMap.
Particularly there are 1-byte bfchar codes,
and codespace defines 2-byte codes only.

Second, The PDF spec 1.6. page 472 reads :
"The CMap file must contain begincodespacerange and endcodespacerange
operators that are consistent with the encoding that the font uses. 
In particular, for a simple font, the codespace must be one byte long."
The test case those operators define a 2-byte space for a simple font.

However Adobe handles this document, so we provide a tolerance
for 1-byte fonts. It appears pretty simple : don't substitute
Encoding names for codes over the Encoding length.

Note that codes over the Encoding length appear unuseful
for the test document. In same time they appear consistent 
with codespacerange, so there exist a theoretical possibility that
same CMap is used with another 2-byte font. 
Therefore we keep 2-byte codes intact.

Note that ToUnicode CMap appears unuseful for both
the original and the converted document,
because they use standard glyph names only.
Possibly Adobe don't issue an error due to that.

[lib/pdf_font.ps]

2007-02-04T16:19:41.222295Z leonardo

Fix : MSVC doesn't implement snscanf (continued).

DETAILS :

The last revision doesn't compile with MSVC6,7, 
so this is a better one.
Patch from SaGS.

[src/gp_mswin.c]

2007-02-03T13:30:24.964773Z leonardo

Fix : MSVC doesn't implement snscanf.

DETAILS :

The revision 7672 doesn't compile with Microsoft Visual C++ 2005,
because this compiler doesn't properly define snprintf.

The function snsprintf is a part of the C standard ISO/IEC 9899:1999 (E),
so we decided to define it in the Windows platform-dependent module.
Possibly we'll need a further improvement for other Windows compilers.

Minor change : fixed an MSVC cast warning in iscan.c,
which has been introduced in revision 7672.

[src/iscan.c src/gp_mswin.c src/stdio_.h]

2007-02-03T06:27:14.527305Z L. Peter Deutsch

Updates status to reflect r7672.

[doc/pscet_status.txt]

2007-02-03T06:22:04.579686Z L. Peter Deutsch

Adds an error string and error object to the token scanner state, and an
error object to interpreter contexts, to allow operators to set an arbitrary
object as the "error object" ($error.command) for a PostScript error, and to
allow the token scanner in particular to set special error objects for
syntax errors.  Fixes PS3 CET 23-32-4; partially fixes 21-11-6 and 23-32-2.

[src/icontext.c src/iscan.c src/icstate.h src/interp.c src/iscan.h src/iscanbin.c src/ztoken.c]

2007-02-02T20:29:28.504740Z Ralph Giles

Turn off the strict aliasing warnings in the autoconf gcc build.

Details:

This is slightly dangerous because it can flag real problems the 
optimizer will trip over. However, Ghostscript's method of implementing 
inheritance through macro expansion in structure definitions generates 
hundreds of (not problematic) warnings because the compiler doesn't 
actually trace through to verify that the referenced members are at the 
same offset.

We cannot fix this easily without making the code much more convoluted, 
so in the interests of noticing and fixing other warnings, we've decided
to turn off this particular check.

[src/configure.ac]

2007-02-02T18:54:09.120798Z Alex Cherepanov

Move decryption filter past /SubFileDecode filter installed by
the /resolvestream procedure and remove redundant /SubFileDecode
filter before decryption. The latter didn't handle the case when
the stream length was incorrect. Bug 688722, customer 700.

[lib/pdf_base.ps lib/pdf_sec.ps]

2007-02-02T18:24:56.631552Z leonardo

Fix (FAPI) : A wrong encoding for the font SymbolMT.

DETAILS :

Bug 689049 "ufst fonts not rendering symbol italic greek fonts".

[lib/FCOfontmap-PCLPS3 lib/FCOfontmap-PCLPS2]

2007-02-02T04:47:29.781117Z leonardo

Fix (memory management) : Make the NO_INVISIBLE_LEVELS feature be permanent.

DETAILS :

This change is algorithmically equivalent,
It removes some macros, which are not longer in use.

For details about NO_INVISIBLE_LEVELS see
http://ghostscript.com/pipermail/gs-cvs/2006-April/006467.html
Now we believe that NO_INVISIBLE_LEVELS feature 
has been tested enough (during 10 monthes) to become permanent.

Two obsolete macros alloc_restore_state_step, alloc_forget_save
are expanded and removed.

[src/isave.h src/gxalloc.h src/zvmem.c src/idosave.h src/igcref.c src/igc.c src/ialloc.c src/gsalloc.c src/isave.c]

2007-02-01T19:48:10.557550Z Alex Cherepanov

Generate unique names and create a new Charstrings entries for all
elements of the encoding array that need it. Bug 688613, customer 1110.

DETAILS:
Old code did this only for FirstChar..LastChar range. Other characters were
added when they were missing in FirstChar..LastChar and dropped otherwise.

[lib/pdf_font.ps]

2007-02-01T17:37:59.714396Z leonardo

Fix (memory management) : Propagate error codes from mark_allocated.

DETAILS :

This change is algorithmically equivalent,
except it returns error code rather than crash
when mark_allocated detects a heap damage.

The old code implemented "assert" with emitting a segfault.
However it's not fully portable,
because some platforms may have no memory protection at all.

The core of the change is in mark_allocated.
Others just an interface changes for passing error codes.

[src/isave.h src/zvmem.c src/isave.c]

2007-02-01T03:06:58.503326Z Alex Cherepanov

Bring TrueType font recognition in .loadfontfile procedure up to
the level of resourcefont procedure in the PDF interpreter. Identify
files starting with <00010000>, (true), (typ1), (ttcf) as TrueType
fonts.

[lib/gs_ttf.ps]

2007-02-01T02:09:25.308943Z Alex Cherepanov

Change the status of 09-56-1 to AOK.  /GenericImagesetter and
/AppleMonitor are sample CRD's left in the final product by a sloppy OEM.
Ghostscript doesn't have nor need them.

[doc/pscet_status.txt]

2007-01-31T22:02:34.998982Z Alex Cherepanov

When Tf refers to an unknown resource name, use the resource name as a font
name. This fully recovers the given sample file and avoids fatal PostScript
errors in other cases. Bug 689037.

[lib/pdf_font.ps]

2007-01-31T21:32:33.370701Z leonardo

pscet_status.txt : Updating 09-47K-5.

[doc/pscet_status.txt]

2007-01-31T20:20:51.337129Z leonardo

Fix : gcc warnings.

DETAILS :

The revision 7659 change appears imperfect,
because it caused a new warning.
Thanks for Peter L. Deutsch for pointing this out.

[src/gdevpdfm.c]

2007-01-31T18:27:26.594065Z Ralph Giles

Remove -Wcast-qual since we cannot easily remove many of these 
warnings.

[src/configure.ac]

2007-01-31T12:49:22.229510Z leonardo

Fix : Cygwin/gcc warnings.

[src/gdevpdfm.c src/vdtrace.h src/gxhintn.c src/gdevpdtc.c src/gdevpsf2.c src/gsdps1.c src/gdevbit.c src/sjpx.c src/gxclrast.c src/ttinterp.c src/ttcalc.c src/gxpath.c]

2007-01-31T07:01:37.959449Z L. Peter Deutsch

Fixes a bug in the DCTDecode filter that could cause segvs (bugs 689064,
689065, 689066).  This fix parallels r3097 for DCTEncode.

[src/zfdctd.c]

2007-01-31T00:09:21.445386Z leonardo

Fix (True Type renderer) : Allow TTC format 2.

DETAILS :

Patch from Tor Andersson.

[src/ttfmain.c]

2007-01-30T00:16:34.929061Z L. Peter Deutsch

Documents reduced diffs in 30-07-3 and 30-08-3 (due to -dLOCALFONTS).

[doc/pscet_status.txt]

2007-01-29T10:58:45.949654Z leonardo

Fix (True Type renderer) : Account glyph bbox when setting up the cache device (continued).

DETAILS :

The patch 
http://ghostscript.com/pipermail/gs-cvs/2007-January/007142.html 
appears incomplete. This one fixes that.

[src/zfcid1.c]

2007-01-28T16:53:40.876356Z L. Peter Deutsch

Update 09-56-3.

[doc/pscet_status.txt]

2007-01-27T22:47:05.784106Z L. Peter Deutsch

Marks 13-05-3 as AOK.

[doc/pscet_status.txt]

2007-01-27T22:21:53.454207Z L. Peter Deutsch

Updates 20-14-1 to reflect CPSI/Tek discrepancy (gs is OK).

[doc/pscet_status.txt]

2007-01-27T22:19:38.871909Z L. Peter Deutsch

(empty)

[doc/pscet_status.txt]

2007-01-27T22:16:46.326515Z L. Peter Deutsch

Changes the first argument of the object_type procedure for gs_memory_t
structures from gs_memory_t * to const gs_memory_t *, to clear up a couple
of compiler warnings.

[src/gsmemlok.c src/gsmalloc.c src/gsmemret.c src/gsalloc.c src/iutil.c src/gsmemory.h]

2007-01-27T20:14:52.445142Z L. Peter Deutsch

Fixes two harmless compiler warnings.

[src/iscanbin.c src/sdcparam.c]

2007-01-27T13:53:57.786714Z Alex Cherepanov

Fix a bug, introduced in rev. 7513, that caused /undefined in setpagedevice
when -dNOBIND flag was in effect and a similar bug in restore.

[lib/gs_dps1.ps lib/gs_setpd.ps]

2007-01-26T16:49:00.711282Z Alex Cherepanov

Move image interpolation tweaks from gs_init.ps which runs after pdf_draw.ps
to gs_img.ps which runs before pdf_draw.ps. This way, image operator can be bound
in pdf_draw.ps subject to NOBIND/DELAYBIND flages. Bug 688890, customer 1110.

[lib/gs_img.ps lib/pdf_draw.ps lib/gs_init.ps]

2007-01-26T16:33:54.732615Z Ray Johnston

Fix some gcc compiler warnings.

[src/gsiorom.c]

2007-01-26T16:17:07.791783Z L. Peter Deutsch

Cleans up a couple of compiler warnings.

[src/idstack.c src/isave.c]

2007-01-26T15:07:50.030216Z Alex Cherepanov

Minor clean-up of pscet_status.txt for better parsing.

[doc/pscet_status.txt]

2007-01-26T14:58:58.339198Z L. Peter Deutsch

Updates doc to reflect fixes made by r7642.

[doc/pscet_status.txt]

2007-01-26T01:11:52.301371Z L. Peter Deutsch

Makes FontDirectory (including Local, Global, and Shared) read-only, using
.forceput, .forceundef, and superexec where necessary to modify them.
superexec now affects undef and .setmaxlength as well as put; .dictcopynew
is renamed .forcecopynew and will store into a read-only dictionary, just
like .forceput.  THIS IS A NON-BACKWARD-COMPATIBLE CHANGE required for
fixing numerous diffs in the PS3 CET.

[src/zdict.c lib/gs_dps1.ps lib/gs_fonts.ps src/zgeneric.c lib/gs_init.ps]

2007-01-25T11:10:07.381566Z leonardo

pscet_status.txt : Misprints in 11-19-6 .

[doc/pscet_status.txt]

2007-01-25T11:04:35.971950Z leonardo

pscet_status.txt : (1) Updating 11-19-6 related pages, (2) Passing FontDirectory to Peter.

[doc/pscet_status.txt]

2007-01-24T02:19:24.701691Z Ray Johnston

Change some files to OK that match CPSI that hadn't been updated
due to an error in Ray's regressionthe toolchain from a while ago.
(Problems in toolchain have been resolved).

[doc/pscet_status.txt]

2007-01-24T01:54:13.435614Z Ray Johnston

Change some 09- group tests that were incorrectly reviewed to DIFF (until
Igor can determine whether or not they are a GS problem). At the best they
need to be AOK since GS differs from both CPSI and Tek.

Change some others to OK or AOK to reflect recent improvements detected
during regression testing.

[doc/pscet_status.txt]

2007-01-23T13:42:42.135988Z leonardo

Fix (pdfwrite) : A crash when /OUT pdfmark refers to undefined node.

DETAILS :

Bug 688927 "ps2pdf segfaults on inconsistent subordinate Count parameter in bookmark pdfmarks".

The test document is incorrect, but we must not crash with it.

1. Inserted a check into pdfmark_write_outline.
2. Propagated error code from pdfmark_write_outline.
3. With the test case an error message contained a wrong device name (imain.c).

[src/gdevpdfm.c src/imain.c src/gdevpdf.c]

2007-01-22T23:23:20.791601Z L. Peter Deutsch

Fix a problem created by r7629 (invalidaccess with shading patterns with a
file data source).

[lib/gs_ll3.ps]

2007-01-22T15:44:31.388315Z leonardo

Fix (pdfwrite) : Handle an invalid Type 3 font that misses setcharwidth, setcachedevice[2].

DETAILS :

Bug 688895 "ps2pdf aborts with "Error: /unregistered in --show--"".

The test document embeds an invalid Type 3 font : the character /s32 calls neither
setcachedevice nor setcachedevice2 nor setcharwidth. 

PLRM3 page 339 reads :

[beg quote]
BuildGlyph must execute one of the following operators to pass width and
bounding box information to the PostScript interpreter. This must precede 
execution of any path construction or painting operators describing the glyph.

setcachedevice establishes a single set of metrics for both writing modes, and
requests that the interpreter save the results in the font cache if possible.

setcachedevice2 (LanguageLevel 2) establishes separate sets of metrics for 
writing modes 0 and 1, and requests that the interpreter save the results in the font
cache.

setcharwidth passes just the glyph's width (to be used only once), and 
requests that the glyph not be cached. This operator is typically used only if the glyph
description includes operators to set the color explicitly.
[end quote]

Adobe appears to handle such fonts silently in both Postscript and PDF.
This patch provides same behavior. 

The difference from the old code appears pretty small :
the old code set the charproc_accum flag while executing pdf_text_set_cache,
and the new one does when entering the substream.
The new code even more natural.

In the PDF output, for incorrect glyphs the Width array element 
is set to zero, and d0, d1 operators are not written into the charproc.

Printing a warning about the incorrect charproc appears difficult
due to the necessity to suppress redundant messages.
It needs to add a new field into the gs_font structure.
We do not like to modify the general gs_font structure for such small reason.
Postponing this change until it is requested in prcatice.

[src/gdevpdtt.c src/gdevpdti.c]

2007-01-22T14:34:04.454804Z leonardo

Fix : MSVC8 build of revision 7630 crashes in zupath.

DETAILS :

Herre are rules from "INTERNATIONAL STANDARD cISO/IEC ISO/IEC 9899:1999 
(E) Programming languages - C" :

unary-expression: unary-operator cast-expression
cast-expression: unary-expression
unary-expression: postfix-expression
postfix-expression: postfix-expression ++

Thus *pnargs++ analyzes as *(pnargs++) .

[src/zupath.c]

2007-01-22T10:29:52.528717Z leonardo

Fix (PS interpreter) Discontinue the interpretation on interrupt.

DETAILS :

Bug 688817 "Endless 'interrupt in interrupt' with GSAPI".

When a GSAPI client tries to stop GS by returning a negative value 
from the polling callback function, GS enters an infinite loop 
handling cascading "interrupt" exceptions.

Thanks to SaGS for the patch.

[doc/API.htm src/interp.c]

2007-01-22T07:55:43.384402Z Henry Stiles

Changes to reflect Peter's CET report.

[doc/pscet_status.txt]

2007-01-22T03:26:28.018030Z L. Peter Deutsch

Fixes bug: writeobject/printobject didn't zero out the 'unused' fields in
marks and nulls.  (PS3 CET 23-36-2)

[src/zbseq.c lib/gs_btokn.ps src/iscanbin.c]

2007-01-22T02:44:19.583444Z L. Peter Deutsch

Fixes bug (PS3 CET 17-0[1-5]-3): if a user path ended with extra operand
values, they were not popped from the stack.

[src/zupath.c]

2007-01-21T17:53:13.749920Z L. Peter Deutsch

Fixes the ReusableStreamDecode filter so that it allocates the stream in the
correct VM (per the PLRM3), rather than the current VM, even when it is
necessary to read the entire contents of the source into a string.  (PS3 CET
23-12W-2) Also fixes filters in general so that they allocate the stream in
the correct VM, rather than always allocating in local VM if the current VM
is local.  THIS IS A NON-BACKWARD-COMPATIBLE CHANGE.

[src/zfilter.c lib/gs_frsd.ps src/zfrsd.c]

2007-01-21T09:36:41.173881Z leonardo

Fix (Type 1 hinter) A crash while recognizing a missed flex.

DETAILS :

Bug 688931 "gs segfaults in t1_hinter__fix_missed_flex".

The old code didn't check whether a contour has
enough poles for flex.

[src/gxhintn.c]

2007-01-21T09:35:30.219957Z leonardo

Unwind 7625 due to wrong log message.

[src/gxhintn.c]

2007-01-21T03:37:46.930537Z Alex Cherepanov

Apply standard font substitutions in lib/pdf_fonts.ps::TTfonts 
only for fonts that are not already known to the PS intrepreter. 
This allows to customize font substitutions via the Fontmap.

The change affects only TrueType fonts that are NOT embedded 
(less portable PDFs, for which GS already gives a warning).
Bug 688901, patch from SaGS.

[lib/pdf_font.ps]

2007-01-20T20:44:36.957513Z leonardo

Fix (pdfwrite) Don't reassign object ID for shared descendent fonts.

DETAILS :

Bug 689054 "pdfwrite : missed object".

The old code erroneusely assigned object ID at second time
when a descendent CID font is shared with several Type 0 fonts.

[src/gxhintn.c]

2007-01-20T18:39:23.028704Z leonardo

Fix (pdfwrite) Don't reassign object ID for shared descendent fonts.

DETAILS :

Bug 689054 "pdfwrite : missed object".

The old code erroneusely assigned object ID at second time
when a descendent CID font is shared with several Type 0 fonts.

[src/gdevpdtf.c]

2007-01-20T12:12:17.802265Z leonardo

pscet_status.txt : Updating 29-05-1.

[doc/pscet_status.txt]

2007-01-20T12:09:37.803100Z leonardo

pscet_status.txt : Updating 29-05-1.

[doc/pscet_status.txt]

2007-01-20T11:33:47.048661Z leonardo

pscet_status.txt : Updating 11-19-6 related pages.

[doc/pscet_status.txt]

2007-01-20T00:40:23.279249Z Alex Cherepanov

Adobe interpreters report simple errors in undefineresource operator but
report more complicated errors in the executable name. We are trying to
reproduce this. CET 23-33.

[doc/pscet_status.txt lib/gs_res.ps]

2007-01-19T14:00:14.789036Z Alex Cherepanov

Adobe interpreters have resourcestatus operator but report errors in the
executable name. We do the same now.

[doc/pscet_status.txt lib/gs_res.ps]

2007-01-19T04:09:50.480586Z L. Peter Deutsch

Updates the PDF interpreter for the change in the 'token' operator (r7616),
which now may or may not pop its operand if an error occurs.

[lib/pdf_base.ps lib/pdf_rbld.ps]

2007-01-18T20:25:30.206946Z leonardo

Provide the CPSI compatibility for strokepath.

DETAILS :

This is 1st of 2 closely related changes to gxstroke.c .
It changes behavior in the CPSI compatibility mode only.
The main workers are stroke_add_compat, stroke_add_initial_cap_compat.

The strokepath contours are always positive rather some
older CPSI versions generate negative ones in some circumstances.
We believe that positive contours only is the correct behavior,
because it complies with other contours such as arcs or
character outlines. Otherwise non-zero winding rule filling
gives an unexpected result when combining various paths in a
single path.

[doc/pscet_status.txt src/gxstroke.c]

2007-01-17T21:10:47.794679Z L. Peter Deutsch

For Adobe compatibility (PS3 CET 23-32), changes the token scanner so that
it pops the source operand from the stack and retains a copy of it
internally.  THIS IS A NON-BACKWARD-COMPATIBLE CHANGE: it affects all
callers of scan_token (see src/iscan.h and src/itoken.h), and it also
changes the error behavior of the 'token' operator (the operand is no longer
on the stack if the error is detected during scanning, e.g. syntaxerror).

[src/imain.c src/iscan.c src/itoken.h src/ziodev.c src/interp.c src/iscan.h src/inobtokn.c src/iccfont.c src/iscanbin.c src/imainarg.c src/ztoken.c src/iscanbin.h]

2007-01-17T19:59:36.495603Z Ray Johnston

Fix for (yet another) a PDF file that does not meet Adobe's PDF spec,
but Adobe Reader opens silently. In this case there is an Annotation
that is missing the required /N (Normal Appearance) entry. Bug 689045
for customer 531. Thanks to "SaGS" for this fix.

[lib/pdf_main.ps lib/pdf_draw.ps]

2007-01-17T06:09:38.193145Z L. Peter Deutsch

Removes an unneeded inclusion of interp.h in zfile.c.

[src/int.mak src/zfile.c]

2007-01-17T04:50:36.979684Z Henry Stiles

23-12E-2 fix/analysis from Peter.

[doc/pscet_status.txt]

2007-01-17T03:36:18.909547Z L. Peter Deutsch

Fixes bug (PS3 CET 23-32-4): immediately evaluated names in binary object
sequences were treated as literal (not evaluated).

[src/iscanbin.c]

2007-01-16T17:07:06.634739Z leonardo

Revert strokepath to revision 7213.

DETAILS :

This is 1st of 2 closely related changes to gxstroke.c .

We intend to provide a full CPSI compatibility for
strokepath in the CPSI compatible mode.
Recent chages do not provide it.
Therefore we unwind to the last clean revision,
which we had before starting PS CET compliance.
We will commit a fully different implementation
as the next patch.

This change restores the gxstroke.c revision 7213,
which we had immediately before the 7464 change.
Thus it effectively unwinds the following changes :
Revision 7464 Fri Dec  8 02:22:36 2006 UTC by leonardo 
Revision 7488 Mon Dec 11 00:56:42 2006 UTC by lpd 
Revision 7501 Wed Dec 13 04:15:29 2006 UTC by leonardo 
Revision 7563 Thu Jan  4 18:36:37 2007 UTC by ray 

Rather this change does regress pscet_status.txt,
we don't update pscet_status.txt with this it.
Will update it in the next related patch.

[src/gxstroke.c]

2007-01-16T03:28:39.350220Z Ray Johnston

Fix for regressions introduced with rev 7217 (returning proc as array
rather than packedarray for PS CET 09-33-5.PS. Fixes FTS 050-01.ps and
246-01.ps.

[lib/gs_dps2.ps]

2007-01-15T16:05:00.071592Z leonardo

pscet_status.txt : Updating 16-01-1 and related pages.

[doc/pscet_status.txt]

2007-01-15T11:22:36.413144Z leonardo

Provide the CPSI compatibility for Type1 subglyph placement (continued 3).

DETAILS :

This change is algorithmically equivalent.
It provides a better data naming and documentation.

1. save_lsb is renamed into compound_lsb.
2. Improved some comments.

[src/gstype1.c src/gxtype1.c src/gxtype1.h]

2007-01-15T10:59:56.313683Z leonardo

Provide the CPSI compatibility for Type1 subglyph placement (continued).

DETAILS :

This change is algorithmically equivalent.
It provides a better data naming and documentation.

1. save_asb is renamed into asb.
2. Improved comments for asb_diff, adxy.
3. Used adxy in the overall_x_offset formula in stead save_adxy.
   The letter is a temporary cell for passing seac info across
   the baze glyph.

[src/gstype1.c src/gxtype1.h]

2007-01-15T10:56:38.302709Z leonardo

Provide the CPSI compatibility for Type1 subglyph placement (continued).

DETAILS :

This change is algorithmically equivalent.
It provides a better data naming and documentation.

1. save_asb is renamed into asb.
2. Improved comments for asb_diff, adxy.
3. Used adxy in the overall_x_offset formula in stead save_adxy.
   The letter is a temporary cell for passing seac info across
   the baze glyph.

[src/gxtype1.c]

2007-01-13T18:40:16.945779Z L. Peter Deutsch

Fixes some long-standing data-dependent bugs in the CCITTFaxDecode filter
caused by incorrect initialization.  PS3 CET 23-12E-2.  Also cleans up some
formatting.

[src/scfd.c src/scfe.c src/scfx.h]

2007-01-12T22:15:32.979541Z Russell Lang

Remove old 16-bit Windows code.

[src/gs16spl.c src/gs16spl.rc src/dwmain16.def doc/Develop.htm src/gswin386.rc src/gs16spl.def]

2007-01-12T21:08:02.193820Z Ray Johnston

Mark more files found that had been previously fixed that were still
DIFF. Mark 12-07C-7 OK since it matches Tek hardcopy (no thin lines).

[doc/pscet_status.txt]

2007-01-12T10:23:50.245821Z leonardo

Provide the CPSI compatibility for Type1 subglyph placement.

DETAILS :

Debugged with CET 16-01-1 16-02-1 16-10-1 16-10-2.

The new 'seac' offset formula 'overall_x_offset'
has been empirically derived from placements of
the "round" accent subglyph in the CPSI rendering. 

[doc/pscet_status.txt]

2007-01-12T10:23:19.005476Z leonardo

Provide the CPSI compatibility for Type1 subglyph placement.

DETAILS :

Debugged with CET 16-01-1 16-02-1 16-10-1 16-10-2.

The new 'seac' offset formula 'overall_x_offset'
has been empirically derived from placements of
the "round" accent subglyph in the CPSI rendering. 

[src/gstype1.c src/gxtype1.c src/gxtype1.h]

2007-01-11T18:55:08.974207Z Ray Johnston

Updates for pages fixed as of rev 7598.

[doc/pscet_status.txt]

2007-01-11T10:52:11.037894Z leonardo

pscet_status.txt : Closing issues which appear fixed with rev 7542.

[doc/pscet_status.txt]

2007-01-11T00:01:03.763372Z L. Peter Deutsch

Changes user paths so that in CPSI mode, setbbox appends a moveto only if
the path is otherwise empty.  Fixes a regression in PS3 CET 11-17 caused by
r7512.

[src/zupath.c]

2007-01-10T20:20:52.346731Z Alex Cherepanov

Adobe interpreters appear to accept sampled images in the pattern
color space using the base color space instead of the pattern space.
We do the same in the compatibility mode to meet CET 12-07a-12.

[doc/pscet_status.txt src/zimage.c src/zimage3.c src/iimage.h src/int.mak src/ztrans.c]

2007-01-10T17:04:22.171453Z leonardo

pscet_status.txt : Assigning the 29-05-1 regression.

[doc/pscet_status.txt]

2007-01-10T14:55:01.076741Z leonardo

pscet_status.txt : Taking assignment for strokepath problems.

[doc/pscet_status.txt]

2007-01-10T14:47:52.238215Z leonardo

Implementing a smart filling rule.

DETAILS :

With CET 16-01.PS CPSI fills some contours with the even-odd rule,
and others with non-zero rule.

We implement a new rule, which counts signed even-odd numbers 
for each contour independently, and then summarizes them.

The new rule works for all characters in CPSI mode only.
Probably we don't need it for True Types,
but currently the filling algorithm doesn't recieve
the information about the font type.
Will do later on necessity.

For a faster result we generate more 4 instances of
TEMPLATE_spot_into_trapezoids, which deal with the smart winding only.

Removing Raph's hack about even-odd filing rule for Type 1 (zchar1.c).
The new rule perfectly works instead that together with
the contour sign adjustment, which was inplemented few days ago.

The new array line_list::windings stores winding numbers per contour.
The macro ADVANCE_WINDING computes the smart winding rule.
We wouild like to optimize it (to get a smaller portable code),
suggestions are welcome.

[doc/pscet_status.txt src/gxfilltr.h src/gxfill.c src/zchar1.c src/gxfill.h]

2007-01-10T02:15:52.050522Z L. Peter Deutsch

Adds some PLRM-required but formerly missing legality checks for binary
object sequences, mostly for the benefit of PS3 CET 23-32-2.

[src/ibnum.h src/iscanbin.c src/ibnum.c]

2007-01-09T23:41:08.403891Z leonardo

Type 1 hinter : Implementing a contour sign normalization, part 6.

DETAILS :

Bug 687826 "some glyphs filled in".
This old bug contains more test cases,
which allowed to improve the algorithm.

1. gx_intersect_small_bars returned a root,
   which appears outside the bar 1. 
2. A wrong index in t1_hinter__intersect_curve_bar. 
3. A wrong index in t1_hinter__contour_intersection.
4. Increased MAX_NORMALIZING_CONTOURS to 5 as in the '%' sign.
6. The check for contours number was wrong in 
   t1_hinter__fix_contour_signs.

[src/gxhintn1.c src/gsmisc.c]

2007-01-09T21:15:01.944411Z leonardo

Type 1 hinter : Implementing a contour sign normalization, part 5.

DETAILS :

Removes bugs from the last patch.
It finaly closes Bug 688947  
"Ghostscript renders font incorrectly (letter 'o' filled in)",
but CET 16-01.PS still has problems.

1. 'e2' was wrong - Debugged with a.pdf .
2. (optimization) Return if no nesting contours.
   nesting_sum works for that.
3. Removed the check "this->subglyph_count <= 1",
   which was entirely wrong.   
4. In zchar1.c restoring Raph's trick about 
    using even-odd filling rule in the CPSI compatible mode.
   It was unintentionally removed by the last patch.
   No, we don't want it to live prmanently,
   but now it's not the right time for removing it.

[src/gxhintn1.c src/zchar1.c]

2007-01-09T18:40:39.016764Z leonardo

Type 1 hinter : Implementing a contour sign normalization, part 4.

DETAILS :

This fixes the bug 688947  
"Ghostscript renders font incorrectly (letter 'o' filled in)".

The new code recognized wrong contour signs
for non-resident Type 1,2,11 fonts
and fix contour signs with reversing wrong contours.

[src/lib.mak src/gxhintn.c src/gxhintn1.c doc/Develop.htm src/gxhintn.h src/zchar1.c]

2007-01-09T18:36:48.563296Z leonardo

Type 1 hinter : Implementing a contour sign normalization, part 3.

DETAILS :

This is continuation of the preparation for fixing the bug 688947  
"Ghostscript renders font incorrectly (letter 'o' filled in)".

This change is algorithmically equivalent.
It factors out gx_intersect_small_bars from the shading code.

[src/lib.mak src/gxfixed.h src/gsmisc.c src/gxshade6.c]

2007-01-09T14:19:27.902081Z L. Peter Deutsch

Fix a typo in the description of 23-12U-1 (which is now fixed).

[doc/pscet_status.txt]

2007-01-09T01:54:00.530728Z L. Peter Deutsch

Changes the token scanner so that ^D is not a self-delimiting character when
scanning a string.  This still treats ^D as a self-delimiting end-of-job
marker when reading from a file, while matching CPSI on PS3 CET 21-11-2.

[src/iscan.c lib/gs_pdfwr.ps]

2007-01-09T01:39:44.244785Z Henry Stiles

Update to reflect Peter's fixes and analyis.  Also reassign color
problems to Raph.

[doc/pscet_status.txt]

2007-01-08T22:02:29.175398Z Ray Johnston

Updates from regressions, Assign some previously unassigned pages,
correct some 'bad entry' lines (seen by the perl script).

Note there have been many pages that had significant differences
previously marked OK, that are now fixed. We may need to recheck
some of the high difference count pages that have no explanation
(such as "matches Tek hardcopy").

[doc/pscet_status.txt]

2007-01-08T20:12:52.623854Z Ray Johnston

Make sure there is a default value (0) for DEBUGSYSM. Fixes an non
debug syntax error seen by nmake.

[src/msvccmd.mak]

2007-01-08T15:04:53.833474Z leonardo

Type 1 hinter : Implementing a contour sign normalization, part 2.

DETAILS :

This is continuation of the preparation for fixing the bug 688947  
"Ghostscript renders font incorrectly (letter 'o' filled in)".

This change is algorithmically equivalent -
the new stuff works idle.
It define necesary data structures and flows
for storing information about subglyphs.
The implementation itself will be a next step.

[src/gstype1.c src/gstype2.c src/gxhintn.c src/gxhintn.h]

2007-01-08T12:50:48.444121Z leonardo

Type 1 hinter : Implementing a contour sign normalization, part 1.

DETAILS :

This is a preparation for fixing the bug 688947  
"Ghostscript renders font incorrectly (letter 'o' filled in)".

Several fonts in wild appear to violate the Type 1
restriction for inner contours to be of negative sign.
They cause a wrong rendering of some glyphs,
such as 'o' in the test case. Rather we consider
those fonts to be incorrect, we need a workaround for them
because this annoying problem appears too frequently.
At last CET 16-01.PS defines such font.

We assume that True Types always have right contours,
because (1) we didn't meet such cases in practice.
We also assume that resident fonts always have right contours,
bvecause resident fonts usually don't come from wild.

Therefore we need 4 working modes for type 1 hinter :
1. "pass_through" : no hinting, no contour adjustment.
   Works for resident fonts of a big size,
   and/or when the target is the path bbox accumulator.
2. "disable_hinting" : no hinting, contour ajdustment is on.
   Works for non-resident Type 1 fonts of a big size,
3. The hinting is enabled, the contour adjustment is disabled.
   Works for not-big non-resident fonts except True Types.
   We want to save CPU time expense from the contour adjustment.
4. The hinting is enabled, the contour adjustment is enabled.
   Works for not-big embedded Type 1 fonts.

This change is algorithmically equivalent.
It define necesary flags and data flows,
which will be used in the implementation.
The implementation itself will be a next step.

[src/gstype1.c src/gstype2.c src/gxhintn.c src/gxhintn.h]

2007-01-08T05:50:33.566930Z L. Peter Deutsch

Cleans up a couple of compiler warnings.

[src/geninit.c]

2007-01-08T04:15:31.387003Z Alex Cherepanov

Change status of CET 12-13-5 to OK. The test works for me. There's no
differences around 30 and 31 in left column or anywhere else. The checksum
matches too.

[doc/pscet_status.txt]

2007-01-07T21:05:45.304456Z Ray Johnston

Update to reflect improvements from rev 7563 (strokepath fix). Thanks to
Tim Osborn for this fix. Minor revision to analysis on some that still have
other problems in addition to the strokepath.

Note that a few pages that should have been classified DIFF had substantial
difference counts due to the strokepath incompatibility. These remain as
OK, but the status line now reads "Fixed by rev 7563."

[doc/pscet_status.txt]

2007-01-07T17:44:41.459825Z leonardo

Fix (shadings) : Ignore a huge BBox.

DETAILS :

Bug 689027 "Error: /rangecheck in --.buildshading2--".

A buggy software "xFlow Normalizer 1.0" created a huge shading BBox.
Adobe appears to ignores it silently.
In this case the clipping box sets a natural extent for the shading.

[src/gsshade.c]

2007-01-07T06:48:38.482771Z Ralph Giles

Code cleanups. Add a license, and move some things into functions. This 
version has not been tested.

[toolbin/tests/run_parallel]

2007-01-07T06:47:46.661532Z Ralph Giles

Check in rough script for launching a parallel regression run on an 
OpenPBS-based cluster queuing system. This script runs 'upnodes' and 
chooses a likely target and job size, generates comparefiles.* and 
testing.cfg.* for each node, then submits the job.

Output is returned as a file in the launch directory 
'run_regression..e' when the run is finished.

[toolbin/tests/run_parallel]

2007-01-07T06:42:22.794330Z Ralph Giles

Changes to the regression tools to facilitate parallel runs.

DETAILS:

Add a scratchdir entry to testing.cfg to specify where temporary files
should be created instead of using the current working directory. 

Override various TextTestResult methods to print 'checking...result'
all at once instead of waiting while the job runs to reduce log 
mangling. The old behaviour was helpful behavior in an interactive 
serial run, but not running in batch mode.

If the PBS_NODENUM environment variable is set, use it to select a 
custom testing.cfg.

If PBS_NODENUM is set, only run the source tests when it is zero to
avoid duplicating these.

[toolbin/tests/gscheck_raster.py toolbin/tests/gstestutils.py toolbin/tests/gscheck_pdfwrite.py toolbin/tests/run_regression toolbin/tests/testing.cfg.example toolbin/tests/gsconf.py]

2007-01-06T20:35:32.380662Z leonardo

Fix : 'show' must throw error when the current font is a CID font resource.

DETAILS :

Only 'glyphshow' is allowed when the current font is a CID font resource,
except for a cshow procedure - see comment in op_show_finish_setup.

Debugged with CET 32_all.PS page 14.

[doc/pscet_status.txt src/zchar.c]

2007-01-06T19:16:16.587431Z leonardo

pscet_status.txt : Improve some syntax/analyzis/assignments.

[doc/pscet_status.txt]

2007-01-06T08:01:06.162417Z Ralph Giles

Correct a typo.

[toolbin/tests/check_source.py]

2007-01-06T07:46:31.224903Z Ralph Giles

Exempt the jobseparator scriptlet from the Id line check.

[toolbin/tests/check_source.py]

2007-01-06T07:46:01.131216Z Ralph Giles

Exempt the jobseparator scriptlet from the Id line check.

[lib/jobseparator.ps]

2007-01-06T07:42:52.202240Z Ralph Giles

Add and Id line and appropriate properties to gs_cet.ps.

[lib/gs_cet.ps]

2007-01-05T21:23:35.938833Z leonardo

Fix : Cygwin/gcc warnings.

[src/zimage.c src/gxfcopy.c src/zcharx.c src/int.mak src/ttfmain.c src/gstext.h src/gdevpdti.c]

2007-01-05T20:44:21.517052Z leonardo

Fix (True Type renderer) : Account glyph bbox when setting up the cache device.

DETAILS :

Debugged with CET 34_all.PS page 4.
An embedded True Type font has an incorrect FontBBox :
parts of glyphs appear outside it. Uniting it with
glyph bbox helps. However using glyph bbox only
doesn't work for Dynalab fonts, so this change includes
a voluntary solution which unites FontBBox and glyph bbox.

This patch slightly change the prototypes of 
gs_type42_data_s::get_outline and gs_font_cid2_data_s::get_outline,
and their implementations. We believe that this change
must be compatible, except a case of a wrong walue was passed 
to 'wmode' argument. The PCL group must check that 
it never pass other values than 0 or 1.
In the new code the 'wmode' argument is replaced
with options enum, and other values require a bigger
array for the last argument. See commenmts in code
and the extended implementation in gs_type42_default_get_metrics.

The function zchar42_set_cache has been re4written 
to simplify its understanding. Now it accounts
the glyph bbox. We noticed that the old code 
with WMode 1 set 'w' equal to horizontal width,
which looks incorrect. The new code sets the vertical width.
Also the old code did an unuseful call to get_metrics
when WMode=1 and the vertical metric presents in the font.

The function gs_type42_default_get_metrics has been removed
due to low use. The new code replaces it with pfont->data.get_metrics.
We didn't find calls to it from the PCL code.

[doc/pscet_status.txt src/zchar42.c src/gxfont42.h src/gstype42.c src/gxfcid.h]

2007-01-05T05:19:34.969963Z Henry Stiles

Changes required for gslite release.  The new error macros did not
work with MSVC version 8.  There are still portability issues with
these macros that preclude regular use in ghostscript but they are
used by a few clients that have "looser" portability requirements.
gp_mslib.c (probably dead code) did not compile.

[src/gp_mslib.c src/gserror.h]

2007-01-05T01:53:32.094694Z Alex Cherepanov

Change the status of CET 13-03-04 and 13-12-06 to OK.
Ghostscript matches Tek hardcopy; PhotoPRINT is wrong here.

[doc/pscet_status.txt]

2007-01-05T00:48:11.270570Z Alex Cherepanov

Change the order of argument checking in awidthshow operator. Check that the
character code is in the range 0 to 255 for the base fonts. Fix CET 13-02-05. 

[doc/pscet_status.txt src/zchar.c]

2007-01-04T18:36:37.189208Z Ray Johnston

Fix stroke line cap and line join for Adobe compatibility. Fixes PS CET pages:
09-24-2 09-25-2 09-26-2 09-27-3 09-30-3 09-33-3 09-38-2 09-40-23 09-41-2 09-42-5
09-43-5 09-44-5 09-48-2 09-49D-1 09-52-2 09-53-5 09-54-6 09-57-14 11-07-5 11-21-3
11-28-2 13-13-8. Thanks to Timothy Osborn for this fix.

DETAILS:

There is a slight performance impact (6%) so a follow-up change will be developed
that only generates the new style (Adobe compatible) paths when we are doing the
"strokepath" operation, not for normal "stroke".

[src/gxstroke.c]

2007-01-04T15:48:57.600517Z Alex Cherepanov

Change the order of argument checking in widthshow operator. Check that the
character code is in the range 0 to 255 for the base fonts. Fix CET 13-26-04. 

[doc/pscet_status.txt src/zchar.c]

2007-01-03T14:39:50.977219Z leonardo

pscet_status.txt : Updating status for 34_all-4.

[doc/pscet_status.txt]

2007-01-03T14:38:47.322215Z leonardo

pscet_status.txt : Updating status for 34_all-4.

[doc/pscet_status.txt]

2007-01-03T10:50:15.001696Z leonardo

pscet_status.txt : Updating status for 38-01-1.

[doc/pscet_status.txt]

2007-01-03T10:30:52.705972Z leonardo

Fix : Adding OrigFont to CIDFont resources for CPSI conformity.

DETAILS :

Debugged with CET 33_all.PS .

[doc/pscet_status.txt lib/gs_cidfn.ps]

2007-01-03T09:58:15.957518Z leonardo

pscet_status.txt : Updating status for 23-36-2.

[doc/pscet_status.txt]

2007-01-03T08:43:12.193598Z leonardo

pscet_status.txt : Fixing some misprints.

[doc/pscet_status.txt]

2007-01-03T08:33:48.854716Z leonardo

pscet_status.txt : Updating status for 21-11-2.

[doc/pscet_status.txt]

2007-01-02T22:03:43.389414Z Ray Johnston

Update with some fixes found during regression of rev 7534.

[doc/pscet_status.txt]

2007-01-02T19:58:30.890285Z Ray Johnston

Fix for yet another broken PDF that AR handles silently, specifically, a
/Count value of 0 for the Pages tree. When the Count is 0, find the page
count by walking the Pages tree. Bug 689008 for customer 580 and 460.

[lib/pdf_main.ps]

2007-01-02T15:05:34.582481Z leonardo

pscet_status.txt : Updating status for 18-02G-1.

[doc/pscet_status.txt]

2007-01-02T15:02:58.997085Z leonardo

pscet_status.txt : Updating status for 18-02G-1.

[doc/pscet_status.txt]

2007-01-02T14:22:21.841353Z leonardo

pscet_status.txt : Updating status for 18-01A-1.

[doc/pscet_status.txt]

2007-01-02T11:36:03.990718Z Russell Lang

Update the Windows INF file to allow the Ghostscript PPD to be
installed on 64-bit Windows.

[lib/ghostpdf.inf]

2007-01-02T10:05:09.465463Z leonardo

pscet_status.txt : Updating status for some files.
Delaying glyph rendering problems because they require 
a deep development. Marking them with "Assign:-".

[doc/pscet_status.txt]

2007-01-02T04:58:50.214832Z Alex Cherepanov

Implement setucacheparams, ucachestatus using MaxUPathItem user parameter
to match CET 27-05-02. The test results mow match Tek 360 hard copy.

[doc/pscet_status.txt lib/gs_dps2.ps lib/gs_lev2.ps]

2007-01-01T10:13:59.639678Z leonardo

pscet_status.txt : Updating status for 14-12-3.

[doc/pscet_status.txt]

2007-01-01T03:55:18.804213Z Alex Cherepanov

CET 13-10-5 is marked as Works for me in rev. 7543

[doc/pscet_status.txt]

2007-01-01T03:00:15.457477Z Russell Lang

Remove documentation about Windows printing to LPT1: because it 
hasn't worked since we ceased to include gs16spl.exe.
Prevent attempts to use -sOutputFile="LPT1:" on Windows because 
it locks up.

[doc/Use.htm src/gp_mswin.c doc/Install.htm]

2006-12-31T22:14:23.520668Z Russell Lang

Remove Windows 16-bit and Win32s printer code.  
Update release year in Windows installer to 2007.

[src/bcwin32.mak src/dwsetup.rc src/winint.mak src/watcw32.mak src/gp_mswin.c src/gp_msprn.c]

2006-12-31T17:50:40.948265Z leonardo

Fix : Early check a text to font compatibility.

DETAILS :

Running CET 14-03.PS page 2, CPSI trows a rangechek with no painitng charaters.
However Ghostscript performs the check immediately before
rendering a character. If the check fails in a middle of the text,
the preceding charaters are painted. 

The new code scans entire text before rendering a character.
We do so in CPSI compatibility mode only,
because we don't want a performance flaw for
dual scanning in the Ghostscript native mode.

1. gs_text_size is renemed into gs_text_count_chars 
   for a better reflection of its semantics.

2. The check in zyshow is made conditional
   depending on CPSI_mode. This is an improvement
   for the last patch, which is not related to 
   the current problem (zcharx.c).

3. Inserted the text scanning into op_show_finish_setup
   (zchar.c).

4. After we did all bove, 14-01.PS got cycled in alloc_char_in_chunk.
   This effect occasionally depends on 1-3 because 
   they change the cache memory map.
   Fixed with inserting the call to gx_free_cached_char into gxchar.c .

5. gs_text_count_chars was implemented with gs_text_begin,
   which appears too heavy for the simple text decomposition.
   Particularly it caused a proiblem with stringwidth,
   because gs_text_begin establishes an extra save level
   for stringwidth. The new code calls gs_text_enum_init 
   instead gs_text_begin. Due to that gs_text_count_chars 
   is moved to gxchar.c, which defines default_text_procs privately. 

[doc/pscet_status.txt src/gxchar.c src/gstext.c src/zcharx.c src/zchar.c]

2006-12-30T22:58:47.430654Z Ralph Giles

Record the regression run time in the nightly report.

[toolbin/tests/run_nightly]

2006-12-30T13:31:18.340006Z leonardo

Fix : Don't check type of extra width elements with yshow.

DETAILS :

CET 13-29.PS page 2 defines a longer width array
then the text requires, and CPSI silently ignores extra elements.
So yshow needs to compute exact number of characters 
to know how many elements to load and type check.

The new function gs_text_size is factored out from the
recently added code so that zcharx.c can share it.

Minor change : Improving a comment in gspaint.c,
with another issue recently discovered.
It's not related to the yshow problem.

[doc/pscet_status.txt src/gstext.c src/zcharx.c src/gstext.h src/gspaint.c]

2006-12-30T11:50:34.673289Z Alex Cherepanov

Updating status for 11-20-9

[doc/pscet_status.txt]

2006-12-30T11:06:55.417315Z leonardo

pscet_status.txt : Updating status for 13-23-1.

[doc/pscet_status.txt]

2006-12-30T10:40:18.858942Z leonardo

pscet_status.txt : Updating status for 10-15-2 (final).

[doc/pscet_status.txt]

2006-12-30T09:08:31.731942Z leonardo

pscet_status.txt : Updating status for 10-15-2.

[doc/pscet_status.txt]

2006-12-30T06:15:56.641068Z Ray Johnston

Note some pages that now have no differences as detected during
regression testing.

[doc/pscet_status.txt]

2006-12-29T20:59:39.890840Z leonardo

Fix : The CPSI compatibility for 'clippath' starting point.
pscet_status.txt : A better classification for strokepath problems.

DETAILS :

Debugged with :
CET 13-22.ps page 6, the item much13;
CET 11-11.PS page 6, the item much13
See comment in code.

[doc/pscet_status.txt src/gsdps1.c]

2006-12-28T13:08:56.928281Z leonardo

pscet_status.txt : Passing more problems to ray since they have same reason - 
either strokepath ending point, or clippath starting point.
For details see comments added into pscet_status.txt .

[doc/pscet_status.txt]

2006-12-28T09:51:38.919829Z leonardo

pscet_status.txt : Changing assignment for 13-22-6 cash25 as discussed with Ray.

[doc/pscet_status.txt]

2006-12-27T18:27:55.782637Z leonardo

Fix : 'clippath' didn't set the current point.

DETAILS :

The bug has been introduced when we implemented the current point in 'double'.
It caused an inconsistent result when 'show' follows 'clippath',
because 'show' still uses pgs->ppath->position.
Debugged with CET 13-22.ps page 6, the item much13. 

We would like to avoid the usage of pgs->ppath->position,
but currently we nave no time for a complete analyzis.
Delaying it for better times. See bug 689031.

[src/gspath.c]

2006-12-27T11:59:15.544173Z leonardo

pscet_status.txt : A better analyzis for 13-20-6, 13-22-6.

[doc/pscet_status.txt]

2006-12-26T05:29:37.040603Z Alex Cherepanov

Calculate the old bounding box using the function that takes into account the
bounding box set by setbbox operator.

DETAILS:
This patch doesn't affect any reported bugs, CET test or regression test files.
Before the patch the following (correct) program didn't run on Ghostscript:
0 0 moveto 0 0 1000 1000 setbbox 100 100 105 105 setbbox 0 0 moveto 100 100 lineto

[doc/pscet_status.txt src/gsdps1.c]

2006-12-25T18:11:49.235030Z Alex Cherepanov

Record the fact that 11-13-4 works in rev. 7527.

[doc/pscet_status.txt]

2006-12-25T07:43:44.555732Z leonardo

pscet_status.txt : A better analyzis for recent regression, assigning to the author.

[doc/pscet_status.txt]

2006-12-24T11:46:11.723531Z leonardo

Fix (font renderer) : Expand the Type 3 character box to negative coordinates.

DETAILS :

setcachedevice, setcachedevice defines a box for clipping a character image.
According to Postscript specification, "If any marks fall outside this
bounding box, the result is unpredictable." (See PLRM3 page 659).

Some CET tests defines a Type 3 characters, which have the bbox
[0 0 1000 1000] and then execute "10 10 1000 1000 rectstroke" for 
painting the character. Some parts of that rectangle fall slightly 
outside the box, but both CPSI and Tek paint them.

When caching a character, the old Ghostscript code expands the character box to
increasing coordinates. It allows to paint charater elements,
which fall slightly outside the box. However the old code doesn't
expand to negative (decreesing) direction, causing an asymmetric behavior.
For example in CET 13-18.PS a Type 3 charater missed its elements
depending on the device initial matrix : with display device
the character doesn't miss elements, but with ppmraw device 
(which has initial matrix with mapping Y upside down)
the character missed a horizontal line, which with 600dpi falls to 
t5he pixel coordinate Y=-1.

This patch provides the box expansion in all 4 directions.
Rather the problem happens mainly with Type 3 fonts
the patch changes the behavior for all font types.

Note : Some characters may occupy a bigger space in the cache,
so the memory map changes.

Note2 : We're not sure why the old code expands the box
in 2 pixels. Likely 1 pixel is a strong expansion, 
and another one compensates an inaccurate rounding.
We don't change it now to minimize raster differences.

[doc/pscet_status.txt src/gxchar.c]

2006-12-24T08:31:52.050751Z leonardo

pscet_status.txt : A better analyzis for few problems.
Note some regressions appeared.

[doc/pscet_status.txt]

2006-12-22T19:59:43.737163Z Ray Johnston

Properly handle ASCII85EncodePages=true for the Contents streams. This was
not implemented previously. Bug #689030 for customer #1.

[src/gdevpdfu.c]

2006-12-21T17:10:15.748193Z leonardo

pscet_status.txt : A better analyzis for few problems.

[doc/pscet_status.txt]

2006-12-21T01:15:17.469745Z Ralph Giles

Remove Copying.htm from the documentation. It is no longer relevant now 
that the tree is GPL.

[doc/Copying.htm doc/Readme.htm doc/Release.htm]

2006-12-20T04:44:43.534483Z leonardo

pscet_status.txt : An improved analysis for few problems.

[doc/pscet_status.txt]

2006-12-20T04:38:57.997599Z leonardo

pscet_status.txt : An improved analysis for few problems.

[doc/pscet_status.txt]

2006-12-18T23:03:42.655320Z Raph Levien

Fix: Don't read past end of input image stream in simscale.c. Fixes
bug #689029.

[src/simscale.c]

2006-12-18T17:56:27.005565Z leonardo

Fix (TrueType renderer) : Always access metrics via get_metrics callback.

DETAILS :

This change is important for PCL interpreter.
Some PCL downloadable fonts have no hmtx, vmtx tables
and define glyph metrics externally.
Likely we missed this functionality when attached
the TrueType bytecode interpreter from FreeType.

For both Postscript and PCL the new code is not equivalent 
to old one when processing a composite glyph
with grid fitting. For each subglyph, the old code sets phantom points
with the subglyph's metrics. The new code does with the glyph's metrics. 
We believe that the old code was not correct because its grid fitting 
can wrongly account the placement of a subglyph in the main glyph.
Rether we didn't find a practical case when it happens.

We can't directly access the font's get_metrics callback from ttfmain.c,
therefore we introduce an intermediate callback ttfReader::get_metrics.
It happens because TrueType bytecode interpreter doesn't compile
with Ghostscript headers. 

[src/gxttfb.c src/ttfmain.c src/ttfoutl.h]

2006-12-18T05:00:00.292210Z leonardo

Fix  : Removing a dead code about USE_ttfReader.

DETAILS :

USE_ttfReader was introduced for PCL needs due to a poor design.
Novadays PCL code doesn't use it - sets always true.

[src/gxfcopy.c src/gxccman.c src/gxfont42.h src/gstype42.c src/zfont42.c]

2006-12-17T13:56:52.138834Z leonardo

Fix (shadings) : A fixed overflow happened while computing a color (continued).
THIS IS INCOMPATIBLE CHANGE : The device virtual method 
fill_linear_color_scanline now restores the semantics, 
which was defined before revision 7510. 
In other words, this incompatible change reverts 
the recent incompatible change.

DETAILS :

Debugged with CET 12-14O.PS SpecialTestJ02Test12.

A scanline gradient could overflow because 
the pixel span may be few wider than the spot span
due to pixel rounding.
To prevent the overflow, we base the color proportion
on the last pixel inside the span.
See comments in code.

We decided to remove "half color values"
(which were introduced in revision 7510)
from the device interface because 
they bring an extra complexity.

[src/gdevdsha.c src/gdevddrw.c]

2006-12-17T00:26:30.159180Z Russell Lang

Remove obsolete references to Windows 3.1 and Win32s.

[doc/Use.htm doc/Make.htm doc/Source.htm doc/Install.htm]

2006-12-16T22:02:38.700510Z Ray Johnston

Add a simple (one line) file that can be used bwtween files on the command line
or files run with the 'run' operator to execute the systemdict version of the
^D (ctrl-D) action to end an encapsulated job and start a new one.

This is needed since some PS files redefine <04> to a no-op (such as the PS CET
and the PSCRIPT5 Windows driver). This can be used with or without -dJOBSERVER,
but <04> is a no-op unless -dJOBSERVER is used.

[lib/jobseparator.ps]

2006-12-16T20:41:10.316519Z Ray Johnston

Fix setpagedevice /Install procedure handling so that a error from the Install
will restore the previous (presumably correct) Install and apply the Policies
for the error handling. Also fix the .execinstall so that the plumbing will
leave a predictable number of elements on the stack in case of an error.
Bug #689020 for customer #661.

DETAILS:

The .execinstall needed fixing since it could leave one extra element on the
operand stack, but sometimes it would not. The oparray_cleanup of the error
handling _would_ restore the op stack to the point where .execinstall was
invoked, but at that point, the procedure operand was part of the old stack
count. This meant that if the Install procedure pushed something on the op
stack before getting the error, it would be there after the 'stopped', but
if it didn't push anything, the stacks would be the same as if the exec was
OK.

By duplicating the procedure prior to the exec in .execinstall, we insure
that there will always be that value on the stack when stopped returns
'true'. Normal execution doesn't change and will pop the extra value created
by the 'dup'.

EXPECTED DIFFERENCE:

None.

[lib/gs_setpd.ps]

2006-12-15T18:08:57.832104Z L. Peter Deutsch

Fixes several user path problems: upath didn't signal nocurrentpoint for
empty paths in CPSI mode; appending an empty user path didn't set current
point in CPSI mode. (PS3 CET 13-27-3, 13-28-4, 13-29-3)

[src/zupath.c]

2006-12-15T18:06:08.730263Z L. Peter Deutsch

Fixes bug: gs_upmergepath didn't propagate the imager state current_point
members.

[src/gspath.c]

2006-12-15T01:58:02.667973Z leonardo

Fix (shadings) : A fixed overflow happened while computing a color.
THIS IS INCOMPATIBLE CHANGE : The device virtual method 
fill_linear_color_scanline now gets half color values 
as the gradient parameters.

DETAILS :

Debugged with CET 12-14O.PS SpecialTestJ02Test12.

A scanline gradient could overflow because 
the pixel span may be few wider than the spot span
due to pixel rounding.
Rather the expansion is always pretty small, it could cause
an int32_t overflow when storing the right limit pixel color
(which actually is never riched, because the filling algorithm
never paints the right boundary). However it caused a wrong
result in some cases.

See comments in code.

[doc/pscet_status.txt src/gdevdsha.c src/gdevddrw.c]

2006-12-14T21:40:07.608049Z leonardo

Fix (shadings) : Align coordinate data and color data to byte boundary (continued).

DETAILS :

Debugged with CET 12-14O.PS page 2.
The recent patch for the subject appears incomplete.
After debugging with more tests (ShadingType 5), 
the parameter align_color_data appears always false and goes away.

[doc/pscet_status.txt src/gxshade.c src/gxshade4.c src/gxshade.h]

2006-12-14T20:24:33.168948Z Ray Johnston

Mark some fixes detected in regression run (exact fix rev unknown -- probably
from lpd). Note that 23-12W-2 now has only a single difference.

[doc/pscet_status.txt]

2006-12-14T19:40:32.852985Z L. Peter Deutsch

For Adobe compatibility, makes 'show'-type operators signal nocurrentpoint
immediately, rather than when rendering the first character, if there is no
current point. (PS3 CET 13-27-3, 13-28-4, 13-29-3, and possibly others)

[src/gstext.c]

2006-12-14T16:28:49.465661Z leonardo

Fix (pdfwrite) : Improve the handling of SMask.

DETAILS :

The old code writes "/SMask 0 0 R" when a GState with no SMask
folows another with SMask.

Bug 689023 "regression fails with /rangecheck in --run--".
Debugged with Bug688631.pdf .

[src/gdevpdfg.c]

2006-12-14T15:50:54.428992Z L. Peter Deutsch

Changes {x,y,xy}show to check at the beginning whether the widths array is
large enough, rather than detecting this on the fly, for Adobe
compatibility. (PS3 CET 13-27-3, 13-28-4, 13-29-3)

[src/gstext.c]

2006-12-14T13:54:09.094929Z leonardo

Fix (Resource machinery) : Place temporary 'resourceforall' data into the local VM.

DETAILS :

This is an improved version of the 7449 change, 
which has been unwinded in the revision 7487,

The old code placed them into global VM,
rather some their elements may be in local VM.
Fixes the cash06 diff in PS3 CET 30-07-3.

Thanks to L. Peter Deutsch for locating the wrong code parts.

[lib/gs_resmp.ps lib/gs_res.ps lib/gs_cidcm.ps]

2006-12-13T21:18:20.233553Z L. Peter Deutsch

Fixes bug: if the source of a ReusableStreamDecode filter was a string, the
filter did not appear to be closed after executing closefile.  (PS3 CET
23-12W-6)

[src/stream.c]

2006-12-13T07:31:41.174327Z Henry Stiles

reassignments to Peter.

[doc/pscet_status.txt]

2006-12-13T04:15:29.131303Z leonardo

Fix (stroking) : The CPSI compatibility about the strokepath starting point (continued).

DETAILS :

The last patch allocates an insufficient buffer for gs_join_triangle.
It caused a wrong resiult with PCL.

[src/gxstroke.c]

2006-12-13T01:45:35.876588Z Ralph Giles

Add recent new source files to the documentation.

[doc/Develop.htm doc/Psfiles.htm]

2006-12-13T01:06:05.344921Z leonardo

Fix : Line join was missed at 'closepath'.

DETAILS :

Debugged with CET 12-12.PS page 10.

[src/gxpdash.c]

2006-12-13T00:58:41.577412Z leonardo

Fix : A CPSI compatibility for 'rectstroke'.

DETAILS :

Debugged with CET 12-12.PS page 8, 10.

PLRM doesn't specify the contour starting point for 'rectstroke'
when the rectangle width and/or height is negative.
CPSI and the old Ghostscript appear to produce different results, 
which is important with dashing. The patch provides the CPSI
compatibility when CPSI_mode is true.

[doc/pscet_status.txt]

2006-12-13T00:26:05.505126Z Ralph Giles

Reenable the jpxparmfix call, after making it check specifically for a 
JPXDecode filter. Adding a ParmDict to filters that don't take 
parameters caused problems with some PDF files. Bug 688869.

[lib/pdf_base.ps]

2006-12-12T10:22:38.092916Z Russell Lang

Windows documentation updates.

[doc/API.htm doc/Install.htm]

2006-12-12T06:26:11.719558Z L. Peter Deutsch

Fix some misspellings ("schedulled"), and remove a duplicate .undef.

[lib/gs_init.ps]

2006-12-12T04:25:21.491153Z leonardo

Fix : A CPSI compatibility for 'rectstroke'.

DETAILS :

Debugged with CET 12-12.PS page 8, 10.

PLRM doesn't specify the contour starting point for 'rectstroke'
when the rectangle width and/or height is negative.
CPSI and the old Ghostscript appear to produce different results, 
which is important with dashing. The patch provides the CPSI
compatibility when CPSI_mode is true.

[doc/pscet_status.txt src/gsdps1.c]

2006-12-12T02:43:40.792357Z L. Peter Deutsch

Fixes bug: the ReusableStreamDecode filter treated Intent values other than
0..3 as errors, rather than as equivalent to 0. PS3 CET 23-12V-1

[src/zfrsd.c]

2006-12-11T20:28:37.478193Z Ray Johnston

Mark as OK two pages fixed by rev 7489. Note that improvements were made on
the following: 23-12G-1, 23-12L-1, 23-12M-1, 23-12N-1, 23-12O-1, 23-12P-1.

There were no regressions on the PS CET as a result of rev 7489 changes to
the filter pipeline handling.

[doc/pscet_status.txt]

2006-12-11T17:30:53.980862Z L. Peter Deutsch

Fixes bug: the PNG predictor filters produced incorrect data for the last
pixel of each row.  (The encoder and decoder had matching bugs, so
encode+decode produced the correct result!)  Fixes a diff in PS3 CET
23-12U-1.

[src/spngp.c]

2006-12-11T04:48:55.149758Z L. Peter Deutsch

Raises the maximum value of Colors for PNG and PDiff filters from 16 to 60,
to prevent rangechecks in some PS3 CET 23-12{L,M,N,O,P}.

[src/zfdecode.c src/spngpx.h src/spdiffx.h]

2006-12-11T01:28:57.882333Z L. Peter Deutsch

Fixes bug: closing a filter pipeline with more than one adjacent temporary
stream (such as a compression filter with a predictor whose target was a
procedure) failed to flush all intermediate buffers, causing failures in PS3
CET 23-12*.  NOTE: This code (stream.c:swritebuf) is extremely delicate.
Regression checking is essential!

[src/stream.c]

2006-12-11T00:56:42.572973Z L. Peter Deutsch

Removes 3 compilation warnings.

[src/gxpath.h src/gxstroke.c]

2006-12-10T20:25:51.293218Z Stefan Kemper

This is a reversion to r7448
The 7449 commit created a regression where the 
language switch build wouldn't initialize. 

[lib/gs_resmp.ps lib/gs_res.ps lib/gs_cidcm.ps]

2006-12-10T19:50:24.509997Z Henry Stiles

Updates from Peter.

[doc/pscet_status.txt]

2006-12-10T09:52:06.915864Z leonardo

A better analyzis for 12-12.PS .

[doc/pscet_status.txt]

2006-12-09T08:54:37.108427Z Russell Lang

Partial fix for bug 687981, changing the PPD only for Windows 2k/XP.
The INF changes for Windows 95 etc. are not included in this change.

[lib/ghostpdf.ppd]

2006-12-09T08:42:56.477752Z leonardo

Update CET test status for 12-08A-5, 12-08A-6, 12-11-4.

[doc/pscet_status.txt]

2006-12-09T08:32:28.403891Z leonardo

Fix : A wrong 'frac' color comparison caused an incorrect 12 and 16 bpc image rendering.

DETAILS :

Debugged with CET 12-07C.PS page 15 and disassembling gxi12bit.obj .

The old code wrongly computed how many 'long' values are needed to store 4 'frac' values. 
When sizeof(long)==4 and sizeof(short)==2 it gives 1.
However the right answer is 2.
Due to that the old code thinks that 'frac' colors are equal 
when they differ in 3d or 4th component.

[doc/pscet_status.txt]

2006-12-09T08:09:19.842018Z Russell Lang

Change Windows installer release date to 2006 and update disk space
requirements.

[src/dwsetup.rc]

2006-12-09T08:03:44.150164Z Russell Lang

Fix bug 688749 silent/unattended uninstaller.
Add silent uninstall option to MS-Windows ghostscript uninstaller.
Reformatted part of the code to make it match the GSview uninstaller,
on which it was based.  For a silent uninstall, use
  uninstgs.exe "path\to\uninstal.txt" -q

[src/dwuninst.cpp]

2006-12-09T07:39:00.107617Z leonardo

Fix : A wrong 'frac' color comparison caused an incorrect 12 and 16 bpc image rendering.

DETAILS :

Debugged with CET 12-07C.PS page 15 and disassembling gxi12bit.obj .

The old code wrongly computed how many 'long' values are needed to store 4 'frac' values. 
When sizeof(long)==4 and sizeof(short)==2 it gives 1.
However the right answer is 2.
Due to that the old code thinks that 'frac' colors are equal 
when they differ in 3d or 4th component.

[src/gxi16bit.c src/gxi12bit.c]

2006-12-09T06:17:34.671935Z Alex Cherepanov

Following PLRM 3 handle instances of CIDFont resource in findfont, 
definefont and undefinefont. Partly fix CET 32_all, 33_all, 34_all, 25_all.

[doc/pscet_status.txt lib/gs_res.ps]

2006-12-09T05:04:05.073394Z Russell Lang

Fix bug 688932 mswinpr2 doesn't clear temporary files.
Unwanted temporary file was being recreated during page output.  
We now delete the temporary file when the device is closed.

[src/gdevwpr2.c]

2006-12-09T04:24:39.562906Z Russell Lang

Fix bug 688930 mswinpr2 allocates wrong memory size for DEVMODE.
A printer DEVMODE structure is usually bigger than sizeof(DEVMODE)
due to printer private extra data.  Allocate the correct size
DEVMODE to include this private data.
Remove old Windows 3.1 and Win32s code.

[src/gdevwpr2.c]

2006-12-09T00:14:28.954169Z Alex Cherepanov

Validate the argument of execuserobject and undefineuserobject before trying to
access UserObjects (which may be undefined) to match CET 31-03 and 31-11.

[doc/pscet_status.txt lib/gs_dps2.ps]

2006-12-08T23:08:31.381404Z Alex Cherepanov

Report /rangecheck instead of /limitcheck from defineuserobject when the index
exceeds 65535 to match CET 31-02.

[lib/gs_dps2.ps]

2006-12-08T22:23:13.575044Z Alex Cherepanov

Report /rangecheck instead of /limitcheck from defineuserobject when the index
exceeds 65535 to match CET 31-02.

[doc/pscet_status.txt lib/gs_dps2.ps]

2006-12-08T21:47:01.938606Z Russell Lang

Change MS-Windows installer to identify itself as GPL not AFPL Ghostscript.

[src/dwsetup.rc src/winint.mak src/gp_wgetv.c src/dwsetup.def src/dwuninst.def src/dwreg.c src/dwsetup.cpp src/dwuninst.cpp]

2006-12-08T21:45:06.679656Z leonardo

Update CET test status for 12-04-5.

[doc/pscet_status.txt]

2006-12-08T19:31:55.276122Z Ray Johnston

Disable the jpxparmfix at the point of invocation since it causes many
PDF files to fail with /undefined in --run--.

[lib/pdf_base.ps]

2006-12-08T18:27:14.429697Z Alex Cherepanov

CET 31-01-08 and 31-01-09 expect the last defined idiom instance to be
effective when several of them match. PLRM says it's undefined.

[doc/pscet_status.txt]

2006-12-08T15:30:10.567087Z Alex Cherepanov

Increase maximum depth of the procedure matching in idiom recognition
to meet CET 31-01-05 and Adobe implementations.

[doc/pscet_status.txt src/zmisc3.c]

2006-12-08T14:38:26.687662Z Tor Andersson

Fix some errors in the TTC table parsing.

[src/gstype42.c]

2006-12-08T12:00:09.393817Z leonardo

Fix : Wrong current point after uappend.

DETAILS :

Debugged with CET 11-22.PS page 1.

PLRM doesn't clearly specify what should be the current point after uappend,
but very likely it is the last point of the appended path.
CPSI does so, and we follow it.

[doc/pscet_status.txt src/zupath.c]

2006-12-08T04:03:13.743254Z Alex Cherepanov

CET 20-01-2 is re-classified AOK; CPSI modifies the content of the array
arguments, if any, when operator >> fails. Ghostscript matches Tek and
Distiller 5. This is a bug in CPSI we don't want to reproduce.

[doc/pscet_status.txt]

2006-12-08T02:22:36.640014Z leonardo

Fix (stroking) : The CPSI compatibility about the strokepath starting point.

DETAILS :

Debugged with CET 11-21.PS page 10.

PLRM doesn't specify a starting point for strokepath result.
Now we choose same point as CPSI does.
It appears important if a further drawing depends on current point,
and/or when a dashing is applied to strokepath.

We don't keep the old algorithm because it is not useful.
Supporting two modes (the CPSI compatible mode and the GS native mode)
would be too complicated with no good reason.

[doc/pscet_status.txt src/gxstroke.c]

2006-12-08T00:31:05.623591Z Alex Cherepanov

CET 13-20-2 is re-classified OK; The CPSI-based PhotoPRINT SE product
has CSL installed and cannot be used as a reference here.

[doc/pscet_status.txt]

2006-12-07T17:27:20.192504Z Alex Cherepanov

CET 11-13-4 fails because Ghostscript upath doesn't detect
nocurrentpoint condition.

[doc/pscet_status.txt]

2006-12-07T17:17:35.743899Z L. Peter Deutsch

Fixes bug: makepattern didn't create all of its structures in local VM.
(two diffs in PS3 CET 30-07-3)

[lib/gs_lev2.ps]

2006-12-07T15:56:26.139005Z Alex Cherepanov

Fix MIN_INTVAL handling in the operator mul. CET 25-13.

[doc/pscet_status.txt src/zarith.c]

2006-12-06T23:48:07.446016Z Ralph Giles

Copy the /ColorSpace key (if any) from a stream dictionary into the
DecodeParms, so the JPXDecode filter implementation can access it.

Pass this key through the JPXDecode filter implementation when
the ColorSpace is Indexed to the underlying jasper implementation,
requesting that it return raw palette indexes instead of the
fully decoded image. This is necessary when the overriding PDF image
colorspace is itself paletted.

Bug 688869 for customer 531.

[src/int.mak src/sjpx_luratech.h src/zfjpx.c lib/pdf_base.ps src/sjpx.c src/sjpx.h]

2006-12-06T23:40:57.941542Z Ralph Giles

Raise the debugging level required for reporting the raw decode option key.

[jasper/src/libjasper/jp2/jp2_dec.c]

2006-12-06T23:13:19.707391Z Ralph Giles

Update the product name to GPL Ghostscript. File omitted from r7447.

[src/gscdef.c]

2006-12-06T22:25:01.101686Z Ralph Giles

Add a 'raw' option key to jp2_decode() to pass the raw palette
data back to the client without applying the included palette
for indexed images or otherwise remapping the data. Required
for Colorspace override when embedded in PDF documents.
Partial fix for bug 688869.

[jasper/src/libjasper/jp2/jp2_dec.c jasper/src/libjasper/jpc/jpc_dec.c]

2006-12-06T22:23:19.182804Z Ralph Giles

Change the included license text to refer to the GPL.
Omitted from r7446.

[LICENSE]

2006-12-06T22:01:38.950715Z Alex Cherepanov

All failures in CET 24-13-3 are caused by writable FontDirectory.

[doc/pscet_status.txt]

2006-12-06T19:59:48.793585Z Alex Cherepanov

Modify gs to match 12-14c test case:
- check that the function domain covers all of the shading domain.
- do this test early - before checking other parameters.
- tweak error handling in shfill on PostScript level to match the test.

[doc/pscet_status.txt src/zshade.c lib/gs_ll3.ps src/zfunc.c src/zfunc3.c src/ifunc.h]

2006-12-06T01:33:52.778741Z L. Peter Deutsch

Fixes bug: currentcolorscreen attempted to copy a screen procedure even if
it wasn't readable.

[lib/gs_dps2.ps]

2006-12-05T14:51:16.744559Z Ray Johnston

Change pages fixed by Peter detected in last regression run as improvements.

[doc/pscet_status.txt]

2006-12-05T04:16:20.081512Z L. Peter Deutsch

Changes the initial halftone screen procedure from a packedarray to an
array, to pacify PS3 CET 09-49D.

[lib/gs_init.ps]

2006-12-05T03:28:09.927677Z L. Peter Deutsch

Fixes bugs: many places in the implementation of resourceforall did not
always create temporary objects in local VM, which is necessary because some
of their elements may be in local VM.  Fixes the cash06 diff in PS3 CET
30-07-3.

[lib/gs_resmp.ps lib/gs_res.ps lib/gs_cidcm.ps]

2006-12-04T22:25:49.788684Z Ray Johnston

Close some 'setflat' issues as AOK where GS is close, but better at each
resolution. Now that CPSI implements setflat, the differences in Adobe
implementations justifies GS differing (slightly) as well. Cases where
GS is worse (less smooth) than CPSI and Tek still need analysis.

Reassign 09-24-2 group of problems to Ray.

[doc/pscet_status.txt]

2006-12-04T21:41:08.335595Z Ralph Giles

Update the product name to "GPL Ghostscript" and bump the version number
for the upcoming release to avoid confusion with the GNU 8.55 release.

[lib/gs_init.ps src/version.mak]

2006-12-04T21:17:43.624240Z Ralph Giles

Remove the APFL and add the GPL to reflect our now-GPL development practice. For the record, this tree has been GPL licensed since the 8.54 release, but this is now explicit.

[doc/Readme.htm doc/Public.htm doc/Commprod.htm doc/COPYING doc/gs-vms.hlp]

2006-12-04T18:17:42.359489Z Ray Johnston

Mark a few other tests as "OK" after CPSI fixed to implement 'setflat'.
and add a note to a timing dependent output.

[doc/pscet_status.txt]

2006-12-04T17:34:45.126523Z Ray Johnston

Mark some 'setflat' issues as OK. I will be replacing some of the CPSI
output after "unlocking" setflat (so that CPSI implements, rather than
ignoring setflat). Also remove (*JS) that didn't mean anything. Update
explanation on 30-01-1 from Peter.

[doc/pscet_status.txt]

2006-12-04T15:16:22.671661Z Alex Cherepanov

Accept packed arrays for the /Size element of the shading dictionary and
everywhere else where dict_int_array_param() is called. CET 31-01-06

[doc/pscet_status.txt src/idparam.c src/zimage3.c src/zfsample.c src/idparam.h src/zfunc.c src/zfunc0.c src/zfilterx.c]

2006-12-03T16:02:51.520019Z L. Peter Deutsch

For Adobe compatibility (PS3 CET 23-07 and 23-13-5), changes findresource,
defineresource, undefineresource, and resourcestatus so that errors
occurring within these operators, except for a possible initial
stackunderflow, report the (executable) operator name, rather than the
operator object, as the command a.k.a. error object.

[lib/gs_res.ps]

2006-12-03T15:52:19.386596Z Alex Cherepanov

Avoid floating point division by 0. Catch the case when all components
of the matrix equal to 0.

[src/gxhintn.c]

2006-12-03T15:52:07.896094Z L. Peter Deutsch

For Adobe compatibility (PS3 CET 09-56-1), changes findcolorrendering so
that errors report /findcolorrendering, not --findcolorrendering--, as the
command a.k.a. error object.

[lib/gs_lev2.ps]

2006-12-02T07:24:01.485014Z L. Peter Deutsch

Fixes bug: save objects are simple in LL1 and LL2, but composite in LL3, so
restore must treat save objects on the stack differently depending on the
languagelevel.  (PS3 CET 30-04-2, and some file in the PS2 tests, actually
care about this.)

[src/isave.h src/zvmem.c]

2006-12-02T06:34:29.338937Z L. Peter Deutsch

Fixes two bugs related to PS3 CET 23-07-1: Failure to find a resource
category signalled undefinedresource rather than undefined (PLRM3 bottom of
p. 105), and always reported --findresource-- as the error command rather
than the correct one.

[lib/gs_res.ps src/interp.c lib/gs_init.ps]

2006-12-01T23:17:00.226511Z Tor Andersson

Add an argument to select a specified subfont to gs_type42_font_init. This argument is only used for truetype collection (TTC) font files.

[src/gxfcopy.c src/gxfont42.h src/gstype42.c src/zfont42.c]

2006-12-01T01:34:22.593578Z L. Peter Deutsch

Corrects an error in a comment (BitsPerComponent should be Colors).

[src/spdiff.c]

2006-12-01T00:27:39.971017Z Ralph Giles

Recommit changes from r7237 so we have continuous history.

Fixes and analysis from Peter.

[doc/pscet_status.txt]

2006-12-01T00:22:19.531380Z Ralph Giles

Recommit changes from r7235 so the file has continuous history.

A couple of reassignments and fixes from Peter.  See the diffs for details.

[doc/pscet_status.txt]

2006-12-01T00:19:02.366674Z Ralph Giles

Replace pscet files with copies linked to imported history.

[doc/pscet_status.txt toolbin/pscet_status.pl]

2006-12-01T00:16:33.505703Z Ralph Giles

Move pscet files out of the way to make room for versions with history.

[doc/pscet_status.txt toolbin/pscet_status.pl]

2006-11-30T22:52:33.785536Z Henry Stiles

fixes and analysis from Peter.

[doc/pscet_status.txt]

2006-11-30T21:01:19.024704Z L. Peter Deutsch

Fixes a bug that could cause a SEGV when reading binary token arrays on
systems where sizeof(ref) > 8 (e.g. 64-bit systems).

[src/iscanbin.c]

2006-11-30T20:41:53.369215Z Henry Stiles

Move the cet bug list and the script for tallying bug statistics from
the pscet_status.txt file to the public release.  Also includes a
couple of reassignments and fixes from Peter.  See the diffs for
details.

[doc/pscet_status.txt toolbin/pscet_status.pl]

2006-11-30T17:30:17.006076Z L. Peter Deutsch

Fixes bug: setcolorrendering returned CRD names as strings rather than names.

[lib/gs_lev2.ps]

2006-11-30T17:11:55.853083Z L. Peter Deutsch

Fixes bug: In case of an error, setvmreclaim and setvmthreshold reported an
error in setuserparams rather than the correct operator.

[lib/gs_lev2.ps]

2006-11-30T07:48:31.178531Z L. Peter Deutsch

Fixes bug: printobject and writeobject didn't signal an /undefined error if
currentobjectformat was 0.

[lib/gs_btokn.ps]

2006-11-30T05:38:43.886406Z Raph Levien

Match arbitrary-seeming CPSI behavior (when CPSImode is set) regarding
incorrect ucache placement causing typechecks with some but not all
upath operations. Fixes 11-28-5 and improves 11-22-3.

[src/zupath.c]

2006-11-29T01:33:19.060235Z leonardo

Fix (pdfwrite) : Don't write min_int as XHeight.

DETAILS :

Bug 689009 "Ghostscript generated pdf/a file has an XHeight of -2147483648". 

The old code doesn't check whether XHeight is successfully computed for the font.
However some font subsets simply have no characters for its computation.
In this case the old algorithm writes min_int, which works
for internal needs of the algorithm. We believe that using zero
instead min_int is safe because fonts usually place characters over the base line.
If all chars appear below the base line, the zero value 
won't be written due to the logics for default values in 
write_FontDescriptor_common.

Thanks to Marcos for the perfect bug localization.

[src/gdevpdtd.c]

2006-11-28T00:46:03.167492Z Raph Levien

Silently accept incorrect ucache placement in CPSI compatibility mode.
Fixes CET 11-23-3 and (partly) 11-24-3 and 11-25-3.

[src/zupath.c]

2006-11-27T23:56:22.186441Z Raph Levien

Reverses order of subpaths in gx_path_copy_reversed, which is the
implementation of the reversepath operator. PLRM3 says that the order
of subpaths is unspecified, but CPSI reverses them, while old GS had
them in the same order as the original path. Fixes CET 11-05-6, 11-14-5,
11-22-7, and 11-28-11.

[src/gxpath2.c]

2006-11-27T23:21:36.941749Z leonardo

Fix (pdfwrite) : A wrong font substitution for glyph variations.

DETAILS :

Bug 688967 "Problem with converting PS file with barcode font to PDF".

The old code doesn't check for possible encoding conflict
when sharing a charproc from another font. The current font could already
have another charcproc for same char code.

[src/gdevpdti.c]

2006-11-26T05:51:17.751153Z Ray Johnston

Fixes for CET's. Halftone dummy lpi and angle are real for Adobe. Also
setdash must return typecheck for wrong type top operand even if there
is no second operand (09-36-3).

[lib/gs_init.ps]

2006-11-24T21:53:27.264413Z Ray Johnston

Return 'undefinedresult' rather than 'rangecheck' for MININT / -1 to match
Adobe CPSI and Tek on CET 25-09

[src/zarith.c]

2006-11-24T21:18:42.311047Z Ray Johnston

Fix typo in previous commit (commit from a non-working directory after testing on
another system).

[src/zarith.c]

2006-11-24T21:13:30.086309Z Ray Johnston

Check for rangecheck condition BEFORE doing the divide. Prevent FP exception
on MSVC-6/x86. Fixes problem causing CET 25-09.ps to abort.

[src/zarith.c]

2006-11-23T19:01:20.626083Z leonardo

Fix : Skip images outside the clipping path.

DETAILS :

Bug 689000 "Ghostscript generates very large PDF file compared to Distiller".


1. New functions gx_cpath_rect_visible, is_image_visible
   check whether the image is entirely clipped out.

2. A new flag gx_image_enum_common_s::skipping stores that fact.

3. If so happens, interpreter checks whether the image
   has string datasources only. Such images may be safely skipped 
   from the interpretation (zimage.c).

Note : This optimization works for ImageType 1 only - see comment 
in is_image_visible. Unfortunately We have no time to improve this now. 
Need to analyze why does gs_image2_t need a floating size of the source image.

[src/gsimage.c src/lib.mak src/zimage.c src/gxiparam.h src/gxcpath.c src/gxpath.h src/gximage.c]

2006-11-23T15:01:16.838484Z Alex Cherepanov

Trap errors from setpattern implementation and re-throw them as
setpattern errors. Fix CET 09-47c-01.

[lib/gs_lev2.ps]

2006-11-23T14:14:38.062916Z Alex Cherepanov

Throw rangecheck when nocurrentpoint is detected during a user path
appending to the current path. This improves error reports from
CET 11-22, 11-24, 11-25, 11-27, 11-28.

DETAILS:
With this fix committed Ghostscript matches Distiller 5 but CPSI and Tek
ignore most of the errors in user path.

[src/zupath.c]

2006-11-22T20:22:57.190253Z Ray Johnston

Read the JBIG2 Global Context from the stream as an array of strings to
create the correct size bytestring for .jbig2makeglobalctx. Bug 689005
for customer 870.

DETAILS:

The /Length element of the the stream dict is the uncomressed size.
This example used FlateDecode on the Global context (which is sort of
dumb because except for the headers, most of the symbol dict is already
compressed -- in this case it saved a whole 36 bytes = 0.2%).

Tested with a smaller string (2000 instead of 60000) since the test
file only needed 18654 bytes.

[lib/pdf_base.ps]

2006-11-22T19:56:29.243165Z leonardo

Fix (shadings) : Radial shadings sometimes missed Extend.

DETAILS :

Debugged with CET 09-47I.PS SpecialTestH08Test06.

The old code wrongly computed parameter range for the extent,
when there exist 2 tangenting circles. 
In this case the visible part of the extent prolongues to the farest circle.
The old code restricts the extent with the nearest circle.

[src/gxshade1.c]

2006-11-22T02:03:00.217845Z Ray Johnston

Fix 09-33-5 -- return the screen procedure as an array instead of packedarray.

[lib/gs_dps2.ps]

2006-11-22T01:26:37.628128Z Ray Johnston

Fix for 09-29-1 -- force result from BG, UCR procs to always be a real.

[lib/gs_devcs.ps]

2006-11-21T21:16:21.705841Z Ray Johnston

Fix stackunderflow on 09-13.ps caused by mistake in rev 7124.

DETAILS:

Detected as a regression on the PS CET files.

[lib/gs_cspace.ps]

2006-11-21T20:21:34.907928Z Ray Johnston

Fix for ILLEGAL (\000) (r) file case seen with 23-09.ps 

[src/sfxstdio.c]

2006-11-19T14:36:42.834356Z leonardo

Fix (filling) : Very long lines sometimes painted in a wrong direction.

DETAILS :

Debugged with CET 11-14.PS : (next 3E9 dup moveto 1 dup lto fini) .

A fixed overflow happened in gxstroke.c .
To work around it we subdivide long segments into 2 parts
before applying the stroking algorithm.

1. The hew function gx_path_has_long_segments checks for long segments.
2. The function gx_path_copy_reducing now breaks long segments into 2 parts. 
3. gxstroke.c is changed to apply (1) and (2).
4. Note that (2) also affects the filling algorithm, 
   rather it is not related to the test case.
   It had problems with long segments also,
   at least gx_default_fill_trapezoid must not be called with 
   very long setgments, because it computes coordinate differences.

[src/gxpath.h src/gzpath.h src/gxpflat.c src/gxstroke.c src/gxpcopy.c]

2006-11-18T21:44:30.894785Z leonardo

Fix (filling) : Very long lines were missed sometimes.

DETAILS :

1. The flattening iterator subdivided very long lines into 2 segments
   against a fixed overflow. It appears not sufficient due to an
   unrelated code optimization. The new code does in 4 segments (gxpflat.c).
   See comments in code.

2. When finding a path's Y-minimum, the old code didn't account that
   most parts of a segment may fall outside Y-band (gxfill.c).

Debugged with CET 11-11.PS : (next 10 10 moveto 3E9 3E9 lineto fini) .

[src/gxfill.c src/gxpflat.c]

2006-11-18T01:50:21.560089Z leonardo

Fix (shadings) : Align coordinate data and color data to byte boundary.

DETAILS :

Debugged with CET 09-47K.PS SpecialTestJ02Test05 and
09-47K.PS SpecialTestJ02Test05 
The old code didn't align to byte boundary.
PLRM requires to align "each vertex data" to byte boundary.

Howebver PLRM doesn't clearly explains, what does "each vertex data" mean.
We make GS to be compatible to CPSI with CET tests.
From these tests we know that it wants to align color data when there is no flag,
and to align the flag only, when it presents. Actually we also align
whenever a vertex ends, because it looks reasonable.

We didn't find practical tests for all cases allowed by PLRM,
so this logick may need a further improvement.

[src/gxshade.c src/gxshade4.c src/gxshade.h src/gxshade6.c]

2006-11-17T23:58:38.951291Z leonardo

Fix (shadings) : Restrict shading function data with the shading function Domain.

DETAILS :

1. Restricts the function argument data (CET 09-47M.PS, SpecialTestL04Test04);
   CPSI appears to restrict shading function data with no warning.
   The old code throws a rangecheck.

2. Restricts color data with the color space Domain for triangle mesh shadings.
   The old code did not. Changing it to work same as for patch shadings.

[src/gxshade.c src/gxshade4.c]

2006-11-17T05:28:16.982839Z Alex Cherepanov

Validate the argument of setcolorspace before trying to process it.
Catch errors from setcolorspace and re-throw them from shfill.
Fix CET 12-14d.

[lib/gs_ll3.ps lib/gs_cspace.ps]

2006-11-16T16:45:12.812952Z Alex Cherepanov

Return a read-only dictionary from currenthalftone.
Partial fix for CET 09-12-01.

[lib/gs_dps2.ps]

2006-11-16T15:33:00.738256Z Alex Cherepanov

Pass the arrays with correct attributes to setdash and setcolortransfer
in gs_cet.ps to match Tek printer. Fix CET 09-07, 09-08, 09-22.

[lib/gs_cet.ps]

2006-11-16T11:12:36.928665Z leonardo

Fix (functions) : Provide a tolerance for insuffitient Domain elements 
(CPSI compatibility mode only).

DETAILS :

This change has no effect without "true .setCPSImode".
When it is executed, the missed Domain elements are padded with zeros,
extra elements are silently ignored.
Patch from Alex inproved by Leo. 

[src/zfunc3.c]

2006-11-16T10:38:44.129650Z leonardo

Fix : A minor bug in the visual trace code.

[src/vdtrace.c]

2006-11-15T23:59:58.494757Z Ray Johnston

Remove deprecated cs_get_default_color (an editting mistake).
Thanks to Dan Coby for spotting this.

[lib/gs_ciecs3.ps]

2006-11-15T16:17:19.366589Z Ray Johnston

Return 60.0 0.0 as Adobe dummy values with Halftone dict (real not int)
Fixes 09-05-6

[lib/gs_dps2.ps]

2006-11-15T16:15:30.494892Z Ray Johnston

Set the correct default value for CIEBasedDEF and CIEBasedDEFG colorspaces.
PLRM p. 233 states value is to be as close to 0.0 as is valid in RangeDEF[G].
Fixes 09-03-3

[lib/gs_ciecs3.ps lib/gs_cspace.ps]

2006-11-15T16:12:42.807313Z Ray Johnston

Return real instead of int from tint transform as Adobe does. Fixes 09-02-2

[lib/gs_sepr.ps]

2006-11-14T10:08:04.014362Z leonardo

Fix (shadings) : A non-contiguous color function could cause infinite recursion,

DETAILS :

It didn't check the quadrangle size when dividing it by a big color difference.

[src/gxshade6.c]

2006-11-13T21:12:10.733371Z leonardo

Fix (shadings) : Don't fill ShadingType 1 when the region is outside the function domain.

DETAILS :

Debugged with 09-47G-1.PS SpecialTestF02Test01 .
The old code returned rangecheck when it must not paint anything except Background.
It happened due to an attempt to check the function monotonity outside its domain.

[src/gxshade1.c]

2006-11-13T19:05:22.830209Z Ray Johnston

Prevent 'repeat' extension from sneaking into FunctionType 4 of PDF's we
create.

DETAILS:

When the device is 'pdfwrite' we don't allow the 'repeat' control operator
in FunctionType 4 functions. The 'check_psc_function' will return a
rangecheck error if this is attempted. We don't need to worry about other
devices such as ps2write since it doesn't emit DeviceN tint transforms
(the only way we can currently get the 'repeat' operator into a PSC
function). To prevent indexing past the end of op_names in calc_put_ops,
we throw a rangecheck if one ever sneaks in.

Note that in theory, since we the opdfread uses the full PS interpreter
to process FunctionType 4, we *could* handle 'repeat', but the calc_put_ops
will prevent that (for now).

Note that this means that attempting to convert 09-31.ps or 09-34.ps into
PDF will not succeed in generating the FunctionType 4, and will throw a
rangecheck in the tint transform when trying to generate a sampled function
that is too large. All other devices, including ps2write, will show the
correct result since the FunctionType 4 tint transform is interpreted in
Ghostscript (which handles its own 'repeat' extension).

[src/gsfunc4.c src/zfunc4.c]

2006-11-13T17:05:42.548481Z leonardo

Fix (shadings) : Remove colors from C stack, part 10.

DETAILS :

The patch
http://ghostscript.com/pipermail/gs-cvs/2006-November/006955.html
appears wrong in the part 1.
This patch fixes that.

[src/gxshade6.c]

2006-11-13T16:38:14.371701Z leonardo

Fix (shadings) : Remove colors from C stack, part 9.

DETAILS :

Removing unuseful comments.

[src/gxshade6.c]

2006-11-13T16:32:10.419581Z leonardo

Fix : Cygwin/gcc warnings.

DETAILS :

Missed a function prototype.

[src/int.mak src/zfile1.c]

2006-11-13T16:22:51.306913Z leonardo

Fix (shadings) : Remove colors from C stack, part 8.

DETAILS :

Fixing Cygwin/gcc warnings.

[src/gxshade6.c]

2006-11-13T16:10:41.692230Z leonardo

Fix (shadings) : Remove colors from C stack, part 7.

DETAILS :

This is the 7th step of fixing the bug 688955 
"64K stack overflows with shadings".
This change is algorithmically equivalent.
We hope this is the last step, which closes the bug.

1. Optimize reserve_colors_inline;
2. Remove 'assert'.
3. Disable the consistency check in release_colors_inline for faster sesult and smaller code.
4. Provide a consistency check at end of a shading fill in term_patch_fill_state.

[src/gxshade4.h src/gxshade1.c src/gxshade4.c src/gxshade6.c]

2006-11-13T15:34:00.738868Z leonardo

Fix (shadings) : Remove colors from C stack, part 6.

DETAILS :

This is the 6th step of fixing the bug 688955 
"64K stack overflows with shadings".
This change is algorithmically equivalent.

1. Remove the color_stack_ptr0 argument from various functions.
2. Rename the color_stack_ptr1 variable into color_stack_ptr.

[src/gxshade4.h src/gxshade1.c src/gxshade4.c src/gxshade6.c]

2006-11-13T14:42:19.588343Z leonardo

Fix (shadings) : Remove colors from C stack.

DETAILS :

This is the 5th step of fixing the bug 688955 
"64K stack overflows with shadings".

Cigwin/gcc yields warning for the last patch,
some of which may be harmful.

[src/gxshade6.c]

2006-11-13T14:32:07.933998Z leonardo

Fix (shadings) : Remove colors from C stack.

DETAILS :

This is the 4th step of fixing the bug 688955 
"64K stack overflows with shadings".
This change is algorithmically equivalent.

Providing a color stack pointer field in the shading fill state structure.
When some colors are reserved, we advance the color stack pointer.
A new function release_colors work for releasing them.

This patch inserts some asserts, which to be removed soon.

[src/gxshade4.h src/gxshade1.c src/gxshade4.c src/gxshade6.c]

2006-11-13T11:18:36.886321Z leonardo

Fix (shadings) : Remove colors from C stack.

DETAILS :

This is the 3nd step of fixing the bug 688955 
"64K stack overflows with shadings".
This change is algorithmically equivalent.

1. New functions reserve_colors_inline, reserve_colors work with
   the color stack in heap. 

2. Currently the color stack pointer is saved at each
   recursion level for simplifying the debugging.
   We intend t move it later to the shading fill state structure.
   Currently it is passed via most function calls as a new argument.

3. In automatic data the colors change type
   from a structure to pointer.

4. Since we want to keep colors be constant while 
   the heavy decompositioin recursion, we made
   the local color pointers point to const data.
   Therefore a new argument is added to some functions,
   which construct colors and therefore need
   a non-conmst access. Thise changes are commented with
   "providing a non-const access".

5. Minor change : cs_is_linear changes the 1st argument type to 'const'
   (gscspace.c, gxcspace.h).

[src/gxshade4.h src/gxcspace.h src/gxshade.c src/gxshade1.c src/gxshade4.c src/gscspace.c src/gxshade.h src/gxshade6.c]

2006-11-13T11:04:18.319919Z leonardo

Fix (shadings) : A better average color when filling a triangle.

DETAILS :

Due to a misprint, the old code wrongly computed the average color 
from 3 colors of triangle vertices.

Minor change : pfs->color_stack_limit is int rather than a pointer,
so NULLL isn't a good initilizer.

[src/gxshade6.c]

2006-11-12T22:18:04.834342Z Ray Johnston

Add 'repeat' as an pseudo-operator for FunctionType 4. Needed for PS CET
09-31 and 09-34 that use it in the tint transform for DeviceN with 110 and
250 components.

DETAILS:

Since Type 4 functions are a PDF feature, extending the control operators
to include 'repeat' doesn't create any PS incompatibility.

[src/gsfunc4.h src/gsfunc4.c src/opextern.h src/zfunc4.c src/zcontrol.c]

2006-11-10T12:18:42.454752Z Alex Cherepanov

Return floating point values for some cases of currentgray, currentrgb, and
currentcmyk operator that are implemented in PostScript.
Fix CET 09-10.ps, 09-19.ps.

[lib/gs_patrn.ps lib/gs_cspace.ps]

2006-11-09T20:05:09.172995Z leonardo

Fix : Cygwin/gcc warnings

[src/gxccman.c src/gdevbit.c src/devs.mak]

2006-11-09T19:25:53.845531Z leonardo

Fix : Provide a single color stack for entire shading.

DETAILS :

This is the 2nd step of the preparation for fixing 
the bug 688955 "64K stack overflows with shadings".
This change is algorithmically equivalent.

1. Ading fields into patch_fill_state_t for representing a color stack in heap.

2. Initialize and finalize them in gxshade6.c . 
   Currently they work idle.

3. Provide a single patch_fill_state_t instance for all
   meshes/patches of a shgading (gxshade1.c). 
   It allows to handle a single color stack 
   for all meshes/patches of a shading.

3. Document the shortened color representation in gxshade4.h .

Most subclasses of shading_fill_state_common are now rudiments,
but we keep them for a while to minimize the patch.
Note A_fill_state_s is not longer a subclass of it.

[src/gxshade4.h src/gxshade1.c src/gxshade4.c src/gxshade6.c]

2006-11-09T02:28:13.502287Z Alex Cherepanov

Trap errors from findfont, etc. and re-throw them as selectfont errors.
Partial fix fot CET 13-16.ps

[lib/gs_dps1.ps]

2006-11-09T01:54:18.338382Z Alex Cherepanov

Change the order of argument checking in kshow operator.
Partial fix fot CET 13-12.ps

[src/zchar.c]

2006-11-09T01:11:30.297156Z Alex Cherepanov

Following Adobe example accept 1-component multiple data sources in imahemask.
Match CET 12-08b.ps

[src/zimage.c]

2006-11-08T20:01:48.930089Z Ray Johnston

A couple of minor additions to match CPSI. Mostly just to show customers
that these are device specific values they may want to set themselves.

[lib/gs_cet.ps]

2006-11-08T17:59:48.588441Z leonardo

Fix (shadings) : Improving radial gradients.

DETAILS :

The old code has a bug when painting an extent for an obtuse cone.
Then filling the wider extent, it also painted the extent near the apex.
It happened due to a trick with representing the view of the constant color cone
with triangles. This problem is visible with 09-47I.PS page 7 Test11.

Another problem relates to the representation of circles with
2d order besiers. The old code did not account the approximation error of
the representation, causing a "stair" between the extent and the cone.
The stair may be visible when painting a big cone with a sloped tangent.

These two problems were introduced with Revision 2524 
on Apr 18 08:12:56 2002 UTC by jeong. When the "new" shading
algorithm was implemented 2+ years ago,
they were not noticed and has been ported to the "new" algorithm.

This patch paints the extent as a regular annulus
concatenated with a circle, which "closes" the wider extent.
The circle is taken so that its tangent points fall outside 
the view rectangle. The "closing" circle is necessary because the
annulus may be thinner than the view rectangle.

[src/gxshade1.c]

2006-11-08T16:13:35.888122Z Alex Cherepanov

Make UniqueID error reporting match Adobe's. Partial fix for 13-05.PS.

[src/idparam.c]

2006-11-08T13:36:18.319314Z leonardo

Fix : Rearrange gs_client_color_s to allow saving RAM from color components.

DETAILS :

This is a preparation for fixing the bug 688955 "64K stack overflows with shadings".
See comments in cope.

[src/gsccolor.h]

2006-11-08T12:55:36.512197Z Alex Cherepanov

Set errorinfo for Background key in shading dictionary. Clear some
issurs detected by CET 09-47G.PS and 09-47H.PS.

[src/zshade.c]

2006-11-08T12:30:45.541199Z leonardo

Fix (shadings) : Improving radial gradients.

DETAILS :

1. Extend was missed sumetimes due to a wrong formula in R_outer_circle.
2. Must paint nothing when both radii are zero.

[src/gxshade1.c]

2006-11-07T23:30:31.983202Z Ralph Giles

Prepend $(DESTDIR) to unix 'make install' paths for the convenience of 
packagers. This assumes make will substitute an empty string for 
undefined makefile variable, but this is a widespread convention.
Bug 688948.

[src/unixinst.mak]

2006-11-07T19:49:18.274457Z Ralph Giles

Remove the deprecated ps2write.bat, which does not work. ps2ps2.bat is 
the correct script to invoke. Bug 688977.

[lib/ps2write.bat]

2006-11-07T18:52:46.763208Z Ray Johnston

Turn on CPSI mode for CET runs. This mode uses the CPSI cmyk_to_rgb
conversion and 'eofill' for Type1 characters.s

DETAILS:

This improves the difference count for 250 pages and only increases
the difference count for 6 pages. I've reviewed all regressions and
the changes are not important. Of the 250 pages that are improved,
The 250 improvements will be analyzed and those that were DIFF or
AOK will be changed to OK if they now match closely enough.

[lib/gs_cet.ps]

2006-11-07T15:55:45.038514Z Alex Cherepanov

Use standard vector product formula to decide whether the 2 tangent lines
in arct operator are collinear. Fix CET 11-03.

[src/gspath1.c]

2006-11-07T12:52:11.415127Z leonardo

Fix (gs_cet.ps) : Patch 'setsmoothing' for a better view of shadings in CET tests (continued).

DETAILS :

Fixing a misprint in the last patch.

[lib/gs_cet.ps]

2006-11-07T12:46:34.330897Z leonardo

Fix (gs_cet.ps) : Patch 'setsmoothing' for a better view of shadings in CET tests.

DETAILS :

CET tests execute "1 setsmoothing", which allows a 100% color error
while a shading rasterization. We patch 'setsmoothing' to make
the shadings be painted with the default smoothing.
It appears closer to what CPSI does.

[lib/gs_cet.ps]

2006-11-07T03:50:09.475944Z Alex Cherepanov

Adjust error reporting from sethalftone to match CET 09-40.
Fix an error in sethalftone redefinition. Halftone can read from
the current file; sethalftone cannot be redefined as { pop } .

[lib/gs_dps2.ps lib/gs_ll3.ps]

2006-11-07T01:13:42.489161Z Alex Cherepanov

Fix CET 09-32:
Adjust error reporting from setcolorrendering to match the test.
Make TransformPQR a required parameter, as specified by the PLRM.

[lib/gs_lev2.ps src/zcrd.c src/zcie.c]

2006-11-06T18:58:56.541927Z leonardo

Fix (shadings) : The monotonoty check for Stitching function was wrong.

DETAILS :

It partially fixes 09-47D.PS and other tests.

1. The function itself didn't set the non-monotonic dimension mask.
2. The shading code erroneusely exchanged dimensions when checking the color monotonoty.

[src/gsfunc3.c src/gxshade6.c]

2006-11-06T12:33:12.321244Z Alex Cherepanov

Partialy fix CET 13-05:
- Trap errors in definefont procedure and re-throw them as definefont errors.
- Throw "invalidaccess in definefont" error for the no-access font dictionary
  instead of invalidfont that happens without the check. 
- Silently ignore invalid /FID attribute.

[lib/gs_fonts.ps lib/gs_res.ps src/zbfont.c]

2006-11-05T04:14:18.656525Z Alex Cherepanov

Adjust error reporting from findfont procedure to match Distiller and CET
13-06.PS.tek360 . The PhotoPrint product is clearly wrong here leaving
a few objects on the stack besides the arguments when findfont fails.

[lib/gs_res.ps]

2006-11-05T03:00:15.616716Z Alex Cherepanov

Adjust error reporting from findencoding procedure to match Adobe.
Make "null ... findresource" throw /typecheck instead of /undefinedresource .
Fix CET 13-06.PS

[lib/gs_res.ps]

2006-11-04T17:05:22.998270Z Alex Cherepanov

Change attributes of the array form of the device color spaces.
Fix a bug in HSB to RGB conversion introduced in rev. 7124.
Simplify equality testing of color spaces: names match corresponding
array forms, all other match when color space arrays are equal.
Accept float value as a color value for an indexed color space.
Fixes CET 09-06.PS and many other test cases.

[lib/gs_indxd.ps lib/gs_cspace.ps]

2006-11-04T15:23:19.316020Z Alex Cherepanov

Fix error reporting for setdevparams operator, CET 27-08.

[lib/gs_lev2.ps src/ziodev2.c]

2006-11-04T14:11:05.665517Z Alex Cherepanov

Accept negative value for MinFontCompress user parameter and silently
substitute with 0. Intercept setuserparams errors and re-throw them as
setcacheparams errors. Partial fix for CET 27-07.ps.

[lib/gs_lev2.ps src/gsfont.c src/zusparam.c]

2006-11-04T05:59:16.045180Z Ray Johnston

Increase the number of DeviceN components we can handle to at least
250 (which is needed by CET 09-03, 09-06, ...). Both GS_CLIENT_COLOR_MAX_COMPONENTS
and MAX_VSTACK depth are needed since we use Type 4 functions to handle DeviceN colors.

[src/gsccolor.h src/gsfunc4.c]

2006-11-04T05:51:14.333525Z Ray Johnston

Make the Device color spaces arrays instead of packedarrays for Adobe
compatibility. CET 09-03, 09-06 and others.

[lib/gs_cspace.ps]

2006-11-04T04:02:22.614110Z Alex Cherepanov

Accept negative argument for setcachelimit operator and silently substitute
with 0. Intercept setuserparams errors and re-throw them as setcachelimit
errors. Fix CET 27-06.ps.

[lib/gs_lev2.ps src/gsfont.c src/zusparam.c]

2006-11-03T20:47:10.212392Z Raph Levien

Fix: Change /.OrigFont key to /OrigFont to match (undocumented) Adobe
behavior. Fixes CET 15-04-1 et al and 16-08-1. Note: test file
Bug687615.ps depends on old undocumented behavior, but has been patched
in the comparefiles repository.

[lib/gs_fonts.ps src/gdevpdtt.c src/zbfont.c]

2006-11-03T20:43:13.567715Z Raph Levien

Fix: Fixes clipsave/cliprestore nested with gsave operations. Correct
behavior is to save clipstack into saved gstate, and clear the clipstack
in the current graphics state, as clarified in PLRM3. Fixes 450-01.ps and
CET 09-54-2 et al, and 11-06-2.

[src/gsstate.c]

2006-11-03T19:20:58.328736Z Alex Cherepanov

Make arcto and arct operators throw undefinedresult when the start point
or the end point is the same as the center making calculation of the
tangent impossible. Fix CET 11-04.ps.

[src/gspath1.c]

2006-11-03T06:28:15.169508Z Ray Johnston

Fix some typo's editting blunders. No code change.

[src/gsmisc.c src/zmisc.c]

2006-11-03T05:45:05.987701Z Ray Johnston

Implement dynamic configuration of previous compile options that are needed
for CPSI compatibility running the PS CET.

DETAILS:

While a 'state' variable to control this is preferred to a global, the
gs_device or gs_imager_state is not propagated through all of the color
functions. For example, the place where USE_ADOBE_CMYK_RGB was used with
#if to select the color, even though there was a 'pis', it was called
with NULL at times. Default will remain the same as the current gs.

The other option controlled with .setCPSImode is the Type 1 fill method.
While eofill is the Adobe spec method needed for CPSI compatibility, 
the w.n. 'fill' method is needed for some Type1's created from TT fonts
that don't properly handle inadvertent crossings (and other bad fonts).

The "true .setCPSImode" will be added to the lib/gs_cet.ps to improve
CET CPSI compatibility.

PCL is not affected since it does not have CMYK colors and doesn't handle
Type1 fonts.

[src/gsmisc.c src/zmisc.c src/zchar1.c src/gxdcconv.c]

2006-11-02T19:42:47.894000Z leonardo

Fix (imagemask) : An optimization for imagemask with a shading color, continued 2.

DETAILS :

Cygwin/gcc warnings in the last patch.

[src/lib.mak src/gspcolor.h src/gximask.c]

2006-11-02T19:19:23.740183Z leonardo

Fix (imagemask) : An optimization for imagemask with a shading color, continued.

DETAILS :

This is a performance fix for 09-47D-3 .
It is a similar optimization as a recent one for imagemask, 
rather this one applies to different cases, which are not directly related to 
to Postscript operator imagemask. The cases are :
- filling a cached character with a shading color;
- filling a FAPI character with a shading color;
- rendering an imagemask while a clist playback (for future. 
  currently never happens with shadings).

This patch adds new modules gximask.c and gximask.h,
which factor out the common code for the mentioned cases.
The code is taken from the last patch for imagemask,
with minor restructurization.

The new function gx_image_fill_masked must be called
from the graphics librari instead a direct call
to the device virtual method fill_mask. 
It checks for the shading color and inserts the clipping device,
which represents the mask. 

Note that the clipping device always decompose a shading color,
so inserting the clipping device before it won't cause a problem.
However it needs some care when rendering to a high level device.

The clip accumulator device had no fill_mask virtual method.
This patch adds the default implementation 
for the proper work of gx_image_fill_masked.

[src/gsimage.c src/lib.mak src/gxacpath.c src/int.mak src/gximask.c src/gxccache.c src/gzcpath.h src/gxclrast.c src/gximask.h src/zfapi.c]

2006-11-01T21:18:41.176742Z leonardo

Fix : When filling a path with a shading, the filling rule was missed. 

DETAILS :

1. Unwing the rev 7114 patch due to a significant slowdown
   for filling a path with a shading (gxfill.c).

2. A minor change to gxfill.c : removed a redundant assignment to fo.lop .

3. The old code always used the non-zero winding rule,
   because gx_cpath_to_path misses the winding rule
   when called from gx_default_fill_path.
   See commet in code.
   This is the real fix for the problem.

4. pcpath->rule sometimes was not initialized when pcpath->path_valid is true (gxcpath.c)

We don't like that gx_default_fill_path creates a big clipping path,
which then converts into a path, which then is being intersected 
with a rectangle and/or parallelogram(the shading BBox) in gs_shading_fill_path.
The biggest time expence in this chain is the sorting a lot of 
rectangles when gx_cpath_intersect_path_slow applies the filling
algorithm to compute the intersection. In many cases the 
the rectangle is simply the bounding box of the path,
but it still needs the clipping path planarization, because 
the "planarized" property isn't stored in the path structure.

We tried to optimize against it, but didn't succeed with no raster differences.
Delaying that optimization for better times.
Due to a short time frame we need to make this patch smaller and simpler.
 

[src/gxcpath.c src/gxfill.c]

2006-11-01T19:58:48.174934Z Ray Johnston

Add prototypes for _ftelli64 and _fseeki64 for MSVC 6 builds. Allows
> 2Gb clist when building with MSVC 6. Bug 688394 for customer 330.

DETAILS:

Even though the functions are in the run time library (at least with
service pack 6), they aren't documented and aren't in the include
files. Without the prototypes, the functions are presumed to return
and 'int' so the sign gets extended for offsets > 0x7ffffff.

Tested with customer's file at 180dpi where the clist size gets up
to 2.7Gb.

[src/gp_mswin.c]

2006-11-01T04:31:35.972287Z Henry Stiles

This file should have been included in the previous checkin.  gs is
now an external repository and changes have to be checked in
explicitly.

[src/gdevpxop.h]

2006-11-01T01:05:01.781266Z Alex Cherepanov

Change order of operand checking in setfileposition to match CET 23-28.ps

[src/zfileio.c]

2006-11-01T00:44:39.318388Z Alex Cherepanov

Make resourcestatus throw typecheck when resource category is not a name.
Partial fix for CET 23-26.ps, page 4.

[lib/gs_res.ps]

2006-10-31T23:21:22.115009Z Alex Cherepanov

Change the order of argument checking in renamefile operator and the error
code returned for renaming bare devices such as (%stdin) to match CET 23-23.ps

[src/gsfname.c src/zfile.c]

2006-10-31T21:30:03.431760Z Alex Cherepanov

Change the order of argument testing in readline operator to match CET 23-22.ps

[src/zfileio.c]

2006-10-31T21:00:30.566372Z L. Peter Deutsch

Fixes a bug: 'bind' would affect non-writable ordinary arrays, rather than
doing nothing per the PLRM.  ('bind' still affects packed arrays, per the
PLRM.)  Fixes a discrepancy in PS3 CET 31-01-2.

[src/zmisc.c]

2006-10-31T20:58:38.108340Z L. Peter Deutsch

Fixes a bug that caused certain 1-operand math operators to return typecheck
rather than stackunderflow if the stack was empty.  Fixes a discrepancy in
PS3 CET 25-05-1.

[src/iutil.c]

2006-10-31T17:36:29.458383Z Alex Cherepanov

Change the order of argument checking for readstring operator to satisfy CET
23-21.ps . In general, CET prefers other errors over stack underflow when
there is a choice. Ghostscript was originally designed to do the opposite.

[src/zfileio.c]

2006-10-31T04:29:18.220326Z L. Peter Deutsch

Makes 0 0 exp return 1.0 rather than signalling undefinedresult, to match
Adobe interpreters.  Fixes a discrepancy in PS3 CET 25-07-1.

[src/zmath.c]

2006-10-30T22:20:55.924215Z Alex Cherepanov

Fully check an setcolor operand before trying to access a new one to match
CET 09-30 and 09-48 error reporting. Down, not across.

[lib/gs_cspace.ps]

2006-10-30T21:57:56.999671Z Ray Johnston

Tolerate some missing keys in a CMap (previously we only allowed for missing
CMapName). Missing /CodeMap and /CIDSystemInfo now tolerated for PS CET 23-25
and others.

DETAILS:

Note a CMap with missing CodeMap can't really be used. It is just accepted
for CPSI compatibility.

[lib/gs_cmap.ps]

2006-10-30T21:53:44.580966Z Ray Johnston

Remove Localization Resource since CPSI doesn't define this. PS CET 23-25
and others.

[lib/gs_cet.ps]

2006-10-30T21:47:51.298314Z leonardo

Fix : Don't replace FDArray for a built CIDFontType 0.

DETAILS :

Debugged with 32_all.PS .

The old code didn't check whether a CIDFontType 0 is being built
at second time and erroneusely replaced FDArray in it.
It causes FDArray to be prematurely released with "restore"
when the font is not, causing a heap inconsistency.

This quick fix avoids the FDArray replacement.
However it leaves some work for the garbager.
A better fix should perform a better cleanup -
see comment in code. Delaying it for better times.

[src/zfcid0.c]

2006-10-30T18:20:09.692598Z Alex Cherepanov

Fix decoding of the indexed color space in the smooth shading.
Adjust error codes to satisfy CET 12-14a, 12-14b 12-14e, 12-14f, 12-14g
Change gs_errorinfo_put_pair() to take char* instead of byte* a
more common type and move all errorinfo-related functions to idparam.c
because they are most often used with dictionary parameter functions.

[src/zimage.c src/idparam.c src/zshade.c src/int.mak src/interp.c lib/gs_ll3.ps src/idparam.h src/gxshade.c src/interp.h]

2006-10-30T14:54:34.519781Z Stefan Kemper

Comment change.

gsargs::arg_push_string changes the parsing algorithm to parse on 
spaces.  This is a side effect of changing the depth of the arg_list.  
Currently only the postscript -c option uses this parsing scheme.
 
No Differences.

[src/gsargs.h]

2006-10-27T11:49:01.166620Z leonardo

Fix : MSVC warning.

DETAILS :

char** --> char*
Don't know how it compiles with various compilers.
In any case it was definitely wrong.

[src/gsiorom.c]

2006-10-27T00:04:16.218261Z Alex Cherepanov

Don't modify the destination string of cvs and cvrs operators on
failure. Change the returned error codes to suit the CET tests
24-05.PS and 24-06.PS .

DETAILS:
Adobe enterpreters have a bug when "1234556789 10 ( ) cvrs"
restores the stack as "123456789 ( ) ( )" Ghostscript doesn't have
this bug, which is affects 24-05.PS checksums.

[src/zfileio.c src/iutil.c src/iutil.h src/ztype.c]

2006-10-26T23:10:05.159422Z Raph Levien

Fix: make out-of-bounds string DataSource reads return 0 bytes, rather 
than UMR. Spec calls for /rangecheck, but CPSI silently returns garbage. 
Improves 09-47B page 12 (focus on test 6), but exact match to CPSI is
probably not feasible.

[src/gsdsrc.c]

2006-10-26T22:14:01.743778Z leonardo

Fix (TT font reader) : Obtain Unicode codes from Encoding glyph names of a special format.

DETAILS :

Bug 688946 "Problem reading PDF file with Arabic font".

We think we observe an undocumented Adobe feature.
This patch has no strong theoretic foundation.
It is created empirically.

An embedded True Type font has no some glyph names in its 'post' table,
but they present in Encoding Differences. 
The glyph names look as uniXXXX where XXXX is 4 hexadecimal digits.
The corresponding character codes can't be translated into
glyph indices neither with AdobeGlyphList, nor with 'post',
nor by the identity or another simple mapping to Unicode.

We conclude that Adobe recognizes such names and
obtains Unicode codes from them, and then translates
them with 'cmap'. We think it is only possible correct method for
the supplied test case. This patch implements it.

1. Passed Encoding as prebuilt_encoding for symbolic fonts (pdf_font.ps).

2. When a symbolic font has an Unicode 'cmap',
   account glyph names from its Encoding (the change to .pdfcharkeys in gs_ttf.ps)
   while composing CharStrings.

3. Modified .addglyph with conversion of uniXXXX names into Unicode codes.

4. The new mapping is allowed only with cmap 3.1.
   Debugged with Bug688467.ps .

[lib/pdf_font.ps lib/gs_ttf.ps]

2006-10-26T08:26:31.673716Z leonardo

Fix : Specialize the build_char function argument type (continued).

DETAILS :

Removing another cast related to the last patch
(An MSVC warning).

[src/lib.mak src/gxfcopy.c]

2006-10-26T07:53:20.323680Z leonardo

Fix : Specialize the build_char function argument type.

DETAILS :

The ghostpcl project yielded a potentially harmful
warning about a type cast. It occurs a cast from 
a class to subclass. We could not provide a dynamic check in there,
so we analyzed why it needs such cast. The reason appears 
an inaccurate design in the graphics library, and we fix it now.

[src/gxchar.c src/gstext.c src/gxfcopy.c src/gxfont.h]

2006-10-26T07:07:58.608985Z leonardo

Fix : MSVC warning in the last patch.

DETAILS :

Fixed an inaccurate type cast.

[src/interp.c]

2006-10-26T05:36:39.854227Z L. Peter Deutsch

Fix: /bind load printed --.bind-- rather than --bind--. Partly fixes a
discrepancy in PS3 CET 31-01-2.

[lib/gs_ll3.ps]

2006-10-26T04:39:35.686300Z L. Peter Deutsch

Replace inexact decimal literals in the HSB<->RGB algorithms with more exact
computed values, so that (e.g.) 0.2 1 1 sethsbcolor currenthsbcolor returns
0.2 1 1.  Fixes problems in PS3 CET 09-41-4.

[lib/gs_cspace.ps]

2006-10-26T01:03:53.154097Z Raph Levien

Implementation of imagemask scaling. Fixes CET 09-24 page 3 and many 
other instances of the interpolated "turkey" bitmap. This implementation
mostly matches Adobe, but differs in one bit; further analysis of the
Adobe algorithm would be necessary to make it match 100%.

[src/lib.mak src/zfimscale.c src/simscale.c src/int.mak lib/gs_img.ps src/simscale.h]

2006-10-25T17:01:48.042147Z Alex Cherepanov

Add a routine to create and store [/key any] array in $error.errorinfo for
better conformance with Adobe PS interpreters. This routine will be called
from many places that reports errors in dictionary parameters. Use the new
routine to fix one case of error reporting in the inage operator.
Bug 688956.

[src/zimage.c src/int.mak src/interp.c src/interp.h]

2006-10-25T12:10:09.905326Z Alex Cherepanov

Normalize bounding box retrieved from PostScript BBox parameter in the
shading dictionary because Adobe interpreters accept denormalized box.
Bug 688937, customer 200.

[src/zshade.c]

2006-10-24T15:13:03.211241Z leonardo

Fix (imagemask) : An optimization for imagemask with a shading color.

DETAILS :

This is a partial performance fix for 09-47L.PS .
It fixes the biggest performance flaw,
but a further optimization is still wanted.

The patch converts the image into a clipping path and then
renders entire shading at once through the clipping path.
The old code rendered entire shading color many times for 
each rectangle of the mask.

1. The clip list accumulator device is made publicly accessible.

2. Provided a garbager descriptor for clip list accumulator device structure. 

3. When an imagemask needs to render with a shading color,
gs_image_begin_typed replaces the target device with 
the clip list accumulator device.

4. To provide a correct work of (3),
inserted a hook into gx_dc_pattern2_fill_rectangle,
which forwards the operation back to the device method.
It is done because normally that function calls
copy_mono with imagemak. Instead that, we need to accumulate 
rectangles for the clipping path.

5. Introduced a new signal pattern_manage__is_cpath_accum,
which is used to detect the clip path accumulator device
under a forwarding device. Such case happens in (4)
when it renders a cached character with a shading color.

6. gs_image_cleanup performs the main work for rendering
the shading color through the clipping path.
Note that we need to pass the device color to it,
therefore it gets a new gs_state argument.
(Well, one may think that it can be passed 
in a new field of gs_image_enum.
Actually that's not safe because an erroneus Postscript program 
can change the current graphic state and
release the old one. After that the pointer
will point to the released structure and
cause a heap inconsistency).

[src/gsimage.c src/gsptype1.c src/lib.mak src/zimage.c src/gsptype2.c src/gxcpath.c src/gxacpath.c src/gsimage.h src/gxcpath.h src/gxccache.c src/gzacpath.h src/gdevpdfi.c src/gxdevcli.h]

2006-10-24T12:22:14.551224Z Tor Andersson

A conditionally compiled mechanism to allow cached characters
to be locked out from eviction. A cached character has a reference
count, which if non-zero will prevent the cache slot to be evicted.

This is needed for the GSLite API.

[src/gxfcache.h src/gxccman.c]

2006-10-23T11:17:11.666646Z leonardo

Fix : Repair the character cache logics with persistent cache entries (continued).

DETAILS :

Cygwin/gcc yielded unpleasant warnings.

[src/gxfcache.h src/gxccman.c src/gxstroke.c]

2006-10-22T18:58:27.280592Z L. Peter Deutsch

Fixes bug: xshow/yshow/xyshow checked the length of the widths array
incorrectly, and the outcome of the check was ignored.  Partially fixes a
discrepancy in PS3 CET 13-27/28/29.

[src/gxchar.c src/gstext.c src/gstext.h]

2006-10-22T17:58:51.962128Z L. Peter Deutsch

Fixes bug: the user path operators didn't check encoded user paths to make
sure that the operand string/array and operator string allowed read access.
Partially fixes a discrepancy in PS3 CET 13-29-3.

[src/ibnum.c src/zupath.c]

2006-10-21T22:38:11.960157Z L. Peter Deutsch

Changes exec, stopped, and .stopped so that if the object to be executed is
noaccess and executable, the invalidaccess error occurs with the object
still on the operand stack.  Fixes an Adobe incompatibility in PS3 CET
28-14-1.

[src/zcontrol.c]

2006-10-20T01:12:42.025502Z Raph Levien

FIX: Fixes CET 18-02A p4 and others. Optimization for filling shadings
by installing a clipper device with the path, and rendering complex 
color through it, does not produce correct results when fill rule is
eofill. This patch simply disables the optimization in the case of
eofill. We should probably look at why the optimized code produces
incorrect results, as that may affect correctness of eoclip, not to
mention the performance issues.

[src/gxfill.c]

2006-10-18T13:32:51.500333Z Ray Johnston

Fix error returned from currentdevparams. Fixes PS LL3 CET 27-03. Thanks
to Noriyuki Matsushima for this patch.

[src/ziodev2.c]

2006-10-18T07:01:10.427208Z Dan Coby

Fix for 688880 Encrypted PDF can not be processed.

DETAILS:

The problem file specifies both V = 1 and and a Length = 128
bits in the encryption dict.  This is contradictory since page 93 of
the PDF 1.6 spec says that if V = 1 then the key length should be
40 bits.

This change ignores the the Length value if V = 1.  This matches the
observed behavior with Adobe Acrobat 7.0.

[lib/pdf_sec.ps]

2006-10-17T13:33:02.347582Z leonardo

Fix (gs_main_finit) : Provide a right finalization for the language switch project.

DETAILS :

It needs to finalize 
without closing the output device
and without closing the graphics library and files,
because other interpreters may work with them
after the Postscript interpreter closes.

[src/imain.c]

2006-10-16T15:30:51.595142Z leonardo

Fix (memory management) : Restore the memory wrapper code consistency.

DETAILS :

It was broken during the ghostpcl project merging :

1. The USE_RETRY_AND_LOCKING_MEMORY_WRAPPERS code was inconsistent.
2. The !USE_RETRY_AND_LOCKING_MEMORY_WRAPPERS code caused 
   a MSVC compiler warning due to an inaccurate type cast.

[src/gsmalloc.c]

2006-10-16T15:08:20.540609Z leonardo

Fix : Repair the character cache logics with persistent cache entries.

DETAILS :

Important character caching problems have occasionally detected
while merging with the ghostpcl branch :

1. The ttfReader never released in PCL when a font has a valud XUID.

1.1. The new function gs_clean_fm_pair_attributes,
     is called when a font is being released by 'restore',
     but its cached characters continue to live in the cache.
     This function releases those font-matrix pair attributes,
     which may point to the font. When the font has 
     True Type data, it releases ttfReader and ttfFont.

1.2. The function gs_purge_font_from_char_caches
     is now called from gs_font_finalize,
     which is called from 'restore' and from the garbager.
     It allows gs_clean_fm_pair_attributes to be called
     from 'restore'. Note that when it is called from
     the garbager, it works idle because the method
     'free' is disabled while the garabarer runs
     for same allocator.

1.3. The new flag gs_font::is_cached prevents a redundant
     work of gs_purge_font_from_char_caches,
     when it is called from font_restore and from
     gx_font_finalize. Therefore the argument of 
     gs_purge_font_from_char_caches is now non_const.

1.4. With the new code, cached characters
     for fonts with valid XUIDs persist 
     across a document/job end. They may be reused
     when a next document/job renders same font-matrix .
     There is no way to purge cache between jobs 
     besides destructing entire cache and allocating it anew.

1.5. The new function gs_purge_font_from_char_caches_completely
     is coded for those clients, which 
     don't need the feature 1.4.

1.6. Clients (such a PCL interpreter) must immediately call
     gs_purge_font_from_char_caches or
     gs_purge_font_from_char_caches_completely,
     whenever they release a font immediately.
   
2. Cached characters were dropped from cache on 'restore'
   while a font has a valid XUID and can appear again afrer 'restore'.
   It happened because the old code called gs_purge_font_from_char_caches
   from font_restore due to its cache elements point to
   the font's XUID, which is being released.

2.1. Copy the XUID to a stable memory in gx_add_fm_pair.

2.2. Release it in gs_purge_fm_pair.

2.3. Disable the related code portion in font_restore.

2.4. The new function gx_attach_tt_interpreter
     is factored out from gx_add_fm_pair.
     Now it is also called from gx_lookup_fm_pair
     (with an intermediate function gx_provide_fm_pair_attributes)
     when a persistent pair is being associated with 
     a new font having same XUID.

[src/gxfcache.h src/gsfont.c src/gxccman.c src/zfont.c src/gxccache.c src/gxfont.h]

2006-10-16T12:50:05.195523Z leonardo

Fix (Resource machinery) : Improve working with ROM file system.

DETAILS :

1. Consider %iodevice% paths as absolute when combining a resource file name (gs_res.ps).
2. A minor code cleanup : Remove gp_file_name_combine_patch
   (an algorithmically equivalent change).
3. A minor code cleanup : Improve zfile_name_is_absolute
   (an algorithmically equivalent change).

[lib/gs_res.ps src/zfile.c src/zfile1.c]

2006-10-15T17:19:45.555905Z Ray Johnston

Fix for bug 688929 -- Genoa test 412-01.ps defines a couple of Type 42 fonts
without anything in the 'sfnts'. This hack switches it to a Type 3. This is
harmless for normal files since the check is quick and is only executed when
fonts are loaded.

[lib/gs_typ42.ps]

2006-10-13T01:14:58.600115Z leonardo

Fix (FAPI) : Restore the functionality and the documentation, which were broken with commitments 6998 7077 7078.

DETAILS :

1. The reentrant UFST was not tested yet.
2. We noticed a problem with -dTextAlphaBits=4, which to be fixed separately.

[src/fapiufst.c src/gxfapiu.c src/gxfapiu.h]

2006-10-13T00:02:34.922456Z leonardo

Fix (clist) : CCITTFaxDecode consumed extra byte.

DETAILS :

Debugged with ghostpcl ppmraw -r216 c327.bin .

This patch is based on my understanding of the problem,
which was obtained within a short time frame.
Therefore I'm, not sure that all statements of this comment
are necessarily correct.

The old code didn't write the EOD sequence for CCITTFax data.
Such behavior was designed many years ago in order to write 
a smaller clist output. A year ago the CCITTFaxDecode filter 
was improved with a workaround for an incorrect behavior of 
Adobe Acrobat, which writes an EOD when it is not required 
(see the gs revision 6123).
The workaround looks ahead for EOD and consumes it if it appears.

However doing that improvement, nobody took care about the
clist reader, which didn't write EOD and catenates other data
after CCITTFax data. If the subsequent data occasionally look as EOD,
they are erroneusely consumed by CCITTFaxDecode, 
and the clist reader continues with a wrong position.
It caused unpredictable behavoir and stochastic crashes.

This patch forces writing the CCITTFax EOD for clist. 
Maybe it's not the best fix, but it is what we can do
within the short time frame.

[src/gxclutil.c]

2006-10-11T21:12:53.047803Z leonardo

Fix (spot analyzer) : Clean pointers when closing.

DETAILS :

This is a minor code cleanup.
The garbager never deals with those pointers.
We clean them just against a heedache for those,
who reads that code.

[src/gzspotan.c]

2006-10-11T20:06:11.668976Z leonardo

Fix (memory manager) : gs_heap_free_object could break itself.

DETAILS :

See comment in code.
Debugged with ghostpcl 18-21.BIN .

[src/gsmalloc.c]

2006-10-11T18:50:08.977036Z Ray Johnston

Fix 'bound_0_1' procedure to return 'real' rather than 'int'.
Fixes CET 09-02.PS

[lib/gs_cspace.ps]

2006-10-11T18:12:10.866136Z Stefan Kemper

removing c++ comment.

Warning changes to gsmalloc.c have broken the -K set max heap usage option.

[src/gsmalloc.c]

2006-10-11T05:54:04.315501Z Ray Johnston

Add gs_cet.ps to the %rom%lib/ directory so that it will be found without
problems when running the PS CET conformance which needs this file.

Later we might remove it from the %rom%lib/ but it doesn't really take up
much space and it will prevent 'file not found' failures.

[src/int.mak]

2006-10-11T02:57:22.469112Z Ray Johnston

Initial version of 'startup' file to configure Ghostscript to match the
Adpbe CPSI to run CET tests.

[lib/gs_cet.ps]

2006-10-10T22:43:56.823756Z Stefan Kemper

Commenting out the memory wrappers retrying and locked.
This will obviously cause concern and testing for gs, 
on the other hand it simplifies the memory allocations
and removes some significant issues with memory cleanup
when multiple jobs are run together in a language switch
environment.

[src/gsmalloc.c]

2006-10-10T18:16:22.525231Z leonardo

Fix (PS interpreter) : Dont print "Returning error -102." that is not an error.

DETAILS :

The debug build printed "Returning error -102.".
-102 == e_InterpreterExit is not an error.
Don't print the confusing message.

[src/interp.c]

2006-10-10T18:00:19.925286Z leonardo

Fix (stroking) : Zero lengh dashes have been missed, part 2.

DETAILS :

1. Unwinding the revision 7094 change.

2. Fixing an antique bug, which persists since the repository was created.
   When computing the orientation of an isolated zero length stroke
   (near the code "const segment *end = psub->last;"),
   the old code erroneusely takes the direction to
   the last point of the previous subpath. 
   With recent changes it caused a wrong longitude adjustment
   for some PCL documents.
   Documented the right invariant in new comment.

3. The flag zero_length was wrong when a non-zero
   length segment follows a zero length segment.

4. Zero length strokes were missed with dot_length != 0
   and a non-trivial dash pattern (gxpdash.c, lib.mak).
   It's another case when PCL could miss dots.


[src/lib.mak src/gxpdash.c src/gxstroke.c]

2006-10-10T10:03:37.323396Z leonardo

Provide a handling of true Unicode fonts.

DETAILS :

Bug 688897 "Unicode fonts in Postscript" for the customer #130.

1. Define a new Ordering = Unicode for handling Unicode character sets.

2. Define a new Registry = Artifex for distinguishing those
   character sets from other Postscript vendors, 
   which do not define such character sets yet.

3. Define a new Identity-UTF16-H CMap for identity mapping
   from Unicode UTF16 to CIDs with the Unicode character set.

4. As a part of CIF font emulation with True Types,
   add the Unicode.Unicode entry to the .CMapChooser table,
   which actually is an identity translation (gs_ciddc.ps).

6. Extend the gs/lib/cidfmap syntax with handling
   Registry = Artifex (gs_fntem.ps).

7. Force embedding Artifex CMap into PDF (gsfcmap.c).

8. Account the knowledge that an Artifex Unicode CMap
   may be used for generating a ToUnicode CMap (zfcmap.c).

9. Document all that in gs/doc .

10. Bug: range.size was not initialized when creating
   an identity ToUnicode CMap (gsfcmap.c).

A PDF generated with this patch appears
not searchable with Adobe Acrobat,
and it cannot extract the text properly.
Not sure why. Likely it's another Adobe bug.

[Resource/CMap/Identity-UTF16-V lib/gs_ciddc.ps Resource/CMap/Identity-UTF16-H doc/Use.htm src/gdevpdtc.c src/gsfcmap.c src/zfcmap.c lib/gs_fntem.ps]

2006-10-06T18:53:35.444836Z Stefan Kemper

Stepping on Igor's stroke code fully expecting him to review it.
This is the copy of the stroke code Igor originally gave the PCL team.

The code it is replacing loses data and produces stray lines.

[src/gxstroke.c]

2006-10-06T16:54:37.190610Z Ray Johnston

Change to make color values be 'real' instead of sometimes 'integer' types
for PS CET 09-02 and MANY other pages.

DETAILS:

Since this is at the PS level, not the graphics lib, it shouldn't affect
PCL.

Note that 09-02 still shows a single instance of '0' instead of '0.0'.
I am continuing to track that down.

[lib/gs_devcs.ps src/zcolor.c]

2006-10-06T15:25:15.662720Z Stefan Kemper

Merge from pcl tree.

The freeing of the rop_dev and clip_dev in an image enum now 
unhooks forwarding devices prior to freeing otherwise there 
are memory leaks.

The rational behind the direct frees used here verses 
the more normal reference counting of graphic library objects 
has apparently been lost.  

[src/gxidata.c]

2006-10-06T15:20:13.457027Z Stefan Kemper

Removing incorrect unsetting of device color when the device isn't a 
bit tagging device.  The bit tagging code shouldn't affect other devices.


[src/gspaint.c]

2006-10-06T15:18:10.804229Z Stefan Kemper

Changing a logging error into a return error that will be ignored later.

This makes the -Z# debugging output more usable.


[src/gdevdflt.c]

2006-10-06T15:16:00.887988Z Stefan Kemper

Merge changes from pcl tree.

PSI_INCLUDED is used to signal that gs is not at the top of the system but
rather is part of a language switching build.

In this case the outputing of pages and management of the device is not 
completely under postscript's control.

[src/zdevice.c]

2006-10-06T15:12:52.976332Z Stefan Kemper

Merge fix from pcl tree, 
writing a display list with a contone device seg faulted.

[src/gxclimag.c]

2006-10-06T14:08:05.588652Z Stefan Kemper

Restore code that is required for raster ops. 


[src/gxdcolor.c]

2006-10-05T01:45:56.126213Z Alex Cherepanov

Pacify Valgrind. Copy a non 0-terminated PS string to a local buffer to avoid
scanning past the end of the string. Bug 688882.

[src/gdevpdfr.c]

2006-10-05T01:09:35.392689Z Alex Cherepanov

Following Acrobat Reader 5, ignore everything outside of begincmap..endcmap
Bug 688812, customer 170.

[lib/pdf_font.ps]

2006-10-05T01:00:55.479409Z Alex Cherepanov

Avoid the operand stack overflow. Construct CharStrings ductionary without
.dicttomark operator. Bug 688802, customer 130.

[lib/gs_ttf.ps]

2006-10-05T00:47:54.384597Z Alex Cherepanov

Use correct transformation matrix for calculating the current point movement
for PDF text rendering mode 3. Bug 688756, customer 700.

[lib/pdf_ops.ps]

2006-10-04T13:29:44.744703Z Alex Cherepanov

Fix a reference to an incorrect bug number in toolbin/vg_bugs.supp

[toolbin/vg_bugs.supp]

2006-10-04T12:30:21.555827Z Alex Cherepanov

Fix off-by-one error in the PDF font subset prefix generator that
mixed in an uninitialised byte when the object size was odd.
This error caused indeterministic PDF generation and Valgrind warnings.
Bug 688911.

[src/gdevpdtb.c toolbin/vg_bugs.supp]

2006-10-04T11:09:21.389337Z Alex Cherepanov

Use open_device procedure to identify the type of the device instead of the
standard gs_object_type() because gs_cpath_accum_device is allocaded on
the stack i.e. has no block header with a descriptor but has dev->memory set
like a heap-allocated device. Bug 688874.

[src/gxfill.c src/gzspotan.c src/gzspotan.h]

2006-10-03T18:08:37.387486Z leonardo

Fix (pdfwrite) : Pacify Valgrind with not touching an uninitialized data.

DETAILS :

Bug 688873 "pdfwrite :Valgrind reports uninitialized data".

The old code checked penum->text.x_widths, penum->text.y_widths
and shifted them forth and back when they are uninitialized.
It was not harmful because those pointers were not defererenced.
Also space.s_char was checked when unitialized. 
In those cases it should not be accessed.

[src/gdevpdtc.c src/gdevpdte.c]

2006-10-03T00:31:14.024018Z Ralph Giles

Port additional UFST initialization changes from ghostpcl trunk.

[src/fapiufst.c]

2006-10-02T23:26:12.368734Z Ralph Giles

Port UFST-related changes from the ghostpcl tree, r2472 to r2532. This
introduces gx_UFST_init() and _fini() functions, and make both PCL and 
PS ufst initialization use these functions instead of calling ufst
directly, so that the same ufst config is shared between the two.

Also, update the copyright headers, and defined a needed enum entry for 
UFST MicroType fonts.

[src/gxfapiu.c src/gxfapiu.h src/gxftype.h]

2006-10-02T23:21:05.393683Z Ralph Giles

Set normal eol and keyword substitution flags.

[src/gxfapiu.c src/gxfapiu.h]

2006-10-02T19:02:30.811324Z Ralph Giles

Make gs_image_common_init() a proper public function since it is called 
by the PCL interpreter.

[src/gsimage.c src/gsimage.h]

2006-10-02T14:10:53.409280Z Stefan Kemper


Add boolean USE_ttfReader to gs_type42_font_init()
In general this is always set true.  If this is set false the caller
will disable the attachment of ttfReader for dynalab ttf font hinting 
and the caller is expected to do all the gs_type42 font initialization
that was required prior to the addition of ttfReader to the code. 

Add an early out from gs_type42_font_init() that bypasses some table 
generation that isn't needed when USE_ttfReader is false.  Pulling the
return statement here will reenable this code and is harmless except for 
some small memory leaks.

Currently only the PXL downloaded ttf fonts use the false case init,
to render fonts with UFST not with FAPI ufst.

NO expected pdf or ps or pcl differences since the code path is identical.
  

[src/gxfcopy.c src/gxccman.c src/gxfont42.h src/gstype42.c src/zfont42.c]

2006-09-28T05:56:04.096363Z Ralph Giles

Add an error callback to the example jasper applications. Previously they
always failed (or succeeded) silently.

DETAILS:

The fprintf() calls were replaced with jas_eprintf() in this code along
with everywhere else, but no actual callback was installed, so the 
applications weren't able to give any feedback at all. So we now provide
a simple callback that just passes the message on to stderr as is appropriate
for a library client.

[jasper/src/appl/imgcmp.c jasper/src/appl/jasper.c jasper/src/appl/jasper_sdl.c jasper/src/appl/imginfo.c jasper/src/appl/jiv.c]

2006-09-27T20:37:41.367020Z Ralph Giles

Duplicate JPX image channels if the cmap box has multiple references to
satisfy the expectations of later parsing. Bug 688869.

DETAILS:

A paletted jpx image must contain a 'cmap' box that describes how to
build the output image channel by channel out of some combination of
decoded image components, which can be used either directly, or mapped
through a component of the included palette.

Previously, jasper created a new image component whenever a palette 
mapping was satisfied, but did nothing when the cmap specified a decoded
component was meant to be used directly. This created two problems: first
the cmap value was ignored, so if the direct mapping output channels were
in a different order from the decoded components, the would not be marked
correctly. Second, if multiple channels were mapped from the single decoded
component, this was not recorded and the image passed up from the decoder
would be "missing" a channel because component lookups don't go through
the decoded cmap table.

As I read the specification, we should really be creating a completely new
image by applying the cmap data to the decoded image. However, for PDF we
need access to the raw indexed image component before palette application,
and just duplicating directly references components within the same image
is a less invasive change.

[jasper/src/libjasper/jp2/jp2_dec.c jasper/src/libjasper/base/jas_image.c jasper/src/libjasper/include/jasper/jas_image.h]

2006-09-25T21:50:55.223674Z Ralph Giles

Correct a typo in the previous revision.

[src/configure.ac]

2006-09-25T21:45:34.607229Z Ralph Giles

Have the configure script check for fopen64 before using it.
Bug 688394.

DETAILS:

We use this as a shorthand to check for the marked *64() stdio
calls, and based on that define HAVE_FILE64, which is used in 
the unix platform code to select whether to call the marked
or normal FILE code when _LARGEFILE64_SOURCE is not defined.

This is required on MacOS X which does not provide fopen64()
and friends (or O_LARGEFILE) but nevertheless implements 
reasonable large file support with the normal routines on 
32-bit architectures without defining _LARGEFILE*_SOURCE.

The result should be the same with the autoconf build on
architectures where the previous code worked, including 
linux and cygwin. When building manually without passing
-DHAVE_FILE64, or on platforms that don't provide the 
marked 64-bit versions, we will now fall back to the 
vanilla functions, and so the bug may re-occur there. This
is better than failing to link on such platforms, which
was the previous behavior.

[src/Makefile.in src/configure.ac src/gp_unifs.c]

2006-09-24T23:50:46.301070Z Alex Cherepanov

Fix calculation of the PDF font subset prefix. This change has little effect,
except enabling previously unreachable code and generating different prefixes
in some cases.

[src/gdevpdtb.c]

2006-09-24T13:22:31.256099Z Alex Cherepanov

New version of vg_bugs.supp for the recent Valgrind and gcc. This file covers
all bugs detected on the regression test suite except the bugs in the system calls
and CRTL, which are difficult to suppres in the platform-independet way.

[toolbin/vg_bugs.supp]

2006-09-22T17:42:33.433152Z Alex Cherepanov

Change s/stream/strm/ to fix a MSVC 6 warning: C4224: nonstandard extension
used: formal parameter 'stream' was previously defined as a type.

[src/gp_iwatc.c src/gp_macio.c src/gp_mswin.c src/gp_os2.c src/gp_unifs.c src/gp.h src/gp_vms.c]

2006-09-22T00:51:32.310174Z leonardo

Fix : Cygwin/gcc warnings.

[src/gdevpdtt.c src/gdevpdtw.c src/devs.mak]

2006-09-21T20:24:01.154825Z leonardo

Fix (pdfwrite) : Don't use sscanf on a non 0-terminated PS strings.

DETAILS :

This redoes the revision 7062 change due to MSVC compiler warning.

The old code has 2 unpleasant hings :
1. MSVC yelds a warning about breaking 'const'.
2. It assumes no spaces at end of a serialized pdfmark argument value.

The new code should be clean.
 

[src/gdevpdfm.c]

2006-09-21T19:21:48.437020Z leonardo

Fix (pdf14 device) : Properly intersect rects when composing transparency buffers (continued).

DETAILS :

Bug 688631 "PDF segfault".

The old code supposed : the higher buffer, the smaller rect.
Not shure why. The test sample includes the opposite case.

Tha last patch for the subject appears incomplete.
 

[src/gdevp14.c]

2006-09-21T12:36:25.384099Z leonardo

Fix (pdfwrite) : Wrinting a PDF/A, convert True Type fonts into CIDFontType2 (continued 2).

DETAILS :

This completes the fix the bug 688790  
"pdfwrite : The PDF/A conversion needs to re-encode texts".

Adobe PDF/A preflight tool appears to check whether all glyphs
in the font have corresponding entries in W, W2 or Width array.
This includes unused glyphs and .notdef .
This patch implements creating a W array element for
.notdef when a Type 42 font is being converted into CIDFontType2.

Besides that, before this patch, when converting a Type 42 into
CIDFontType2, the W array was not written at all,
because pdf_write_embedded_font did not know about the conversion.
Adding a new argument to it for passing that information.

[src/gdevpdtb.c src/gxfcopy.c src/gdevpdtd.c src/gdevpdtt.c src/gdevpdtb.h src/gdevpdtw.c src/gxfcopy.h]

2006-09-20T18:26:17.744657Z Alex Cherepanov

Fix Valgrind warnings: (1) don't use sscanf on a non 0-terminated PS strings.
Temporaty replace the last character of the string with '\0' before scanning.
(2) Don't assign a structure to itself. Check for this case and skip the
assignment. Bug 688890.

[src/gdevpdfm.c src/gshtscr.c src/gdevprn.c]

2006-09-20T12:01:04.572458Z leonardo

Fix : pdfinflt.ps didn't work with some files.

DETAILS :

This is a minimal change for my current need.
This patch relates to the bug 687796, but doesn't fix it.

[toolbin/pdfinflt.ps]

2006-09-19T23:48:03.361024Z Ralph Giles

Correct a typo that cause jpx decoding to fail for all files.

[jasper/src/libjasper/jp2/jp2_dec.c]

2006-09-19T23:45:43.473583Z Ralph Giles

Propagate error messages from the jasper library.

[src/lib.mak src/sjpx.c]

2006-09-19T19:40:20.717813Z leonardo

Fix (pdfwrite) : Wrinting a PDF/A, convert True Type fonts into CIDFontType2 (continued).

DETAILS :

This is a partial fix the bug 688790  
"pdfwrite : The PDF/A conversion needs to re-encode texts".

This is a code restructurization against missed function prototypes.
The change is algorithmically equivalent.

[src/gdevpdtf.c src/gdevpdtw.c src/gdevpdtf.h src/gdevpdtw.h]

2006-09-19T18:59:10.571301Z leonardo

Fix (pdfwrite) : Wrinting a PDF/A, convert True Type fonts into CIDFontType2.

DETAILS :

THis is a partial fix the bug 688790  
"pdfwrite : The PDF/A conversion needs to re-encode texts".

PDF/A doesn't allow True Type fonts with Encoding Differences.
Therefore we convert such fonts into CIDFontType2.
The main work is done with 2 functions :
pdf_convert_truetype_font_descriptor and
pdf_convert_truetype_font.
See comments in code about the conversion algorithm.

Minor change (gdevpdtw.c) : The old code always compressed CIDToGIDMap.
The new code does dependently on the CompressFonts distiller parameter.
Except that, for a non-PDFA run the code change should be equivalent.

Now the font conversion works, but Adobe preflight tool
reports missed glyphs by unknown reason.
Will need a separate patch for that.

[src/gdevpdfx.h src/gdevpdtd.c src/gdevpdtf.c src/gdevpdtw.c src/gdevpdfb.h src/gdevpdtf.h]

2006-09-19T16:08:49.517323Z Alex Cherepanov

Work around a bug in the image operator, which doesn't always restore the
operand stack when it fails.
Bugs  688532, 688646, 688672, 688736, 688740, 688899.

[lib/pdf_draw.ps]

2006-09-19T09:55:25.954073Z leonardo

Fix (pdfwrite) : Uninitialized variables.

DETAILS :

1. ps_encoding_index sometimes was not initialized in gdevpdtt.c .
   Bug 688898 "ps2pdf segfaults in gdevpdtt.c: pdf_reserve_char_code_in_pdfont ()".

2. Cygwin/gcc reports a possibly uninitialized variable in gdevpdfu.c .
   Actually the compiler is not enough clever.

3. Removed unused variables in gdevpdtt.c .

[src/gdevpdtt.c src/gdevpdfu.c]

2006-09-19T08:20:45.476798Z leonardo

Fix (pdfwrite) : Generalize pdf_finish_font_descriptors (continued).

DETAILS :

This is a preparation for the bug 688790  
"pdfwrite : The PDF/A conversion needs to to re-encode texts".
The last patch appears incomplete.
This adds the pdf_resource_type_t parameter to pdf_finish_resources,
and defines pdf_convert_truetype_font_descriptor for future implementation.

This change is algorithmically equivalent.

[src/gdevpdtd.c src/gdevpdtf.c src/gdevpdfu.c src/gdevpdtw.c src/gdevpdtd.h src/devs.mak src/gdevpdtf.h]

2006-09-19T07:12:54.902919Z leonardo

Fix (pdfwrite) : Generalize pdf_finish_font_descriptors.

DETAILS :

This is a preparation for the bug 688790  
"pdfwrite : The PDF/A conversion needs to to re-encode texts".
It generalizes pdf_finish_font_descriptors to
pdf_finish_resources. Also define a stub for
pdf_convert_truetype_font.

This change is algorithmically equivalent.

[src/gdevpdtd.c src/gdevpdfu.c src/gdevpdtw.c src/gdevpdtd.h]

2006-09-19T03:55:34.654291Z Ralph Giles

Add the PDF/A and PDF/X prefix source files to the installed library 
file list. Bug 688861.

[src/unixinst.mak]

2006-09-19T02:33:01.156102Z Ralph Giles

Add a few new files to the unix makefile installation target. In 
particular, opdfread.ps is needed by the ps2write device. We also
install the new ps2ps2 convenience script for invoking it. Bug 688861.

[lib/ps2ps2 src/unixinst.mak]

2006-09-19T02:21:59.699240Z Ralph Giles

Correct a broken link. Fixes bug 688896.

[doc/Ps2pdf.htm]

2006-09-16T02:31:46.612720Z Alex Cherepanov

Change s/steram/stream/ introduced in rev. 7040 and causing compile errors
on old versions of MSVC. Bug 688893.

[src/gp_mswin.c src/gdevpdfi.c]

2006-09-14T17:29:56.804569Z Alex Cherepanov

Copy a non 0-terminated PS string to a local buffer to avoid scanning past
the end of the string. Also fix a few compiler warnings.
Bug 688882.

[src/gdevpdfp.c]

2006-09-14T17:19:41.966384Z Alex Cherepanov

Pacify Valgrind. Initialize penum->planes[i].source.data in gsimage.c
These pointers are enumerated during garbage collection.
Bug 688886.

[src/gsimage.c]

2006-09-14T12:15:43.242134Z leonardo

Fix (type1 hinter) : Delayedly adjust matrix precision with sbw data.

DETAILS :

Bug 688875 "type1 hinter: Valgrind reports uninitialized data".

The old code initializes matrices after importing data from sbw instruction.
If an sbw argument is big, t1_hinter__adjust_matrix_precision
adjusts the ctmf matrix coeffitients, which appear uninitialized
at that time. 

In most cases the bug has no consequences besides bothering Valgrind.
Only a harmful case was a big glyph width after small coordinates of all outline poles.
We don't know whether it practically appears.

The new code delays the accounting sbw arguments for the
time when all poles are imported. At that time ctmf
is definitely initialized, and the trailing moveto
already accounted the glyph width. So it only needs to account
the glyph origin for the case when its coordinate is 
a big negative number (a pretty rare case though).

[src/gxhintn.c]

2006-09-14T04:31:59.160662Z Ralph Giles

Make the gs configure check the exit code of the jasper configure script 
and print an error if it fails, avoiding a later build error if 
jas_config_ac.h is not generated. Patch from Marcos H. Woehrmann. 
Closes bug 688887.

[src/configure.ac]

2006-09-14T02:07:08.908291Z Ralph Giles

Check for a jpx image decoding fewer than the expected number of 
channels, returning an error instead of a segfault. Work around
for bug 688869, customer 531.

[jasper/src/libjasper/jp2/jp2_dec.c]

2006-09-14T01:57:35.708945Z Ralph Giles

Add correct copyright header and revision Id to some recently added 
files. Also set native eol-style.

[src/strmio.c src/wtsimdi.c src/strmio.h src/gdevimdi.c]

2006-09-13T17:23:29.059613Z leonardo

Fix (pdfwrite) : CIDFontType2 must not embed into PDF 1.2 .

DETAILS :

Bug 688889 "pdfwrite : CIDFontType2 must not embed with CompatibilityLevel=1.2".

The last patch fixed it incorrectly : it skips the font embedding 
rather than converts the font into a non-CID.
This patch does convert the font into a Type 3 bitmap font.

[src/gdevpdtt.c src/gdevpdtf.c]

2006-09-13T11:59:10.663495Z leonardo

Upgrading the clist file access with 64 bits file access.

DETAILS :

Bug 688394 "clist playback of large pdf image segfaults".

clist file position variable changed type to int64_t.
 

[src/gxclmem.c src/gxclfile.c src/gxclist.c src/gxcldev.h src/gxclmem.h src/gxband.h src/gxclread.c src/gxclio.h src/gxclutil.c]

2006-09-13T11:57:46.585499Z leonardo

Implementing a 64 bits file access.

DETAILS :

This is a preparation for a fix for 
bug 688394 "clist playback of large pdf image segfaults".

This is a preliminary implementation.
Now it compiles for MSVC8, Linux/gcc .
For other platforms/compilers it is stubbed with 32 bits file access.

This patch requires to define  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
compiler options on Linux in Makefile .

We could not figure out why Cygwin/gcc defines fopen64, ftello64, fseeko64,
and then cannot link them. We didn't find imlementations of those functions 
in C libraries.
 

[src/lib.mak src/gp_iwatc.c src/gp_macio.c src/gpmisc.c src/gp_mswin.c src/gpmisc.h src/gp_os2.c src/gp_unix.c src/gp_unifs.c src/gp.h src/gp_vms.c]

2006-09-13T11:56:34.416452Z leonardo

Unwinding the revision 7038 due to wrong log message.

[src/lib.mak src/gp_iwatc.c src/gp_macio.c src/gpmisc.c src/gp_mswin.c src/gpmisc.h src/gp_os2.c src/gp_unix.c src/gp_unifs.c src/gp.h src/gp_vms.c]

2006-09-13T11:36:29.213707Z leonardo

Fix : Cygwin/gcc warnings.

DETAILS :

This includes fixes for potentionally harmful warnings :

Uninitialized variable : interp.c, zupath.c .

Missing function prototype : zfile.h, stream.h (for sfxstdio.c),
 

[src/lib.mak src/gp_iwatc.c src/gp_macio.c src/gpmisc.c src/gp_mswin.c src/gpmisc.h src/gp_os2.c src/gp_unix.c src/gp_unifs.c src/gp.h src/gp_vms.c]

2006-09-13T03:18:02.411968Z L. Peter Deutsch

Fixes a minor logic bug relating to handleerror introduced by rev 6970.

[lib/gs_init.ps]

2006-09-13T00:08:23.753905Z leonardo

Fix (pdfwrite) : Improve the encoding choice for 'glyphshow'.

DETAILS :

Bug 688889 "pdfwrite : CIDFontType2 must not embed with CompatibilityLevel=1.2".
Also fixing the test case of the bug 688857 with CompatibilityLevel=1.4
(some characters were converted into outlines).

1. Embedded a CMap, which is not allowed in PDF 1.2 (gdevpdtc.c).

2. CIDFontType2 must not embed inro PDF 1.2 (gdevpdtf.c).

3. Improved pdf_make_text_glyphs_table_unencoded about the choice of
   character codes for converting /name glyphshow into a PDF text (gdevpdtt.c).
   See comments in code.

[src/gdevpdtc.c src/gdevpdtt.c src/gdevpdte.c src/gdevpdtf.c src/gdevpdtf.h]

2006-09-12T05:07:58.847657Z Ralph Giles

Move the debugging information to a single line to reduce log noise.

[src/mkromfs.c]

2006-09-11T20:26:01.824717Z Ralph Giles

Check in working files for the GPL imdi (integer multi-dimensional 
interpolation) library for color mapping. This is needed by the imdi
device. Port from the ghostpcl tree.

[imdi/arch.h imdi/imdi.c imdi/Jamfile imdi/imdi.h imdi/imdi_imp.h imdi/imdi_k.c imdi/cctiff.c imdi/LICENSE imdi/imdi_k.h imdi/imdi_tab.c imdi/config.h imdi/imdi_gen.c imdi/README imdi/cgen.c imdi/imdi_tab.h imdi/copyright.h imdi imdi/imdi_gen.h]

2006-09-11T07:02:18.845878Z L. Peter Deutsch

Replaces the unnecessary extra 'stopped' around uses of .completefont
(introduced in 7017) with uses of .errorexec, which was created for exactly
this purpose; restructures .completefont slightly so if .buildfontxxx
signals an error, that error will be reported rather than invalidfont.
(This behavior matches the Adobe interpreters.)

[lib/gs_fonts.ps]

2006-09-11T03:32:51.278989Z L. Peter Deutsch

Makes zbuildfont0 generate a rangecheck error if the Encoding of a
SubsVector-based font is not large enough for the entire code space, for
greater Adobe compatibility.  (The graphics library only causes an error if
a show operator would actually reference an element beyond the end of the
Encoding.)

[src/zfont0.c]

2006-09-11T03:29:39.283562Z L. Peter Deutsch

Makes kshow generate invalidfont if the current font is a composite font,
per PLRM.  (The graphics library does enforce this restriction, but in
gs_kshow_n_init, not in gs_kshow_begin, and the interpreter uses the
latter.)

[src/zchar.c]

2006-09-10T22:24:31.060699Z leonardo

Fix : pfont->uid.xvalues uses a wrong allocator 

DETAILS :

Bug 688883 "pfont->uid.xvalues uses a wrong allocator".

In the old code build_gs_simple_font allocates uid in the current memory, 
but few moments later build_gs_sub_font changes the current space to the space 
of the font dictionary, and allocates the font structure in it.

The new code allocates the font's uid in same space as the font dictionary.

[src/zbfont.c]

2006-09-10T15:55:10.276590Z Alex Cherepanov

Pacify Valgrind. Initialize an uninitialized variable and break up an
expression, which, after overly aggressive optimization, causes an access
to uninitialized memory. Partial fix for the bug 688845.

[src/sfxstdio.c src/zcontrol.c]

2006-09-10T15:16:03.635497Z Ray Johnston

Change to use 'export' rather than 'checkout' to decrease the size of the
local directory. We don't need the .svn tree for the test.

[toolbin/search-svn-revs]

2006-09-09T19:22:14.993650Z Alex Cherepanov

Use an integer format to print uint32_t value instead of a long format.
We don't support 16-bit platforms but we do support 64-bit platforms where
uint32_t and long are of different size. Bug 688860.
	

[src/mkromfs.c]

2006-09-08T17:14:10.868705Z Dan Coby

Fix for matrix operation floating point accuracy differences in the
CET 10-xx.ps files.

DETAILS:

This fix adds casts to float to produce the same floating point results
from matrix calculations as expected by the CET.

[src/gsmatrix.c src/gscoord.c]

2006-09-07T11:59:03.339408Z leonardo

Fix (pdfwrite) : Provide a conservative choice of BaseEncoiding.

DETAILS :

Bug 688823 "large files embedding AndaleMonoWTG".

The old code choosen BaseEncoding for each text string independently 
on others. It caused creating multiple font copies due to encoding conflict.
The new code implements a new font resource property 
preferred_encoding_index to make the choice be conservative
in case of multiple possibilities.

[src/gdevpdtt.c src/gdevpdtf.c src/gdevpdtf.h]

2006-09-07T06:41:20.228510Z Ray Johnston

Fix rangecheck problem (688841) and wrong .notdef appearance (688803)
for customer #130.

[lib/gs_ttf.ps]

2006-09-05T21:08:03.225425Z leonardo

Fix (pdf14 device) : Properly intersect rects when composing transparency buffers.

DETAILS :

Bug 688631 "PDF segfault".

The old code supposed : the higher buffer, the smaller rect.
Not shure why. The test sample includes the opposite case.
 

[src/gdevp14.c]

2006-09-04T22:47:41.607858Z Alex Cherepanov

Add Valgrind error suppression files for Ghostscript and 3rd party libraries to
gs/toolbin .

[toolbin/vg_bugs.supp toolbin/vg_okay.supp]

2006-09-04T12:50:36.207010Z leonardo

Fix (stroking) : Zero lengh dashes have been missed, part 1.

DETAILS :

Bug 688838 "stroking: A zero length dash missed".
Bug 687720 "Zero length lines must not stroke" (recently reopened).

This patch defines a new path element type dash_segment,
and uses it for internal needs of the stroking algorithm.

The old code skipped zero length dashes with a non-round cap.
It appears incompatible to Adobe CPSI.
The new code renders zero length dashes with any cap type,
if the path is not degenerate.

The new type of path segment works for storing the path tangent
at the dash start point. The tangent can't represent with a small line segment
(as it tried in old hacks) due to insufficient precision of 'fixed'.

In subpath_expand_dashes the branch "within epsilon of the end
of the dash element" have been changed for a better Adobe compatibility
with looking ahead for a zero length dash pattern.
When a zero length dash fall to a path corner,
the old code choosen the direction of the next segment (after the corner).
The new code (as Adobe compatibile) chooses the direction of the last segment
(before the corner).

In the old code of gx_stroke_path_only_aux we don't understand the branch
"if (pgs_lp->dot_length != 0) break;"
It look contradicting to the comment above it.
Leaving it as it is, but the condition has been changed to 
(pgs_lp->dot_length != 0 && pseg->type != s_dash)
to comply with the new logic. Likely dot_length is now a rudiment.

The old code arbitrary applied a horizontal stroke adjustment for 
zero length dashes. The new code uses the direction of the path tangent.
Due to that some dashes got ununiform shapes, and we improved 
the stroke adjustment against undiserable regression with PixelisAd.pdf.
The new code adjusts horizontal and vertical strokes,
each stroke by both directions X and Y, if the dash length
is greater than 1 pixel, and the dash is isolated. 
Otherwise the transversal adjustment applies only.

The old code did not render zero length subpathes 
when .setdotlength was called with a non-zero argument.
It happens since Revision 4173.
The new code restores the correct behavior, which is important
for the PCL interpreter.

An unfixed problem :
When a dash pattern is very short, 
the last dash of a segment appears ununiform due 
to accumulating a significant rounding error.
This problem to be fixed separately in order to
simplify the regression analyzis.

Note that this patch doesn't provide an HP LazerJet compatibility,
which orients zero length dashes at path corner differently than Adobe.
Also HP LazerJet doesn't paint zero length pathes with round caps as PLRM3 specifies.

[src/lib.mak src/gxpdash.c src/gxpath.h src/gzpath.h src/gxstroke.c src/gxpcopy.c src/gxpath.c]

2006-09-04T11:40:17.503680Z leonardo

Fix (ps2write) : Didn't write the OPDFRead procset.

DETAILS :

This patch includes 3 things :

1. In gdevpdfd.c : A temporary fix for Bug 688856  
"Problems with ps2write (see comment #5)".
We keep the bug open because it still requires our
attention about the order of initialization events.

2. In gdevpdtt.c : Allow writing True Types with glyph indices over 255.
The old code is compatible to a bug in Adobe reader 3,
which is irrelevant to ps2write. The new code 
keeps the old logic with pdfwrite and skips the check
with ps2write.

3. In opdfread.ps : .max was undefined.

This patch helps to work on the customer bug 688790  
"pdfwrite : The PDF/A conversion needs to to re-encode texts"
 

[src/gdevpdtt.c lib/opdfread.ps src/gdevpdfd.c]

2006-09-01T23:23:22.779504Z Ralph Giles

Port in progress IMDI device from the gs853merge branch.

DETAILS:

This implements a contone device that does accurate colorspace 
transforms based on ICCLib/Argyle IMDI. This is work in progress
by Dan Coby. It expectes the imdi source code off the gs top-level;
this define IMDISRCDIR is in devs.mak, but should be moved to the
top level makefile as with the other 3rd party library sources.

Committing to trunk so as not to lose the work when the merge branch 
goes away. New development should happen here.

[src/wtsimdi.c src/devs.mak src/gdevimdi.c]

2006-09-01T23:16:13.866145Z Ralph Giles

The official resource path is Resource/Font not Resource/Fonts

[src/Makefile.in]

2006-08-31T21:56:16.536344Z Dan Coby

Fix for 'invalid restore' in CET test file 16-04.ps.

DETAILS:

There are were complications.  1)  The procedure .completfont was not properly
signalling an error when it occured.  2)  This procedure is used from both
definefont and findfont.  We need the error to be indicated as coming from
the appropriate procedure.

The fix for this problem is to fix .completefont to properly report errors
and to add stopped contexts around each of the invocations of .completefont,
loading the errorname from .completefont and calling signalerror again with
the appropriate procedure name.

[lib/gs_fonts.ps]

2006-08-31T10:34:11.431819Z leonardo

Fix : Improving the documentation about computing a text object tag in gspaint.c .

DETAILS :

It's how I understand it while communicating with Stefan and Henry.
I'll post it to code review for possible further improvements.
 

[src/gspaint.c]

2006-08-31T09:53:51.102347Z leonardo

Fix : Cygwin/gcc warnings.

DETAILS :

This includes fixes for potentionally harmful warnings :

Uninitialized variable : interp.c, zupath.c .

Missing function prototype : zfile.h, stream.h (for sfxstdio.c),
 

[src/gxi16bit.c src/gxhintn.c src/zstack.c src/stream.h src/interp.c src/files.h src/gswts.c src/gdevjpeg.c src/zupath.c]

2006-08-30T19:04:15.573176Z L. Peter Deutsch

Adds an Id line, accidentally omitted on initial checkin.

[toolbin/ocheck.py]

2006-08-30T18:38:50.635148Z Ralph Giles

Print the hostname and architecture of the machine running the 
regression to better distinguish multiple reports. This calls
common unix tools and may therefore reduce portability.

Also, print something to acknowledge empty fields in the report.

[toolbin/tests/run_nightly]

2006-08-30T16:37:43.892868Z L. Peter Deutsch

Adds a new tool, ocheck.py, for analyzing the dependency structure of object
modules.  (It was originally created for detecting references from the
library to the PostScript interpreter.)  While written in Python, it
requires GNU-compatible 'nm' and 'objdump' programs, and also uses Python's
subprocess module, so it may only run on Unix/Linux systems.

[toolbin/ocheck.py]

2006-08-30T00:24:55.621075Z Ralph Giles

Port Stefan Kemper's object tagging work from the gs853merge branch of 
the ghostpcl tree. This implements a simple and somewhat ad hoc method 
of generating tag bits (as for RGBK generation) marking text and vector 
vs image pixels.

DETAILS:

This conflicts with Dan Coby's fix for bug 688638 in r6702. Dan will 
resolve the conflict as part on new work he's doing on the code.

[src/lib.mak src/gstext.c src/gdevbit.c src/gspaint.c src/devs.mak src/gsutil.c]

2006-08-29T15:38:38.438783Z leonardo

Fix : MSVC compiler warning.

[src/strmio.c]

2006-08-29T04:45:22.639369Z Ray Johnston

Port changes over from the gs853merge tree to allow building a graphics
lib with strmio, but without any interpreter modules (PCL6).

[src/stream.h src/sfxstdio.c src/files.h src/zfile.c src/stream.c]

2006-08-29T04:26:49.196416Z Ray Johnston

Add missing dependency for sarc4 filter module in pdfwrite. Needed when
PDF interpreter is not included, but pdfwrite is.

[src/devs.mak]

2006-08-29T04:23:40.404599Z Ray Johnston

Set s->position to aero initially so that sftell before any other operation
will be correct. Reformat prototypes in strmio.h to single line format.

[src/strmio.c src/strmio.h]

2006-08-29T03:43:36.531545Z Ralph Giles

Port jpeg device scale and translate functions from GhostPCL.

DETAILS:

This patch adds four new parameters to the jpeg devices. In addition to 
Quality, one can now set float parameters ViewScaleX, ViewScaleY, 
ViewTransX, and ViewTransY so set a scale and offset to use when 
rasterizing the page.

This patch also expands some of the device parameter macros and cleans 
up the comments. 

[src/gdevjpeg.c]

2006-08-26T19:13:58.371290Z Dan Coby

Fix for CET test file 18-02F.ps.  The makepattern operator creates a pattern
dictionary that contains an 'Implementation' entry. The PLRM 3rd says the
following about the contents of the Implementation entry:  "The type and
value of this entry are implementation-dependent."  However 18-02F.ps page 2
expects that this entry be an array and that the second element of the array
be a gstate.  We are making GS compatible with what the CET expects.

[lib/gs_lev2.ps]

2006-08-26T00:43:26.480835Z Ralph Giles

Fix comment formatting.

[src/gsptype1.c]

2006-08-23T01:42:29.044863Z Ray Johnston

Fix missing return of combined string length and add missing return cundition
documentation.

[src/gpmisc.c]

2006-08-21T20:37:48.696370Z Ray Johnston

Handle IODevice specifications in file name in gp_file_name_combine_generic
by detecting leading '%' and returning the filename unchanged. The file_name_
combine logic is platform dependent, but IODevices don't use the same rules,
so an IODevice prefix can't be meaningfully processed.

DETAILS:

IN theory, a %os% header should be treated differently, but for now handle
this as an IODevice case. This means that a %os% prefix can be used to avoid
processing such as changing A/../B to B.

[src/gpmisc.c]

2006-08-19T17:33:54.163240Z Ray Johnston

Revert previous change that could cause an infinite loop until I can
figure out this "file_name_combine" logic in order to handle the %device%
syntax without the hang.

[src/gpmisc.c]

2006-08-18T10:34:25.106987Z leonardo

Fix (pdfwrite) : Quiet the heal validation procedure.

DETAILS :

See comment in code.

[src/gdevpdtt.c]

2006-08-18T07:56:59.656655Z leonardo

Fix : MSVC8 compiler warnings.

DETAILS :

gs_lib_ctx_get_non_gc_memory_t is called in sfopen and the result is passed to
file_open_stream, which assumes non-const.

A better fix would be to assume gs_memory_te to be const for allocators
and for functions and for structures which pass it transparently to allocators.
Actually allocators modify only a subclass data,
so that 'const' may be safely broken inside the allocator method
when casting to the subclass.
The garbager modifies exactly gs_memory_t pointers,
but it is NOT called from allocators.

The "better" fix requires changes to lots of modules,
so we choose the easiest fix for now.

Minor changes : 
1. Unuseful variable in fapiufst.c unintentiopnally contributed with the last patch.
2. "const char *" to "const byte *" warning in strmio.c .

[src/strmio.c src/gslibctx.c src/fapiufst.c src/gslibctx.h]

2006-08-18T04:42:11.979343Z Ray Johnston

Modifications to switch to "strmio" stream I/O so that we can read from
either OS file system or IODevice files (such as %rom% file system).
Also remove unneeded i_ctx_p from fapi_*_instantiate functions (so that
we don't need the PS interpreter). The strmio functions are now included
in the graphics lib build (always).

Change fapiufst to use strmio instead of FILE * file IO. A separate change
is needed in UFST code to do this (fc_dafil.*)

Add UFST_ROMFS_ARGS to add the fco's to the %rom% file list. Note that the
UFST_ROMFS_ARGS are not defined in any top level makefile in the gs tree
but are used by the language_switch build where they have been tested.

Remove some 'hard coded' paths in the fapiufst module (F:/...)

[src/iplugin.h src/lib.mak src/strmio.c src/int.mak src/fapiufst.c src/strmio.h src/gpmisc.c lib/gs_fapi.ps src/iplugin.c lib/FAPIconfig-FCO src/fapi_ft.c]

2006-08-18T04:04:48.484817Z Ray Johnston

Refactor several FILE stream related routines to sfxstdio.c so that zfile
will not be needed in order to use strmio functions coming soon. We want
to be able to use strmio without the PS interpreter.

[src/stream.h src/sfxstdio.c src/zfile.c]

2006-08-17T15:27:55.324234Z leonardo

Fix (resource machinery) : 'resourceforall' truncated names of file-based resources.

DETAILS :

Bug 688737 "'resourceforall' truncates names of file-based resources".
Thanks to SaGS for the good analyzis done in the bug report.

When enumerating file-based resources, the library
enumerates resource file paths and then needs to
decompose a file path into a directory name and the resource name.
The resource name, which matches the specified template,
is always a suffix of the path. Thus to know the resource name,
one needs to compute the length of the suffix.
However the latter is not trivial
due to mixing 2 syntacies : the Postscript template string syntax,
and the file path syntax of the underlying operating system.

To know the suffix length, the old code computed
the difference of the directory path template length,
and the template argument length.
Hoewver the directory path length in not equal to
the directory path template length if the patch
includes symbols, which need an escapement when converting
a string to a template string.

The new code passes lengthes of source directory paths though the
.generate_dir_list_templates procedure, so that they don't need to 
restore from the generated templates. 
The patch enhances the function with inserting source length between the
generated template list elements. The new function
gets an additional boolean operand, which tells whether to insert
lenthes or not. The enhanced function is renemaed into
.generate_dir_list_templates_with_length .
The old name .generate_dir_list_templates is defined for
the backward compatibility as a specialization of the new function.
The new function works for ResourceForAll .

[lib/gs_res.ps lib/gs_init.ps]

2006-08-16T17:23:10.339348Z leonardo

Fix (font renderer) : Clean up the character cache after a character rendering fails.

DETAILS :

When a character rendering fails, the old code leaves 
character data allocated in the cache but the character
is not added to the hash table. It breaks a global invariant
(1 to 1 correspondence of hash table entries and cached characters),
which is assumed by other cache accessors. As a result it 
causes an infinite loop when the function alloc_char_in_chunk 
is later called for another character and needs to release cache 
space from the "incomplete" character. 
Thanks to Peter L. Deutsch for analyzis.

The infinite loop occurance looks pretty stochastic because 
it depends on many factors, such as cache size and sizes rendered of glyphs.

The new code performs a cache cleanup 
when leaving a character rendering with error code.
See comments in code for more details.

This fix changes the prototype of gs_type42_append,
which is called from the PCL interpreter.
It should fix the problem with True Type fonts
in the PCL interpreter.

For type 1 fonts the cleanup code is a part of the PS interpreter
rather than a part of the graphics library.
It is not harmful because PCL interpreter doesn't render Type 1 fonts.
A better fix needs to modify the prototype of 
type1_exec_init and store the gs_show_enum pointer into the gs_type1_state instance,
to provide the cleanup in type1_continue_dispatch.
It would look ugly, so we don't do it now without a strong necessity.

Debugged with CET tests 13-12.PS, 13-22.PS .

[src/lib.mak src/zchar42.c src/gxfont42.h src/int.mak src/gstype42.c src/zchar1.c]

2006-08-16T00:09:37.858838Z Dan Coby

The ustrokepath operator has an optional matrix parameter.
This matrix is concatenated to the CTM.  The specified path
is then stroked.  This change restores the original CTM after
the path has been stroked.  Fixes the much25 test on page 2
of the CET test file 10-15.ps.

[src/zupath.c]

2006-08-14T23:05:38.304015Z Ralph Giles

Enable COMPILE_INITS by default in the autoconf build, as suggested by 
Ray Johnston.

[src/configure.ac]

2006-08-14T22:47:33.394093Z Ralph Giles

Fix a type size issue that prevented mkromfs from running correctly on 
64 bit machines. Bug 688792.

[src/mkromfs.c]

2006-08-14T22:08:43.391773Z Dan Coby

Add operand type checks and length checks for the currentmatrix,
identmatrix, and setmatrix operators.  This is done to match
error types expected by the CET.  10-03.ps page 2 tests
currentmatrix.  10-06.ps page 1 tests identmatrix.  10-14.ps
page 2 tests setmatrix.

[lib/gs_init.ps]

2006-08-14T12:54:58.867665Z Alex Cherepanov

Report rangecheck or typecheck errors rather than undefined when the image type
is not known. Partial fix for 12-07a.ps and 12-08b.ps .

[lib/gs_img.ps]

2006-08-14T09:46:08.791598Z Alex Cherepanov

Return undefinedresult instead of rangecheck from dict_int_null_param()
and dict_uint_param() procedures when the key is not found.
Partial fix for 12-07a.ps and 12-08b.ps .

[src/idparam.c]

2006-08-13T03:28:06.727937Z Alex Cherepanov

Emulate sequential operand checking for colorimage operator.
Reject strings of different length as multiple date sources for sampled images.
Fix a typo in img_unbuild_image_dict procedure.

[src/zimage.c lib/gs_img.ps]

2006-08-11T19:44:11.724459Z leonardo

Fix : gs_fillpage passed a low level color to high level devices.

DETAILS :

This was occasionally detected while working on the bug 688641.
gs_fillpage inaccurately checked whether the device can handle high level colors,
and sometimes passed low level color instead high level color.
It happens so because gx_hld_is_hl_color_available works only after a color is set.

We don't expect a behavior change for pdfwrite, ps2write from this patch, 
because they ignore the initial page fill, which gs_fillpage performs.
Other devices don't handle high level color, so the change doesn't affect them also. 

[src/gspaint.c]

2006-08-11T17:50:36.791125Z leonardo

Fix (pdfwrite) : A stronger condition for skipping the initial fill with a white color.

DETAILS :

Bug 688641 "pdfwrite is_in_page is broken, leads to spurious transparency".

The old code skept any number initial fills with a white color.
The new code skips only if the filling box is entire page.
Also the condition about nested streams (sbstack_depth == 0) was wrong for ps2write.

[src/gdevpdfd.c]

2006-08-11T13:09:34.153091Z leonardo

Fix (type 1 hinter) : Prevent an infinite loop on an incorrect contour.

DETAILS :

Bug 688676 "Ghostscript 8.53 enters infinite loop rendering a font".

The old code inaccurately worked with 'closepath' segments when 
trying to apply a hint.

[src/gxhintn.c]

2006-08-11T11:48:47.724620Z leonardo

Fix (pdfwrite) : Upgrading the documentation about AutoFilter*Images.

[doc/Ps2pdf.htm]

2006-08-10T11:13:34.225727Z leonardo

Fix (pdfwrite) : Wrong xref : Unuseful object ID when a font is not really used in the document.

DETAILS :

Bug 688824 "invalid xref table from pdfwrite",

The old code reserved an object ID for the FontFile object
when the font is set but no text rendered with the font in the document.
The new code skips creating the FontFile object if
no object ID assigned to the font descriptor.

[src/gdevpdtd.c]

2006-08-10T07:37:45.977950Z leonardo

Fix : MSVC8 compiler warnings.

[src/gdevdflt.c src/zfunc0.c]

2006-08-09T17:48:58.178137Z Raph Levien

Fix: Change pdfwrite pattern bbox to use PDF compliant syntax for float
bbox coordinates, rather than sprintf %g. Fixes (reopened) bug #688167.

[src/gdevpdfv.c]

2006-08-09T01:29:21.048118Z L. Peter Deutsch

Changes the equality algorithm for FontID objects to match Adobe
interpreters (we think).  NOTE: THIS IS A NON-BACKWARD-COMPATIBLE CHANGE
(but one that is unlikely to have any adverse consequences).

[src/iutil.c]

2006-08-09T00:32:12.853814Z Dan Coby

Fix for 688822 failure to repair broken xref table.

DETAILS:

The given test file has problems.  The file was not mangled.  the
application that created the file has some problems.  However Acrobat
7.0 is able to display the file.

The file does not specify the application which created the file.

The file misspells the key word startxref (it says startref).  The
xref location is given as 54593016.  The file only has 2,210,991 bytes.
The the location is off by over a factor of 20.

The fix consists of making the xref rebuild logic tolerant of the
misspelling and verifying that the given xref location is within the
file.

[lib/pdf_main.ps lib/pdf_rbld.ps]

2006-08-09T00:17:29.773469Z Dan Coby

Change the error reporting to match the CET expected values for CET
test file 10-01.ps page 3.  We now correctly report stackunderflow
and type checks on this page.

[src/iutil.c]

2006-08-09T00:11:09.435929Z Ray Johnston

Remove an optimization that doesn't make a measurable difference in
preparation for restructuring FILE * stream functions into the graphics
library (out of zfile.c).

[src/zfile.c]

2006-08-08T16:04:53.066224Z L. Peter Deutsch

Fixes a just-introduced bug in the stackunderflow case of the user path
operators.

[src/zupath.c]

2006-08-07T17:26:14.883418Z Alex Cherepanov

Makes ifelse and if operators check the type of the topmost argument before
checking other arguments.

[src/interp.c src/zcontrol.c]

2006-08-07T08:38:34.292323Z L. Peter Deutsch

Makes error returns from ineofill (and many other user path operators) match
Adobe interpreters.

[src/zupath.c]

2006-08-06T20:36:34.745839Z Alex Cherepanov

Makes dictstack check for the array size before checking for the access status.

[src/zdict.c]

2006-08-06T14:13:41.382704Z Alex Cherepanov

Return typecheck rather than invalidaccess when given a literal
array instead of a procedure.

[src/iutil.c]

2006-08-06T01:34:32.877045Z Alex Cherepanov

Makes rectfill, rectstroke, and rectclip generate typecheck rather than
rangecheck when given an argument of the wrong size or content.

[src/zdps1.c src/ibnum.c]

2006-08-05T04:33:11.593911Z L. Peter Deutsch

For greater Adobe compatibility, moves all non-standard entries out of
errordict: the handler for unknownerror to a new gserrordict (known to the
interpreter), and .GShandleerror to systemdict.  Similarly, moves making
errordict entries for optional features (including Level 2) to the feature
implementation file, so that e.g. the DPS entries don't appear in non-DPS
systems.

[lib/gs_dps.ps lib/gs_dps2.ps src/interp.c src/ierrors.h lib/gs_init.ps src/gserrors.h]

2006-08-05T03:17:54.678058Z Alex Cherepanov

Makes astore generate invalidaccess rather than typecheck when
given a packed array.

[src/zarray.c]

2006-08-05T02:16:49.849366Z L. Peter Deutsch

When an error occurs within an operator procedure, arranges for the 'error
object' to be the pseudo-operator rather than the current interpreter
object, to mimic the behavior of primitive operators, for greater Adobe
compatibility.  This can be overridden locally for callouts such as from
filenameforall or resourceforall, using the new .errorexec operator.

[src/iconf.c src/interp.c src/opextern.h lib/gs_init.ps]

2006-08-04T22:48:53.701035Z L. Peter Deutsch

Adds braces around the body of the new return_with_error_tx_op macro, to
avoid an ambiguous 'else'.

[src/interp.c]

2006-08-04T21:43:08.671407Z Alex Cherepanov

Makes astore to a 0-length array valid regardless of the array access status.

[src/zarray.c]

2006-08-04T18:28:19.632057Z Alex Cherepanov

Makes roll operator generate stackunderflow rather than rangecheck when 
there's not enough elements on the stack.

[src/zstack.c]

2006-08-04T18:11:09.614818Z Alex Cherepanov

Makes index operator generate stackunderflow rather than rangecheck when 
there's no element on the stack pointed by the argument.

[src/zstack.c]

2006-08-04T17:29:08.193973Z Alex Cherepanov

Makes copy operator generate rangecheck rather than stackunderflow when given
a negative argument.

[src/zgeneric.c]

2006-08-04T16:55:18.531677Z L. Peter Deutsch

Makes the array operator return limitcheck rather than rangecheck if the
requested size is too large.

[src/zarray.c]

2006-08-04T15:46:34.786064Z L. Peter Deutsch

Makes packedarray generate stackunderflow rather than rangecheck when given
a too-large positive argument.

[src/zpacked.c]

2006-08-04T15:20:42.125769Z L. Peter Deutsch

Replaces relevant uses of index by .argindex, and adds a few other checks,
so that pseudo-operators will cause a stackunderflow rather than a
rangecheck when given too few arguments.  Only the following init files have
been modified: gs_{btokn,dps1,dps2,init,lev2}.ps -- many more require
updating.  However, since the only reason for this change is to satisfy the
Genoa test suite, further updates can be done as needed.

[lib/gs_dps1.ps src/zstack.c lib/gs_dps2.ps lib/gs_lev2.ps lib/gs_btokn.ps lib/gs_init.ps]

2006-08-04T14:07:13.211741Z Alex Cherepanov

Work around a bug in "MSVC .net 2005 express" CRTL, which doesn't support
"%+02d" format.

[src/iutil.c]

2006-08-04T04:22:48.633454Z Alex Cherepanov

Set the correct error object when special operators (x_add, etc.) fail.

DETAILS:
If control reaches the special operators (x_add, etc.) as a result of
interpreting an executable name, iref points to the name, not the
operator, so the name rather than the operator becomes the error object,
which is wrong.  We detect and handle this case explicitly when an error
occurs, so as not to slow down the non-error case.

[src/interp.c]

2006-08-04T04:08:45.729436Z Alex Cherepanov

Re-format the exponent in floating point numbers to satisfy Genoa CET test.

[src/iutil.c]

2006-08-03T05:43:28.564474Z L. Peter Deutsch

Fixes bug: several dictionary operators (known, undef, where) did not cause
a typecheck error if the 'key' argument was a null.

[src/idict.c src/zdict.c src/idict.h]

2006-08-03T05:10:23.146390Z L. Peter Deutsch

On Level >=2 systems, makes .undef a synonym for undef rather than vice
versa, to produce Adobe-compatible stack traces on errors.

[src/zdict.c lib/gs_dps1.ps]

2006-08-02T21:38:04.138968Z L. Peter Deutsch

Fixes eq and ne so that an array is never eq to a packedarray, even if both
have zero length.

[src/iutil.c]

2006-08-02T21:10:17.237822Z L. Peter Deutsch

On Level >=2 systems, makes .dicttomark a synonym for >> rather than vice
versa, to produce Adobe-compatible stack traces on errors.

[src/zdict.c lib/gs_lev2.ps]

2006-08-02T21:08:57.885732Z L. Peter Deutsch

Removes dpsnext from the default FEATURE_DEVS, since the presence of
deviceinfo creates an Adobe incompatibility in Genoa PS LL3 CET 20-23.

[src/Makefile.in]

2006-08-02T19:47:26.316967Z Dan Coby

Fix for 'invalid restore' in CET 09-47n.ps.

DETAILS:

The test file has a very bad call to the setpattern operator.
For this pattern, setpattern is expecting both the pattern dict and
a set of four color values.  None of the color values are present.
THe pattern color space processing logic was roling the stack to
verify that the color values are either integers or reals.  This
correctly produces an error.  However the stack was left disordered.
This resulted in the invalid restore since the pattern dict (local
memory) was still of the stack when the restore was executed.

Note:  The first attempt at a fix involved trying to use the procedure
check_num_stack (which is used by all of the other color spaces).
Instead of rolling the stack, a mark was placed and the color values
were copied to the top for check_num_stack.  If an error was detected
then a cleartomark was done.  This fails with the given test file since
there are marks in the stack where the color values should be.  Thus
the cleartomark did not clear to the proper mark.

The final solution involves sinply checking the type of the color values
inline instead of rolling the stack and using check_num_stack.

[lib/gs_patrn.ps]

2006-08-02T18:08:56.997894Z L. Peter Deutsch

Makes "(/) token" correctly return an empty name rather than causing a
syntaxerror.

[src/iscan.c]

2006-08-02T18:05:32.494329Z L. Peter Deutsch

Changes cvs for reals: 'e' is no longer changed to
'.0e', and 0.0001 (a boundary case) now converts to '0.0001'
rather than '1.0e+04'.  THIS IS A NON-BACKWARD-COMPATIBLE CHANGE for
compatibility with Adobe interpreters.

[src/iutil.c]

2006-08-02T12:29:12.940833Z L. Peter Deutsch

Changes pathbbox from an operator procedure to an operator, in order to
match the stack trace (on an error) from Adobe interpreters (checked by the
Genoa CET).

[src/zpath1.c lib/gs_init.ps]

2006-08-02T04:35:45.952210Z L. Peter Deutsch

Pops arguments off the stack if an error occurs while interpreting a user
path (for Adobe compatibility); enforces the user path order requirements
(ucache must come first if at all, setbbox must come first or immediately
after ucache, setbbox is required).

[src/zupath.c]

2006-08-02T01:14:35.678026Z Alex Cherepanov

Make string operator error reprorting similar to Distiller's.

[src/zstring.c]

2006-08-02T00:47:25.925799Z Alex Cherepanov

Make putinterval operator error reprorting similar to Distiller's.

[src/zgeneric.c]

2006-08-01T22:43:34.939677Z Alex Cherepanov

Make get operator error reprorting similar to Distiller's.

[src/zgeneric.c]

2006-08-01T21:12:02.550966Z Alex Cherepanov

Make forall operator error reprorting similar to Distiller's.

[src/zgeneric.c]

2006-08-01T18:52:57.821971Z Alex Cherepanov

Make copy operator error reprorting similar to Distiller's.

[src/zgeneric.c]

2006-08-01T16:55:54.568960Z Alex Cherepanov

Make anchorsearch error reprorting compatible with Distiller.

[src/zstring.c]

2006-08-01T01:10:30.751173Z Ralph Giles

Require transparency support when building the graphics library.

DETAILS:

Prior to this change, Ghostscript would not build without translib.dev
because the ADDCOMP pdf14trans line in libs.dev, which defined the device
but did not pull in its implementation. Normally this happens through 
pdf.dev.

A better fix might be to move the pdf14trans line to pdf.dev and let
those needing transparency support outside of pdf add translib.dev
explicitly to FEATURE_DEVS.

[src/lib.mak]

2006-08-01T00:06:02.095465Z Ralph Giles

MD5 is required by the persistent cache implementation on unix. Add it to the platform dependency list.

[src/unix-aux.mak]

2006-07-31T18:49:16.317202Z Ralph Giles

Pass a 32-element string to cvrs in instances where the int could be more 
than 32 bits on some architectures. After a sketch by L. Peter Deutsch,
Closes bug 688794.

DETAILS:

An  in the Ghostscript ps interpreter is a C long, and so on 64 bit Linux, for example, it will be 64 bits, which in these instances require more than 8 characters for representation in hex. We use 32 characters (128 bits of hex) to be on the safe side.

The PLRM says the size of an int is implementation dependent. It can also be argued that it assumes this is 32 bits. In fact, one of the Genoa tests fails with longer ints. We choose to follow the clearest statement here, that the size is up to us.

[lib/pdf_font.ps lib/gs_ttf.ps]

2006-07-31T17:39:29.043892Z Ralph Giles

Remove the 'dosdefault' stamp file, whose creation causes problems on 
MS Windows 9X. Closes bug 688816.

[src/msvccmd.mak]

2006-07-31T02:39:25.938560Z L. Peter Deutsch

Makes gs match an apparent bug in Adobe interpreters, which cause an
invalidaccess error when 'exec'ing a noaccess literal (other than
dictionaries).  Fixes a "failure" in Genoa PS3 CET 24-09.

[src/zcontrol.c]

2006-07-31T02:38:14.326304Z L. Peter Deutsch

Makes gs match the behavior of Adobe interpreters, which allow executing
noaccess on a readonly or noaccess dictionary, even though Red Book 3 says
that changing the access of a read-only dictionary is not allowed.  Fixes a
"failure" in Genoa PS3 CET 24-09.

[src/ztype.c]

2006-07-28T06:22:57.072635Z leonardo

Fix (pdfwrite) : Incorrect image conversion with CompatibilityLevel=1.2 .

DETAILS :

Bug 688766 "Wrong graphics after ps2ps2 conversion."
Bug 688772 "Bad PDF generated with -dCompatibilityLevel=1.2"

Patch from SaGS.

1. pdf_begin_typed_image() did not synchronize the clipping path in some cases (gdevpdfi.c).
2. Delayed the synchronization for after checking the matrix singularity
   against writing an unuseful clipping before a skipped image. 
2. write_image_with_clip improiperly placed the 2nd and further subimages
   due to dropping the image's 'cm' with the subimage's 'Q'.
3. gx_image_enum_begin computed a wrong clipping box.
   In the new code pdf_setup_masked_image_converter installs
   a better get_clipping_box method, which is implemented 
   with the new function lcvd_get_clipping_box_shifted_from_mdev.
4. pdf_image3_make_mcde passed the clipping path to a memory device,
   which uses a different coordinate system. The new code does not
   pass the clipping path (gdevpdfi.c) and uses the device clipping box instead.

For more details see Bug 688766.

[src/gdevpdfx.h src/gdevpdfd.c src/gdevpdfi.c]

2006-07-28T01:23:29.511044Z Dan Coby

Fix for pages 4, 5, 13, 14 of the CET test file 12-02.ps.
This file creates colorimages with a size of zero.  The CET
expects that these colorimages will be ignored.

[lib/gs_img.ps]

2006-07-27T07:06:36.388322Z Dan Coby

Fix for segv in CET files 32-32.ps and 22-11.ps.  Both
files use binary object sequences with an object type of
'user name' however no user names have been defined.
The fix consists of checking for this situation and returning
an e_undefined error.  (The choice of error is because CPSI
also returns a 'undefined' error.

[src/iscanbin.c]

2006-07-27T01:15:59.601586Z Alex Cherepanov

Accept string values of page device, halftone, and rendering intent names.
PLRM specifies that all these values can be names or strings.
Bug 688776.

[lib/gs_lev2.ps]

2006-07-26T05:03:57.276453Z Dan Coby

Fix for CET test file 12-14c.ps.  This file was seg faulting.
The cause was some uniniitalized pointers that were being
freed when given invalid function parameters.  (The test file
was verifying the handling of invalid functions.)

[src/zfunc0.c]

2006-07-25T18:29:43.943994Z Ray Johnston

Fix CIDFontType 4 (FontType 32) handling so that read-only font dicts
can be used. Fixes PSLL3 CET 35-02.ps 'invalidaccess in -put-'.

[lib/gs_typ32.ps]

2006-07-23T19:25:14.174116Z Ralph Giles

Remove the requirement for HAVE_LONG_LONG to be defined before generating
ARCH_LOG2_SIZEOF_LONG_LONG. Since this was added, we've begun requiring
both signed and unsigned 64 bit types. Almost all platforms with a 64 bit
int provide long long, so this defaulting to on is a better approach.

We make an exception for MSVC which we support and which does not provide
'long long'. The requirement for a 64 bit type is taken care of by a matching
platform-specific #ifdef section in stdint_.h.

To add support for other such platforms, add another platform option to this
#ifdef and a corresponding section to stdint_.h.

Bug 688805 for customer 613.

[src/genarch.c]

2006-07-21T20:48:22.048908Z Ray Johnston

Add in aliases for glyphs that have the same Unicode value in the Adobe
Glyph List version 2.0. If both names are defined (presumably unique)
don't change them. If either name is known, make the other name an alias.
Bug 688799 and 688800 for customer 130.

[lib/gs_ttf.ps]

2006-07-20T22:35:31.758145Z Raph Levien

Finishes implementation of LeadingEdge parameter, primarily intended for
rotating pages to fit paper tray orientation. The LeadingEdge parameter
is an Adobe-defined setpagedevice parameter, and can be set by 
PostScript code for explicit control over rotation, or can be set by the
device to reflect device knowledge of the tray orientation (the 
mechanism for the latter is documented in Drivers.htm). This patch
completely replaces the old TrayOrientation parameter, which had similar 
goals but was not standard, and fixes some problems with that 
implementation.

[src/gsdparam.c src/gdevdflt.c doc/Drivers.htm src/gxdevice.h doc/Language.htm lib/gs_setpd.ps src/gsdevice.c src/gxdevcli.h]

2006-07-20T19:18:25.263338Z leonardo

Fix : Cygwin/gcc warned unuseful variables.

[src/zfont0.c src/zbfont.c src/gdevpdfg.c]

2006-07-20T18:57:07.315529Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 28.

DETAILS :

Disable a debug-purpose code, which unintentionally left in the last patch.

[src/fapiufst.c]

2006-07-20T18:50:28.389414Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 27.

DETAILS :

Provide a static list of FCO handles,
which are useful for a multilanguage embedded systems.

We define a storage for 2 handles because currently we need only 2 ones -
one for Windings and another for all other fonts.
FCO plugin does not go to this list, because it
doesn't define a font.

[src/lib.mak src/fapiufst.c src/gxfapiu.c src/gxfapiu.h]

2006-07-20T06:45:50.863988Z Ray Johnston

Establish alias glyph names (instead of replacement names) for example
Ldotaccent as an alias for Ldot. Bug 688799 for customer 130.
--this line, and those below, will be ignored--

m    gs_ttf.ps

[lib/gs_ttf.ps]

2006-07-19T22:52:24.858615Z Dan Coby

Fix for 688788 /rangecheck in resolveR.

DETAILS:

The file is damaged and has to have it xref table rebuilt.

Ralph Giles correctly guessed the cause of the problem
with his comment:
  "The file is corrupted by the addition of a leading
   newline; after removing the initial '0x0d 0x0a'
   character sequence the file renders fine. This offset
   is apparently confusing the xref table repair."

We have a value called PDFoffset which indicates the amount
of white space at the beginning of a file.  This value is
added to all xref table entry file locations when they are
referenced.  The xref rebuild logic was creating xref
locations which give the file position without considering
the value of PDFoffset.  The fix consists of simply subtracting
the values of PDFoffset from the xref object locations when
the xref tables are rebuilt.

[lib/pdf_rbld.ps]

2006-07-19T22:38:15.499527Z Dan Coby

Fix for 688787 /undefined in /BXlevel.

DETAILS:

The given test file has definite problems.  Most of the
xref entries are off by one byte.  Several of the xref
entries are off by thousands of bytes.  However the worst
problem is the value given for startxref.  This value
is off by tens of thousands of bytes.

The xref rebuild logic needs to find the final trailer
dictionary.  It uses the startxref value to find this
dictionary.  Since the file is damaged the rebuild logic
does not simply assume that the trailer dictionary is at
the given location.  Instead this logic compares ithe value
to the size of the file.  If less than one half of the size
of the file then we search at the beginning of the file.
This generally works for 'linearized' PDF files.  Othewise
the rebuild logic search for the last trailer dict in the
file.  This works for most non linearized files.

This file indicates that the trailer dict should be at
the start of the file.  However the trailer dict is at
the end of the file.  The fix consists of searching at
the end of the file when a trailer dict is not found at
the start of a file.

[lib/pdf_rbld.ps]

2006-07-17T19:11:34.040541Z leonardo

Fix (pdfwrite) : Support OS/2 table version 2 in True Type fonts.

DETASILS :

We don't use the new fields in the 96-byte structure and continue to
create 86-byre structures. The extra space is used as a buffer when
we copy the structure intact.

Bug 688536 "/invalidfont in --show-- when trying to convert the PDF file".
Patch from Alex with an improvement against regressions.

[src/gxttf.h src/gdevpsft.c]

2006-07-13T21:35:15.090210Z leonardo

Fix (pdfwrite) : A further improvement for the text rotation logic.

DETASILS :

Bug 688793 "document pages rotated with Ghostscript, not with Acrobat"

This patch implements Raph's suggestion how I understand it.

[beg quote]
There are two issues here. First, the document-global viewing_orientation info
isn't being copied into the page-specific info. [skipped]

Second, when the inferred text rotation and the dsc orientation can't match
(i.e. are off by an odd multiple of 90 degrees), precedence is given to the text
rotation. [skipped]

[Skipped] reverse the precedence so that if
both dsc orientation is set and text rotation is inferred, use the dsc value.
[end quote]

See the bug 688793 for more details.

I marked the change with Bug688793 macro
because I can't say that I fully foresee its consequences.
The mark will help to analyze problems if any appear.

[src/gdevpdf.c]

2006-07-13T12:37:03.107591Z leonardo

Fix : MSVC8 compiler warnings.

[src/ziodevsc.c]

2006-07-13T12:25:38.449013Z leonardo

Fix (True Type font loader) : A wrong encoding created when no 'post' presents.

DETAILS :

Bug 688789 "incorrect encoding displayed using ArialUnicodeMS".

The old code in .charkeys computes (with dropping minor details) :
    CharStrings = glyphencoding^-1
    Encoding = cmap*glyphencoding

It is correct when 'post' presents due to glyphencoding = post,  
and post maps glyph indices to glyph names.

In the test case (with no 'post') .charkeys must compute (with dropping same details) :
    CharStrings = glyphencoding^-1 * cmap
    Encoding = glyphencoding
because glyphencoding is stubbed with an encoding.

I'm not sure why the old code worked so long with no problem.
Likely every font manufacturers loved to define 'post'.
Now we got one which doesn't.

BTW, I guess an useful optimization would be to replace 'numloca'
with a better estimation. In the test case it appears too big,
so we process a huge trash and then drop it.
The better estimation, the smaller time consumption.

Another useful optimization is marked with
"% a stub for a while. Must skip the entry."
in the new code. Dalaying it for better times.

Inserted a debug printing for CharStrings.
Using it one can se how big trash it processes.

The old code truncates Encoding if it is longer than 'loca'.
It appears wrong with the new CharString composition logics
- creates a tool short Encoding for fonmts in bug_687457.pdf .
The truncation has been removed from .charkeys .
It should work fine because recently we improved
C code about acessing glyphs outside 'loca' -
see the revision 6874.

The test case to be added to comparefiles.

[lib/gs_ttf.ps]

2006-07-13T05:38:11.096275Z Dan Coby

Remove a mixture of DOS and Unix style line endings.

[src/gsnamecl.c]

2006-07-13T01:16:11.812282Z Ray Johnston

Remove (now) superfluous stdout_buf and stderr_buf areas from main instance
(no longer needed -- buffers are allocated when stdio is opened).

[src/iminst.h]

2006-07-12T21:46:07.133984Z Ray Johnston

Clean up some gcc warnings created by last commit.

[src/imain.c src/sfxstdio.c src/zfproc.c src/ziodevsc.c]

2006-07-12T21:30:00.448371Z Ray Johnston

Change stdio callback mechanism to call directly from the stream processing
function, not requiring a CALLC callout all the way back through the interp
to 'imain.c' This simplifies some of the calling and is more efficient.

DETAILS:

gsapi_ and/or gsdll_ clients will see no difference.

[src/imain.c src/interp.c src/zfileio.c src/zfproc.c src/ziodevs.c src/ziodevsc.c src/files.h src/iminst.h src/ierrors.h]

2006-07-12T21:24:01.592491Z Ray Johnston

Refactor 'file_prepare_stream' for use by non-PS (graphics library only)
clients such as gsiorom (the %rom% device can be used by non-PS builds).

[src/sfxstdio.c src/zfile.c]

2006-07-12T21:19:34.152242Z Ray Johnston

Header file missed on previous commit to refactor 'file_prepare_stream'
for use by graphics library (no PS interpreter) clients (gsiorom.c).

[src/stream.h]

2006-07-12T21:15:11.292479Z Ray Johnston

Get rid of deprecated %static% device. This has been replaced by the more
efficient and versatile %rom% device.

[src/int.mak src/ziodevst.c]

2006-07-12T17:59:16.470870Z leonardo

Fix (pdfwrite) : More PDF/A-1b complience, continued 6.

DETAILS :

Bug 688783 "commit 6892 mis-uses the TZ environmental".

Completely removed the time zone computation because
it's not working properly with some compilers.
Always write the UTC time instead.
It looks compliant with all PDF/A, PDF 1.6, ANSI C and 
http://www.w3.org/TR/NOTE-datetime standards.

[src/gdevpdf.c]

2006-07-12T12:24:10.438308Z leonardo

Fix (pdfwrite) : More PDF/A-1b complience, continued 5.

DETAILS :

Bug 688783 "commit 6892 mis-uses the TZ environmental".

An improved code with using CRTL functions to compute the tize zone.
This works on both my local Windows and on Linux on peeves.

[src/gdevpdf.c]

2006-07-12T11:26:28.547453Z leonardo

Fix (pdfwrite) : More PDF/A-1b complience, continued 4.

DETAILS :

Bug 688783 "commit 6892 mis-uses the TZ environmental".

An improved code with using CRTL functions to compute the tize zone.
Thanks to SaGS for suggestion.

[src/gdevpdf.c]

2006-07-11T21:32:55.057296Z leonardo

Fix (pdfwrite) : More PDF/A-1b complience, continued 3.

DETAILS :

Bug 688742 "PDF/A label missing error in Acrobat preflight", part 2.
Bug 688783 "commit 6892 mis-uses the TZ environmental".

Use CRTL functions to compute the tize zone.
Thanks to SaGS for suggestion.

[src/gdevpdf.c doc/Ps2pdf.htm src/devs.mak]

2006-07-10T11:00:18.723002Z Tor Andersson

remove the null memory context argument to errprintf in gs_throw_imp that was accidentally left in from when the function was ported over from ghostpcl.

[src/gsmisc.c]

2006-07-09T14:04:23.380577Z Ralph Giles

Compile in read support when building libpng. It is needed for XPS 
parsing.

[src/libpng.mak]

2006-07-07T17:22:51.824275Z Ray Johnston

Fix gcc reported problems.

[src/mkromfs.c]

2006-07-07T00:26:45.026656Z Ray Johnston

Correct typo in header that MSVC ignores.

[src/files.h]

2006-07-06T23:59:24.561744Z Ray Johnston

Fix missed edit to remove RESOURCE_LIST from top makefiles.

[src/msvclib.mak]

2006-07-06T21:32:50.019697Z Ray Johnston

Several %rom% related improvements. Add PSRESDIR macro to define the location
of the Resource/ path during the build. Remove the RESOURCE_LIST from the top
level makefiles (list now only in src/int.mak). Correct the font path to the
Adobe standard Resource/Font. Change the GS_LIB_DEFAULT to include Resource/Font
rather than the useless Resource path.

Change the %rom% device to return a custom 'block' stream that decompresses
by blocks into the buffer so that the entire file is never decompressed into
a 'string' for a sread_string type stream. The 'file_prepare_stream' is now
exported for use by gsiorom.c.

DETAILS:

That wasn't enough ?

One hack is that the s->file pointer in the stream_s is used to hold the pointer
to the node header in the %rom% file system. This seemed to make some sense.
Unlike the FILE * structure (which is somewhat opaque), there is no dynamic
state info in a node -- the s->position and read pointer within cbuf are enough
to allow read_process, seek, and available procs to operate.

The buffer is slighty larger than the ROMFS_BLOCKSIZE to allow for some data
(up to 256 bytes) not being consumed from the buffer when read_process is
used to refill the buffer. This way we can decompress directly into the cbuf
(at the correct point, of course) and avoid another buffer and copy. This
also means that each 'block' is always at or near the front of cbuf. After
a seek, the block will load at the beginning of cbuf (assuming we did not
already have the requested pos in the buffer).

As with 'file' type streams, the s->read_id is bumped so that the stream
access functions will see the file as 'invalid' (read_id won't match rsize).
The cbuf is also freed when the file is closed (to prevent leaks in a non
GC memory system).

NOTE: IT IS THE CALLER'S RESPONSIBILITY TO FREE THE STREAM RETURNED BY THE
romfs_open_file() function using the memory in the s->memory allocator. In
PostScript, since the -file- ref can be passed around among objects, the
GC is relied upon to free when no further references exist.


[src/gsiorom.c src/watcw32.mak src/macosx.mak src/int.mak src/dvx-gcc.mak src/unixansi.mak src/msvclib.mak src/os2.mak src/bcwin32.mak src/ugcclib.mak src/unix-gcc.mak src/msvc32.mak src/macos-mcp.mak src/files.h src/zfile.c src/watclib.mak]

2006-07-06T17:12:15.527898Z Stefan Kemper

Fix null ptr dereference committed on rev 6866

DETAILS:

In the case where gx_alloc_char_bits is called with a null
device pointer the default of 72 dpi is used.

[src/gxccman.c]

2006-07-06T11:10:42.178658Z Alex Cherepanov

Replace empty MediaBox or CropBox box with a box that is equal to the current
page size. Bug 688744, customer 384.

[lib/pdf_main.ps]

2006-07-06T00:24:31.497014Z Alex Cherepanov

Modify cmap table handling routines to support a large ( >= 64K ) table
represented as an array of strings.
Bug 688688, customer 562.

[lib/gs_ttf.ps]

2006-07-05T21:06:53.575845Z leonardo

Fix (pdfwrite) : More PDF/A-1b complience, continued 2.

DETAILS :

Bug 688742 "PDF/A label missing error in Acrobat preflight", part 4.

This is an experimental patch, which drops the setting of
the symbolic flag for fonts in PDF/A documents.
Doing so because the Acrobat preflight tool 
doesn't allow Encoding for symbolic True Type fonts.

The decision for setting the symbolic flag for most fonts has been
done a long ago, and currently we cannot reconstruct all the related history.
We suspect that in novadays that decision appears obsolete.
We commit this patch to allow an accumulation of information
about how this flag affects 3d party software.

[src/gdevpdtd.c src/gdevpdtd.h]

2006-07-05T20:28:10.067306Z leonardo

Fix (pdfwrite) : More PDF/A-1b complience, continued.

DETAILS :

Bug 688742 "PDF/A label missing error in Acrobat preflight", part 3.

1. Substitute the DeviceRGB color space.
2. Write the instance ID into the pdfaid item.
3. /Type/Metadata/Subtype/XML is required for metadata stream dictionary.

[lib/gs_devcs.ps src/gdevpdfe.c]

2006-07-05T18:17:52.450829Z Alex Cherepanov

Use /PageSize from the currrent page device dictionary when the /MediaBox pget
fails. Bug 688771, customer 581.

[lib/pdf_main.ps]

2006-07-05T14:03:49.473556Z leonardo

Fix (pdfwrite) : More PDF/A-1b complience.

DETAILS :

Bug 688742 "PDF/A label missing error in Acrobat preflight", part 2.

1. Always embed all fonts when writing a PDF/A document.
2. Provide a precize time and time zone (see the documentation change included).
3. Wrtte an OutputConditionIdentifier.
   
See the documentation change for details.

[src/gdevpdf.c doc/Ps2pdf.htm src/gdevpdtf.c src/gdevpdfe.c lib/PDFA_def.ps src/devs.mak]

2006-07-05T10:26:03.786036Z leonardo

Fix (pdfwrite) : Write out the PDF/A compliance label.

DETAILS :

Bug 688742 "PDF/A label missing error in Acrobat preflight".
Patch from Eduard Tiganas.

[src/gdevpdfe.c]

2006-07-04T23:13:13.666885Z Ralph Giles

Modularize the soname and link flags for the unix shared library build
to facilitate use on different platforms.

[src/unix-dll.mak]

2006-07-04T21:31:43.405686Z Alex Cherepanov

Increase the operand stack size limit to the current working maximum = 65414.
Bug 688764.

DETAILS:
PostScript stack cannot exceed the size of a PostScript array (65535) because
the stack is copied to an array when the stack overflows.

The stack space is allocated in blocks. The stack overflow is checked when the
new block is allocated. If the MaxOpStack is set close enough to 65535 the
actual stack size exceeds 65535 at the moment of stack overflow.

This condition is detected when the stack is copied to an array during
stackoverflow processing, causing a low level stack dump. 

[lib/gs_init.ps]

2006-07-02T11:50:18.654475Z Alex Cherepanov

Fix calculation of the index in the DecodeDEF[G] table. The old code rendered
wildly different colors when the range of RangeDEF[G] was not close to 1.
Bug 688763.

[src/gsciemap.c]

2006-07-01T15:08:30.368356Z Ray Johnston

Replace $Id lines inadvertently removed.

[src/imain.c src/zfile.c]

2006-06-30T20:00:21.389005Z Ray Johnston

Changes to make the JOBSERVER and exitserver operate correctly. This is
essential to proper CET and FTS execution.

DETAILS:

The primary changes to allow exitserver to work from files, stdin, strings
and executive mode were making sure that the strings, procedures and
files (or subfildecode filters) were all in "system vm" which is always
a 'stable' memory immune from save/restore (curing the /invalidrestore
errors previously seen). To support executive mode, the statementedit
and lineedit IODevices always allocate in system VM (imemory_system) as
well.

Also changed was to omit the grestoreall in .startnewjob after the
restore since this would go back to the previous 'null' device and
close the device we want (e.g. x11 or display).

This relates to bug 688312, which I will close after determining if
there is any other documentation needed. Also this fixes #201952 which
was previously closed as WONTFIX.

Note that with -dJOBSERVER Ghostscript (unlike ghostpcl) will run the
-c string or the files on the command line or the input to the GS>
prompt as an encapsulated job and multiple files on the command line
will NOT be treated as separate jobs. File that contain a ^D (0x04)
at the end _WILL_ restore the VM state and start a new encapsulated
job for subsequent interpreter actions.

To run an inital file in 'exitserver' mode (affecting the permanent
server state), the -c "true 0 startjob pop" -f can be used prior to
the file. To run files as individual encapsulated jobs (when it is
not known if the job ends with ^D) simply add a file that contains
a ^D between each job on the command line. For example, if '04' is
a file that contains a ^D:

gs -dJOBSERVER x.ps 04 y.ps 04 z.ps -c "true 0 startjob quit"

Also note above that since 'quit' is defined as 'stop' in order to
actually quit you have to go to exitserver mode first (true 0 startjob)
or use the -dBATCH option.

[src/imain.c src/zfilter.c lib/gs_lev2.ps src/ziodev.c src/opextern.h src/zdevice.c src/zfile.c lib/gs_init.ps src/zsysvm.c]

2006-06-30T19:14:40.807461Z Ray Johnston

Clean up memory when the gsapi_delete_instance is called. Prevents leaks
from repeated invocations of ghostscript gsapi_ instances. Bug 688181.

[src/iapi.c]

2006-06-29T04:25:55.982235Z Alex Cherepanov

Add support of AdjustWidth parameter to tiffg32d and tiffg4 devices.
Bug 688748.

DETAILS:
According to Devices.htm, all black-and-white TIFF devices support AdjustWidth
parameter, but tiffg32d and tiffg4 didn't, always adjusting the page size.
The user had no way to switch off this, possibly undesired, feature.

[doc/Devices.htm src/gdevtfax.c]

2006-06-29T04:07:16.134871Z Alex Cherepanov

Add embedded OpenType support to the PDF interpreter.
Bug 688729, customer 700.

DETAILS:
According to the OpenType specification, OTTO tag is used only when the font
file has CFF data. We need to add more checking if we encounter OTTO fonts with
TTF data.

[lib/pdf_font.ps lib/gs_cff.ps]

2006-06-28T20:24:34.110786Z leonardo

Fix (pdfwrite) : Improve the filter choice logic.

DETAILS :

Bug 688773 "/JPXEncode always used when -dCompatibilityLevel=1.5".

"[Color|Gray|]AutoFilterStrategy = /JPEG2000" applied when 
"AutoFilter[Color|Gray]Images == false".

[src/gdevpsdi.c]

2006-06-28T16:29:52.237586Z leonardo

Fix (pdfwrite) : Luratech filters must not apply to indexed images.

DETAILS :

1. The old code erroneusely sets up the image compression chooser
   for Indexed images (gdevpdfi.c).

2. Don't allow the lossless JPXEncode for indexed images (gdevpsdi.c).
   (This change has no effect with no Luratech).

[src/gdevpsdi.c src/gdevpdfi.c]

2006-06-28T09:57:13.290010Z leonardo

Fix (TT font loader) : Work around a wrong specificID.

DETAILS :

The test document includes a name record with platformID=3, specificID=768.
We could not find a dicument, which allows such combination,
and we believe it is incorrect.
This patch implements a general workaround for strings,
which consist of 2-byte characters, each of which has a zero leading byte.

Bug 688769 "pdfwrite : an Incorrect embedded font object".

[lib/gs_ttf.ps]

2006-06-28T00:45:47.790609Z leonardo

Fix (pdfwrite) : Preserve ToUnicode for Type 0 fonts when re-distilling a PDF.

DETAILS :

The old code didn't account ToUnicode CMaps of Type 0 fonts in PDF documents :
1. It attached GlyphNames2Unicode after defonefont happens, so that C code never got it.
2. gdevpdtc.c didn't check Type 0 fonts for GlyphNames2Unicode.

The fix consists of 2 parts :
1. The new code in gs/lib factors out an auxiliary function .composefontdict from composefont .
   That function is called before .processToUnicode in pdf_font.ps for Type 0 font.
2. The new code in gs/src factors out the new function get_GlyphNames2Unicode,
   which now works for Type 0 fonts also. The change to gdevpdtc.c
   checks whether a Type 0 fonts has GlyphNames2Unicode.
   If a Type 0 font has GlyphNames2Unicode, it comes from a PDF, 
   and thus descendent fonts have no GlyphNames2Unicode.

Minor change : Don't search Resource/Decoding/Unicode for CIDs
when composing a ToUnicode CMap, because that resource translates glyph names only.

Bug 688768 "pdfwrite: missing ToUnicode".

[src/bfont.h lib/pdf_font.ps src/gdevpdtc.c src/zfont0.c src/zbfont.c lib/gs_cmap.ps]

2006-06-27T18:05:59.082925Z leonardo

Fix (pdfwrite) : Don't create a group from an image with SMask.

DETAILS :

An image with SMask is implemented in the PDF interpreter with creating a
temporary internal transparency group (see doimagesmask in pdf_draw.ps).
The old code copyed that group to the PDF output when re-distilling a PDF.

This patch implements the new key .image_with_SMask
for the .begintransparencygroup dictionary operand for
designating the internal group, and the flags :
	gx_device_pdf_s::image_with_SMask
	gs_transparency_group_params_s::image_with_SMask
	gs_pdf14trans_params_s::image_with_SMask
for passing this info to gdevpdft.c .

Bug 688767 "pdfwrite: bad transparency group".

[src/gdevpdfx.h src/gstrans.c src/ztrans.c src/gdevpdft.c src/gstparam.h lib/pdf_draw.ps src/gdevpdfb.h src/gstrans.h]

2006-06-26T17:57:55.566936Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 27.

DETAILS :

Fix the FreeType bridge to compile with the new FAPI interface definition.

[src/int.mak src/fapi_ft.c]

2006-06-26T17:01:42.828008Z leonardo

Fix (pdfwrite) : Improve the documentation about generating a PDFX document.

DETAILS :

Fixes the part of the bug
688463 "Overprint can not render with with -dUseCIEColor",
which is related to PDFX (the comment #11).

[doc/Ps2pdf.htm]

2006-06-23T19:15:03.500541Z Ray Johnston

Substantial performance improvement on Windows platforms to
JPEG2000/JPXDecode filter made by making jasper 'seek' work
within the buffer.  Bug 688073 and 688758 for customer #531.

DETAILS:

This wasn't a very big change, but by avoiding going to the OS
for 'seek' operations, the Windoze performance was improved
>40 fold. On linux this doesn't make any improvement but the
OS must be a lot more efficient (I'm actually surprised by
this). The time for the customer file with 688758 runs in
10 seconds (at 40dpi x11) on peeves before and after the fix.
On my Windoze 2.8Ghz P4 (peeves is 3.2GHz P4) the time is
43 seconds after the fix.

[jasper/src/libjasper/base/jas_stream.c jasper/src/libjasper/include/jasper/jas_stream.h]

2006-06-21T22:33:35.061227Z leonardo

Fix (CIDFontType 1) : Check for GDBytes elements to point past the 'loca' table end.

DETAILS :

Bug 688669 "/invalidfont in --@0x100194e0--".

The old code didn't check GDBytes consistency, taking occasional data
past the 'loca' table with an occasional result.

Note that the change to z11_CIDMap_proc in zfcid1.c trows exception,
which is handled by the procedure %Type11BuildGlyph
in gs_cidfn.ps with substituting .notdef .

The test document embeds an incorrect True Type data for the font OBMKGG+H2gtrM. 
The True Type header specifies the size of 'loca' table equals to 12 bytes. 
In the sfnts array it is a separate string with the array index 2.
Then it renders the glyph index 3 accessing outside the loca table. 
It hapens while rendering the text :

/TT5 1 Tf
0.365 0 TD
<0001>Tj

Probably the problem happens because 2 font descriptors (43 0 obj and 38 0 obj, 
which correspond to local font names /TT4 and /TT5) refer to same single font data 39 0 obj. 
This data is an embedded font subset, which is enough for /TT4 and has no 
glyphs for /TT5. This problem to be reported to Adobe Distiler 6, 
which created the test document. Is the version 7 better ?
(can't check due to no Postscript source).

In the test case .notdef is the CID 0 and defined in the font as a hollow box.
Don't know why Adobe doesn't print it in the test document.
That's another story. The font doesn't define a space character.

[src/zfcid1.c src/gstype42.c]

2006-06-21T11:17:27.414299Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 26.

DETAILS :

Provide a locking of a global static UFST instance
for a multilanguage embedded systems.

[src/fapiufst.c src/gxfapiu.c src/gxfapiu.h]

2006-06-20T17:16:59.040107Z leonardo

Fix (FAPI Font resource, CIDFont emulation) : Relative paths with FAPIconfig-FCO.

DETAILS :

Set current directory as a font file search origin.

[lib/FAPIconfig-FCO]

2006-06-20T16:55:22.666128Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 25.

DETAILS :

Provide the configuration with no Type 1 and no True Type parsers
for a compatibility with the PCL build.

[src/fapiufst.c]

2006-06-20T16:31:15.616110Z leonardo

Fix (UFST resource handling) : Provide an uniform way for specifying FAPI font map and configuration.

DETAILS :

1. The new command line argument FAPIfontmap specifies a FAPI font map file.
   The old argument FCOmap has been removed. 

2. The new command line argument FAPIcidfmap specifies a FAPI font map file.
   The old code hardcoded a particular value.

3. FAPIfontmap may include both general records, and special record groups for
   describing FCO elements. 
   
See the documentation change for details.

[lib/FCOfontmap-PCLPS3 lib/FCOfontmap-PS3 doc/Use.htm doc/Develop.htm lib/FAPIfontmap lib/FAPIconfig lib/gs_fapi.ps lib/FAPIconfig-FCO lib/FCOfontmap-PCLPS2]

2006-06-20T15:04:05.008037Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 24.

DETAILS :

Remove dead development branches.

[src/fapiufst.c]

2006-06-20T14:49:58.556233Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 23.

DETAILS :

Account the replaced Mrtrics when the renderer can't handle it.
It was a real bug in the FAPI client.

[src/zfapi.c]

2006-06-20T12:35:33.822923Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 22.

DETAILS :

Implementing the design bounding box expansion and warnings
against cropping glyphs when caching.

[src/ifapi.h src/fapiufst.c src/zfapi.c]

2006-06-20T09:51:08.611471Z leonardo

Fix (FAPI) : The cache device had a wrong HWResolution.

DETAILS :

It was set to 72 dpi independently on the target device.
Ghostscript font renderer doesn't rely on it, but UFST does.
Due to that UFST generated different rasters with and without NOCACHE.

[src/gxchar.c src/gxccman.c]

2006-06-20T09:46:21.713177Z leonardo

Fix (FAPI Font resource, CIDFont emulation) : Always convert FontName into a name (continued).

DETAILS :

The last patch appears incomplete.

[lib/gs_fntem.ps]

2006-06-20T09:37:23.049325Z leonardo

Fix (FAPI Font resource, CIDFont emulation) : Always convert FontName into a name.

DETAILS :

The old code could create fonts with a string as the FontName or CIDFontName value.
It caused an invalidaccess when the string is local and the font dictionary is global.
Debugged with alphabet.ps .

[lib/gs_fntem.ps]

2006-06-20T08:48:27.280806Z leonardo

Fix (FAPI Font resource, CIDFont emulation) : Load resident fonts into global VM (continued).

DETAILS :

The last patch appears incorrect in the part 3 :
[beg quote]
3. A minor change in gs_type1.ps creates FontInfo in same VM
   where the font dictionary resides. 
[ebnd quote]
and caused pdfwrite regressions.

This path fixes that.

[lib/gs_type1.ps]

2006-06-19T01:36:39.845267Z leonardo

Fix (FAPI Font resource, CIDFont emulation) : Load resident fonts into global VM.

DETAILS :

1. MakeInstance creates instances in global VM.

2. A bug in gs_fntem.ps : accessed "1 index" instead "0 index".
   Apparently they were always equal. Now they are not.

3. A minor change in gs_type1.ps creates FontInfo in same VM
   where the font dictionary resides. 

Debugged with 129-01.ps .

[lib/gs_cidtt.ps lib/gs_fntem.ps lib/gs_fapi.ps lib/gs_type1.ps]

2006-06-18T23:40:16.946225Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 21.

DETAILS :

A bug in the FAPI client :
Truncate the "~GS~" suffix, which the PDF interpreter adds
when creating extended glyph names.

Debugged with ADOBE1-4.pdf .

[src/zfapi.c]

2006-06-18T21:38:33.730811Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 20.

DETAILS :

An UFST bug tolerance about the .nmotdef appearence.
See comment in code.

[src/fapiufst.c]

2006-06-18T20:03:50.504209Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 19.

DETAILS :

An UFST bug tolerance about the hollow box design scale.

[src/fapiufst.c]

2006-06-18T19:25:03.018019Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 18a.

DETAILS :

Adjust symbolic Decodings with UFST 5.0 specifics.

[Resource/Decoding/FCO_Dingbats Resource/Decoding/FCO_Symbol Resource/Decoding/FCO_Wingdings]

2006-06-15T20:52:37.321465Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 18.

DETAILS :

1. Outline fonts ignored Stroke Width ( a real bug in the FAPI client code ).
2. Fixing missed pixels in outline fonts.

[src/fapiufst.c src/zfapi.c]

2006-06-15T10:41:20.991984Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 17.

DETAILS :

Provide the UFST callback dispatching for the language switching project.
See comment in code.

Actually thois restores the old gxfapi.c (which was recently removed) 
with minor modifications, and the module name is changed
for a better reflection of the purpose.

[src/lib.mak src/int.mak src/fapiufst.c doc/Develop.htm src/gxfapiu.c src/gxfapiu.h]

2006-06-14T21:03:34.912427Z Ralph Giles

Turn on Id keyword substitution and native line endings.

[lib/winmaps.ps]

2006-06-14T09:41:33.338945Z leonardo

Fix (UFST resource handling) : Provide alternative FCO map files. 

DETAILS :

1. The new command line argument FCOmap specifies an FCO map file.
   The old code hardcoded FCOfontmap.

2. Addint new FCO map files FCOfontmap-PCLPS2, FCOfontmap-PCLPS3, FCOfontmap-PS3
   for various FCO files. The old file FCOfontmap to be removed.

3. The new command line argument FCOfontfile2 works for locating the Wingdings FCO file.

[doc/Develop.htm]

2006-06-14T09:35:49.305252Z leonardo

Fix (UFST resource handling) : Provide alternative FCO map files. 

DETAILS :

1. The new command line argument FCOmap specifies an FCO map file.
   The old code hardcoded FCOfontmap.

2. Addint new FCO map files FCOfontmap-PCLPS2, FCOfontmap-PCLPS3, FCOfontmap-PS3
   for various FCO files. The old file FCOfontmap to be removed.

3. The new command line argument FCOfontfile2 works for locating the Wingdings FCO file.

[lib/FCOfontmap-PCLPS3 lib/FCOfontmap-PS3 doc/Use.htm lib/gs_fapi.ps lib/FCOfontmap lib/FCOfontmap-PCLPS2]

2006-06-14T08:25:03.916153Z leonardo

Fix (FAPI) : Implement a lazy font object acquisition, part 2.

DETAILS :

The old code creates a font object per character
due to a complex protocol of gs_show_enum.
Rather font renderers usually cache font objects,
the data format accommodation appears too expensive.

Main change : 
1. FAPI_do_char uses I->face to check whether
   it is same font-matrix request as for a previous call.
   If so, it uses the old font object stored in the renderer.

Minor changes :
2. enum FAPI_descendant_code_s is defined for clarity instead an int type.
3. Interface functions drop the subfont and bVertical operands.
   They are moved into FAPI_font structure, which was passed by 
   a neighbour argument.
4. The new function release_typeface takes care for a complete cleanup
   in a single code portion.

[src/ifapi.h src/fapiufst.c src/fapi_ft.c src/zfapi.c]

2006-06-14T05:03:07.378642Z leonardo

Fix (FAPI) : Implement a lazy font object acquisition, part 1.

DETAILS :

The old code creates a font object per character
due to a complex protocol of gs_show_enum.
Rather font renderers usually cache font objects,
the data format accommodation appears too expensive.

This change is algorithmically equivalent.
It moves necessary data to the renderer interface structure,
so that it may be useful for lazy font object creation.

The new structure FAPI_face stores a "key" for
requesting a font-matrix pair from a renderer.
It is reserved for further improvements.

[src/ifapi.h src/int.mak src/fapiufst.c src/fapi_ft.c src/zfapi.c]

2006-06-14T02:12:47.303815Z Alex Cherepanov

Use more aggressive PDF identification. Consider PDF every file that has
"%PDF-1." not preceeded by "%!PS" in the first 127 bytes of the file.
Bug 688743.

[lib/pdf_main.ps]

2006-06-14T00:23:19.323225Z Alex Cherepanov

Fix broken definition of customcolorimage.
Bug 688750.

[lib/gs_lev2.ps]

2006-06-13T17:01:52.331288Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 16.

DETAILS :

Provide a working mode with no *.ss files and/or with no FCO plugin.

[src/fapiufst.c]

2006-06-12T22:07:57.059825Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 15.

DETAILS :

Fixed file paths on Linux.

[src/fapiufst.c src/zfapi.c]

2006-06-08T17:59:04.960338Z Ray Johnston

Add code in getencoding to accept an array for the Encoding in a Font dict.
Only a name or dictionary are legal PDF. Bug 688741.

DETAILS:

Adobe Acrobat Reader lists "Encoding: Standard" for this font, but we get
the correct results by using the Encoding array given in the font.

[lib/pdf_font.ps]

2006-06-08T01:46:13.481025Z Alex Cherepanov

Fix string overflow in cvrs on 64-bit systems. Suppress the sign expansion of
unique ID. Bug 688725.

[lib/gs_ttf.ps]

2006-06-08T01:26:36.293278Z Alex Cherepanov

Make the pointer the last element of gs_pixel_image_t structure.
Otherwise, on LP64 platforms, the padding at the end of the structure
overwrites the 1st member of the derived structure when the base structure
is assigned to the derived structure.
Bugs 613909, 688725.

[src/gximage3.c src/gsiparam.h]

2006-06-07T19:20:14.417139Z Ray Johnston

Fix handling of TrueType fonts with a large number of glyphs in the 'post'
table. Bug 688723 for customer number #130.

DETAILS:

First, avoid using the 'postfirst' string to scan the post table.
Second, avoid putting a large array on the op stack when building
the 'postnames' and 'glyphencoding' arrays (pre allocate them and
simply 'put' the values in). Third, don't create dummy names for
.notdef glyphs when building up the CharStrings dict.

With all of these changes, the TT font with 16000 actual named
glyohs can be loaded as a Type 42 font and doesn't overflow the
current default MaxOpStack (50000) or the 64K name limit when
EXTEND_NAMES=0 (the default).

In the future, if we see a font with too many named glyhs, we
may get a 'limitcheck in --cvn--' which will tell us we need to
build with EXTEND_NAMES=1. At that time we can decide if we want
to increase the default for EXTEND_NAMES.

[lib/gs_ttf.ps]

2006-06-07T15:26:51.814233Z Ralph Giles

Correct the copyright holder and Id keyword after the licese header reversion.

[src/md5.c src/md5.h]

2006-06-03T06:34:51.036122Z leonardo

Fix (Font resource machinery) : Improve finding encodings in gs_fntem.ps (issue 2).

DETAILS :

It's a temporary work around the bug 688710 "Fix the Encoding resource category"
for the UFST integration project.

[lib/gs_fntem.ps]

2006-06-02T18:50:15.915729Z Dan Coby

Make capture_spot_equivalent_cmyk_colors global.

[src/gsequivc.c src/gsequivc.h]

2006-06-02T01:37:20.018191Z Alex Cherepanov

Fix an infinite loop on 64-bit platforms; make the size of max_import_coord to
be as big as the size of the 'fixed' type.
Bug 688724.

[src/gxhintn.h]

2006-06-01T15:45:30.982915Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 15.

DETAILS :

Improving the font mapping.

[lib/FCOfontmap]

2006-06-01T14:09:52.659638Z leonardo

Add Wingdings Encoding, Decoding resource files.

[Resource/Encoding/Wingdings Resource/Encoding Resource/Decoding/FCO_Wingdings]

2006-06-01T13:44:48.615495Z leonardo

Fix (Font resource machinery) : Improve finding encodings in gs_fntem.ps .

DETAILS :

It's a temporary work around the bug 688710 "Fix the Encoding resource category"
for the UFST integration project.

[lib/gs_fntem.ps]

2006-06-01T11:42:08.068704Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 14.

DETAILS :

Returning the hack about rendering a space instead hollow box.
See comment in code.

[src/fapiufst.c]

2006-06-01T07:50:53.652962Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 13.

DETAILS :

Fix the replaced left side bearing.
Debugged with 093-01.ps, the box 093-03.

[src/zfapi.c]

2006-06-01T06:16:00.401809Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 12.

DETAILS :

Add a dependency missed in the last patch.

[src/int.mak]

2006-06-01T01:54:55.252144Z Alex Cherepanov

Clean up the code that opens starting arg files (@ files). Use iodev_default
when it is available. Otherwise use the staticly initialized %os% device.
Bug 688720.

[src/gsiodev.c src/zfile.c]

2006-06-01T00:09:21.528804Z Alex Cherepanov

Fix FPE in t1_hinter__set_stem_snap() on Alpha. Don't process stem snap
elements when there's none. Bug 688727.

[src/gxhintn.c]

2006-05-31T17:10:39.858313Z Stefan Kemper

Revert copywrite notices for public domain code used by ghostscript.

[src/gdevsgi.h src/gdevifno.c src/md5.c src/gdevsgi.c src/md5.h src/md5main.c src/gdev4693.c src/gp_vms.c]

2006-05-31T15:29:52.122361Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 11.

DETAILS :

1. AgfaUFST plugin is renamed into UFST, because the manufacturer (Monotype Imaging) separated from Agfa.
2. Provide loading UFST plugin with UFST_PlugIn command line option.
3. The command line option UFSTdir is renamed into UFST_ssdir
4. Adjust FCOfontmap to PCLPS2 fonts.
5. Improve comments for EF_SUBSTHOLLOWBOX_TYPE.

[doc/Use.htm doc/Make.htm lib/FAPIcidfmap src/fapiufst.c lib/FAPIfontmap lib/gs_fapi.ps lib/FCOfontmap]

2006-05-31T14:51:47.948908Z Ralph Giles

In generating the changelog files in the documentation, treat "DIFFERENCES:"
the same as "EXPECTED DIFFERENCES:". Also trim everything from the log message
after this point since that section is of ephemeral interest. Bug 688715.

Note that this means nothing important should be placed after such a section heading.

[toolbin/split_changelog.py]

2006-05-31T01:21:42.643282Z Ralph Giles

Minor release documentation updates.

[doc/Release.htm]

2006-05-31T00:44:40.105558Z Ralph Giles

macos-mcp.mak is now distributed with all releases.

[doc/Make.htm]

2006-05-31T00:24:37.164443Z Ralph Giles

Merge license clarifications from the GPL Ghostscript 8.51 release 
documentation.

[doc/Fonts.htm doc/Commprod.htm]

2006-05-30T13:56:04.780494Z Alex Cherepanov

Fix incorrect element size argument of qsort(), that causes SEGV on
platforns with sizeof(void *) != sizeof(int) since rev. 6669.
Bug 688721.

[src/gxfcopy.c]

2006-05-26T14:09:02.598171Z Tor Andersson

Ignore errors when zlib streams fail on the checksum. Fixes bug 688716.

[src/szlibd.c]

2006-05-25T10:51:09.698836Z leonardo

Fix (Font resource machinery) : Apply general methoid for finding a font substitute.

DETAILS :

If a font isn't found, the old code loads Courier definted in Fontmap.GS .
This causes problems with FAPI, which defines its own Courier in
FAPIfontmap.

The new code re-starts the search from the top of the 
resource substitution logic, which may be enhanced multiple times with
Font resource category redefinition, particularly with MappedCategoryRedefiner.

[lib/gs_fonts.ps]

2006-05-25T07:12:51.456665Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 10.

DETAILS :

This code change doesn't affect a regular build with no UFST bridge.

Fixing Cygwin/gcc warnings.

[src/fapiufst.c]

2006-05-25T06:53:55.033342Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 9.

DETAILS :

This code change doesn't affect a regular build with no UFST bridge.

This patch provides building and running with both UFST_REENTRANT 0 and UFST_REENTRANT 1.

[src/fapiufst.c]

2006-05-25T05:37:45.106052Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 8.

DETAILS :

This code change doesn't affect a regular build with no UFST bridge.

1. Implementing PaintType 2 for fonts.

3. Fixed wording in a comment in fapiufst.c .

[src/ifapi.h src/fapiufst.c src/zfapi.c]

2006-05-25T05:09:21.683800Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 7.

DETAILS :

This code change doesn't affect a regular build with no UFST bridge.

1. Fixing another problem with coordinate rounding - see comments in code.

2. Removing unused variables.

3. A minor code cleanup in zfapi.c : removed a rudimentary check that never suceeds.

[src/fapiufst.c src/zfapi.c]

2006-05-24T18:23:16.110633Z Ralph Giles

Cast character values to (unsigned char) before calling isprint() and
friends. They are designed to work only with ASCII characters, but
some implementations support passing 8 bit character data but only
if it is positive to avoid conflict with a (-1) definition of EOF.
Thus we should cast to map the high characters from negative to
positive values on systems where char is signed by default. Bug
687529.

[icclib/icc.c src/dscparse.c src/gsmisc.c src/imainarg.c]

2006-05-24T18:11:33.648730Z Ralph Giles

Define specific compilers for the jbig2 and jpx libraries so their
CFLAGS are passed to the compiler first. This should prevent version
skew problems when building on systems with other versions of the
same headers installed elsewhere.

[src/lib.mak src/int.mak src/jasper.mak]

2006-05-24T17:19:27.863933Z Ralph Giles

Move a negation inside the test(1) exprepression for better portability.
Fixes bug 688713.

[lib/ps2epsi]

2006-05-24T13:31:11.438055Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 6.

DETAILS :

This code change doesn't affect a regular build with no UFST bridge.
Fixing minor problems with coordinate rounding.

[src/fapiufst.c src/zfapi.c]

2006-05-24T12:12:41.294216Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 5.

DETAILS :

This code change doesn't affect a regular build with no UFST bridge.

Completely remove gxfapi.c, gxfapi.h .
Now FAPI is the interpreter part and doesn't need a special module in the graphics library.
Also UFST bridge is now fully reentrant.

[src/lib.mak src/gxfapi.c src/fapiufst.c src/gxfapi.h]

2006-05-24T11:15:26.002807Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 4.

DETAILS :

This code change doesn't affect a regular build with no UFST bridge.
The change corresponding to the UFST patch with improved subglyph placement.

1. Fixed a bug about text size when rendering comparefiles/two_encodings.ps .
(changes related to orig_FontMatrix).

2. Implementing a command line option for UFSTdir for specifying a 
symbol set file directory for UFST. See change to doc/Use.htm
about user interface.

For doing (2) we pass a parameter to the ensure_open method of
a FAPI server plugin. Note it is a string, therefore Postscript code
must serialize complex parameters. Now it's not complex
because we pass a single option to a single plugin.

[src/ifapi.h doc/Use.htm src/fapiufst.c lib/gs_fapi.ps src/fapi_ft.c src/zfapi.c]

2006-05-24T07:12:33.924004Z leonardo

Fix : 'space' charater was missed in Unicode Decoding resource.

[Resource/Decoding/Unicode Resource/Decoding/FCO_Unicode]

2006-05-23T12:13:59.337888Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 3.

DETAILS :

This code change doesn't affect a regular build with no UFST bridge.

The change corresponding to the UFST patch with improved subglyph placement.

[src/fapiufst.c]

2006-05-23T07:13:03.590113Z leonardo

UFST bridge : Implementing FCOfontmap to simplify running UFST with resident fonts only.
See the documentation change included in this patch.

[lib/xlatmap lib/gs_fapi.ps lib/FCOfontmap]

2006-05-23T07:04:16.420792Z leonardo

UFST bridge : Upgrading to UFST 5.0, part 2.

DETAILS :

This code change doesn't affect a regular build with no UFST bridge.

1. Providing ununique character codes in Decoding resources (ifapi.h, zfapi.h).
   The old field FAPI_char_ref::char_code is now depricated,
   but we still provide the backward compatibility.
   FAPI_char_ref::char_codes will work instead FAPI_char_ref::char_code.
   UFST bridge and FreeType bridge don't implement ununique character codes yet.
   This feature isn't debuged but stored for further developemnt.

2. Improving the 'xlatmap' handling for Microtype font type (fapiufst.c).

3. Enlarde the decodingID field (fapiufst.c).

4. Preserve Decoding if it is specified in the fomt dictionary.

5. Fixing FONTCONTEXT data for FCO font type (fapiufst.c).

6. Obtaining design_bbox with USBOUNDBOX feature of UFST 5.0.
   It requires a patch to UFST 5.0.   

[src/ifapi.h src/fapiufst.c src/zfapi.c]

2006-05-23T06:48:01.451051Z leonardo

UFST bridge : More decoding resources since FCOs assume slightly different encodings.

[Resource/Decoding/FCO_Dingbats Resource/Decoding/FCO_Symbol Resource/Decoding/FCO_Unicode]

2006-05-21T02:36:04.902497Z Ralph Giles

Update release documentation somewhat to reflect current practice.

[doc/Release.htm]

2006-05-21T02:21:48.624607Z Ralph Giles

Bump version number after the 8.54 release.

[doc/News.htm lib/gs_init.ps src/gscdef.c src/version.mak]

2006-05-20T20:29:29.474563Z Ralph Giles

Merge changes from the 8.54 branch to support svn in the release 
utilities.

[toolbin/pre.tcl toolbin/split_changelog.py]

2006-05-20T20:27:09.924280Z Ralph Giles

Merge documentation updates from the 8.54 release branch. This updates 
the release date and changelogs.

[doc/History7.htm doc/Projects.htm doc/History8.htm doc/Use.htm doc/Readme.htm doc/Maintain.htm doc/Deprecated.htm doc/Source.htm doc/Install.htm doc/Changes.htm doc/Copying.htm doc/API.htm doc/Issues.htm doc/DLL.htm doc/Drivers.htm doc/Commprod.htm doc/Release.htm doc/Xfonts.htm doc/Devices.htm doc/Language.htm doc/Fonts.htm doc/Ps2ps2.htm doc/Develop.htm doc/Ps2pdf.htm doc/Helpers.htm doc/Psfiles.htm doc/Lib.htm doc/gs-vms.hlp doc/Htmstyle.htm doc/News.htm doc/Make.htm doc/Details8.htm doc/Testing.htm doc/Unix-lpr.htm doc/Ps-style.htm doc/C-style.htm doc/History1.htm doc/History2.htm doc/History3.htm doc/History4.htm doc/Details.htm doc/Ps2epsi.htm doc/History5.htm doc/History6.htm]

2006-05-19T01:19:20.532036Z Alex Cherepanov

Allocate scanline_buffer for DCTDecode filter in stable memory to prevent it
from being freed twice: by restoring the state before the filter was used for
reading and by closing the filter.
Bug 688694 from the customer 632.

[src/sdctd.c]

2006-05-18T16:51:54.327153Z Ray Johnston

Change example code so that users/customers that copy it will avoid the
memory leak mentioned in bug 688599.

[src/gs.c]

2006-05-17T23:31:29.652305Z Dan Coby

Fix for 688675  Reading / Converting PDF File created with Adobe
Lifecycle Designer 7.0.

DETAILS:

The test file has xref tables with incorrect generation numbers for
serveral entries.  The xref verification logic finds the mismatch
between the generation numbers specified in the xref and the generation
numbers in the objects.  It then attempts to requild the xref table.
This fails since the xref rebuild logic does not handle rebuilding
compressed object streams.  As a result the file cannot be displayed.

The fix consists of three parts.

1.  Change the xref verification logic to exit if compressed object
streams are detected.  I am not attempting to recover objects in
compressed object streams since anything that damages a file will
generally trash any compressed data.

2.  Change the logic which checks the generation number to simply
print a warning but to continue.  Previously this logic would print
a warning and then reject the object. Rejecting an object generally
causes an error to occur as the PDF interpreter attempts to use the
object.  The warning message was also enhanced to print both the
expected and actually generation numbers.  The given test file
produces about 400 warning messages.

3.  Enhance the comments for the print_xref.

Note:  Thanks to Alex for his work in determining that the file can be
processed if these changes are made.

[lib/pdf_main.ps lib/pdf_base.ps lib/pdf_rbld.ps]

2006-05-17T19:55:41.010790Z Ray Johnston

Fix for yet another non-spec PDF that Adobe Acrobat Reader handles silently.
(missing whitespace after 'endobj'). Bug 688695 for customer 580.

DETAILS:

Since the extra checking for /endobj.*/ only happens when we are about to
issue 'Unknown operator' tokenerror, the performance impact of this hack
is non-existent for valid PDF files.

[lib/pdf_base.ps]

2006-05-17T18:39:07.604408Z Ralph Giles

Use pkg-config to request linking with GTK 2 in the unix dll build
instead of the older gtk-config with specifies GTK 1. This will break
the (generally unsupported) dll build on very old systems but fixes
it for most current and near future platforms. Bug 688701.

[src/unix-dll.mak]

2006-05-17T18:34:00.699127Z Ralph Giles

Enable the cfax device in the default autoconf build for the convenience
of free users. This is required to use Ghostscript to drive capifax devices.

DETAILS:

In general we don't enable random devices used by a subset of users, but
we already include the three raw fax devices, so it isn't worth objecting
to a fourth. CAPI fax is commonly used over ISDN in Europe.

In the future we'd like to support device selection from the configure
commandline, similar to what is done in ESP Ghostscript. With that it
would be reasonable to remove most of the little-used devices since
package build systems will have a standard way to select their set, and
we will have a standard way to enable all supported devices for testing.

[src/Makefile.in]

2006-05-17T18:06:04.522955Z Ralph Giles

Remove ARCH_STRUCT_ALIGN_MOD entirely and revert to 
ARCH_ALIGN_MEMORY_MOD not having the extra jmp_buf
alignment requirements. This satisfies the assumption
that structure alignment and sizeof(ref) agree in
the Ghostscript code and should finally fix 687643.

Also add a cast back to jmp_buf in the alignment
macro setjmp_.h. Fixes bug 688698. Patch from
Alex Cherepanov.

[src/std.h src/setjmp_.h src/genarch.c]

2006-05-17T15:24:29.868984Z Ralph Giles

Add recent new files to the listing in the developer documentation.

[doc/Develop.htm]

2006-05-17T15:14:51.387610Z Ralph Giles

Set native eol-style and and enable Id keyword substitution.

[lib/FCOfontmap]

2006-05-17T11:34:54.678587Z leonardo

UFST bridge : Copyright banner and RCS line have been missed in the last commit.

[lib/FCOfontmap]

2006-05-17T11:33:20.081655Z leonardo

UFST bridge : Copyright banner and RCS line have been missed in the last commit.

[lib/FCOfontmap]

2006-05-17T11:29:55.042925Z leonardo

UFST bridge : Copyright banner and RCS line have been missed in the last commit.

[lib/FCOfontmap]

2006-05-17T11:23:20.989390Z leonardo

UFST bridge : Implementing FCOfontmap to simplify running UFST with resident fonts only.
See the documentation change included in this patch.

[doc/Use.htm lib/gs_fapi.ps lib/FCOfontmap]

2006-05-17T04:50:12.217865Z Ray Johnston

Fix so that dictionaries that grow preserve attributes.
Several problems reported including a potential security
hole when in SAFER mode. Thanks to mat Gh Savulescu
(SaGS) for the bug report, the patch and excellent
analysis of the problem.

DETAILS:

Ordinarily dictionaries have unprotected, non-exectue
status, but it is possible to "grow" executable or even
"read-only" dictionaries (contact Ray Johnston for an
explanation as provided by mat Gh Savulescu). The bug
in idict.c would not preserve the attributes, making
the dictionary not executable, and not readonly even
if those were the original attributes.

[src/idict.c]

2006-05-16T09:56:13.829816Z leonardo

UFST bridge : Upgrading to UFST 5.0 .

DETAILS :

This code change doesn't affect a regular build with no UFST bridge,
except an unimportant change to lib.mak .

This revision allows the UFST bridge to compile and work somehow.
This revision of UFST bridge was not systematically tested.

UFST 5.0 doesn't implement design bbox for non-FCO fonts,
therefore it is stubbed with Em box. 
In this case glyphs are cropped. 
For FCO fonts the implementation of USBOUNDBOX in UFST 5.0
appears incomplete, and it needs our patch to work properly.
The change to UFST 5.0 code is not included here.

[src/lib.mak src/ifapi.h src/gxfapi.c src/fapiufst.c src/gxfapi.h src/zfapi.c]

2006-05-15T22:07:53.891632Z Raph Levien

Commits setjmp_.h, which I left out of the previous patch.

[src/setjmp_.h]

2006-05-15T21:29:29.006940Z Ralph Giles

Correct a typo resulting in inproper glyph placement with transposed text 
and a top left reference corner. Fixes bug 688645.

[jbig2dec/jbig2_text.c]

2006-05-15T20:35:29.086193Z Ralph Giles

Ignore common generated files.

[jasper jasper/src/libjasper/pgx jasper/src/libjasper jasper/src/libjasper/include/jasper jasper/src/libjasper/base jasper/src/libjasper/mif jasper/src/libjasper/jpc jasper/src/libjasper/bmp jasper/src/libjasper/jpg jasper/src/appl jasper/src/libjasper/include jasper/src jasper/src/libjasper/ras jasper/src/libjasper/pnm jasper/src/libjasper/jp2 jasper/src/msvc]

2006-05-15T20:27:21.734326Z Ralph Giles

Remove a generated source file from the included jasper library.

[jasper/src/libjasper/include/jasper/jas_config_ac.h]

2006-05-15T18:44:16.729159Z Raph Levien

FIX: Allocate jmp_buf with padding, to satisfy alignment constraints. 
Fixes bug #687643.

[src/lib.mak src/sjpegd.c src/sjpege.c src/sdct.h src/ttinterp.c src/ttobjs.h src/sjpegc.c]

2006-05-12T23:39:33.380797Z Ralph Giles

Document how to compile Ghostscript with the Luratech compression 
libraries. Bug 688665.

[doc/Make.htm]

2006-05-12T23:17:47.022921Z Ralph Giles

Update Language.htm to better describe the current level of PDF support. 
Bug 688661.

[doc/Language.htm]

2006-05-12T22:47:54.173109Z Ralph Giles

Add commented out line for manually enabling the luratech build with 
autoconf.

[src/Makefile.in]

2006-05-12T22:23:14.706617Z Ralph Giles

Always make read progress is s_jbig2encode process when there is data
available. Fixes bug #688658.

[src/sjbig2_luratech.h src/sjbig2_luratech.c]

2006-05-11T04:59:24.800767Z Dan Coby

Fix for 688686 segfault in find_bit_map().

DETAILS:

The addition of the compressed encoded color logic created a problem for
the psdrgb device.  This device shares most of its code with the psdcmyk
device.  The common print_page procedure uses devn_unpack_row.  This
routine was modified to work with the compressed encoded color values.
However the psdrgb device does not use the compressed encoded color logic.

The fix consists of checking for the presence or absence of a compressed
color list pointer.  The presence of this pointer indicates if the compressed
color logic is being used.  The appropriate uncompress logic is used.

[src/gdevdevn.c]