]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - monitor/tbcp.c
Import changes from CUPS 1.5svn-r9085.
[thirdparty/cups.git] / monitor / tbcp.c
index 55039e4c2ba9d6335c5072586dd5e5febaef86f8..94cf7b692ba939168eed7cb308f07a4c32c15c1b 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: tbcp.c 6649 2007-07-11 21:46:42Z mike $"
+ * "$Id: tbcp.c 6800 2007-08-16 18:28:44Z mike $"
  *
- *   TBCP port monitor for the Common UNIX Printing System (CUPS).
+ *   TBCP port monitor for CUPS.
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2010 by Apple Inc.
  *   Copyright 1993-2006 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -25,8 +25,9 @@
  * Include necessary headers...
  */
 
-#include <cups/string.h>
+#include <cups/string-private.h>
 #include <cups/cups.h>
+#include <cups/ppd.h>
 
 
 /*
@@ -120,11 +121,10 @@ main(int  argc,                           /* I - Number of command-line args */
     else
     {
      /*
-      * No PJL stuff, add it...
+      * No PJL stuff, just add the UEL...
       */
 
-      puts("\033%-12345X@PJL");
-      puts("@PJL ENTER LANGUAGE = POSTSCRIPT");
+      fputs("\033%-12345X", stdout);
     }
 
    /*
@@ -244,9 +244,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 */
@@ -270,5 +280,5 @@ pswrite(const char *buf,            /* I - Buffer to write */
 
 
 /*
- * End of "$Id: tbcp.c 6649 2007-07-11 21:46:42Z mike $".
+ * End of "$Id: tbcp.c 6800 2007-08-16 18:28:44Z mike $".
  */