| 1 | # generate prototypes for Samba C code |
| 2 | # tridge, June 1996 |
| 3 | |
| 4 | BEGIN { |
| 5 | inheader=0; |
| 6 | print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */" |
| 7 | print "" |
| 8 | } |
| 9 | |
| 10 | { |
| 11 | if (inheader) { |
| 12 | if (match($0,"[)][ \t]*$")) { |
| 13 | inheader = 0; |
| 14 | printf "%s;\n",$0; |
| 15 | } else { |
| 16 | printf "%s\n",$0; |
| 17 | } |
| 18 | next; |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | /^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ { |
| 23 | next; |
| 24 | } |
| 25 | |
| 26 | !/^off_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time/ { |
| 27 | next; |
| 28 | } |
| 29 | |
| 30 | |
| 31 | /[(].*[)][ \t]*$/ { |
| 32 | printf "%s;\n",$0; |
| 33 | next; |
| 34 | } |
| 35 | |
| 36 | /[(]/ { |
| 37 | inheader=1; |
| 38 | printf "%s\n",$0; |
| 39 | next; |
| 40 | } |
| 41 | |