summaryrefslogtreecommitdiff
path: root/base/gdevprn.h
Commit message (Collapse)AuthorAgeFilesLines
* Update postal address in file headersChris Liddell2023-04-041-3/+3
|
* Duplex/Tumble/Tumble2 support for PCLm.Robin Watts2021-08-111-0/+14
|
* Remove unused get_band device proc.Robin Watts2021-04-281-2/+2
|
* Split initialize device proc into two.Robin Watts2021-04-261-16/+16
| | | | | | | | | | | | | | | | | 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-33/+28
| | | | | | | | | | 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-84/+16
|
* 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.
* Remove unused macro code from gdevprn.Robin Watts2021-03-261-29/+0
|
* Update copyright to 2021Chris Liddell2021-03-151-1/+1
|
* Fix another SEGV with BGPrint due to device_unsubclassRay Johnston2020-11-021-2/+2
| | | | | | | | | | The printer device needs to have the bg_print structure external to the device so that when the device is freed the bg_print communication area shared with the thread doesn't get freed. This is similar to the clist band_range_list issue. The SEGV was seen with 15-01.BIN as it unsubclasses the PCL_Mono_Palette gs_pcl_mono_palette_device device.
* Refactor 'clist mutatable devices' from prn ones.Robin Watts2020-06-251-19/+5
| | | | | | | | | | | | Devices that have to mutate to be clist ones need to be setup in a particular way. After the standard gx_device header, they are padded out to a large enough size that the clist header fields can fit in. Then the device specific fields follow. gdev_prn devices are the standard example of this. In order to more easily allow other devices to work in the same way, we refactor the padding/clist specific fields out into new macros.
* Refactor gdev_space_params slightly.Robin Watts2020-06-251-3/+3
| | | | | | | | | | | | | | The gdev_space_params structure is also known as gdev_prn_space_params, which is slightly misleading as there is nothing prn specific about it. Rename all uses of gdev_prn_space_params within the code to be gdev_space_params. Leave gdev_prn_space_params defined as a typedef so that any customer code will not be affected. Rename compare_gdev_prn_space_params to be gdev_space_params_cmp to better reflect its non-prn-specific nature. Make it non-static and move it to gsdevice.c.
* Update copyright to 2020Chris Liddell2020-04-101-1/+1
|
* Move FILE * operations behind new gp_file * API.Robin Watts2019-05-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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.
* Update source/header file copyright notice to 2019Chris Liddell2019-01-161-1/+1
|
* Remove some blah_DEFINED cruft.Robin Watts2019-01-071-12/+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.
* 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.
* Fix bug 696845 SEGV with --saved-pages-test and transparencyRay Johnston2017-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a file pushes a pdf14devicefilter (or other compositor) it will still be the currentdevice after the filter is popped when the saved pages printing occurs. We need to check if the device is a forwarding device (as compositors will be when deactivated) and use the target device to print the saved pages. Also, if a device uses the gx_default_dev_spec_op, it will return 0 from the supports_saved_pages call even when it is a printer device. In gdev_prn_forwarding_dev_spec_op, check for a zero return and return true (1). A device that is a printer device that doesn't support saved page printing needs to return < 0 to prevent this. Add a finalize method for gx_device_printer so we can free up the saved- pages-list when the device is freed, but not when the device is closed which can happen if it needs to close due to put_params. Also the return code from the output_page in gx_saved_page_params_process was ignored. Both seen with the file Bug687111.ps and the psdcmyk device. Also for devn devices, such as psdcmyk, we need to save the separation (spot color) names collected during the execution of setcolorspace in the gx_saved_page and set them in the devn_params when rendering. These are not handled by the paramlist. Disable --saved-pages= and --saved-pages-test with PCL and XPS since it was never completely implemented and the partial implementation causes many errors when tested with --saved-pages-test. Note that while the --saved-pages-test option is still accepted as a parameter, it is ignored so that regression testing with --saved-pages-test can run. Regression shows 3343 "diffs", but bmpcmp doesn't show any diffs.
* Bug 696599: cast disguised wrong type dereference.Chris Liddell2016-09-131-2/+0
| | | | | | | | | | The code was casting to a gx_device_printer to get to the BLS_force_memory value, but since the target device for a clist device is no longer necessarily a printer device, it wasn't guaranteed that the struct contained that entry. So move BLS_force_memory to the base device type (gx_device), so it's always available.
* Remove the RECT_RECOVER and VMerror retrying logic from the clistRay Johnston2016-08-151-25/+1
| | | | | | | | The entire concept relies on recovery by being able to store an entire page raster image somewhere when the clist writing gets a VMerror, but if we have room for a page, we could have used page mode in the first place and totally avoid clist complexity VMerrors. Rip this code out to make the clist more readable and maintainable.
* Remove all traces of the (probably bit-rotted) async rendererRay Johnston2016-08-121-56/+0
| | | | | This has mostly been replaced by BGPrint and saved-pages (except for a queue), but that will be added differently in the future.
* Commit of build_consolidation branchChris Liddell2015-07-201-0/+733
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.