summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorgad <gad@FreeBSD.org>2001-11-27 01:32:25 +0000
committergad <gad@FreeBSD.org>2001-11-27 01:32:25 +0000
commit158a111b03114700fdc210ce50cd62123f65e670 (patch)
treeb64eb0d5c4349ff3a42a352be893ff037b8bb157 /usr.sbin
parent7f6c9afbd1183c1ab2abb2b0e9793db77c42ca09 (diff)
downloadFreeBSD-src-158a111b03114700fdc210ce50cd62123f65e670.zip
FreeBSD-src-158a111b03114700fdc210ce50cd62123f65e670.tar.gz
Change the recently-added 'o'-processing so it maps to 'l' instead of 'f'.
'l' ("plain text which includes control characters") is somewhat more appropriate for 'o' ("postscript files"), and in fact some printers treat 'l' as a request to print a postscript file. MFC after: 1 week
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/lpr/common_source/ctlinfo.c6
-rw-r--r--usr.sbin/lpr/lpd/printjob.c19
2 files changed, 15 insertions, 10 deletions
diff --git a/usr.sbin/lpr/common_source/ctlinfo.c b/usr.sbin/lpr/common_source/ctlinfo.c
index 6d08025..1249a4b 100644
--- a/usr.sbin/lpr/common_source/ctlinfo.c
+++ b/usr.sbin/lpr/common_source/ctlinfo.c
@@ -193,13 +193,15 @@ __END_DECLS
* g - "file name", plot(1G) file to print, ie 'lpr -g'
* l - "file name", text file with control chars which should
* be printed literally, ie 'lpr -l' (note: some printers
- * take this id as a request to print a postscript file)
+ * take this id as a request to print a postscript file,
+ * and because of *that* some OS's use 'l' to indicate
+ * that a datafile is a postscript file)
* n - "file name", ditroff(1) file to print, ie 'lpr -n'
* o - "file name", a postscript file to print. This id is
* described in the original RFC, but not much has been
* done with it. This 'lpr' does not generate control
* lines with 'o'-actions, but lpd's printjob processing
- * will treat it the same as 'f'.
+ * will treat it the same as 'l'.
* p - "file name", text file to print with pr(1), ie 'lpr -p'
* t - "file name", troff(1) file to print, ie 'lpr -t'
* v - "file name", plain raster file to print
diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c
index d81ce58..b0e2569 100644
--- a/usr.sbin/lpr/lpd/printjob.c
+++ b/usr.sbin/lpr/lpd/printjob.c
@@ -676,14 +676,6 @@ print(struct printer *pp, int format, char *file)
return(ERROR);
}
fi = p[0]; /* use pipe for input */
- case 'o': /* print postscript file */
- /*
- * For now, treat this as a plain-text file, and assume
- * the standard LPF_INPUT filter will recognize that it
- * is postscript and know what to do with it. These
- * 'o'-file requests could come from MacOS 10.1 systems.
- */
- /* FALLTHROUGH */
case 'f': /* print plain text file */
prog = pp->filters[LPF_INPUT];
av[1] = width;
@@ -691,6 +683,17 @@ print(struct printer *pp, int format, char *file)
av[3] = indent;
n = 4;
break;
+ case 'o': /* print postscript file */
+ /*
+ * Treat this as a "plain file with control characters", and
+ * assume the standard LPF_INPUT filter will recognize that
+ * the data is postscript and know what to do with it. These
+ * 'o'-file requests could come from MacOS 10.1 systems.
+ * (later versions of MacOS 10 will explicitly use 'l')
+ * A postscript file can contain binary data, which is why 'l'
+ * is somewhat more appropriate than 'f'.
+ */
+ /* FALLTHROUGH */
case 'l': /* like 'f' but pass control characters */
prog = pp->filters[LPF_INPUT];
av[1] = "-c";
OpenPOWER on IntegriCloud