4 # Extract symbols to export from C-header files.
5 # output in version-script format for linking shared libraries.
7 # Copyright (C) 2008 Micheal Adam <obnox@samba.org>
18 if (match($0,"[)][^()]*[;][ \t]*$")) {
25 /^static/ || /^[ \t]*typedef/ || !/^[a-zA-Z\_]/ {
29 /^extern[ \t]+[^()]+[;][ \t]*$/ {
30 gsub(/[^ \t]+[ \t]+/, "");
31 sub(/[;][ \t]*$/, "");
36 # look for function headers:
39 if ($0 ~ /^[A-Za-z_][A-Za-z0-9_]+/) {
47 /[_A-Za-z0-9]+[ \t]*[(].*[)][^()]*;[ \t]*$/ {
49 gsub(/[^ \t]+[ \t]+/, "");
55 /[_A-Za-z0-9]+[ \t]*[(]/ {
58 gsub(/[^ \t]+[ \t]+/, "");