texlive[50672] Build/source/texk/web2c/pdftexdir/epdf.c: allow more
commits+kakuto at tug.org
commits+kakuto at tug.org
Sun Mar 31 06:43:00 CEST 2019
Revision: 50672
http://tug.org/svn/texlive?view=revision&revision=50672
Author: kakuto
Date: 2019-03-31 06:42:59 +0200 (Sun, 31 Mar 2019)
Log Message:
-----------
allow more generic spaces
Modified Paths:
--------------
trunk/Build/source/texk/web2c/pdftexdir/epdf.c
Modified: trunk/Build/source/texk/web2c/pdftexdir/epdf.c
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/epdf.c 2019-03-30 23:38:23 UTC (rev 50671)
+++ trunk/Build/source/texk/web2c/pdftexdir/epdf.c 2019-03-31 04:42:59 UTC (rev 50672)
@@ -66,10 +66,13 @@
* 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 @@
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';
More information about the tex-live-commits
mailing list