Skip to content
GitLab
Menu
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
4036a29a
Commit
4036a29a
authored
Jan 21, 2009
by
John van Groningen
Browse files
move functions that depend on ObjectIO to UtilObjectIO
parent
66d08da3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Mac/UtilIO.dcl
View file @
4036a29a
...
...
@@ -4,7 +4,6 @@ definition module UtilIO
/* Primitives which 'should be' in the standard CLEAN IO lib */
//import StdEnv
import
StdString
,
StdFile
import
UtilDate
...
...
@@ -26,16 +25,4 @@ FReadOnly :: !{#Char} !*env -> (!Bool, !*env) | FileSystem env
GetLongPathName
::
!
String
->
String
;
GetShortPathName
::
!
String
->
(!
Bool
,!
String
);
import
StdPSt
,
StdMaybe
,
StdPictureDef
,
StdId
selectInputFile`
::
!(
PSt
.
l
)
->
(!
Maybe
String
,!(
PSt
.
l
))
selectOutputFile`
::
!
String
!
String
!
String
!(
PSt
.
l
)
->
(!
Maybe
String
,!(
PSt
.
l
))
selectDirectory`
::
!(
PSt
.
l
)
->
(!
Maybe
String
,!(
PSt
.
l
))
ShellDefault
::
!{#
Char
}
!(
PSt
.
l
)
->
(!
Int
,!(
PSt
.
l
))
GetDialogBackgroundColour
::
!(
PSt
.
l
)
->
(!
Colour
,
!
PSt
.
l
)
isWindow
::
!
Id
*(
PSt
.
l
)
->
(
Bool
,*(
PSt
.
l
))
/////////
LaunchTheDocument
::
!
String
!
String
!
Int
!*
a
->
(!
Int
,!*
a
)
Mac/UtilIO.icl
View file @
4036a29a
implementation
module
UtilIO
import
code
from
"cUtilSystem."
/* OS dependent module */
/* Primitives which 'should be' in the standard CLEAN IO lib */
...
...
@@ -163,45 +165,10 @@ GetFName ioNamePtr t = code (ioNamePtr=R80O0D0SD1,t=U)(ioResult=D0,ioDate_and_Ti
instruction
0x8321004C
|
lwz
r25
,
76
(
sp
)
};
import
StdFileSelect
,
StdPSt
,
StdPStClass
,
StdPictureDef
selectInputFile`
::
!(
PSt
.
l
)
->
(!
Maybe
String
,!(
PSt
.
l
))
selectInputFile`
ps
=
selectInputFile
ps
selectOutputFile`
::
!
String
!
String
!
String
!(
PSt
.
l
)
->
(!
Maybe
String
,!(
PSt
.
l
))
selectOutputFile`
prompt
filename
ok
ps
=
selectOutputFile
prompt
filename
ps
selectDirectory`
::
!(
PSt
.
l
)
->
(!
Maybe
String
,!
PSt
.
l
)
selectDirectory`
ps
#
(
ms
,
ps
)
=
selectDirectory
ps
#
ms
=
mapMaybe
removeDirsep
ms
=
(
ms
,
ps
)
where
removeDirsep
s
#
final
=
dec
(
size
s
)
|
s
.[
final
]
==
':'
=
s
%(
0
,
dec
final
)
=
s
ShellDefault
::
!{#
Char
}
!(
PSt
.
l
)
->
(!
Int
,!(
PSt
.
l
))
ShellDefault
_
ps
=
abort
"no ShellDefault on a Mac silly:-)"
GetDialogBackgroundColour
::
!(
PSt
.
l
)
->
(!
Colour
,!
PSt
.
l
)
GetDialogBackgroundColour
ps
=
(
White
/*LightGrey*/
,
ps
)
// Mac Appearance dependant!
isWindow
::
!
Id
*(
PSt
.
l
)
->
(
Bool
,*(
PSt
.
l
))
isWindow
wId
ps
#
(
s
,
ps
)
=
accPIO
getWindowsStack
ps
=
(
isMember
wId
s
,
ps
)
/////////////////////
//import nodebug
trace_n`
_
f
:==
f
import
code
from
"cUtilSystem."
LaunchTheDocument
::
!
String
!
String
!
Int
!*
a
->
(!
Int
,!*
a
)
LaunchTheDocument
docPath
appPath
appCreator
env
#
(
error_n
,
appSpec
,
tb
)
=
FSMakeFSSpec
appPath
OSNewToolbox
...
...
Mac/UtilObjectIO.dcl
0 → 100644
View file @
4036a29a
definition
module
UtilObjectIO
/* OS dependent module */
/* Primitives which 'should be' in the standard CLEAN IO lib */
import
StdString
,
StdFile
import
UtilDate
import
StdPSt
,
StdMaybe
,
StdPictureDef
,
StdId
selectInputFile`
::
!(
PSt
.
l
)
->
(!
Maybe
String
,!(
PSt
.
l
))
selectOutputFile`
::
!
String
!
String
!
String
!(
PSt
.
l
)
->
(!
Maybe
String
,!(
PSt
.
l
))
selectDirectory`
::
!(
PSt
.
l
)
->
(!
Maybe
String
,!(
PSt
.
l
))
ShellDefault
::
!{#
Char
}
!(
PSt
.
l
)
->
(!
Int
,!(
PSt
.
l
))
GetDialogBackgroundColour
::
!(
PSt
.
l
)
->
(!
Colour
,
!
PSt
.
l
)
isWindow
::
!
Id
*(
PSt
.
l
)
->
(
Bool
,*(
PSt
.
l
))
Mac/UtilObjectIO.icl
0 → 100644
View file @
4036a29a
implementation
module
UtilObjectIO
/* OS dependent module */
/* Primitives which 'should be' in the standard CLEAN IO lib */
import
StdArray
,
StdBool
,
StdClass
,
StdFile
,
StdList
,
StdMisc
import
StdSystem
,
StdWindow
import
StdFileSelect
,
StdPSt
,
StdPStClass
,
StdPictureDef
selectInputFile`
::
!(
PSt
.
l
)
->
(!
Maybe
String
,!(
PSt
.
l
))
selectInputFile`
ps
=
selectInputFile
ps
selectOutputFile`
::
!
String
!
String
!
String
!(
PSt
.
l
)
->
(!
Maybe
String
,!(
PSt
.
l
))
selectOutputFile`
prompt
filename
ok
ps
=
selectOutputFile
prompt
filename
ps
selectDirectory`
::
!(
PSt
.
l
)
->
(!
Maybe
String
,!
PSt
.
l
)
selectDirectory`
ps
#
(
ms
,
ps
)
=
selectDirectory
ps
#
ms
=
mapMaybe
removeDirsep
ms
=
(
ms
,
ps
)
where
removeDirsep
s
#
final
=
dec
(
size
s
)
|
s
.[
final
]
==
':'
=
s
%(
0
,
dec
final
)
=
s
ShellDefault
::
!{#
Char
}
!(
PSt
.
l
)
->
(!
Int
,!(
PSt
.
l
))
ShellDefault
_
ps
=
abort
"no ShellDefault on a Mac silly:-)"
GetDialogBackgroundColour
::
!(
PSt
.
l
)
->
(!
Colour
,!
PSt
.
l
)
GetDialogBackgroundColour
ps
=
(
White
/*LightGrey*/
,
ps
)
// Mac Appearance dependant!
isWindow
::
!
Id
*(
PSt
.
l
)
->
(
Bool
,*(
PSt
.
l
))
isWindow
wId
ps
#
(
s
,
ps
)
=
accPIO
getWindowsStack
ps
=
(
isMember
wId
s
,
ps
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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