if ((ptr = strchr(line, ':')) == NULL)
{
snprintf(line, sizeof(line),
- _cupsLangString(language, _("Missing value on line %d")),
+ _cupsLangString(language, _("Missing value on line %d.")),
linenum);
_cupsSetError(IPP_DOCUMENT_FORMAT_ERROR, line, 0);
{
snprintf(line, sizeof(line),
_cupsLangString(language,
- _("Missing double quote on line %d")),
+ _("Missing double quote on line %d.")),
linenum);
_cupsSetError(IPP_DOCUMENT_FORMAT_ERROR, line, 0);
{
snprintf(line, sizeof(line),
_cupsLangString(language,
- _("Bad option + choice on line %d")),
+ _("Bad option + choice on line %d.")),
linenum);
_cupsSetError(IPP_DOCUMENT_FORMAT_ERROR, line, 0);
if (linenum == 0)
{
- _cupsSetError(IPP_DOCUMENT_FORMAT_ERROR, _("Empty PPD file"), 1);
+ _cupsSetError(IPP_DOCUMENT_FORMAT_ERROR, _("Empty PPD file."), 1);
cupsFileClose(dstfp);
unlink(buffer);
snprintf(message, sizeof(message),
_cupsLangString(language,
_("Unable to copy Windows 2000 printer "
- "driver files (%d)")), status);
+ "driver files (%d).")), status);
_cupsSetError(IPP_INTERNAL_ERROR, message, 0);
snprintf(message, sizeof(message),
_cupsLangString(language,
_("Unable to copy CUPS printer driver "
- "files (%d)")), status);
+ "files (%d).")), status);
_cupsSetError(IPP_INTERNAL_ERROR, message, 0);
return (0);
}
-
+
/*
* Do the rpcclient command needed for the CUPS drivers...
*/
snprintf(message, sizeof(message),
_cupsLangString(language,
_("Unable to install Windows 2000 printer "
- "driver files (%d)")), status);
+ "driver files (%d).")), status);
_cupsSetError(IPP_INTERNAL_ERROR, message, 0);
snprintf(message, sizeof(message),
_cupsLangString(language,
_("Unable to copy Windows 9x printer "
- "driver files (%d)")), status);
+ "driver files (%d).")), status);
_cupsSetError(IPP_INTERNAL_ERROR, message, 0);
snprintf(message, sizeof(message),
_cupsLangString(language,
_("Unable to install Windows 9x printer "
- "driver files (%d)")), status);
+ "driver files (%d).")), status);
_cupsSetError(IPP_INTERNAL_ERROR, message, 0);
snprintf(message, sizeof(message),
_cupsLangString(language,
_("Unable to copy 64-bit Windows printer "
- "driver files (%d)")), status);
+ "driver files (%d).")), status);
_cupsSetError(IPP_INTERNAL_ERROR, message, 0);
snprintf(message, sizeof(message),
_cupsLangString(language,
_("Unable to copy 64-bit CUPS printer driver "
- "files (%d)")), status);
+ "files (%d).")), status);
_cupsSetError(IPP_INTERNAL_ERROR, message, 0);
return (0);
}
-
+
/*
* Do the rpcclient command needed for the CUPS drivers...
*/
snprintf(message, sizeof(message),
_cupsLangString(language,
_("Unable to install Windows 2000 printer "
- "driver files (%d)")), status);
+ "driver files (%d).")), status);
_cupsSetError(IPP_INTERNAL_ERROR, message, 0);
if (!have_drivers)
strlcpy(message,
_cupsLangString(language,
- _("No Windows printer drivers are installed")),
+ _("No Windows printer drivers are installed.")),
sizeof(message));
else
strlcpy(message,
_cupsLangString(language,
_("Warning, no Windows 2000 printer drivers "
- "are installed")),
+ "are installed.")),
sizeof(message));
_cupsSetError(IPP_NOT_FOUND, message, 0);
{
snprintf(message, sizeof(message),
_cupsLangString(language,
- _("Unable to set Windows printer driver (%d)")),
+ _("Unable to set Windows printer driver (%d).")),
status);
_cupsSetError(IPP_INTERNAL_ERROR, message, 0);
if (!cg->http)
{
- if ((cg->http = _httpCreate(cupsServer(), ippPort(),
+ if ((cg->http = _httpCreate(cupsServer(), ippPort(), NULL,
cupsEncryption(), AF_UNSPEC)) == NULL)
{
if (errno)
if (!value && strncmp(line, "</", 2))
value = line + strlen(line);
- if ((!strcasecmp(line, "Port") || !strcasecmp(line, "Listen")) && value)
+ if ((!_cups_strcasecmp(line, "Port") || !_cups_strcasecmp(line, "Listen")) && value)
{
char *port; /* Pointer to port number, if any */
continue;
}
- if (strcasecmp(value, "localhost") && strcmp(value, "127.0.0.1")
+ if (_cups_strcasecmp(value, "localhost") && strcmp(value, "127.0.0.1")
#ifdef AF_LOCAL
&& *value != '/'
#endif /* AF_LOCAL */
)
remote_access = 1;
}
- else if (!strcasecmp(line, "Browsing"))
+ else if (!_cups_strcasecmp(line, "Browsing"))
{
- browsing = !strcasecmp(value, "yes") || !strcasecmp(value, "on") ||
- !strcasecmp(value, "true");
+ browsing = !_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "on") ||
+ !_cups_strcasecmp(value, "true");
}
- else if (!strcasecmp(line, "BrowseAddress"))
+ else if (!_cups_strcasecmp(line, "BrowseAddress"))
{
browse_address = 1;
}
- else if (!strcasecmp(line, "BrowseAllow"))
+ else if (!_cups_strcasecmp(line, "BrowseAllow"))
{
browse_allow = 1;
}
- else if (!strcasecmp(line, "BrowseOrder"))
+ else if (!_cups_strcasecmp(line, "BrowseOrder"))
{
- browse_allow = !strncasecmp(value, "deny,", 5);
+ browse_allow = !_cups_strncasecmp(value, "deny,", 5);
}
- else if (!strcasecmp(line, "LogLevel"))
+ else if (!_cups_strcasecmp(line, "LogLevel"))
{
- debug_logging = !strncasecmp(value, "debug", 5);
+ debug_logging = !_cups_strncasecmp(value, "debug", 5);
}
- else if (!strcasecmp(line, "<Policy") && !strcasecmp(value, "default"))
+ else if (!_cups_strcasecmp(line, "<Policy") && !_cups_strcasecmp(value, "default"))
{
in_policy = 1;
}
- else if (!strcasecmp(line, "</Policy>"))
+ else if (!_cups_strcasecmp(line, "</Policy>"))
{
in_policy = 0;
}
- else if (!strcasecmp(line, "<Limit") && in_policy && value)
+ else if (!_cups_strcasecmp(line, "<Limit") && in_policy && value)
{
/*
* See if the policy limit is for the Cancel-Job operation...
if (*valptr)
*valptr++ = '\0';
- if (!strcasecmp(value, "cancel-job") || !strcasecmp(value, "all"))
+ if (!_cups_strcasecmp(value, "cancel-job") || !_cups_strcasecmp(value, "all"))
{
in_cancel_job = 1;
break;
for (value = valptr; _cups_isspace(*value); value ++);
}
}
- else if (!strcasecmp(line, "</Limit>"))
+ else if (!_cups_strcasecmp(line, "</Limit>"))
{
in_cancel_job = 0;
}
- else if (!strcasecmp(line, "Require") && in_cancel_job)
+ else if (!_cups_strcasecmp(line, "Require") && in_cancel_job)
{
cancel_policy = 0;
}
- else if (!strcasecmp(line, "<Location") && value)
+ else if (!_cups_strcasecmp(line, "<Location") && value)
{
- in_admin_location = !strcasecmp(value, "/admin");
+ in_admin_location = !_cups_strcasecmp(value, "/admin");
in_location = 1;
}
- else if (!strcasecmp(line, "</Location>"))
+ else if (!_cups_strcasecmp(line, "</Location>"))
{
in_admin_location = 0;
in_location = 0;
}
- else if (!strcasecmp(line, "Allow") && value &&
- strcasecmp(value, "localhost") && strcasecmp(value, "127.0.0.1")
+ else if (!_cups_strcasecmp(line, "Allow") && value &&
+ _cups_strcasecmp(value, "localhost") && _cups_strcasecmp(value, "127.0.0.1")
#ifdef AF_LOCAL
&& *value != '/'
#endif /* AF_LOCAL */
{
if (in_admin_location)
remote_admin = 1;
- else if (!strcasecmp(value, "all"))
+ else if (!_cups_strcasecmp(value, "all"))
remote_any = 1;
}
else if (line[0] != '<' && !in_location && !in_policy &&
- strcasecmp(line, "Allow") &&
- strcasecmp(line, "AuthType") &&
- strcasecmp(line, "Deny") &&
- strcasecmp(line, "Order") &&
- strcasecmp(line, "Require") &&
- strcasecmp(line, "Satisfy"))
+ _cups_strcasecmp(line, "Allow") &&
+ _cups_strcasecmp(line, "AuthType") &&
+ _cups_strcasecmp(line, "Deny") &&
+ _cups_strcasecmp(line, "Order") &&
+ _cups_strcasecmp(line, "Require") &&
+ _cups_strcasecmp(line, "Satisfy"))
cg->cupsd_num_settings = cupsAddOption(line, value,
cg->cupsd_num_settings,
&(cg->cupsd_settings));
while (cupsFileGetConf(cupsd, line, sizeof(line), &value, &linenum))
{
- if ((!strcasecmp(line, "Port") || !strcasecmp(line, "Listen")) &&
+ if ((!_cups_strcasecmp(line, "Port") || !_cups_strcasecmp(line, "Listen")) &&
(remote_admin >= 0 || remote_any > 0 || share_printers >= 0))
{
if (!wrote_port_listen)
)
cupsFilePrintf(temp, "Listen %s\n", value);
}
- else if ((!strcasecmp(line, "Browsing") ||
- !strcasecmp(line, "BrowseAddress") ||
- !strcasecmp(line, "BrowseAllow") ||
- !strcasecmp(line, "BrowseDeny") ||
- !strcasecmp(line, "BrowseLocalProtocols") ||
- !strcasecmp(line, "BrowseRemoteProtocols") ||
- !strcasecmp(line, "BrowseOrder")) &&
+ else if ((!_cups_strcasecmp(line, "Browsing") ||
+ !_cups_strcasecmp(line, "BrowseAddress") ||
+ !_cups_strcasecmp(line, "BrowseAllow") ||
+ !_cups_strcasecmp(line, "BrowseDeny") ||
+ !_cups_strcasecmp(line, "BrowseLocalProtocols") ||
+ !_cups_strcasecmp(line, "BrowseRemoteProtocols") ||
+ !_cups_strcasecmp(line, "BrowseOrder")) &&
(remote_printers >= 0 || share_printers >= 0))
{
if (!wrote_browsing)
}
}
}
- else if (!strcasecmp(line, "LogLevel") && debug_logging >= 0)
+ else if (!_cups_strcasecmp(line, "LogLevel") && debug_logging >= 0)
{
wrote_loglevel = 1;
cupsFilePuts(temp, "LogLevel " CUPS_DEFAULT_LOG_LEVEL "\n");
}
}
- else if (!strcasecmp(line, "<Policy"))
+ else if (!_cups_strcasecmp(line, "<Policy"))
{
- in_default_policy = !strcasecmp(value, "default");
+ in_default_policy = !_cups_strcasecmp(value, "default");
in_policy = 1;
cupsFilePrintf(temp, "%s %s>\n", line, value);
indent += 2;
}
- else if (!strcasecmp(line, "</Policy>"))
+ else if (!_cups_strcasecmp(line, "</Policy>"))
{
indent -= 2;
if (!wrote_policy && in_default_policy)
cupsFilePuts(temp, "</Policy>\n");
}
- else if (!strcasecmp(line, "<Location"))
+ else if (!_cups_strcasecmp(line, "<Location"))
{
in_location = 1;
indent += 2;
cupsFilePrintf(temp, "%s %s>\n", line, value);
}
- else if (!strcasecmp(line, "</Location>"))
+ else if (!_cups_strcasecmp(line, "</Location>"))
{
in_location = 0;
indent -= 2;
cupsFilePuts(temp, "</Location>\n");
}
- else if (!strcasecmp(line, "<Limit"))
+ else if (!_cups_strcasecmp(line, "<Limit"))
{
if (in_default_policy)
{
/*
* See if the policy limit is for the Cancel-Job operation...
*/
-
+
char *valptr; /* Pointer into value */
-
-
- if (!strcasecmp(value, "cancel-job") && user_cancel_any >= 0)
+
+
+ if (!_cups_strcasecmp(value, "cancel-job") && user_cancel_any >= 0)
{
/*
* Don't write anything for this limit section...
*/
-
+
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';
-
- if (!strcasecmp(value, "cancel-job") && user_cancel_any >= 0)
+
+ if (!_cups_strcasecmp(value, "cancel-job") && user_cancel_any >= 0)
{
/*
* Write everything except for this definition...
*/
-
+
in_cancel_job = 1;
}
else
cupsFilePrintf(temp, " %s", value);
-
+
for (value = valptr; _cups_isspace(*value); value ++);
}
-
+
cupsFilePuts(temp, ">\n");
}
}
indent += 2;
}
- else if (!strcasecmp(line, "</Limit>") && in_cancel_job)
+ else if (!_cups_strcasecmp(line, "</Limit>") && in_cancel_job)
{
indent -= 2;
else if ((((in_admin_location || in_conf_location || in_root_location) &&
(remote_admin >= 0 || remote_any > 0)) ||
(in_root_location && share_printers >= 0)) &&
- (!strcasecmp(line, "Allow") || !strcasecmp(line, "Deny") ||
- !strcasecmp(line, "Order")))
+ (!_cups_strcasecmp(line, "Allow") || !_cups_strcasecmp(line, "Deny") ||
+ !_cups_strcasecmp(line, "Order")))
continue;
else if (in_cancel_job == 2)
continue;
for (i = num_settings, setting = settings; i > 0; i --, setting ++)
if (setting->name[0] != '_' &&
- strcasecmp(setting->name, "Listen") &&
- strcasecmp(setting->name, "Port") &&
+ _cups_strcasecmp(setting->name, "Listen") &&
+ _cups_strcasecmp(setting->name, "Port") &&
!cupsGetOption(setting->name, cupsd_num_settings, cupsd_settings))
{
/*
httpGetHostname(http, host, sizeof(host));
- if (strcasecmp(cg->cupsd_hostname, host))
+ if (_cups_strcasecmp(cg->cupsd_hostname, host))
invalidate_cupsd_cache(cg);
snprintf(name, namesize, "%s/cupsd.conf", cg->cups_serverroot);
*remote = 0;
#ifndef WIN32
- if (!strcasecmp(host, "localhost") && !access(name, R_OK))
+ if (!_cups_strcasecmp(host, "localhost") && !access(name, R_OK))
{
/*
* Read the local file rather than using HTTP...