mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-17 10:23:46 +00:00
Add predicates for writing 16- and 32-bit integers to binary file streams in
native, little and big endian byte order to the standard library.
library/io.m:
Add the new predicates.
library/uint16.m:
library/uint32.m:
Add a functions for casting from the signed to unsigned versions
of these types.
runtime/mercury_int.h:
New header intended to hold things related to the implementation
of the integer types in C grades. Currently it contains the
macros defining the byte reverse operations for 16- and 32-bit
types. (It will eventually contain macros for (un)boxing 64-bit
integer types on 32-bit platforms as well.)
runtime/mercury_imp.h:
runtime/Mmakefile:
Add the new header.
tests/hard_coded/Mmakefile:
tests/write_binary_multibyte_int.{m,exp}:
Add a test for the new predicates.