diff options
author | Ray Johnston <ray.johnston@artifex.com> | 2017-08-06 12:24:21 -0700 |
---|---|---|
committer | Ray Johnston <ray.johnston@artifex.com> | 2017-08-06 21:09:09 -0700 |
commit | 478a0a862d2593199bcae599e46bdc97b525bb12 (patch) | |
tree | 71c2a8012fcec5973c8e43b6fe09785b1b87375d /cups | |
parent | d91d4273f38fb8a527ff342d360cee8aaf468896 (diff) | |
download | ghostpdl-478a0a862d2593199bcae599e46bdc97b525bb12.tar.gz |
Bug 698334: LeadingEdge parameter problems.
Because -dLeadingEdge=# sets the value in systemdict, we need to return
this parameter from gx_default_get_param and gx_default_get_params so that
the systemdict value will get sent to the device (putdeviceprops).
Also found that the JPEG device was using LeadingEdge, but not stripping
off the "LEADINGEDGE_SET" bit. Fix by anding with LEADINGEDGE_MASK.
Lastly, the cups device put_params needs to be able to accept a null
parameter type as the default put_params can.
Diffstat (limited to 'cups')
-rw-r--r-- | cups/gdevcups.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/cups/gdevcups.c b/cups/gdevcups.c index a6c3f7fa8..f596d3fe2 100644 --- a/cups/gdevcups.c +++ b/cups/gdevcups.c @@ -3218,7 +3218,6 @@ cups_put_params(gx_device *pdev, /* I - Device info */ arrayoption(ImagingBoundingBox, "ImagingBoundingBox", 4) booloption(InsertSheet, "InsertSheet") intoption(Jog, "Jog", cups_jog_t) - intoption(LeadingEdge, "LeadingEdge", cups_edge_t) arrayoption(Margins, "Margins", 2) booloption(ManualFeed, "ManualFeed") intoption(MediaPosition, "cupsMediaPosition", unsigned) /* Compatibility */ @@ -3240,6 +3239,27 @@ cups_put_params(gx_device *pdev, /* I - Device info */ intoption(cupsRowFeed, "cupsRowFeed", unsigned) intoption(cupsRowStep, "cupsRowStep", unsigned) + /* Special handling of LeadingEdge to allow null as a valid value type */ + if ((code = param_read_int(plist, "LeadingEdge", &intval)) < 0) + { + if ((code = param_read_null(plist, "LeadingEdge")) < 0) + { + dmprintf(pdev->memory, "ERROR: Error setting LeadingEdge ...\n"); + param_signal_error(plist, "LeadingEdge", code); + goto done; + } + if (code == 0) + cups->header.LeadingEdge = CUPS_EDGE_TOP; + } + else if (code == 0) + { + cups->header.LeadingEdge = (cups_edge_t)intval; + } + + #ifdef GX_COLOR_INDEX_TYPE + /* + * Support cupsPreferredBitsPerColor - basically, allows you to + #ifdef GX_COLOR_INDEX_TYPE /* * Support cupsPreferredBitsPerColor - basically, allows you to |