]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - systemv/cancel.c
Merge changes from CUPS 1.5svn-r8849.
[thirdparty/cups.git] / systemv / cancel.c
index 1ed4ff7153771807af1b9ac46d70ff4f9214226c..568ec6a52c4771d812d7e6aab2da3c04d354b520 100644 (file)
@@ -1,25 +1,16 @@
 /*
- * "$Id$"
+ * "$Id: cancel.c 7720 2008-07-11 22:46:21Z mike $"
  *
  *   "cancel" command for the Common UNIX Printing System (CUPS).
  *
+ *   Copyright 2007-2009 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
- *   property of Easy Software Products and are protected by Federal
- *   copyright law.  Distribution and use rights are outlined in the file
- *   "LICENSE.txt" which should have been included with this file.  If this
- *   file is missing or damaged please contact Easy Software Products
- *   at:
- *
- *       Attn: CUPS Licensing Information
- *       Easy Software Products
- *       44141 Airport View Drive, Suite 204
- *       Hollywood, Maryland 20636 USA
- *
- *       Voice: (301) 373-9600
- *       EMail: cups-info@cups.org
- *         WWW: http://www.cups.org
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ *   which should have been included with this file.  If this file is
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
  *
  * Contents:
  *
@@ -60,13 +51,14 @@ main(int  argc,                             /* I - Number of command-line arguments */
   ipp_op_t     op;                     /* Operation */
 
 
+  _cupsSetLocale(argv);
+
  /*
   * Setup to cancel individual print jobs...
   */
 
   op        = IPP_CANCEL_JOB;
   purge     = 0;
-  job_id    = 0;
   dest      = NULL;
   user      = NULL;
   http      = NULL;
@@ -90,7 +82,7 @@ main(int  argc,                               /* I - Number of command-line arguments */
              httpEncryption(http, HTTP_ENCRYPT_REQUIRED);
 #else
             _cupsLangPrintf(stderr,
-                           _("%s: Sorry, no encryption support compiled in!\n"),
+                           _("%s: Sorry, no encryption support compiled in\n"),
                            argv[0]);
 #endif /* HAVE_SSL */
            break;
@@ -105,7 +97,7 @@ main(int  argc,                              /* I - Number of command-line arguments */
              {
                _cupsLangPrintf(stderr,
                                _("%s: Error - expected username after "
-                                 "\'-U\' option!\n"),
+                                 "\'-U\' option\n"),
                                argv[0]);
                return (1);
              }
@@ -121,7 +113,10 @@ main(int  argc,                            /* I - Number of command-line arguments */
 
         case 'h' : /* Connect to host */
            if (http != NULL)
+           {
              httpClose(http);
+             http = NULL;
+           }
 
            if (argv[i][2] != '\0')
               cupsSetServer(argv[i] + 2);
@@ -133,7 +128,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
              {
                _cupsLangPrintf(stderr,
                                _("%s: Error - expected hostname after "
-                                 "\'-h\' option!\n"),
+                                 "\'-h\' option\n"),
                                argv[0]);
                return (1);
               }
@@ -155,7 +150,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
              {
                _cupsLangPrintf(stderr,
                                _("%s: Error - expected username after "
-                                 "\'-u\' option!\n"),
+                                 "\'-u\' option\n"),
                                argv[0]);
                return (1);
               }
@@ -166,7 +161,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
        default :
            _cupsLangPrintf(stderr,
-                           _("%s: Error - unknown option \'%c\'!\n"),
+                           _("%s: Error - unknown option \'%c\'\n"),
                            argv[0], argv[i][1]);
            return (1);
       }
@@ -224,7 +219,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
        */
 
         _cupsLangPrintf(stderr,
-                       _("%s: Error - unknown destination \"%s\"!\n"),
+                       _("%s: Error - unknown destination \"%s\"\n"),
                        argv[0], argv[i]);
        return (1);
       }
@@ -247,7 +242,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
                                       cupsEncryption())) == NULL)
        {
          _cupsLangPrintf(stderr,
-                         _("%s: Unable to contact server!\n"),
+                         _("%s: Unable to contact server\n"),
                          argv[0]);
          return (1);
        }
@@ -328,7 +323,7 @@ main(int  argc,                             /* I - Number of command-line arguments */
       if ((http = httpConnectEncrypt(cupsServer(), ippPort(),
                                     cupsEncryption())) == NULL)
       {
-       _cupsLangPrintf(stderr, _("%s: Unable to contact server!\n"),
+       _cupsLangPrintf(stderr, _("%s: Unable to contact server\n"),
                        argv[0]);
        return (1);
       }
@@ -387,5 +382,5 @@ main(int  argc,                             /* I - Number of command-line arguments */
 
 
 /*
- * End of "$Id$".
+ * End of "$Id: cancel.c 7720 2008-07-11 22:46:21Z mike $".
  */