Closed michaelrsweet closed 13 years ago
CUPS.org User: ozancaglayan
The attached patch is tested and works correctly but it seems that there are a lot of other places in CUPS which are still using strcasecmp() and and strncasecmp().
CUPS.org User: mike
Given the scope of the changes required and the limited time remaining for 1.4.x bugs, I am moving this to CUPS 1.5.
Ultimately it looks like we need to provide "safe" implementations of toupper, tolower, strncasecmp, and strcasecmp. We'll also need to do some performance testing/tuning to make sure those implementations do not cause a regression...
CUPS.org User: mike
Fixed in Subversion repository.
"strcasecmp.patch":
--- cups-1.4.6.orig/cups/string.h +++ cups-1.4.6/cups/string.h @@ -127,11 +127,40 @@ _cups_isupper(int ch) /* I - Character { return (ch >= 'A' && ch <= 'Z'); } + +_CUPS_INLINE int +_cups_tolower(int ch) +{
extern int _cups_isalnum(int ch); extern int _cups_isalpha(int ch); extern int _cups_isspace(int ch); extern int _cups_isupper(int ch); +extern int _cups_tolower(int ch); +extern int _cups_strcasecmp(int ch);
--- cups-1.4.6.orig/cgi-bin/var.c +++ cups-1.4.6/cgi-bin/var.c @@ -608,7 +608,7 @@ cgi_compare_variables( const _cgi_var_t v1, / I - First variable _/ const _cgi_vart *v2) / I - Second variable */ {
"strcasecmp_v2.patch":
--- cups-1.4.6.orig/cups/string.h +++ cups-1.4.6/cups/string.h @@ -127,11 +127,18 @@ _cups_isupper(int ch) /* I - Character { return (ch >= 'A' && ch <= 'Z'); } + +_CUPSINLINE int /* O - Converted character / +_cupstolower(int ch) / I - Character to convert */ +{
extern int _cups_isalnum(int ch); extern int _cups_isalpha(int ch); extern int _cups_isspace(int ch); extern int _cups_isupper(int ch); +extern int _cups_tolower(int ch);
@@ -146,8 +153,8 @@ extern char __cups_strdup(const char *);
-# ifndef HAVE_STRCASECMP extern int _cupsstrcasecmp(const char , const char *); +# ifndef HAVE_STRCASECMP
--- cups-1.4.6.orig/cgi-bin/var.c +++ cups-1.4.6/cgi-bin/var.c @@ -608,7 +608,7 @@ cgi_compare_variables( const _cgi_var_t v1, / I - First variable _/ const _cgi_vart *v2) / I - Second variable */ {
--- cups-1.4.6.orig/cups/string.c +++ cups-1.4.6/cups/string.c @@ -637,16 +637,15 @@ _cups_strdup(const char s) / I - Stri
-#ifndef HAVESTRCASECMP int /* O - Result of comparison (-1, 0, or 1) / _cupsstrcasecmp(const char *s, / I - First string / const char *t) / I - Second string _/ { while (_s != '\0' && *t != '\0') {
else if (_cups_tolower(_s & 255) > _cups_tolower(_t & 255)) return (1);
s ++; @@ -660,7 +659,6 @@ _cups_strcasecmp(const char s, / I - F else return (-1); } -#endif /* !HAVE_STRCASECMP */
/*
"str3800.patch":
--- notifier/mailto.c (revision 9791) +++ notifier/mailto.c (working copy) @@ -453,21 +453,21 @@ return (0); }
else if (!_cups_strcasecmp(line, "Subject")) strlcpy(mailtoSubject, value, sizeof(mailtoSubject)); else {
--- backend/usb-libusb.c (revision 9791) +++ backend/usb-libusb.c (working copy) @@ -558,9 +558,9 @@
if (mfg) {
else if (!_cups_strcasecmp(mfg, "Lexmark International")) mfg = "Lexmark"; } else
--- backend/usb-unix.c (revision 9791) +++ backend/usb-unix.c (working copy) @@ -96,10 +96,10 @@
_cups_strncasecmp(hostname, "Minolta", 7);
if ((device_fd = open_device(uri, &use_bc)) == -1)
--- backend/usb-darwin.c (revision 9791) +++ backend/usb-darwin.c (working copy) @@ -1859,24 +1859,24 @@
if (strncasecmp(pCommentBegin, "%%[ Error:", 10) == 0)
else if (_cups_strncasecmp(pCommentBegin, "%%[ Flushing", 12) == 0)
logLevel = "DEBUG"; else logLevel = "INFO";
--- backend/dnssd.c (revision 9791) +++ backend/dnssd.c (working copy) @@ -235,7 +235,7 @@ kDNSServiceInterfaceIndexLocalOnly, "_printer._tcp", NULL, browse_local_callback, devices);
@@ -325,8 +325,8 @@
if (!best)
best = device;
@@ -573,12 +573,12 @@ for (device = cupsArrayFind(devices, &key); device; device = cupsArrayNext(devices))
_cups_strcasecmp(device->domain, dkey.domain))
{ device = NULL; break; @@ -758,7 +758,7 @@ else continue;
if (!strncasecmp(key, "usb_", 4))
if (!_cups_strncasecmp(key, "usb_", 4))
{ /*
if (!strcasecmp(key, "usb_MFG") || !strcasecmp(key, "usb_MANU") ||
else if (!_cups_strcasecmp(key, "ty")) { strcpy(model, value);
if ((ptr = strchr(model, ',')) != NULL) *ptr = '\0'; }
--- backend/snmp.c (revision 9791) +++ backend/snmp.c (working copy) @@ -467,7 +467,7 @@ compare_cache(snmp_cache_t a, / I - First cache entry _/ snmp_cachet *b) / I - Second cache entry */ {
@@ -509,7 +509,7 @@
@@ -534,11 +534,11 @@ make_model[2] = ' '; strlcpy(make_model + 3, mmptr, make_model_size - 3); }
else if (!_cups_strcasecmp(line, "MaxRunTime"))
MaxRunTime = atoi(value);
else fprintf(stderr, "ERROR: Unknown directive %s on line %d of %s!\n",
--- backend/lpd.c (revision 9791) +++ backend/lpd.c (working copy) @@ -297,16 +297,16 @@
if (!strcasecmp(name, "banner"))
if (!_cups_strcasecmp(name, "banner"))
{ / * Set the banner... /
banner = !value[0] || !strcasecmp(value, "on") ||
else if (!_cups_strcasecmp(name, "mode") && value[0])
{ / * Set control/data order... /
if (!strcasecmp(value, "standard"))
else if (!_cups_strcasecmp(name, "order") && value[0])
{ / * Set control/data order... /
if (!strcasecmp(value, "control,data"))
else if (!_cups_strcasecmp(name, "reserve"))
{ / * Set port reservation mode... /
if (!value[0] || !strcasecmp(value, "on") ||
else if (!_cups_strcasecmp(name, "manual_copies"))
{ / * Set manual copies... /
manual_copies = !value[0] || !strcasecmp(value, "on") ||
else if (!_cups_strcasecmp(name, "sanitize_title"))
{ / * Set sanitize title... /
sanitize_title = !value[0] || !strcasecmp(value, "on") ||
else if (!_cups_strcasecmp(name, "contimeout"))
{ / \ Set the connection timeout...
--- backend/serial.c (revision 9791) +++ backend/serial.c (working copy) @@ -318,7 +318,7 @@
if (!strcasecmp(name, "baud"))
}
else if (!_cups_strcasecmp(name, "parity"))
{ /*
else if (!_cups_strcasecmp(name, "flow"))
{ /*
else if (!_cups_strcasecmp(name, "stop"))
{ switch (atoi(value)) {
--- backend/snmp-supplies.c (revision 9791) +++ backend/snmp-supplies.c (working copy) @@ -471,7 +471,7 @@
if ((ppd = ppdOpenFile(getenv("PPD"))) == NULL || ((ppdattr = ppdFindAttr(ppd, "cupsSNMPSupplies", NULL)) != NULL &&
--- backend/ieee1284.c (revision 9791) +++ backend/ieee1284.c (working copy) @@ -3,7 +3,7 @@ *
if (mfg) {
else if (!_cups_strcasecmp(mfg, "Lexmark International"))
mfg = "Lexmark";
} else @@ -322,7 +322,7 @@ if (!mdl) mdl = "";
@@ -397,7 +397,7 @@ if ((mfg = cupsGetOption("MANUFACTURER", num_values, values)) == NULL) mfg = cupsGetOption("MFG", num_values, values);
--- backend/ipp.c (revision 9791) +++ backend/ipp.c (working copy) @@ -452,39 +452,39 @@
if (!strcasecmp(name, "waitjob"))
if (!_cups_strcasecmp(name, "waitjob"))
{ / * Wait for job completion? /
waitjob = !strcasecmp(value, "on") ||
else if (!_cups_strcasecmp(name, "waitprinter"))
{ / * Wait for printer idle? /
waitprinter = !strcasecmp(value, "on") ||
else if (!_cups_strcasecmp(name, "encryption"))
{ / * Enable/disable encryption? /
if (!strcasecmp(value, "always"))
!_cups_strncasecmp(final_content_type, "image/", 6);
fputs("DEBUG: Sending stdin for job...\n", stderr); } @@ -925,7 +925,7 @@ else if (!printer_accepting) update_reasons(NULL, "+cups-ipp-conformance-failure-report," "cups-ipp-missing-printer-is-accepting-jobs");
+ if ((printer_state = ippFindAttribute(supported, "printer-state-reasons", IPP_TAG_KEYWORD)) != NULL && !busy) @@ -1149,7 +1149,7 @@ if (format_sup != NULL) { for (i = 0; i < format_sup->num_values; i ++)
if (!_cups_strcasecmp(keyword, "true"))
collate_str = "separate-documents-collated-copies"; else collate_str = "separate-documents-uncollated-copies"; @@ -2496,7 +2496,7 @@
if ((ppd = ppdOpenFile(getenv("PPD"))) != NULL && (ppdattr = ppdFindAttr(ppd, "cupsIPPSupplies", NULL)) != NULL &&
ppdattr->value && _cups_strcasecmp(ppdattr->value, "true"))
ipp_supplies = 0; else ipp_supplies = 1;
--- backend/socket.c (revision 9791) +++ backend/socket.c (working copy) @@ -237,16 +237,16 @@
if (!strcasecmp(name, "waiteof"))
if (!_cups_strcasecmp(name, "waiteof"))
{ / * Set the wait-for-eof value... /
waiteof = !value[0] || !strcasecmp(value, "on") ||
else if (!_cups_strcasecmp(name, "contimeout"))
{ / \ Set the connection timeout...
--- config-scripts/cups-common.m4 (revision 9791) +++ config-scripts/cups-common.m4 (working copy) @@ -153,7 +153,7 @@ AC_CHECK_FUNCS(statfs statvfs)
dnl Checks for string functions. -AC_CHECK_FUNCS(strdup strcasecmp strncasecmp strlcat strlcpy) +AC_CHECK_FUNCS(strdup strlcat strlcpy) if test "$uname" = "HP-UX" -a "$uversion" = "1020"; then echo Forcing snprintf emulation for HP-UX. else
--- driver/commandtopclx.c (revision 9791) +++ driver/commandtopclx.c (working copy) @@ -3,7 +3,7 @@ *
--- driver/commandtoescpx.c (revision 9791) +++ driver/commandtoescpx.c (working copy) @@ -3,7 +3,7 @@ *
if (_cups_strncasecmp(lineptr, "Clean", 5) == 0) { /*
cupsWritePrintData("CH\002\000\000\000", 6); }
else if (_cups_strncasecmp(lineptr, "ReportLevels", 12) == 0) { /*
cupsWritePrintData("IQ\001\000\001", 5); }
--- cups/emit.c (revision 9791) +++ cups/emit.c (working copy) @@ -3,7 +3,7 @@
if ((charset = ppdFindAttr(ppd, "cupsPJLCharset", NULL)) != NULL) {
@@ -654,7 +654,7 @@ { if (section == PPD_ORDER_JCL) {
if (!_cups_strcasecmp(choices[i]->choice, "Custom") &&
(coption = ppdFindCustomOption(ppd, choices[i]->option->keyword)) != NULL) { @@ -690,16 +690,16 @@ { bufsize += 3; /* [{\n */
if ((!strcasecmp(choices[i]->option->keyword, "PageSize") ||
!_cups_strcasecmp(choices[i]->choice, "Custom"))
{ DEBUG_puts("2ppdEmitString: Custom size set!");
bufsize += 37; /* %%BeginFeature: *CustomPageSize True\n */
bufsize += 50; /* Five 9-digit numbers + newline */
}
else if (!_cups_strcasecmp(choices[i]->choice, "Custom") &&
(coption = ppdFindCustomOption(ppd,
choices[i]->option->keyword))
!= NULL)
@@ -707,7 +707,7 @@ bufsize += 23 + strlen(choices[i]->option->keyword) + 6; /* %%BeginFeature: Customkeyword True\n /
if (!_cups_strcasecmp(choices[i]->choice, "Custom") &&
choices[i]->code && (coption = ppdFindCustomOption(ppd, choices[i]->option->keyword)) != NULL) @@ -871,9 +871,9 @@ DEBUG_printf(("2ppdEmitString: Adding code for %s=%s...", choices[i]->option->keyword, choices[i]->choice));
if ((!strcasecmp(choices[i]->option->keyword, "PageSize") ||
else if (!_cups_strcasecmp(choices[i]->choice, "Custom") &&
(coption = ppdFindCustomOption(ppd, choices[i]->option->keyword))
!= NULL)
{ @@ -1161,9 +1161,9 @@ if (!rpr) rpr = ppdFindAttr(ppd, "RequiresPageRegion", "All");
(manual_feed && !_cups_strcasecmp(manual_feed->choice, "False") &&
(!input_slot || (input_slot->code && !input_slot->code[0]))) ||
(!rpr && ppd->num_filters > 0)) { @@ -1173,7 +1173,7 @@
ppdMarkOption(ppd, "PageSize", size->name); }
--- cups/custom.c (revision 9791) +++ cups/custom.c (working copy) @@ -78,7 +78,7 @@ for (param = (ppd_cparam_t )cupsArrayFirst(opt->params); param; param = (ppd_cparam_t )cupsArrayNext(opt->params))
if (!_cups_strcasecmp(param->name, name)) break;
return (param);
--- cups/pwg-media.c (revision 9791) +++ cups/pwg-media.c (working copy) @@ -443,7 +443,7 @@ pwg = _pwgMediaForPPD(name); if (pwg && (suffix = name + strlen(name) - 10 /* .FullBleed */) > name &&
!_cups_strcasecmp(suffix, ".FullBleed"))
{ / * Indicate that margins are set with the default values of 0. @@ -586,7 +586,7 @@ struct lconv loc; / Locale data / int custom; / Custom page size? /
if (!_cups_strncasecmp(ppd, "Custom.", 7)) { custom = 1; factor = 2540.0 / 72.0; @@ -608,34 +608,34 @@
if (ptr && (!*ptr ||
!_cups_strcasecmp(ptr, "pt.FullBleed")))
{ size = &(cg->pwg_media);
else if (!_cups_strncasecmp(ptr, "pt", 2)) factor = 2540.0 / 72.0;
/*
--- cups/testcups.c (revision 9791) +++ cups/testcups.c (working copy) @@ -3,7 +3,7 @@ *
@@ -388,12 +388,12 @@ puts(" Item cupsGetDest cupsGetNamedDest"); puts(" -------------------- -------------------- --------------------");
if (_cups_strcasecmp(a->name, b->name)) printf(" name %-20.20s %-20.20s\n", a->name, b->name);
if ((a->instance && !b->instance) || (!a->instance && b->instance) ||
--- cups/util.c (revision 9791) +++ cups/util.c (working copy) @@ -374,7 +374,7 @@ { for (attr = response->attrs; attr != NULL; attr = attr->next) if (attr->name != NULL &&
_cups_strcasecmp(attr->name, "printer-name") == 0 &&
attr->value_tag == IPP_TAG_NAME)
{ if (n == 0) @@ -936,7 +936,7 @@ if (!cg->servername[0]) cupsServer();
if (!_cupsstrcasecmp(cg->servername, "localhost")) { char ppdname[1024]; /* PPD filename / struct stat ppdinfo; /_ PPD file information */ @@ -1056,7 +1056,7 @@
DEBUG_printf(("2cupsGetPPD3: Local hostname=\"%s\"", localhost));
if (!_cups_strcasecmp(localhost, hostname)) strcpy(hostname, "localhost");
/* @@ -1073,7 +1073,7 @@
_cups_strcasecmp(attr->name, "printer-name") == 0 &&
attr->value_tag == IPP_TAG_NAME)
{ if (n == 0) @@ -1725,7 +1725,7 @@ * Found a class! Connect to the right server... */
if (!strcasecmp(http_hostname, host) && *port == http_port)
if (!_cups_strcasecmp(http_hostname, host) && *port == http_port)
http2 = http;
else if ((http2 = httpConnectEncrypt(host, *port,
cupsEncryption())) == NULL)
--- cups/http.c (revision 9791) +++ cups/http.c (working copy) @@ -1056,7 +1056,7 @@ if (!http) return (-1);
@@ -2699,7 +2699,7 @@ * Be tolerants of servers that send unknown attribute fields... */
if (!_cups_strcasecmp(line, "expect")) { /*
http->expect = (http_status_t)atoi(value); }
else if (!_cups_strcasecmp(line, "cookie")) { /*
for (i = 0; i < HTTP_FIELD_MAX; i ++)
if (_cups_strcasecmp(name, http_fields[i]) == 0) return ((http_field_t)i);
return (HTTP_FIELD_UNKNOWN);
--- cups/testi18n.c (revision 9791) +++ cups/testi18n.c (working copy) @@ -171,7 +171,7 @@ for (i = 0, encoding = CUPS_AUTO_ENCODING; i < (int)(sizeof(lang_encodings) / sizeof(lang_encodings[0])); i ++)
--- cups/language.c (revision 9791) +++ cups/language.c (working copy) @@ -668,7 +668,7 @@ for (i = 0; i < (int)(sizeof(locale_encodings) / sizeof(locale_encodings[0])); i ++)
if (!_cups_strcasecmp(charset, locale_encodings[i]))
{ encoding = (cups_encoding_t)i; break; @@ -680,14 +680,14 @@
if (!strcasecmp(charset, "iso-2022-jp") ||
--- cups/http-addrlist.c (revision 9791) +++ cups/http-addrlist.c (working copy) @@ -124,9 +124,9 @@ val = 1;
setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (const char )&val,
setsockopt(_sock, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val));
@@ -278,7 +278,7 @@ } else
struct addrinfo hints, /* Address lookup hints */ @@ -515,7 +515,7 @@
--- cups/ppd.c (revision 9791) +++ cups/ppd.c (working copy) @@ -377,17 +377,17 @@ cups_encodingt /* O - CUPS encoding value / ppdGetEncoding(const char *name) / I - LanguageEncoding string */ {
else if (!_cups_strcasecmp(name, "WindowsANSI")) return (CUPS_WINDOWS_1252); else return (CUPS_UTF8); @@ -906,7 +906,7 @@
goto error; }
if (option && !strcasecmp(option->keyword, keyword + 6))
if (option && !_cups_strcasecmp(option->keyword, keyword + 6))
custom_option = option;
else custom_option = ppdFindOption(ppd, keyword + 6); @@ -1093,7 +1093,7 @@
ppd_add_size(ppd, "Custom");
if (!strcasecmp(name, "PageRegion"))
+ case 3 : /* Two options, one choice... / / * Check for broken constraints like "* Option"... @@ -1771,7 +1771,7 @@ constraint->choice2[0] = '\0'; } break;
+ case 4 : /* Two options, two choices... / / * Check for broken constraints like "* Option"... @@ -2279,7 +2279,7 @@ ppd_compare_attrs(ppd_attr_t a, / I - First attribute _/ ppd_attrt *b) / I - Second attribute */ {
@@ -2303,7 +2303,7 @@ ppd_compare_coptions(ppd_coption_t a, / I - First option _/ ppd_coptiont *b) / I - Second option */ {
@@ -2315,7 +2315,7 @@ ppd_compare_options(ppd_option_t a, / I - First option _/ ppd_optiont *b) / I - Second option */ {
@@ -2549,7 +2549,7 @@
return (NULL);
}
+ if (ppd->num_groups == 0) group = malloc(sizeof(ppd_group_t)); else @@ -3067,7 +3067,7 @@ */
lineptr ++;
+ textptr = text;
while (lineptr != '\0' && lineptr != '\n' && *lineptr != ':') @@ -3090,7 +3090,7 @@ cg->ppd_status = PPD_ILLEGAL_TRANSLATION; return (0); }
--- cups/string-private.h (revision 9791) +++ cups/string-private.h (working copy) @@ -3,7 +3,7 @@ *
/*
-# if defined(WIN32) || defined(EMX) -# define strcasecmp _stricmp -# define strncasecmp _strnicmp
-/*
@@ -82,10 +72,6 @@ /*
extern int _cups_isalnum(int ch); extern int _cups_isalpha(int ch); extern int _cups_isspace(int ch); extern int _cups_isupper(int ch); +extern int _cups_tolower(int ch);
@@ -146,15 +139,9 @@
-# ifndef HAVE_STRCASECMP extern int _cupsstrcasecmp(const char , const char ); -# define strcasecmp _cupsstrcasecmp -# endif / !HAVE_STRCASECMP /
-# ifndef HAVE_STRNCASECMP extern int _cupsstrncasecmp(const char , const char , size_t n); -# define strncasecmp _cupsstrncasecmp -# endif / !HAVE_STRNCASECMP /
extern size_t _cups_strlcat(char , const char , size_t);
--- cups/ipp.c (revision 9791) +++ cups/ipp.c (working copy) @@ -3,7 +3,7 @@ *
if (type == IPP_TAG_LANGUAGE && !_cups_strcasecmp(value, "C")) value = "en";
/ @@ -513,7 +513,7 @@ { if ((int)type & IPP_TAG_COPY) value->string.text = (char )values[i];
else if (type == IPP_TAG_LANGUAGE && !_cups_strcasecmp(values[i], "C"))
{ /*
value_tag = (ipp_tag_t)(attr->value_tag & IPP_TAG_MASK);
if (attr->name != NULL && _cups_strcasecmp(attr->name, name) == 0 && (value_tag == type || type == IPP_TAG_ZERO || (value_tag == IPP_TAG_TEXTLANG && type == IPP_TAG_TEXT) || (value_tag == IPP_TAG_NAMELANG && type == IPP_TAG_NAME)))
--- cups/http-support.c (revision 9791) +++ cups/http-support.c (working copy) @@ -801,7 +801,7 @@ */
for (i = 0; i < 12; i ++)
if (!_cups_strcasecmp(mon, http_months[i])) break;
if (i >= 12) @@ -1001,7 +1001,7 @@ port = 443; else if (!strcmp(scheme, "ipp") || !strcmp(scheme, "ipps")) port = 631;
fds = select(DNSServiceRefSockFD(ref)+1, &input_set, NULL, NULL,
timeout < 0.0 ? NULL : &stimeout);
if (fds < 0)
@@ -1562,14 +1562,14 @@ * comes in, do an additional domain resolution... */
if (domainsent == 0 && (domain && strcasecmp(domain, "local.")))
+ domainref = ref; if (DNSServiceResolve(&domainref, kDNSServiceFlagsShareConnection, 0, hostname, regtype, domain, @@ -1651,7 +1651,7 @@ */
static const char * /* O - New source pointer or NULL on error _/ -http_copydecode(char *dst, / O - Destination buffer _/ +http_copydecode(char *dst, / O - Destination buffer / const char *src, / I - Source pointer / int dstsize, / I - Destination size / const char *term, / I - Terminating characters / @@ -1719,7 +1719,7 @@ /
static char * /* O - End of current URI _/ -http_copyencode(char *dst, / O - Destination buffer _/ +http_copyencode(char *dst, / O - Destination buffer / const char *src, / I - Source pointer / char *dstend, / I - End of destination buffer / const char *reserved, / I - Extra reserved characters */ @@ -1841,7 +1841,7 @@
if ((uribuf->options & _HTTP_RESOLVE_FQDN) && (hostptr = hostTarget + strlen(hostTarget) - 7) > hostTarget &&
!_cups_strcasecmp(hostptr, ".local."))
{ /*
if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
_cups_strcasecmp(hostptr, ".local"))
{ hostTarget = fqdn; break;
--- cups/mark.c (revision 9791) +++ cups/mark.c (working copy) @@ -156,7 +156,7 @@
if (!page_size || !page_size[0]) {
if (!_cups_strncasecmp(s, "Custom.", 7) || ppdPageSize(ppd, s))
ppd_mark_option(ppd, "PageSize", s);
else if ((ppd_keyword = _ppdCacheGetPageSize(cache, NULL, s, NULL)) != NULL)
ppd_mark_option(ppd, "PageSize", ppd_keyword); @@ -241,7 +241,7 @@ }
if (output_bin && !cupsGetOption("OutputBin", num_options, options) &&
(ppd_keyword = _ppdCacheGetOutputBin(cache, output_bin)) != NULL) { /*
for (i = num_options, optptr = options; i > 0; i --, optptr ++)
if (choice[0] == '{' || !_cups_strncasecmp(choice, "Custom.", 7)) choice = "Custom";
for (i = o->num_choices, c = o->choices; i > 0; i --, c ++)
if (!_cups_strcasecmp(c->choice, choice)) return (c);
return (NULL); @@ -464,7 +464,7 @@ for (j = group->num_options, optptr = group->options; j > 0; j --, optptr ++)
if (!_cups_strcasecmp(optptr->keyword, option))
return (optptr);
return (NULL); @@ -726,7 +726,7 @@
for (i = g->num_options, o = g->options; i > 0; i --, o ++)
if (_cups_strcasecmp(o->keyword, "PageRegion") != 0) ppdMarkOption(ppd, o->keyword, o->defchoice);
for (i = g->num_subgroups, sg = g->subgroups; i > 0; i --, sg ++) @@ -786,7 +786,7 @@
@@ -818,7 +818,7 @@
loc = localeconv();
if (!_cups_strcasecmp(option, "PageSize")) { /*
if (units)
{
else if (!_cups_strcasecmp(units, "ft"))
cparam->current.custom_points *= 12.0f * 72.0f;
}
break;
@@ -944,15 +944,15 @@
if (units)
{
if (!_cups_strcasecmp(c->choice, choice))
break;
if (!i) @@ -1001,14 +1001,14 @@ cupsArrayRemove(ppd->marked, oldc); }
if (!_cups_strcasecmp(option, "PageSize") || !_cups_strcasecmp(option, "PageRegion")) { /*
for (j = 0; j < ppd->num_sizes; j ++)
ppd->sizes[j].marked = !_cups_strcasecmp(ppd->sizes[j].name, choice);
/* @@ -1018,7 +1018,7 @@
cupsArraySave(ppd->options);
if (!strcasecmp(option, "PageSize"))
if (!_cups_strcasecmp(option, "PageSize"))
{ if ((o = ppdFindOption(ppd, "PageRegion")) != NULL) { @@ -1045,7 +1045,7 @@
cupsArrayRestore(ppd->options); }
else if (!_cups_strcasecmp(option, "InputSlot")) { /*
cupsArrayRestore(ppd->options); }
!_cups_strcasecmp(choice, "True"))
{ /*
--- cups/dest.c (revision 9791) +++ cups/dest.c (working copy) @@ -248,7 +248,7 @@
return (NULL); }
+ DEBUG_printf(("1_cupsAppleCopyDefaultPrinter: Got locations, %d entries.", (int)CFArrayGetCount(locations)));
@@ -404,12 +404,12 @@ /*
'_cupsAppleSetUseLastPrinter()' - Set whether to use the last used printer. */
-void
+void _cupsAppleSetUseLastPrinter( int uselast) /* O - 1 to use last printer, 0 otherwise */ {
for (i = 0; i < attr->num_values; i ++)
if (_cups_strcasecmp(optname, "media") ||
!cupsGetOption("media", num_options, options))
num_options = cupsAddOption(optname,
cups_make_string(attr, value,
@@ -1178,10 +1178,10 @@ */
for (i = num_dests, dest = dests; i > 0; i --, dest ++)
@@ -1346,7 +1346,7 @@ if (temp && (val = cupsGetOption(option->name, temp->num_options, temp->options)) != NULL &&
!strcasecmp(val, option->value))
!_cups_strcasecmp(val, option->value))
continue;
/*
@@ -1360,7 +1360,7 @@ fprintf(fp, "/%s", dest->instance); wrote = 1; }
+ if (option->value[0]) { if (strchr(option->value, ' ') || @@ -1537,8 +1537,8 @@ CFStringRef key; /* Current network configuration key _/ CFDictionaryRef ipdict; / Network configuration data / CFStringRef network = NULL; / Current network ID */
if ((dynamicStore = SCDynamicStoreCreate(NULL, CFSTR("libcups"), NULL, NULL)) != NULL) { @@ -1742,10 +1742,10 @@ int diff; /* Difference */
if ((diff = strcasecmp(a->name, b->name)) != 0)
if ((diff = _cups_strcasecmp(a->name, b->name)) != 0) return (diff); else if (a->instance && b->instance)
return (strcasecmp(a->instance, b->instance));
return (_cupsstrcasecmp(a->instance, b->instance)); else return ((a->instance && !b->instance) - (!a->instance && b->instance)); } @@ -1868,7 +1868,7 @@ char line[8192], /* Line from file / value, / Value for line / nameptr; /_ Pointer into name */
int linenum; /* Current line */
int linenum; /* Current line */
*namebuf = '\0'; @@ -1879,7 +1879,7 @@
while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum)) {
if (!strcasecmp(line, "default") && value)
if (!_cups_strcasecmp(line, "default") && value) { strlcpy(namebuf, value, namesize);
@@ -1956,7 +1956,7 @@ DEBUG_printf(("9cups_get_dests: linenum=%d line=\"%s\" lineptr=\"%s\"", linenum, line, lineptr));
if ((_cups_strcasecmp(line, "dest") && _cups_strcasecmp(line, "default")) || !lineptr) { DEBUG_puts("9cups_get_dests: Not a dest or default line..."); continue; @@ -2003,10 +2003,10 @@
if (match_name) {
(instance && _cups_strcasecmp(instance, match_inst)))
continue;
dest = *dests; @@ -2053,7 +2053,7 @@
@@ -2068,7 +2068,7 @@
cupsFileClose(fp);
return (num_dests); }
--- cups/auth.c (revision 9791) +++ cups/auth.c (working copy) @@ -195,7 +195,7 @@ cupsUser(), http->hostname[0] == '/' ? "localhost" : http->hostname);
@@ -679,7 +679,7 @@ */
if (!httpAddrLocalhost(http->hostaddr) &&
--- cups/ipp-support.c (revision 9791) +++ cups/ipp-support.c (working copy) @@ -3,7 +3,7 @@ *
for (i = 0; i < (sizeof(ipp_status_oks) / sizeof(ipp_status_oks[0])); i ++)
if (!_cups_strcasecmp(name, "cups-see-other")) return (CUPS_SEE_OTHER);
for (i = 0; i < (sizeof(ipp_status_400s) / sizeof(ipp_status_400s[0])); i ++)
if (!_cups_strcasecmp(name, ipp_status_400s[i])) return ((ipp_status_t)(i + 0x400));
for (i = 0; i < (sizeof(ipp_status_500s) / sizeof(ipp_status_500s[0])); i ++)
if (!_cups_strcasecmp(name, ipp_status_500s[i])) return ((ipp_status_t)(i + 0x500));
for (i = 0; i < (sizeof(ipp_status_1000s) / sizeof(ipp_status_1000s[0])); i ++)
if (!_cups_strcasecmp(name, ipp_status_1000s[i])) return ((ipp_status_t)(i + 0x1000));
return ((ipp_status_t)-1); @@ -639,24 +639,24 @@
for (i = 0; i < (sizeof(ipp_std_ops) / sizeof(ipp_std_ops[0])); i ++)
if (!_cups_strcasecmp(name, "windows-ext")) return (IPP_PRIVATE);
for (i = 0; i < (sizeof(ipp_cups_ops) / sizeof(ipp_cups_ops[0])); i ++)
if (!_cups_strcasecmp(name, ipp_cups_ops[i])) return ((ipp_op_t)(i + 0x4001));
for (i = 0; i < (sizeof(ipp_cups_ops2) / sizeof(ipp_cups_ops2[0])); i ++)
if (!_cups_strcasecmp(name, "CUPS-Add-Printer")) return (CUPS_ADD_MODIFY_PRINTER);
return ((ipp_op_t)-1); @@ -732,30 +732,30 @@
for (i = 0; i < (sizeof(ipp_tag_names) / sizeof(ipp_tag_names[0])); i ++)
--- cups/attr.c (revision 9791) +++ cups/attr.c (working copy) @@ -3,7 +3,7 @@ *
while (attr && strcasecmp(spec, attr->spec))
_cups_strcasecmp(attr->name, name))
attr = NULL; } } @@ -115,7 +115,7 @@
@@ -180,7 +180,7 @@ if ((bufptr = strrchr(buffer, ')')) != NULL) *bufptr = '\0'; }
else if (!_cups_strncasecmp(make_and_model, "XPrint", 6)) { /*
snprintf(buffer, bufsize, "Xerox %s", make_and_model); }
else if (!_cups_strncasecmp(make_and_model, "Eastman", 7)) { /*
snprintf(buffer, bufsize, "Kodak %s", make_and_model + 7); }
else if (!_cups_strncasecmp(make_and_model, "laserwriter", 11)) { /*
snprintf(buffer, bufsize, "Apple LaserWriter%s", make_and_model + 11); }
else if (!_cups_strncasecmp(make_and_model, "colorpoint", 10)) { /*
snprintf(buffer, bufsize, "Seiko %s", make_and_model); }
else if (!_cups_strncasecmp(make_and_model, "fiery", 5)) { /*
snprintf(buffer, bufsize, "EFI %s", make_and_model); }
!_cups_strncasecmp(make_and_model, "colorpass", 9))
{ /*
snprintf(buffer, bufsize, "Canon %s", make_and_model); }
else if (!_cups_strncasecmp(make_and_model, "primera", 7)) { /*
snprintf(buffer, bufsize, "Fargo %s", make_and_model); }
!_cups_strncasecmp(make_and_model, "deskjet", 7))
{ /*
else if (!_cups_strncasecmp(buffer, "Lexmark International", 21)) { /*
_cups_strcpy(buffer + 8, buffer + 21); }
--- cups/usersys.c (revision 9791) +++ cups/usersys.c (working copy) @@ -653,36 +653,36 @@ while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum)) { if (!cups_encryption && cg->encryption == (http_encryption_t)-1 &&
else if (!cups_gssservicename && !_cups_strcasecmp(line, "GSSServiceName") && value) { strlcpy(gss_service_name, value, sizeof(gss_service_name)); @@ -697,11 +697,11 @@
if (cg->encryption == (http_encryption_t)-1 && cups_encryption) {
else if (!_cups_strcasecmp(cups_encryption, "required")) cg->encryption = HTTP_ENCRYPT_REQUIRED; else cg->encryption = HTTP_ENCRYPT_IF_REQUESTED; @@ -781,19 +781,19 @@
if (cups_anyroot)
!_cups_strcasecmp(cups_anyroot, "true");
if (cups_expiredroot)
!_cups_strcasecmp(cups_expiredroot, "true");
if (cups_expiredcerts)
--- cups/ppd-cache.c (revision 9791) +++ cups/ppd-cache.c (working copy) @@ -189,7 +189,7 @@ _cupsSetError(IPP_INTERNALERROR, ("Bad PPD cache file."), 1); goto create_error; }
else if (!_cups_strcasecmp(line, "Filter")) { if (!pc->filters) pc->filters = cupsArrayNew3(NULL, NULL, NULL, 0, @@ -198,7 +198,7 @@
cupsArrayAdd(pc->filters, value); }
else if (!_cups_strcasecmp(line, "PreFilter")) { if (!pc->prefilters) pc->prefilters = cupsArrayNew3(NULL, NULL, NULL, 0, @@ -207,15 +207,15 @@
cupsArrayAdd(pc->prefilters, value); }
else if (!_cups_strcasecmp(line, "Bin")) { if (sscanf(value, "%127s%40s", pwg_keyword, ppd_keyword) != 2) { @@ -314,7 +314,7 @@
pc->num_bins ++; }
else if (!_cups_strcasecmp(line, "Size")) { if (pc->num_sizes >= num_sizes) { @@ -366,7 +366,7 @@
pc->num_sizes ++; }
else if (!_cups_strcasecmp(line, "Source")) { if (sscanf(value, "%127s%40s", pwg_keyword, ppd_keyword) != 2) { @@ -450,7 +450,7 @@
pc->num_sources ++; }
else if (!_cups_strcasecmp(line, "Type")) { if (sscanf(value, "%127s%40s", pwg_keyword, ppd_keyword) != 2) { @@ -499,7 +499,7 @@
pc->num_types ++; }
if (!_cups_strcasecmp(ppd_size->name, "Custom")) continue;
/* @@ -850,33 +850,33 @@ i > 0; i --, choice ++, map ++) {
if (!_cups_strncasecmp(filter, "application/vnd.cups-command", 28) && _cups_isspace(filter[28])) break;
if (!filter && ((ppd_attr = ppdFindAttr(ppd, "cupsCommands", NULL)) == NULL ||
@@ -1289,7 +1289,7 @@ }
if ((ppd_attr = ppdFindAttr(ppd, "cupsSingleFile", NULL)) != NULL)
pc->single_file = !_cups_strcasecmp(ppd_attr->value, "true");
/*
for (i = 0; i < pc->num_bins; i ++)
if (!_cups_strcasecmp(output_bin, pc->bins[i].ppd)) return (pc->bins[i].pwg);
return (NULL); @@ -1491,7 +1491,7 @@ int i; /* Looping var */
for (i = 0; i < pc->num_sources; i ++)
@@ -1545,7 +1545,7 @@ int i; /* Looping var */
for (i = 0; i < pc->num_types; i ++)
@@ -1579,7 +1579,7 @@
for (i = 0; i < pc->num_bins; i ++)
if (!_cups_strcasecmp(output_bin, pc->bins[i].pwg)) return (pc->bins[i].ppd);
return (NULL); @@ -1667,8 +1667,8 @@ DEBUG_printf(("2_ppdCacheGetPageSize: size[%d]=[\"%s\" \"%s\"]", (int)(size - pc->sizes), size->map.pwg, size->map.ppd));
if (!strcasecmp(ppd_name, size->map.ppd) ||
!_cups_strcasecmp(ppd_name, size->map.pwg))
{ if (exact) *exact = 1; @@ -1717,8 +1717,8 @@ closest = NULL; dclosest = 999999999;
_cups_strncasecmp(ppd_name, "custom_", 7))
{ for (i = pc->num_sizes, size = pc->sizes; i > 0; i --, size ++) { @@ -1846,7 +1846,7 @@ if (!pc || !page_size) return (NULL);
else if (!_cups_strcasecmp(ptr, "m")) { w = 100000.0; l = 100000.0; @@ -1914,7 +1914,7 @@ */
for (i = pc->num_sizes, size = pc->sizes; i > 0; i --, size ++)
if (!_cups_strcasecmp(page_size, size->map.ppd)) return (size);
return (NULL); @@ -1943,7 +1943,7 @@ return (NULL);
for (i = pc->num_sources, source = pc->sources; i > 0; i --, source ++)
if (!_cups_strcasecmp(input_slot, source->ppd)) return (source->pwg);
return (NULL); @@ -1972,7 +1972,7 @@ return (NULL);
for (i = pc->num_types, type = pc->types; i > 0; i --, type ++)
if (!_cups_strcasecmp(media_type, type->ppd)) return (type->pwg);
return (NULL); @@ -2173,27 +2173,27 @@ if (!media_source || !name || namesize < PPD_MAX_NAME) return (NULL);
--- cups/testconflicts.c (revision 9791) +++ cups/testconflicts.c (working copy) @@ -3,7 +3,7 @@ *
--- cups/adminutil.c (revision 9791) +++ cups/adminutil.c (working copy) @@ -531,7 +531,7 @@
return (0);
}
+ /*
return (0); }
if ((!strcasecmp(line, "Port") || !strcasecmp(line, "Listen")) && value)
@@ -1008,7 +1008,7 @@ continue; }
&& _value != '/'
@@ -1018,36 +1018,36 @@ ) remote_access = 1; }
else if (!_cups_strcasecmp(line, "<Limit") && in_policy && value)
{ /*
if (!strcasecmp(value, "cancel-job") || !strcasecmp(value, "all"))
&& _value != '/'
@@ -1102,16 +1102,16 @@ { if (in_admin_location) remote_admin = 1;
_cups_strcasecmp(line, "Satisfy"))
cg->cupsd_num_settings = cupsAddOption(line, value,
cg->cupsd_num_settings,
&(cg->cupsd_settings));
@@ -1484,7 +1484,7 @@
while (cupsFileGetConf(cupsd, line, sizeof(line), &value, &linenum)) {
@@ -1620,15 +1620,15 @@ cupsFilePuts(temp, "LogLevel " CUPS_DEFAULT_LOG_LEVEL "\n"); } }
in_default_policy = !_cups_strcasecmp(value, "default");
in_policy = 1;
cupsFilePrintf(temp, "%s %s>\n", line, value); indent += 2; }
else if (!_cups_strcasecmp(line, "")) { indent -= 2; if (!wrote_policy && in_default_policy) @@ -1650,7 +1650,7 @@
cupsFilePuts(temp, "\n"); }
else if (!_cups_strcasecmp(line, "<Location")) { in_location = 1; indent += 2; @@ -1663,7 +1663,7 @@
cupsFilePrintf(temp, "%s %s>\n", line, value); }
else if (!_cups_strcasecmp(line, "")) { in_location = 0; indent -= 2; @@ -1729,50 +1729,50 @@
cupsFilePuts(temp, "\n"); }
+ char valptr; / Pointer into value */
+ in_cancel_job = 2; } else { cupsFilePrintf(temp, "%*s%s", indent, "", line);
+ while (_value) { for (valptr = value; *valptr && !_cups_isspace(_valptr); valptr ++);
+ if (valptr) valptr++ = '\0';
+ in_cancel_job = 1; } else cupsFilePrintf(temp, " %s", value);
+ for (value = valptr; _cups_isspace(*value); value ++); }
+ cupsFilePuts(temp, ">\n"); } } @@ -1781,7 +1781,7 @@
indent += 2; }
@@ -1804,8 +1804,8 @@ else if ((((in_admin_location || in_conf_location || in_root_location) && (remote_admin >= 0 || remote_any > 0)) || (in_root_location && share_printers >= 0)) &&
!_cups_strcasecmp(line, "Order")))
continue; else if (in_cancel_job == 2) continue; @@ -2034,8 +2034,8 @@
for (i = numsettings, setting = settings; i > 0; i --, setting ++) if (setting->name[0] != '' &&
_cups_strcasecmp(setting->name, "Port") && !cupsGetOption(setting->name, cupsd_num_settings, cupsd_settings)) { /* @@ -2254,14 +2254,14 @@
httpGetHostname(http, host, sizeof(host));
if (_cups_strcasecmp(cg->cupsd_hostname, host)) invalidate_cupsd_cache(cg);
snprintf(name, namesize, "%s/cupsd.conf", cg->cups_serverroot); *remote = 0;
--- cups/request.c (revision 9791) +++ cups/request.c (working copy) @@ -657,7 +657,7 @@
--- cups/encode.c (revision 9791) +++ cups/encode.c (working copy) @@ -3,7 +3,7 @@ *
@@ -302,8 +302,8 @@ else if (group_tag != IPP_TAG_PRINTER) continue;
!_cups_strcasecmp(option->value, "false"))
value_tag = IPP_TAG_BOOLEAN; else value_tag = IPP_TAG_NAME; @@ -460,9 +460,9 @@ break;
case IPP_TAG_BOOLEAN :
!_cups_strcasecmp(val, "yes"))
{
/*
* Boolean value - true...
@@ -524,7 +524,7 @@ else attr->values[j].resolution.yres = attr->values[j].resolution.xres;
if (!strcasecmp(s, "dpc"))
--- cups/string.c (revision 9791) +++ cups/string.c (working copy) @@ -3,7 +3,7 @@ *
void _cups_strcpy(char dst, / I - Destination string */
-#ifndef HAVESTRCASECMP int /* O - Result of comparison (-1, 0, or 1) / _cupsstrcasecmp(const char *s, / I - First string */
else if (_cups_tolower(_s) > _cups_tolower(_t)) return (1);
s ++; @@ -629,13 +628,11 @@ else return (-1); } -#endif /* !HAVE_STRCASECMP */
/*
-#ifndef HAVESTRNCASECMP int /* O - Result of comparison (-1, 0, or 1) / _cupsstrncasecmp(const char *s, / I - First string / const char *t, / I - Second string _/ @@ -643,9 +640,9 @@ { while (_s != '\0' && *t != '\0' && n > 0) {
if (tolower(_s & 255) < tolower(_t & 255))
if (_cups_tolower(_s) < _cups_tolower(_t)) return (-1);
else if (tolower(_s & 255) > tolower(_t & 255))
else if (_cups_tolower(_s) > _cups_tolower(_t)) return (1);
s ++; @@ -662,7 +659,6 @@ else return (-1); } -#endif /* !HAVE_STRNCASECMP */
--- cups/page.c (revision 9791) +++ cups/page.c (working copy) @@ -3,7 +3,7 @@ *
* Copyright 2007-2010 by Apple Inc.
if (!strcasecmp(nameptr, "in"))
if (!_cups_strcasecmp(nameptr, "in")) { w = 72.0; l = 72.0; }
else if (!strcasecmp(nameptr, "ft"))
else if (!_cups_strcasecmp(nameptr, "ft")) { w = 12.0 * 72.0; l = 12.0 * 72.0; }
else if (!strcasecmp(nameptr, "mm"))
else if (!_cups_strcasecmp(nameptr, "mm")) { w = 72.0 / 25.4; l = 72.0 / 25.4; }
else if (!strcasecmp(nameptr, "cm"))
else if (!_cups_strcasecmp(nameptr, "cm")) { w = 72.0 / 2.54; l = 72.0 / 2.54; }
else if (!strcasecmp(nameptr, "m"))
else if (!_cups_strcasecmp(nameptr, "m"))
{ w = 72.0 / 0.0254; l = 72.0 / 0.0254; @@ -158,7 +158,7 @@ */
for (i = ppd->num_sizes, size = ppd->sizes; i > 0; i --, size ++)
if (!strcasecmp(name, size->name))
--- cups/snmp.c (revision 9791) +++ cups/snmp.c (working copy) @@ -3,7 +3,7 @@ *
* Copyright 2007-2010 by Apple Inc.
* Copyright 2007-2011 by Apple Inc.
if (!strcasecmp(line, "Community") && value)
if (!_cups_strcasecmp(line, "Community") && value) { strlcpy(cg->snmp_community, value, sizeof(cg->snmp_community)); break; @@ -728,7 +728,7 @@ packet.request_type = request_type; packet.request_id = request_id; packet.object_type = CUPS_ASN1_NULL_VALUE;
+ strlcpy(packet.community, community, sizeof(packet.community));
for (i = 0; oid[i] >= 0 && i < (CUPS_SNMP_MAX_OID - 1); i ++) @@ -963,8 +963,8 @@ } } }
/*
--- cups/testfile.c (revision 9791) +++ cups/testfile.c (working copy) @@ -3,7 +3,7 @@ *
File test program for CUPS. *
Copyright 1997-2007 by Easy Software Products. *
These coded instructions, statements, and computer programs are the @@ -429,7 +429,7 @@ */
unlink("testfile.dat");
/*
@@ -807,7 +807,7 @@ */
+ /*
Return the test status... */
--- cups/conflicts.c (revision 9791) +++ cups/conflicts.c (working copy) @@ -125,7 +125,7 @@ for (i = c->num_constraints, cptr = c->constraints; i > 0; i --, cptr ++)
/* @@ -239,7 +239,7 @@ cupsArraySave(ppd->sorted_attrs);
resolvers = NULL;
while (tries < 100 && @@ -249,7 +249,7 @@ tries ++;
if (!resolvers)
resolvers = cupsArrayNew((cups_array_func_t)_cups_strcasecmp, NULL);
for (consts = (_ppd_cups_uiconsts_t *)cupsArrayFirst(active), changed = 0; consts; @@ -334,20 +334,20 @@ snprintf(firstpage, sizeof(firstpage), "APFIRSTPAGE%s", resoption);
if (option &&
!_cups_strcasecmp(resoption, "PageRegion"))))
continue;
/ @@ -405,11 +405,11 @@ /
if (option &&
!_cups_strcasecmp(constptr->option->keyword, "PageSize"))))
continue;
/* @@ -419,8 +419,8 @@ if ((value = cupsGetOption(constptr->option->keyword, num_newopts, newopts)) == NULL) {
if (!_cups_strncasecmp(value, "Custom.", 7))
value = "Custom";
/*
@@ -450,7 +450,7 @@
test = NULL;
if (strcasecmp(value, constptr->option->defchoice) &&
if (_cups_strcasecmp(value, constptr->option->defchoice) &&
(test = ppd_test_constraints(ppd, constptr->option->keyword,
constptr->option->defchoice,
num_newopts, newopts,
@@ -479,9 +479,9 @@ cupsArrayDelete(test); test = NULL;
if (strcasecmp(value, cptr->choice) &&
_cups_strcasecmp("Custom", cptr->choice) &&
(test = ppd_test_constraints(ppd, constptr->option->keyword,
cptr->choice, num_newopts,
newopts,
@@ -532,7 +532,7 @@
@@ -746,7 +746,7 @@ for (i = ppd->num_groups, installable = ppd->groups; i > 0; i --, installable ++)
if (!_cups_strcasecmp(installable->name, "InstallableOptions")) break;
if (i <= 0) @@ -764,10 +764,10 @@ */
if (i > 1 &&
!_cups_strcasecmp(oldconst[0].choice2, oldconst[1].choice1)) continue;
/* @@ -796,8 +796,8 @@ consts->num_constraints = 2; consts->constraints = constptr;
if (!strncasecmp(option, "Custom", 6) && !strcasecmp(choice, "True"))
if (!_cups_strcasecmp(constptr->option->keyword, option))
break;
if (!strncasecmp(option, "AP_FIRSTPAGE_", 13) &&
@@ -1046,8 +1046,8 @@ constptr->choice ? constptr->choice->choice : ""));
if (constptr->choice &&
!_cups_strcasecmp(constptr->option->keyword, "PageRegion")))
{ / * PageSize and PageRegion are used depending on the selected input slot @@ -1056,8 +1056,8 @@ /
if (option && choice &&
!_cups_strcasecmp(option, "PageRegion")))
{ value = choice; } @@ -1073,12 +1073,12 @@ value = size->name; }
if (value && !strncasecmp(value, "Custom.", 7))
if (value && !_cups_strncasecmp(value, "Custom.", 7))
value = "Custom";
if (option && choice &&
!_cups_strcasecmp(option, "AP_FIRSTPAGE_PageRegion")))
{ firstvalue = choice; } @@ -1087,11 +1087,11 @@ firstvalue = cupsGetOption("AP_FIRSTPAGE_PageRegion", num_options, options);
if (firstvalue && !strncasecmp(firstvalue, "Custom.", 7))
if (firstvalue && !_cups_strncasecmp(firstvalue, "Custom.", 7))
firstvalue = "Custom";
if ((!value || strcasecmp(value, constptr->choice->choice)) &&
(!firstvalue || _cups_strcasecmp(firstvalue, constptr->choice->choice)))
{ DEBUG_puts("9ppd_test_constraints: NO"); break; @@ -1103,9 +1103,9 @@ * Compare against the constrained choice... */
if (option && choice && !strcasecmp(option, constptr->option->keyword))
if (!_cups_strncasecmp(value, "Custom.", 7))
value = "Custom";
} else if (constptr->choice->marked) @@ -1128,9 +1128,9 @@ snprintf(firstpage, sizeof(firstpage), "APFIRSTPAGE%s", constptr->option->keyword);
if (option && choice && !strcasecmp(option, firstpage))
if (!_cups_strncasecmp(firstvalue, "Custom.", 7))
firstvalue = "Custom";
} else @@ -1147,18 +1147,18 @@ DEBUG_printf(("9ppd_test_constraints: value=%s, firstvalue=%s", value, firstvalue));
if ((!value || strcasecmp(value, constptr->choice->choice)) &&
!_cups_strcasecmp(value, "False"))
{ DEBUG_puts("9ppd_test_constraints: NO"); break; @@ -1180,9 +1180,9 @@
if ((marked = (ppd_choice_t *)cupsArrayFind(ppd->marked, &key)) == NULL ||
--- cups/testpwg.c (revision 9791) +++ cups/testpwg.c (working copy) @@ -124,7 +124,7 @@ puts("FAIL (Not Found)"); status = 1; }
--- cups/testppd.c (revision 9791) +++ cups/testppd.c (working copy) @@ -301,9 +301,9 @@ num_options = cupsGetConflicts(ppd, "InputSlot", "Envelope", &options); if (num_options != 2 || (val = cupsGetOption("PageRegion", num_options, options)) == NULL ||
--- cups/options.c (revision 9791) +++ cups/options.c (working copy) @@ -3,7 +3,7 @@ *
DEBUG_printf(("2cupsAddOption(name=\"%s\", value=\"%s\", num_options=%d, " "options=%p)", name, value, num_options, options));
if (!strncasecmp(name, "no", 2))
if (!_cups_strncasecmp(name, "no", 2))
num_options = cupsAddOption(name + 2, "false", num_options,
options);
else @@ -469,7 +469,7 @@ */
for (i = num_options, option = *options; i > 0; i --, option ++)
if (!_cups_strcasecmp(name, option->name)) break;
if (i) @@ -590,7 +590,7 @@ cups_compare_options(cups_option_t a, / I - First option _/ cups_optiont *b) / I - Second option */ {
--- systemv/lpstat.c (revision 9791) +++ systemv/lpstat.c (working copy) @@ -3,7 +3,7 @@ *
case 'W' : /* Show which jobs? */ if (argv[i][2]) which = argv[i] + 2; @@ -517,7 +517,7 @@
for (dptr = name; dptr;) { /
Skip leading whitespace and commas... @@ -756,7 +756,7 @@ }
for (i = 0; i < num_dests; i ++)
if (!_cups_strcasecmp(dests[i].name, printer) && dests[i].instance)
{ if (accepting) cupsLangPrintf(stdout, ("%s/%s accepting requests since %s"), @@ -911,7 +911,7 @@ username, sizeof(username), server, sizeof(server), &port, resource, sizeof(resource));
if (!strcasecmp(server, cupsServer()))
if (!_cups_strcasecmp(server, cupsServer()))
http2 = CUPS_HTTP_DEFAULT; else http2 = httpConnectEncrypt(server, port, cupsEncryption()); @@ -1193,7 +1193,7 @@ printer, device);
for (i = 0; i < num_dests; i ++)
if (!_cups_strcasecmp(printer, dests[i].name) && dests[i].instance)
{ if (device == NULL) _cupsLangPrintf(stdout, @@ -1222,7 +1222,7 @@ printer, device);
for (i = 0; i < num_dests; i ++)
if (!_cups_strcasecmp(printer, dests[i].name) && dests[i].instance)
{ if (device == NULL) cupsLangPrintf(stdout, ("device for %s/%s: %s"), @@ -1883,7 +1883,7 @@ }
for (i = 0; i < num_dests; i ++)
--- systemv/cupstestppd.c (revision 9791) +++ systemv/cupstestppd.c (working copy) @@ -616,7 +616,7 @@ ptr = attr->value; if (*ptr == '4' && ptr[1] == '.') {
+ for (ptr += 2; _ptr; ptr ++) if (!isdigit(_ptr & 255)) break; @@ -697,8 +697,8 @@
if (ppd->manufacturer != NULL) {
!_cups_strncasecmp(ppd->manufacturer, "Hewlett Packard", 15))
{ if (verbose >= 0) { @@ -713,8 +713,8 @@
errors ++; }
!_cups_strncasecmp(ppd->manufacturer, "Oki Data", 8))
{ if (verbose >= 0) { @@ -1194,7 +1194,7 @@
errors ++;
}
if (!strncmp(attr->name, "Default", 7) &&
if (!strncmp(attr->name, "Default", 7) &&
!ppdFindOption(ppd, attr->name + 7))
_cupsLangPrintf(stdout,
_(" WARN %s has no corresponding "
@@ -1380,7 +1380,7 @@ "5.3.")); }
if (!strcasecmp(ppd->pcfilename, "unused.ppd"))
if (!_cups_strcasecmp(ppd->pcfilename, "unused.ppd"))
_cupsLangPuts(stdout,
_(" WARN PCFileName should contain a "
"unique filename.\n"
@@ -1466,7 +1466,7 @@
/*
*/
if (verbose > 1) { @@ -1684,7 +1684,7 @@ else if (eol != EOL_CR) mixed = 1; }
if (!strncasecmp(option, "Custom", 6) && !strcasecmp(choice, "True"))
+ if (!warn) errors ++;
@@ -1885,9 +1885,9 @@ else { for (i = 0; i < o->num_choices; i ++)
_cups_strcasecmp(o->choices[i].choice, "False"))
{
num_options = cupsAddOption(option, o->choices[i].choice,
num_options, &options);
@@ -1942,8 +1942,8 @@
for (i = ppd->num_consts, c = ppd->consts; i > 0; i --, c ++) {
!_cups_strcasecmp(c->choice1, "True"))
{ strcpy(option, c->option1 + 6); strcpy(choice, "Custom"); @@ -1983,8 +1983,8 @@ errors ++; }
if (!strncasecmp(c->option2, "Custom", 6) &&
!_cups_strcasecmp(c->choice2, "True"))
{ strcpy(option, c->option2 + 6); strcpy(choice, "Custom"); @@ -2055,7 +2055,7 @@
for (i = ppd->num_groups, groupa = ppd->groups; i > 1; i --, groupa ++) for (j = i - 1, groupb = groupa + 1; j > 0; j --, groupb ++)
else if (!_cups_strcasecmp(choicea->choice, choiceb->choice))
{ if (!errors && !verbose) cupsLangPuts(stdout, (" FAIL")); @@ -2478,8 +2478,8 @@
+ snprintf(pathprog, sizeof(pathprog), "%s%s", root, attr->value ? attr->value : "(null)");
@@ -3075,7 +3075,7 @@ { snprintf(buf, sizeof(buf), "%s.Fullbleed", pwg_media->ppd); if (strcmp(size->name, buf))
if (!strcasecmp(option->choices[j].choice, "Custom") &&
if (!_cups_strcasecmp(option->choices[j].choice, "Custom") &&
(coption = ppdFindCustomOption(ppd,
option->keyword)) != NULL)
{ @@ -3314,7 +3314,7 @@ errors ++; }
if (strcasecmp(option->keyword, "PageSize"))
if (_cups_strcasecmp(option->keyword, "PageSize"))
{
for (cparam = (ppd_cparam_t *)cupsArrayFirst(coption->params);
cparam;
@@ -3498,9 +3498,9 @@ break;
if (j == 0 ||
@@ -3531,9 +3531,9 @@ break;
if (j == 0 ||
--- systemv/lpadmin.c (revision 9791) +++ systemv/lpadmin.c (working copy) @@ -443,7 +443,7 @@ cupsSetUser(argv[i]); }
+ case 'u' : /* Allow/deny users */ if (argv[i][2]) val = argv[i] + 2; @@ -462,10 +462,10 @@ val = argv[i]; }
+ case 'L' : /* Set the printer-location attribute */ if (argv[i][2]) num_options = cupsAddOption("printer-location", argv[i] + 2, @@ -756,7 +756,7 @@ (members = ippFindAttribute(response, "member-names", IPP_TAG_NAME)) != NULL) for (i = 0; i < members->num_values; i ++)
if (_cups_strcasecmp(printer, members->values[i].string.text) == 0)
{ cupsLangPrintf(stderr, ("lpadmin: Printer %s is already a member of class " @@ -980,7 +980,7 @@ }
for (i = 0; i < members->num_values; i ++)
if (!_cups_strcasecmp(printer, members->values[i].string.text)) break;
if (i >= members->num_values) @@ -1302,10 +1302,10 @@
if ((protocol = cupsGetOption("protocol", num_options, options)) != NULL) {
!_cups_strcasecmp(boolval, "on")) ? "True" : "False");
}
if (!wrote_snmp_supplies && @@ -1438,9 +1438,9 @@ options)) != NULL) { cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n",
!_cups_strcasecmp(boolval, "on")) ? "True" : "False");
}
cupsFileClose(in);
--- systemv/cancel.c (revision 9791) +++ systemv/cancel.c (working copy) @@ -99,7 +99,7 @@ cupsSetUser(argv[i]); } break;
if (op == IPP_PURGE_JOBS && (!user || strcasecmp(user, cupsUser())))
--- systemv/lpoptions.c (revision 9791) +++ systemv/lpoptions.c (working copy) @@ -3,7 +3,7 @@ *
@@ -265,7 +265,7 @@ }
for (j = 0; j < num_options; j ++)
if (!_cups_strcasecmp(options[j].name, option))
{
/*
* Remove this option...
@@ -421,7 +421,7 @@
for (i = group->num_options, option = group->options; i > 0; i --, option ++) {
if (!_cups_strcasecmp(option->keyword, "PageRegion")) continue;
snprintf(buffer, sizeof(buffer), "%s/%s:", option->keyword, option->text); @@ -431,7 +431,7 @@ j > 0 && ptr < (buffer + sizeof(buffer) - 1); j --, choice ++) {
!_cups_strcasecmp(option->keyword, "PageRegion"))
snprintf(ptr, sizeof(buffer) - (ptr - buffer), " %sCustom.WIDTHxHEIGHT", choice->marked ? "*" : ""); else
--- test/ippserver.c (revision 9791) +++ test/ippserver.c (working copy) @@ -1358,7 +1358,7 @@ *ptr++ = '\0'; formats[num_formats++] = ptr;
@@ -1367,17 +1367,17 @@ prefix = "CMD:"; for (i = 0; i < num_formats; i ++) {
@@ -2147,7 +2147,7 @@ regtype, (int)errorCode); return; }
(username && job->username && _cups_strcasecmp(username, job->username))) continue;
if (count > 0) @@ -2883,16 +2883,16 @@
if (!_cups_strcasecmp(client->http.fields[HTTP_FIELD_CONNECTION], "Upgrade")) { if (!respond_http(client, HTTP_NOT_IMPLEMENTED, NULL, 0)) return (0); @@ -3521,8 +3521,8 @@ language ? language->values[0].string.text : "en");
if (charset &&
if (!_cups_strcasecmp(format, supported->values[i].string.text))
break;
if (i >= supported->num_values)
--- test/ipptool.c (revision 9791) +++ test/ipptool.c (working copy) @@ -588,7 +588,7 @@ compare_vars(_cups_var_t a, / I - First variable _/ _cups_vart *b) / I - Second variable */ {
@@ -745,9 +745,9 @@ */
if (get_token(fp, temp, sizeof(temp), &linenum) &&
IgnoreErrors = !_cups_strcasecmp(temp, "yes");
} else { @@ -1006,20 +1006,20 @@
while (get_token(fp, token, sizeof(token), &linenum) != NULL) {
_cups_strcasecmp(token, "WITH-VALUE"))
last_expect = NULL;
if (strcasecmp(token, "IF-DEFINED") &&
_cups_strcasecmp(token, "IF-NOT-DEFINED"))
last_status = NULL;
if (!strcmp(token, "}")) @@ -1102,9 +1102,9 @@ */
if (get_token(fp, temp, sizeof(temp), &linenum) &&
ignore_errors = !_cups_strcasecmp(temp, "yes");
} else { @@ -1115,7 +1115,7 @@
continue; }
else if (!_cups_strcasecmp(temp, "random"))
request_id = (CUPS_RAND() % 1000) * 137 + 1;
else { @@ -1197,9 +1197,9 @@ */
if (get_token(fp, temp, sizeof(temp), &linenum) &&
else if (!_cups_strcasecmp(token, "GROUP"))
{ / \ Attribute group... @@ -1331,7 +1331,7 @@
group = value;
}
if (!_cups_strcasecmp(token, "true"))
ippAddBoolean(request, group, attr, 1);
else
ippAddBoolean(request, group, attr, atoi(token));
@@ -1456,8 +1456,8 @@ }
if (ptr <= token || xres <= 0 || yres <= 0 || !ptr ||
_cups_strcasecmp(ptr, "other")))
{
print_fatal_error("Bad resolution value \"%s\" on line %d.",
token, linenum);
@@ -1465,10 +1465,10 @@ goto test_exit; }
if (!strcasecmp(ptr, "dpi"))
@@ -1795,7 +1795,7 @@ goto test_exit; } }
else if (!_cups_strcasecmp(token, "DISPLAY"))
{ / \ Display attributes... @@ -2264,7 +2264,7 @@ else if (!prev_pass) fprintf(stderr, "%s\n", cupsLastErrorString());
if (!_cups_strcasecmp(token, "true"))
ippAddBoolean(col, IPP_TAG_ZERO, attr, 1);
else
ippAddBoolean(col, IPP_TAG_ZERO, attr, atoi(token));
@@ -2949,18 +2949,18 @@ char units[6]; /* Units */
if (sscanf(token, "%dx%d%5s", &xres, &yres, units) != 3 ||
_cups_strcasecmp(units, "other")))
{
print_fatal_error("Bad resolution value \"%s\" on line %d.",
token, *linenum);
goto col_error;
}
if (!strcasecmp(units, "dpi"))
--- vcnet/config.h (revision 9791) +++ vcnet/config.h (working copy) @@ -86,8 +86,8 @@
-#define CUPS_SVERSION "CUPS v1.5svn" -#define CUPS_MINIMAL "CUPS/1.5svn" +#define CUPS_SVERSION "CUPS v1.5.0" +#define CUPS_MINIMAL "CUPS/1.5.0"
/ @@ -277,8 +277,6 @@ /
-#define HAVE_STRCASECMP 1 -#define HAVE_STRNCASECMP 1 /* #undef HAVESTRLCAT / /_ #undef HAVE_STRLCPY */
--- standards/rfctohtml.c (revision 9791) +++ standards/rfctohtml.c (working copy) @@ -3,7 +3,7 @@ *
These coded instructions, statements, and computer programs are the @@ -132,7 +132,7 @@
if (!line[0]) break;
@@ -385,7 +385,7 @@
put_line(outfile, line);
--- filter/imagetoraster.c (revision 9791) +++ filter/imagetoraster.c (working copy) @@ -3,7 +3,7 @@ *
Collate = _cups_strcasecmp(val, "separate-documents-collated-copies") != 0; }
if ((val = cupsGetOption("Collate", num_options, options)) != NULL &&
_cups_strcasecmp(val, "True") == 0)
Collate = 1;
if ((val = cupsGetOption("gamma", num_options, options)) != NULL) @@ -379,10 +379,10 @@ if ((val = cupsGetOption("scaling", num_options, options)) != NULL) zoom = atoi(val) * 0.01; else if ((val = cupsGetOption("fitplot", num_options, options)) != NULL &&
!_cups_strcasecmp(val, "true"))
zoom = 1.0;
if ((val = cupsGetOption("ppi", num_options, options)) != NULL) @@ -391,47 +391,47 @@
if ((val = cupsGetOption("position", num_options, options)) != NULL) {
!_cups_strcasecmp(val, "yes")))
Flip = 1;
/ @@ -870,7 +870,7 @@ /
if ((choice = ppdFindMarkedChoice(ppd, "PageSize")) != NULL &&
_cups_strcasecmp(choice->choice, "Custom") == 0)
{ float width, /* New width in points / length; / New length in points */
--- filter/pdftops.c (revision 9791) +++ filter/pdftops.c (working copy) @@ -320,8 +320,8 @@ if ((val = cupsGetOption("fitplot", num_options, options)) == NULL) val = cupsGetOption("fit-to-page", num_options, options);
_cups_strcasecmp(val, "false")) fit = 1; else fit = 0; @@ -341,8 +341,8 @@
if ((val = cupsGetOption("landscape", num_options, options)) != NULL) {
--- filter/imagetops.c (revision 9791) +++ filter/imagetops.c (working copy) @@ -3,7 +3,7 @@ *
Collate = _cups_strcasecmp(val, "separate-documents-uncollated-copies") != 0; }
if ((val = cupsGetOption("Collate", num_options, options)) != NULL &&
_cups_strcasecmp(val, "True") == 0)
Collate = 1;
if ((val = cupsGetOption("gamma", num_options, options)) != NULL) @@ -221,10 +221,10 @@ if ((val = cupsGetOption("scaling", num_options, options)) != NULL) zoom = atoi(val) * 0.01; else if ((val = cupsGetOption("fitplot", num_options, options)) != NULL &&
!_cups_strcasecmp(val, "true"))
zoom = 1.0;
if ((val = cupsGetOption("ppi", num_options, options)) != NULL) @@ -233,47 +233,47 @@
if ((val = cupsGetOption("position", num_options, options)) != NULL) {
!_cups_strcasecmp(val, "yes")))
Flip = 1;
if ((val = cupsGetOption("emit-jcl", num_options, options)) != NULL &&
!_cups_strcasecmp(val, "no") || !strcmp(val, "0")))
emit_jcl = 0; else emit_jcl = 1; @@ -512,7 +512,7 @@ */
if ((choice = ppdFindMarkedChoice(ppd, "PageSize")) != NULL &&
--- filter/bannertops.c (revision 9791) +++ filter/bannertops.c (working copy) @@ -3,7 +3,7 @@ *
@@ -267,14 +267,14 @@ cupsArrayAdd(banner->images, strdup(imagefile)); } }
else if (!_cups_strcasecmp(line, "Notice")) { if (!banner->notices) banner->notices = cupsArrayNew(NULL, NULL);
cupsArrayAdd(banner->notices, strdup(ptr)); }
@@ -294,41 +294,41 @@ / * Add the value to the show flags... /
_cups_strcasecmp("OutputOrder", options[j].name))
continue;
showlines ++; @@ -675,23 +675,23 @@
for (j = 0; j < num_options; j ++)
{
_cups_strcasecmp("OutputOrder", options[j].name))
continue;
if (!strcasecmp("landscape", options[j].name))
else if (!_cups_strcasecmp("orientation-requested", options[j].name))
{ switch (atoi(options[j].value)) {
--- filter/commandtops.c (revision 9791) +++ filter/commandtops.c (working copy) @@ -112,11 +112,11 @@
else if (!_cups_strcasecmp(line, "ReportLevels")) report_levels(ppd, argv[2]); else fprintf(stderr, "ERROR: Invalid printer command \"%s\"!\n", line);
--- filter/common.c (revision 9791) +++ filter/common.c (working copy) @@ -95,8 +95,8 @@
if ((val = cupsGetOption("landscape", num_options, options)) != NULL) {
_cups_strcasecmp(val, "false") != 0)
{ if (ppd && ppd->landscape > 0) Orientation = 1;
--- filter/pstops.c (revision 9791) +++ filter/pstops.c (working copy) @@ -500,10 +500,10 @@
@@ -2482,12 +2482,12 @@ * separate-documents-uncollated-copies allows for uncollated copies. */
doc->collate = _cups_strcasecmp(val, "separate-documents-uncollated-copies") != 0; }
if ((val = cupsGetOption("Collate", num_options, options)) != NULL &&
!_cups_strcasecmp(val, "yes")))
doc->collate = 1;
/ @@ -2495,8 +2495,8 @@ /
if ((val = cupsGetOption("emit-jcl", num_options, options)) != NULL &&
!_cups_strcasecmp(val, "no") || !strcmp(val, "0")))
doc->emit_jcl = 0; else doc->emit_jcl = 1; @@ -2510,17 +2510,17 @@ if ((content_type = getenv("CONTENT_TYPE")) == NULL) content_type = "application/postscript";
@@ -2561,8 +2561,8 @@ else val = cupsGetOption("mirror", num_options, options);
!_cups_strcasecmp(val, "yes")))
doc->mirror = 1;
/* @@ -2598,21 +2598,21 @@
if ((val = cupsGetOption("number-up-layout", num_options, options)) != NULL) {
else if (!_cups_strcasecmp(val, "btrl")) doc->number_up_layout = PSTOPS_LAYOUT_BTRL; else { @@ -2631,7 +2631,7 @@
if ((val = cupsGetOption("OutputOrder", num_options, options)) != NULL) {
doc->output_order = !_cups_strcasecmp(attr->value, "Reverse");
}
/* @@ -2655,15 +2655,15 @@
if ((val = cupsGetOption("page-border", num_options, options)) != NULL) {
else if (!_cups_strcasecmp(val, "double-thick")) doc->page_border = PSTOPS_BORDERDOUBLE2; else { @@ -2723,7 +2723,7 @@ doc->slow_collate = 1;
if ((choice = ppdFindMarkedChoice(ppd, "Collate")) != NULL &&
--- filter/textcommon.c (revision 9791) +++ filter/textcommon.c (working copy) @@ -3,7 +3,7 @@ *
if ((val = cupsGetOption("prettyprint", num_options, options)) != NULL &&
!_cups_strcasecmp(val, "yes");
if ((val = cupsGetOption("columns", num_options, options)) != NULL) { @@ -1092,7 +1092,7 @@ }
column ++;
break;
}
/*
--- ppdc/ppdc-driver.cxx (revision 9791) +++ ppdc/ppdc-driver.cxx (working copy) @@ -3,7 +3,7 @@ // // PPD file compiler definitions for the CUPS PPD Compiler. // -// Copyright 2007-2010 by Apple Inc. +// Copyright 2007-2011 by Apple Inc. // Copyright 2002-2006 by Easy Software Products. // // These coded instructions, statements, and computer programs are the @@ -208,7 +208,7 @@
for (g = (ppdcGroup )groups->first(); g; g = (ppdcGroup )groups->next())
if (!_cups_strcasecmp(n, g->name->value)) return (g);
return (0); @@ -241,7 +241,7 @@
for (g = (ppdcGroup )groups->first(); g; g = (ppdcGroup )groups->next()) for (o = (ppdcOption )g->options->first(); o; o = (ppdcOption )g->options->next())
@@ -1148,7 +1148,7 @@ } }
@@ -1181,7 +1181,7 @@ cupsFilePrintf(fp, "*%s.Translation ModelName/%s: \"\"%s", locale->value, locatalog->find_message(a->value->value), lf);
else if (_cups_strncasecmp(model_name->value, manufacturer->value,
strlen(manufacturer->value)))
cupsFilePrintf(fp, "*%s.Translation NickName/%s %s, %s: \"\"%s", locale->value, @@ -1243,7 +1243,7 @@ if (!g->options->count) continue;
if (_cups_strcasecmp(g->name->value, "General")) cupsFilePrintf(fp, "*%s.Translation %s/%s: \"\"%s", locale->value, g->name->value, locatalog->find_message(g->text->value), lf);
--- ppdc/ppdc-group.cxx (revision 9791) +++ ppdc/ppdc-group.cxx (working copy) @@ -3,7 +3,7 @@ // // Group class for the CUPS PPD Compiler. // -// Copyright 2007-2009 by Apple Inc. +// Copyright 2007-2011 by Apple Inc. // Copyright 2002-2005 by Easy Software Products. // // These coded instructions, statements, and computer programs are the @@ -91,7 +91,7 @@
for (o = (ppdcOption )options->first(); o; o = (ppdcOption )options->next())
if (!_cups_strcasecmp(n, o->name->value)) return (o);
return (0);
--- ppdc/ppdc-option.cxx (revision 9791) +++ ppdc/ppdc-option.cxx (working copy) @@ -3,7 +3,7 @@ // // Option class for the CUPS PPD Compiler. // -// Copyright 2007-2009 by Apple Inc. +// Copyright 2007-2011 by Apple Inc. // Copyright 2002-2005 by Easy Software Products. // // These coded instructions, statements, and computer programs are the @@ -100,7 +100,7 @@
for (c = (ppdcChoice )choices->first(); c; c = (ppdcChoice )choices->next())
if (!_cups_strcasecmp(n, c->name->value)) return (c);
return (0);
--- ppdc/ppdmerge.cxx (revision 9791) +++ ppdc/ppdmerge.cxx (working copy) @@ -104,18 +104,18 @@ ppd_status_t status; // PPD open status int curline, // Current line linenum; // Line number
+ + status = ppdLastError(&linenum);
+ cupsLangPrintf(stderr, ("%s: Unable to open PPD file: %s on line %d."), "ppdmerge", ppdErrorString(status), linenum); cupsFileRewind(infile);
+ line[0] = '\0'; curline = 0;
+ while (cupsFileGets(infile, line, sizeof(line))) { curline ++; @@ -128,7 +128,7 @@ cupsFileClose(infile); return (1); }
+ // Figure out the locale... if ((locale = ppd_locale(ppd)) == NULL) { @@ -147,13 +147,13 @@ languages = _ppdGetLanguages(ppd);
if (outname && !strcmp(inname, outname))
+ + snprintf(bckname, sizeof(bckname), "%s.bck", inname);
+ if (rename(inname, bckname)) { _cupsLangPrintf(stderr, @@ -177,7 +177,7 @@ argv[i]); ppdClose(ppd); }
if (!_cups_strncasecmp(ppd->lang_version, languages[i].version, vlen)) { if (ppd->lang_version[vlen] == '-' || ppd->langversion[vlen] == '')
--- ppdc/ppdpo.cxx (revision 9791) +++ ppdc/ppdpo.cxx (working copy) @@ -190,7 +190,7 @@ if (!g->options->count) continue;
if (_cups_strcasecmp(g->name->value, "General")) catalog->add_message(g->text->value);
for (o = (ppdcOption *)g->options->first();
--- ppdc/genstrings.cxx (revision 9791) +++ ppdc/genstrings.cxx (working copy) @@ -7,7 +7,7 @@ // the standard media and sample driver strings. The results are picked up // by GNU gettext and placed in the CUPS message catalog. // -// Copyright 2008-2010 by Apple Inc. +// Copyright 2008-2011 by Apple Inc. // // These coded instructions, statements, and computer programs are the // property of Apple Inc. and are protected by Federal copyright @@ -126,7 +126,7 @@ if (!g->options->count) continue;
if (_cups_strcasecmp(g->name->value, "General")) catalog->add_message(g->text->value);
for (o = (ppdcOption *)g->options->first();
--- ppdc/ppdc-source.cxx (revision 9791) +++ ppdc/ppdc-source.cxx (working copy) @@ -3,7 +3,7 @@ // // Source class for the CUPS PPD Compiler. // -// Copyright 2007-2010 by Apple Inc. +// Copyright 2007-2011 by Apple Inc. // Copyright 2002-2007 by Easy Software Products. // // These coded instructions, statements, and computer programs are the @@ -189,7 +189,7 @@
for (d = (ppdcDriver )drivers->first(); d; d = (ppdcDriver )drivers->next())
if (!_cups_strcasecmp(f, d->pc_file_name->value)) return (d);
return (NULL); @@ -289,7 +289,7 @@ for (cat = (ppdcCatalog )po_files->first(); cat; cat = (ppdcCatalog )po_files->next())
if (!_cups_strcasecmp(l, cat->locale->value)) return (cat);
return (NULL); @@ -307,7 +307,7 @@
for (m = (ppdcMediaSize )sizes->first(); m; m = (ppdcMediaSize )sizes->next())
if (!_cups_strcasecmp(s, m->name->value)) return (m);
return (NULL); @@ -325,7 +325,7 @@
for (v = (ppdcVariable )vars->first(); v; v = (ppdcVariable )vars->next())
if (!_cups_strcasecmp(n, v->name->value)) return (v);
return (NULL); @@ -398,13 +398,13 @@ return (-1); }
if (_cups_strcasecmp(temp, "flip"))
d->attrs->remove(attr);
break; }
if (!_cups_strcasecmp(temp, "flip") && !attr) d->add_attr(new ppdcAttr("cupsFlipDuplex", NULL, NULL, "true"));
for (attr = (ppdcAttr *)d->attrs->first(); @@ -894,11 +894,11 @@ break; }
else if (!_cups_strcasecmp(temp, "Disk")) status = PPDC_FONT_DISK; else { @@ -1530,17 +1530,17 @@ val = (float)strtod(buffer, &ptr);
// Check for a trailing unit specifier...
else if (_cups_strcasecmp(ptr, "pt") && *ptr) return (-1.0f);
return (val); @@ -1589,11 +1589,11 @@ return (NULL); }
else if (!_cups_strcasecmp(type, "Prolog")) section = PPDC_SECTION_PROLOG; else { @@ -2313,7 +2313,7 @@
bytes += cupsFilePrintf(fp, tformat, va_arg(ap, int));
break;
@@ -2659,7 +2659,7 @@ sizes->add(m); } }
@@ -2674,14 +2674,14 @@ po_files->add(cat); } }
!_cups_strcasecmp(temp, "LocAttribute"))
{ ppdcAttr *a; // Attribute
// Get an attribute...
else if (!_cups_strcasecmp(temp, "ColorModel")) { // Get the color model c = get_color_model(fp); @@ -2754,7 +2754,7 @@
o = NULL; }
@@ -2770,7 +2770,7 @@ d->profiles->add(p); } }
@@ -2819,7 +2819,7 @@ if (isdefault) d->set_default_size(m); }
else if (!_cups_strcasecmp(temp, "Cutter")) { // Cutter boolean int have_cutter; // Have a paper cutter? @@ -2846,7 +2846,7 @@
o = NULL; }
else if (!_cups_strcasecmp(temp, "Darkness")) { // Get the darkness choice... c = get_generic(fp, "Darkness", NULL, "cupsCompression"); @@ -2884,7 +2884,7 @@
o = NULL; }
@@ -2903,21 +2903,21 @@ continue;
for (i = 0; i < (int)(sizeof(driver_types) / sizeof(driver_types[0])); i ++)
if (!_cups_strcasecmp(temp, driver_types[i]))
break;
if (i < (int)(sizeof(driver_types) / sizeof(driver_types[0]))) d->type = (ppdcDrvType)i;
@@ -2932,7 +2932,7 @@ d->filters->add(f); } }
else if (!_cups_strcasecmp(temp, "Finishing")) { // Get the finishing choice... c = get_generic(fp, "Finishing", "OutputType", NULL); @@ -2970,8 +2970,8 @@
o = NULL; }
@@ -2984,7 +2984,7 @@ f->release(); else {
else if (!_cups_strcasecmp(temp, "InputSlot")) { // Get the input slot choice... c = get_generic(fp, "InputSlot", NULL, "MediaPosition"); @@ -3037,7 +3037,7 @@ }
// Add the choice to the InputSlot option...
+ if ((o = d->find_option_group("InputSlot", &mg)) == NULL) { // Create the InputSlot option... @@ -3063,7 +3063,7 @@
o = NULL; }
else if (!_cups_strcasecmp(temp, "MediaType")) { // Get the media type choice... c = get_generic(fp, "MediaType", "MediaType", "cupsMediaType"); @@ -3196,7 +3196,7 @@
o = NULL; }
else if (!_cups_strcasecmp(temp, "Resolution")) { // Get the resolution choice... c = get_resolution(fp); @@ -3329,7 +3329,7 @@
o = NULL; }
@@ -3345,7 +3345,7 @@ d->profiles->add(p); } }
@@ -3368,7 +3368,7 @@ d->constraints->add(con); } }
--- ppdc/ppdc.cxx (revision 9791) +++ ppdc/ppdc.cxx (working copy) @@ -80,7 +80,7 @@ src = new ppdcSource(); use_model_name = 0; verbose = 0;
filenames = cupsArrayNew((cups_array_func_t)_cups_strcasecmp, NULL);
for (i = 1; i < argc; i ++) if (argv[i][0] == '-') @@ -213,7 +213,7 @@ case 'v' : // Be verbose... verbose ++; break;
+ case 'z' : // Compress files... comp = 1; break; @@ -237,7 +237,7 @@ opt += strlen(opt) - 1; break; }
+ default : // Unknown usage(); break; @@ -319,7 +319,7 @@ // Write the PPD file for this driver... if (use_model_name) {
if (!_cups_strncasecmp(d->model_name->value, d->manufacturer->value,
strlen(d->manufacturer->value)))
{ // Model name already starts with the manufacturer...
--- ppdc/ppdc-import.cxx (revision 9791) +++ ppdc/ppdc-import.cxx (working copy) @@ -3,7 +3,7 @@ // // PPD file import methods for the CUPS PPD Compiler. // -// Copyright 2007-2010 by Apple Inc. +// Copyright 2007-2011 by Apple Inc. // Copyright 2002-2006 by Easy Software Products. // // These coded instructions, statements, and computer programs are the @@ -101,7 +101,7 @@
// Then add the stuff from the PPD file... if (ppd->modelname && ppd->manufacturer &&
if (!_cups_strcasecmp(size->name, "Custom"))
continue;
// Get the code for the PageSize and PageRegion options... @@ -187,7 +187,7 @@
driver->add_size(csize);
if (!strcasecmp(size_option->defchoice, size->name))
@@ -215,7 +215,7 @@ cchoice = new ppdcChoice(choice->choice, choice->text, choice->code); coption->add_choice(cchoice);
if (!_cups_strcasecmp(option->defchoice, choice->choice))
coption->set_defchoice(cchoice);
}
}
--- config.h.in (revision 9791) +++ config.h.in (working copy) @@ -218,8 +218,6 @@ */
-#undef HAVE_STRCASECMP -#undef HAVE_STRNCASECMP
--- xcode/CUPS.xcodeproj/project.pbxproj (revision 9791) +++ xcode/CUPS.xcodeproj/project.pbxproj (working copy) @@ -1869,9 +1869,9 @@ 72220EB41333050100FCA411 /* libcups */ = { isa = PBXGroup; children = (
--- xcode/config.h (revision 9791) +++ xcode/config.h (working copy) @@ -21,8 +21,8 @@
-#define CUPS_SVERSION "CUPS v1.5svn" -#define CUPS_MINIMAL "CUPS/1.5svn" +#define CUPS_SVERSION "CUPS v1.5.0" +#define CUPS_MINIMAL "CUPS/1.5.0"
/ @@ -216,8 +216,6 @@ /
-#define HAVE_STRCASECMP 1 -#define HAVE_STRNCASECMP 1
--- cgi-bin/search.c (revision 9791) +++ cgi-bin/search.c (working copy) @@ -145,7 +145,7 @@ * Look for logic words: AND, OR */
if (wlen == 3 && !_cups_strncasecmp(qptr, "AND", 3)) { /*
qptr = qend; }
--- cgi-bin/printers.c (revision 9791) +++ cgi-bin/printers.c (working copy) @@ -174,15 +174,15 @@ do_printer_op(http, printer, CUPS_REJECTJOBS, cgiText(("Reject Jobs"))); else if (!strcmp(op, "purge-jobs")) do_printer_op(http, printer, IPP_PURGEJOBS, cgiText(("Purge Jobs")));
else if (!_cups_strcasecmp(op, "move-jobs")) cgiMoveJobs(http, printer, 0); else { @@ -398,7 +398,7 @@ cgiSetVariable("TOTAL", val);
if ((var = cgiGetVariable("ORDER")) != NULL)
--- cgi-bin/template.c (revision 9791) +++ cgi-bin/template.c (working copy) @@ -3,7 +3,7 @@ *
if (!_cups_strncasecmp(s, "<A HREF=\"", 9))
{ fputs("<A HREF=\"", out); s += 9; @@ -684,7 +684,7 @@
fputs("\">", out); }
else if (!_cups_strncasecmp(s, "</A>", 4))
{ fputs("", out); s += 3;
--- cgi-bin/ipp-var.c (revision 9791) +++ cgi-bin/ipp-var.c (working copy) @@ -404,7 +404,7 @@ * If the name is not the same as the current destination, add it! */
if (strcasecmp(name, dest))
if (_cups_strcasecmp(name, dest))
{ cgiSetArray("JOB_PRINTER_URI", i, attr->values[0].string.text); cgiSetArray("JOB_PRINTER_NAME", i, name); @@ -906,12 +906,12 @@
!_cups_strcasecmp(filter->values[0].string.text, filter_value))
break;
if (!filter) @@ -1481,9 +1481,9 @@ first = 0;
if ((var = cgiGetVariable("ORDER")) != NULL)
ascending = !which_jobs || !_cups_strcasecmp(which_jobs, "not-completed");
section = cgiGetVariable("SECTION");
--- cgi-bin/makedocset.c (revision 9791) +++ cgi-bin/makedocset.c (working copy) @@ -3,7 +3,7 @@ *
@@ -183,7 +183,7 @@ compare_sections(_cups_section_t a, / I - First section _/ _cups_sectiont *b) / I - Second section */ {
@@ -201,7 +201,7 @@ if (ret) return (ret); else
@@ -442,7 +442,7 @@
cupsFilePuts(fp, "
+
cupsFilePrintf(fp, "<Node id=\"%d\">\n"
"
--- cgi-bin/help.c (revision 9791) +++ cgi-bin/help.c (working copy) @@ -342,12 +342,12 @@ { if (inbody) {
", 7))
if (!_cups_strncasecmp(line, "</BODY>", 7))
break;
printf("%s\n", line); }
--- cgi-bin/admin.c (revision 9791) +++ cgi-bin/admin.c (working copy) @@ -496,7 +496,7 @@
request = ippNewRequest(IPP_CREATE_PRINTER_SUBSCRIPTION);
else if (!_cups_strncasecmp(make, "stylus", 6))
strcpy(make, "Epson");
else strcpy(make, "Generic"); @@ -1725,7 +1725,7 @@ { val = cupsGetOption("DefaultAuthType", num_settings, settings);
if (!val || !strcasecmp(val, "Negotiate"))
if (!val || !_cups_strcasecmp(val, "Negotiate"))
strlcpy(default_auth_type, "Basic", sizeof(default_auth_type));
else strlcpy(default_auth_type, val, sizeof(default_auth_type)); @@ -1793,14 +1793,14 @@ num_settings, settings));
if (advanced && !changed)
_cups_strcasecmp(max_log_size, current_max_log_size);
if (changed) { @@ -1834,29 +1834,29 @@ * Add advanced settings... */
if (_cups_strcasecmp(max_log_size, current_max_log_size))
num_settings = cupsAddOption("MaxLogSize", max_log_size, num_settings, &settings); } @@ -2379,7 +2379,7 @@ dest = cgiGetArray("PRINTER_NAME", i);
for (j = 0; j < export_count; j ++)
if (!_cups_strcasecmp(dest, cgiGetArray("EXPORT_NAME", j)))
break;
cgiSetArray("PRINTER_EXPORT", i, j < export_count ? "Y" : "");
@@ -2567,7 +2567,7 @@ */
if (device_info && device_make_and_model && device_uri &&
_cups_strcasecmp(device_make_and_model, "unknown") &&
strchr(device_uri, ':'))
{ / @@ -2594,7 +2594,7 @@ * suitable name. /
if (strncasecmp(device_info, "unknown", 7))
if (_cups_strncasecmp(device_info, "unknown", 7))
ptr = device_info;
else if ((ptr = strstr(device_uri, "://")) != NULL)
ptr += 3;
@@ -2712,7 +2712,7 @@ cgiSetVariable("HAVE_GSSAPI", "1");
if ((val = cupsGetOption("DefaultAuthType", num_settings,
settings)) != NULL && !_cups_strcasecmp(val, "Negotiate"))
cgiSetVariable("KERBEROS", "CHECKED"); else
@@ -2769,16 +2769,16 @@ settings)) == NULL) val = "No";
!_cups_strcasecmp(val, "true"))
cgiSetVariable("BROWSE_WEB_IF", "CHECKED");
if ((val = cupsGetOption("PreserveJobHistory", num_settings, settings)) == NULL) val = "Yes";
@@ -2786,8 +2786,8 @@ settings)) == NULL) val = "No";
@@ -3530,9 +3530,9 @@ cparam; cparam = ppdNextCustomParam(coption), m ++) {
@@ -4085,7 +4085,7 @@
return (NULL);
}
--- cgi-bin/var.c (revision 9791) +++ cgi-bin/var.c (working copy) @@ -3,7 +3,7 @@ *
@@ -607,7 +607,7 @@ const _cgi_var_t v1, / I - First variable _/ const _cgi_vart *v2) / I - Second variable */ {
@@ -824,7 +824,7 @@ / \ Copy file data to the temp file...
+ ptr = line;
while ((ch = getchar()) != EOF)
@@ -928,7 +928,7 @@ filename[0] = '\0'; mimetype[0] = '\0'; }
@@ -1234,7 +1234,7 @@ _cupsMD5Init(&md5); _cupsMD5Append(&md5, (unsigned char *)buffer, (int)strlen(buffer));
+ cgiSetCookie(CUPS_SID, httpMD5String(sum, sid), "/", NULL, 0, 0);
return (cupsGetOption(CUPS_SID, num_cookies, cookies));
--- cgi-bin/help-index.c (revision 9791) +++ cgi-bin/help-index.c (working copy) @@ -919,7 +919,7 @@ * Look for "
if (!strncasecmp(ptr, "TITLE>", 6))
_cups_strcasecmp))
help_add_word(node, temp);
} } @@ -1307,7 +1307,7 @@ (diff = strcmp(n1->section, n2->section)) != 0) return (diff);
@@ -1322,7 +1322,7 @@ DEBUG_printf(("help_sort_words(w1=%p(\"%s\"), w2=%p(\"%s\"))\n", w1, w1->text, w2, w2->text));
--- cgi-bin/classes.c (revision 9791)
+++ cgi-bin/classes.c (working copy) @@ -171,9 +171,9 @@ do_class_op(http, pclass, CUPS_REJECTJOBS, cgiText(("Reject Jobs"))); else if (!strcmp(op, "purge-jobs")) do_class_op(http, pclass, IPP_PURGEJOBS, cgiText(("Purge Jobs")));
else if (!_cups_strcasecmp(op, "move-jobs")) cgiMoveJobs(http, pclass, 0); else { @@ -381,7 +381,7 @@ cgiSetVariable("TOTAL", val);
if ((var = cgiGetVariable("ORDER")) != NULL)
--- scheduler/policy.c (revision 9791) +++ scheduler/policy.c (working copy) @@ -3,7 +3,7 @@ *
These coded instructions, statements, and computer programs are the @@ -325,7 +325,7 @@ */
if ((name = (char *)cupsArrayFirst(attrs_ptr)) != NULL &&
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdGetPrivateAttrs: Returning NULL."); @@ -371,7 +371,7 @@ cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdGetPrivateAttrs: name=%s", name);
@@ -397,12 +397,12 @@ if (cupsdCheckGroup(username, pw, acl)) break; }
!_cups_strcasecmp(username, owner))
{
cupsdLogMessage(CUPSD_LOG_DEBUG2, @@ -411,7 +411,7 @@
return (NULL); }
@@ -438,7 +438,7 @@ return (NULL); } }
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdGetPrivateAttrs: Returning NULL."); @@ -480,7 +480,7 @@ compare_policies(cupsd_policy_t a, / I - First policy _/ cupsd_policyt *b) / I - Second policy */ {
--- scheduler/subscriptions.c (revision 9791) +++ scheduler/subscriptions.c (working copy) @@ -748,7 +748,7 @@
while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum)) {
--- scheduler/quotas.c (revision 9791) +++ scheduler/quotas.c (working copy) @@ -3,7 +3,7 @@
_cups_strcasecmp(job->username, q->username) != 0)
continue;
/ @@ -235,7 +235,7 @@ compare_quotas(const cupsd_quota_t q1, / I - First quota record _/ const cupsd_quota_t q2) /_ I - Second quota record */ {
--- scheduler/util.c (revision 9791) +++ scheduler/util.c (working copy) @@ -36,13 +36,13 @@
extern char environ; -#endif / APPLE / +#endif / APPLE /
/*
@@ -91,7 +91,7 @@ else if (!isdigit(_s & 255) && isdigit(_t & 255)) return (-1); else if (!isdigit(_s & 255) || !isdigit(_t & 255))
continue;
if (s < t) diff = -1;
--- scheduler/conf.c (revision 9791) +++ scheduler/conf.c (working copy) @@ -759,7 +759,7 @@
if ((host = gethostbyname(temp)) != NULL) {
if (!DefaultLanguage ||
if (Classification && !_cups_strcasecmp(Classification, "none")) cupsdClearString(&Classification);
if (Classification) @@ -1855,15 +1855,15 @@ mask[4]; /* IP netmask components */
else if (!_cups_strcasecmp(value, "always")) { cupsdLogMessage(CUPSD_LOG_ERROR, "Encryption value \"%s\" on line %d is invalid in this " @@ -1871,9 +1871,9 @@
loc->encryption = HTTP_ENCRYPT_REQUIRED; }
else if (!_cups_strcasecmp(line, "Allow") || !_cups_strcasecmp(line, "Deny")) { /*
while (*value) {
if (!_cups_strncasecmp(value, "from", 4))
{ /*
if (!strcasecmp(value, "all"))
if (!_cups_strcasecmp(value, "all"))
{ /*
else if (!_cups_strcasecmp(value, "none"))
{ /*
else if (!_cups_strcasecmp(value, "basic")) { loc->type = CUPSD_AUTH_BASIC;
if (loc->level == CUPSD_AUTH_ANON) loc->level = CUPSD_AUTH_USER; }
else if (!_cups_strcasecmp(value, "digest")) { loc->type = CUPSD_AUTH_DIGEST;
if (loc->level == CUPSD_AUTH_ANON) loc->level = CUPSD_AUTH_USER; }
else if (!_cups_strcasecmp(value, "basicdigest")) { loc->type = CUPSD_AUTH_BASICDIGEST;
if (loc->level == CUPSD_AUTH_ANON) loc->level = CUPSD_AUTH_USER; }
@@ -2055,7 +2055,7 @@ loc->level = CUPSD_AUTH_USER; }
@@ -2071,13 +2071,13 @@ return (0); } }
@@ -2096,7 +2096,7 @@ "\"Require valid-user\" on line %d.", value, linenum); }
@@ -2105,7 +2105,7 @@ "\"Require user @groupname\" on line %d.", value, linenum); }
@@ -2124,7 +2124,7 @@ return (0); } }
@@ -2133,7 +2133,7 @@ "using \"Require user @%s\" on line %d.", value, value, linenum); }
@@ -2432,23 +2432,23 @@ * Add the protocol to the bitmask... */
@@ -2503,7 +2503,7 @@ * Decode the directive... */
|| !_cups_strcasecmp(line, "SSLPort") || !_cups_strcasecmp(line, "SSLListen")
)
{ @@ -2644,7 +2644,7 @@ lis->fd = -1;
@@ -2669,7 +2669,7 @@
httpAddrFreeList(addrlist);
}
else if (!_cups_strcasecmp(line, "BrowseAddress") && value) { /*
memset(dira, 0, sizeof(cupsd_dirsvc_addr_t));
if (!strcasecmp(value, "@LOCAL"))
!_cups_strcasecmp(line, "BrowseRemoteProtocols"))
{ /*
if (strcasecmp(line, "BrowseLocalProtocols"))
if (!strcasecmp(value, "all"))
if (!_cups_strcasecmp(value, "all"))
{ / * All hosts... /
if (!strcasecmp(line, "BrowseAllow"))
else if (!_cups_strcasecmp(value, "none"))
{ / * No hosts... /
if (!strcasecmp(line, "BrowseAllow"))
if (!_cups_strcasecmp(line, "BrowseAllow"))
cupsdAddIPMask(&(location->allow), ones, zeros);
else
cupsdAddIPMask(&(location->deny), ones, zeros);
@@ -2897,7 +2897,7 @@ * Host or domain name... */
if (!strcasecmp(line, "BrowseAllow"))
if (!_cups_strcasecmp(line, "BrowseAllow"))
cupsdAddNameMask(&(location->allow), value);
else
cupsdAddNameMask(&(location->deny), value);
@@ -2915,7 +2915,7 @@ break; }
if (!strcasecmp(line, "BrowseAllow"))
else if (!_cups_strcasecmp(line, "BrowseRelay") && value) { /*
memset(relay, 0, sizeof(cupsd_dirsvc_relay_t));
if (!strncasecmp(value, "from ", 5))
if (!_cups_strncasecmp(value, "from ", 5))
{ /*
if (!strncasecmp(valueptr, "to ", 3))
if (!strcasecmp(value, "none"))
else @@ -3182,17 +3182,17 @@ } }
if (!value || !strcasecmp(value, "never"))
if (!strcasecmp(value, "off") || !strcasecmp(value, "no") ||
if (!strcasecmp(value, "all"))
if (!strcasecmp(value, "debug2"))
if (!strcasecmp(value, "standard"))
if (!strcasecmp(value, "bsd"))
else if (!_cups_strcasecmp(line, "ServerTokens") && value) { /*
uname(&plat);
if (!strcasecmp(value, "ProductOnly"))
if (!value || !strcasecmp(value, "none"))
else if (!_cups_strcasecmp(value, "noemptyfragments"))
SSLOptions = CUPSD_SSL_NOEMPTY;
else cupsdLogMessage(CUPSD_LOG_ERROR, @@ -3504,7 +3504,7 @@ */
for (i = NUM_VARS, var = variables; i > 0; i --, var ++)
if (!_cups_strcasecmp(line, var->name))
break;
if (i == 0) @@ -3563,17 +3563,17 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Missing boolean value for %s on line %d.", line, linenum);
!_cups_strcasecmp(value, "0"))
*((int *)var->ptr) = FALSE;
else
cupsdLogMessage(CUPSD_LOG_ERROR,
@@ -3651,10 +3651,10 @@
!_cups_strcasecmp(line, "<LimitExcept"))
{ if (!value) { @@ -3699,13 +3699,13 @@ for (value = valptr; isspace(*value & 255); value ++); }
if (!strcasecmp(line, "<LimitExcept"))
if (!_cups_strcasecmp(line, "<LimitExcept"))
loc->limit = CUPSD_AUTH_LIMIT_ALL ^ loc->limit;
parent->limit &= ~loc->limit; }
!_cups_strcasecmp(line, "</LimitExcept>"))
loc = parent; else if (!parse_aaa(loc, line, value, linenum)) { @@ -3768,7 +3768,7 @@
if (!_cups_strcasecmp(line, "")) { if (op) cupsdLogMessage(CUPSD_LOG_WARN, @@ -3779,7 +3779,7 @@
return (linenum); }
else if (!_cups_strcasecmp(line, "<Limit") && !op) { if (!value) { @@ -3805,7 +3805,7 @@
if (num_ops < (int)(sizeof(ops) / sizeof(ops[0])))
{
if (!_cups_strcasecmp(value, "All"))
ops[num_ops] = IPP_ANY_OPERATION;
else if ((ops[num_ops] = ippOpValue(value)) == IPP_BAD_OPERATION) cupsdLogMessage(CUPSD_LOG_ERROR, @@ -3838,7 +3838,7 @@
op = cupsdAddPolicyOp(pol, NULL, ops[0]); }
else if (!_cups_strcasecmp(line, "") && op) { /*
op = NULL; }
!_cups_strcasecmp(line, "SubscriptionPrivateValues"))
{ if (op) { @@ -3890,13 +3890,13 @@
if (!strcasecmp(line, "JobPrivateAccess"))
if (!_cups_strcasecmp(line, "JobPrivateAccess"))
{ / * JobPrivateAccess {all|default|user/group list|@@ACL} /
if (!strcasecmp(value, "default"))
else if (!_cups_strcasecmp(line, "JobPrivateValues"))
{ / * JobPrivateValues {all|none|default|attribute list} /
if (!strcasecmp(value, "default"))
else if (!_cups_strcasecmp(line, "SubscriptionPrivateAccess"))
{ / * SubscriptionPrivateAccess {all|default|user/group list|@@ACL} /
if (!strcasecmp(value, "default"))
else /* if (!_cups_strcasecmp(line, "SubscriptionPrivateValues")) */
{ / * SubscriptionPrivateValues {all|none|default|attribute list} /
if (!strcasecmp(value, "default"))
--- scheduler/testmime.c (revision 9791) +++ scheduler/testmime.c (working copy) @@ -3,7 +3,7 @@ *
(type[0] == '*' || !_cups_strcasecmp(temptype->type, type)))
{ if (desttype != filtertype) {
--- scheduler/cups-driverd.cxx (revision 9791) +++ scheduler/cups-driverd.cxx (working copy) @@ -101,7 +101,7 @@ make_andmodel[128], /* NickName/ModelName / deviceid[256], / IEEE 1284 Device ID / scheme[128]; / PPD scheme */ -} ppd_rec_t; +} ppd_rec_t;
typedef struct /\ In-memory record **/ { @@ -284,7 +284,7 @@ const char datadir; // CUPS_DATADIR env var ppdcSource src; // PPD source file data ppdcDriver *d; // Current driver
if (make && !strcasecmp(ppd->record.make, make))
if (make && !_cups_strcasecmp(ppd->record.make, make))
ppd->matches ++;
if (make_and_model_re && @@ -1188,7 +1188,7 @@ for (i = 0; i < PPD_MAX_PROD; i ++) if (!ppd->record.products[i][0]) break;
if (_cups_strcasecmp(this_make, ppd->record.make)) break;
cupsArrayPrev(matches); @@ -1431,7 +1431,7 @@
if (nick_name) strlcpy(make_model, nick_name->value->value, sizeof(make_model));
else if (_cups_strncasecmp(d->model_name->value, d->manufacturer->value, strlen(d->manufacturer->value))) snprintf(make_model, sizeof(make_model), "%s %s, %s", d->manufacturer->value, d->model_name->value, @@ -1441,7 +1441,7 @@ d->version->value);
if ((cups_fax = d->find_attr("cupsFax", NULL)) != NULL &&
@@ -2071,7 +2071,7 @@ { for (ptr = line + 9; isspace(*ptr & 255); ptr ++);
else if (!_cups_strncasecmp(manufacturer, "Hewlett", 7)) strcpy(manufacturer, "HP");
/* @@ -2216,7 +2216,7 @@ }
for (i = 0; i < (int)(sizeof(languages) / sizeof(languages[0])); i ++)
if (!_cups_strcasecmp(languages[i].version, lang_version))
break;
if (i < (int)(sizeof(languages) / sizeof(languages[0]))) @@ -2434,14 +2434,14 @@
while (*device_id && ptr < (res + sizeof(res) - 6)) {
!_cups_strncasecmp(device_id, "CMD:", 4);
!_cups_strncasecmp(device_id, "MDL:", 4))
{ if (ptr > res) {
--- scheduler/ipp.c (revision 9792) +++ scheduler/ipp.c (working copy) @@ -412,8 +412,8 @@ "attributes-natural-language", NULL, DefaultLanguage);
if (charset &&
_cups_strcasecmp(charset->values[0].string.text, "utf-8"))
{ / * Bad character set... @@ -502,7 +502,7 @@ /
if (!strcmp(username->values[0].string.text, "root") &&
_cups_strcasecmp(con->http.hostname, "localhost") &&
strcmp(con->username, "root"))
{ / @@ -1377,8 +1377,8 @@ /
if (!printer->shared &&
@@ -4463,7 +4463,7 @@ job; job = (cupsd_job_t *)cupsArrayNext(ActiveJobs)) if (job->state_value <= IPP_JOB_PROCESSING &&
!_cups_strcasecmp(job->dest, printer->name))
break;
if (job) @@ -4478,7 +4478,7 @@ job; job = (cupsd_job_t *)cupsArrayNext(ActiveJobs)) if (job->state_value == IPP_JOB_STOPPED &&
!_cups_strcasecmp(job->dest, printer->name))
break;
if (job) @@ -4884,7 +4884,7 @@ break; }
@@ -5533,7 +5533,7 @@ case IPP_TAG_KEYWORD : case IPP_TAG_CHARSET : case IPP_TAG_LANGUAGE :
if (!_cups_strcasecmp(banner->filetype->type, "postscript"))
{
/*
* Need to quote strings for PS banners...
@@ -7798,7 +7798,7 @@ continue; }
if (username[0] && strcasecmp(username, job->username))
if (username[0] && _cups_strcasecmp(username, job->username))
continue;
if (count > 0) @@ -8506,7 +8506,7 @@ if ((!type || (printer->type & CUPS_PRINTER_CLASS) == type) && (printer->type & printer_mask) == printer_type && (!location ||
@@ -9198,7 +9198,7 @@ * completed... */
@@ -9497,9 +9497,9 @@
!_cups_strcasecmp(filetype->type, "pdf")))
read_job_ticket(con);
/* @@ -12044,7 +12044,7 @@ if (cupsdCheckGroup(username, pw, name)) break; }
--- scheduler/cert.c (revision 9791) +++ scheduler/cert.c (working copy) @@ -3,7 +3,7 @@ *
--- scheduler/auth.c (revision 9791) +++ scheduler/auth.c (working copy) @@ -252,7 +252,7 @@ "cupsdAddNameMask(masks=%p(%p), name=\"%s\")", masks, *masks, name);
else if (!strncmp(authorization, "AuthRef ", 8) &&
else if (!strncmp(authorization, "Local", 5) &&
!_cups_strcasecmp(con->http.hostname, "localhost"))
{ /*
if (!strcasecmp(name, mask->mask.name.name))
if (!_cups_strcasecmp(name, mask->mask.name.name))
return (1);
/*
@@ -1395,7 +1395,7 @@
if (name_len >= mask->mask.name.length && mask->mask.name.name[0] == '.' &&
!_cups_strcasecmp(name + name_len - mask->mask.name.length,
mask->mask.name.name))
return (1);
break;
@@ -1465,7 +1465,7 @@ */
for (i = 0; group->gr_mem[i]; i ++)
@@ -1714,7 +1714,7 @@ */
if (loc->length > bestlen && loc->location &&
!_cups_strncasecmp(uri, loc->location, loc->length) &&
loc->location[0] == '/' && (limit & loc->limit) != 0) { @@ -1904,7 +1904,7 @@ */
if ((best->encryption >= HTTP_ENCRYPT_REQUIRED && !con->http.tls &&
@@ -2100,7 +2100,7 @@ "cupsdIsAuthorized: Checking group \"%s\" membership...", name);
if (!_cups_strcasecmp(name, "@SYSTEM")) { for (i = 0; i < NumSystemGroups; i ++) if (cupsdCheckGroup(username, pw, SystemGroups[i]))
--- scheduler/printers.c (revision 9791) +++ scheduler/printers.c (working copy) @@ -971,8 +971,8 @@
!_cups_strcasecmp(line, "<DefaultPrinter"))
{ /*
if (!strcasecmp(line, "<DefaultPrinter"))
}
if (value && !strcasecmp(value, "idle"))
@@ -1163,7 +1163,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); }
else if (!_cups_strcasecmp(line, "Accepting")) { /*
if (value &&
else if (!_cups_strcasecmp(line, "Shared")) { /*
if (value &&
@@ -1356,9 +1356,9 @@ cupsdSetPrinterAttr(p, value, valueptr); } }
_cups_strcasecmp(line, "Product"))
{ /*
if (!_cups_strcasecmp(hostname, "localhost")) strlcpy(hostname, ServerName, sizeof(hostname));
strlcpy(localname, hostname, sizeof(localname));
if (!_cups_strcasecmp(hostname, ServerName)) { /*
while (lptr != NULL) {
if (!_cups_strcasecmp(type->super, "printer")) continue;
snprintf(mimetype, sizeof(mimetype), "%s/%s", type->super, type->type); @@ -3800,20 +3800,20 @@ type; type = (mime_type_t *)cupsArrayNext(p->filetypes)) {
@@ -4031,7 +4031,7 @@ if (!ppd->manual_copies) p->type |= CUPS_PRINTER_COPIES; if ((ppd_attr = ppdFindAttr(ppd, "cupsFax", NULL)) != NULL)
if (ppd_attr->value && !_cups_strcasecmp(ppd_attr->value, "true"))
p->type |= CUPS_PRINTER_FAX;
ippAddBoolean(p->ppd_attrs, IPP_TAG_PRINTER, "color-supported", @@ -4452,10 +4452,10 @@ } else if (((ppd_attr = ppdFindAttr(ppd, "DefaultOutputOrder", NULL)) != NULL &&
!_cups_strcasecmp(ppd->manufacturer, "lexmark"))))
{ /*
if (!strcasecmp(duplex->defchoice, "DuplexTumble"))
else if (!_cups_strcasecmp(duplex->defchoice, "DuplexNoTumble"))
ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "sides-default", NULL, "two-sided-long-edge"); else @@ -4663,10 +4663,10 @@ p->type |= CUPS_PRINTER_SMALL;
if ((ppd_attr = ppdFindAttr(ppd, "APICADriver", NULL)) != NULL &&
--- scheduler/job.c (revision 9791) +++ scheduler/job.c (working copy) @@ -745,11 +745,11 @@ banner_page = 0; else if (job->job_sheets == NULL) banner_page = 0;
if (job->dest && !_cups_strcasecmp(job->dest, dest)) count ++;
return (count); @@ -1451,7 +1451,7 @@ for (job = (cupsd_job_t )cupsArrayFirst(ActiveJobs), count = 0; job; job = (cupsd_job_t )cupsArrayNext(ActiveJobs))
if (!_cups_strcasecmp(job->username, username)) count ++;
return (count); @@ -3436,11 +3436,11 @@ !strncmp(attr->name, "number-up", 9) || !strcmp(attr->name, "page-ranges") || !strcmp(attr->name, "page-set") ||
!_cups_strcasecmp(attr->name, "com.apple.print.PrintSettings."
"PMTotalBeginPages..n.")) &&
banner_page) continue; @@ -3708,12 +3708,12 @@
while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum)) {
@@ -3790,7 +3790,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value on line %d!", linenum); continue; }
@@ -3799,27 +3799,27 @@ else if (job->state_value > IPP_JOB_COMPLETED) job->state_value = IPP_JOB_COMPLETED; }
@@ -3855,7 +3855,7 @@ } } }
else if (!_cupsstrcasecmp(line, "File")) { int number, /* File number / compression; /_ Compression value */ @@ -3951,7 +3951,7 @@
while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum)) {
if (!_cups_strcasecmp(line, "NextJobId")) { if (value) { @@ -4342,7 +4342,7 @@
if (job->sheets) {
if (!_cups_strncasecmp(message, "total ", 6))
{ /*
--- scheduler/cups-deviced.c (revision 9791) +++ scheduler/cups-deviced.c (working copy) @@ -457,10 +457,10 @@
if ((diff = cupsdCompareNames(d0->device_info, d1->device_info)) != 0) return (diff);
--- scheduler/cups-lpd.c (revision 9791) +++ scheduler/cups-lpd.c (working copy) @@ -3,7 +3,7 @@ *
These coded instructions, statements, and computer programs are the @@ -574,7 +574,7 @@ }
if (info_attr && name_attr &&
if ((_cups_strcasecmp(line, "Dest") && _cups_strcasecmp(line, "Default")) || !value) continue;
/*
@@ -686,7 +686,7 @@
if (!_cups_strcasecmp(value, name)) { num_options = cupsParseOptions(optptr, num_options, options); break;
--- scheduler/client.c (revision 9791) +++ scheduler/client.c (working copy) @@ -918,8 +918,8 @@ */
if (strcmp(scheme, "file") &&
_cups_strcasecmp(hostname, "localhost") &&
!isdigit(hostname[0]) && hostname[0] != '[')
{ /* @@ -1076,10 +1076,10 @@
cupsdAuthorize(con);
else if (!_cups_strncasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "close", 5)) con->http.keep_alive = HTTP_KEEPALIVE_OFF;
if (!con->http.fields[HTTP_FIELD_HOST][0] && @@ -1128,7 +1128,7 @@ } }
if (!strcasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "Upgrade") &&
@@ -1200,7 +1200,7 @@ } else {
if (!_cups_strcasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "Upgrade") &&
con->http.tls == NULL) {
@@ -2372,7 +2372,7 @@
if (code == HTTP_UNAUTHORIZED && DefaultEncryption == HTTP_ENCRYPT_REQUIRED &&
_cups_strcasecmp(con->http.hostname, "localhost") &&
!con->http.tls) { code = HTTP_UPGRADE_REQUIRED; @@ -2600,7 +2600,7 @@
if (con->best && auth_type != CUPSD_AUTH_NEGOTIATE &&
if (SystemGroupAuthKey) @@ -2813,7 +2813,7 @@ * Handle redirection and CGI status codes... */
if (!strncasecmp(con->header, "Location:", 9))
else if (!_cups_strncasecmp(con->header, "Status:", 7))
{
cupsdSendError(con, (http_status_t)atoi(con->header + 7),
CUPSD_AUTH_NONE);
@@ -2850,7 +2850,7 @@ } }
if (strncasecmp(con->header, "Status:", 7))
if (_cups_strncasecmp(con->header, "Status:", 7))
httpPrintf(HTTP(con), "%s\r\n", con->header);
/*
@@ -3035,7 +3035,7 @@ while (isspace(ptr) || ptr == ';') ptr ++;
!_cups_strncasecmp(host, "localhost.localdomain:", 22) ||
!strcmp(host, "127.0.0.1") ||
!strncmp(host, "127.0.0.1:", 10) ||
@@ -4993,8 +4993,8 @@ */
if ((end = strrchr(host, '.')) != NULL &&
@@ -5043,7 +5043,7 @@ if (!strcmp(a->name, "*")) return (1);
if (!_cups_strncasecmp(host, netif->hostname, netif->hostlen)) { /*
--- scheduler/cupsfilter.c (revision 9791) +++ scheduler/cupsfilter.c (working copy) @@ -46,7 +46,7 @@
-#endif /* APPLE / +#endif / APPLE */
/* @@ -435,7 +435,7 @@ }
sscanf(dsttype, "%15[^/]/%255s", super, type);
(type[0] == '*' || !_cups_strcasecmp(temptype->type, type)))
{ if (desttype != filtertype) { @@ -818,7 +818,7 @@
/*
@@ -1362,15 +1362,15 @@
while (cupsFileGetConf(fp, line, sizeof(line), &ptr, &linenum))
{
--- scheduler/type.c (revision 9791) +++ scheduler/type.c (working copy) @@ -715,8 +715,8 @@ int i; /* Result of comparison */
i = _cups_strcasecmp(t0->type, t1->type);
return (i); } @@ -917,7 +917,7 @@ if ((rules->offset + rules->length) > (fb->offset + fb->length)) result = 0; else
--- scheduler/banners.c (revision 9791) +++ scheduler/banners.c (working copy) @@ -3,7 +3,7 @@ *
--- scheduler/dirsvc.c (revision 9791) +++ scheduler/dirsvc.c (working copy) @@ -171,7 +171,7 @@ static char dnssdPackTxtRecord(int txt_len, char *keyvalue[][2], int count); static void dnssdRegisterCallback(DNSServiceRef sdRef,
-#ifdef HAVE_LIBSLP +#ifdef HAVE_LIBSLP /*
-/* +/*
@@ -235,7 +235,7 @@
/*
!_cups_strcasecmp(line, "<DefaultPrinter"))
{ /*
if (!strcasecmp(line, "<DefaultPrinter"))
!_cups_strcasecmp(line, "<DefaultClass"))
{ /*
if (!strcasecmp(line, "<DefaultClass"))
if (value && !strcasecmp(value, "idle"))
else if (!_cups_strcasecmp(line, "Accepting")) { /*
if (value &&
else rc = ldap_initialize(&TempBrowseLDAPHandle, BrowseLDAPServer);
@@ -1323,7 +1323,7 @@ bval.bv_val = BrowseLDAPPassword; bval.bv_len = (BrowseLDAPPassword == NULL) ? 0 : strlen(BrowseLDAPPassword);
if ((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_SLP) {
@@ -1843,7 +1843,7 @@ if (((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_SLP) && BrowseSLPHandle) {
@@ -2106,7 +2106,7 @@
-#ifdef HAVE_LIBSLP +#ifdef HAVE_LIBSLP /*
'cupsdUpdateSLPBrowse()' - Get browsing information via SLP. */ @@ -2211,7 +2211,7 @@
BrowseSLPRefresh = time(NULL) + BrowseInterval;
@@ -2232,7 +2232,7 @@
next = s->next;
@@ -2264,7 +2264,7 @@ cupsdClearString(&p.make_model);
free(s);
@@ -2373,7 +2373,7 @@ if (for_lpd) strlcpy(rp_str, p->name, sizeof(rp_str)); else
snprintf(rp_str, sizeof(rp_str), "%s/%s", (p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers", p->name);
keyvalue[i ][0] = "ty"; @@ -2474,7 +2474,7 @@ dnssdComparePrinters(cupsd_printer_t a,/ I - First printer _/ cupsd_printert *b)/ I - Second printer */ {
@@ -2560,7 +2560,7 @@ return (NULL);
for (length = i = 0; i < count; i++)
length += 1 + strlen(keyvalue[i][0]) + (keyvalue[i][1] ? 1 + strlen(keyvalue[i][1]) : 0);
/* @@ -2628,11 +2628,11 @@
if (errorCode) {
-static void +static void dnssdRegisterPrinter(cupsd_printer_t p)/ I - Printer / { DNSServiceErrorType se; / dnssd errors */ @@ -2756,7 +2756,7 @@
regtype = (p->type & CUPS_PRINTER_FAX) ? "_fax-ipp._tcp" : DNSSDRegType;
@@ -2853,14 +2853,14 @@ p->printer_ref = NULL; }
+ if (!p->printer_ref) { / * Initial registration... /
@@ -3066,13 +3066,13 @@
*ptr++ = '\0';
if (!_cups_strcasecmp(line, name))
{ / * Found the service, see if it is set to "-NO-"... /
if (!_cups_strcasecmp(host, ServerName) && port == LocalPort) return (1);
cupsdNetIFUpdate(); @@ -3126,7 +3126,7 @@ for (iface = (cupsd_netif_t )cupsArrayFirst(NetIFList); iface; iface = (cupsd_netif_t )cupsArrayNext(NetIFList))
if (!_cups_strcasecmp(host, iface->hostname) && port == iface->port) return (1);
/* @@ -3266,7 +3266,7 @@
while (hptr != NULL) {
if (!_cups_strcasecmp(hptr, sptr))
{ *hptr = '\0'; break; @@ -3337,7 +3337,7 @@
if (p->type & CUPS_PRINTER_IMPLICIT) p = NULL; /* Don't replace implicit classes */
else if (p->hostname && _cups_strcasecmp(p->hostname, host))
{ /*
cupsdExpireSubscriptions(p, NULL);
+ cupsdDeletePrinter(p, 1); cupsdUpdateImplicitClasses(); cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP | CUPSD_DIRTY_REMOTE); @@ -3637,7 +3637,7 @@ cupsArraySave(Printers);
if (len > 0 &&
if (pclass && strcasecmp(pclass->name, name))
+ mods[0].mod_type = "ou"; mods[0].mod_values = ou_value; mods[1].mod_type = "description"; @@ -4541,7 +4541,7 @@ } } }
else { /*
/*
@@ -4896,7 +4896,7 @@
/*
static SLPBoolean /* O - SLP_TRUE for success */ @@ -4947,7 +4947,7 @@
-static void +static void slp_dereg_printer(cupsd_printer_t p) / I - Printer _/ { char srvurl[HTTP_MAXURI]; / Printer service URI _/ @@ -4958,7 +4958,7 @@ if (!(p->type & CUPS_PRINTERREMOTE)) { /
@@ -5083,7 +5083,7 @@
strlcpy(s->url, srvurl, sizeof(s->url));
@@ -5131,7 +5131,7 @@ */
srclen = sizeof(srcaddr);
if ((bytes = recvfrom(BrowseSocket, packet, sizeof(packet) - 1, 0, (struct sockaddr )&srcaddr, &srclen)) < 0) { / @@ -5205,7 +5205,7 @@
if (BrowseACL) {
--- scheduler/classes.c (revision 9791) +++ scheduler/classes.c (working copy) @@ -3,7 +3,7 @@
!_cups_strcasecmp(line, "<DefaultClass"))
{ /*
if (!strcasecmp(line, "<DefaultClass"))
if (!strcasecmp(value, "idle"))
@@ -486,7 +486,7 @@ "Syntax error on line %d of classes.conf.", linenum); }
else if (!_cups_strcasecmp(line, "Accepting")) { /*
if (value &&
else if (!_cups_strcasecmp(line, "Shared")) { /*
if (value &&
Version: 1.5-current CUPS.org User: ozancaglayan
When the Accept-Language HTTP header is set to Turkish, CUPS web interface is unable to substitute the templates (device_uri and title for example) which includes the "iI" characters because of locale-dependent case conversion mechanism.
So the case conversions should be done as a locale independent manner to avoid these kind of issues.
See http://www.mattryall.net/blog/2009/02/the-infamous-turkish-locale-bug for a quick explanation of the problem in general.