5 [ -f data/musl.tags.proto -a -f data/posix2008.ok.proto ] || ./makeproto.sh
8 awk -F'\t' '{print $1}' data/musl.tags data/posix2008.ok # data/c99
9 awk -F'\t' '{print $2}' data/musl.syms
10 } |sort |uniq |awk -F'\t' '
12 posix = "data/posix2008.ok.proto"
13 syms = "data/musl.syms"
14 tags = "data/musl.tags.proto"
16 while (getline < syms == 1)
18 while (getline < tags == 1)
19 tag[$1] = $2 "\t" $3 "\t" $5 "\t" $6
20 while (getline < posix == 1)
21 pos[$1] = $2 "\t" $5 "\t" $6
32 print $1 "\t" substr(s,2) "\t" sym[$1] "\t" tag[$1] "\t" pos[$1]
36 $2 == "obj" || $2 == "obj posix" {
39 print "nodecl\t" $1 "\t" $3
41 $2 ~ /inc posix/ && $4 != $8 {
48 for (i = 1; i <= n; i++)
52 print "header\t" $1 "\t" $4 "\t" $8
54 $2 ~ /inc posix/ && $7 != $10 && $5 == "p" {
57 # todo: move to type.sh
58 gsub(/restrict const/, "const", $10)
59 gsub(/restrict/, "", $10)
60 gsub(/\[[0-9]+\]/, "[]", $10)
61 gsub(/unsigned int/, "unsigned", $7)
62 gsub(/long int/, "long", $7)
65 print "proto\t" $1 "\t" $4 "\t" $7 "\t" $10 "\t" $6 "\t" $9
67 ' data/musl.all >data/musl.problems