home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
misc
/
volume17
/
lwho
/
part01
/
lwho.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-03-17
|
2KB
|
79 lines
/*
** Low-cost Remote Who
** There is no copyright on this package.
** Header file for the package.
**
** $Header: /nfs/papaya/source/lwho/RCS/lwho.h,v 1.4 91/03/16 18:36:23 rsalz Exp $
*/
#include <stdio.h>
#include <sys/types.h>
#include <sys/file.h>
#include <time.h>
/*
** Configuration parameters.
*/
/*#define SIG_CATCHER int /* Older systems */
#define SIG_CATCHER void /* Modern systems */
#define NAP_TIME 60 /* How often to update */
#define SPOOLDIR "/usr/spool/lwho" /* Data directory */
#define VERSION "R$1" /* Version and EOF mark */
#undef DEBUG /* Having problems? */
#undef DAEMON_MUST_RUN_AS_ROOT /* Do setuid(0)? */
/*
** Debugging control.
*/
#if defined(DEBUG) || defined(SABER)
#define STATIC /* NULL */
#else
#define STATIC static
#endif /* defined(DEBUG) || defined(SABER) */
/*
** Various constants, you can change these if you reall want to.
*/
#define TRUE 1
#define FALSE 0
#define BUFFLEN 128
#define NAMELEN 10
#define LINELEN 10
#define HOSTLEN 40
/*
** Syntactic sugar.
*/
#define NEW(T, i) \
(T *)xmalloc((unsigned int)i * sizeof (T))
#define RENEW(p, T, c) \
((T *)xrealloc((char *)(p), (unsigned int)(sizeof (T) * (c))))
/*
** From our meager little library.
*/
extern char *progname;
extern int *xmalloc();
extern int *xrealloc();
extern char *strerror();
/*
** From the C library.
*/
extern char *optarg;
extern int errno;
extern long atol();
extern long lseek();
extern time_t time();
extern char *sprintf(); /* Painful my ass! */
extern char *strrchr();
extern char *strcpy();
extern char *strncpy();
extern void exit();