summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/decl7
-rw-r--r--lib/decl.awk9
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/decl b/lib/decl
new file mode 100755
index 0000000..c5a410d
--- /dev/null
+++ b/lib/decl
@@ -0,0 +1,7 @@
+#!/bin/csh -f
+rm -f lib_headers
+foreach i (Z*.c)
+ echo $i
+ awk -f decl.awk $i >> lib_headers
+ echo "" >> lib_headers
+end
diff --git a/lib/decl.awk b/lib/decl.awk
new file mode 100644
index 0000000..5040249
--- /dev/null
+++ b/lib/decl.awk
@@ -0,0 +1,9 @@
+BEGIN {
+ foo = 0;
+}
+/Z.*\(/ { if (foo != 2) foo = 1; }
+/{/ { foo = 2; }
+{
+ if (foo == 1)
+ print;
+}