diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-06-17 11:24:50 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-06-17 13:24:48 +0100 |
commit | 77b12405b60253f46cddcb99c4e31fd73fbac56e (patch) | |
tree | 00eaf52227d983e755dca747790e1f05027d40ec | |
parent | 4a4e6adae4c1a0e9ab3b6fad477edfe26c1a2aca (diff) | |
download | mupdf-77b12405b60253f46cddcb99c4e31fd73fbac56e.tar.xz |
Add some quick notes on integer types.
-rw-r--r-- | docs/types.txt | 22 |
1 files changed, 22 insertions, 0 deletions
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. |