disk stats are collected off alternate clock, if it exists
[unix-history] / usr / src / usr.bin / rdist / defs.h
CommitLineData
f7770429 1/* defs.h 4.4 83/10/12 */
ca9611a8
RC
2
3#include <stdio.h>
4#include <ctype.h>
5#include <errno.h>
6#include <pwd.h>
7#include <grp.h>
8#include <signal.h>
9#include <sys/types.h>
10#include <sys/dir.h>
11#include <sys/stat.h>
12#include <sys/time.h>
13#include <netinet/in.h>
14
3024eb6f 15#define MAILCMD "/usr/lib/sendmail -oi -t"
ca9611a8
RC
16
17 /* defines for yacc */
18#define EQUAL 1
82572cb6
RC
19#define LP 2
20#define RP 3
21#define ARROW 4
22#define DCOLON 5
23#define NAME 6
24#define INSTALL 7
3024eb6f
RC
25#define NOTIFY 8
26#define EXCEPT 9
27#define OPTION 10
82572cb6
RC
28#define VAR 11
29
30 /* lexical definitions */
31#define QUOTE 0200 /* used internally for quoted characters */
32#define TRIM 0177 /* Mask to strip quote bit */
ca9611a8
RC
33
34 /* table sizes */
35#define HASHSIZE 1021
36#define INMAX 3500
82572cb6
RC
37#define NCARGS 10240
38#define GAVSIZ NCARGS / 6
39#define NSTAMPS 15
40
3024eb6f
RC
41 /* option flags */
42#define VERIFY 1
43#define WHOLE 2
44#define YOUNGER 4
45#define STRIP 8
ca9611a8
RC
46
47#define ALLOC(x) (struct x *) malloc(sizeof(struct x))
48
49struct block {
3024eb6f
RC
50 short b_type;
51 short b_options;
ca9611a8
RC
52 char *b_name;
53 struct block *b_next;
54 struct block *b_args;
55};
56
57extern int debug; /* debugging flag */
58extern int nflag; /* NOP flag, don't execute commands */
59extern int qflag; /* Quiet. don't print messages */
f7770429 60extern int options; /* global options */
ca9611a8
RC
61
62extern int errs; /* number of errors seen */
63extern int rem; /* remote file descriptor */
64extern int iamremote; /* acting as remote server */
65extern int filec; /* number of files to update */
66extern char **filev; /* list of files/directories to update */
82572cb6 67extern char tmpfile[]; /* file name for logging changes */
ca9611a8
RC
68extern char host[]; /* host name of master copy */
69extern char *rhost; /* host name of remote being updated */
70extern struct block *except; /* list of files to exclude */
71extern char buf[]; /* general purpose buffer */
72extern int errno; /* system error number */
73extern char *sys_errlist[];
74
75struct block *lookup();
82572cb6 76struct block *makeblock();
ca9611a8 77struct block *expand();
3024eb6f 78char *malloc();
ca9611a8 79char *rindex();
82572cb6 80char *index();