On 21 Jul 2001 07:34:13 -0400, Jeff Trawick wrote:
>"Sander Striker" <[EMAIL PROTECTED]> writes:
>
>> 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.
>
>For reasons I don't understand I wasn't able to apply the patch.
The patch doesn't apply cleanly because somewhere along the line it got
whitespace trimmed. Here's a repaired version.
Index: make_exports.awk
===================================================================
RCS file: /usr/local/cvs/httpd-2.0/build/make_exports.awk,v
retrieving revision 1.1
diff -u -r1.1 make_exports.awk
--- make_exports.awk 2001/07/21 06:34:54 1.1
+++ make_exports.awk 2001/07/21 12:49:14
@@ -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
}
--
______________________________________________________________________________
| Brian Havard | "He is not the messiah! |
| [EMAIL PROTECTED] | He's a very naughty boy!" - Life of Brian |
------------------------------------------------------------------------------