1: /* $Header: util.h,v 2.0 86/09/17 15:40:06 lwall Exp $ 2: * 3: * $Log: util.h,v $ 4: * Revision 2.0 86/09/17 15:40:06 lwall 5: * Baseline for netwide release. 6: * 7: */ 8: 9: /* and for those machine that can't handle a variable argument list */ 10: 11: #ifdef CANVARARG 12: 13: #define say1 say 14: #define say2 say 15: #define say3 say 16: #define say4 say 17: #define ask1 ask 18: #define ask2 ask 19: #define ask3 ask 20: #define ask4 ask 21: #define fatal1 fatal 22: #define fatal2 fatal 23: #define fatal3 fatal 24: #define fatal4 fatal 25: 26: #else /* hope they allow multi-line macro actual arguments */ 27: 28: #ifdef lint 29: 30: #define say1(a) say(a, 0, 0, 0) 31: #define say2(a,b) say(a, (b)==(b), 0, 0) 32: #define say3(a,b,c) say(a, (b)==(b), (c)==(c), 0) 33: #define say4(a,b,c,d) say(a, (b)==(b), (c)==(c), (d)==(d)) 34: #define ask1(a) ask(a, 0, 0, 0) 35: #define ask2(a,b) ask(a, (b)==(b), 0, 0) 36: #define ask3(a,b,c) ask(a, (b)==(b), (c)==(c), 0) 37: #define ask4(a,b,c,d) ask(a, (b)==(b), (c)==(c), (d)==(d)) 38: #define fatal1(a) fatal(a, 0, 0, 0) 39: #define fatal2(a,b) fatal(a, (b)==(b), 0, 0) 40: #define fatal3(a,b,c) fatal(a, (b)==(b), (c)==(c), 0) 41: #define fatal4(a,b,c,d) fatal(a, (b)==(b), (c)==(c), (d)==(d)) 42: 43: #else /* lint */ 44: /* if this doesn't work, try defining CANVARARG above */ 45: #define say1(a) say(a, Nullch, Nullch, Nullch) 46: #define say2(a,b) say(a, b, Nullch, Nullch) 47: #define say3(a,b,c) say(a, b, c, Nullch) 48: #define say4 say 49: #define ask1(a) ask(a, Nullch, Nullch, Nullch) 50: #define ask2(a,b) ask(a, b, Nullch, Nullch) 51: #define ask3(a,b,c) ask(a, b, c, Nullch) 52: #define ask4 ask 53: #define fatal1(a) fatal(a, Nullch, Nullch, Nullch) 54: #define fatal2(a,b) fatal(a, b, Nullch, Nullch) 55: #define fatal3(a,b,c) fatal(a, b, c, Nullch) 56: #define fatal4 fatal 57: 58: #endif /* lint */ 59: 60: /* if neither of the above work, join all multi-line macro calls. */ 61: #endif 62: 63: EXT char serrbuf[BUFSIZ]; /* buffer for stderr */ 64: 65: char *fetchname(); 66: int move_file(); 67: void copy_file(); 68: void say(); 69: void fatal(); 70: void ask(); 71: char *savestr(); 72: void set_signals(); 73: void ignore_signals(); 74: void makedirs();