(svn r9464) [NoAI] -Fix: make squirrel export script work with gawk again (silly stuff)
--- a/src/ai/api/squirrel_export.awk Sun Mar 25 22:21:12 2007 +0000
+++ b/src/ai/api/squirrel_export.awk Sun Mar 25 22:31:39 2007 +0000
@@ -193,8 +193,8 @@
param_s = $0
gsub("\\*", "", $0)
gsub("\\(.*", "", $0)
- func = $2
- if (func == "") next
+ funcname = $2
+ if (funcname == "") next
sub(".*\\(", "", param_s)
sub("\\).*", "", param_s)
@@ -204,7 +204,7 @@
len = 1;
for (len = 1; params[len] != ""; len++) {
sub("^[ ]*", "", params[len])
- if (match(params[len], "\*")) {
+ if (match(params[len], "\\*")) {
if (match(params[len], "^char")) {
types = types "s"
} else {
@@ -219,12 +219,12 @@
if (is_static) {
static_method_size++
- static_methods[static_method_size, 0] = func
+ static_methods[static_method_size, 0] = funcname
static_methods[static_method_size, 1] = len
static_methods[static_method_size, 2] = types
} else {
method_size++
- methods[method_size, 0] = func
+ methods[method_size, 0] = funcname
methods[method_size, 1] = len
methods[method_size, 2] = types
}