summaryrefslogtreecommitdiff
path: root/base/gxdevcli.h
diff options
context:
space:
mode:
authorRay Johnston <ray.johnston@artifex.com>2021-01-28 08:20:57 -0800
committerRay Johnston <ray.johnston@artifex.com>2021-03-03 13:13:13 -0800
commit1255220cedad4cb551e6593c3af2f8c80f8df629 (patch)
tree6b893df5012ff1a5e39a0be65523ac22b401a2a5 /base/gxdevcli.h
parent5e65dc7776fa98a3640602257f36f229111becb4 (diff)
downloadghostpdl-1255220cedad4cb551e6593c3af2f8c80f8df629.tar.gz
NupControl improvements to prevent save/restore problems.
The NupControl string needs to be a reference counted to work with save/ restore, and when the parameter is changed the new value needs to be propagated to children devices. The structure containing the string is adpated (simplified slightly) from the PageList implementation. Note that the parents and children references must be included in the ref_count when the NupControl structure is updated (example if 'epo' is installed, when it uninstalls itself, cannot free the the structure when it does rc_decrement). Minor comment change to devices/gdevbit.c to change NupList to NupControl.
Diffstat (limited to 'base/gxdevcli.h')
-rw-r--r--base/gxdevcli.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/base/gxdevcli.h b/base/gxdevcli.h
index 91c9ae887..fe7095574 100644
--- a/base/gxdevcli.h
+++ b/base/gxdevcli.h
@@ -706,6 +706,11 @@ typedef struct gdev_space_params_s {
int gdev_space_params_cmp(const gdev_space_params sp1,
const gdev_space_params sp2);
+typedef struct gdev_nupcontrol_s {
+ rc_header rc;
+ char *nupcontrol_str; /* NUL termintated string */
+} gdev_nupcontrol;
+
typedef struct gdev_pagelist_s {
rc_header rc;
char *Pages;
@@ -759,7 +764,7 @@ typedef struct gdev_pagelist_s {
bool DisablePageHandler; /* Can be set by the interpreter if it will process FirstPage and LastPage itself */\
int ObjectFilter; /* Bit field for which object filters to apply */\
bool ObjectHandlerPushed; /* Handles filtering of objects to devices */\
- char *NupControl; /* NUL terminated string parameter for Nup */\
+ gdev_nupcontrol *NupControl;\
bool NupHandlerPushed; /* Handles Nup operations */\
long PageCount; /* number of pages written */\
long ShowpageCount; /* number of calls on showpage */\