diff options
author | 2020-09-10 18:10:49 +0200 | |
---|---|---|
committer | 2020-09-11 20:06:36 +0200 | |
commit | acfc02c1747065fe450c7cfeb6f1844b62335f08 (patch) | |
tree | 5887806a2e6b99bbb0255e013a9028810e230a7f /cups | |
parent | Import Ghostscript 9.52 (diff) | |
download | ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.tar.gz ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.tar.bz2 ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.zip |
Import Ghostscript 9.53ghostscript-9.53
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'cups')
-rw-r--r-- | cups/gdevcups.c | 24 | ||||
-rw-r--r-- | cups/libs/cups/globals.c | 8 |
2 files changed, 27 insertions, 5 deletions
diff --git a/cups/gdevcups.c b/cups/gdevcups.c index 8fa48860..aac6adae 100644 --- a/cups/gdevcups.c +++ b/cups/gdevcups.c @@ -96,7 +96,7 @@ /* This should go into gdevprn.h, or, better yet, gdevprn should acquire an API for changing resolution. */ int gdev_prn_maybe_realloc_memory(gx_device_printer *pdev, - gdev_prn_space_params *old_space, + gdev_space_params *old_space, int old_width, int old_height, bool old_page_uses_transparency); @@ -1180,7 +1180,7 @@ done: void cups_get_space_params(const gx_device_printer *pdev, /* I - Printer device */ - gdev_prn_space_params *space_params) + gdev_space_params *space_params) /* O - Space parameters */ { float cache_size; /* Size of tile cache in bytes */ @@ -3100,7 +3100,7 @@ cups_put_params(gx_device *pdev, /* I - Device info */ int margins_set; /* Were the margins set? */ int size_set; /* Was the size set? */ int color_set; /* Were the color attrs set? */ - gdev_prn_space_params sp_old; /* Space parameter data */ + gdev_space_params sp_old; /* Space parameter data */ int width, /* New width of page */ height, /* New height of page */ width_old = 0, /* Previous width of page */ @@ -3117,8 +3117,10 @@ cups_put_params(gx_device *pdev, /* I - Device info */ ppd_size_t *best_size = NULL; int size_matched = 0, margins_matched = 0, - imageable_area_matched = 0, - name_requested_matched = 0; + imageable_area_matched = 0; +#ifdef CUPS_DEBUG + int name_requested_matched = 0; +#endif float long_edge_mismatch, short_edge_mismatch; gs_param_string icc_pro_dummy; int old_cmps = cups->color_info.num_components; @@ -3501,7 +3503,9 @@ cups_put_params(gx_device *pdev, /* I - Device info */ size_matched = 0; margins_matched = 0; imageable_area_matched = 0; +#ifdef CUPS_DEBUG name_requested_matched = 0; +#endif long_edge_mismatch = fabs(cups->MediaSize[1] - size->length)/size->length + @@ -3579,7 +3583,11 @@ cups_put_params(gx_device *pdev, /* I - Device info */ if (size_matched || imageable_area_matched) { if (!strcasecmp(cups->pageSizeRequested, size->name)) + { +#ifdef CUPS_DEBUG name_requested_matched = 1; +#endif + } else score -= 1000; } @@ -3674,7 +3682,9 @@ cups_put_params(gx_device *pdev, /* I - Device info */ size_matched = 0; margins_matched = 0; imageable_area_matched = 0; +#ifdef CUPS_DEBUG name_requested_matched = 0; +#endif long_edge_mismatch = fabs(cups->MediaSize[0] - size->length)/size->length + @@ -3752,7 +3762,11 @@ cups_put_params(gx_device *pdev, /* I - Device info */ if (size_matched || imageable_area_matched) { if (!strcasecmp(cups->pageSizeRequested, size->name)) + { +#ifdef CUPS_DEBUG name_requested_matched = 1; +#endif + } else score -= 1000; } diff --git a/cups/libs/cups/globals.c b/cups/libs/cups/globals.c index c7440b61..4b878f0a 100644 --- a/cups/libs/cups/globals.c +++ b/cups/libs/cups/globals.c @@ -103,6 +103,14 @@ _cupsGlobals(void) pthread_once(&cups_globals_key_once, cups_globals_init); #endif /* HAVE_PTHREAD_H */ +#ifdef HAVE_PTHREAD_H +#elif defined(WIN32) + if (!cups_global_mutex.m_init) { + InitializeCriticalSection(&cups_global_mutex.m_criticalSection); + cups_global_mutex.m_init = 1; + } +#endif + /* * See if we have allocated the data yet... */ |