Obtained from:
Submitted by:
Reviewed by:
Take advantage of Bill Stoddard's goof to change this over permanently.
Conversion is rather one way, for consistency. We can't really maintain
a dsp version 5 file from version 6, since version 5 likes to split up
!MESSAGE lines in odd places. This should make things more consistent.
Please execute cvstodsp5.pl from the helpers folder, prior to actually
using the MSVC 5.0 environment. When you are ready to diff, update or
commit changes, use dsp5tocvs.pl from the helpers folder to convert
them all back. (Be careful that you have CLOSED the DevStudio workspace
before you try either command!)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85298
13f79535-47bb-0310-9956-
ffa450edef68
--- /dev/null
+use IO::File;
+use File::Find;
+
+chdir '..';
+find(\&tovc5, '.');
+
+sub tovc5 {
+
+ if (m|.dsp$|) {
+ $tname = '.#' . $_;
+ print "Convert project " . $_ . " to CVS standard 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 6\.00|Format Version 5\.00|;
+# This is BUCK UGLY... and I know there is a way to do it right... would someone fix?
+ $src =~ s|^(# ADD CPP .*)/ZI (.*)|$1/Zi $2|;
+ $src =~ s|^(# ADD BASE CPP .*)/ZI (.*)|$1/Zi $2|;
+ if ($src !~ m|^# PROP AllowPerConfigDependencies|) {
+ print $dstfl $src; }
+ }
+ undef $srcfl;
+ undef $dstfl;
+ unlink $_;
+ rename $tname, $_;
+ }
+}
\ No newline at end of file
--- /dev/null
+use IO::File;
+use File::Find;
+
+chdir '..';
+find(\&tovc6, '.');
+
+sub tovc6 {
+
+ if (m|.dsp$|) {
+ $tname = '.#' . $_;
+ print "Convert project " . $_ . " to VC6 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>;
+ chomp $src;
+ $src = chomp($src) . $cont;
+ }
+ print $dstfl $src;
+ if ($src =~ m|^# Begin Project|) {
+ print $dstfl "# PROP AllowPerConfigDependencies 0\n"; }
+ }
+ undef $srcfl;
+ undef $dstfl;
+ unlink $_;
+ rename $tname, $_;
+ }
+}