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