--- install/smalltalk-2.1.7/gtk/funcs.awk Sat Sep 20 08:14:41 2003 +++ work/smalltalk-2.1.7/gtk/funcs.awk Wed Jan 7 08:27:37 2004 @@ -51,6 +51,7 @@ type["GDestroyNotify"] = "__skip_this__" type["GFunc"] = "__skip_this__" type["GWeakNotify"] = "__skip_this__" + type["PangoCoverage"] = "__skip_this__" #FIXME type["gint8"] = "#int" type["guint8"] = "#int" @@ -111,37 +112,32 @@ $0 = substr ($0, RLENGTH + 1) } -$2 ~ /^\**(g[a-z]*|pango)_/ && $1 ~ /[a-zA-Z]/ && $1 !~ /^#/ { - if (match ($2, /^\*+/)) - { - $1 = $1 substr ($2, 1, RLENGTH) - $2 = substr ($2, RLENGTH + 1) - } - - $0 = $0 +match($0, /^[ \t]*([a-zA-Z][a-zA-Z0-9]*[ \t\*]+)((g[a-z]*|pango)_[a-zA-Z0-9_]*)[ \t]*(\(.*)/, first_line) && $0 !~ /\/\*/ { + + first_line[1] = gensub(/[ \t]+/, "", "G", first_line[1]) - cFuncName = $2 + cFuncName = first_line[2] - if (match($2, method_regexp)) - className = class[substr($2, 1, RLENGTH)] - else if (match ($2, /^(g_)?[a-z]*_/)) - className = smalltalkize(toupper(substr($2, 1, RLENGTH - 1))) + if (match(first_line[2], method_regexp)) + className = class[substr(first_line[2], 1, RLENGTH)] + else if (match (first_line[2], /^(g_)?[a-z]*_/)) + className = smalltalkize(toupper(substr(first_line[2], 1, RLENGTH - 1))) if (tolower(className) in correct_case) className = correct_case[tolower(className)] - $2 = substr($2, RLENGTH + 1) - creation = $2 ~ /^(newv?|alloc)($|_)/ + first_line[2] = substr(first_line[2], RLENGTH + 1) + creation = first_line[2] ~ /^(newv?|alloc)($|_)/ # Lose some symmetry for the sake of intuitiveness - self = $2 ~ /(^|_)((un)?ref$|(dis)?connect)/ - if (match($2, /^(draw|paint)_/)) + self = first_line[2] ~ /(^|_)((un)?ref$|(dis)?connect)/ + if (match(first_line[2], /^(draw|paint)_/)) className = "GtkStyle" - smalltalkFuncName = smalltalkize($2) + smalltalkFuncName = smalltalkize(first_line[2]) # create one long string and tokenize it - decl = $0 + decl = first_line[1] " " first_line[2] " " first_line[4] while( match( decl, ";" ) == 0 ) { getline @@ -240,7 +236,7 @@ if (creation) retType = returned(className "*") else - retType = returned(arr[1]) + retType = returned(first_line[1]) if (void) argdecl = ""