Files
oldlinux-files/gnu/glibc/glibc-1.03/mach/interface.awk
2024-02-19 00:24:47 -05:00

23 lines
541 B
Awk

BEGIN { wantcall=0; calls=""; }
NF == 1 && ($1 == "routine" || $1 == "simpleroutine") \
{ wantcall=1; next; }
wantcall == 0 && NF >= 2 && ($1 == "routine" || $1 == "simpleroutine") \
{
if (substr($2, length($2)-2, 1) == "(")
calls = calls " " substr($2, 0, length($2)-1);
else calls = calls " " $2;
}
wantcall == 1 && NF >= 1 \
{
if (substr($1, length($1)-2, 1) == "(")
calls = calls " " substr($1, 0, length($1)-1);
else calls = calls " " $1;
}
{ wantcall=0; }
END { print varname " :=" calls; }