upload http
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / srclib / apr / build / make_nw_export.awk
1 # Based on apr's make_export.awk, which is
2 # based on Ryan Bloom's make_export.pl
3
4 BEGIN {
5     printf(" (APRLIB)\n")
6 }
7
8 # List of functions that we don't support, yet??
9 #/apr_##name##_set_inherit/{next}
10 #/apr_##name##_unset_inherit/{next}
11
12
13 function add_symbol (sym_name) {
14         if (count) {
15                 found++
16         }
17     gsub (/ /, "", sym_name)
18         line = line sym_name ",\n"
19
20         if (count == 0) {
21                 printf(" %s", line)
22                 line = ""
23         }
24 }
25
26 /^[ \t]*AP[RUI]?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
27     sub("[ \t]*AP[RUI]?_DECLARE[^(]*[(][^)]*[)][ \t]*", "")
28     sub("[(].*", "")
29     sub("([^ ]* (^([ \t]*[(])))+", "")
30
31     add_symbol($0)
32     next
33 }
34
35 /^[ \t]*AP_DECLARE_HOOK[^(]*[(][^)]*/ {
36     split($0, args, ",")
37     symbol = args[2]
38     sub("^[ \t]+", "", symbol)
39     sub("[ \t]+$", "", symbol)
40
41     add_symbol("ap_hook_" symbol)
42     add_symbol("ap_hook_get_" symbol)
43     add_symbol("ap_run_" symbol)
44     next
45 }
46
47 /^[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(][^)]*[)]/ {
48     sub("[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(]", "", $0)
49     sub("[)].*$", "", $0)
50     add_symbol("apr_" $0 "_pool_get")
51     next
52 }
53
54 /^[ \t]*APR_DECLARE_INHERIT_SET[^(]*[(][^)]*[)]/ {
55     sub("[ \t]*APR_DECLARE_INHERIT_SET[^(]*[(]", "", $0)
56     sub("[)].*$", "", $0)
57     add_symbol("apr_" $0 "_inherit_set")
58     next
59 }
60
61 /^[ \t]*APR_DECLARE_INHERIT_UNSET[^(]*[(][^)]*[)]/ {
62     sub("[ \t]*APR_DECLARE_INHERIT_UNSET[^(]*[(]", "", $0)
63     sub("[)].*$", "", $0)
64     add_symbol("apr_" $0 "_inherit_unset")
65     next
66 }
67
68 /^[ \t]*AP[RUI]?_DECLARE_DATA .*;$/ {
69        varname = $NF;
70        gsub( /[*;]/, "", varname);
71        gsub( /\[.*\]/, "", varname);
72        add_symbol(varname);
73 }
74
75
76 #END {
77 #       printf(" %s", line)
78 #}