From fe38d85fc1b3cf785a6f519bab1c79333bc52faa Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 26 Nov 2010 02:09:56 +0000 Subject: (t1_check_unusual_charstring): switch EOL to space; from Thanh git-svn-id: svn://tug.org/texlive/trunk@20571 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipsk/ChangeLog | 5 +++++ Build/source/texk/dvipsk/writet1.c | 13 +++++++++++-- Build/source/texk/web2c/pdftexdir/ChangeLog | 5 +++++ Build/source/texk/web2c/pdftexdir/writet1.c | 13 +++++++++++-- 4 files changed, 32 insertions(+), 4 deletions(-) (limited to 'Build/source') diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index aeed9f93708..53382254211 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -1,3 +1,8 @@ +2010-11-26 Thanh Han The + + * writet1.c (t1_check_unusual_charstring): switch EOL to space + before appending. + 2010-11-16 Peter Breitenlohner * writet1.c: Still more formatting tweaks. diff --git a/Build/source/texk/dvipsk/writet1.c b/Build/source/texk/dvipsk/writet1.c index a0968fdd471..2b075c685ae 100644 --- a/Build/source/texk/dvipsk/writet1.c +++ b/Build/source/texk/dvipsk/writet1.c @@ -1432,10 +1432,19 @@ static void t1_mark_glyphs(void) static void t1_check_unusual_charstring(void) { char *p = strstr(t1_line_array, charstringname) + strlen(charstringname); + char *q; int i; /* if no number follows "/CharStrings", let's read the next line */ if (sscanf(p, "%i", &i) != 1) { + /* pdftex_warn("no number found after `%s', I assume it's on the next line", + charstringname); */ strcpy(t1_buf_array, t1_line_array); + + /* t1_getline always appends EOL to t1_line_array; let's change it to + * space before appending the next line + */ + *(strend(t1_buf_array) - 1) = ' '; + t1_getline(); strcat(t1_buf_array, t1_line_array); strcpy(t1_line_array, t1_buf_array); @@ -1455,8 +1464,8 @@ static void t1_subset_charstrings(void) */ t1_check_unusual_charstring(); - cs_size_pos = strstr(t1_line_array, charstringname) + strlen(charstringname) - - t1_line_array + 1; + cs_size_pos = strstr(t1_line_array, charstringname) + + strlen(charstringname) - t1_line_array + 1; /* cs_size_pos points to the number indicating dict size after "/CharStrings" */ cs_size = t1_scan_num(t1_line_array + cs_size_pos, 0); diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index dcd0cb7fb12..297055a2688 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,8 @@ +2010-11-26 Thanh Han The + + * writet1.c (t1_check_unusual_charstring): switch EOL to space + before appending. + 2010-11-26 Heiko Oberdiek * pdftex.web (Display the whatsit...): avoid erroneous return. diff --git a/Build/source/texk/web2c/pdftexdir/writet1.c b/Build/source/texk/web2c/pdftexdir/writet1.c index 37394e3d363..9701b01de2d 100644 --- a/Build/source/texk/web2c/pdftexdir/writet1.c +++ b/Build/source/texk/web2c/pdftexdir/writet1.c @@ -1599,10 +1599,19 @@ static void t1_mark_glyphs(void) static void t1_check_unusual_charstring(void) { char *p = strstr(t1_line_array, charstringname) + strlen(charstringname); + char *q; int i; /* if no number follows "/CharStrings", let's read the next line */ if (sscanf(p, "%i", &i) != 1) { + /* pdftex_warn("no number found after `%s', I assume it's on the next line", + charstringname); */ strcpy(t1_buf_array, t1_line_array); + + /* t1_getline always appends EOL to t1_line_array; let's change it to + * space before appending the next line + */ + *(strend(t1_buf_array) - 1) = ' '; + t1_getline(); strcat(t1_buf_array, t1_line_array); strcpy(t1_line_array, t1_buf_array); @@ -1622,8 +1631,8 @@ static void t1_subset_charstrings(void) */ t1_check_unusual_charstring(); - cs_size_pos = strstr(t1_line_array, charstringname) + strlen(charstringname) - - t1_line_array + 1; + cs_size_pos = strstr(t1_line_array, charstringname) + + strlen(charstringname) - t1_line_array + 1; /* cs_size_pos points to the number indicating dict size after "/CharStrings" */ cs_size = t1_scan_num(t1_line_array + cs_size_pos, 0); -- cgit v1.2.3