diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2019-02-25 03:01:12 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2019-02-25 03:01:12 +0000 |
commit | 3112e1aed533fe7ee58dd8cba2e4cd768372dfd6 (patch) | |
tree | 02077f80cf4a13a6c571bace448a53a38a9b6768 /Build/source/libs/xpdf/xpdf-src/fofi/FoFiType1.cc | |
parent | 73052dd2c8e70e61b653151192fe1f000fcf626d (diff) |
xpdf-4.01
git-svn-id: svn://tug.org/texlive/trunk@50122 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/fofi/FoFiType1.cc')
-rw-r--r-- | Build/source/libs/xpdf/xpdf-src/fofi/FoFiType1.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/fofi/FoFiType1.cc b/Build/source/libs/xpdf/xpdf-src/fofi/FoFiType1.cc index 4ff1369aaf8..4f5972a7bbb 100644 --- a/Build/source/libs/xpdf/xpdf-src/fofi/FoFiType1.cc +++ b/Build/source/libs/xpdf/xpdf-src/fofi/FoFiType1.cc @@ -195,7 +195,7 @@ void FoFiType1::parse() { char buf[256]; char c; int n, code, base, i, j; - GBool gotMatrix; + GBool gotMatrix, startsWithDup, endsWithDup; gotMatrix = gFalse; for (i = 1, line = (char *)file; @@ -231,9 +231,14 @@ void FoFiType1::parse() { strncpy(buf, line, n); buf[n] = '\0'; for (p = buf; *p == ' ' || *p == '\t'; ++p) ; - if (!strncmp(p, "dup", 3)) { - while (1) { + endsWithDup = !strncmp(line - 4, "dup\x0a", 4) || + !strncmp(line - 5, "dup\x0d", 4); + startsWithDup = !strncmp(p, "dup", 3); + if (endsWithDup || startsWithDup) { + if (startsWithDup) { p += 3; + } + while (1) { for (; *p == ' ' || *p == '\t'; ++p) ; code = 0; if (*p == '8' && p[1] == '#') { @@ -268,6 +273,7 @@ void FoFiType1::parse() { if (strncmp(p, "dup", 3)) { break; } + p += 3; } } else { if (strtok(buf, " \t") && |