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