1*12118Sralph /*	lp.h	4.1	83/04/29	*/
2*12118Sralph /*
3*12118Sralph  * Global definitions for the line printer system.
4*12118Sralph  */
5*12118Sralph 
6*12118Sralph #include <stdio.h>
7*12118Sralph #include <sys/types.h>
8*12118Sralph #include <sys/file.h>
9*12118Sralph #include <sys/dir.h>
10*12118Sralph #include <sys/stat.h>
11*12118Sralph #include <sys/socket.h>
12*12118Sralph #include <netinet/in.h>
13*12118Sralph #include <netdb.h>
14*12118Sralph #include <pwd.h>
15*12118Sralph #include <signal.h>
16*12118Sralph #include <wait.h>
17*12118Sralph #include <sgtty.h>
18*12118Sralph #include <ctype.h>
19*12118Sralph #include <errno.h>
20*12118Sralph #include "lp.local.h"
21*12118Sralph 
22*12118Sralph extern int	DU;		/* daeomon user-id */
23*12118Sralph extern int	MX;		/* maximum number of blocks to copy */
24*12118Sralph extern char	*LP;		/* line printer device name */
25*12118Sralph extern char	*RM;		/* remote machine name */
26*12118Sralph extern char	*RP;		/* remote printer name */
27*12118Sralph extern char	*LO;		/* lock file name */
28*12118Sralph extern char	*ST;		/* status file name */
29*12118Sralph extern char	*SD;		/* spool directory */
30*12118Sralph extern char	*AF;		/* accounting file */
31*12118Sralph extern char	*LF;		/* log file for error messages */
32*12118Sralph extern char	*OF;		/* name of output filter (created once) */
33*12118Sralph extern char	*IF;		/* name of input filter (created per job) */
34*12118Sralph extern char	*TF;		/* name of troff(1) filter (per job) */
35*12118Sralph extern char	*DF;		/* name of tex filter (per job) */
36*12118Sralph extern char	*GF;		/* name of graph(1G) filter (per job) */
37*12118Sralph extern char	*VF;		/* name of raster filter (per job) */
38*12118Sralph extern char	*CF;		/* name of cifplot filter (per job) */
39*12118Sralph extern char	*FF;		/* form feed string */
40*12118Sralph extern char	*TR;		/* trailer string to be output when Q empties */
41*12118Sralph extern short	SF;		/* suppress FF on each print job */
42*12118Sralph extern short	SH;		/* suppress header page */
43*12118Sralph extern short	SB;		/* short banner instead of normal header */
44*12118Sralph extern short	RW;		/* open LP for reading and writing */
45*12118Sralph extern short	PW;		/* page width */
46*12118Sralph extern short	PL;		/* page length */
47*12118Sralph extern short	BR;		/* baud rate if lp is a tty */
48*12118Sralph extern short	FC;		/* flags to clear if lp is a tty */
49*12118Sralph extern short	FS;		/* flags to set if lp is a tty */
50*12118Sralph extern short	XC;		/* flags to clear for local mode */
51*12118Sralph extern short	XS;		/* flags to set for local mode */
52*12118Sralph 
53*12118Sralph extern char	line[BUFSIZ];
54*12118Sralph extern char	pbuf[];		/* buffer for printcap entry */
55*12118Sralph extern char	*bp;		/* pointer into ebuf for pgetent() */
56*12118Sralph extern char	*name;		/* program name */
57*12118Sralph extern char	*printer;	/* printer name */
58*12118Sralph extern char	host[32];	/* host machine name */
59*12118Sralph extern char	*from;		/* client's machine name */
60*12118Sralph extern int	errno;
61*12118Sralph 
62*12118Sralph /*
63*12118Sralph  * Structure used for building a sorted list of control files.
64*12118Sralph  */
65*12118Sralph struct queue {
66*12118Sralph 	time_t	q_time;			/* modification time */
67*12118Sralph 	char	q_name[MAXNAMLEN+1];	/* control file name */
68*12118Sralph };
69*12118Sralph 
70*12118Sralph char	*pgetstr();
71*12118Sralph char	*malloc();
72*12118Sralph char	*getenv();
73*12118Sralph char	*index();
74*12118Sralph char	*rindex();
75