summaryrefslogtreecommitdiff
path: root/manual/xtract-typefun.awk
diff options
context:
space:
mode:
Diffstat (limited to 'manual/xtract-typefun.awk')
-rw-r--r--manual/xtract-typefun.awk26
1 files changed, 26 insertions, 0 deletions
diff --git a/manual/xtract-typefun.awk b/manual/xtract-typefun.awk
new file mode 100644
index 0000000000..6450ac10eb
--- /dev/null
+++ b/manual/xtract-typefun.awk
@@ -0,0 +1,26 @@
+#! /usr/local/bin/gawk -f
+BEGIN {
+ last_node="";
+}
+
+/^@node/ {
+ last_node = gensub (/@node +([^@,]+).*/, "\\1", 1);
+}
+
+/^@deftypefun/ {
+ printf ("* %s: (libc)%s.\n",
+ gensub (/@deftypefun +([^{ ]+|\{[^}]+\}) +([[:alpha:]_][[:alnum:]_]+).*/, "\\2", 1),
+ last_node);
+}
+
+/^@deftypevr/ {
+ printf ("* %s: (libc)%s.\n",
+ gensub (/@deftypevr +([^{ ]+|\{[^}]+\}) +([^{ ]+|\{[^}]+\}) +([[:alpha:]_][[:alnum:]_]+).*/, "\\3", 1),
+ last_node);
+}
+
+/^@deftypefn/ {
+ printf ("* %s: (libc)%s.\n",
+ gensub (/@deftypefn +([^{ ]+|\{[^}]+\}) +[^{ ]*(\{[^}]+\})? +([[:alpha:]_][[:alnum:]_]+).*/, "\\3", 1),
+ last_node);
+}