summaryrefslogtreecommitdiffstats
path: root/source/script/mkproto.awk
diff options
context:
space:
mode:
Diffstat (limited to 'source/script/mkproto.awk')
-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;
}