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
6d30fd2f
Commit
6d30fd2f
authored
Feb 21, 2003
by
Diederik van Arkel
Browse files
HeapProfiler: platform independance mods
parent
89f41bfd
Changes
2
Hide whitespace changes
Inline
Side-by-side
HeapProfile/ShowHeapProfile.icl
View file @
6d30fd2f
...
...
@@ -91,14 +91,13 @@ empty_header = {
/* Mac
PCorMac pc mac :== mac;
from files import GetFInfo,NewToolbox,Toolbox;
from files import GetFInfo,NewToolbox,
::
Toolbox;
FileExists :: !String -> Bool;
FileExists name = result==0;
{
where
(result,_,_) = GetFInfo name NewToolbox;
};
/*
system_dependent_initial_IO=[];
apple_event_open_function file_name s=:{node_size_sum} io
...
...
@@ -1302,7 +1301,8 @@ p_open_file_function file_name ps
// Set-up a dummy ProgState which can be discarded in case of errors
# (defaultPS,ps) = defaultPrintSetup ps;
# discardable_s = empty_progstate defaultPS;
#
((
ok
,
discardable_s
=:{
node_size_list
},
application_name
),
ps
)
=
accFiles
(
open_file
file_name
discardable_s
)
ps
;
# ((ok, discardable_s=:{node_size_list}, application_name), ps)
= accFiles (open_file file_name discardable_s) ps;
| ok
= (ok,application_name, discardable_s, ps);
= (ok,"",discardable_s,ps);
...
...
HeapProfile/heapprofiler.icl
View file @
6d30fd2f
...
...
@@ -2,11 +2,10 @@ module heapprofiler
import
StdEnv
,
StdIO
import
flexwin
import
expand_8_3_names_in_path
import
ArgEnv
import
ExtNotice
import
Help
import
ShowHeapProfile
import
Platform
import
StdDebug
...
...
@@ -37,7 +36,7 @@ where
#
hasPage
=
hasPrev
||
hasNext
#
(_,
ps
)
=
openMenu
Void
(
page_menu
hasPage
hasNext
hasPrev
recId
pageId
nextId
prevId
)
ps
#
(_,
ps
)
=
openMenu
Void
(
help_menu
)
ps
=
ps
=
installPlatformEventHandlers
ps
file_menu
recId
winId
closeId
printId
pageId
nextId
prevId
=
Menu
"&File"
...
...
@@ -122,18 +121,16 @@ info =
//-- Support functions...
open_heap_file_from_command_line
ps
|
size
commandline
==
1
#
(
commandline
,
ps
)
=
initPlatformCommandLine
ps
|
length
commandline
<=
1
#
(
dp
,
ps
)
=
defaultPrintSetup
ps
=
(
empty_progstate
dp
,
ps
)
=
open_file_function
(
expand_8_3_names_in_path
commandline
.[
1
])
ps
where
commandline
=
getCommandLine
=
open_file_function
(
commandline
!!
1
)
ps
openFiles
_
_
_
_
_
_
_
[]
ps
=
ps
openFiles
recId
winId
closeId
printId
pageId
nextId
prevId
[
h
:
t
]
ps
#
(
info
=:{
application_name
},
ps
)
=
open_file_function
(
expand_8_3_names_in_path
h
)
ps
=
open_file_function
h
ps
#
ps
=
appPLoc
(
const
(
Just
application_name
))
ps
#
((
err
,_),
ps
)
=
syncSend2
recId
(
FW_SetContent
info
)
ps
|
err
<>
SendOk
...
...
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