summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-06-17 11:24:50 +0100
committerRobin Watts <robin.watts@artifex.com>2016-06-17 13:24:48 +0100
commit77b12405b60253f46cddcb99c4e31fd73fbac56e (patch)
tree00eaf52227d983e755dca747790e1f05027d40ec /docs
parent4a4e6adae4c1a0e9ab3b6fad477edfe26c1a2aca (diff)
downloadmupdf-77b12405b60253f46cddcb99c4e31fd73fbac56e.tar.xz
Add some quick notes on integer types.
Diffstat (limited to 'docs')
-rw-r--r--docs/types.txt22
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.