112118Sralph /*
222441Sdist  * Copyright (c) 1983 Regents of the University of California.
334203Sbostic  * All rights reserved.
422441Sdist  *
5*56120Selan  * Redistribution and use in source and binary forms, with or without
6*56120Selan  * modification, are permitted provided that the following conditions
7*56120Selan  * are met:
8*56120Selan  * 1. Redistributions of source code must retain the above copyright
9*56120Selan  *    notice, this list of conditions and the following disclaimer.
10*56120Selan  * 2. Redistributions in binary form must reproduce the above copyright
11*56120Selan  *    notice, this list of conditions and the following disclaimer in the
12*56120Selan  *    documentation and/or other materials provided with the distribution.
13*56120Selan  * 3. All advertising materials mentioning features or use of this software
14*56120Selan  *    must display the following acknowledgement:
15*56120Selan  *	This product includes software developed by the University of
16*56120Selan  *	California, Berkeley and its contributors.
17*56120Selan  * 4. Neither the name of the University nor the names of its contributors
18*56120Selan  *    may be used to endorse or promote products derived from this software
19*56120Selan  *    without specific prior written permission.
2034203Sbostic  *
21*56120Selan  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22*56120Selan  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23*56120Selan  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24*56120Selan  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25*56120Selan  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26*56120Selan  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27*56120Selan  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28*56120Selan  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29*56120Selan  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30*56120Selan  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31*56120Selan  * SUCH DAMAGE.
32*56120Selan  *
33*56120Selan  *	@(#)lp.h	5.7 (Berkeley) 8/6/92
3422441Sdist  */
3522441Sdist 
3622441Sdist /*
3712118Sralph  * Global definitions for the line printer system.
3812118Sralph  */
3912118Sralph 
40*56120Selan extern char	*AF;		/* accounting file */
41*56120Selan extern long	 BR;		/* baud rate if lp is a tty */
42*56120Selan extern char	*CF;		/* name of cifplot filter (per job) */
43*56120Selan extern char	*DF;		/* name of tex filter (per job) */
44*56120Selan extern long	 DU;		/* daeomon user-id */
45*56120Selan extern long	 FC;		/* flags to clear if lp is a tty */
46*56120Selan extern char	*FF;		/* form feed string */
47*56120Selan extern long	 FS;		/* flags to set if lp is a tty */
48*56120Selan extern char	*GF;		/* name of graph(1G) filter (per job) */
49*56120Selan extern long	 HL;		/* print header last */
50*56120Selan extern char	*IF;		/* name of input filter (created per job) */
51*56120Selan extern char	*LF;		/* log file for error messages */
52*56120Selan extern char	*LO;		/* lock file name */
5312118Sralph extern char	*LP;		/* line printer device name */
54*56120Selan extern long	 MC;		/* maximum number of copies allowed */
55*56120Selan extern long      MX;		/* maximum number of blocks to copy */
56*56120Selan extern char	*NF;		/* name of ditroff(1) filter (per job) */
57*56120Selan extern char	*OF;		/* name of output filter (created once) */
58*56120Selan extern long	 PL;		/* page length */
59*56120Selan extern long	 PW;		/* page width */
60*56120Selan extern long	 PX;		/* page width in pixels */
61*56120Selan extern long	 PY;		/* page length in pixels */
62*56120Selan extern char	*RF;		/* name of fortran text filter (per job) */
63*56120Selan extern char	*RG;		/* restricted group */
6412118Sralph extern char	*RM;		/* remote machine name */
6512118Sralph extern char	*RP;		/* remote printer name */
66*56120Selan extern long	 RS;		/* restricted to those with local accounts */
67*56120Selan extern long	 RW;		/* open LP for reading and writing */
68*56120Selan extern long	 SB;		/* short banner instead of normal header */
69*56120Selan extern long	 SC;		/* suppress multiple copies */
70*56120Selan extern char	*SD;		/* spool directory */
71*56120Selan extern long	 SF;		/* suppress FF on each print job */
72*56120Selan extern long	 SH;		/* suppress header page */
7312118Sralph extern char	*ST;		/* status file name */
7412118Sralph extern char	*TF;		/* name of troff(1) filter (per job) */
75*56120Selan extern char	*TR;		/* trailer string to be output when Q empties */
7612118Sralph extern char	*VF;		/* name of raster filter (per job) */
77*56120Selan extern long	 XC;		/* flags to clear for local mode */
78*56120Selan extern long	 XS;		/* flags to set for local mode */
7912118Sralph 
8012118Sralph extern char	line[BUFSIZ];
81*56120Selan extern char	*bp;		/* pointer into printcap buffer */
8212118Sralph extern char	*name;		/* program name */
8312118Sralph extern char	*printer;	/* printer name */
8455470Sbostic 				/* host machine name */
8555470Sbostic extern char	host[MAXHOSTNAMELEN];
8612118Sralph extern char	*from;		/* client's machine name */
8738736Stef extern int	sendtorem;	/* are we sending to a remote? */
88*56120Selan extern char	*printcapdb[];  /* printcap database array */
8912118Sralph /*
9012118Sralph  * Structure used for building a sorted list of control files.
9112118Sralph  */
9212118Sralph struct queue {
9312118Sralph 	time_t	q_time;			/* modification time */
9412118Sralph 	char	q_name[MAXNAMLEN+1];	/* control file name */
9512118Sralph };
9612118Sralph 
9755470Sbostic #include <sys/cdefs.h>
98*56120Selan 
99*56120Selan _BEGIN_DECLS
10055470Sbostic struct dirent;
10155470Sbostic 
10255470Sbostic void     blankfill __P((int));
10355470Sbostic char	*checkremote __P((void));
10455470Sbostic int      chk __P((char *));
10555470Sbostic void     displayq __P((int));
10655470Sbostic void     dump __P((char *, char *, int));
10755470Sbostic void	 fatal __P((const char *, ...));
10855470Sbostic int	 getline __P((FILE *));
10955470Sbostic int	 getport __P((char *));
11055470Sbostic int	 getq __P((struct queue *(*[])));
11155470Sbostic void     header __P((void));
11255470Sbostic void     inform __P((char *));
11355470Sbostic int      inlist __P((char *, char *));
11455470Sbostic int      iscf __P((struct dirent *));
11555470Sbostic int      isowner __P((char *, char *));
11655470Sbostic void     ldump __P((char *, char *, int));
11755470Sbostic int      lockchk __P((char *));
11855470Sbostic void     prank __P((int));
11955470Sbostic void     process __P((char *));
12055470Sbostic void     rmjob __P((void));
12155470Sbostic void     rmremote __P((void));
12255470Sbostic void     show __P((char *, char *, int));
12355470Sbostic int      startdaemon __P((char *));
12455470Sbostic void     warn __P((void));
125*56120Selan _END_DECLS
126