Changeset 23 for trunk/mkstructinfo.awk

Show
Ignore:
Timestamp:
05/25/2006 08:51:45 AM (7 years ago)
Author:
moo
Message:

POSIX { and delete
TODO: still not POSIX compatible due to "match()"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/mkstructinfo.awk

    r5 r23  
    33BEGIN { 
    44    brace = 0; 
    5     delete buffer; 
    65    buffer_len = 0; 
    76} 
     
    3433        printf "define(`SIZEOF_%s', `(  %s  )')\n", instruct, elm; 
    3534        print "\n"; 
    36         delete buffer; 
     35        for (i in buffer) { 
     36            delete buffer[i]; 
     37        } 
    3738        buffer_len = 0; 
    3839        instruct = 0; 
     
    4142} 
    4243 
    43 /.{/ { 
     44/.\{/ { 
    4445    brace = brace + 1; 
    4546} 
     
    7677    next; 
    7778} 
    78 /^typedef struct .*{/ { 
     79/^typedef struct .*\{/ { 
    7980    brace = 1; 
    8081    instruct = 1; 
     
    8283} 
    8384 
    84 /^struct .*{/ { 
     85/^struct .*\{/ { 
    8586    instruct = $2; 
    8687    brace = 1;