summaryrefslogtreecommitdiffstats
path: root/sys/tools
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-12-06 06:59:38 +0000
committerpeter <peter@FreeBSD.org>2000-12-06 06:59:38 +0000
commita9b3c8ef131996f8a9c1e1642f58fa0e5b532673 (patch)
tree74acc8c7b739d2bfc8faf7ffcbfeaeddd2f4221d /sys/tools
parent9161f5f6260db94dfad112034189336d76ae9499 (diff)
downloadFreeBSD-src-a9b3c8ef131996f8a9c1e1642f58fa0e5b532673.zip
FreeBSD-src-a9b3c8ef131996f8a9c1e1642f58fa0e5b532673.tar.gz
Simplify this a bit so that it doesn't have to generate silly redundant
__P() prototypes when an ansi-style static inline is a prototype already. Since vnode_if.[ch] are generated on the fly, there are no CVS diffs to mess up.
Diffstat (limited to 'sys/tools')
-rw-r--r--sys/tools/vnode_if.awk17
1 files changed, 3 insertions, 14 deletions
diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk
index 46e7fb7..e0aebbb 100644
--- a/sys/tools/vnode_if.awk
+++ b/sys/tools/vnode_if.awk
@@ -229,23 +229,12 @@ line: while (<SRC>) {
# Print out extern declaration.
print HEADER "extern struct vnodeop_desc ${name}_desc;\n";
- # Print out prototype.
- print HEADER "static __inline int ${uname} __P((\n";
+ # Print out function.
+ print HEADER "static __inline int ${uname}(\n";
for (my $c2 = 0; $c2 < $numargs; ++$c2) {
$a{$c2} =~ /^\s*(INOUT|OUT|IN)(\s+WILLRELE)?\s+(.*?)\s+(\**\S*)\;/;
print HEADER "\t$3 $4" .
- ($c2 < $numargs-1 ? "," : "));") . "\n";
- }
-
- # Print out function.
- print HEADER "static __inline int ${uname}(";
- for (my $c2 = 0; $c2 < $numargs; ++$c2) {
- $a{$c2} =~ /\**([^;\s]*)\;[^\s]*$/;
- print HEADER "$1" . ($c2 < $numargs - 1 ? ', ' : ")\n");
- }
- for (my $c2 = 0; $c2 < $numargs; ++$c2) {
- $a{$c2} =~ /^\s*(INOUT|OUT|IN)(\s+WILLRELE)?\s+(.*?)\s+(\**\S*\;)/;
- print HEADER "\t$3 $4\n";
+ ($c2 < $numargs-1 ? "," : ")") . "\n";
}
print HEADER "{\n\tstruct ${name}_args a;\n";
print HEADER "\tint rc;\n";
OpenPOWER on IntegriCloud