112118Sralph /* 222441Sdist * Copyright (c) 1983 Regents of the University of California. 334203Sbostic * All rights reserved. 422441Sdist * 542801Sbostic * %sccs.include.redist.c% 634203Sbostic * 7*55470Sbostic * @(#)lp.h 5.6 (Berkeley) 07/21/92 822441Sdist */ 922441Sdist 1022441Sdist /* 1112118Sralph * Global definitions for the line printer system. 1212118Sralph */ 1312118Sralph 1412118Sralph extern int DU; /* daeomon user-id */ 1512118Sralph extern int MX; /* maximum number of blocks to copy */ 1613170Sralph extern int MC; /* maximum number of copies allowed */ 1712118Sralph extern char *LP; /* line printer device name */ 1812118Sralph extern char *RM; /* remote machine name */ 1917929Smiriam extern char *RG; /* restricted group */ 2012118Sralph extern char *RP; /* remote printer name */ 2112118Sralph extern char *LO; /* lock file name */ 2212118Sralph extern char *ST; /* status file name */ 2312118Sralph extern char *SD; /* spool directory */ 2412118Sralph extern char *AF; /* accounting file */ 2512118Sralph extern char *LF; /* log file for error messages */ 2612118Sralph extern char *OF; /* name of output filter (created once) */ 2712118Sralph extern char *IF; /* name of input filter (created per job) */ 2812433Sralph extern char *RF; /* name of fortran text filter (per job) */ 2912118Sralph extern char *TF; /* name of troff(1) filter (per job) */ 3013235Sralph extern char *NF; /* name of ditroff(1) filter (per job) */ 3112118Sralph extern char *DF; /* name of tex filter (per job) */ 3212118Sralph extern char *GF; /* name of graph(1G) filter (per job) */ 3312118Sralph extern char *VF; /* name of raster filter (per job) */ 3412118Sralph extern char *CF; /* name of cifplot filter (per job) */ 3512118Sralph extern char *FF; /* form feed string */ 3612118Sralph extern char *TR; /* trailer string to be output when Q empties */ 3713170Sralph extern short SC; /* suppress multiple copies */ 3812118Sralph extern short SF; /* suppress FF on each print job */ 3912118Sralph extern short SH; /* suppress header page */ 4012118Sralph extern short SB; /* short banner instead of normal header */ 4118127Sralph extern short HL; /* print header last */ 4212118Sralph extern short RW; /* open LP for reading and writing */ 4312118Sralph extern short PW; /* page width */ 4412433Sralph extern short PX; /* page width in pixels */ 4512433Sralph extern short PY; /* page length in pixels */ 4612118Sralph extern short PL; /* page length */ 4712118Sralph extern short BR; /* baud rate if lp is a tty */ 4813170Sralph extern int FC; /* flags to clear if lp is a tty */ 4913170Sralph extern int FS; /* flags to set if lp is a tty */ 5013170Sralph extern int XC; /* flags to clear for local mode */ 5113170Sralph extern int XS; /* flags to set for local mode */ 5212433Sralph extern short RS; /* restricted to those with local accounts */ 5312118Sralph 5412118Sralph extern char line[BUFSIZ]; 5512118Sralph extern char pbuf[]; /* buffer for printcap entry */ 5612118Sralph extern char *bp; /* pointer into ebuf for pgetent() */ 5712118Sralph extern char *name; /* program name */ 5812118Sralph extern char *printer; /* printer name */ 59*55470Sbostic /* host machine name */ 60*55470Sbostic extern char host[MAXHOSTNAMELEN]; 6112118Sralph extern char *from; /* client's machine name */ 6238736Stef extern int sendtorem; /* are we sending to a remote? */ 6312118Sralph 6412118Sralph /* 6512118Sralph * Structure used for building a sorted list of control files. 6612118Sralph */ 6712118Sralph struct queue { 6812118Sralph time_t q_time; /* modification time */ 6912118Sralph char q_name[MAXNAMLEN+1]; /* control file name */ 7012118Sralph }; 7112118Sralph 72*55470Sbostic #include <sys/cdefs.h> 73*55470Sbostic struct dirent; 74*55470Sbostic 75*55470Sbostic void blankfill __P((int)); 76*55470Sbostic char *checkremote __P((void)); 77*55470Sbostic int chk __P((char *)); 78*55470Sbostic void displayq __P((int)); 79*55470Sbostic void dump __P((char *, char *, int)); 80*55470Sbostic void endprent __P((void)); 81*55470Sbostic void fatal __P((const char *, ...)); 82*55470Sbostic int getline __P((FILE *)); 83*55470Sbostic int getport __P((char *)); 84*55470Sbostic int getprent __P((char *)); 85*55470Sbostic int getq __P((struct queue *(*[]))); 86*55470Sbostic void header __P((void)); 87*55470Sbostic void inform __P((char *)); 88*55470Sbostic int inlist __P((char *, char *)); 89*55470Sbostic int iscf __P((struct dirent *)); 90*55470Sbostic int isowner __P((char *, char *)); 91*55470Sbostic void ldump __P((char *, char *, int)); 92*55470Sbostic int lockchk __P((char *)); 93*55470Sbostic void prank __P((int)); 94*55470Sbostic void process __P((char *)); 95*55470Sbostic void rmjob __P((void)); 96*55470Sbostic void rmremote __P((void)); 97*55470Sbostic void show __P((char *, char *, int)); 98*55470Sbostic int startdaemon __P((char *)); 99*55470Sbostic int pgetent __P((char *, char *)); 100*55470Sbostic int pgetflag __P((char *)); 101*55470Sbostic int pgetnum __P((char *)); 102*55470Sbostic char *pgetstr __P((char *, char **)); 103*55470Sbostic int pnamatch __P((char *)); 104*55470Sbostic int pnchktc __P((void)); 105*55470Sbostic void warn __P((void)); 106