diff options
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/epdf.c | 15 |
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'; |