the MSVC conversion scripts, since the old ones would occasional be
whacked. Again I ask, if you see better code here, please commit it.
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85601
13f79535-47bb-0310-9956-
ffa450edef68
sub tovc5 {
if (m|.dsp$|) {
+ $oname = $_;
$tname = '.#' . $_;
$verchg = 0;
- $srcfl = new IO::File $_, "r" || die;
+ $srcfl = new IO::File $oname, "r" || die;
$dstfl = new IO::File $tname, "w" || die;
while ($src = <$srcfl>) {
if ($src =~ s|Format Version 6\.00|Format Version 5\.00|) {
undef $srcfl;
undef $dstfl;
if ($verchg) {
- unlink $_;
- rename $tname, $_;
- print "Converted VC6 project " . $_ . " to VC5 in " . $File::Find::dir . "\n";
+ unlink $oname || die;
+ rename $tname, $oname || die;
+ print "Converted VC6 project " . $oname . " to VC5 in " . $File::Find::dir . "\n";
}
else {
unlink $tname;
sub tovc6 {
if (m|.dsp$|) {
+ $oname = $_;
$tname = '.#' . $_;
$verchg = 0;
$srcfl = new IO::File $_, "r" || die;
undef $srcfl;
undef $dstfl;
if ($verchg) {
- unlink $_;
- rename $tname, $_;
- print "Converted VC5 project " . $_ . " to VC6 in " . $File::Find::dir . "\n";
+ unlink $oname || die;
+ rename $tname, $oname || die;
+ print "Converted VC5 project " . $oname . " to VC6 in " . $File::Find::dir . "\n";
}
else {
unlink $tname;