/*
- * "$Id: lpadmin.c 7720 2008-07-11 22:46:21Z mike $"
+ * "$Id$"
*
* "lpadmin" command for CUPS.
*
cupsSetUser(argv[i]);
}
break;
-
+
case 'u' : /* Allow/deny users */
if (argv[i][2])
val = argv[i] + 2;
val = argv[i];
}
- if (!strncasecmp(val, "allow:", 6))
+ if (!_cups_strncasecmp(val, "allow:", 6))
num_options = cupsAddOption("requesting-user-name-allowed",
val + 6, num_options, &options);
- else if (!strncasecmp(val, "deny:", 5))
+ else if (!_cups_strncasecmp(val, "deny:", 5))
num_options = cupsAddOption("requesting-user-name-denied",
val + 5, num_options, &options);
else
_cupsLangPuts(stderr,
_("lpadmin: Warning - content type list ignored."));
break;
-
+
case 'L' : /* Set the printer-location attribute */
if (argv[i][2])
num_options = cupsAddOption("printer-location", argv[i] + 2,
(members = ippFindAttribute(response, "member-names",
IPP_TAG_NAME)) != NULL)
for (i = 0; i < members->num_values; i ++)
- if (strcasecmp(printer, members->values[i].string.text) == 0)
+ if (_cups_strcasecmp(printer, members->values[i].string.text) == 0)
{
_cupsLangPrintf(stderr,
_("lpadmin: Printer %s is already a member of class "
}
for (i = 0; i < members->num_values; i ++)
- if (!strcasecmp(printer, members->values[i].string.text))
+ if (!_cups_strcasecmp(printer, members->values[i].string.text))
break;
if (i >= members->num_values)
* option with deleteAttr tag
*/
- if (get_printer_type(http, printer, uri, sizeof(uri)) &
- (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT))
+ if (get_printer_type(http, printer, uri, sizeof(uri)) & CUPS_PRINTER_CLASS)
request = ippNewRequest(CUPS_ADD_MODIFY_CLASS);
else
request = ippNewRequest(CUPS_ADD_MODIFY_PRINTER);
* printer-is-accepting-jobs
*/
- if (get_printer_type(http, printer, uri, sizeof(uri)) &
- (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT))
+ if (get_printer_type(http, printer, uri, sizeof(uri)) & CUPS_PRINTER_CLASS)
request = ippNewRequest(CUPS_ADD_MODIFY_CLASS);
else
request = ippNewRequest(CUPS_ADD_MODIFY_PRINTER);
{
type = (cups_ptype_t)attr->values[0].integer;
- if (type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT))
+ if (type & CUPS_PRINTER_CLASS)
httpAssembleURIf(HTTP_URI_CODING_ALL, uri, urisize, "ipp", NULL,
"localhost", ippPort(), "/classes/%s", printer);
}
* other options
*/
- if (get_printer_type(http, printer, uri, sizeof(uri)) &
- (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT))
+ if (get_printer_type(http, printer, uri, sizeof(uri)) & CUPS_PRINTER_CLASS)
request = ippNewRequest(CUPS_ADD_MODIFY_CLASS);
else
request = ippNewRequest(CUPS_ADD_MODIFY_PRINTER);
if ((protocol = cupsGetOption("protocol", num_options, options)) != NULL)
{
- if (!strcasecmp(protocol, "bcp"))
+ if (!_cups_strcasecmp(protocol, "bcp"))
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME, "port-monitor",
NULL, "bcp");
- else if (!strcasecmp(protocol, "tbcp"))
+ else if (!_cups_strcasecmp(protocol, "tbcp"))
ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_NAME, "port-monitor",
NULL, "tbcp");
}
{
wrote_ipp_supplies = 1;
cupsFilePrintf(out, "*cupsIPPSupplies: %s\n",
- (!strcasecmp(boolval, "true") ||
- !strcasecmp(boolval, "yes") ||
- !strcasecmp(boolval, "on")) ? "True" : "False");
+ (!_cups_strcasecmp(boolval, "true") ||
+ !_cups_strcasecmp(boolval, "yes") ||
+ !_cups_strcasecmp(boolval, "on")) ? "True" : "False");
}
else if (!strncmp(line, "*cupsSNMPSupplies:", 18) &&
(boolval = cupsGetOption("cupsSNMPSupplies", num_options,
{
wrote_snmp_supplies = 1;
cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n",
- (!strcasecmp(boolval, "true") ||
- !strcasecmp(boolval, "yes") ||
- !strcasecmp(boolval, "on")) ? "True" : "False");
+ (!_cups_strcasecmp(boolval, "true") ||
+ !_cups_strcasecmp(boolval, "yes") ||
+ !_cups_strcasecmp(boolval, "on")) ? "True" : "False");
}
else if (strncmp(line, "*Default", 8))
cupsFilePrintf(out, "%s\n", line);
options)) != NULL)
{
cupsFilePrintf(out, "*cupsIPPSupplies: %s\n",
- (!strcasecmp(boolval, "true") ||
- !strcasecmp(boolval, "yes") ||
- !strcasecmp(boolval, "on")) ? "True" : "False");
+ (!_cups_strcasecmp(boolval, "true") ||
+ !_cups_strcasecmp(boolval, "yes") ||
+ !_cups_strcasecmp(boolval, "on")) ? "True" : "False");
}
if (!wrote_snmp_supplies &&
options)) != NULL)
{
cupsFilePrintf(out, "*cupsSNMPSupplies: %s\n",
- (!strcasecmp(boolval, "true") ||
- !strcasecmp(boolval, "yes") ||
- !strcasecmp(boolval, "on")) ? "True" : "False");
+ (!_cups_strcasecmp(boolval, "true") ||
+ !_cups_strcasecmp(boolval, "yes") ||
+ !_cups_strcasecmp(boolval, "on")) ? "True" : "False");
}
cupsFileClose(in);
/*
- * End of "$Id: lpadmin.c 7720 2008-07-11 22:46:21Z mike $".
+ * End of "$Id$".
*/