summaryrefslogtreecommitdiff
path: root/source/script
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-06-04 06:42:03 +0000
committerAndrew Tridgell <tridge@samba.org>1996-06-04 06:42:03 +0000
commit0d8dcfa13c527ec2c8aca39ba49c09e4e694b26c (patch)
tree5e811c2a4419ac3c544291de3fefced4bb367f6a /source/script
parent72543810ce3eb5ea7b141f957edf38b4c46b1ea4 (diff)
downloadsamba-0d8dcfa13c527ec2c8aca39ba49c09e4e694b26c.tar.gz
a huge pile of changes :-)
The biggest thing is the integration of Lukes new nmbd. Its still largely untested, so we will really need some feedback I've also added auto prototype generation and cleaned up a lot of minor things as a result
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
new file mode 100644
index 00000000000..4bf0d3c37df
--- /dev/null
+++ b/source/script/mkproto.awk
@@ -0,0 +1,39 @@
+# generate prototypes for Samba C code
+
+
+BEGIN {
+ inheader=0;
+}
+
+{
+ if (inheader) {
+ if (match($0,"[)][ \t]*$")) {
+ inheader = 0;
+ printf "%s;\n",$0;
+ } else {
+ printf "%s\n",$0;
+ }
+ next;
+ }
+}
+
+/^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ {
+ next;
+}
+
+!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time/ {
+ next;
+}
+
+
+/[(].*[)][ \t]*$/ {
+ printf "%s;\n",$0;
+ next;
+}
+
+/[(]/ {
+ inheader=1;
+ printf "%s\n",$0;
+ next;
+}
+