new copyright notice
[unix-history] / usr / src / usr.sbin / lpr / common_source / lp.h
CommitLineData
d0aeaf5a
DF
1/*
2 * Copyright (c) 1983 Regents of the University of California.
9d85c861 3 * All rights reserved.
d0aeaf5a 4 *
417f7a11 5 * %sccs.include.redist.c%
9d85c861 6 *
417f7a11 7 * @(#)lp.h 5.5 (Berkeley) %G%
d0aeaf5a
DF
8 */
9
809f6548
RC
10/*
11 * Global definitions for the line printer system.
12 */
13
14#include <stdio.h>
51673d52 15#include <sys/param.h>
809f6548
RC
16#include <sys/file.h>
17#include <sys/dir.h>
18#include <sys/stat.h>
19#include <sys/socket.h>
8fed920b 20#include <sys/un.h>
809f6548
RC
21#include <netinet/in.h>
22#include <netdb.h>
23#include <pwd.h>
51673d52 24#include <syslog.h>
809f6548 25#include <signal.h>
25db97f6 26#include <sys/wait.h>
809f6548
RC
27#include <sgtty.h>
28#include <ctype.h>
29#include <errno.h>
30#include "lp.local.h"
31
32extern int DU; /* daeomon user-id */
33extern int MX; /* maximum number of blocks to copy */
c6d1c018 34extern int MC; /* maximum number of copies allowed */
809f6548
RC
35extern char *LP; /* line printer device name */
36extern char *RM; /* remote machine name */
6e4bbe1d 37extern char *RG; /* restricted group */
809f6548
RC
38extern char *RP; /* remote printer name */
39extern char *LO; /* lock file name */
40extern char *ST; /* status file name */
41extern char *SD; /* spool directory */
42extern char *AF; /* accounting file */
43extern char *LF; /* log file for error messages */
44extern char *OF; /* name of output filter (created once) */
45extern char *IF; /* name of input filter (created per job) */
4d4caa50 46extern char *RF; /* name of fortran text filter (per job) */
809f6548 47extern char *TF; /* name of troff(1) filter (per job) */
a4f59913 48extern char *NF; /* name of ditroff(1) filter (per job) */
809f6548
RC
49extern char *DF; /* name of tex filter (per job) */
50extern char *GF; /* name of graph(1G) filter (per job) */
51extern char *VF; /* name of raster filter (per job) */
52extern char *CF; /* name of cifplot filter (per job) */
53extern char *FF; /* form feed string */
54extern char *TR; /* trailer string to be output when Q empties */
c6d1c018 55extern short SC; /* suppress multiple copies */
809f6548
RC
56extern short SF; /* suppress FF on each print job */
57extern short SH; /* suppress header page */
58extern short SB; /* short banner instead of normal header */
1e7998ee 59extern short HL; /* print header last */
809f6548
RC
60extern short RW; /* open LP for reading and writing */
61extern short PW; /* page width */
4d4caa50
RC
62extern short PX; /* page width in pixels */
63extern short PY; /* page length in pixels */
809f6548
RC
64extern short PL; /* page length */
65extern short BR; /* baud rate if lp is a tty */
c6d1c018
RC
66extern int FC; /* flags to clear if lp is a tty */
67extern int FS; /* flags to set if lp is a tty */
68extern int XC; /* flags to clear for local mode */
69extern int XS; /* flags to set for local mode */
4d4caa50 70extern short RS; /* restricted to those with local accounts */
809f6548
RC
71
72extern char line[BUFSIZ];
73extern char pbuf[]; /* buffer for printcap entry */
74extern char *bp; /* pointer into ebuf for pgetent() */
75extern char *name; /* program name */
76extern char *printer; /* printer name */
77extern char host[32]; /* host machine name */
78extern char *from; /* client's machine name */
b5eb1530 79extern int sendtorem; /* are we sending to a remote? */
809f6548
RC
80extern int errno;
81
82/*
83 * Structure used for building a sorted list of control files.
84 */
85struct queue {
86 time_t q_time; /* modification time */
87 char q_name[MAXNAMLEN+1]; /* control file name */
88};
89
90char *pgetstr();
91char *malloc();
92char *getenv();
93char *index();
94char *rindex();
b5eb1530 95char *checkremote();