Use tabs rather than spaces for the MuPDF project.
Fix disabled state of bar buttons on iPhone/iPod Touch.

Previously on iOS 7, bar buttons didn't change visually when disabled.

Also improves the look and feel - the buttons are now tinted in the
highlighted state rather than showing a grey background. On iOS 7, the
iPhone/iPad buttons style match.

Tested on iOS 6 iPad/iPod and iOS 7 iPad/iPod.
cbz: Use natural string comparison to sort file names.

Sort case insensitively in this order:
	page-1.jpg
	page-2.jpg
	page-10.jpg
Fix #693228 - Android has counter intuitive finger dragging behaviour

Patch from Michaël Cadilhac.

Continue to pass events to panning GestureDetector when zooming (but do not
act on the reported gesture).

Previously we just stopped sending events to the GestureDetector until the
start of the next gesture.
Enable modules in iOS build.

Speeds up compilation, and means we can avoid having to list all the system
frameworks (so I've deleted them).
Crashlytics support for official builds.

Add hooks to allow us to pass in the Crashlytics SDK location and the
API key from the command line. The SDK and API key will be held in a
separate private repository.

Should have no effect on regular builds.
Convert Xcode schemes to shared schemes, so that they are tracked in git.

It is recommended that you delete any personal schemes that have the same
name as the shared ones, for example by cleaning your git tree with:

	cd platform/ios/MuPDF.xcodeproj && git clean -X -f -d

(this will wipe out any .gitignore'd files in your tree - so be careful.
Make sure you use an uppercase -X option; the lowercase version will wipe
non-ignored files!).
Add the ability to hook a post-archive script into the build process.

Used by the Testflight build.

The post-archive step requires nastiness to pass the result of the script
back to the caller via a temporary file. The reason for this is that a bug
in Xcode means that failures from post-archive steps do not get propagated
back to the user who called xcodebuild archive.

Also, update the postbuild script to explicitly invoke bash (so we can
avoid assuming /bin/sh is bash, and to avoid problems where executable
permissions aren't set properly).
Remove iOS debug output.

This debug output was listing the names of all the files to the iOS console
every 3 seconds. Remove it.
Fix page changing when rotating the device.

A bug in UIKit means our 'scrollViewDidScroll' method is called during
screen rotation. This ended up corrupting our current page number because
the width of the screen had changed at this point, but the pages hadn't
yet been resized/repositioned (I assume).

The workaround is to ignore calls to scrollViewDidScroll during rotation.
Fix odd animation when opening a document on iOS.

The background colour of the MuDocumentController's root view wasn't set,
so the MuLibraryController was showing through until it had been removed
from the screen.

Fix by setting the background colour to gray - the same colour as the
window.
Add cscope makefile targets.
Improve callback for loading substitute CJK fonts to return TTC index.
Add feature testing device, and call it from mudraw with -T flag.

Currently only tests for the presence of non-grayscale color.
Minor optimization in test_device.

Don't convert and compare color if we already know the page has color.
prevent buffer overflow in cbz_strnatcmp

If the two arguments to cbz_strnatcmp are equal (except for leading
zeros), cbz_strnatcmp reads beyond the buffer until it finds differing
bytes or enters a non-readable memory page.

TODO: Should sorting "test01" and "test1" lead to a stable sort order?
Bug 695271: fix incremental updates for files without final linebreak

PDF documents aren't required to end in a linebreak. Objects however
must start on their own line (in particular for broken documents
relying on reparation). For this reason, a linebreak must be inserted
before starting an incremental update.
hex-encode UTF-16 strings when writing PDF

fmt_obj calculates whether a string is better hex-encoded or written
using escapes. Due to a bug, '\0' is considered to be escapable same as
'\n' when instead it would have to be written as '\000'. Since UTF-16
strings tend to consist of many '\0' bytes, their octal encoded form is
much longer than their hex encoded form.

The issue is that the first argument to strchr contains an unintended
trailing '\0' which has to be special-cased first.
fix ZIP64 support in xps-zip.c

Per the ZIP specification, ZIP64 values are only used if the original
value was -1 (i.e. 0xFFFF for 16-bit and 0xFFFFFFFF for 32-bit values).
Microsoft's XPS viewer behaves according to specification and so
should MuXPS.
properly decrypt strings in encrypted but broken documents

If a PDF document is encrypted but broken, repairing caches all
strings in encrypted form. Clearing the xref after repairing
ensures that strings are returned to API callers as expected.

Cf. https://code.google.com/p/sumatrapdf/issues/detail?id=2610