added 'hl' flag to printcap to print the banner last.
authorRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Thu, 28 Feb 1985 08:20:03 +0000 (00:20 -0800)
committerRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Thu, 28 Feb 1985 08:20:03 +0000 (00:20 -0800)
SCCS-vsn: usr.sbin/lpr/common_source/lp.h 4.9
SCCS-vsn: usr.sbin/lpr/lpd/printjob.c 4.24
SCCS-vsn: usr.sbin/lpr/common_source/common.c 4.9

usr/src/usr.sbin/lpr/common_source/common.c
usr/src/usr.sbin/lpr/common_source/lp.h
usr/src/usr.sbin/lpr/lpd/printjob.c

index 63b740e..ada58c8 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)common.c   4.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)common.c   4.9 (Berkeley) %G%";
 #endif
 
 /*
 #endif
 
 /*
@@ -35,6 +35,7 @@ short SC;             /* suppress multiple copies */
 short  SF;             /* suppress FF on each print job */
 short  SH;             /* suppress header page */
 short  SB;             /* short banner instead of normal header */
 short  SF;             /* suppress FF on each print job */
 short  SH;             /* suppress header page */
 short  SB;             /* short banner instead of normal header */
+short  HL;             /* print header last */
 short  RW;             /* open LP for reading and writing */
 short  PW;             /* page width */
 short  PL;             /* page length */
 short  RW;             /* open LP for reading and writing */
 short  PW;             /* page width */
 short  PL;             /* page length */
index 293f863..f86e23b 100644 (file)
@@ -1,4 +1,4 @@
-/*     lp.h    4.8     85/02/07        */
+/*     lp.h    4.9     85/02/27        */
 /*
  * Global definitions for the line printer system.
  */
 /*
  * Global definitions for the line printer system.
  */
@@ -48,6 +48,7 @@ extern short  SC;             /* suppress multiple copies */
 extern short   SF;             /* suppress FF on each print job */
 extern short   SH;             /* suppress header page */
 extern short   SB;             /* short banner instead of normal header */
 extern short   SF;             /* suppress FF on each print job */
 extern short   SH;             /* suppress header page */
 extern short   SB;             /* short banner instead of normal header */
+extern short   HL;             /* print header last */
 extern short   RW;             /* open LP for reading and writing */
 extern short   PW;             /* page width */
 extern short   PX;             /* page width in pixels */
 extern short   RW;             /* open LP for reading and writing */
 extern short   PW;             /* page width */
 extern short   PX;             /* page width in pixels */
index 0d1dc74..c152f17 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)printjob.c 4.23 (Berkeley) %G%";
+static char sccsid[] = "@(#)printjob.c 4.24 (Berkeley) %G%";
 #endif
 
 /*
 #endif
 
 /*
@@ -318,7 +318,7 @@ printit(file)
                        continue;
 
                case 'L':       /* identification line */
                        continue;
 
                case 'L':       /* identification line */
-                       if (!SH)
+                       if (!SH && !HL)
                                banner(line+1, jobname);
                        continue;
 
                                banner(line+1, jobname);
                        continue;
 
@@ -367,6 +367,11 @@ pass2:
        fseek(cfp, 0L, 0);
        while (getline(cfp))
                switch (line[0]) {
        fseek(cfp, 0L, 0);
        while (getline(cfp))
                switch (line[0]) {
+               case 'L':       /* identification line */
+                       if (!SH && HL)
+                               banner(line+1, jobname);
+                       continue;
+
                case 'M':
                        if (bombed < NOACCT)    /* already sent if >= NOACCT */
                                sendmail(line+1, bombed);
                case 'M':
                        if (bombed < NOACCT)    /* already sent if >= NOACCT */
                                sendmail(line+1, bombed);
@@ -1041,6 +1046,7 @@ init()
        SF = pgetflag("sf");
        SH = pgetflag("sh");
        SB = pgetflag("sb");
        SF = pgetflag("sf");
        SH = pgetflag("sh");
        SB = pgetflag("sb");
+       HL = pgetflag("hl");
        RW = pgetflag("rw");
        BR = pgetnum("br");
        if ((FC = pgetnum("fc")) < 0)
        RW = pgetflag("rw");
        BR = pgetnum("br");
        if ((FC = pgetnum("fc")) < 0)