|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1983 Regents of the University of California. ! 3: * All rights reserved. ! 4: * ! 5: * Redistribution and use in source and binary forms are permitted provided ! 6: * that: (1) source distributions retain this entire copyright notice and ! 7: * comment, and (2) distributions including binaries display the following ! 8: * acknowledgement: ``This product includes software developed by the ! 9: * University of California, Berkeley and its contributors'' in the ! 10: * documentation or other materials provided with the distribution and in ! 11: * all advertising materials mentioning features or use of this software. ! 12: * Neither the name of the University nor the names of its contributors may ! 13: * be used to endorse or promote products derived from this software without ! 14: * specific prior written permission. ! 15: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED ! 16: * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF ! 17: * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 18: * ! 19: * @(#)lp.h 5.5 (Berkeley) 6/1/90 ! 20: */ ! 21: ! 22: /* ! 23: * Global definitions for the line printer system. ! 24: */ ! 25: ! 26: #include <stdio.h> ! 27: #include <sys/param.h> ! 28: #include <sys/file.h> ! 29: #include <sys/dir.h> ! 30: #include <sys/stat.h> ! 31: #include <sys/socket.h> ! 32: #include <sys/un.h> ! 33: #include <netinet/in.h> ! 34: #include <netdb.h> ! 35: #include <pwd.h> ! 36: #include <syslog.h> ! 37: #include <signal.h> ! 38: #include <sys/wait.h> ! 39: #include <sgtty.h> ! 40: #include <ctype.h> ! 41: #include <errno.h> ! 42: #include "lp.local.h" ! 43: ! 44: extern int DU; /* daeomon user-id */ ! 45: extern int MX; /* maximum number of blocks to copy */ ! 46: extern int MC; /* maximum number of copies allowed */ ! 47: extern char *LP; /* line printer device name */ ! 48: extern char *RM; /* remote machine name */ ! 49: extern char *RG; /* restricted group */ ! 50: extern char *RP; /* remote printer name */ ! 51: extern char *LO; /* lock file name */ ! 52: extern char *ST; /* status file name */ ! 53: extern char *SD; /* spool directory */ ! 54: extern char *AF; /* accounting file */ ! 55: extern char *LF; /* log file for error messages */ ! 56: extern char *OF; /* name of output filter (created once) */ ! 57: extern char *IF; /* name of input filter (created per job) */ ! 58: extern char *RF; /* name of fortran text filter (per job) */ ! 59: extern char *TF; /* name of troff(1) filter (per job) */ ! 60: extern char *NF; /* name of ditroff(1) filter (per job) */ ! 61: extern char *DF; /* name of tex filter (per job) */ ! 62: extern char *GF; /* name of graph(1G) filter (per job) */ ! 63: extern char *VF; /* name of raster filter (per job) */ ! 64: extern char *CF; /* name of cifplot filter (per job) */ ! 65: extern char *FF; /* form feed string */ ! 66: extern char *TR; /* trailer string to be output when Q empties */ ! 67: extern short SC; /* suppress multiple copies */ ! 68: extern short SF; /* suppress FF on each print job */ ! 69: extern short SH; /* suppress header page */ ! 70: extern short SB; /* short banner instead of normal header */ ! 71: extern short HL; /* print header last */ ! 72: extern short RW; /* open LP for reading and writing */ ! 73: extern short PW; /* page width */ ! 74: extern short PX; /* page width in pixels */ ! 75: extern short PY; /* page length in pixels */ ! 76: extern short PL; /* page length */ ! 77: extern short BR; /* baud rate if lp is a tty */ ! 78: extern int FC; /* flags to clear if lp is a tty */ ! 79: extern int FS; /* flags to set if lp is a tty */ ! 80: extern int XC; /* flags to clear for local mode */ ! 81: extern int XS; /* flags to set for local mode */ ! 82: extern short RS; /* restricted to those with local accounts */ ! 83: ! 84: extern char line[BUFSIZ]; ! 85: extern char pbuf[]; /* buffer for printcap entry */ ! 86: extern char *bp; /* pointer into ebuf for pgetent() */ ! 87: extern char *name; /* program name */ ! 88: extern char *printer; /* printer name */ ! 89: extern char host[32]; /* host machine name */ ! 90: extern char *from; /* client's machine name */ ! 91: extern int sendtorem; /* are we sending to a remote? */ ! 92: extern int errno; ! 93: ! 94: /* ! 95: * Structure used for building a sorted list of control files. ! 96: */ ! 97: struct queue { ! 98: time_t q_time; /* modification time */ ! 99: char q_name[MAXNAMLEN+1]; /* control file name */ ! 100: }; ! 101: ! 102: char *pgetstr(); ! 103: char *malloc(); ! 104: char *getenv(); ! 105: char *index(); ! 106: char *rindex(); ! 107: char *checkremote();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.