Initial revision
authorRoland Pesch <pesch@cygnus>
Thu, 22 Aug 1991 00:13:19 +0000 (00:13 +0000)
committerRoland Pesch <pesch@cygnus>
Thu, 22 Aug 1991 00:13:19 +0000 (00:13 +0000)
bfd/unPROTO [new file with mode: 0755]

diff --git a/bfd/unPROTO b/bfd/unPROTO
new file mode 100755 (executable)
index 0000000..a6f9520
--- /dev/null
@@ -0,0 +1,18 @@
+#
+# The PROTO macro is a subterfuge to be compatible with both ANSI and K&R 
+# declaration syntax.  It's not widely known, so for the docn just map the 
+# thing to ANSI declaration syntax.
+# 
+# First, join up defns broken across multiple lines in source---but leave
+# any linebreaks, to prettify our examples 
+:pbegn
+/PROTO(.*, *$/N
+s/\n/?/
+t pbegn
+s/?/\
+/g
+# Now actually do the PROTO interpretation.
+# A PROTO invocation looks like
+#   PROTO( resulttype, function, (arglist));
+s/[    ]*PROTO(\(.*\),[\n      ]*\(.*\),[\n    ]*\((.*)\));/\1 \2\3;/
+
This page took 0.02562 seconds and 4 git commands to generate.