diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2007-09-14 02:27:22 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2007-09-14 02:27:22 +0000 |
commit | db1f069b7f02a8e17a9e4abf8f182530b882c6c9 (patch) | |
tree | 9d1371a56b0ef8f51d62db6ebfe74e5a8534ffe5 /monitor | |
parent | 76cd9e37aaf496aab887d499f4917b60e91d6d25 (diff) | |
download | cups-db1f069b7f02a8e17a9e4abf8f182530b882c6c9.tar.gz |
Merge changes from CUPS 1.3.1.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@470 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'monitor')
-rw-r--r-- | monitor/bcp.c | 19 | ||||
-rw-r--r-- | monitor/tbcp.c | 21 |
2 files changed, 31 insertions, 9 deletions
diff --git a/monitor/bcp.c b/monitor/bcp.c index 16054d90b..cbb2042a2 100644 --- a/monitor/bcp.c +++ b/monitor/bcp.c @@ -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 $". */ diff --git a/monitor/tbcp.c b/monitor/tbcp.c index 55039e4c2..a310d6617 100644 --- a/monitor/tbcp.c +++ b/monitor/tbcp.c @@ -1,5 +1,5 @@ /* - * "$Id: tbcp.c 6649 2007-07-11 21:46:42Z mike $" + * "$Id: tbcp.c 6802 2007-08-16 18:44:46Z mike $" * * TBCP port monitor for the Common UNIX Printing System (CUPS). * @@ -120,11 +120,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 +243,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 +279,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 6802 2007-08-16 18:44:46Z mike $". */ |