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