update the status file when printing is disabled
[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 *
9d85c861 5 * Redistribution and use in source and binary forms are permitted
a399f6c8
KB
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
9d85c861 16 *
a399f6c8 17 * @(#)lp.h 5.3 (Berkeley) %G%
d0aeaf5a
DF
18 */
19
809f6548
RC
20/*
21 * Global definitions for the line printer system.
22 */
23
24#include <stdio.h>
51673d52 25#include <sys/param.h>
809f6548
RC
26#include <sys/file.h>
27#include <sys/dir.h>
28#include <sys/stat.h>
29#include <sys/socket.h>
8fed920b 30#include <sys/un.h>
809f6548
RC
31#include <netinet/in.h>
32#include <netdb.h>
33#include <pwd.h>
51673d52 34#include <syslog.h>
809f6548 35#include <signal.h>
25db97f6 36#include <sys/wait.h>
809f6548
RC
37#include <sgtty.h>
38#include <ctype.h>
39#include <errno.h>
40#include "lp.local.h"
41
42extern int DU; /* daeomon user-id */
43extern int MX; /* maximum number of blocks to copy */
c6d1c018 44extern int MC; /* maximum number of copies allowed */
809f6548
RC
45extern char *LP; /* line printer device name */
46extern char *RM; /* remote machine name */
6e4bbe1d 47extern char *RG; /* restricted group */
809f6548
RC
48extern char *RP; /* remote printer name */
49extern char *LO; /* lock file name */
50extern char *ST; /* status file name */
51extern char *SD; /* spool directory */
52extern char *AF; /* accounting file */
53extern char *LF; /* log file for error messages */
54extern char *OF; /* name of output filter (created once) */
55extern char *IF; /* name of input filter (created per job) */
4d4caa50 56extern char *RF; /* name of fortran text filter (per job) */
809f6548 57extern char *TF; /* name of troff(1) filter (per job) */
a4f59913 58extern char *NF; /* name of ditroff(1) filter (per job) */
809f6548
RC
59extern char *DF; /* name of tex filter (per job) */
60extern char *GF; /* name of graph(1G) filter (per job) */
61extern char *VF; /* name of raster filter (per job) */
62extern char *CF; /* name of cifplot filter (per job) */
63extern char *FF; /* form feed string */
64extern char *TR; /* trailer string to be output when Q empties */
c6d1c018 65extern short SC; /* suppress multiple copies */
809f6548
RC
66extern short SF; /* suppress FF on each print job */
67extern short SH; /* suppress header page */
68extern short SB; /* short banner instead of normal header */
1e7998ee 69extern short HL; /* print header last */
809f6548
RC
70extern short RW; /* open LP for reading and writing */
71extern short PW; /* page width */
4d4caa50
RC
72extern short PX; /* page width in pixels */
73extern short PY; /* page length in pixels */
809f6548
RC
74extern short PL; /* page length */
75extern short BR; /* baud rate if lp is a tty */
c6d1c018
RC
76extern int FC; /* flags to clear if lp is a tty */
77extern int FS; /* flags to set if lp is a tty */
78extern int XC; /* flags to clear for local mode */
79extern int XS; /* flags to set for local mode */
4d4caa50 80extern short RS; /* restricted to those with local accounts */
809f6548
RC
81
82extern char line[BUFSIZ];
83extern char pbuf[]; /* buffer for printcap entry */
84extern char *bp; /* pointer into ebuf for pgetent() */
85extern char *name; /* program name */
86extern char *printer; /* printer name */
87extern char host[32]; /* host machine name */
88extern char *from; /* client's machine name */
89extern int errno;
90
91/*
92 * Structure used for building a sorted list of control files.
93 */
94struct queue {
95 time_t q_time; /* modification time */
96 char q_name[MAXNAMLEN+1]; /* control file name */
97};
98
99char *pgetstr();
100char *malloc();
101char *getenv();
102char *index();
103char *rindex();