date and time created 89/08/28 14:50:52 by bostic
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 29 Aug 1989 05:50:52 +0000 (21:50 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 29 Aug 1989 05:50:52 +0000 (21:50 -0800)
SCCS-vsn: usr.bin/m4/TEST/ack.m4 5.1

usr/src/usr.bin/m4/TEST/ack.m4 [new file with mode: 0644]

diff --git a/usr/src/usr.bin/m4/TEST/ack.m4 b/usr/src/usr.bin/m4/TEST/ack.m4
new file mode 100644 (file)
index 0000000..9e22666
--- /dev/null
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 1989 The Regents of the University of California.
+# All rights reserved.
+#
+# This code is derived from software contributed to Berkeley by
+# Ozan Yigit.
+#
+# Redistribution and use in source and binary forms are permitted
+# provided that the above copyright notice and this paragraph are
+# duplicated in all such forms and that any documentation,
+# advertising materials, and other materials related to such
+# distribution and use acknowledge that the software was developed
+# by the University of California, Berkeley.  The name of the
+# University may not be used to endorse or promote products derived
+# from this software without specific prior written permission.
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+#      @(#)ack.m4      5.1 (Berkeley) %G%
+#
+
+define(ack, `ifelse($1,0,incr($2),$2,0,`ack(DECR($1),1)',
+`ack(DECR($1), ack($1,DECR($2)))')')