]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - systemv/lpadmin.c
Ignore generated files.
[thirdparty/cups.git] / systemv / lpadmin.c
index 4794240b20a40da2e9ba0a59dd867b893aeeb82d..d954e75fb8e1935f5d5b262ca12148ad86cc7925 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: lpadmin.c 7720 2008-07-11 22:46:21Z mike $"
+ * "$Id$"
  *
  *   "lpadmin" command for CUPS.
  *
@@ -443,7 +443,7 @@ main(int  argc,                     /* I - Number of command-line arguments */
               cupsSetUser(argv[i]);
            }
            break;
-           
+
         case 'u' : /* Allow/deny users */
            if (argv[i][2])
              val = argv[i] + 2;
@@ -462,10 +462,10 @@ main(int  argc,                   /* I - Number of command-line arguments */
               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
@@ -579,7 +579,7 @@ main(int  argc,                     /* I - Number of command-line arguments */
            _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,
@@ -756,7 +756,7 @@ add_printer_to_class(http_t *http,  /* I - Server connection */
       (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 "
@@ -980,7 +980,7 @@ delete_printer_from_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)
@@ -1090,8 +1090,7 @@ delete_printer_option(http_t *http,       /* I - Server connection */
   *    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);
@@ -1145,8 +1144,7 @@ enable_printer(http_t *http,              /* I - Server connection */
   *    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);
@@ -1224,7 +1222,7 @@ get_printer_type(http_t *http,            /* I - Server connection */
   {
     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);
   }
@@ -1283,8 +1281,7 @@ set_printer_options(
   *    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);
@@ -1302,10 +1299,10 @@ set_printer_options(
 
   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");
   }
@@ -1359,9 +1356,9 @@ set_printer_options(
       {
         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,
@@ -1369,9 +1366,9 @@ set_printer_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);
@@ -1428,9 +1425,9 @@ set_printer_options(
                                 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 &&
@@ -1438,9 +1435,9 @@ set_printer_options(
                                 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);
@@ -1517,5 +1514,5 @@ validate_name(const char *name)           /* I - Name to check */
 
 
 /*
- * End of "$Id: lpadmin.c 7720 2008-07-11 22:46:21Z mike $".
+ * End of "$Id$".
  */