| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This has mostly been replaced by BGPrint and saved-pages (except for
a queue), but that will be added differently in the future.
|
|
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.
|