Small patch to lpr - comments, review, commit ?

2000-10-30 Thread Steve O'Hara-Smith

Hi,

I have found that lpr does not pass the -C parameters to lpd unless
burst header pages are being printed. Unfortunately apsfilter (ab)uses the
-C parameters for printer mode control. The patch below moves pass through of
the -C parameters out of the conditional block. As far as I can see this is
never harmful.

The patch is against -stable because that is what I am running, I
don't expect -current is very (any) different.

Index: lpr.c
===
RCS file: /home/ncvs/src/usr.sbin/lpr/lpr/lpr.c,v
retrieving revision 1.32.2.1
diff -u -r1.32.2.1 lpr.c
--- lpr.c   2000/06/27 19:55:40 1.32.2.1
+++ lpr.c   2000/10/28 16:27:10
@@ -326,6 +326,7 @@
seteuid(uid);
card('H', host);
card('P', person);
+   card('C', class);
if (hdr  !pp-no_header) {
if (jobname == NULL) {
if (argc == 0)
@@ -335,7 +336,6 @@
   ? arg + 1 : argv[0]);
}
card('J', jobname);
-   card('C', class);
card('L', person);
}
if (format != 'p'  Zflag != 0)



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message



Re: Small patch to lpr - comments, review, commit ?

2000-10-30 Thread Garance A Drosihn

At 12:33 PM + 10/30/00, Steve O'Hara-Smith wrote:
   I have found that lpr does not pass the -C parameters to
lpd unless burst header pages are being printed. Unfortunately
apsfilter (ab)uses the -C parameters for printer mode control.
The patch below moves pass through of the -C parameters out of
the conditional block. As far as I can see this is never harmful.

I suspect it is never harmful within our lpr.  Not sure about
how lprNG or various other things would treat it.  My guess
is it should never be harmful.

In fact, I'm inclined to say both the 'C' and 'P' lines should
be moved out of that conditional block.  The only thing that
really triggers a header sheet is the 'L' line, and there are
other processes which might want that 'P' line to be there even
if the header sheet is off.

I could put that change into lpr in -current, if you want.  It
should probably sit there for a little while just to make sure it
doesn't cause any problems when sent to other lpr implementations.
(which is to say, this will not make 4.2-release...)


---
Garance Alistair Drosehn=   [EMAIL PROTECTED]
Senior Systems Programmer   or  [EMAIL PROTECTED]
Rensselaer Polytechnic Instituteor  [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message



Re: Small patch to lpr - comments, review, commit ?

2000-10-30 Thread Garance A Drosihn

At 3:38 PM -0500 10/30/00, Garance A Drosihn wrote:
In fact, I'm inclined to say both the 'C' and 'P' lines should
be moved out of that conditional block.  The only thing that
really triggers a header sheet is the 'L' line, and there are
other processes which might want that 'P' line to be there even
if the header sheet is off.

Er, that isn't quite right.  I keep confusing 'P' lines with 'L'
lines, as shown by the fact that I talk about moving the 'P'
line when the 'P' line isn't even IN the conditional...

I can't move the 'L' line, but the update that Steve wrote
to move the 'C' line should be fine.  I'll make the change
unless someone sees a problem with it.  It still won't make
it into 4.2, though :-)


---
Garance Alistair Drosehn=   [EMAIL PROTECTED]
Senior Systems Programmer   or  [EMAIL PROTECTED]
Rensselaer Polytechnic Instituteor  [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message