]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - monitor/bcp.c
Merge changes from CUPS 1.3.1.
[thirdparty/cups.git] / monitor / bcp.c
index 16054d90b8c4de2c8d7fb6b42e39439c84d1531f..cbb2042a2897097d85c491947883b76ec5c59139 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: bcp.c 6649 2007-07-11 21:46:42Z mike $"
+ * "$Id: bcp.c 6802 2007-08-16 18:44:46Z mike $"
  *
  *   TBCP port monitor for the Common UNIX Printing System (CUPS).
  *
@@ -16,6 +16,9 @@
  *
  * Contents:
  *
+ *   main()    - Main entry...
+ *   psgets()  - Get a line from a file.
+ *   pswrite() - Write data from a file.
  */
 
 /*
@@ -248,9 +251,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 */
@@ -273,5 +286,5 @@ pswrite(const char *buf,            /* I - Buffer to write */
 
 
 /*
- * End of "$Id: bcp.c 6649 2007-07-11 21:46:42Z mike $".
+ * End of "$Id: bcp.c 6802 2007-08-16 18:44:46Z mike $".
  */