add radix morphism for little and big endian
This commit is contained in:
parent
638bb690aa
commit
c270efbb87
3 changed files with 64 additions and 7 deletions
morphisms/morphism-base
|
@ -1,14 +1,24 @@
|
|||
morph_digit_as_char_to_uint8 (Radix:ℤ_16)
|
||||
<Digit Radix> ~ Char ~ Ascii ~ Byte
|
||||
--> <Digit Radix> ~ x86.UInt8 ~ Byte
|
||||
<Digit Radix> ~ Char ~ Ascii ~ x86.UInt8
|
||||
--> <Digit Radix> ~ x86.UInt8
|
||||
@lib/libmorph-posint.so:src/posint.c
|
||||
|
||||
morph_digit_as_uint8_to_char (Radix:ℤ_16)
|
||||
<Digit Radix> ~ x86.UInt8 ~ Byte
|
||||
--> <Digit Radix> ~ Char ~ Ascii ~ Byte
|
||||
<Digit Radix> ~ x86.UInt8
|
||||
--> <Digit Radix> ~ Char ~ Ascii ~ x86.UInt8
|
||||
@lib/libmorph-posint.so:src/posint.c
|
||||
|
||||
morph_posint_radix (SrcRadix:ℤ, DstRadix:ℤ)
|
||||
morph_digit_as_char_to_uint64 (Radix:ℤ_16)
|
||||
<Digit Radix> ~ Char ~ Ascii ~ x86.UInt8
|
||||
--> <Digit Radix> ~ x86.UInt64
|
||||
@lib/libmorph-posint.so:src/posint.c
|
||||
|
||||
morph_digit_as_uint64_to_char (Radix:ℤ_16)
|
||||
<Digit Radix> ~ x86.UInt64
|
||||
--> <Digit Radix> ~ Char ~ Ascii ~ x86.UInt8
|
||||
@lib/libmorph-posint.so:src/posint.c
|
||||
|
||||
morph_posint_radix_le (SrcRadix:ℤ, DstRadix:ℤ)
|
||||
ℕ
|
||||
~ <PosInt SrcRadix LittleEndian>
|
||||
~ <Seq~<LengthPrefix x86.UInt64> <Digit SrcRadix>~x86.UInt64>
|
||||
|
@ -17,6 +27,15 @@ morph_posint_radix (SrcRadix:ℤ, DstRadix:ℤ)
|
|||
~ <Seq~<LengthPrefix x86.UInt64> <Digit DstRadix>~x86.UInt64>
|
||||
@lib/libmorph-posint.so:src/posint.c
|
||||
|
||||
morph_posint_radix_be (SrcRadix:ℤ, DstRadix:ℤ)
|
||||
ℕ
|
||||
~ <PosInt SrcRadix BigEndian>
|
||||
~ <Seq~<LengthPrefix x86.UInt64> <Digit SrcRadix>~x86.UInt64>
|
||||
--> ℕ
|
||||
~ <PosInt DstRadix BigEndian>
|
||||
~ <Seq~<LengthPrefix x86.UInt64> <Digit DstRadix>~x86.UInt64>
|
||||
@lib/libmorph-posint.so:src/posint.c
|
||||
|
||||
morph_posint_endianness (Radix:ℤ)
|
||||
ℕ
|
||||
~ <PosInt Radix LittleEndian>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue