summaryrefslogtreecommitdiff
path: root/source3/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
commit7e3b4a1c0df1434eb3d02f93c736ce065f9898d8 (patch)
tree025b06cd0fe6aa7e228532c53318fc7fb8c0a9e0 /source3/script
parentb7ca915de8e8b6d9592ff52699ff271d99eaebc0 (diff)
downloadsamba-7e3b4a1c0df1434eb3d02f93c736ce065f9898d8.tar.gz
samba-7e3b4a1c0df1434eb3d02f93c736ce065f9898d8.tar.bz2
samba-7e3b4a1c0df1434eb3d02f93c736ce065f9898d8.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 (This used to be commit b551dc98f7cc194a5fc2e67a4ebae7fd67a01bbc)
Diffstat (limited to 'source3/script')
-rw-r--r--source3/script/mkproto.awk39
1 files changed, 39 insertions, 0 deletions
diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk
index d7b042652d..3f3ef1c9fc 100644
--- a/source3/script/mkproto.awk
+++ b/source3/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;
}