diff --git a/cf/make-proto.pl b/cf/make-proto.pl index d478944c9..8eab1010d 100644 --- a/cf/make-proto.pl +++ b/cf/make-proto.pl @@ -8,8 +8,9 @@ $brace = 0; $line = ""; $debug = 0; $oproto = 1; +$private_func_re = "^_"; -do Getopts('o:p:dqP:') || die "foo"; +do Getopts('o:p:dqR:P:') || die "foo"; if($opt_d) { $debug = 1; @@ -19,6 +20,10 @@ if($opt_q) { $oproto = 0; } +if($opt_R) { + $private_func_re = $opt_R; +} + while(<>) { print $brace, " ", $_ if($debug); if(/^\#if 0/) { @@ -178,7 +183,7 @@ $private_h_header .= "#ifdef __STDC__ } foreach(sort keys %funcs){ if(/^(main)$/) { next } - if(/^_/) { + if(/$private_func_re/) { $private_h .= $funcs{$_} . "\n\n"; if($funcs{$_} =~ /__attribute__/) { $private_attribute_seen = 1;