Try again to find the right directory on both local and farm builds.
[rsync.git] / mkproto.awk
blob6af5dfc3ef99e347a19e3837cdfdf9f05afbe170
1 # generate prototypes for Samba C code
2 # tridge, June 1996
4 BEGIN {
5 inheader=0;
6 print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */"
7 print ""
11 if (inheader) {
12 if (match($0,"[)][ \t]*$")) {
13 inheader = 0;
14 printf "%s;\n",$0;
15 } else {
16 printf "%s\n",$0;
18 next;
22 /^FN_LOCAL_BOOL/ {
23 split($0,a,"[,()]")
24 printf "BOOL %s(int );\n", a[2]
27 /^FN_LOCAL_STRING/ {
28 split($0,a,"[,()]")
29 printf "char *%s(int );\n", a[2]
32 /^FN_LOCAL_INT/ {
33 split($0,a,"[,()]")
34 printf "int %s(int );\n", a[2]
37 /^FN_LOCAL_CHAR/ {
38 split($0,a,"[,()]")
39 printf "char %s(int );\n", a[2]
42 /^FN_GLOBAL_BOOL/ {
43 split($0,a,"[,()]")
44 printf "BOOL %s(void);\n", a[2]
47 /^FN_GLOBAL_STRING/ {
48 split($0,a,"[,()]")
49 printf "char *%s(void);\n", a[2]
52 /^FN_GLOBAL_INT/ {
53 split($0,a,"[,()]")
54 printf "int %s(void);\n", a[2]
57 /^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ {
58 next;
61 !/^OFF_T|^size_t|^off_t|^pid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time/ {
62 next;
66 /[(].*[)][ \t]*$/ {
67 printf "%s;\n",$0;
68 next;
71 /[(]/ {
72 inheader=1;
73 printf "%s\n",$0;
74 next;