update makefile
[musl-tables] / tab_posix.sh
index 2dd26f7..8477c39 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 export LC_ALL=C
+MUSL=${MUSL:-../musl}
 
 ( cd $MUSL; git log -n1 ) | awk '
 BEGIN {
@@ -8,13 +9,13 @@ BEGIN {
        hash = $2
        getline
 
-       commit = "<h4>commit</h4><p>commit <a href=\"http://git.etalabs.net/cgi-bin/gitweb.cgi?p=musl;a=commit;h=" hash "\">" hash "</a>"
+       commit = "<h4>commit</h4><p>commit <a href=\"http://git.musl-libc.org/cgit/musl/commit/?id=" hash "\">" hash "</a>"
        while (getline == 1)
                commit = commit "<br>" $0
 
        FS = "\t"
 
-       posix = "data/posix2008"
+       posix = "data/posix2008.ok"
        syms = "data/musl.syms"
        tags = "data/musl.tags"
 
@@ -24,7 +25,7 @@ BEGIN {
                if ($2 ~ /bits\//)
                        s = $3 " "
                else
-                       s = "<a href=\"http://git.etalabs.net/cgi-bin/gitweb.cgi?p=musl;a=blob;f=include/" $2 ";hb=" hash "#l" $4 "\">" $3 "</a> "
+                       s = "<a href=\"http://git.musl-libc.org/cgit/musl/tree/include/" $2 "#n" $4 "\">" $3 "</a> "
                kind[$1] = kind[$1] $3
                kindstr[$1] = kindstr[$1] s
        }
@@ -35,17 +36,10 @@ BEGIN {
        legend = legend "<li>nodecl - symbol is in libc.a but not declared in a public header"
        legend = legend "<li>missing - neither in include files (see decl) nor in libc.a (see sym)"
        legend = legend "</ul><li>sym: external symbol kind as found by `nm libc.a` (symbol kind only reported once)<ul>"
-#      legend = legend "<li>A - symbol value is absolute"
-#      legend = legend "<li>B - symbol is in the uninitialized data section (known as BSS)"
        legend = legend "<li>C - symbol is common (uninitialized data)"
        legend = legend "<li>D - symbol is in the initialized data section"
-#      legend = legend "<li>G - symbol is in the initialized data section for small objects"
-#      legend = legend "<li>I - indirect reference to another symbol"
-#      legend = legend "<li>N - debugging symbol"
        legend = legend "<li>R - symbol is in the read only data section"
-#      legend = legend "<li>S - symbol is in the uninitialized data section for small objects"
        legend = legend "<li>T - symbol is in the text section"
-#      legend = legend "<li>U - undefined symbol"
        legend = legend "<li>V - weak object"
        legend = legend "<li>W - weak symbol"
        legend = legend "</ul><li>decl: kind of declaration as found by `ctags -R include` (every occurance is reported)<ul>"
@@ -53,7 +47,7 @@ BEGIN {
        legend = legend "<li>p - function prototype"
        legend = legend "<li>x - external and forward variable declaration"
        legend = legend "</ul></ul>"
-       legend = legend "<p>(any option mark found in the synopsis of a manual is listed in the option column, this is often wrong)"
+       legend = legend "<p>(STREAMS and posix_trace* apis are excluded)"
 
        print "<h3>musl vs posix api</h3>"
        print commit
@@ -86,8 +80,11 @@ BEGIN {
                s = s "<td><a href=\"http://pubs.opengroup.org/onlinepubs/9699919799/functions/" $1 ".html\">" $1 "</a>"
                n = split($2, x, " ")
                s = s "<td>"
-               for (i = 1; i <= n; i++)
-                       s = s " <a href=\"http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/" x[i] ".html\">" x[i] "</a>"
+               for (i = 1; i <= n; i++) {
+                       h = x[i]
+                       gsub(/\//, "_", h)
+                       s = s " <a href=\"http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/" h ".html\">" x[i] "</a>"
+               }
                n = split($3, x, " ")
                s = s "<td>"
                for (i = 1; i <= n; i++)