1: /* defs 4.10 86/03/22 */ 2: #include <stdio.h> 3: #include <ctype.h> 4: #include <sys/param.h> 5: #include <sys/dir.h> 6: 7: #define SHELLCOM "/bin/sh" 8: 9: typedef long int TIMETYPE; 10: 11: /* to install metering, add a statement like 12: * #define METERFILE "/usr/sif/make/Meter" 13: * to turn metering on, set external variable meteron to 1. 14: */ 15: 16: /* define FSTATIC to be static on systems with C compilers 17: supporting file-static; otherwise define it to be null 18: */ 19: #define FSTATIC static 20: 21: #define NO 0 22: #define YES 1 23: 24: #define unequal strcmp 25: #define HASHSIZE 1021 26: #define NLEFTS 512 27: #define NCHARS 500 28: #define NINTS 250 29: #define INMAX 7000 30: #define OUTMAX 7000 31: #define QBUFMAX 5000 32: #define MAXDIR 10 33: 34: #define ALLDEPS 1 35: #define SOMEDEPS 2 36: 37: #define META 01 38: #define TERMINAL 02 39: extern char funny[128]; 40: 41: 42: #define ALLOC(x) (struct x *) ckalloc(sizeof(struct x)) 43: 44: extern int sigivalue; 45: extern int sigqvalue; 46: extern int waitpid; 47: extern int dbgflag; 48: extern int prtrflag; 49: extern int silflag; 50: extern int noexflag; 51: extern int keepgoing; 52: extern int noruleflag; 53: extern int touchflag; 54: extern int questflag; 55: extern int ndocoms; 56: extern int ignerr; 57: extern int okdel; 58: extern int inarglist; 59: extern char *prompt; 60: extern int nopdir; 61: extern char junkname[ ]; 62: 63: 64: 65: struct nameblock 66: { 67: struct nameblock *nxtnameblock; 68: char *namep; 69: char *alias; 70: struct lineblock *linep; 71: int done:3; 72: int septype:3; 73: TIMETYPE modtime; 74: }; 75: 76: extern struct nameblock *mainname ; 77: extern struct nameblock *firstname; 78: 79: struct lineblock 80: { 81: struct lineblock *nxtlineblock; 82: struct depblock *depp; 83: struct shblock *shp; 84: }; 85: extern struct lineblock *sufflist; 86: 87: struct depblock 88: { 89: struct depblock *nxtdepblock; 90: struct nameblock *depname; 91: }; 92: 93: struct shblock 94: { 95: struct shblock *nxtshblock; 96: char *shbp; 97: }; 98: 99: struct varblock 100: { 101: struct varblock *nxtvarblock; 102: char *varname; 103: char *varval; 104: int noreset:1; 105: int used:1; 106: }; 107: extern struct varblock *firstvar; 108: 109: struct pattern 110: { 111: struct pattern *nxtpattern; 112: char *patval; 113: }; 114: extern struct pattern *firstpat; 115: 116: struct dirhdr 117: { 118: struct dirhdr *nxtopendir; 119: DIR *dirfc; 120: char *dirn; 121: }; 122: extern struct dirhdr *firstod; 123: 124: 125: struct chain 126: { 127: struct chain *nextp; 128: char *datap; 129: }; 130: 131: char *copys(), *concat(), *subst(); 132: int *ckalloc(); 133: struct nameblock *srchname(), *makename(); 134: TIMETYPE exists();