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.
This commit is contained in:
Peter Wemm 2000-12-06 06:59:38 +00:00
parent bcec0cefc4
commit 7ca7bbb36b
2 changed files with 6 additions and 28 deletions

View File

@ -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";

View File

@ -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";