7 awk -F'\t' '{print $1}' data/musl.tags data/posix2008.ok # data/c99
8 awk -F'\t' '{print $2}' data/musl.syms
9 } |sort |uniq |awk -F'\t' '
11 syms = "data/musl.syms"
12 tags = "data/musl.tags.proto"
13 posix = "data/posix2008.ok.proto"
15 while (getline < syms == 1)
18 while (getline < tags == 1) {
22 tag[$1] = tag[$1] "@" $2 "\t" $3 "\t" $5 "\t" $6
24 tag[$1] = $2 "\t" $3 "\t" $5 "\t" $6
27 while (getline < posix == 1)
28 pos[$1] = $2 "\t" $5 "\t" $6
39 n = split(tag[$1],a,"@")
44 for (i = 1; i <= n; i++)
45 print $1 "\t" substr(s,2) "\t" sym[$1] "\t" a[i] "\t" pos[$1]
49 herr && lastid != $1 {
53 $2 == "obj" || $2 == "obj posix" {
56 print "nodecl\t" $1 "\t" $3
58 $2 ~ /inc/ && $5 == "p" {
59 # check for different declarations of the same symbol
62 print "proto\t" $1 "\t" $4 "\t" head[$1] "\t" $6 "\t" proto[$1]
68 $2 ~ /inc posix/ && $4 == $8 {
71 $2 ~ /inc posix/ && head[$1] != $8 && $4 !~ /^bits\// {
74 for (i = 1; i <= n; i++)
79 herr = "header\t" $1 "\t" $4 "\t" $8
81 $2 ~ /inc posix/ && $7 != $10 && $5 == "p" {
83 print "proto\t" $1 "\t" $4 "\t" $7 "\t" $10 "\t" $6 "\t" $9
92 ' data/musl.all >data/musl.problems