From f8abdd9de4fbdd709ef8e464ada3a876f23c8c31 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Sat, 17 Jun 2000 20:44:46 +0000 Subject: [PATCH] Time to jump back into 2.0 again... here are yesterday's updates to 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 --- build/cvstodsp5.pl | 9 +++++---- build/dsp5tocvs.pl | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/build/cvstodsp5.pl b/build/cvstodsp5.pl index 1bec5dce82..d37442735f 100644 --- a/build/cvstodsp5.pl +++ b/build/cvstodsp5.pl @@ -7,9 +7,10 @@ find(\&tovc5, '.'); 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|) { @@ -31,9 +32,9 @@ sub tovc5 { 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; diff --git a/build/dsp5tocvs.pl b/build/dsp5tocvs.pl index 7b3c13fc55..9686b43634 100644 --- a/build/dsp5tocvs.pl +++ b/build/dsp5tocvs.pl @@ -7,6 +7,7 @@ find(\&tovc6, '.'); sub tovc6 { if (m|.dsp$|) { + $oname = $_; $tname = '.#' . $_; $verchg = 0; $srcfl = new IO::File $_, "r" || die; @@ -34,9 +35,9 @@ sub tovc6 { 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; -- 2.40.0