summaryrefslogtreecommitdiff
path: root/devices/gdevcmykog.c
Commit message (Collapse)AuthorAgeFilesLines
* Update postal address in file headersChris Liddell2023-04-041-6/+8
|
* Remove "unread" param from get_bits_rectangle.Robin Watts2021-07-011-1/+1
| | | | No one sets it. No one reads it. It's pointless, so excise it.
* Revert commit 5ea6a560 to prevent SEGVs caused by that.Ray Johnston2021-05-181-1/+1
| | | | | | A more complete fix is in work, but not yet complete. Revert the change so that nightly regressions will stop producing many SEGVs with the psdcmykog device.
* Have psdcmykog initialize its colorants to 6Michael Vrhel2021-05-131-1/+1
| | | | | | | | The psdcmykog device should have its max_separations and its number of components be the same. This means it will not add extra components when they are encountered in a document like psdcmyk and tiffsep do, which are also devn device. psdcmykog device is unique in that it is a devn device but with a fixed set of colorants.
* Split initialize device proc into two.Robin Watts2021-04-261-9/+4
| | | | | | | | | | | | | | | | | The device initialize function currently performs 2 jobs. Firstly, it fills out the device_procs. Secondly, it performs any minimal initialization required by the device (typically none). At various points in the code we want to be able to copy procs from one 'prototype' device to another, so we call initialize for that. This populates the device procs, but does other work that typically requires a 'derived device' structure rather than a vanilla gx_device to work in. Accordingly, we split the job into two; initialize_device_procs (the first part) and initialize_device (the second part). The initialize_device_procs function will set up the initialize_device function pointer along with the rest if required.
* Further rationalisation of device init.Robin Watts2021-04-201-4/+1
| | | | | | | | | | Move the initialize procedure out of the device procs table, and into a bare function pointer at the start of the device proc. Devices just initialise this, and the rest should fall into place. This means changes to the device instantion macros (and all the uses thereof), but makes the code nicer overall. In particular, this removes the vestigial 'static_procs' structure.
* Move devices away from static init of procs.Robin Watts2021-04-201-68/+22
|
* Rename finish_copydevice to initialize, and remove second param.Robin Watts2021-04-201-1/+1
| | | | | | | | | | | It used to be that finish_copydevice(dev, const old_dev) would be used to copy stuff from a prototype to a new instance of a device. Now, no copying is ever done. Also, it's a confusing name. Rename it to be 'initialize', which is clearer. Also, it should become even more appropriate in future, if we have this function be the one that is responsible for filling out the procs.
* Update copyright to 2021Chris Liddell2021-03-151-1/+1
|
* Strip trailing whitespace from .c and .h files.Robin Watts2020-09-091-3/+3
|
* Defeat ICC component validation for nullpage deviceChris Liddell2020-07-291-1/+1
| | | | | | | | | | | | | | | | | | Further to commit 4a3441bdde7060ecc9048bf391977412a82063a8, it turns out that, in practice, we can't completely ignore the ICC profile device parameters, parameters that have an immediate effect on the device are also validated during put_params and thus, for those, validation can still fail. Using gxdso_supports_devn allows us to defeat the profile component validation, but nullpage is not a DeviceN device, hence that could cause confusion. Using a dedicated gxdso_skip_icc_component_validation allows us to be more selective about when to short circuit those tests, and avoid confusion. This is required for gpdl as Postscript initialisation is slightly different compared to regular Ghostscript - the nulldevice remains in play all through Postscript initialisation (rather than being replaced with the device specified by the command arguments part way through initialisation).
* Update copyright to 2020Chris Liddell2020-04-101-1/+1
|
* Fix various printer devices to properly call spec ops.Robin Watts2019-09-121-1/+1
| | | | | | | | | Various printer devices (psd, psdcmykog, tiffsep, tiffscaled) were passing the spec ops on to gx_default_dev_spec_op rather than gdev_prn_dev_spec_op. The most obvious implication of this was that we'd sometimes get a warning about printer devices having a private spec op.
* Move FILE * operations behind new gp_file * API.Robin Watts2019-05-291-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (squash of commits from filesec branch) Most of this commit is donkeywork conversions of calls from FILE * -> gp_file *, fwrite -> gp_fwrite etc. Pretty much every device is touched, along with the clist and parsing code. The more interesting changes are within gp.h (where the actual new API is defined), gpmisc.c (where the basic implementations live), and the platform specific levels (gp_mswin.c, gp_unifs.c etc where the platform specific implementations have been tweaked/renamed). File opening path validation All file opening routines now call a central routine for path validation. This then consults new entries in gs_lib_ctx to see if validation is enabled or not. If so, it validates the paths by seeing if they match. Simple C level functions for adding/removing/clearing paths, exposed through the gsapi level. Add 2 postscript operators for path control. <name> <string> .addcontrolpath - Add the given <string> (path) to the list of paths for controlset <name>, where <name> can be: /PermitFileReading /PermitFileWriting /PermitFileControl (Anything else -> rangecheck) - .activatepathcontrol - Enable path control. At this point PS cannot make any more changes, and all file access is checked.
* Bug 696600: psdcmykog device_procsMichael Vrhel2019-01-301-2/+1
| | | | | My earlier fix caused massive problems with any transparency files. This should fix all the issues.
* Bug 696600: psdcmykog device issuesMichael Vrhel2019-01-281-0/+13
| | | | | | | | | | | | The psdcmykog device is a DeviceN color based device but unlike psdcmyk and tiffsep it can't change its color characteristics. It remains as a 6 color cmykog device. Postsript files can change the maxseparations (example 29-07E.PS) The gdevdevn code will, if it detects a change occured, close the device and reopen (see devn_printer_put_params) possibly resetting the color info. tiffsep and psdcmyk, when reopened, will reset their color characteristics based upon the content of the page, avoiding any issues upon the reopen. Here we will need to make sure to set the color information to avoid problems.
* Update source/header file copyright notice to 2019Chris Liddell2019-01-161-1/+1
|
* Fix errors introduced in previous commitMichael Vrhel2018-06-271-0/+3
| | | | | | | | | | | The commit f2cf68297e3d63cb927db3c98d317f7ee68e7898 resulted in errors with the separation type devices. With these devices, we can simply check if the color model matches the ICC profile since these devices change their number of components. Will likely need to do some testing with these device and different profiles to see what breaks when and make sure we exit gracefully.
* 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.
* Change max_components and num_components in dev.color_info to ucharMichael Vrhel2016-05-091-3/+4
| | | | | | | | | There are locations in the code where Coverity has complained about code logic that resulted in passing of unintialized values that could only occur if num_components < 0 . Since this should never be the case, we will make it clear by setting num_components and max_components to uchar. This will limit our support to 256 colors by a device.
* Bug 696726: gdevcmykog.c - insure that temp files are deletedMarcos H. Woehrmann2016-04-221-1/+1
| | | | | Call gp_open_scratch_file_rm() instead of gp_open_scratch_file() to insure that no temp files are left around if Ghostscript is killed or crashes.
* Update devices to return errors using return_error.Robin Watts2016-02-181-1/+1
|
* Squash warnings: Use better unused var paradigm.Robin Watts2016-01-041-2/+2
| | | | | Using "n = n;" causes some versions of gcc to whinge. Trying (void)n; instead.
* Squash Warnings: Simple unused variable warnings.Robin Watts2016-01-041-0/+2
|
* Bug 693011: stop PSD devs writing multiple images to one fileChris Liddell2015-11-041-67/+73
| | | | | | | | | | | | | | | | PSD does not support multiple pages/images per file. Previously the PSD devices would allow writing multiple image to the PSD output file, and end up with an invalid PSD file. The devices will now check what the output name file has the "%d" formatter to so each page written to a separate file, and if it isn't there, they will generate an error message and error code if an attempt is made to produce more than one page. To be clear: and single page input file will complete without error without the "%d" formatter. No cluster differences
* Fix for crash in Bug 696290Michael Vrhel2015-10-281-0/+8
| | | | | | | The planar devices were not getting the bit depth arrays set up. This was causing an issue during the gradient fill for high level colors where we were trying to make a smoothness decision during the line fills. Problem occurred for all the existing planar devices.
* Commit of build_consolidation branchChris Liddell2015-07-201-0/+805
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.