Handle c-comments.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22625 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -4,11 +4,13 @@
|
|||||||
##use Getopt::Std;
|
##use Getopt::Std;
|
||||||
require 'getopts.pl';
|
require 'getopts.pl';
|
||||||
|
|
||||||
$brace = 0;
|
my $comment = 0;
|
||||||
$line = "";
|
my $if_0 = 0;
|
||||||
$debug = 0;
|
my $brace = 0;
|
||||||
$oproto = 1;
|
my $line = "";
|
||||||
$private_func_re = "^_";
|
my $debug = 0;
|
||||||
|
my $oproto = 1;
|
||||||
|
my $private_func_re = "^_";
|
||||||
|
|
||||||
do Getopts('x:m:o:p:dqE:R:P:') || die "foo";
|
do Getopts('x:m:o:p:dqE:R:P:') || die "foo";
|
||||||
|
|
||||||
@@ -65,6 +67,14 @@ if($opt_x) {
|
|||||||
|
|
||||||
while(<>) {
|
while(<>) {
|
||||||
print $brace, " ", $_ if($debug);
|
print $brace, " ", $_ if($debug);
|
||||||
|
|
||||||
|
# Handle C comments
|
||||||
|
s@/\*.*\*/@@;
|
||||||
|
s@//.*/@@;
|
||||||
|
if ( s@/\*.*@@) { $comment = 1;
|
||||||
|
} elsif ($comment && s@.*\*/@@) { $comment = 0;
|
||||||
|
} elsif ($comment) { next; }
|
||||||
|
|
||||||
if(/^\#if 0/) {
|
if(/^\#if 0/) {
|
||||||
$if_0 = 1;
|
$if_0 = 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user