Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-ide
Commits
734f6d30
Commit
734f6d30
authored
Jan 21, 2009
by
John van Groningen
Browse files
use DirSeparator from Platform instead of dirseparator from StdSystem
parent
8257b8e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Pm/PmPath.icl
View file @
734f6d30
...
...
@@ -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
]
==
d
ir
s
eparator
|
size
pathname
>
0
&&
pathname
.[
size
pathname
-
1
]
==
D
ir
S
eparator
=
pathname
+++
SystemDir
|
otherwise
=
pathname
+++
sep
+++
SystemDir
;
where
sep
=
toString
d
ir
s
eparator
;
sep
=
toString
D
ir
S
eparator
;
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
]
==
d
ir
s
eparator
|
size
dir
>
0
&&
dir
.[
size
dir
-
1
]
==
D
ir
S
eparator
=
dir
+++
SystemDir
;
|
otherwise
=
dir
+++
sep
+++
SystemDir
;
dir
=
RemoveFilename
abcname
;
sep
=
toString
d
ir
s
eparator
;
sep
=
toString
D
ir
S
eparator
;
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
]
==
d
ir
s
eparator
|
size
dir
>
0
&&
dir
.[
size
dir
-
1
]
==
D
ir
S
eparator
=
dir
+++
SystemDir
;
|
otherwise
=
dir
+++
sep
+++
SystemDir
;
dir
=
RemoveFilename
name
;
sep
=
toString
d
ir
s
eparator
;
sep
=
toString
D
ir
S
eparator
;
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
]
==
d
ir
s
eparator
|
size
dir
>
0
&&
dir
.[
size
dir
-
1
]
==
D
ir
S
eparator
=
dir
+++
SystemDir
;
|
otherwise
=
dir
+++
sep
+++
SystemDir
;
dir
=
RemoveFilename
abcname
;
sep
=
toString
d
ir
s
eparator
;
sep
=
toString
D
ir
S
eparator
;
file
=
RemovePath
(
RemoveSuffix
abcname
);
suffix
=
PlatformDependant
".s"
// Win
...
...
@@ -140,7 +139,7 @@ where
= dir;
= dir +++ sep +++ SystemDir;
dir = RemoveFilename abcname;
sep = toString
d
ir
s
eparator;
sep = toString
D
ir
S
eparator;
file = RemovePath (RemoveSuffix abcname);
MakeObjSystemPathname :: !Processor !Pathname !Files -> (!Pathname,!Files);
...
...
@@ -161,7 +160,7 @@ where
= dir;
= dir +++ sep +++ SystemDir;
dir = RemoveFilename name;
sep = toString
d
ir
s
eparator;
sep = toString
D
ir
S
eparator;
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
=
(
d
ir
s
eparator
,
path
)
=
(
D
ir
S
eparator
,
path
)
where
replace_prefix
separator
path
|
separator
==
d
ir
s
eparator
|
separator
==
D
ir
S
eparator
=
(
separator
,
path
)
=
(
separator
,
replace_character_in_string
separator
d
ir
s
eparator
path
)
=
(
separator
,
replace_character_in_string
separator
D
ir
S
eparator
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
==
d
ir
s
eparator
|
separator
==
D
ir
S
eparator
=
path
|
d
ir
s
eparator
==
'\\'
|
D
ir
S
eparator
==
'\\'
=
path
+++
".exe"
|
separator
==
'\\'
#
l
=
size
path
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment