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
.\"
-.\" "$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).
.\"
.\" 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
.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.
.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 $".
.\"
/*
- * "$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).
*
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 */
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)
{
/*
/*
- * 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 $".
*/