lp.h revision 1.7 1 /* $NetBSD: lp.h,v 1.7 1995/11/15 22:23:10 pk Exp $ */
2 /*
3 * Copyright (c) 1983, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed by the University of
17 * California, Berkeley and its contributors.
18 * 4. Neither the name of the University nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)lp.h 8.1 (Berkeley) 6/6/93
35 */
36
37
38 /*
39 * Global definitions for the line printer system.
40 */
41
42 extern char *AF; /* accounting file */
43 extern long BR; /* baud rate if lp is a tty */
44 extern char *CF; /* name of cifplot filter (per job) */
45 extern char *DF; /* name of tex filter (per job) */
46 extern long DU; /* daeomon user-id */
47 extern long FC; /* flags to clear if lp is a tty */
48 extern char *FF; /* form feed string */
49 extern long FS; /* flags to set if lp is a tty */
50 extern char *GF; /* name of graph(1G) filter (per job) */
51 extern long HL; /* print header last */
52 extern char *IF; /* name of input filter (created per job) */
53 extern char *LF; /* log file for error messages */
54 extern char *LO; /* lock file name */
55 extern char *LP; /* line printer device name */
56 extern long MC; /* maximum number of copies allowed */
57 extern char *MS; /* stty flags to set if lp is a tty */
58 extern long MX; /* maximum number of blocks to copy */
59 extern char *NF; /* name of ditroff(1) filter (per job) */
60 extern char *OF; /* name of output filter (created once) */
61 extern long PL; /* page length */
62 extern long PW; /* page width */
63 extern long PX; /* page width in pixels */
64 extern long PY; /* page length in pixels */
65 extern char *RF; /* name of fortran text filter (per job) */
66 extern char *RG; /* restricted group */
67 extern char *RM; /* remote machine name */
68 extern char *RP; /* remote printer name */
69 extern long RS; /* restricted to those with local accounts */
70 extern long RW; /* open LP for reading and writing */
71 extern long SB; /* short banner instead of normal header */
72 extern long SC; /* suppress multiple copies */
73 extern char *SD; /* spool directory */
74 extern long SF; /* suppress FF on each print job */
75 extern long SH; /* suppress header page */
76 extern char *ST; /* status file name */
77 extern char *TF; /* name of troff(1) filter (per job) */
78 extern char *TR; /* trailer string to be output when Q empties */
79 extern char *VF; /* name of raster filter (per job) */
80 extern long XC; /* flags to clear for local mode */
81 extern long XS; /* flags to set for local mode */
82
83 extern char line[BUFSIZ];
84 extern char *bp; /* pointer into printcap buffer */
85 extern char *name; /* program name */
86 extern char *printer; /* printer name */
87 /* host machine name */
88 extern char host[MAXHOSTNAMELEN];
89 extern char *from; /* client's machine name */
90 extern int sendtorem; /* are we sending to a remote? */
91 extern char *printcapdb[]; /* printcap database array */
92 /*
93 * Structure used for building a sorted list of control files.
94 */
95 struct queue {
96 time_t q_time; /* modification time */
97 char q_name[MAXNAMLEN+1]; /* control file name */
98 };
99
100 #include <sys/cdefs.h>
101
102 __BEGIN_DECLS
103 struct dirent;
104
105 void blankfill __P((int));
106 char *checkremote __P((void));
107 int chk __P((char *));
108 void displayq __P((int));
109 void dump __P((char *, char *, int));
110 void fatal __P((const char *, ...));
111 int getline __P((FILE *));
112 int getport __P((char *));
113 int getq __P((struct queue *(*[])));
114 void header __P((void));
115 void inform __P((char *));
116 int inlist __P((char *, char *));
117 int iscf __P((struct dirent *));
118 int isowner __P((char *, char *));
119 void ldump __P((char *, char *, int));
120 int lockchk __P((char *));
121 void prank __P((int));
122 void process __P((char *));
123 void rmjob __P((void));
124 void rmremote __P((void));
125 void show __P((char *, char *, int));
126 int startdaemon __P((char *));
127 void warn __P((void));
128 __END_DECLS
129