]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - monitor/bcp.c
Fix up svn:keywords for all files.
[thirdparty/cups.git] / monitor / bcp.c
index 7b19e4b8424b7eddcec78c82c7e7d9d3cb8ee673..2354d102ded92294373c32425146b6e7d86f0df7 100644 (file)
@@ -1,38 +1,32 @@
 /*
- * "$Id: bcp.c 5087 2006-02-07 03:43:29Z mike $"
+ * "$Id$"
  *
- *   TBCP port monitor for the Common UNIX Printing System (CUPS).
+ *   TBCP port monitor for CUPS.
  *
+ *   Copyright 2007-2010 by Apple Inc.
  *   Copyright 1993-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/".
  *
  *   This file is subject to the Apple OS-Developed Software exception.
  *
  * Contents:
  *
+ *   main()    - Main entry...
+ *   psgets()  - Get a line from a file.
+ *   pswrite() - Write data from a file.
  */
 
 /*
  * Include necessary headers...
  */
 
-#include <cups/string.h>
-#include <cups/cups.h>
+#include <cups/cups-private.h>
+#include <cups/ppd.h>
 
 
 /*
@@ -64,7 +58,9 @@ main(int  argc,                               /* I - Number of command-line args */
 
   if (argc < 6 || argc > 7)
   {
-    fputs("ERROR: tbcp job-id user title copies options [file]\n", stderr);
+    _cupsLangPrintf(stderr,
+                    _("Usage: %s job-id user title copies options [file]"),
+                   argv[0]);
     return (1);
   }
 
@@ -257,9 +253,19 @@ pswrite(const char *buf,           /* I - Buffer to write */
   for (count = bytes; count > 0; count --, buf ++)
     switch (*buf)
     {
+      case 0x04 : /* CTRL-D */
+          if (bytes == 1)
+         {
+          /*
+           * Don't quote the last CTRL-D...
+           */
+
+           putchar(0x04);
+           break;
+         }
+
       case 0x01 : /* CTRL-A */
       case 0x03 : /* CTRL-C */
-      case 0x04 : /* CTRL-D */
       case 0x05 : /* CTRL-E */
       case 0x11 : /* CTRL-Q */
       case 0x13 : /* CTRL-S */
@@ -282,5 +288,5 @@ pswrite(const char *buf,            /* I - Buffer to write */
 
 
 /*
- * End of "$Id: bcp.c 5087 2006-02-07 03:43:29Z mike $".
+ * End of "$Id$".
  */