Output the right number of backslashes in values.

This commit is contained in:
Morten Welinder 2001-02-14 21:45:12 +00:00 committed by Alexandre Julliard
parent 0124576cda
commit 1da4707f05
1 changed files with 19 additions and 12 deletions

View File

@ -191,12 +191,12 @@ sub FindWindowsDir {
}
$::windir = &ToDos(dirname($winini));
print "[wine]\n";
print "\"windows\" = \"$::windir\"\n";
print "\"windows\" = ", &marshall ($::windir), "\n";
if ($::opt_sysdir) {
print "\"system\" = \"$::opt_sysdir\"\n";
print "\"system\" = ", &marshall ($::opt_sysdir), "\n";
}
else {
print "\"system\" = \"$::windir\\SYSTEM\"\n";
print "\"system\" = ", &marshall ("$::windir\\SYSTEM"), "\n";
}
}
@ -306,7 +306,7 @@ sub ReadAutoexecBat {
warn "exist\n";
}
}
print "\"path\" = \"" . join(";", @::DOSpathlist) . "\"\n";
print "\"path\" = ", &marshall (join (";", @::DOSpathlist)), "\n";
}
else {
# Code status: tested 1.4
@ -326,15 +326,15 @@ sub ReadAutoexecBat {
$command =~ s%[^/]+$%%;
$::DOSexecdir{&ToDos($command)}++;
}
print "\"path\" = \"" .
join(";",
grep(s%\\$%%,
sort {$::DOSexecdir{$b} <=> $::DOSexecdir{$a}}
(keys %::DOSexecdir))) . "\"\n";
print "\"path\" = " .
&marshall (join(";",
grep(s%\\$%%,
sort {$::DOSexecdir{$b} <=> $::DOSexecdir{$a}}
(keys %::DOSexecdir)))) . "\n";
}
if ($::DOSenv{"temp"} && -d &ToUnix($::DOSenv{"temp"})) {
print "\"temp\" = \"" . $::DOSenv{"temp"} . "\"\n";
print "\"temp\" = ", &marshall ($::DOSenv{"temp"}), "\n";
}
else {
my $TheTemp;
@ -351,11 +351,11 @@ sub ReadAutoexecBat {
$TheTemp = '/tmp' if (!$TheTemp && -d '/tmp');
if ($TheTemp) {
warn "Using $TheTemp\n";
print "\"temp\" = \"$TheTemp\"\n";
print "\"temp\" = ", &marshall ($TheTemp), "\n";
}
else {
warn "Using C:\\\n";
print "\"temp\" = \"C:\\\"\n";
print "\"temp\" = ", &marshall ("C:\\"), "\n";
}
}
print "\n";
@ -427,6 +427,13 @@ sub InsertDefaultFile {
}
}
sub marshall {
my ($s) = @_;
$s =~ s/\\/\\\\/g;
return "\"$s\"";
}
sub StandardStuff {
if (!$::opt_inifile) {
&InsertDefaultFile("./wine.ini", "wineconf");