From 77b12405b60253f46cddcb99c4e31fd73fbac56e Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 17 Jun 2016 11:24:50 +0100 Subject: Add some quick notes on integer types. --- docs/types.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/types.txt diff --git a/docs/types.txt b/docs/types.txt new file mode 100644 index 00000000..1301b19c --- /dev/null +++ b/docs/types.txt @@ -0,0 +1,22 @@ +Various different integer types are used throughout MuPDF. + +In general: + + * int is assumed to be 32bit at least. + + * short is assumed to be exactly 16 bits. + + * char is assumed to be exactly 8 bits. + + * array sizes, string lengths, and allocations + are measured using size_t. size_t is 32bit in 32bit builds, + and 64bit on all 64bit builds. + + * buffers of data use unsigned chars (or uint8_t's). + + * Offsets within files/streams are represented using fz_off_t's. + fz_off_t's are 64bits in 64bit builds, or in 32bit builds with + FZ_LARGEFILE defined. Otherwise they are a native int (so 32bit + in 32bit builds). + +In addition, we use floats and doubles, assumed to be IEEE compliant. -- cgit v1.2.3