Re: pdf inclusion bug
Hartmut Henkel <[email protected]> Sat, 30 Mar 2019 01:38:26 +0100 (CET)
| Newsgroups | gmane.comp.tex.pdftex |
|---|---|
| Message-ID | <[email protected]> |
Hi Akita, On Sat, 30 Mar 2019, Akira Kakuto wrote: > I could obtain correct b.pdf by applying an > attached patch: epdf.c.diff. many thanks, yes, skipping spaces does it, and there was no poppler bug. Attached another patch doing the same. Best Regards, Hartmut
epdf.c.diff
(text/x-diff, 1.1 KB)
Index: pdftexdir/epdf.c
===================================================================
--- pdftexdir/epdf.c (Revision 50631)
+++ pdftexdir/epdf.c (Arbeitskopie)
@@ -71,19 +71,21 @@
void epdf_mark_glyphs(fd_entry * fd, char *charset)
{
- char *p, *q, *s;
+ char *q, *s, t[2];
char *glyph;
void **aa;
if (charset == NULL)
return;
assert(fd != NULL);
- for (s = charset + 1, q = charset + strlen(charset); s < q; s = p + 1) {
- for (p = s; *p != '\0' && *p != '/'; p++);
- *p = '\0';
- if ((char *) avl_find(fd->gl_tree, s) == NULL) {
- glyph = xstrdup(s);
- aa = avl_probe(fd->gl_tree, glyph);
- assert(aa != NULL);
+ for (s = charset, q = charset + strlen(charset); s < q; s++) {
+ if (*s == '/' && s < q - 1) {
+ t[0] = *(s + 1);
+ t[1] = '\0';
+ if ((char *) avl_find(fd->gl_tree, t) == NULL) {
+ glyph = xstrdup(t);
+ aa = avl_probe(fd->gl_tree, glyph);
+ assert(aa != NULL);
+ }
}
}
}