Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lp is not X/Open or POSIX compliant #59

Closed
michaelrsweet opened this issue May 1, 2003 · 2 comments
Closed

lp is not X/Open or POSIX compliant #59

michaelrsweet opened this issue May 1, 2003 · 2 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.1.18
CUPS.org User: twaugh.redhat

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=89997

According to The Open Group Base Specifications Issue 6, IEEE Std 1003.1-2001, "The standard input shall be used only if no file operands are specified, or if a file operand is '-' ."

But '-' isn't supported:

$ lp -
lp: Unknown option ''!

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

This has been fixed in CVS for the next 1.1.19 release candidate.

@michaelrsweet
Copy link
Collaborator Author

"lp-posix.patch":

? .xvpics
? TEMPLATES.txt
? autom4te-2.53.cache
? autom4te.cache
? cups-1.1.17-cvs.patch
? cups-idefense-v2.patch
? cups-idefense.patch
? cupsd-cpu.patch
? herrno.patch
? patches
? pdftops.new
? root.dvi
? root.ps
? sweet2002.jpg
? temp.patch.gz
? test.log
? backend/pictwps.patch
? backend/printtofile.sh
? backend/test.file
? backend/testprint.ps
? backend/usb.patch
? cups/stuiiiAm
? data/okidata.ps
? data/s0500001.pfa
? doc/cmp.ps
? doc/doc.list
? doc/idd.ps
? doc/ipp.ps
? doc/lib.list
? doc/overview.ps
? doc/sam.ps
? doc/sams-article.html
? doc/sams-bio.html
? doc/sdd.ps
? doc/spm.ps
? doc/sps.ps
? doc/ssr.ps
? doc/stp.ps
? doc/sum.ps
? doc/svd.ps
? doc/translation.ps
? doc/de/images/.xvpics
? filter/Dependencies.xwd
? filter/Makefile.xwd
? filter/everythingwrong.jpg
? filter/generic.ppd
? filter/georgethegenius.jpg
? filter/iR330-400.ppd
? filter/illustrator.pict
? filter/illustrator.plist
? filter/illustrator.ps
? filter/image-xwd.c
? filter/picttops
? filter/picttops.c
? filter/profile.jpg
? filter/pstops.patch
? filter/sun.ppm
? filter/sun.xwd
? filter/t2.ps
? filter/t3.ps
? filter/test.xwd
? filter/testimage
? locale/cups_el
? pdftops/FontFile.patch
? pdftops/PSOutputDev.patch
? pdftops/xpdf-rangecheck.patch
? ppd/big.ppd
? scheduler/client.diff
? scheduler/cups-filter-v2.patch
? scheduler/cups-optionlength.patch
? scheduler/cups-polld.patch
? scheduler/cupsd-signal.patch
? scheduler/d00969-001
? scheduler/debian-fanta.patch
? scheduler/getifaddrs.c
? scheduler/getifaddrs.h
? scheduler/testnetwork.c
? scheduler/testprint.ps.gz
? scripting/cups.jar
? scripting/java/Makefile
? scripting/java/docs/allclasses-noframe.html
? scripting/java/docs/constant-values.html
? scripting/java/docs/org/cups/package-frame.html
? scripting/java/docs/org/cups/package-summary.html
? scripting/java/docs/org/cups/package-tree.html
? scripting/java/example/GLP.class
? scripting/java/example/GLPcolors.class
? scripting/java/example/GLPdetail.class
? scripting/java/example/GLPjobList.class
? scripting/java/example/GLPjobTableModel.class
? scripting/java/example/GLPoptions$1.class
? scripting/java/example/GLPoptions$MyTextListener.class
? scripting/java/example/GLPoptions.class
? scripting/java/example/GLPprinterDetail.class
? scripting/java/example/GLPprinters.class
? scripting/java/example/GLPsearch.class
? scripting/java/example/GLPsearchProgressPanel$1.class
? scripting/java/example/GLPsearchProgressPanel$2.class
? scripting/java/example/GLPsearchProgressPanel$ButtonListener.class
? scripting/java/example/GLPsearchProgressPanel.class
? scripting/java/example/GLPserver.class
? scripting/java/example/GLPtabs$1.class
? scripting/java/example/GLPtabs.class
? scripting/java/example/GLPvars.class
? scripting/java/example/Makefile
? scripting/java/src/org/cups/Cups.class
? scripting/java/src/org/cups/CupsJob.class
? scripting/java/src/org/cups/CupsPrinter.class
? scripting/java/src/org/cups/IPP.class
? scripting/java/src/org/cups/IPPAttribute.class
? scripting/java/src/org/cups/IPPBase64Encoder.class
? scripting/java/src/org/cups/IPPCalendar.class
? scripting/java/src/org/cups/IPPDefs.class
? scripting/java/src/org/cups/IPPError.class
? scripting/java/src/org/cups/IPPHttp.class
? scripting/java/src/org/cups/IPPMD5.class
? scripting/java/src/org/cups/IPPRequest.class
? scripting/java/src/org/cups/IPPStatus.class
? scripting/java/src/org/cups/IPPURLConnection.class
? scripting/java/src/org/cups/IPPValue.class
? standards/draft-ietf-ipp-not-06.txt
? standards/draft-ietf-ipp-not-spec-11.txt
? standards/draft-ietf-ipp-notify-get-09.txt
? standards/draft-ietf-ipp-notify-mailto-04.txt
? standards/rfc2368.txt
? standards/rfc3239.txt
? test/cups-str-1.1-2003-04-23-mike.html
? test/cups-str-1.1-2003-04-23-mike.pdf
? test/cups-str-1.1-2003-04-23-mike.shtml
? test/cups-str-1.1-2003-05-01-mike.html
? test/cups-str-1.1-2003-05-01-mike.pdf
? test/cups-str-1.1-2003-05-01-mike.shtml
? test/get-completed-jobs.test
? test/get-jobs.test
? test/get-printers.test
? test/ippscan
? test/ippscan.c
? test/libping-1.14
? test/printer.test
? test/windows-ext.test

Index: man/lp.man

RCS file: /development/cvs/cups/man/lp.man,v
retrieving revision 1.12
diff -u -r1.12 lp.man
--- man/lp.man 2003/01/27 14:44:41 1.12
+++ man/lp.man 2003/05/01 18:38:30
@@ -21,7 +21,7 @@
." EMail: cups-info@cups.org
." WWW: http://www.cups.org
."
-.TH lp 1 "Common UNIX Printing System" "24 January 2003" "Easy Software Products"
+.TH lp 1 "Common UNIX Printing System" "1 May 2003" "Easy Software Products"
.SH NAME
lp - print files
.br
@@ -80,7 +80,8 @@
.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.

Index: systemv/lp.c

RCS file: /development/cvs/cups/systemv/lp.c,v
retrieving revision 1.42
diff -u -r1.42 lp.c
--- systemv/lp.c 2003/04/10 18:37:54 1.42
+++ systemv/lp.c 2003/05/01 18:38:31
@@ -124,7 +124,7 @@
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 @@
    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)
    {
    /*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant