diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-11-19 08:54:12 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2015-11-19 08:54:12 +0000 |
commit | 52b5b5df295683036612072db256172356408bf9 (patch) | |
tree | 3fc5880fb6f2f3e5c4766de07bbf49a3ad436d4c /Build/source/texk | |
parent | 7d7d83c1fc206269893ebf5fae3977a7148ebb3e (diff) |
web2c/luatexdir: Sync with the upstream.
git-svn-id: svn://tug.org/texlive/trunk@38892 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/image/pdftoepdf.w | 10 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/scanning.w | 16 |
2 files changed, 16 insertions, 10 deletions
diff --git a/Build/source/texk/web2c/luatexdir/image/pdftoepdf.w b/Build/source/texk/web2c/luatexdir/image/pdftoepdf.w index caa510497ba..1ece3a2dd48 100644 --- a/Build/source/texk/web2c/luatexdir/image/pdftoepdf.w +++ b/Build/source/texk/web2c/luatexdir/image/pdftoepdf.w @@ -966,8 +966,14 @@ static void destroyPdfDocument(void *pa, void * /*pb */ ) void unrefPdfDocument(char *file_path) { PdfDocument *pdf_doc = findPdfDocument(file_path); - assert(pdf_doc != NULL); - assert(pdf_doc->occurences != 0); // aim for point landing + if (pdf_doc == NULL) /* Does the caller break the contract ? */ +return; + if (pdf_doc->occurences == 0) /* Again, does the caller breaks the contract ? */ +return; + /* for the moment we keep these assert here as remind that the code */ + /* should be revisited */ + //assert(pdf_doc != NULL); + //assert(pdf_doc->occurences != 0); // aim for point landing pdf_doc->occurences--; #ifdef DEBUG fprintf(stderr, "\nDEBUG: Decrementing %s (%d)\n", diff --git a/Build/source/texk/web2c/luatexdir/tex/scanning.w b/Build/source/texk/web2c/luatexdir/tex/scanning.w index 7b1172f140a..120d361922e 100644 --- a/Build/source/texk/web2c/luatexdir/tex/scanning.w +++ b/Build/source/texk/web2c/luatexdir/tex/scanning.w @@ -1324,16 +1324,16 @@ void scan_dimen(boolean mu, boolean inf, boolean shortcut) #define set_conversion(A,B) do { num=(A); denom=(B); } while(0) - if (scan_keyword("in")) { - set_conversion(7227, 100); - } else if (scan_keyword("pc")) { - set_conversion(12, 1); + if (scan_keyword("mm")) { + set_conversion(7227, 2540); } else if (scan_keyword("cm")) { set_conversion(7227, 254); - } else if (scan_keyword("mm")) { - set_conversion(7227, 2540); + } else if (scan_keyword("sp")) { + goto DONE; } else if (scan_keyword("bp")) { set_conversion(7227, 7200); + } else if (scan_keyword("in")) { + set_conversion(7227, 100); } else if (scan_keyword("dd")) { set_conversion(1238, 1157); } else if (scan_keyword("cc")) { @@ -1342,8 +1342,8 @@ void scan_dimen(boolean mu, boolean inf, boolean shortcut) set_conversion(685, 642); } else if (scan_keyword("nc")) { set_conversion(1370, 107); - } else if (scan_keyword("sp")) { - goto DONE; + } else if (scan_keyword("pc")) { + set_conversion(12, 1); } else { /* Complain about unknown unit and |goto done2| */ print_err("Illegal unit of measure (pt inserted)"); |