summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-05-04Changed casper3.ghostscript.com to casper.ghostscript.com (no reason to test ↵Marcos H. Woehrmann3-22/+22
this, how can it possibly fail?). git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11175 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-05-04Revision 11146 (move op_array_table_global) has broken the language switchRobin Watts1-7/+16
build. This commit fixes it. Revision 11146 changes the code to find the current op_array tables by looking in the current instance. Unfortunately, during initialisation of the postscript interpreter the instance is created and the init file is read without the newly created instance being made 'current'. The fix used here is to arrange that any newly created instance becomes the current one automatically. No changes shown in the localcluster regression, but this doesn't test the language switch build. Seems to work OK on windows though. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11174 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-05-04As part of the efforts towards bug 691207 (global variables must be removed)Robin Watts35-933/+987
this commit reduces the reliance on mem_err_print. Currently all calls to errwrite and errflush get the stdin/out/err details from a global mem_err_print. For multithreaded gs this will result in output going to the wrong place if any of them are redirected. This review splits errwrite into 2 variants, errwrite and errwrite_nomem. The first takes an explicit mem pointer. The second continues to assume a global one. The plan is to make everything possible use the first. Currently debugging calls and some 'stubborn' devices continue to call errwrite_nomem. Local cluster testing shows no differences. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11173 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-05-03Fix compiler warning (return from incompatible pointer type)Henry Stiles1-1/+1
introduced with making the font cache part of the library context, revision 11165. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11172 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-05-03Applied Michael Constant's patch to support reading 256-bit AES encrypted PDFsLars Uebernickel22-62/+2089
(bug #690702). Minor modifications were made to the original patch to make it work with the current trunk. Aaron Gifford's SHA-2 implementation is included (BSD licensed). Libidn is added as an optional dependency to support unicode passwords. If it is not installed, only ASCII passwords are supported. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11171 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-05-03Fix (pdfwrite) incorrect ToUnicode CMap.Ken Sharp1-5/+13
Bug #691274 "Missing or incorrect ToUnicode when using Identity ordering" pdfwrite emits ToUnicode CMaps in PDF files which always use 2 bytes for the key length. That is 0x21 is represented as <0021>, since these are hex strings there should in fact be no difference between <21> and <0021>. It is clear from the ToUnicode Mapping file tutorial that this is correct for mapping files. However, a PDF file is not a CMap file. It appears that Acrobat does not like beginbfrange data which is padded with zeros (it seems happy with codespacerange and destination codes which are 0 padded though). This patch outputs ToUnicode CMaps which are not padded with 0, ie 0x21 is emitted as <0021>, for the srcCodeLo and SrcCodeHi parameters in a beginbfrange operation. The destination codes remain zero-padded. Technically this would be incorrect for a real CMap file, but we don't write those out so this should not be an issue. The change is limited to ToUnicode CMaps and does not affect any other kind of CMap. I believe the change will affect the data emitted for the beginbfrange, beginbfchar, begincidchar, beginnotdefchar, beginnotdefrange and begincidrange operators. It does *not* affect the begincodespacerange operator; although Acrobat Distiller writes this without zero padding tests show that Acrobat is happy reading zero-padded code space ranges. ToUnicode information is not used in rendering PDF files, so regression testing should show no differences. Local testing of a limited number of files doesn't reveal any problems, but this change has not been well tested. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11170 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-05-03Fix unix so build regression; fixes regression from r9948 which was ↵Hin-Tak Leung1-2/+3
committed for bug 690695 git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11169 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-05-03fixes multiple jpeg devices listed in gs -h (bug 691176)Hin-Tak Leung1-4/+6
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11168 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-05-03Rewording build instructions for unix systems, and adding more warnings aboutHin-Tak Leung1-3/+45
instructions for legacy old systems being deprecated; bug 691264. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11167 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-05-02Script to generate an html page that graphically show the differencesRobin Watts1-0/+320
between local cluster regression run results between arbitrary revisions. Usage information given in file. Must be run on the cluster master machine (i.e. casper). git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11166 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-05-01Continue work to remove globals (691207). The font cache is no longerHenry Stiles14-18/+44
global but part of the library context. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11165 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-05-01Modify the 'C' defaults of the pdfwrite deviceKen Sharp1-27/+86
Bug #691259 "HPGL graphic followed by raster graphic results in incorrect pdf" The pdfwrite device is initialised in 'C', and then partly overridden by PostScript initialisation. The problem is that non-PostScript input does not (cannot) execute the PostScript initialisation, and so the defaults are left as those done in 'C'. Not only do these defaults not match the documented defaults in ps2pdf.htm, they are not particularly well selected. In this case the problem was caused by sending image data at 150 dpi, but only a single scan line at a time. The default setting for pdfwrite was to downsample image data to 72 dpi, this caused us to subsample (the default downsampling) by a factor of more than 2, which led to our single scan line becoming less than half a scan line, and so disappearing altogether. This patch addresses this issue by altering a number of the defaults to more sensible values. In particular we disable downsampling and enable image compression for gray and colour images. This has the fortunate result of making most PDF output files smaller than before, even though we are now storing more image data. Expected Differences This change does unfortunately result in a *lot* of changes in our testing. Over 500 of our standard test files now render differently, too many to list here. I have looked at the output of these and I believe the changes to be progressions, and extremely worthwhile ones. A very few of the files now containing higher resolution images do render less well at low resolution (75 dpi). This is simply an artefact of the way image data is rendered. The same files render better than before at higher (300 or 600 dpi) resolutions. Also many of the new, higher resolution, files render better than before even at 75 dpi. So overall I believe this is a very useful improvement. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11164 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-05-01Check all PDF files for transparency features because some files haveAlex Cherepanov1-6/+4
incorrect version number but Acrobat renders them just fine. Bug 691273. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11162 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-30Testing a white space change for cluster regression tests, this will be ↵Ken Sharp1-0/+2
overwritten later. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11158 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-29rev 11149 for fixing bug 691014 had still some compiler warnings. This rev ↵Till Kamppeter1-2/+10
fixes them. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11156 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-29A light sprinkling of casts (mostly between byte and char) to silenceRobin Watts5-11/+11
compiler warnings. No expected differences. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11155 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-29Remove the 'parent' parameter from gs_malloc_init calls. It only serves toRobin Watts7-12/+10
allow libctx's to be shared between instances, and we'll never want to do that. It's unused at the moment anyway, so this doesn't impact anything. No expected differences. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11154 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-29Doubling the arbitrary 0x100000 alloc size limit; the alloc_size_is_ok() ↵Hin-Tak Leung1-1/+1
check is complied out and replaced with DO_NOTHING in release build so this has effect only on debug builds. Fixes Bug 691271 . git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11151 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-28Eliminate some warnings in gxcht.c (keep shifts < size of uint).Robin Watts1-3/+3
No local cluster differences reported, or expected. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11150 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-28Fixed segfaults caused by setting and changing the page geometry parameters ↵Till Kamppeter1-72/+118
incorrectly (bug #691014). git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11149 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-28Associate cached font instance with PDF font resource dictionary instead ofAlex Cherepanov1-2/+2
font descriptor. The latter may be shared by font resource dictionaries with different encodings causing incorrect rendering. Bug 690714. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11148 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-28Move op_array_table_global and op_array_table_local away from beingRobin Watts10-54/+86
globals and into i_ctx_p. This requires various knock on changes throughout the code to enable them to be recovered from the context (which may itself need to be recovered from a memory pointer). Also, the garbage collection is altered slightly; rather than the op_arrays being special cased (as special objects that have to have their component parts registered as roots for the garbage collection) we move them inline into i_ctx_t and amend the gc routines for that structure. Thanks to Alex for his help with this. No differences expected, or shown with local cluster testing. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11146 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-28Simple fix to remove dict_default_pack from being a global bool.Robin Watts1-1/+3
(Make it an enum instead). No changes expected or shown by local cluster testing. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11145 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-28Ensure that multiplication gets applied prior to type casting.Chris Liddell1-6/+6
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11143 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-28Add missing cast to fapi_ft.c to quiet a warning. This was missed out ofRobin Watts1-1/+1
yesterdays commit of such fixes. No expected diffs. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11142 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-28Small tweaks to Ghostscript initialisation to check for malloc failures etc.Robin Watts4-13/+31
This would very rarely have been a problem in current code, but would be more of an issue in multithreaded operation as running out of memory while forking a new instance is more likely. No expected differences, but the local cluster code seems to be claiming differences for an unchanged tree at the moment, so if 3 or so non-pdfwrite errors and 1800ish pdfwrite errors show up, it's not because of this. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11141 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-27Continuation of r11139 -- update to the latest working version of xpsdoc.c.Tor Andersson1-212/+210
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11140 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-27Restore xpsdoc.c that was erroneously removed in r11133.Tor Andersson1-0/+297
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11139 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-27Add back in a call removed in (a merging) error in my previous commit (11137).Chris Liddell1-2/+4
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11138 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-27Bug 691260: make the FAPI and Freetype related warning messages debug only, ↵Chris Liddell2-31/+55
and depend on -Zm for the FAPI warnings or -Z1 for the Freetype warnings. Also address compiler warnings in fapi_ft.c. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11137 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-27Silence some warnings, either by including new headers or by introducingRobin Watts8-13/+23
explicit casts. No differences shown by local cluster testing (of pcl and gs only as xps is currently broken). git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11136 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-27Made the CUPS Raster output device working in a multi-threaded mode, ↵Till Kamppeter1-267/+260
removing all global variables. Thanks to James Cloos for the patch. Fixes bug #691241. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11135 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-26Remove file that snuck in by mistake in rev 11132.Tor Andersson1-295/+0
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11133 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-26Add support for parsing unzipped XPS files.Tor Andersson5-35/+171
If the path is given as /path/_rels/.rels then it will parse the entire document. If the path points to a FixedPage file (/path/Documents/1/Pages/1.fpage), only that single page will be parsed. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11132 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-26Rename xpszipseek.c to xpszip.c.Tor Andersson2-3/+3
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11131 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-26Simplify ZIP parsing.Tor Andersson13-1546/+302
The special mode of the XPS interpreter that parses the ZIP file incrementally as a stream has proven to be useless. None of the files we see in the wild make use of the features that are required for a streaming XPS parser to behave well. As a result, this mode was always buffering up data and using lots of memory. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11130 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-26Remember the allocator in the dynamically allocated scanner_state to ensureAlex Cherepanov3-10/+18
proper deallocation. Current allocation may be reset when a PS error occurs. Bug 691167. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11126 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-26Ensure that the BuildChar object is not the null object before trying access ↵Chris Liddell1-1/+1
its contents. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11125 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-26Change so that when a graphic state is restored, the overprint compositor ↵Michael Vrhel1-2/+6
action only occurs if there is a change from the current overprint state. This fixes a problem in one of the files associated with bug 691014. In the particular file, overprint compositor actions were getting placed into a pattern clist. The file in fact had no overprint settings. Ran regression test, no differences expected. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11124 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-25Add ANSI/ASME Y14.1 A - F paper sizes named ANSI_A - ANSI_F for completeness.Alex Cherepanov1-5/+10
Bug 691217. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11123 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-25Minor clean-ups: Added some parantheses to casts and initialized allocated ↵Till Kamppeter1-3/+7
memory. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11122 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-25git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11121 ↵Michael Vrhel1-5/+85
a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-25Introduced a real get_color_comp_index() method, to fix bug #690338 correctly.Till Kamppeter1-1/+143
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11120 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-25Add -dNONATIVEFONTMAP option to disable the use of font map and correspondingAlex Cherepanov2-1/+8
fonts installed on underlying platform. This may be needed to ensure consistent rendering on the platforms with different fonts, for instance, during regression testing. Bug 691240. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11119 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-25Fix for Bug 691014. Problem was caused by the fact that we had a soft mask ↵Michael Vrhel3-4/+78
present and a pattern with no transparency. This means the PDF14 device is installed and more importantly that transparency state pushes and pops occur to keep the softmask in sync with the graphic state. This particular files pattern is installed as a clist, which happens to not have any transparency. The transparency state pushes and pops were getting placed into the pattern clist when the Q and q operations occurred in the pattern, which was causing problems since the pattern clist device had no pdf14 device installed to handle such commands. The solution is to check, when a transparency compositor action is to occur, if the current device is a pattern accumulator or a pattern-clist device. If it is, then the pattern instance is checked to see if it has transparency. If it does not, then the transparency state chance is ignored. This all occurs on the clist writing phase in the gs_trans functions. In addition, a fix was made so that the pdf14custom device sets up it's color information correctly. For subtractive devices that do not have cmyk process colorants the custompdf14 device is installed. This pdf14 device was obtaining its color_info from the target device. The pdf14 device must be continuous tone even if the target device is not. Ran a regression test and saw no differences. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11117 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-24Remove rudimentary code that maps out-of-range character codes to 0 causingAlex Cherepanov1-4/+1
dictionary overflow in some cases. Unlike earlier array, dictionary representation of 'cmap' table doesn't need this. Bug 691253, customer 780. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11116 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-23Resolve issues with the Linux language_switch build of Ghostscript, since ↵Chris Liddell2-2/+6
Freetype enabled is now the default for GS. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11114 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-23Resolve issues with the language_switch Ghostscript build for Windows, since ↵Chris Liddell4-3/+24
Freetype enabled became the default for the normal GS build. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11113 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-23Fix of minor memory leak found by Ray. maskbuf entry of transparency ctx ↵Michael Vrhel1-1/+2
object was not getting freed. The large mask buffer, which is a member variable of maskbuf was getting freed but not this 12 byte structure. No expected differences. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11112 a1074d23-0009-0410-80fe-cf8c14f379e6
2010-04-23Always load CFF font as a CIDFont when it is used as a descendant font of aAlex Cherepanov1-1/+1
composite font in PDF file. Bug 691253. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11110 a1074d23-0009-0410-80fe-cf8c14f379e6