source: trunk/athena/bin/lpr/lp.h @ 6932

Revision 6932, 4.6 KB checked in by probe, 31 years ago (diff)
Reduced the #ifdef's by globally changing names (req'd by Solaris port)
Line 
1/*
2 *      $Source: /afs/dev.mit.edu/source/repository/athena/bin/lpr/lp.h,v $
3 *      $Author: probe $
4 *      $Locker:  $
5 *      $Header: /afs/dev.mit.edu/source/repository/athena/bin/lpr/lp.h,v 1.12 1993-10-09 18:14:33 probe Exp $
6 */
7
8/*
9 * Copyright (c) 1983 Regents of the University of California.
10 * All rights reserved.  The Berkeley software License Agreement
11 * specifies the terms and conditions for redistribution.
12 *
13 *      @(#)lp.h        5.1 (Berkeley) 6/6/85
14 */
15
16/*
17 * Global definitions for the line printer system.
18 */
19
20#ifdef POSIX
21#include <unistd.h>
22#endif
23#include <stdio.h>
24#include <sys/param.h>
25#include <sys/types.h>
26#include <sys/file.h>
27#include <fcntl.h>
28#ifdef POSIX
29#include <dirent.h>
30#else
31#include <sys/dir.h>
32#endif
33#include <sys/stat.h>
34#include <sys/socket.h>
35#include <sys/un.h>
36#include <netinet/in.h>
37#include <netdb.h>
38#include <pwd.h>
39#include <syslog.h>
40#include <signal.h>
41#ifdef _AIX
42#undef _BSD
43#endif
44#include <sys/wait.h>
45#ifdef _AIX
46#define _BSD 44
47#include <sys/ioctl.h>
48#endif
49#ifdef POSIX
50#include <termios.h>
51#else
52#include <sgtty.h>
53#endif
54#include <ctype.h>
55#include <errno.h>
56#include <strings.h>
57#include "lp.local.h"
58
59#ifdef SOLARIS
60/*
61 * flock operations.
62 */
63#define LOCK_SH               1       /* shared lock */
64#define LOCK_EX               2       /* exclusive lock */
65#define LOCK_NB               4       /* don't block when locking */
66#define LOCK_UN               8       /* unlock */
67#endif
68
69#ifdef KERBEROS
70#include <krb.h>
71#define KLPR_SERVICE "rcmd"
72#endif KERBEROS
73
74extern int      DU;             /* daeomon user-id */
75extern int      MX;             /* maximum number of blocks to copy */
76extern int      MC;             /* maximum number of copies allowed */
77extern char     *LP;            /* line printer device name */
78extern char     *RM;            /* remote machine name */
79extern char     *RG;            /* restricted group */
80extern char     *RP;            /* remote printer name */
81extern char     *LO;            /* lock file name */
82extern char     *ST;            /* status file name */
83extern char     *SD;            /* spool directory */
84extern char     *AF;            /* accounting file */
85extern char     *LF;            /* log file for error messages */
86extern char     *OF;            /* name of output filter (created once) */
87extern char     *IF;            /* name of input filter (created per job) */
88extern char     *RF;            /* name of fortran text filter (per job) */
89extern char     *TF;            /* name of troff(1) filter (per job) */
90extern char     *NF;            /* name of ditroff(1) filter (per job) */
91extern char     *DF;            /* name of tex filter (per job) */
92extern char     *GF;            /* name of graph(1G) filter (per job) */
93extern char     *VF;            /* name of raster filter (per job) */
94extern char     *CF;            /* name of cifplot filter (per job) */
95extern char     *FF;            /* form feed string */
96extern char     *TR;            /* trailer string to be output when Q empties */
97extern short    SC;             /* suppress multiple copies */
98extern short    SF;             /* suppress FF on each print job */
99extern short    SH;             /* suppress header page */
100extern short    SB;             /* short banner instead of normal header */
101extern short    HL;             /* print header last */
102extern short    RW;             /* open LP for reading and writing */
103extern short    PW;             /* page width */
104extern short    PX;             /* page width in pixels */
105extern short    PY;             /* page length in pixels */
106extern short    PL;             /* page length */
107extern short    BR;             /* baud rate if lp is a tty */
108extern int      FC;             /* flags to clear if lp is a tty */
109extern int      FS;             /* flags to set if lp is a tty */
110extern int      XC;             /* flags to clear for local mode */
111extern int      XS;             /* flags to set for local mode */
112extern short    RS;             /* restricted to those with local accounts */
113#ifdef PQUOTA
114extern char     *RQ;            /* Name of remote quota server */
115extern int      CP;             /* Cost per page */
116extern char     *QS;            /* Quota service for printer */
117#endif /* PQUOTA */
118#ifdef LACL
119extern char     *AC;            /* Local ACL file to use */
120extern short    PA;             /* ACL file used as positive ACL */
121extern short    RA;             /* Restricted host access */
122#endif /* LACL */
123
124extern char     line[BUFSIZ];
125extern char     pbuf[];         /* buffer for printcap entry */
126extern char     *bp;            /* pointer into ebuf for pgetent() */
127extern char     *name;          /* program name */
128extern char     *printer;       /* printer name */
129extern char     host[32];       /* host machine name */
130extern char     *from;          /* client's machine name */
131extern int      errno;
132#ifdef HESIOD
133extern char     alibuf[BUFSIZ/2]; /* buffer for printer alias */
134#endif
135
136#ifdef KERBEROS
137extern int      use_kerberos;
138extern int      kerberos_cf;
139extern char     kprincipal[];
140extern char     kinstance[];
141extern char     krealm[];
142#endif KERBEROS
143
144/*
145 * Structure used for building a sorted list of control files.
146 */
147struct queue_ {
148        time_t  q_time;                 /* modification time */
149        char    q_name[MAXNAMLEN+1];    /* control file name */
150};
151
152char    *pgetstr();
153char    *malloc();
154char    *getenv();
155
156#define UNLINK unlink
Note: See TracBrowser for help on using the repository browser.