summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-07 00:25:31 +0000
committerKarl Berry <karl@freefriends.org>2018-01-07 00:25:31 +0000
commit56a12692ea58b621afb76cc8e90dcd0de5daa3d2 (patch)
tree802d816a6517f54e459547fa99379491ed969e2d /Build/source/texk/web2c
parent55ce2577d4277b51f7ba1ecaf4cd044879d1a5db (diff)
output non-pdf special being ignored, from pdftex r792
git-svn-id: svn://tug.org/texlive/trunk@46237 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/pdftexdir/ChangeLog7
-rw-r--r--Build/source/texk/web2c/pdftexdir/NEWS2
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftex.web20
3 files changed, 28 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog
index 38b0c800375..b34e83ff220 100644
--- a/Build/source/texk/web2c/pdftexdir/ChangeLog
+++ b/Build/source/texk/web2c/pdftexdir/ChangeLog
@@ -1,3 +1,10 @@
+2018-01-06 Karl Berry <karl@freefriends.org>
+
+ * pdftex.web (literal): if a non-PDF special is ignored,
+ also output "<special> " and the first 64 characters of the special.
+ (slow_print_substr): new procedure, although surely there's
+ already a way to print a substring of a pool string.
+
2018-01-01 Pali Roh\'ar <pali.rohar@gmail.com>
Patch 1: explicitly detect bitmap PK font in fm_scan_line,
diff --git a/Build/source/texk/web2c/pdftexdir/NEWS b/Build/source/texk/web2c/pdftexdir/NEWS
index b99fccb6902..bad6e676c27 100644
--- a/Build/source/texk/web2c/pdftexdir/NEWS
+++ b/Build/source/texk/web2c/pdftexdir/NEWS
@@ -2,6 +2,8 @@
- do not hash current directory into PDF ID, for more reproducible builds
(pdftex r782).
- allow encoding vectors for bitmap PK fonts (r790).
+ - when a non-PDF special is ignored, output a (leading substring of the)
+ special, preceded by "<special> ".
- bugfixes:
- \pdfprimitive does nothing, rather than give an error, when given a
diff --git a/Build/source/texk/web2c/pdftexdir/pdftex.web b/Build/source/texk/web2c/pdftexdir/pdftex.web
index b53a2345a84..2bcce0d5e90 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftex.web
+++ b/Build/source/texk/web2c/pdftexdir/pdftex.web
@@ -16249,6 +16249,19 @@ begin
pdf_print_ln("]");
end;
+{Prints first |len| characters of string |s| (if it's that long).
+ There must be a better way to print a substring?}
+procedure slow_print_substr(@!s,@!max_len:integer);
+var j:pool_pointer; {current character code position}
+begin if (s>=str_ptr) or (s<256) then print(s)
+else begin j:=str_start[s];
+ while (j<str_start[s+1]) and (j<=str_start[s]+max_len) do
+ begin print(so(str_pool[j])); incr(j);
+ end;
+ end;
+ if j<str_start[s+1] then print("..."); {indicate truncation}
+end;
+
procedure literal(s: str_number; literal_mode: integer; warn: boolean);
var j: pool_pointer; {current character code position}
begin
@@ -16257,8 +16270,13 @@ begin
if not (str_in_str(s, "PDF:", 0) or str_in_str(s, "pdf:", 0)) then begin
if warn and not (str_in_str(s, "SRC:", 0)
or str_in_str(s, "src:", 0)
- or (length(s) = 0)) then
+ or (length(s) = 0)) then begin
print_nl("Non-PDF special ignored!");
+ print_nl("<special> ");
+ slow_print_substr(s, 64);
+ {length of printed line should be <=78; good enough.}
+ print_ln;
+ end;
return;
end;
j := j + length("PDF:");