summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-03-31 04:42:59 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-03-31 04:42:59 +0000
commitf7d1253f953f230ab63df091cb310f9f59c14c8e (patch)
tree60f6dd121fe965c3bcbaf99b44ac28b652b1b7cc /Build/source/texk
parent547a9e4e606c44a11c027b9e3a7be309f367aaaf (diff)
allow more generic spaces
git-svn-id: svn://tug.org/texlive/trunk@50672 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/web2c/pdftexdir/epdf.c15
1 files changed, 9 insertions, 6 deletions
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';