From 674190060e2473593fb95bcf5924d1efdcc7129f Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 20 Nov 2013 16:56:36 +0100 Subject: Don't sort cbz entries. Rely on the document creator to have sorted them rather than risk getting the wrong page order. --- source/cbz/mucbz.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'source') diff --git a/source/cbz/mucbz.c b/source/cbz/mucbz.c index bbc8a5fe..5247a4ee 100644 --- a/source/cbz/mucbz.c +++ b/source/cbz/mucbz.c @@ -163,14 +163,6 @@ cbz_read_zip_entry(cbz_document *doc, int offset, int *sizep) return NULL; /* not reached */ } -static int -cbz_compare_entries(const void *a_, const void *b_) -{ - const cbz_entry *a = a_; - const cbz_entry *b = b_; - return strcmp(a->name, b->name); -} - static void cbz_read_zip_dir_imp(cbz_document *doc, int startoffset) { @@ -231,8 +223,6 @@ cbz_read_zip_dir_imp(cbz_document *doc, int startoffset) fz_seek(file, commentsize, 1); } - qsort(doc->entry, count, sizeof(cbz_entry), cbz_compare_entries); - doc->page_count = 0; doc->page = fz_malloc_array(ctx, count, sizeof(int)); -- cgit v1.2.3