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