Commit 734f6d30 authored by John van Groningen's avatar John van Groningen

use DirSeparator from Platform instead of dirseparator from StdSystem

parent 8257b8e7
......@@ -3,7 +3,6 @@ implementation module PmPath
import StdClass,StdString, StdChar, StdBool, StdChar,StdInt, StdMisc,StdArray;
import StdPathname
from StdSystem import dirseparator
import PmTypes
import Platform
import UtilStrictLists
......@@ -62,12 +61,12 @@ MakeSystemPathname :: !Pathname -> Pathname;
MakeSystemPathname pathname
| equal_suffix SystemDir pathname
= pathname
| size pathname > 0 && pathname.[size pathname - 1] == dirseparator
| size pathname > 0 && pathname.[size pathname - 1] == DirSeparator
= pathname +++ SystemDir
| otherwise
= pathname +++ sep +++ SystemDir;
where
sep = toString dirseparator;
sep = toString DirSeparator;
MakeABCSystemPathname :: !Pathname -> Pathname
MakeABCSystemPathname abcname
......@@ -76,12 +75,12 @@ where
directory_name_plus_system_dir
| equal_suffix SystemDir dir
= dir;
| size dir > 0 && dir.[size dir - 1] == dirseparator
| size dir > 0 && dir.[size dir - 1] == DirSeparator
= dir +++ SystemDir;
| otherwise
= dir +++ sep +++ SystemDir;
dir = RemoveFilename abcname;
sep = toString dirseparator;
sep = toString DirSeparator;
file = RemovePath (RemoveSuffix abcname);
MakeObjSystemPathname :: !Processor !Pathname -> Pathname
......@@ -104,12 +103,12 @@ where
directory_name_plus_system_dir
| equal_suffix SystemDir dir
= dir;
| size dir > 0 && dir.[size dir - 1] == dirseparator
| size dir > 0 && dir.[size dir - 1] == DirSeparator
= dir +++ SystemDir;
| otherwise
= dir +++ sep +++ SystemDir;
dir = RemoveFilename name;
sep = toString dirseparator;
sep = toString DirSeparator;
file = RemovePath (RemoveSuffix name);
MakeAssemblySystemPathname :: !Pathname -> Pathname
......@@ -119,12 +118,12 @@ where
directory_name_plus_system_dir
| equal_suffix SystemDir dir
= dir;
| size dir > 0 && dir.[size dir - 1] == dirseparator
| size dir > 0 && dir.[size dir - 1] == DirSeparator
= dir +++ SystemDir;
| otherwise
= dir +++ sep +++ SystemDir;
dir = RemoveFilename abcname;
sep = toString dirseparator;
sep = toString DirSeparator;
file = RemovePath (RemoveSuffix abcname);
suffix = PlatformDependant
".s" // Win
......@@ -140,7 +139,7 @@ where
= dir;
= dir +++ sep +++ SystemDir;
dir = RemoveFilename abcname;
sep = toString dirseparator;
sep = toString DirSeparator;
file = RemovePath (RemoveSuffix abcname);
MakeObjSystemPathname :: !Processor !Pathname !Files -> (!Pathname,!Files);
......@@ -161,7 +160,7 @@ where
= dir;
= dir +++ sep +++ SystemDir;
dir = RemoveFilename name;
sep = toString dirseparator;
sep = toString DirSeparator;
file = RemovePath (RemoveSuffix name);
*/
......@@ -203,12 +202,12 @@ get_separator_and_convert_path path
# i=first_not_equal_character_index prefix path
| i==prefix_size && size path>prefix_size
= replace_prefix path.[prefix_size] path
= (dirseparator,path)
= (DirSeparator,path)
where
replace_prefix separator path
| separator==dirseparator
| separator==DirSeparator
= (separator,path)
= (separator,replace_character_in_string separator dirseparator path)
= (separator,replace_character_in_string separator DirSeparator path)
replace_character_in_string :: !Char !Char !{#Char} -> {#Char}
replace_character_in_string old_c new_c string
......@@ -232,9 +231,9 @@ convert_path_separators path
convert_exec_path_separators_and_extension :: !Pathname -> Pathname
convert_exec_path_separators_and_extension path
# (separator,path) = get_separator_and_convert_path path
| separator==dirseparator
| separator==DirSeparator
= path
| dirseparator=='\\'
| DirSeparator=='\\'
= path+++".exe"
| separator=='\\'
# l=size path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment