mirror of
https://github.com/apache/httpd.git
synced 2025-08-20 16:09:55 +00:00

Obtained from: Submitted by: Reviewed by: Whoops, though I had already knocked off that nasty chomp() side effect. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85299 13f79535-47bb-0310-9956-ffa450edef68
32 lines
790 B
Perl
32 lines
790 B
Perl
use IO::File;
|
|
use File::Find;
|
|
|
|
chdir '..';
|
|
find(\&tovc6, '.');
|
|
|
|
sub tovc6 {
|
|
|
|
if (m|.dsp$|) {
|
|
$tname = '.#' . $_;
|
|
print "Convert VC6 project " . $_ . " to VC5 in " . $File::Find::dir . "\n";
|
|
$srcfl = new IO::File $_, "r" || die;
|
|
$dstfl = new IO::File $tname, "w" || die;
|
|
while ($src = <$srcfl>) {
|
|
$src =~ s|Format Version 5\.00|Format Version 6\.00|;
|
|
$src =~ s|^(# ADD CPP .*)/Zi (.*)|$1/ZI $2|;
|
|
$src =~ s|^(# ADD BASE CPP .*)/Zi (.*)|$1/ZI $2|;
|
|
if ($src =~ s|^(!MESSAGE .*)\\\n|$1|) {
|
|
$cont = <$srcfl>;
|
|
$src = $src . $cont;
|
|
}
|
|
print $dstfl $src;
|
|
if ($src =~ m|^# Begin Project|) {
|
|
print $dstfl "# PROP AllowPerConfigDependencies 0\n"; }
|
|
}
|
|
undef $srcfl;
|
|
undef $dstfl;
|
|
unlink $_;
|
|
rename $tname, $_;
|
|
}
|
|
}
|