BEGIN { inheader=0; current_file=""; print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */" print "" } { if (FILENAME!=current_file) { print "" print "/*The following definitions come from ",FILENAME," */" print "" current_file=FILENAME } if (inheader) { if (match($0,"[)][ \t]*$")) { inheader = 0; printf "%s;\n",$0; } else { printf "%s\n",$0; } next; } } /^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ { next; } !/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|arc4_key/ { next; } /[(].*[)][ \t]*$/ { printf "%s;\n",$0; next; } /[(]/ { inheader=1; printf "%s\n",$0; next; }