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