summaryrefslogtreecommitdiff
path: root/pcl/pl/plchar.c
Commit message (Collapse)AuthorAgeFilesLines
* Update postal address in file headersChris Liddell2023-04-041-3/+3
|
* Fix memory leak.Robin Watts2022-02-031-2/+2
| | | | | | | | | | | | | | When running a windows memento, 32bit build of: gpcl6 -dNOPAUSE -dBATCH -sDEVICE=ppmraw -dMaxBitmap=1000 -r300 -o gpcl6.out ../tests_private/pcl/pcl5cats/*.BIN we'd see leaks from pl_bitmap_build_char. I could not reproduce these when running individual files. A desk-check of the code spotted that penum would not be freed if a particular error path was taken. Fixing that (as here), removes the leaks.
* Update copyright to 2021Chris Liddell2021-03-151-1/+1
|
* Squash a couple of compiler warnings.Robin Watts2020-10-011-1/+0
|
* Rejig PCL/PXL to call graphics library rather than device functions.Robin Watts2020-09-081-14/+22
| | | | | | | | Also remove pl_begin_image2/pl_image_data2/pl_end_image2 etc functions - might as well just call direct. This leaves pldraw.c and pldraw.h empty, so remove them. Also, take the opportunity to fix some potential cleanup problems.
* lgtm.com fixes: Multiplication of narrow type in wider context.Robin Watts2020-05-151-1/+1
|
* Update copyright to 2020Chris Liddell2020-04-101-1/+1
|
* Coverity 331894: check return from gs_bbox_transform().Julian Smith2019-11-181-1/+3
|
* Fix Bug #700575 valgrind problem with decode_char.Henry Stiles2019-03-111-3/+0
| | | | | | | | | | Previously PCL stored the character code when encoding and returned it upon decode. This was only implemented properly for TrueType fonts, ie. Intellifont or bitmap fonts did not set the character which resulted in an unitialized read. Ostensibly (for PCL/XL) high level devices pass the character back upon decode, so it is only necessary to return the passed in value and we can dispense with storing the last character.
* Update source/header file copyright notice to 2019Chris Liddell2019-01-161-1/+1
|
* Remove some blah_DEFINED cruft.Robin Watts2019-01-071-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we properly "include what we use" let's sanitise the horrid blah_DEFINED ifdeffery (i.e. kill it where possible). Also, we update the .c dependencies in the base/psi makefiles to be correct. Unfortunately, this new correct set of dependencies causes nmake to soil itself and die with an out of memory error. After much experimentation, I've come to the conclusion that this is because it copes poorly with given the same file as a dependency multiple times. Sadly, our style of declaring dependencies in the following style: foo_h=$(BLAH)/foo.h $(std_h) bar_h=$(BLAH)/bar.h $(foo_h) $(std_h) baz_h=$(BLAH)/baz.h $(foo_h) $(std_h) means that a .obj file that depends on $(foo_h) $(bar_h) and $(baz_h) ends up depending on foo.h twice, and std.h three times. I have therefore changed the style of dependencies used to be more standard. We still define: foo_h=$(BLAH)/foo.h so each .obj file rule can depend on $(foo_h) etc as required, but the dependencies between each .h file are expressed in normal rules at the end of the file in a dedicated "# Dependencies" section that we can now autogenerate.
* Fix header inclusions.Robin Watts2018-12-141-5/+1
| | | | | | | | | | | | | | Run a release build on a linux machine to make arch.h etc. Then run toolbin/headercompile.pl to test compiling each headerfile by itself. Resolve all the missing #includes, add missing repeated include guards and copyright statements. Also, update all the header dependencies in the makefiles. It is possible that the object dependencies in the makefiles can be simplified now, but that's a task for another day.
* Bug 697545 : Prevent SEGV by propagating error code in tt_find_table.Shailesh Mistry2018-10-111-3/+9
| | | | | | | | | Propagate error code by checking for return code from access function call. Prevent SEGV during pcl_text by checking if a font file is loaded before trying to use a font. Error created using :- MEMENTO_FAILAT=19130 ./membin/gpcl6 -sDEVICE=pbmraw -dMaxBitmap=2000 -o /dev/null ./tests_private/pcl/pcl5cfts/fts.0210
* Bug 697545 : Update PCL to return error codes (Patch V).Shailesh Mistry2018-02-261-8/+16
| | | | | Prevent numerous SEGV points by ensuring error codes are returned and handled appropriately.
* Update copyright notice with new head office address.Ken Sharp2018-01-301-3/+3
| | | | | | | | | Also update copyright dates. Remove gs_cmdl.ps as we no longer use it, and remove its entry from psfiles.htm. Remove xfonts.htm as this feature (xfont support) is long, long gone.
* Bug 694648: Prevent buffer overrun.Shailesh Mistry2017-06-131-0/+4
| | | | | Add bounds checking to pl_tt_string_proc to prevent a buffer overrun if the incoming offset value is greater than the header size.
* Bounds check buffers for downloaded glyphs in PCL.Chris Liddell2017-06-011-3/+39
| | | | | | | | For downloaded fonts, there were several buffer overreads reported by valgrind when interpreting Intellifont glyph descriptions. This adds using the (already existing) length field to bounds check when we interpret the glyph.
* Make gs_imager_state == gs_state.Chris Liddell2016-06-061-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change how gstate initialisation is done: Previously we relied on the imager state being a subset of the gstate (thus assigning an imager state to a graphics state over wrote to the entries common to both, and didn't overwrite any already set graphics state specific entries). Making the imager and graphics states the same means that approach doesn't work, so this changes it to initialise the entries individually. Renames gsistate.c->gsgstate.c and gxistate.h->gxgstate.h Cleanup and fix the gs_state gc stuff. Uses different check for pre/post clist pdf14 device Previously, the code used "is_gstate" in the imager/graphics state object to determine if the code was being called pre or post clist (post clist would only ever have had an imager_state so is_gstate = false). With no imager state any more, that test would no longer work (and I am dubious about whether it was really safe, anyway). Other places check for the presence of a clist reader device in the pdf14 device structure - so use that here too. Adds initial (NULL) value for show_gstate pointer in gs_state. Removes the now pointless macro for the contents of the graphics state Changes function names that had "imager" to use "gstate" Removes the redundant 'is_state' flag Cleans up gs_(g)state_putdeviceparams(): Previously we had to similar routines: one took a graphics state, and used the device from the graphics state, the other took an imager state and the device as an explicit parameter. With the removal of the imager state, "merge" those two functions Replaces gs_state with gs_gstate It makes for less confusion as it really is a g(raphics)state
* Remove gs_no_glyph, gs_min_cid_glyph and gs_max_glyphChris Liddell2016-05-201-14/+14
| | | | | These were legacy remnants. Replace their remaining uses with the upper case, non-deprecated equivalents.
* Remove legacy lower case arch_* macrosChris Liddell2016-01-111-1/+1
| | | | | Most of the ARCH_* macros had lower case equivalents for "backwards compatibility" - it's been long enough.....
* Squash warnings: MSVC PCLRobin Watts2016-01-041-1/+1
| | | | | | Squash the warnings seen when building a debug PCL build on MSVC 2005. Mostly addition of simple casts.
* Bug 696232: apply metrics for PCL TTF fonts.Chris Liddell2015-10-091-9/+22
| | | | | | | Specifically, metrics for Format 1 Class 2 glyph data. Several PCL/PXL files show differences, most are not really visible without pixel level comparisons, a very few are (mostly subtle) progressions.
* Commit of build_consolidation branchChris Liddell2015-07-201-0/+1905
Squashed into one commit (see branch for details of the evolution of the branch). This brings gpcl6 and gxps into the Ghostscript build system, and a shared set of graphics library object files for all the interpreters. Also, brings the same configuration options to the pcl and xps products as we have for Ghostscript.