From fd554799817d9676708d09aa0d71f44195f1d82e Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 11 Sep 2009 14:54:02 +0200 Subject: talloc:mksyms: allow double pointer return value of functions. Michael --- lib/talloc/script/mksyms.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/talloc/script') diff --git a/lib/talloc/script/mksyms.awk b/lib/talloc/script/mksyms.awk index a30bea4d34..0d80d9f70b 100644 --- a/lib/talloc/script/mksyms.awk +++ b/lib/talloc/script/mksyms.awk @@ -60,7 +60,7 @@ END { /[_A-Za-z0-9]+[ \t]*[(].*[)][ \t]*;[ \t]*$/ { sub(/[(].*$/, ""); gsub(/[^ \t]+[ \t]+/, ""); - gsub(/^[*]/, ""); + gsub(/^[*]+/, ""); printf "\t\t%s;\n",$0; next; } -- cgit From e60c775835e45cc912660ec253521a9d7f07874c Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 11 Sep 2009 14:54:30 +0200 Subject: talloc:mksyms: allow characters after closing functions parenthesis. Michael --- lib/talloc/script/mksyms.awk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/talloc/script') diff --git a/lib/talloc/script/mksyms.awk b/lib/talloc/script/mksyms.awk index 0d80d9f70b..ca14da0f21 100644 --- a/lib/talloc/script/mksyms.awk +++ b/lib/talloc/script/mksyms.awk @@ -28,7 +28,7 @@ END { current_file=FILENAME } if (inheader) { - if (match($0,"[)][ \t]*[;][ \t]*$")) { + if (match($0,"[)][^()]*[;][ \t]*$")) { inheader = 0; } next; @@ -57,7 +57,7 @@ END { } } -/[_A-Za-z0-9]+[ \t]*[(].*[)][ \t]*;[ \t]*$/ { +/[_A-Za-z0-9]+[ \t]*[(].*[)][^()]*;[ \t]*$/ { sub(/[(].*$/, ""); gsub(/[^ \t]+[ \t]+/, ""); gsub(/^[*]+/, ""); -- cgit From 7b0e0726310c9b5f89af653ed82266a2f02eb357 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 11 Sep 2009 14:55:52 +0200 Subject: talloc:mksigs: ignore struct forward declarations. Michael --- lib/talloc/script/mksigs.pl | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/talloc/script') diff --git a/lib/talloc/script/mksigs.pl b/lib/talloc/script/mksigs.pl index 28a2e747a0..3eb90d99dc 100755 --- a/lib/talloc/script/mksigs.pl +++ b/lib/talloc/script/mksigs.pl @@ -121,6 +121,7 @@ while (my $LINE = <>) { next if ($LINE =~ /^typedef\s/); next if ($LINE =~ /^enum\s+[^\{\(]+\s+\{/); next if ($LINE =~ /^struct\s+[^\{\(]+\s+\{.*\}\s*;/); + next if ($LINE =~ /^struct\s+[a-zA-Z0-9_]+\s*;/); # concetenate function prototypes that stretch over multiple lines $REST = $LINE; -- cgit From 629ff2b6e2ec7fbd1d1ccac8a7466462aa171d4f Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 11 Sep 2009 15:01:46 +0200 Subject: talloc:mksigs: correctly ignode multiline function typedefs by first concatenating multilint parentheses and removing typefes afterwards. Michael --- lib/talloc/script/mksigs.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/talloc/script') diff --git a/lib/talloc/script/mksigs.pl b/lib/talloc/script/mksigs.pl index 3eb90d99dc..ab2e18ec52 100755 --- a/lib/talloc/script/mksigs.pl +++ b/lib/talloc/script/mksigs.pl @@ -118,11 +118,6 @@ while (my $LINE = <>) { } } - next if ($LINE =~ /^typedef\s/); - next if ($LINE =~ /^enum\s+[^\{\(]+\s+\{/); - next if ($LINE =~ /^struct\s+[^\{\(]+\s+\{.*\}\s*;/); - next if ($LINE =~ /^struct\s+[a-zA-Z0-9_]+\s*;/); - # concetenate function prototypes that stretch over multiple lines $REST = $LINE; my $parenthesis = 0; @@ -156,6 +151,11 @@ while (my $LINE = <>) { } } + next if ($LINE =~ /^typedef\s/); + next if ($LINE =~ /^enum\s+[^\{\(]+\s+\{/); + next if ($LINE =~ /^struct\s+[^\{\(]+\s+\{.*\}\s*;/); + next if ($LINE =~ /^struct\s+[a-zA-Z0-9_]+\s*;/); + # remove trailing spaces $LINE =~ s/(.*?)\s*$/$1/; -- cgit From 82404ad3e47010f892dfae8e3633a1a8f5de6630 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 11 Sep 2009 15:11:16 +0200 Subject: talloc:mksigs: ignore symbols (like _DEPRECATED_) after closing function parentheses Michael --- lib/talloc/script/mksigs.pl | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/talloc/script') diff --git a/lib/talloc/script/mksigs.pl b/lib/talloc/script/mksigs.pl index ab2e18ec52..bd76a04a26 100755 --- a/lib/talloc/script/mksigs.pl +++ b/lib/talloc/script/mksigs.pl @@ -160,6 +160,7 @@ while (my $LINE = <>) { $LINE =~ s/(.*?)\s*$/$1/; $LINE =~ s/^(.*\))\s+PRINTF_ATTRIBUTE\(.*\);$/$1;/; + $LINE =~ s/^(.*\))\s*[a-zA-Z0-9_]+\s*;$/$1;/; # remove parameter names - slightly too coarse probably $LINE =~ s/([\s\(]\*?)[_0-9a-zA-Z]+\s*([,\)])/$1$2/g; -- cgit From 56c09d2fb23d652e48d5e9e5dcc6557c1a815a6b Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 11 Sep 2009 15:16:03 +0200 Subject: talloc:mksigs: normalize bool -> _Bool Michael --- lib/talloc/script/mksigs.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/talloc/script') diff --git a/lib/talloc/script/mksigs.pl b/lib/talloc/script/mksigs.pl index bd76a04a26..a34950b09a 100755 --- a/lib/talloc/script/mksigs.pl +++ b/lib/talloc/script/mksigs.pl @@ -176,5 +176,8 @@ while (my $LINE = <>) { # normalize unsigned $LINE =~ s/([\s,\(])unsigned([,\)])/$1unsigned int$2/g; + # normalize bool + $LINE =~ s/(\b)bool(\b)/_Bool/g; + print $LINE . "\n"; } -- cgit From ea2b9e0fb1dfd433e2dd054272f4ab8a37378178 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 11 Sep 2009 15:20:34 +0200 Subject: talloc:mksigs: allow PRINTF_ATTRIBUTE(..) macros function types as funcion args Michael --- lib/talloc/script/mksigs.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/talloc/script') diff --git a/lib/talloc/script/mksigs.pl b/lib/talloc/script/mksigs.pl index a34950b09a..755cd79603 100755 --- a/lib/talloc/script/mksigs.pl +++ b/lib/talloc/script/mksigs.pl @@ -159,7 +159,7 @@ while (my $LINE = <>) { # remove trailing spaces $LINE =~ s/(.*?)\s*$/$1/; - $LINE =~ s/^(.*\))\s+PRINTF_ATTRIBUTE\(.*\);$/$1;/; + $LINE =~ s/^(.*\))\s+PRINTF_ATTRIBUTE\([^\)]*\)(\s*[;,])/$1$2/; $LINE =~ s/^(.*\))\s*[a-zA-Z0-9_]+\s*;$/$1;/; # remove parameter names - slightly too coarse probably -- cgit