summaryrefslogtreecommitdiff
path: root/source/fitz/bidi-std.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-11-16 12:13:51 +0000
committerRobin Watts <robin.watts@artifex.com>2016-11-16 12:25:52 +0000
commit0c3e1ee387c995f37aa53f358825f334c06324ec (patch)
tree6b42f4ea01f1376e24716da82f2d91f1d0ace89e /source/fitz/bidi-std.c
parent141870506d8809723e933963e9e001aca839cdfc (diff)
downloadmupdf-0c3e1ee387c995f37aa53f358825f334c06324ec.tar.xz
Bug 697301: Fix "crash" in epub.
Actually an assert. This is caused by a paragraph separator in the text. The Unicode Bidirectional Algorithm says we should operate paragraph by paragraph, and includes code to split paragraphs at paragraph markers, changing their type to boundary neutrals as it goes. The use of this code was left "as an exercise for the reader" in the example code, so we simply hook it up here.
Diffstat (limited to 'source/fitz/bidi-std.c')
-rw-r--r--source/fitz/bidi-std.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/fitz/bidi-std.c b/source/fitz/bidi-std.c
index 792db71b..f5ebcf56 100644
--- a/source/fitz/bidi-std.c
+++ b/source/fitz/bidi-std.c
@@ -367,8 +367,7 @@ void set_deferred_level_run(fz_bidi_level *pval, size_t cval, size_t iStart, fz_
or at the end of the input text.
------------------------------------------------------------------------*/
-#if 0
-static int resolve_paragraphs(fz_bidi_chartype *types, int cch)
+int fz_bidi_resolve_paragraphs(fz_bidi_chartype *types, int cch)
{
int ich;
@@ -381,6 +380,7 @@ static int resolve_paragraphs(fz_bidi_chartype *types, int cch)
return ich;
}
+#if 0
/*------------------------------------------------------------------------
Function: base_level