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
29528135
Commit
29528135
authored
Feb 25, 2002
by
Diederik van Arkel
Browse files
Mac integration mods
parent
ddfd79a7
Changes
10
Hide whitespace changes
Inline
Side-by-side
Interfaces/LinkerInterface/WriteOptionsFile.dcl
View file @
29528135
...
...
@@ -6,4 +6,4 @@ import
ApplicationOptionsToFlags
::
!
ApplicationOptions
->
Int
FlagsToApplicationOptions
::
!
Int
!
ApplicationOptions
->
ApplicationOptions
write_options_file
::
!{#.
Char
}
!.
Int
!.
Int
!.
Int
!.
Int
!.
Int
!.
Int
!*
a
->
!
*(!
Bool
,!*
a
)
|
FileSystem
a
write_options_file
::
!{#.
Char
}
!.
Int
!.
Int
!.
Int
!.
Int
!.
Int
!.
Int
!*
a
->
*(!
Bool
,!*
a
)
|
FileSystem
a
Interfaces/LinkerInterface/WriteOptionsFile.icl
View file @
29528135
...
...
@@ -57,7 +57,7 @@ where
// otherwise
=
ShowConstructors
;
write_options_file
::
!{#.
Char
}
!.
Int
!.
Int
!.
Int
!.
Int
!.
Int
!.
Int
!*
a
->
!
*(!
Bool
,!*
a
)
|
FileSystem
a
;
write_options_file
::
!{#.
Char
}
!.
Int
!.
Int
!.
Int
!.
Int
!.
Int
!.
Int
!*
a
->
*(!
Bool
,!*
a
)
|
FileSystem
a
;
write_options_file
options_file_name
flags
heap_size
stack_size
initial_heap_size
heap_size_multiple
min_write_heap_size
files
#
(
opened
,
file
,
files
)
...
...
Interfaces/LinkerInterface/linkargs.icl
View file @
29528135
...
...
@@ -73,7 +73,7 @@ ReadLinkOpts linkargsPath ps
(
closed
,
ps
)
=
fclose
file
ps
|
not
closed
// generate warning?
=
((
linkargs
,
True
,
"The file
\"
"
+++
linkargsPath
+++
"
\"
c
l
ould not be closed."
),
ps
)
=
((
linkargs
,
True
,
"The file
\"
"
+++
linkargsPath
+++
"
\"
could not be closed."
),
ps
)
=
((
linkargs
,
True
,
""
),
ps
)
WLO
::
!
LinkInfo`
->
[
Option
]
...
...
Interfaces/ProverOptions/ProverOptions.dcl
View file @
29528135
...
...
@@ -23,7 +23,7 @@ import
,
icl_modules
::
![(!
String
,
!
String
)]
// (name, path)
,
dcl_modules
::
![(!
String
,
!
String
)]
// (name, path)
}
DummyProjectStructure
::
!
ProjectStructure
DummyProjectStructure
::
ProjectStructure
WriteProverOptions
::
!
String
!
ProjectStructure
!*
Files
->
(!
Bool
,
*
Files
)
ReadProverOptions
::
!
String
*
Files
->
((!
Int
,
!
Maybe
ProjectStructure
),
*
Files
)
\ No newline at end of file
Interfaces/ProverOptions/ProverOptions.icl
View file @
29528135
...
...
@@ -25,7 +25,7 @@ import
}
// -------------------------------------------------------------------------------------------------------------------------------------------------
DummyProjectStructure
::
!
ProjectStructure
DummyProjectStructure
::
ProjectStructure
// -------------------------------------------------------------------------------------------------------------------------------------------------
DummyProjectStructure
=
{
project_name
=
""
...
...
@@ -37,7 +37,7 @@ DummyProjectStructure =
}
// -------------------------------------------------------------------------------------------------------------------------------------------------
StartLine
::
!
String
StartLine
::
String
// -------------------------------------------------------------------------------------------------------------------------------------------------
StartLine
=
"=============================== CLEAN PROVER SYSTEM: project file ==============================="
...
...
@@ -73,7 +73,7 @@ WriteProverOptions project_name options files
=
(
True
,
files
)
// -------------------------------------------------------------------------------------------------------------------------------------------------
WriteIclModules
::
![(!
String
,
!
String
)]
!*
File
->
!
*
File
WriteIclModules
::
![(!
String
,
!
String
)]
!*
File
->
*
File
// -------------------------------------------------------------------------------------------------------------------------------------------------
WriteIclModules
[]
file
=
file
...
...
@@ -82,7 +82,7 @@ WriteIclModules [(name, path): rest] file
=
WriteIclModules
rest
file
// -------------------------------------------------------------------------------------------------------------------------------------------------
WriteDclModules
::
![(!
String
,
!
String
)]
!*
File
->
!
*
File
WriteDclModules
::
![(!
String
,
!
String
)]
!*
File
->
*
File
// -------------------------------------------------------------------------------------------------------------------------------------------------
WriteDclModules
[]
file
=
file
...
...
@@ -91,7 +91,7 @@ WriteDclModules [(name, path): rest] file
=
WriteDclModules
rest
file
// -------------------------------------------------------------------------------------------------------------------------------------------------
WriteProjectPaths
::
![
String
]
!*
File
->
!
*
File
WriteProjectPaths
::
![
String
]
!*
File
->
*
File
// -------------------------------------------------------------------------------------------------------------------------------------------------
WriteProjectPaths
[]
file
=
file
...
...
@@ -146,7 +146,7 @@ ReadProverOptions project_name files
sep1
=
'\\'
sep2
=
'/'
remove_last_extension
::
!
String
->
!
String
remove_last_extension
::
!
String
->
String
remove_last_extension
text
=
{
c
\\
c
<-
remove__last__extension
[
c
\\
c
<-:
text
]}
...
...
Mac/IdePlatform.icl
View file @
29528135
...
...
@@ -10,11 +10,13 @@ import Platform
toolIconFun
::
!
String
!(
Maybe
String
)
!(
IdFun
.
st
)
![(
ToolbarItem
.
st
)]
!*
env
->
(![(
ToolbarItem
.
st
)],!*
env
)
|
FileSystem
env
toolIconFun
bitmapname
tooltip
toolfun
itemlist
world
/* Disable for now as toolbars are not implemented yet!
# bitmappath = MakeFullPathname BitmapDir bitmapname
# (bmp,world) = openBitmap bitmappath world
# itemlist = case bmp of
Nothing -> itemlist
Just bmp -> [ToolbarItem bmp tooltip toolfun:itemlist]
*/
=
(
itemlist
,
world
)
PlatformInteractiveInit
::
!*(
PSt
General
)
->
*
PSt
General
...
...
Mac/linker_resources.icl
View file @
29528135
...
...
@@ -85,20 +85,21 @@ remove_resource resource_name n t0
add_cfrg_resource
::
String
*
Int
->
(!
Bool
,!*
Int
);
add_cfrg_resource
file_name
t0
|
handle
==
0
#
total_size
=
75
+
(
size
file_name
);
#
n_align4_bytes
=
(
4
-
(
total_size
bitand
3
))
bitand
3
;
#
(
handle
,_,
t1
)
=
NewHandle
(
total_size
+
n_align4_bytes
)
t0
;
|
handle
==
0
=
(
False
,
t1
);
=
(
error_n
==
0
,
t2
);
{}{
(
error_n
,
t2
)=
ResError
(
AddResource
(
fill_cfrg_handle
file_name
handle
)
"cfrg"
0
""
t1
);
(
handle
,_,
t1
)
=
NewHandle
(
75
+(
size
file_name
))
t0
;
}
#
(
error_n
,
t2
)
=
ResError
(
AddResource
(
fill_cfrg_handle
file_name
n_align4_bytes
handle
)
"cfrg"
0
""
t1
);
=
(
error_n
==
0
,
t2
);
fill_cfrg_handle
file_name
handle
fill_cfrg_handle
file_name
n_align4_bytes
handle
=
h1
;
{
(
h1
,_)=
AppendString
s20
file_name
;
(
h1
,_)=
append_align_bytes
n_align4_bytes
s21
;
s21
=
AppendString
s20
file_name
;
s20
=
AppendByte
s19
(
file_name_length
);
s19
=
AppendWord
s18
(
file_name_length
+
75
);
s19
=
AppendWord
s18
(
43
+
file_name_length
+
n_align4_bytes
);
s18
=
AppendLong
s17
0
;
s17
=
AppendLong
s16
0
;
s16
=
AppendLong
s15
0
;
...
...
@@ -120,6 +121,11 @@ fill_cfrg_handle file_name handle
s0
=
HandleToStructure
handle
;
file_name_length
=
size
file_name
;
append_align_bytes
n
s
|
n
==
0
=
s
;
=
append_align_bytes
(
n
-1
)
(
AppendByte
s
0
)
}
/*
...
...
Pm/PmAbcMagic.icl
View file @
29528135
...
...
@@ -158,35 +158,6 @@ SubStringToInt acc start stop str
=
acc
;
SkipSpaces
::
!
Int
!
Int
!
String
->
Int
;
SkipSpaces
i
len
str
|
i
>=
len
||
str
.[
i
]
<>
' '
=
i
;
=
SkipSpaces
(
inc
i
)
len
str
;
SkipBits
::
!
Int
!
Int
!
String
->
Int
;
SkipBits
i
len
str
|
i
>=
len
||
(
c
<>
'0'
&&
c
<>
'1'
)
=
i
;
=
SkipBits
(
inc
i
)
len
str
;
where
c
=
str
.[
i
];
SkipDigits
::
!
Int
!
Int
!
String
->
Int
;
SkipDigits
i
len
str
|
i
>=
len
||
c
<
'0'
||
'9'
<
c
=
i
;
=
SkipDigits
(
inc
i
)
len
str
;
where
c
=
str
.[
i
];
MatchS
::
!
Int
!
Int
!
Int
!
Int
!
String
!
String
->
Int
;
MatchS
start
stop
patlen
strlen
pat
str
|
stop
>=
strlen
=
stop
;
|
MatchS2
0
start
patlen
pat
str
=
inc
stop
;
=
MatchS
(
inc
start
)
(
inc
stop
)
patlen
strlen
pat
str
;
where
MatchS2
::
!
Int
!
Int
!
Int
!
String
!
String
->
Bool
;
MatchS2
patpos
strpos
patlen
pat
str
|
patpos
>=
patlen
=
True
;
|
pat
.[
patpos
]
==
str
.[
strpos
]
=
MatchS2
(
inc
patpos
)
(
inc
strpos
)
patlen
pat
str
;
=
False
;
//--
::
ModuleDate
:==
DateTime
...
...
@@ -234,7 +205,7 @@ AC_Init =
,
curi
=
0
}
AC_Add
::
!
Pathname
!
DATE
!
ABCInfo
!*
ABCCache
->
!
*
ABCCache
AC_Add
::
!
Pathname
!
DATE
!
ABCInfo
!*
ABCCache
->
*
ABCCache
AC_Add
path
date
info
abccache
#!
c
=
abccache
.
cache
#!
i
=
abccache
.
curi
...
...
@@ -246,10 +217,10 @@ AC_Add path date info abccache
,
maxi
=
if
(
m
<
(
dec
ABCCacheSize
))
i
m
}
where
newstuff
::
!
ABCStuff
newstuff
::
ABCStuff
newstuff
=
{
c_path
=
path
,
c_date
=
date
,
c_info
=
info
}
UCache
::
!
ABCStuff
!
Int
!*{!
ABCStuff
}
->
!
*{!
ABCStuff
}
UCache
::
!
ABCStuff
!
Int
!*{!
ABCStuff
}
->
*{!
ABCStuff
}
UCache
e
i
a
=
{
a
&
[
i
]
=
e
}
ParseABCDependencies`
::
!
Pathname
!
DATE
!*
ABCCache
!
Files
->
((!
Bool
,
!
List
Modulename
,
!
Maybe
ModuleDate
,
!
List
ModuleDate
,
!
List
LinkObjFileName
,
!
List
LinkLibraryName
,
!*
ABCCache
/*, !FileInfoCache*/
),
!
Files
);
...
...
@@ -509,13 +480,7 @@ where
=
characters_between_apostrophes
match_depend
len_str
str
(
last_q_date
,
_
/*date*/
)
=
characters_between_apostrophes
match_date
len_str
str
characters_between_apostrophes
::
!
Int
!
Int
!
String
->
(!
Int
,
!
String
)
characters_between_apostrophes
after_keyword_pos
len_str
str
=
(
last_q
,
str
%
(
inc
first_q
,
dec
last_q
))
where
start`
=
SkipSpaces
after_keyword_pos
len_str
str
first_q
=
FindQuoteChar
str
len_str
start`
last_q
=
FindQuoteChar
str
len_str
(
inc
first_q
)
// patch abc file of system module for change in profiling settings
...
...
@@ -588,24 +553,47 @@ where
findOptionStringOffset
string
=
(
offset
+
NrOfOptions
<
stringLength
,
offset
)
where
versionString
=
toString
version
versionSize
=
size
versionString
offset
=
skipSpaces
(
match
(
toString
version
)
(
skipSpaces
(
match
".comp"
(
skipSpaces
0
))))
#
init_offset
=
SkipSpaces
0
stringLength
string
#
comp_offset
=
MatchS
init_offset
(
init_offset
+
4
)
5
stringLength
".comp"
string
#
next_offset
=
SkipSpaces
comp_offset
stringLength
string
#
vers_offset
=
MatchS
next_offset
(
next_offset
+
versionSize
-
1
)
versionSize
stringLength
versionString
string
=
SkipSpaces
vers_offset
stringLength
string
stringLength
=
size
string
//==
SkipSpaces
::
!
Int
!
Int
!
String
->
Int
;
SkipSpaces
i
len
str
|
i
>=
len
||
str
.[
i
]
<>
' '
=
i
;
=
SkipSpaces
(
inc
i
)
len
str
;
SkipBits
::
!
Int
!
Int
!
String
->
Int
;
SkipBits
i
len
str
|
i
>=
len
||
(
c
<>
'0'
&&
c
<>
'1'
)
=
i
;
=
SkipBits
(
inc
i
)
len
str
;
where
c
=
str
.[
i
];
SkipDigits
::
!
Int
!
Int
!
String
->
Int
;
SkipDigits
i
len
str
|
i
>=
len
||
c
<
'0'
||
'9'
<
c
=
i
;
=
SkipDigits
(
inc
i
)
len
str
;
where
c
=
str
.[
i
];
MatchS
::
!
Int
!
Int
!
Int
!
Int
!
String
!
String
->
Int
;
MatchS
start
stop
patlen
strlen
pat
str
|
stop
>=
strlen
=
stop
;
|
MatchS2
0
start
patlen
pat
str
=
inc
stop
;
=
MatchS
(
inc
start
)
(
inc
stop
)
patlen
strlen
pat
str
;
where
MatchS2
::
!
Int
!
Int
!
Int
!
String
!
String
->
Bool
;
MatchS2
patpos
strpos
patlen
pat
str
|
patpos
>=
patlen
=
True
;
|
pat
.[
patpos
]
==
str
.[
strpos
]
=
MatchS2
(
inc
patpos
)
(
inc
strpos
)
patlen
pat
str
;
=
False
;
skipSpaces
::
Int
->
Int
skipSpaces
offset
|
offset
>=
stringLength
||
string
.[
offset
]
<>
' '
=
offset
|
otherwise
=
skipSpaces
(
offset
+1
)
match
::
{#
Char
}
Int
->
Int
match
matchString
offset
|
offset
+
matchLength
<=
stringLength
&&
string
%
(
offset
,
offset
+
matchLength
-1
)
==
matchString
=
offset
+
matchLength
|
otherwise
=
stringLength
where
matchLength
=
size
matchString
Pm/PmDriver.icl
View file @
29528135
...
...
@@ -126,7 +126,7 @@ BringProjectUptoDate force continuation ps
#!
(_,
ps
)
=
ClearCompilerCache
ps
#!
(
intr_info
,
ps
)
=
getInterrupt
ps
(
interact
,
ps
)
=
getInteract
ps
//
(interact,ps) = getInteract ps
ini_step
=
DInit
force
project
cleanup
#
ps
=
StartIntr
intr_info
ini_step
step
ps
=
ps
...
...
@@ -170,7 +170,7 @@ where
//-- Private stuff
::
MTPContinuation
:==
!
Bool
!
Bool
!
Bool
!
FileInfoCache
!
StaticLibInfo
!
(
List
Modulename
)
!
Project
!
Bool
*(
!
*
ABCCache
,
!
(
PSt
*
General
))
->
*(
!
*
DriverState
,
!
PSt
*
General
)
::
MTPContinuation
:==
Bool
Bool
Bool
FileInfoCache
StaticLibInfo
(
List
Modulename
)
Project
Bool
*(*
ABCCache
,(
PSt
*
General
))
->
*(*
DriverState
,
PSt
*
General
)
MakeTheProject
::
!
Bool
!
FileInfoCache
!
StaticLibInfo
!*
ABCCache
!
Project
!
MTPContinuation
!(
PSt
General
)
->
(!*
DriverState
,!
PSt
General
)
MakeTheProject
force
fileinfo
libsinfo
abccache
project
continue
ps
...
...
@@ -245,7 +245,7 @@ stop (ls,ps)
#
ps
=
StopIntr
intr_info
ps
=
(
ls
,
ps
)
step
::
!
Bool
!*
DriverState
!*(
PSt
General
)
->
!
(!*
DriverState
,!*(
PSt
General
))
step
::
!
Bool
!*
DriverState
!*(
PSt
General
)
->
(!*
DriverState
,!*(
PSt
General
))
step
intr
(
DInit
force
project
setproject
)
ps
// # ps = showInfo (Level1 "Make the project...") ps
#
libsinfo
=
PR_GetStaticLibsInfo
project
...
...
Pm/PmTypes.dcl
View file @
29528135
...
...
@@ -110,8 +110,8 @@ DefCodeGenOptions :: CodeGenOptions
,
marking_collection
::
!
Bool
// use marking garbage collector
,
o
::
!
Output
// console type
,
fn
::
!
String
// font name
,
fs
::
!
Int
// font size
,
fn
::
!
String
// font name
: only on Mac platform
,
fs
::
!
Int
// font size
: only on Mac platform
,
write_stderr_to_file
::
!
Bool
,
memoryProfiling
::
!
Bool
...
...
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