From f7d1253f953f230ab63df091cb310f9f59c14c8e Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sun, 31 Mar 2019 04:42:59 +0000 Subject: allow more generic spaces git-svn-id: svn://tug.org/texlive/trunk@50672 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/pdftexdir/epdf.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'Build/source') diff --git a/Build/source/texk/web2c/pdftexdir/epdf.c b/Build/source/texk/web2c/pdftexdir/epdf.c index c9c9dbe63f9..4674e97fbd3 100644 --- a/Build/source/texk/web2c/pdftexdir/epdf.c +++ b/Build/source/texk/web2c/pdftexdir/epdf.c @@ -66,10 +66,13 @@ int get_fn_objnum(fd_entry * fd) * 2. mark glyphs directly there * * Input charset from xpdf is a string of glyph names including - * leading slashes, with optional spaces or tabs preceding or between - them: /a/b/c or /a /b /c or /a/b /c, etc. + * leading slashes, with optional generic spaces, including tabs, + * \n, \r, and \f, preceding or between them: + /a/b/c or /a /b /c or /a/b /c, etc. ***********************************************************************/ +#define Isgenericspace(c) (c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f') + void epdf_mark_glyphs(fd_entry * fd, char *charset) { char *p, *q, *s; @@ -78,14 +81,14 @@ void epdf_mark_glyphs(fd_entry * fd, char *charset) if (charset == NULL) return; assert(fd != NULL); - while (*charset == ' ' || *charset == '\t') + while (Isgenericspace(*charset)) charset++; for (s = charset + 1, q = charset + strlen(charset); s < q; s = p + 1) { - for (p = s; *p != '\0' && *p != '/' && *p != ' ' && *p != '\t'; p++); - if (*p == ' ' || *p == '\t') { + for (p = s; *p != '\0' && *p != '/' && !Isgenericspace(*p); p++); + if (Isgenericspace(*p)) { *p = '\0'; p++; - while (*p == ' ' || *p == '\t') + while (Isgenericspace(*p)) p++; } *p = '\0'; -- cgit v1.2.3