Allow names with only one character.
[kopensolaris-gnu/glibc.git] / manual / xtract-typefun.awk
1 #! /usr/local/bin/gawk -f
2 BEGIN {
3   last_node="";
4 }
5
6 /^@node/ {
7   last_node = gensub (/@node +([^@,]+).*/, "\\1", 1);
8 }
9
10 /^@deftypefun/ {
11   printf ("* %s: (libc)%s.\n",
12           gensub (/@deftypefunx? +([^{ ]+|\{[^}]+\}) +([[:alpha:]_][[:alnum:]_]*).*/, "\\2", 1),
13     last_node);
14 }
15
16 /^@deftypevr/ {
17   printf ("* %s: (libc)%s.\n",
18           gensub (/@deftypevrx? +([^{ ]+|\{[^}]+\}) +([^{ ]+|\{[^}]+\}) +([[:alpha:]_][[:alnum:]_]*).*/, "\\3", 1),
19     last_node);
20 }
21
22 /^@deftypefn/ {
23   printf ("* %s: (libc)%s.\n",
24           gensub (/@deftypefnx? +([^{ ]+|\{[^}]+\}) +[^{ ]*(\{[^}]+\})? +([[:alpha:]_][[:alnum:]_]*).*/, "\\3", 1),
25     last_node);
26 }