summary refs log tree commit diff
path: root/hurd/hurdintr.awk
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-02-18 01:27:10 +0000
committerRoland McGrath <roland@gnu.org>1995-02-18 01:27:10 +0000
commit28f540f45bbacd939bfd07f213bcad2bf730b1bf (patch)
tree15f07c4c43d635959c6afee96bde71fb1b3614ee /hurd/hurdintr.awk
downloadglibc-28f540f45bbacd939bfd07f213bcad2bf730b1bf.tar.gz
glibc-28f540f45bbacd939bfd07f213bcad2bf730b1bf.tar.xz
glibc-28f540f45bbacd939bfd07f213bcad2bf730b1bf.zip
initial import
Diffstat (limited to 'hurd/hurdintr.awk')
-rw-r--r--hurd/hurdintr.awk25
1 files changed, 25 insertions, 0 deletions
diff --git a/hurd/hurdintr.awk b/hurd/hurdintr.awk
new file mode 100644
index 0000000000..d03940985c
--- /dev/null
+++ b/hurd/hurdintr.awk
@@ -0,0 +1,25 @@
+BEGIN { intr=0; wantcall=0; calls=""; }
+ 
+$1 == "/*" && $2 == "INTR" && $3 == "*/" { intr=1; }
+
+NF == 1 && $1 == "routine"	{ wantcall=1; next; }
+
+intr != 0 && wantcall == 0 && NF >= 2 && $1 == "routine" \
+  {
+    if (substr($2, length($2)-2, 1) == "(")
+      calls = calls " " substr($2, 0, length($2)-1);
+    else calls = calls " " $2;
+    intr=0;
+  }
+
+wantcall != 0 && NF >= 1 \
+  {
+    if (substr($1, length($1)-2, 1) == "(")
+      calls = calls " " substr($1, 0, length($1)-1);
+    else calls = calls " " $1;
+    intr=0;
+  }
+
+{ wantcall=0; }
+
+END { print varname " :=" calls; }