Hi,
I missed the hook declarations in my previous
script. This is added by the patch below.
The patch also removes unneeded ; that slipped
in because I use c a lot more than awk :)
I moved a rule around so removal of leading
whitespace could go into one rule
(see AP[RU]?_DECLARE).
Also removed the additional idx variable in
favor of checking the return value of the
index function.
Sander
--- build/make_exports.awk Sat Jul 21 12:16:42 2001
+++ build/make_exports.awk.new Sat Jul 21 12:14:51 2001
@@ -70,21 +70,30 @@
}
function add_symbol(symbol) {
- idx = index(symbol, "#")
-
- if (!idx) {
+ if (!index(symbol, "#")) {
push("const void *ap_hack_" symbol " = (const void *)" symbol ";")
scope_used[scope] = 1
}
}
-/^[ \t]*AP[RU]?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
- sub("[ \t]*AP[RU]?_DECLARE[^(]*[(][^)]*[)]", "");
- sub("[(].*", "");
- sub("^[ \t]+", "");
- sub("([^ ]* ^([ \t]*[(]))*", "");
+/^[ \t]*AP[RU]?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
+ sub("[ \t]*AP[RU]?_DECLARE[^(]*[(][^)]*[)][ \t]*", "")
+ sub("[(].*", "")
+ sub("([^ ]* ^([ \t]*[(]))*", "")
add_symbol($0)
+ next
+}
+
+/^[ \t]*AP_DECLARE_HOOK[^(]*[(][^)]*[)]/ {
+ split($0, args, ",")
+ symbol = args[2]
+ sub("^[ \t]+", "", symbol)
+ sub("[ \t]+$", "", symbol)
+
+ add_symbol("ap_hook_" symbol)
+ add_symbol("ap_hook_get_" symbol)
+ add_symbol("ap_run_" symbol)
next
}