From: mike Date: Thu, 1 May 2003 18:42:01 +0000 (+0000) Subject: Mirror 1.1.x changes. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb766c9eece612e228b8b8a894e272a139f36374;p=thirdparty%2Fcups.git Mirror 1.1.x changes. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@3689 7a7537e8-13f0-0310-91df-b6672ffda945 --- diff --git a/CHANGES-1.1.txt b/CHANGES-1.1.txt index 7a578dab91..1b675deb6e 100644 --- a/CHANGES-1.1.txt +++ b/CHANGES-1.1.txt @@ -3,6 +3,9 @@ CHANGES-1.1.txt CHANGES IN CUPS V1.1.19rc4 + - The lp command did not accept "-" for printing from + the standard input as required by POSIX 1003.1 (STR + #59) - Added the job-originating-host-name information for the page_log file documentation in the SAM (STR #31) - The German web interface templates did not use the diff --git a/man/lp.man b/man/lp.man index a2a1406127..5dc967da2e 100644 --- a/man/lp.man +++ b/man/lp.man @@ -1,5 +1,5 @@ .\" -.\" "$Id: lp.man,v 1.6.2.4 2003/01/07 18:27:06 mike Exp $" +.\" "$Id: lp.man,v 1.6.2.5 2003/05/01 18:42:00 mike Exp $" .\" .\" lp/cancel man page for the Common UNIX Printing System (CUPS). .\" @@ -21,7 +21,7 @@ .\" EMail: cups-info@cups.org .\" WWW: http://www.cups.org .\" -.TH lp 1 "Common UNIX Printing System" "25 September 2001" "Easy Software Products" +.TH lp 1 "Common UNIX Printing System" "1 May 2003" "Easy Software Products" .SH NAME lp \- print files .br @@ -78,7 +78,8 @@ cancel \- cancel jobs .I destination-id ] .SH DESCRIPTION -\fBlp\fR submits files for printing or alters a pending job. +\fBlp\fR submits files for printing or alters a pending job. Use +a filename of "-" to force printing from the standard input. .LP \fBcancel\fR cancels existing print jobs. The \fI-a\fR option will remove all jobs from the specified destination. @@ -164,5 +165,5 @@ http://localhost:631/documentation.html .SH COPYRIGHT Copyright 1993-2003 by Easy Software Products, All Rights Reserved. .\" -.\" End of "$Id: lp.man,v 1.6.2.4 2003/01/07 18:27:06 mike Exp $". +.\" End of "$Id: lp.man,v 1.6.2.5 2003/05/01 18:42:00 mike Exp $". .\" diff --git a/systemv/lp.c b/systemv/lp.c index cebf81d5d0..7901c837a3 100644 --- a/systemv/lp.c +++ b/systemv/lp.c @@ -1,5 +1,5 @@ /* - * "$Id: lp.c,v 1.29.2.13 2003/04/10 18:38:07 mike Exp $" + * "$Id: lp.c,v 1.29.2.14 2003/05/01 18:42:01 mike Exp $" * * "lp" command for the Common UNIX Printing System (CUPS). * @@ -124,7 +124,7 @@ main(int argc, /* I - Number of command-line arguments */ job_id = 0; for (i = 1; i < argc; i ++) - if (argv[i][0] == '-') + if (argv[i][0] == '-' && argv[i][1]) switch (argv[i][1]) { case 'E' : /* Encrypt */ @@ -452,6 +452,17 @@ main(int argc, /* I - Number of command-line arguments */ fprintf(stderr, "lp: Unknown option \'%c\'!\n", argv[i][1]); return (1); } + else if (!strcmp(argv[i], "-")) + { + if (num_files || job_id) + { + fputs("lp: Error - cannot print from stdin if files or a job ID are " + "provided!\n", stderr); + return (1); + } + + break; + } else if (num_files < 1000 && job_id == 0) { /* @@ -729,5 +740,5 @@ sighandler(int s) /* I - Signal number */ /* - * End of "$Id: lp.c,v 1.29.2.13 2003/04/10 18:38:07 mike Exp $". + * End of "$Id: lp.c,v 1.29.2.14 2003/05/01 18:42:01 mike Exp $". */