1
0
Fork 0

avoid gnu extension, for devel

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@41 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
Xuefer 2006-05-28 04:36:57 +00:00
parent 776aff683c
commit 87e7b3bcdf
2 changed files with 9 additions and 5 deletions

View File

@ -4,18 +4,23 @@
BEGIN {
FS=" "
max = 0;
delete opcodes;
}
/^ZEND_VM_HANDLER\(/ {
# regex from php5.1+/Zend/zend_vm_gen.php
gsub(/ +/, "");
if (!match($0, /^ZEND_VM_HANDLER\(([0-9]+),([A-Z_]+),([A-Z|]+),([A-Z|]+)\)/, array)) {
if (!match($0, /^ZEND_VM_HANDLER\(([0-9]+),([A-Z_]+),([A-Z|]+),([A-Z|]+)\)/)) {
print "error unmatch $0";
exit;
}
id = 0 + array[1];
name = array[2];
# life is hard without 3rd argument of match()
sub(/^ZEND_VM_HANDLER\(/, "");
id = $0;
sub(/,.*/, "", id); # chop
id = 0 + id;
sub(/^([0-9]+),/, "");
sub(/,.*/, ""); # chop
name = $0;
if (max < id) {
max = id;
}

View File

@ -5,7 +5,6 @@ BEGIN {
FS=" "
max = 0;
started = 0
delete opcodes;
}
/OPDEF/ {