1: /* defs 4.10.1 1996/10/27 */ 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: #ifdef pdp11 26: #define HASHSIZE 541 27: #define NLEFTS 80 28: #define NCHARS 500 29: #define NINTS 250 30: #define INMAX 1350 31: #define OUTMAX 2300 32: #define MAXDIR 10 33: #else !pdp11 34: #define HASHSIZE 1021 35: #define NLEFTS 512 36: #define NCHARS 500 37: #define NINTS 250 38: #define INMAX 7000 39: #define OUTMAX 7000 40: #define MAXDIR 10 41: #endif /* pdp11 */ 42: #define QBUFMAX 5000 43: 44: #define ALLDEPS 1 45: #define SOMEDEPS 2 46: 47: #define META 01 48: #define TERMINAL 02 49: extern char funny[128]; 50: 51: 52: #define ALLOC(x) (struct x *) ckalloc(sizeof(struct x)) 53: 54: extern int sigivalue; 55: extern int sigqvalue; 56: extern int waitpid; 57: extern int dbgflag; 58: extern int prtrflag; 59: extern int silflag; 60: extern int noexflag; 61: extern int keepgoing; 62: extern int noruleflag; 63: extern int touchflag; 64: extern int questflag; 65: extern int ndocoms; 66: extern int ignerr; 67: extern int okdel; 68: extern int inarglist; 69: extern char *prompt; 70: extern int nopdir; 71: extern char junkname[ ]; 72: 73: 74: 75: struct nameblock 76: { 77: struct nameblock *nxtnameblock; 78: char *namep; 79: char *alias; 80: struct lineblock *linep; 81: int done:3; 82: int septype:3; 83: TIMETYPE modtime; 84: }; 85: 86: extern struct nameblock *mainname ; 87: extern struct nameblock *firstname; 88: 89: struct lineblock 90: { 91: struct lineblock *nxtlineblock; 92: struct depblock *depp; 93: struct shblock *shp; 94: }; 95: extern struct lineblock *sufflist; 96: 97: struct depblock 98: { 99: struct depblock *nxtdepblock; 100: struct nameblock *depname; 101: }; 102: 103: struct shblock 104: { 105: struct shblock *nxtshblock; 106: char *shbp; 107: }; 108: 109: struct varblock 110: { 111: struct varblock *nxtvarblock; 112: char *varname; 113: char *varval; 114: int noreset:1; 115: int used:1; 116: }; 117: extern struct varblock *firstvar; 118: 119: struct pattern 120: { 121: struct pattern *nxtpattern; 122: char *patval; 123: }; 124: extern struct pattern *firstpat; 125: 126: struct dirhdr 127: { 128: struct dirhdr *nxtopendir; 129: DIR *dirfc; 130: char *dirn; 131: }; 132: extern struct dirhdr *firstod; 133: 134: 135: struct chain 136: { 137: struct chain *nextp; 138: char *datap; 139: }; 140: 141: char *copys(), *concat(), *subst(); 142: int *ckalloc(); 143: struct nameblock *srchname(), *makename(); 144: TIMETYPE exists();