From 28f540f45bbacd939bfd07f213bcad2bf730b1bf Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 18 Feb 1995 01:27:10 +0000 Subject: initial import --- munch.awk | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 munch.awk (limited to 'munch.awk') diff --git a/munch.awk b/munch.awk new file mode 100644 index 0000000..1ed6868 --- /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 __init_%s __P ((int argc, char **argv, char **envp));\n", dirs[i] + special = 1 } +/CALLS/ { ndirs = split(subdirs, dirs) + for (i = 1; i <= ndirs; ++i) printf " __init_%s (argc, argv, envp);\n", dirs[i] + special = 1 } + +{ if (special == 0) print $0; special = 0 } -- cgit v1.1