fixed lprm segmentation fault when remote is down.
[unix-history] / usr / src / usr.sbin / lpr / common_source / lp.h
CommitLineData
4d4caa50 1/* lp.h 4.2 83/05/13 */
809f6548
RC
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
22extern int DU; /* daeomon user-id */
23extern int MX; /* maximum number of blocks to copy */
24extern char *LP; /* line printer device name */
25extern char *RM; /* remote machine name */
26extern char *RP; /* remote printer name */
27extern char *LO; /* lock file name */
28extern char *ST; /* status file name */
29extern char *SD; /* spool directory */
30extern char *AF; /* accounting file */
31extern char *LF; /* log file for error messages */
32extern char *OF; /* name of output filter (created once) */
33extern char *IF; /* name of input filter (created per job) */
4d4caa50 34extern char *RF; /* name of fortran text filter (per job) */
809f6548
RC
35extern char *TF; /* name of troff(1) filter (per job) */
36extern char *DF; /* name of tex filter (per job) */
37extern char *GF; /* name of graph(1G) filter (per job) */
38extern char *VF; /* name of raster filter (per job) */
39extern char *CF; /* name of cifplot filter (per job) */
40extern char *FF; /* form feed string */
41extern char *TR; /* trailer string to be output when Q empties */
42extern short SF; /* suppress FF on each print job */
43extern short SH; /* suppress header page */
44extern short SB; /* short banner instead of normal header */
45extern short RW; /* open LP for reading and writing */
46extern short PW; /* page width */
4d4caa50
RC
47extern short PX; /* page width in pixels */
48extern short PY; /* page length in pixels */
809f6548
RC
49extern short PL; /* page length */
50extern short BR; /* baud rate if lp is a tty */
51extern short FC; /* flags to clear if lp is a tty */
52extern short FS; /* flags to set if lp is a tty */
53extern short XC; /* flags to clear for local mode */
54extern short XS; /* flags to set for local mode */
4d4caa50 55extern short RS; /* restricted to those with local accounts */
809f6548
RC
56
57extern char line[BUFSIZ];
58extern char pbuf[]; /* buffer for printcap entry */
59extern char *bp; /* pointer into ebuf for pgetent() */
60extern char *name; /* program name */
61extern char *printer; /* printer name */
62extern char host[32]; /* host machine name */
63extern char *from; /* client's machine name */
64extern int errno;
65
66/*
67 * Structure used for building a sorted list of control files.
68 */
69struct queue {
70 time_t q_time; /* modification time */
71 char q_name[MAXNAMLEN+1]; /* control file name */
72};
73
74char *pgetstr();
75char *malloc();
76char *getenv();
77char *index();
78char *rindex();