BSD 4_3 release
[unix-history] / usr / src / usr.lib / lpr / common.c
index c41603d..9f01087 100644 (file)
@@ -1,6 +1,12 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)common.c   4.8 (Berkeley) 7/17/83";
-#endif
+static char sccsid[] = "@(#)common.c   5.2 (Berkeley) 5/6/86";
+#endif not lint
 
 /*
  * Routines and data common to all the line printer functions.
 
 /*
  * Routines and data common to all the line printer functions.
@@ -35,6 +41,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 */
@@ -109,28 +116,6 @@ retry:
        return(s);
 }
 
        return(s);
 }
 
-rresvport(alport)
-       int *alport;
-{
-       struct sockaddr_in sin;
-       int s;
-
-       sin.sin_family = AF_INET;
-       sin.sin_addr.s_addr = 0;
-       s = socket(AF_INET, SOCK_STREAM, 0);
-       if (s < 0)
-               return(-1);
-       for (; *alport > IPPORT_RESERVED/2; (*alport)--) {
-               sin.sin_port = htons((u_short) *alport);
-               if (bind(s, (caddr_t)&sin, sizeof(sin), 0) >= 0)
-                       return(s);
-               if (errno != EADDRINUSE && errno != EADDRNOTAVAIL)
-                       break;
-       }
-       (void) close(s);
-       return(-1);
-}
-
 /*
  * Getline reads a line from the control file cfp, removes tabs, converts
  *  new-line to null and leaves it in line.
 /*
  * Getline reads a line from the control file cfp, removes tabs, converts
  *  new-line to null and leaves it in line.