home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
TELECOM
/
OS9_Unix.lzh
/
RSHSRC
/
lpr.h
< prev
next >
Wrap
Text File
|
1992-10-06
|
2KB
|
72 lines
/*
* LPR.H
*
* Definitions for line printer client program.
* ip <pczip@chem.nott.ac.uk>
*/
#include <stdio.h>
#include <types.h>
/*
* The default print server name and print queue name are specified here
* These should be edited for each site as required. Default values
* specified here will be overidden by (1) the environment variables
* LPHOST and LPDEST (if set) and (ii) by any command line options (with
* (ii) taking precedence over (i) and (i) over these defines.
*/
#define DEF_HOST "argon"
#define DEF_LP "LX"
/*#define SET_USER*/ /*uncomment to include set user alias ability*/
#define MAXFILENAMELEN 128
#define MAXHOSTNAMELEN 60 /* max host name length */
#define MAXLINE 512 /* max ascii line length */
#define MAXLEN 128
#define LPR_SERVICE "printer" /* name of the network service */
/*
* Externals.
*/
#ifndef LPRMAIN
extern char *hostname; /* name of host providing the service */
extern char *printername; /* name of printer to use on hostname */
extern char *rusername; /* remote server username*/
extern char myhostname[]; /* name of host running lpr */
extern char username[]; /* name of user running lpr */
extern char jcname[]; /* name of JobClass */
extern char *Jname; /* Jobname string */
extern char *Cname; /* Class string */
extern int debugflag; /* -d command line options */
extern int rflag; /* -b option */
extern int mailflag; /* -m option */
extern int qflag; /* -q option */
extern int delflag; /* -rm option */
#else
char myhostname[MAXHOSTNAMELEN]; /* name of host running lpr */
char username[MAXHOSTNAMELEN]; /* name of user running lpr */
char *hostname=DEF_HOST; /* name of server host */
char *printername=DEF_LP; /* name of printer */
char *rusername=myhostname; /* remote username to use */
char jcname[MAXLEN]; /* name of JobClass */
char *Jname=0; /* Jobname string */
char *Cname=myhostname;; /* Class string */
int debugflag=0; /* -D debug option */
int rflag=0; /* -r raw option */
int mailflag=0; /* -m mail option */
int qflag=0; /* -q quiet option */
int delflag=0; /* -rm option */
#endif
/*
* Debug macro, based on the debug flag (-d command line argument) with
* two values to print.
*/
#define DEBUG2(fmt, arg1, arg2) if (debugflag) { \
fprintf(stderr, fmt, arg1, arg2); \
putc('\n', stderr); \
} else ;