#if 0
/*
 * $Header: /home/jsellens/src/users/Include/RCS/biffer.h,v 1.14 1996/09/12 19:06:22 rbutterworth Exp jsellens $
 */
#endif

#include <stdio.h>
#include <unistd.h>
#include <signal.h>
typedef void SignalType;

#include <string.h>
extern char *strdup();	/* not always declared */
extern char *strerror();
/* #include <mfcf/libc/unix/pwd.h> */
#include <pwd.h>
/* #include <mfcf/libc/unix/fcntl.h> */
#include <fcntl.h>

#include "biffoptions.h"


extern	char	recipient[];	/* where mail got delivered */
extern	char	machine[];	/* recipient's machine */
extern	char	biffee[];	/* the name we're biffing */
extern	char	home[];		/* the home dir of biff */
extern	char	host[];		/* this host's name */

extern	char	savetoline[];	/* save the To: line */
extern	char	savefromline[];	/* save the From: line */
extern	char	savesubjline[];	/* save the Subject: line */
extern	char	msgbuf[];	/* were we collect the message */

extern	int	inheader;	/* flag for printing */
extern	int	debugFlag;

extern	void	lowercase();
extern	void	trimword();

#define HOSTSIZE	(256)	/* chars in hostname - has to be > ut_host */
#define USERSIZE	(25)	/* chars for userids */
#define USERHOSTSIZE	(HOSTSIZE+USERSIZE)
#define DEVSIZE		(50)	/* chars for /dev/tty entries */

#define MAXIGNORES	(25)	/* max # of ignores lines allowed */

#define TRUE		1
#define FALSE		0
#define FPNULL		((FILE *)NULL)
#define CPNULL		((char *)NULL)

#define MAX_HOPS	(5)		/* how many times it will forward */
#define	BIFFRC		"/.biffer"	/* file to read for biff opts */
#define	TTYBIFFRC	"/var/tmp/biff.%s.%d"	/* biff opts - tty and uid */
#define TTYBIFFRCSIZE	(40)		/* big enough to hold that */
#define	LINES		(5)		/* default #lines to show */
#define TIMEOUT		(10)		/* give up if can't write within
					   this many seconds */

#define SERVICE		"biffer"	/* name in services file/TCP */


typedef struct biffopt {
    int		lines;		/* how much of the message to biff */
    int		showbiffee;	/* display name of biffee too */
    int		showtoline;	/* show To: line of message? */
    int		showfromline;	/* show the From: line of message? */
    int		showsubjline;	/* show the Subject: line of message? */
#ifdef USERPROG
    char	uprognetwork[1024];  /* shell cmd to biff with on network */
    char	uprognonet[1024];    /* shell cmd to biff with on non-network */
#endif
    char	forwardto[USERHOSTSIZE];   /* where BIFFRC says to fwd */
    int		tracerlogins;   /* go to original non-rlogin? */
    int		heretoofwd;     /* forward and biff here too?? */
    int		heretoorem;     /* tracerlogins and biff here too?? */
    int		dospecial;      /* special handling on some terminals */
    int		x10special;     /* do special for X10 */
    int		x11special;     /* do special for X11 */
    char	display[HOSTSIZE];	/* display name in the options file */
    char	hostname[HOSTSIZE];	/* hostname in the options file */
#ifdef SUNGUESS
    int		sunx;           /* assume X if on Sun console */
#endif
    char	*ignores[MAXIGNORES];   /* list of pointers to ignore lines */
    int		ignorecount;	/* count of entries in ignores */
} biffopt;


syntax highlighted by Code2HTML, v. 0.9.1