made "hide files" and "veto files" into per-service parameter sections,
[Samba.git] / source / script / mkproto.awk
blob08b13d4610806e84491ae484db15885246f92dbf
1 BEGIN {
2 inheader=0;
3 current_file="";
4 print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */"
5 print ""
9 if (FILENAME!=current_file) {
10 print ""
11 print "/*The following definitions come from ",FILENAME," */"
12 print ""
13 current_file=FILENAME
15 if (inheader) {
16 if (match($0,"[)][ \t]*$")) {
17 inheader = 0;
18 printf "%s;\n",$0;
19 } else {
20 printf "%s\n",$0;
22 next;
26 # we handle the loadparm.c fns separately
28 /^FN_LOCAL_BOOL/ {
29 split($0,a,"[,()]")
30 printf "BOOL %s(int );\n", a[2]
33 /^FN_LOCAL_STRING/ {
34 split($0,a,"[,()]")
35 printf "char *%s(int );\n", a[2]
38 /^FN_LOCAL_INT/ {
39 split($0,a,"[,()]")
40 printf "int %s(int );\n", a[2]
43 /^FN_LOCAL_CHAR/ {
44 split($0,a,"[,()]")
45 printf "char %s(int );\n", a[2]
48 /^FN_GLOBAL_BOOL/ {
49 split($0,a,"[,()]")
50 printf "BOOL %s(void);\n", a[2]
53 /^FN_GLOBAL_STRING/ {
54 split($0,a,"[,()]")
55 printf "char *%s(void);\n", a[2]
58 /^FN_GLOBAL_INT/ {
59 split($0,a,"[,()]")
60 printf "int %s(void);\n", a[2]
63 /^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ {
64 next;
67 !/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^shm_offset_t/ {
68 next;
72 /[(].*[)][ \t]*$/ {
73 printf "%s;\n",$0;
74 next;
77 /[(]/ {
78 inheader=1;
79 printf "%s\n",$0;
80 next;