POSIX { and delete
TODO: still not POSIX compatible due to "match()" git-svn-id: svn://svn.lighttpd.net/xcache/trunk@23 c26eb9a1-5813-0410-bd6c-c2e55f420ca71.1
parent
768c007dee
commit
9be9c1c865
|
@ -2,7 +2,6 @@
|
|||
# vim:ts=4:sw=4
|
||||
BEGIN {
|
||||
brace = 0;
|
||||
delete buffer;
|
||||
buffer_len = 0;
|
||||
}
|
||||
/^}.*;/ {
|
||||
|
@ -33,14 +32,16 @@ BEGIN {
|
|||
printf "define(`COUNTOF_%s', `%s')\n", instruct, i;
|
||||
printf "define(`SIZEOF_%s', `( %s )')\n", instruct, elm;
|
||||
print "\n";
|
||||
delete buffer;
|
||||
for (i in buffer) {
|
||||
delete buffer[i];
|
||||
}
|
||||
buffer_len = 0;
|
||||
instruct = 0;
|
||||
}
|
||||
next;
|
||||
}
|
||||
|
||||
/.{/ {
|
||||
/.\{/ {
|
||||
brace = brace + 1;
|
||||
}
|
||||
/.}/ {
|
||||
|
@ -75,13 +76,13 @@ BEGIN {
|
|||
typedefs[$3] = $4;
|
||||
next;
|
||||
}
|
||||
/^typedef struct .*{/ {
|
||||
/^typedef struct .*\{/ {
|
||||
brace = 1;
|
||||
instruct = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
/^struct .*{/ {
|
||||
/^struct .*\{/ {
|
||||
instruct = $2;
|
||||
brace = 1;
|
||||
next;
|
||||
|
|
Loading…
Reference in New Issue