Initial revision
authorroland <roland>
Sun, 19 Feb 1989 22:55:50 +0000 (22:55 +0000)
committerroland <roland>
Sun, 19 Feb 1989 22:55:50 +0000 (22:55 +0000)
munch.awk [new file with mode: 0644]

diff --git a/munch.awk b/munch.awk
new file mode 100644 (file)
index 0000000..dd379de
--- /dev/null
+++ b/munch.awk
@@ -0,0 +1,11 @@
+BEGIN { special = 0 }
+
+/EXTERNS/ { ndirs = split(subdirs, dirs)
+           for (i = 1; i <= ndirs; ++i)
+               printf "extern void EXFUN(__init_%s, (NOARGS));\n", dirs[i]
+           special = 1 }
+/CALLS/ { ndirs = split(subdirs, dirs)
+         for (i = 1; i <= ndirs; ++i) printf "  __init_%s();\n", dirs[i]
+         special = 1 }
+
+{ if (special == 0) print $0; special = 0 }