From 425c0f2e84deba27f064d8dd0d5b96c44564c1ec Mon Sep 17 00:00:00 2001
From: Robin Watts <robin.watts@artifex.com>
Date: Thu, 12 Dec 2013 20:48:51 +0000
Subject: Remove fz_context from pdf_crypt

Unused field. Also tweak some comments for clarity.
---
 include/mupdf/fitz/context.h | 2 +-
 source/pdf/pdf-crypt.c       | 2 --
 source/pdf/pdf-xref.c        | 1 -
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/include/mupdf/fitz/context.h b/include/mupdf/fitz/context.h
index cef1119f..bb171b3f 100644
--- a/include/mupdf/fitz/context.h
+++ b/include/mupdf/fitz/context.h
@@ -227,7 +227,7 @@ struct fz_locks_context_s
 
 enum {
 	FZ_LOCK_ALLOC = 0,
-	FZ_LOCK_FILE,
+	FZ_LOCK_FILE, /* Unused now */
 	FZ_LOCK_FREETYPE,
 	FZ_LOCK_GLYPHCACHE,
 	FZ_LOCK_MAX
diff --git a/source/pdf/pdf-crypt.c b/source/pdf/pdf-crypt.c
index 92a9e428..e40fad95 100644
--- a/source/pdf/pdf-crypt.c
+++ b/source/pdf/pdf-crypt.c
@@ -36,7 +36,6 @@ struct pdf_crypt_s
 	int encrypt_metadata;
 
 	unsigned char key[32]; /* decryption key generated from password */
-	fz_context *ctx;
 };
 
 static void pdf_parse_crypt_filter(fz_context *ctx, pdf_crypt_filter *cf, pdf_crypt *crypt, char *name);
@@ -954,7 +953,6 @@ pdf_open_crypt_imp(fz_stream *chain, pdf_crypt *crypt, pdf_crypt_filter *stmf, i
 	unsigned char key[32];
 	int len;
 
-	crypt->ctx = chain->ctx;
 	len = pdf_compute_object_key(crypt, stmf, num, gen, key, 32);
 
 	if (stmf->method == PDF_CRYPT_RC4)
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index fbadd0a4..338dec94 100644
--- a/source/pdf/pdf-xref.c
+++ b/source/pdf/pdf-xref.c
@@ -638,7 +638,6 @@ pdf_read_new_xref(pdf_document *doc, pdf_lexbuf *buf)
 	return trailer;
 }
 
-/* File is locked on entry, and exit (but may be dropped in the middle) */
 static pdf_obj *
 pdf_read_xref(pdf_document *doc, int ofs, pdf_lexbuf *buf)
 {
-- 
cgit v1.2.3