diff options
author | peter <peter@FreeBSD.org> | 2000-12-06 06:59:38 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-12-06 06:59:38 +0000 |
commit | a9b3c8ef131996f8a9c1e1642f58fa0e5b532673 (patch) | |
tree | 74acc8c7b739d2bfc8faf7ffcbfeaeddd2f4221d /sys/kern/vnode_if.pl | |
parent | 9161f5f6260db94dfad112034189336d76ae9499 (diff) | |
download | FreeBSD-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/kern/vnode_if.pl')
-rw-r--r-- | sys/kern/vnode_if.pl | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/sys/kern/vnode_if.pl b/sys/kern/vnode_if.pl index 46e7fb7..e0aebbb 100644 --- a/sys/kern/vnode_if.pl +++ b/sys/kern/vnode_if.pl @@ -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"; |