From: Michael Sweet Date: Fri, 28 Oct 2016 22:29:04 +0000 (-0400) Subject: More changes for Issue #4909: X-Git-Tag: v2.2.2~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23862bc6253d3e8b0ce8736491a4bd41fcbd88fb;p=thirdparty%2Fcups.git More changes for Issue #4909: - Don't include cupsFilter2 lines for PostScript, PCLXL, or TIFF. - Update PWG media support code to always have a PPD size name. --- diff --git a/cups/cups-private.h b/cups/cups-private.h index 998aeec946..03cd8df7eb 100644 --- a/cups/cups-private.h +++ b/cups/cups-private.h @@ -124,7 +124,8 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/ *ppd_size_lut, /* Lookup table for PPD names */ *pwg_size_lut; /* Lookup table for PWG names */ pwg_media_t pwg_media; /* PWG media data for custom size */ - char pwg_name[65]; /* PWG media name for custom size */ + char pwg_name[65], /* PWG media name for custom size */ + ppd_name[41]; /* PPD media name for custom size */ /* request.c */ http_t *http; /* Current server connection */ diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c index 83446d9dfd..eef8c51c61 100644 --- a/cups/ppd-cache.c +++ b/cups/ppd-cache.c @@ -3096,9 +3096,7 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */ if (!_cups_strcasecmp(format, "application/pdf")) cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/pdf 10 -\"\n"); - else if (!_cups_strcasecmp(format, "application/postscript")) - cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-postscript application/postscript 10 -\"\n"); - else if (_cups_strcasecmp(format, "application/octet-stream") && _cups_strcasecmp(format, "application/vnd.hp-pcl") && _cups_strcasecmp(format, "text/plain")) + else if (_cups_strcasecmp(format, "application/octet-stream") && _cups_strcasecmp(format, "application/postscript") && _cups_strncasecmp(format, "application/vnd.hp-pcl", 23) && _cups_strcasecmp(format, "image/tiff") && _cups_strcasecmp(format, "text/plain")) cupsFilePrintf(fp, "*cupsFilter2: \"%s %s 10 -\"\n", format, format); } } diff --git a/cups/pwg-media.c b/cups/pwg-media.c index 6a206877e8..a064d2f973 100644 --- a/cups/pwg-media.c +++ b/cups/pwg-media.c @@ -37,8 +37,7 @@ static int pwg_compare_pwg(pwg_media_t *a, pwg_media_t *b); static int pwg_compare_ppd(pwg_media_t *a, pwg_media_t *b); static char *pwg_format_inches(char *buf, size_t bufsize, int val); static char *pwg_format_millimeters(char *buf, size_t bufsize, int val); -static int pwg_scan_measurement(const char *buf, char **bufptr, int numer, - int denom); +static int pwg_scan_measurement(const char *buf, char **bufptr, int numer, int denom); /* @@ -61,7 +60,7 @@ static pwg_media_t const cups_pwg_media[] = _PWG_MEDIA_IN("na_index-5x8_5x8in", NULL, "5x8", 5, 8), _PWG_MEDIA_IN("na_number-14_5x11.5in", NULL, "Env14", 5, 11.5), _PWG_MEDIA_IN("na_invoice_5.5x8.5in", "invoice", "Statement", 5.5, 8.5), - _PWG_MEDIA_IN("na_index-4x6-ext_6x8in", NULL, NULL, 6, 8), + _PWG_MEDIA_IN("na_index-4x6-ext_6x8in", NULL, "6x8", 6, 8), _PWG_MEDIA_IN("na_6x9_6x9in", "na-6x9-envelope", "6x9", 6, 9), _PWG_MEDIA_IN("na_c5_6.5x9.5in", NULL, "6.5x9.5", 6.5, 9.5), _PWG_MEDIA_IN("na_7x9_7x9in", "na-7x9-envelope", "7x9", 7, 9), @@ -86,7 +85,7 @@ static pwg_media_t const cups_pwg_media[] = _PWG_MEDIA_IN("na_10x15_10x15in", "na-10x15-envelope", "10x15", 10, 15), _PWG_MEDIA_IN("na_11x12_11x12in", NULL, "11x12", 11, 12), _PWG_MEDIA_IN("na_edp_11x14in", NULL, "11x14", 11, 14), - _PWG_MEDIA_IN("na_fanfold-us_11x14.875in", NULL, NULL, 11, 14.875), + _PWG_MEDIA_IN("na_fanfold-us_11x14.875in", NULL, "11x14.875", 11, 14.875), _PWG_MEDIA_IN("na_11x15_11x15in", NULL, "11x15", 11, 15), _PWG_MEDIA_IN("na_ledger_11x17in", "tabloid", "Tabloid", 11, 17), _PWG_MEDIA_IN("na_eur-edp_12x14in", NULL, NULL, 12, 14), @@ -98,8 +97,8 @@ static pwg_media_t const cups_pwg_media[] = _PWG_MEDIA_IN("na_arch-c_18x24in", "arch-c", "ARCHC", 18, 24), _PWG_MEDIA_IN("na_d_22x34in", "d", "AnsiD", 22, 34), _PWG_MEDIA_IN("na_arch-d_24x36in", "arch-d", "ARCHD", 24, 36), - _PWG_MEDIA_IN("asme_f_28x40in", "f", NULL, 28, 40), - _PWG_MEDIA_IN("na_wide-format_30x42in", NULL, NULL, 30, 42), + _PWG_MEDIA_IN("asme_f_28x40in", "f", "28x40", 28, 40), + _PWG_MEDIA_IN("na_wide-format_30x42in", NULL, "30x42", 30, 42), _PWG_MEDIA_IN("na_e_34x44in", "e", "AnsiE", 34, 44), _PWG_MEDIA_IN("na_arch-e_36x48in", "arch-e", "ARCHE", 36, 48), _PWG_MEDIA_IN("na_f_44x68in", NULL, "AnsiF", 44, 68), @@ -116,35 +115,35 @@ static pwg_media_t const cups_pwg_media[] = _PWG_MEDIA_MM("iso_a4-tab_225x297mm", NULL, "A4Tab", 225, 297), _PWG_MEDIA_MM("iso_a4-extra_235.5x322.3mm", NULL, "A4Extra", 235.5, 322.3), _PWG_MEDIA_MM("iso_a3_297x420mm", "iso-a3", "A3", 297, 420), - _PWG_MEDIA_MM("iso_a4x3_297x630mm", "iso-a4x3", NULL, 297, 630), - _PWG_MEDIA_MM("iso_a4x4_297x841mm", "iso-a4x4", NULL, 297, 841), - _PWG_MEDIA_MM("iso_a4x5_297x1051mm", "iso-a4x5", NULL, 297, 1051), - _PWG_MEDIA_MM("iso_a4x6_297x1261mm", "iso-a4x6", NULL, 297, 1261), - _PWG_MEDIA_MM("iso_a4x7_297x1471mm", "iso-a4x7", NULL, 297, 1471), - _PWG_MEDIA_MM("iso_a4x8_297x1682mm", "iso-a4x8", NULL, 297, 1682), - _PWG_MEDIA_MM("iso_a4x9_297x1892mm", "iso-a4x9", NULL, 297, 1892), + _PWG_MEDIA_MM("iso_a4x3_297x630mm", "iso-a4x3", "A4x3", 297, 630), + _PWG_MEDIA_MM("iso_a4x4_297x841mm", "iso-a4x4", "A4x4", 297, 841), + _PWG_MEDIA_MM("iso_a4x5_297x1051mm", "iso-a4x5", "A4x5", 297, 1051), + _PWG_MEDIA_MM("iso_a4x6_297x1261mm", "iso-a4x6", "A4x6", 297, 1261), + _PWG_MEDIA_MM("iso_a4x7_297x1471mm", "iso-a4x7", "A4x7", 297, 1471), + _PWG_MEDIA_MM("iso_a4x8_297x1682mm", "iso-a4x8", "A4x8", 297, 1682), + _PWG_MEDIA_MM("iso_a4x9_297x1892mm", "iso-a4x9", "A4x9", 297, 1892), _PWG_MEDIA_MM("iso_a3-extra_322x445mm", "iso-a3-extra", "A3Extra", 322, 445), _PWG_MEDIA_MM("iso_a2_420x594mm", "iso-a2", "A2", 420, 594), - _PWG_MEDIA_MM("iso_a3x3_420x891mm", "iso-a3x3", NULL, 420, 891), - _PWG_MEDIA_MM("iso_a3x4_420x1189mm", "iso-a3x4", NULL, 420, 1189), - _PWG_MEDIA_MM("iso_a3x5_420x1486mm", "iso-a3x5", NULL, 420, 1486), - _PWG_MEDIA_MM("iso_a3x6_420x1783mm", "iso-a3x6", NULL, 420, 1783), - _PWG_MEDIA_MM("iso_a3x7_420x2080mm", "iso-a3x7", NULL, 420, 2080), + _PWG_MEDIA_MM("iso_a3x3_420x891mm", "iso-a3x3", "A3x3", 420, 891), + _PWG_MEDIA_MM("iso_a3x4_420x1189mm", "iso-a3x4", "A3x4", 420, 1189), + _PWG_MEDIA_MM("iso_a3x5_420x1486mm", "iso-a3x5", "A3x6", 420, 1486), + _PWG_MEDIA_MM("iso_a3x6_420x1783mm", "iso-a3x6", "A3x6", 420, 1783), + _PWG_MEDIA_MM("iso_a3x7_420x2080mm", "iso-a3x7", "A3x7", 420, 2080), _PWG_MEDIA_MM("iso_a1_594x841mm", "iso-a1", "A1", 594, 841), - _PWG_MEDIA_MM("iso_a2x3_594x1261mm", "iso-a2x3", NULL, 594, 1261), - _PWG_MEDIA_MM("iso_a2x4_594x1682mm", "iso-a2x4", NULL, 594, 1682), - _PWG_MEDIA_MM("iso_a2x5_594x2102mm", "iso-a2x5", NULL, 594, 2102), + _PWG_MEDIA_MM("iso_a2x3_594x1261mm", "iso-a2x3", "A2x3", 594, 1261), + _PWG_MEDIA_MM("iso_a2x4_594x1682mm", "iso-a2x4", "A2x4", 594, 1682), + _PWG_MEDIA_MM("iso_a2x5_594x2102mm", "iso-a2x5", "A2x5", 594, 2102), _PWG_MEDIA_MM("iso_a0_841x1189mm", "iso-a0", "A0", 841, 1189), - _PWG_MEDIA_MM("iso_a1x3_841x1783mm", "iso-a1x3", NULL, 841, 1783), - _PWG_MEDIA_MM("iso_a1x4_841x2378mm", "iso-a1x4", NULL, 841, 2378), - _PWG_MEDIA_MM("iso_2a0_1189x1682mm", NULL, NULL, 1189, 1682), - _PWG_MEDIA_MM("iso_a0x3_1189x2523mm", NULL, NULL, 1189, 2523), + _PWG_MEDIA_MM("iso_a1x3_841x1783mm", "iso-a1x3", "A1x3", 841, 1783), + _PWG_MEDIA_MM("iso_a1x4_841x2378mm", "iso-a1x4", "A1x4", 841, 2378), + _PWG_MEDIA_MM("iso_2a0_1189x1682mm", NULL, "1189x1682mm", 1189, 1682), + _PWG_MEDIA_MM("iso_a0x3_1189x2523mm", NULL, "A0x3", 1189, 2523), _PWG_MEDIA_MM("iso_b10_31x44mm", "iso-b10", "ISOB10", 31, 44), _PWG_MEDIA_MM("iso_b9_44x62mm", "iso-b9", "ISOB9", 44, 62), _PWG_MEDIA_MM("iso_b8_62x88mm", "iso-b8", "ISOB8", 62, 88), _PWG_MEDIA_MM("iso_b7_88x125mm", "iso-b7", "ISOB7", 88, 125), _PWG_MEDIA_MM("iso_b6_125x176mm", "iso-b6", "ISOB6", 125, 176), - _PWG_MEDIA_MM("iso_b6c4_125x324mm", NULL, NULL, 125, 324), + _PWG_MEDIA_MM("iso_b6c4_125x324mm", NULL, "125x324mm", 125, 324), _PWG_MEDIA_MM("iso_b5_176x250mm", "iso-b5", "ISOB5", 176, 250), _PWG_MEDIA_MM("iso_b5-extra_201x276mm", NULL, "ISOB5Extra", 201, 276), _PWG_MEDIA_MM("iso_b4_250x353mm", "iso-b4", "ISOB4", 250, 353), @@ -152,11 +151,11 @@ static pwg_media_t const cups_pwg_media[] = _PWG_MEDIA_MM("iso_b2_500x707mm", "iso-b2", "ISOB2", 500, 707), _PWG_MEDIA_MM("iso_b1_707x1000mm", "iso-b1", "ISOB1", 707, 1000), _PWG_MEDIA_MM("iso_b0_1000x1414mm", "iso-b0", "ISOB0", 1000, 1414), - _PWG_MEDIA_MM("iso_c10_28x40mm", "iso-c10", NULL, 28, 40), - _PWG_MEDIA_MM("iso_c9_40x57mm", "iso-c9", NULL, 40, 57), - _PWG_MEDIA_MM("iso_c8_57x81mm", "iso-c8", NULL, 57, 81), + _PWG_MEDIA_MM("iso_c10_28x40mm", "iso-c10", "EnvC10", 28, 40), + _PWG_MEDIA_MM("iso_c9_40x57mm", "iso-c9", "EnvC9", 40, 57), + _PWG_MEDIA_MM("iso_c8_57x81mm", "iso-c8", "EnvC8", 57, 81), _PWG_MEDIA_MM("iso_c7_81x114mm", "iso-c7", "EnvC7", 81, 114), - _PWG_MEDIA_MM("iso_c7c6_81x162mm", NULL, NULL, 81, 162), + _PWG_MEDIA_MM("iso_c7c6_81x162mm", NULL, "EnvC76", 81, 162), _PWG_MEDIA_MM("iso_c6_114x162mm", "iso-c6", "EnvC6", 114, 162), _PWG_MEDIA_MM("iso_c6c5_114x229mm", NULL, "EnvC65", 114, 229), _PWG_MEDIA_MM("iso_c5_162x229mm", "iso-c5", "EnvC5", 162, 229), @@ -166,16 +165,16 @@ static pwg_media_t const cups_pwg_media[] = _PWG_MEDIA_MM("iso_c1_648x917mm", "iso-c1", "EnvC1", 648, 917), _PWG_MEDIA_MM("iso_c0_917x1297mm", "iso-c0", "EnvC0", 917, 1297), _PWG_MEDIA_MM("iso_dl_110x220mm", "iso-designated", "EnvDL", 110, 220), - _PWG_MEDIA_MM("iso_ra4_215x305mm", "iso-ra4", NULL, 215, 305), - _PWG_MEDIA_MM("iso_sra4_225x320mm", "iso-sra4", NULL, 225, 320), - _PWG_MEDIA_MM("iso_ra3_305x430mm", "iso-ra3", NULL, 305, 430), - _PWG_MEDIA_MM("iso_sra3_320x450mm", "iso-sra3", NULL, 320, 450), - _PWG_MEDIA_MM("iso_ra2_430x610mm", "iso-ra2", NULL, 430, 610), - _PWG_MEDIA_MM("iso_sra2_450x640mm", "iso-sra2", NULL, 450, 640), - _PWG_MEDIA_MM("iso_ra1_610x860mm", "iso-ra1", NULL, 610, 860), - _PWG_MEDIA_MM("iso_sra1_640x900mm", "iso-sra1", NULL, 640, 900), - _PWG_MEDIA_MM("iso_ra0_860x1220mm", "iso-ra0", NULL, 860, 1220), - _PWG_MEDIA_MM("iso_sra0_900x1280mm", "iso-sra0", NULL, 900, 1280), + _PWG_MEDIA_MM("iso_ra4_215x305mm", "iso-ra4", "RA4", 215, 305), + _PWG_MEDIA_MM("iso_sra4_225x320mm", "iso-sra4", "SRA4", 225, 320), + _PWG_MEDIA_MM("iso_ra3_305x430mm", "iso-ra3", "RA3", 305, 430), + _PWG_MEDIA_MM("iso_sra3_320x450mm", "iso-sra3", "SRA3", 320, 450), + _PWG_MEDIA_MM("iso_ra2_430x610mm", "iso-ra2", "RA2", 430, 610), + _PWG_MEDIA_MM("iso_sra2_450x640mm", "iso-sra2", "SRA2", 450, 640), + _PWG_MEDIA_MM("iso_ra1_610x860mm", "iso-ra1", "RA1", 610, 860), + _PWG_MEDIA_MM("iso_sra1_640x900mm", "iso-sra1", "SRA1", 640, 900), + _PWG_MEDIA_MM("iso_ra0_860x1220mm", "iso-ra0", "RA0", 860, 1220), + _PWG_MEDIA_MM("iso_sra0_900x1280mm", "iso-sra0", "SRA0", 900, 1280), /* Japanese Standard Sheet Media Sizes */ _PWG_MEDIA_MM("jis_b10_32x45mm", "jis-b10", "B10", 32, 45), @@ -189,7 +188,7 @@ static pwg_media_t const cups_pwg_media[] = _PWG_MEDIA_MM("jis_b2_515x728mm", "jis-b2", "B2", 515, 728), _PWG_MEDIA_MM("jis_b1_728x1030mm", "jis-b1", "B1", 728, 1030), _PWG_MEDIA_MM("jis_b0_1030x1456mm", "jis-b0", "B0", 1030, 1456), - _PWG_MEDIA_MM("jis_exec_216x330mm", NULL, NULL, 216, 330), + _PWG_MEDIA_MM("jis_exec_216x330mm", NULL, "216x330mm", 216, 330), _PWG_MEDIA_MM("jpn_kaku2_240x332mm", NULL, "EnvKaku2", 240, 332), _PWG_MEDIA_MM("jpn_kaku3_216x277mm", NULL, "EnvKaku3", 216, 277), _PWG_MEDIA_MM("jpn_kaku4_197x267mm", NULL, "EnvKaku4", 197, 267), @@ -204,7 +203,7 @@ static pwg_media_t const cups_pwg_media[] = _PWG_MEDIA_MM("jpn_chou3_120x235mm", NULL, "EnvChou3", 120, 235), _PWG_MEDIA_MM("jpn_chou40_90x225mm", NULL, "EnvChou40", 90, 225), _PWG_MEDIA_MM("jpn_oufuku_148x200mm", NULL, "DoublePostcardRotated", 148, 200), - _PWG_MEDIA_MM("jpn_kahu_240x322.1mm", NULL, NULL, 240, 322.1), + _PWG_MEDIA_MM("jpn_kahu_240x322.1mm", NULL, "240x322mm", 240, 322.1), /* Chinese Standard Sheet Media Sizes */ _PWG_MEDIA_MM("prc_32k_97x151mm", NULL, "PRC32K", 97, 151), @@ -215,9 +214,9 @@ static pwg_media_t const cups_pwg_media[] = _PWG_MEDIA_MM("prc_6_120x320mm", NULL, NULL, 120, 320), _PWG_MEDIA_MM("prc_16k_146x215mm", NULL, "PRC16K", 146, 215), _PWG_MEDIA_MM("prc_7_160x230mm", NULL, "EnvPRC7", 160, 230), - _PWG_MEDIA_MM("om_juuro-ku-kai_198x275mm", NULL, NULL, 198, 275), - _PWG_MEDIA_MM("om_pa-kai_267x389mm", NULL, NULL, 267, 389), - _PWG_MEDIA_MM("om_dai-pa-kai_275x395mm", NULL, NULL, 275, 395), + _PWG_MEDIA_MM("om_juuro-ku-kai_198x275mm", NULL, "198x275mm", 198, 275), + _PWG_MEDIA_MM("om_pa-kai_267x389mm", NULL, "267x389mm", 267, 389), + _PWG_MEDIA_MM("om_dai-pa-kai_275x395mm", NULL, "275x395mm", 275, 395), /* Chinese Standard Sheet Media Inch Sizes */ _PWG_MEDIA_IN("roc_16k_7.75x10.75in", NULL, "roc16k", 7.75, 10.75), @@ -236,7 +235,7 @@ static pwg_media_t const cups_pwg_media[] = _PWG_MEDIA_MM("om_small-photo_100x200mm", NULL, "om_wide-photo", 100, 200), /* Disc Sizes */ - _PWG_MEDIA_MM("disc_standard_40x118mm", NULL, NULL, 118, 118) + _PWG_MEDIA_MM("disc_standard_40x118mm", NULL, "Disc", 118, 118) }; @@ -378,11 +377,6 @@ pwgFormatSizeName(char *keyword, /* I - Keyword buffer */ return (1); } -/* For macOS 10.8 and earlier... */ -void _pwgGenerateSize(char *keyword, size_t keysize, const char *prefix, - const char *name, int width, int length) -{ pwgFormatSizeName(keyword, keysize, prefix, name, width, length, NULL); } - /* * 'pwgInitSize()' - Initialize a pwg_size_t structure using IPP Job Template @@ -560,10 +554,6 @@ pwgInitSize(pwg_size_t *size, /* I - Size to initialize */ return (1); } -/* For macOS 10.8 and earlier */ -int _pwgInitSize(pwg_size_t *size, ipp_t *job, int *margins_set) -{ return (pwgInitSize(size, job, margins_set)); } - /* * 'pwgMediaForLegacy()' - Find a PWG media size by ISO/IPP legacy name. @@ -771,6 +761,8 @@ pwgMediaForPPD(const char *ppd) /* I - PPD size name */ * [oe|om]_WIDTHxHEIGHTuu_WIDTHxHEIGHTuu */ + char wstr[32], lstr[32]; /* Width and length as strings */ + size = &(cg->pwg_media); size->width = w; size->length = l; @@ -779,6 +771,12 @@ pwgMediaForPPD(const char *ppd) /* I - PPD size name */ pwgFormatSizeName(cg->pwg_name, sizeof(cg->pwg_name), custom ? "custom" : NULL, custom ? ppd + 7 : NULL, size->width, size->length, NULL); + + if ((w % 635) == 0 && (l % 635) == 0) + snprintf(cg->ppd_name, sizeof(cg->ppd_name), "%sx%s", pwg_format_inches(wstr, sizeof(wstr), w), pwg_format_inches(lstr, sizeof(lstr), l)); + else + snprintf(cg->ppd_name, sizeof(cg->ppd_name), "%sx%smm", pwg_format_millimeters(wstr, sizeof(wstr), w), pwg_format_millimeters(lstr, sizeof(lstr), l)); + size->ppd = cg->ppd_name; } } } @@ -869,6 +867,8 @@ pwgMediaForPWG(const char *pwg) /* I - PWG size name */ if (ptr) { + char wstr[32], lstr[32]; /* Width and length strings */ + if (!strncmp(pwg, "disc_", 5)) w = l; /* Make the media size OUTERxOUTER */ @@ -878,6 +878,12 @@ pwgMediaForPWG(const char *pwg) /* I - PWG size name */ strlcpy(cg->pwg_name, pwg, sizeof(cg->pwg_name)); size->pwg = cg->pwg_name; + + if (numer == 100) + snprintf(cg->ppd_name, sizeof(cg->ppd_name), "%sx%smm", pwg_format_millimeters(wstr, sizeof(wstr), w), pwg_format_millimeters(lstr, sizeof(lstr), l)); + else + snprintf(cg->ppd_name, sizeof(cg->ppd_name), "%sx%s", pwg_format_inches(wstr, sizeof(wstr), w), pwg_format_inches(lstr, sizeof(lstr), l)); + size->ppd = cg->ppd_name; } } } @@ -927,6 +933,7 @@ _pwgMediaNearSize(int width, /* I - Width in hundredths of millimeters * int dw, dl, /* Difference in width and length */ best_dw = 999, /* Best difference in width and length */ best_dl = 999; + char wstr[32], lstr[32]; /* Width and length as strings */ _cups_globals_t *cg = _cupsGlobals(); /* Global data */ @@ -979,6 +986,12 @@ _pwgMediaNearSize(int width, /* I - Width in hundredths of millimeters * cg->pwg_media.width = width; cg->pwg_media.length = length; + if ((width % 635) == 0 && (length % 635) == 0) + snprintf(cg->ppd_name, sizeof(cg->ppd_name), "%sx%s", pwg_format_inches(wstr, sizeof(wstr), width), pwg_format_inches(lstr, sizeof(lstr), length)); + else + snprintf(cg->ppd_name, sizeof(cg->ppd_name), "%sx%smm", pwg_format_millimeters(wstr, sizeof(wstr), width), pwg_format_millimeters(lstr, sizeof(lstr), length)); + cg->pwg_media.ppd = cg->ppd_name; + return (&(cg->pwg_media)); } @@ -1038,8 +1051,8 @@ pwg_compare_pwg(pwg_media_t *a, /* I - First size */ static char * /* O - String */ pwg_format_inches(char *buf, /* I - Buffer */ - size_t bufsize, /* I - Size of buffer */ - int val) /* I - Value in hundredths of millimeters */ + size_t bufsize, /* I - Size of buffer */ + int val) /* I - Value in hundredths of millimeters */ { int thousandths, /* Thousandths of inches */ integer, /* Integer portion */ @@ -1079,8 +1092,8 @@ pwg_format_inches(char *buf, /* I - Buffer */ static char * /* O - String */ pwg_format_millimeters(char *buf, /* I - Buffer */ - size_t bufsize, /* I - Size of buffer */ - int val) /* I - Value in hundredths of millimeters */ + size_t bufsize, /* I - Size of buffer */ + int val) /* I - Value in hundredths of millimeters */ { int integer, /* Integer portion */ fraction; /* Fractional portion */ diff --git a/doc/help/man-client.conf.html b/doc/help/man-client.conf.html index 6febe5e327..16c1919e34 100644 --- a/doc/help/man-client.conf.html +++ b/doc/help/man-client.conf.html @@ -37,7 +37,7 @@ CUPS adds the remote hostname ("name@server.example.com") for you. The default n
ServerName hostname-or-ip-address[:port]
ServerName /domain/socket
Specifies the address and optionally the port to use when connecting to the server. -Note: This directive is not supported on macOS 10.7 or later. +Note: This directive it not supported on macOS 10.7 or later.
ServerName hostname-or-ip-address[:port]/version=1.1
Specifies the address and optionally the port to use when connecting to a server running CUPS 1.3.12 and earlier.
SSLOptions [AllowDH] [AllowRC4] [AllowSSL3] [DenyTLS1.0] diff --git a/doc/help/man-cups-files.conf.html b/doc/help/man-cups-files.conf.html index 7dfcd211db..093ba6f4f4 100644 --- a/doc/help/man-cups-files.conf.html +++ b/doc/help/man-cups-files.conf.html @@ -44,10 +44,6 @@ The default is "0644" on macOS and "0640" on all other operating systems. This is done because printer device URIs sometimes contain sensitive authentication information that should not be generally known on the system. There is no way to disable this security feature.
-
CreateSelfSignedCerts yes -
CreateSelfSignedCerts no -
Specifies whether the scheduler automatically creates self-signed certificates for client connections using TLS. -The default is yes.
DataDir path
Specifies the directory where data files can be found. The default is usually "/usr/share/cups". diff --git a/doc/help/man-cups-lpd.html b/doc/help/man-cups-lpd.html index 7a6b6396dc..e81a01e63d 100644 --- a/doc/help/man-cups-lpd.html +++ b/doc/help/man-cups-lpd.html @@ -94,7 +94,7 @@ program to register the changes to the inetd.conf file. launchd(8), systemd(8), and -xinetd(8). +xinetd(8). Simply enable the cups-lpd service using the corresponding control program. diff --git a/doc/help/man-cupsd.conf.html b/doc/help/man-cupsd.conf.html index 2fae0b7f9d..bfe8e3dbb3 100644 --- a/doc/help/man-cupsd.conf.html +++ b/doc/help/man-cupsd.conf.html @@ -155,10 +155,10 @@ The default is "Yes".
Specifies how long an idle client connection remains open. The default is "30".
<Limit operation ...> ... </Limit> -
Specifies the IPP operations that are being limited inside a Policy section. IPP operation names are listed below in the section "IPP OPERATION NAMES". +
Specifies the IPP operations that are being limited inside a Policy section. IPP operation names are listed below in the section "IPP OPERATIONS".
<Limit method ...> ... </Limit>
<LimitExcept method ...> ... </LimitExcept> -
Specifies the HTTP methods that are being limited inside a Location section. HTTP method names are listed below in the section "HTTP METHOD NAMES". +
Specifies the HTTP methods that are being limited inside a Location section. HTTP method names are listed below in the section "HTTP METHODS".
LimitRequestBody size
Specifies the maximum size of print files, IPP requests, and HTML form data. The default is "0" which disables the limit check. @@ -457,7 +457,7 @@ The following paths are commonly used when configuring
/jobs
The path for all jobs (hold-job, release-job, etc.)
/jobs/id -
The path for the specified job +
The path for the specified job.
/printers
The path for all printers
/printers/name diff --git a/filter/rastertolabel.c b/filter/rastertolabel.c index a082831a31..7483a62a8d 100644 --- a/filter/rastertolabel.c +++ b/filter/rastertolabel.c @@ -1,7 +1,7 @@ /* * Label printer filter for CUPS. * - * Copyright 2007-2015 by Apple Inc. + * Copyright 2007-2016 by Apple Inc. * Copyright 2001-2007 by Easy Software Products. * * These coded instructions, statements, and computer programs are the diff --git a/xcode/CUPS.xcodeproj/project.pbxproj b/xcode/CUPS.xcodeproj/project.pbxproj index 28a97bf52f..60d6f14ed8 100644 --- a/xcode/CUPS.xcodeproj/project.pbxproj +++ b/xcode/CUPS.xcodeproj/project.pbxproj @@ -11045,11 +11045,18 @@ buildSettings = { ASSETCATALOG_COMPRESSION = lossless; CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; + CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; GCC_TREAT_WARNINGS_AS_ERRORS = YES; @@ -11058,6 +11065,7 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_SHADOW = YES; GCC_WARN_SIGN_COMPARE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_LABEL = YES; @@ -11080,10 +11088,17 @@ buildSettings = { ASSETCATALOG_COMPRESSION = "respect-asset-catalog"; CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES; + CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; GCC_TREAT_WARNINGS_AS_ERRORS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -11091,6 +11106,7 @@ GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_SHADOW = YES; GCC_WARN_SIGN_COMPARE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_LABEL = YES;