summaryrefslogtreecommitdiffstats
path: root/source/script
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-06-10 04:38:24 +0000
committerAndrew Tridgell <tridge@samba.org>1996-06-10 04:38:24 +0000
commitb551dc98f7cc194a5fc2e67a4ebae7fd67a01bbc (patch)
treec046d26355a3f879f74680db5f2871f17e119554 /source/script
parent0c96ac512fe1f9baf35a8c1c0eb83e001ffb54df (diff)
downloadsamba-b551dc98f7cc194a5fc2e67a4ebae7fd67a01bbc.tar.gz
samba-b551dc98f7cc194a5fc2e67a4ebae7fd67a01bbc.tar.xz
samba-b551dc98f7cc194a5fc2e67a4ebae7fd67a01bbc.zip
got rid of a lot of redundent header files as we now globally generate
prototypes automatically using "make proto". This is much less prone to error than the old method of manually adding prototypes
Diffstat (limited to 'source/script')
-rw-r--r--source/script/mkproto.awk39
1 files changed, 39 insertions, 0 deletions
diff --git a/source/script/mkproto.awk b/source/script/mkproto.awk
index d7b042652d1..3f3ef1c9fcb 100644
--- a/source/script/mkproto.awk
+++ b/source/script/mkproto.awk
@@ -3,6 +3,8 @@
BEGIN {
inheader=0;
+ print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */"
+ print ""
}
{
@@ -17,6 +19,43 @@ BEGIN {
}
}
+# we handle the loadparm.c fns separately
+
+/^FN_LOCAL_BOOL/ {
+ split($0,a,"[,()]")
+ printf "BOOL %s(int );\n", a[2]
+}
+
+/^FN_LOCAL_STRING/ {
+ split($0,a,"[,()]")
+ printf "char *%s(int );\n", a[2]
+}
+
+/^FN_LOCAL_INT/ {
+ split($0,a,"[,()]")
+ printf "int %s(int );\n", a[2]
+}
+
+/^FN_LOCAL_CHAR/ {
+ split($0,a,"[,()]")
+ printf "char %s(int );\n", a[2]
+}
+
+/^FN_GLOBAL_BOOL/ {
+ split($0,a,"[,()]")
+ printf "BOOL %s(void);\n", a[2]
+}
+
+/^FN_GLOBAL_STRING/ {
+ split($0,a,"[,()]")
+ printf "char *%s(void);\n", a[2]
+}
+
+/^FN_GLOBAL_INT/ {
+ split($0,a,"[,()]")
+ printf "int %s(void);\n", a[2]
+}
+
/^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ {
next;
}