1 /* 2 * Copyright (c) 1983 Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)lp.h 5.6 (Berkeley) 07/21/92 8 */ 9 10 /* 11 * Global definitions for the line printer system. 12 */ 13 14 extern int DU; /* daeomon user-id */ 15 extern int MX; /* maximum number of blocks to copy */ 16 extern int MC; /* maximum number of copies allowed */ 17 extern char *LP; /* line printer device name */ 18 extern char *RM; /* remote machine name */ 19 extern char *RG; /* restricted group */ 20 extern char *RP; /* remote printer name */ 21 extern char *LO; /* lock file name */ 22 extern char *ST; /* status file name */ 23 extern char *SD; /* spool directory */ 24 extern char *AF; /* accounting file */ 25 extern char *LF; /* log file for error messages */ 26 extern char *OF; /* name of output filter (created once) */ 27 extern char *IF; /* name of input filter (created per job) */ 28 extern char *RF; /* name of fortran text filter (per job) */ 29 extern char *TF; /* name of troff(1) filter (per job) */ 30 extern char *NF; /* name of ditroff(1) filter (per job) */ 31 extern char *DF; /* name of tex filter (per job) */ 32 extern char *GF; /* name of graph(1G) filter (per job) */ 33 extern char *VF; /* name of raster filter (per job) */ 34 extern char *CF; /* name of cifplot filter (per job) */ 35 extern char *FF; /* form feed string */ 36 extern char *TR; /* trailer string to be output when Q empties */ 37 extern short SC; /* suppress multiple copies */ 38 extern short SF; /* suppress FF on each print job */ 39 extern short SH; /* suppress header page */ 40 extern short SB; /* short banner instead of normal header */ 41 extern short HL; /* print header last */ 42 extern short RW; /* open LP for reading and writing */ 43 extern short PW; /* page width */ 44 extern short PX; /* page width in pixels */ 45 extern short PY; /* page length in pixels */ 46 extern short PL; /* page length */ 47 extern short BR; /* baud rate if lp is a tty */ 48 extern int FC; /* flags to clear if lp is a tty */ 49 extern int FS; /* flags to set if lp is a tty */ 50 extern int XC; /* flags to clear for local mode */ 51 extern int XS; /* flags to set for local mode */ 52 extern short RS; /* restricted to those with local accounts */ 53 54 extern char line[BUFSIZ]; 55 extern char pbuf[]; /* buffer for printcap entry */ 56 extern char *bp; /* pointer into ebuf for pgetent() */ 57 extern char *name; /* program name */ 58 extern char *printer; /* printer name */ 59 /* host machine name */ 60 extern char host[MAXHOSTNAMELEN]; 61 extern char *from; /* client's machine name */ 62 extern int sendtorem; /* are we sending to a remote? */ 63 64 /* 65 * Structure used for building a sorted list of control files. 66 */ 67 struct queue { 68 time_t q_time; /* modification time */ 69 char q_name[MAXNAMLEN+1]; /* control file name */ 70 }; 71 72 #include <sys/cdefs.h> 73 struct dirent; 74 75 void blankfill __P((int)); 76 char *checkremote __P((void)); 77 int chk __P((char *)); 78 void displayq __P((int)); 79 void dump __P((char *, char *, int)); 80 void endprent __P((void)); 81 void fatal __P((const char *, ...)); 82 int getline __P((FILE *)); 83 int getport __P((char *)); 84 int getprent __P((char *)); 85 int getq __P((struct queue *(*[]))); 86 void header __P((void)); 87 void inform __P((char *)); 88 int inlist __P((char *, char *)); 89 int iscf __P((struct dirent *)); 90 int isowner __P((char *, char *)); 91 void ldump __P((char *, char *, int)); 92 int lockchk __P((char *)); 93 void prank __P((int)); 94 void process __P((char *)); 95 void rmjob __P((void)); 96 void rmremote __P((void)); 97 void show __P((char *, char *, int)); 98 int startdaemon __P((char *)); 99 int pgetent __P((char *, char *)); 100 int pgetflag __P((char *)); 101 int pgetnum __P((char *)); 102 char *pgetstr __P((char *, char **)); 103 int pnamatch __P((char *)); 104 int pnchktc __P((void)); 105 void warn __P((void)); 106