Handbook
Glossary
fat-binary-members ( >c-ptr -- fat-binary-members )
Vocabulary
macho
Inputs
>c-ptr
an
object
Outputs
fat-binary-members
an
object
Definition
USING:
accessors
alien
alien.c-types
alien.data
classes.struct
combinators
endian
kernel
sequences
;
IN:
macho
:
fat-binary-members
( >c-ptr -- fat-binary-members )
fat_header
memory>struct
dup
magic>>
{
{
FAT_MAGIC
[
]
}
{
FAT_CIGAM
[
]
}
[
2drop
not-fat-binary
]
}
case
dup
[
>c-ptr
fat_header
heap-size
swap
<displaced-alien>
]
[
nfat_arch>>
4
>be
le>
]
bi
fat_arch
<c-direct-array>
[
{
[
nip
cputype>>
4
>be
le>
]
[
nip
cpusubtype>>
4
>be
le>
]
[
offset>>
4
>be
le>
swap
>c-ptr
<displaced-alien>
]
[
nip
size>>
4
>be
le>
uchar
<c-direct-array>
]
}
2cleave
fat-binary-member
boa
]
with
{
}
map-as
;