Commit | Line | Data |
---|---|---|
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 | ||
49 | struct 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 | ||
57 | extern int debug; /* debugging flag */ | |
58 | extern int nflag; /* NOP flag, don't execute commands */ | |
59 | extern int qflag; /* Quiet. don't print messages */ | |
f7770429 | 60 | extern int options; /* global options */ |
ca9611a8 RC |
61 | |
62 | extern int errs; /* number of errors seen */ | |
63 | extern int rem; /* remote file descriptor */ | |
64 | extern int iamremote; /* acting as remote server */ | |
65 | extern int filec; /* number of files to update */ | |
66 | extern char **filev; /* list of files/directories to update */ | |
82572cb6 | 67 | extern char tmpfile[]; /* file name for logging changes */ |
ca9611a8 RC |
68 | extern char host[]; /* host name of master copy */ |
69 | extern char *rhost; /* host name of remote being updated */ | |
70 | extern struct block *except; /* list of files to exclude */ | |
71 | extern char buf[]; /* general purpose buffer */ | |
72 | extern int errno; /* system error number */ | |
73 | extern char *sys_errlist[]; | |
74 | ||
75 | struct block *lookup(); | |
82572cb6 | 76 | struct block *makeblock(); |
ca9611a8 | 77 | struct block *expand(); |
3024eb6f | 78 | char *malloc(); |
ca9611a8 | 79 | char *rindex(); |
82572cb6 | 80 | char *index(); |