10 if (/^struct req_pkt/) {
13 if (/^struct info_dns_assoc/) {
17 if (/^(struct\s*\w*)\s*{\s*$/) {
19 print STDERR
"type = '$type'\n" if $debug;
20 printf " printf(\"sizeof($type) = %%d\\n\", \n\t (int) sizeof($type));\n";
23 if (/\s*\w+\s+(\w*)\s*(\[.*\])?\s*;\s*$/) {
25 print STDERR
"\tfield = '$field'\n" if $debug;
26 printf " printf(\"offsetof($field) = %%d\\n\", \n\t (int) offsetof($type, $field));\n";
30 printf " printf(\"\\n\");\n\n";
34 print STDERR
"Unmatched line: $_";