Handbook
Glossary
slot>endian-slot ( endian slot -- endian-slot )
Vocabulary
alien
.
endian
Inputs
endian
an
object
slot
an
object
Outputs
endian-slot
an
object
Definition
USING:
alien.c-types
arrays
combinators
kernel
sequences
;
IN:
alien.endian
:
slot>endian-slot
( endian slot -- endian-slot )
[
array?
]
[
first2
[
slot>endian-slot
]
dip
2array
]
[
{
{
[
dup
bool
=
]
[
2drop
bool
]
}
{
[
dup
char
=
]
[
2drop
char
]
}
{
[
dup
uchar
=
]
[
2drop
uchar
]
}
{
[
dup
short
=
]
[
{
le16
be16
}
endian-slot
]
}
{
[
dup
ushort
=
]
[
{
ule16
ube16
}
endian-slot
]
}
{
[
dup
int
=
]
[
{
le32
be32
}
endian-slot
]
}
{
[
dup
uint
=
]
[
{
ule32
ube32
}
endian-slot
]
}
{
[
dup
longlong
=
]
[
{
le64
be64
}
endian-slot
]
}
{
[
dup
ulonglong
=
]
[
{
ule64
ube64
}
endian-slot
]
}
{
[
dup
endian-c-type?
]
[
nip
]
}
{
[
dup
pointer?
]
[
nip
]
}
[
unsupported-endian-type
]
}
cond
]
1if
;