pdftex[844] branches/stable/source: sync with tl 57477, for (un)dump

commits+karl at tug.org commits+karl at tug.org
Wed Jan 20 19:48:46 CET 2021


Revision: 844
          http://tug.org/svn/pdftex?view=revision&revision=844
Author:   karl
Date:     2021-01-20 19:48:45 +0100 (Wed, 20 Jan 2021)
Log Message:
-----------
sync with tl 57477, for (un)dump of \pdfglyphtounicode

Modified Paths:
--------------
    branches/stable/source/src/build-aux/texinfo.tex
    branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog
    branches/stable/source/src/texk/web2c/pdftexdir/NEWS
    branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web
    branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h
    branches/stable/source/src/texk/web2c/pdftexdir/ptexmac.h
    branches/stable/source/src/texk/web2c/pdftexdir/tounicode.c
    branches/stable/source/src/texk/web2c/pdftexdir/ttf2afm.c
    branches/stable/source/src/texk/web2c/pdftexdir/writeimg.c
    branches/stable/source/sync-pdftex.sh

Modified: branches/stable/source/src/build-aux/texinfo.tex
===================================================================
--- branches/stable/source/src/build-aux/texinfo.tex	2021-01-18 09:48:50 UTC (rev 843)
+++ branches/stable/source/src/build-aux/texinfo.tex	2021-01-20 18:48:45 UTC (rev 844)
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2020-10-24.12}
+\def\texinfoversion{2020-11-25.18}
 %
 % Copyright 1985, 1986, 1988, 1990-2020 Free Software Foundation, Inc.
 %
@@ -572,10 +572,9 @@
   \fi
 }
 
-% @end foo executes the definition of \Efoo.
-% But first, it executes a specialized version of \checkenv
-%
-\parseargdef\end{%
+
+% @end foo calls \checkenv and executes the definition of \Efoo.
+\parseargdef\end{
   \if 1\csname iscond.#1\endcsname
   \else
     % The general wording of \badenverr may not be ideal.
@@ -2673,8 +2672,6 @@
 \definetextfontsizexi
 
 
-\message{markup,}
-
 % Check if we are currently using a typewriter font.  Since all the
 % Computer Modern typewriter fonts have zero interword stretch (and
 % shrink), and it is reasonable to expect all typewriter fonts to have
@@ -2682,68 +2679,14 @@
 %
 \def\ifmonospace{\ifdim\fontdimen3\font=0pt }
 
-% Markup style infrastructure.  \defmarkupstylesetup\INITMACRO will
-% define and register \INITMACRO to be called on markup style changes.
-% \INITMACRO can check \currentmarkupstyle for the innermost
-% style.
-
-\let\currentmarkupstyle\empty
-
-\def\setupmarkupstyle#1{%
-  \def\currentmarkupstyle{#1}%
-  \markupstylesetup
-}
-
-\let\markupstylesetup\empty
-
-\def\defmarkupstylesetup#1{%
-  \expandafter\def\expandafter\markupstylesetup
-    \expandafter{\markupstylesetup #1}%
-  \def#1%
-}
-
-% Markup style setup for left and right quotes.
-\defmarkupstylesetup\markupsetuplq{%
-  \expandafter\let\expandafter \temp
-    \csname markupsetuplq\currentmarkupstyle\endcsname
-  \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
-}
-
-\defmarkupstylesetup\markupsetuprq{%
-  \expandafter\let\expandafter \temp
-    \csname markupsetuprq\currentmarkupstyle\endcsname
-  \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
-}
-
 {
 \catcode`\'=\active
 \catcode`\`=\active
 
-\gdef\markupsetuplqdefault{\let`\lq}
-\gdef\markupsetuprqdefault{\let'\rq}
-
-\gdef\markupsetcodequoteleft{\let`\codequoteleft}
-\gdef\markupsetcodequoteright{\let'\codequoteright}
+\gdef\setcodequotes{\let`\codequoteleft \let'\codequoteright}
+\gdef\setregularquotes{\let`\lq \let'\rq}
 }
 
-\let\markupsetuplqcode \markupsetcodequoteleft
-\let\markupsetuprqcode \markupsetcodequoteright
-%
-\let\markupsetuplqexample \markupsetcodequoteleft
-\let\markupsetuprqexample \markupsetcodequoteright
-%
-\let\markupsetuplqkbd     \markupsetcodequoteleft
-\let\markupsetuprqkbd     \markupsetcodequoteright
-%
-\let\markupsetuplqsamp \markupsetcodequoteleft
-\let\markupsetuprqsamp \markupsetcodequoteright
-%
-\let\markupsetuplqverb \markupsetcodequoteleft
-\let\markupsetuprqverb \markupsetcodequoteright
-%
-\let\markupsetuplqverbatim \markupsetcodequoteleft
-\let\markupsetuprqverbatim \markupsetcodequoteright
-
 % Allow an option to not use regular directed right quote/apostrophe
 % (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
 % The undirected quote is ugly, so don't make it the default, but it
@@ -2906,7 +2849,7 @@
 }
 
 % @samp.
-\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
+\def\samp#1{{\setcodequotes\lq\tclose{#1}\rq\null}}
 
 % @indicateurl is \samp, that is, with quotes.
 \let\indicateurl=\samp
@@ -2949,8 +2892,7 @@
   \global\let'=\rq \global\let`=\lq  % default definitions
   %
   \global\def\code{\begingroup
-    \setupmarkupstyle{code}%
-    % The following should really be moved into \setupmarkupstyle handlers.
+    \setcodequotes
     \catcode\dashChar=\active  \catcode\underChar=\active
     \ifallowcodebreaks
      \let-\codedash
@@ -3104,7 +3046,7 @@
   \urefcatcodes
   %
   \global\def\urefcode{\begingroup
-    \setupmarkupstyle{code}%
+    \setcodequotes
     \urefcatcodes
     \let&\urefcodeamp
     \let.\urefcodedot
@@ -3225,8 +3167,8 @@
 \def\kbdsub#1#2#3\par{%
   \def\one{#1}\def\three{#3}\def\threex{??}%
   \ifx\one\xkey\ifx\threex\three \key{#2}%
-  \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
-  \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+  \else{\tclose{\kbdfont\setcodequotes\look}}\fi
+  \else{\tclose{\kbdfont\setcodequotes\look}}\fi
 }
 
 % definition of @key that produces a lozenge.  Doesn't adjust to text size.
@@ -3243,7 +3185,7 @@
 % monospace, don't change it; that way, we respect @kbdinputstyle.  But
 % if it isn't monospace, then use \tt.
 %
-\def\key#1{{\setupmarkupstyle{key}%
+\def\key#1{{\setregularquotes
   \nohyphenation
   \ifmonospace\else\tt\fi
   #1}\null}
@@ -3373,16 +3315,20 @@
 {\obeylines
 \globaldefs=1
 \envdef\displaymath{%
-\tex
+\tex%
 \def\thisenv{\displaymath}%
+\begingroup\let\end\displaymathend%
 $$%
 }
 
-\def\Edisplaymath{$$
+\def\displaymathend{$$\endgroup\end}%
+
+\def\Edisplaymath{%
 \def\thisenv{\tex}%
 \end tex
 }}
 
+
 % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
 % Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
 % except specified as a normal braced arg, so no newlines to worry about.
@@ -7144,7 +7090,7 @@
 % But \@ or @@ will get a plain @ character.
 
 \envdef\tex{%
-  \setupmarkupstyle{tex}%
+  \setregularquotes
   \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
   \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
   \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
@@ -7370,7 +7316,7 @@
 % If you want all examples etc. small: @set dispenvsize small.
 % If you want even small examples the full size: @set dispenvsize nosmall.
 % This affects the following displayed environments:
-%    @example, @display, @format, @lisp
+%    @example, @display, @format, @lisp, @verbatim
 %
 \def\smallword{small}
 \def\nosmallword{nosmall}
@@ -7416,9 +7362,9 @@
 %
 \maketwodispenvdef{lisp}{example}{%
   \nonfillstart
-  \tt\setupmarkupstyle{example}%
+  \tt\setcodequotes
   \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
-  \gobble % eat return
+  \parsearg\gobble
 }
 % @display/@smalldisplay: same as @lisp except keep current font.
 %
@@ -7576,7 +7522,7 @@
 \def\setupverb{%
   \tt  % easiest (and conventionally used) font for verbatim
   \def\par{\leavevmode\endgraf}%
-  \setupmarkupstyle{verb}%
+  \setcodequotes
   \tabeightspaces
   % Respect line breaks,
   % print special symbols as themselves, and
@@ -7617,7 +7563,7 @@
   \tt % easiest (and conventionally used) font for verbatim
   \def\par{\egroup\leavevmode\box\verbbox\endgraf\starttabbox}%
   \tabexpand
-  \setupmarkupstyle{verbatim}%
+  \setcodequotes
   % Respect line breaks,
   % print special symbols as themselves, and
   % make each space count.
@@ -8036,7 +7982,7 @@
   % leave the code in, but it's strange for @var to lead to typewriter.
   % Nowadays we recommend @code, since the difference between a ttsl hyphen
   % and a tt hyphen is pretty tiny.  @code also disables ?` !`.
-  \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
+  \def\var##1{{\setregularquotes\ttslanted{##1}}}%
   #1%
   \sl\hyphenchar\font=45
 }
@@ -8145,11 +8091,18 @@
   }
 \fi
 
+\let\E=\expandafter
+
 % Used at the time of macro expansion.
 % Argument is macro body with arguments substituted
 \def\scanmacro#1{%
   \newlinechar`\^^M
-  \def\xeatspaces{\eatspaces}%
+  % expand the expansion of \eatleadingcr twice to maybe remove a leading
+  % newline (and \else and \fi tokens), then call \eatspaces on the result.
+  \def\xeatspaces##1{%
+    \E\E\E\E\E\E\E\eatspaces\E\E\E\E\E\E\E{\eatleadingcr##1%
+  }}%
+  \def\xempty##1{}%
   %
   % Process the macro body under the current catcode regime.
   \scantokens{#1 at comment}%
@@ -8202,6 +8155,11 @@
 \unbrace{\gdef\trim@@@ #1 } #2@{#1}
 }
 
+{\catcode`\^^M=\other%
+\gdef\eatleadingcr#1{\if\noexpand#1\noexpand^^M\else\E#1\fi}}%
+% Warning: this won't work for a delimited argument
+% or for an empty argument
+
 % Trim a single trailing ^^M off a string.
 {\catcode`\^^M=\other \catcode`\Q=3%
 \gdef\eatcr #1{\eatcra #1Q^^MQ}%
@@ -8368,6 +8326,7 @@
   \let\hash\relax
   % \hash is redefined to `#' later to get it into definitions
   \let\xeatspaces\relax
+  \let\xempty\relax
   \parsemargdefxxx#1,;,%
   \ifnum\paramno<10\relax\else
     \paramno0\relax
@@ -8379,9 +8338,11 @@
   \else \let\next=\parsemargdefxxx
     \advance\paramno by 1
     \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
-        {\xeatspaces{\hash\the\paramno}}%
+        {\xeatspaces{\hash\the\paramno\noexpand\xempty{}}}%
     \edef\paramlist{\paramlist\hash\the\paramno,}%
   \fi\next}
+% the \xempty{} is to give \eatleadingcr an argument in the case of an
+% empty macro argument.
 
 % \parsemacbody, \parsermacbody
 %
@@ -9107,20 +9068,22 @@
       % output the `[mynode]' via the macro below so it can be overridden.
       \xrefprintnodename\printedrefname
       %
-      % But we always want a comma and a space:
-      ,\space
-      %
-      % output the `page 3'.
-      \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
-      % Add a , if xref followed by a space
-      \if\space\noexpand\tokenafterxref ,%
-      \else\ifx\	\tokenafterxref ,% @TAB
-      \else\ifx\*\tokenafterxref ,%   @*
-      \else\ifx\ \tokenafterxref ,%   @SPACE
-      \else\ifx\
-                \tokenafterxref ,%    @NL
-      \else\ifx\tie\tokenafterxref ,% @tie
-      \fi\fi\fi\fi\fi\fi
+      \expandafter\ifx\csname SETtxiomitxrefpg\endcsname\relax
+        % But we always want a comma and a space:
+        ,\space
+        %
+        % output the `page 3'.
+        \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
+        % Add a , if xref followed by a space
+        \if\space\noexpand\tokenafterxref ,%
+        \else\ifx\	\tokenafterxref ,% @TAB
+        \else\ifx\*\tokenafterxref ,%   @*
+        \else\ifx\ \tokenafterxref ,%   @SPACE
+        \else\ifx\
+                  \tokenafterxref ,%    @NL
+        \else\ifx\tie\tokenafterxref ,% @tie
+        \fi\fi\fi\fi\fi\fi
+      \fi
     \fi\fi
   \fi
   \endlink
@@ -9550,7 +9513,7 @@
 \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
   \catcode`\^^M = 5     % in case we're inside an example
   \normalturnoffactive  % allow _ et al. in names
-  \def\xprocessmacroarg{\eatspaces}% in case we are being used via a macro
+  \makevalueexpandable
   % If the image is by itself, center it.
   \ifvmode
     \imagevmodetrue
@@ -11603,7 +11566,7 @@
   \let> = \activegtr
   \let~ = \activetilde
   \let^ = \activehat
-  \markupsetuplqdefault \markupsetuprqdefault
+  \setregularquotes
   \let\b = \strong
   \let\i = \smartitalic
   % in principle, all other definitions in \tex have to be undone too.
@@ -11662,8 +11625,7 @@
    @let|=@normalverticalbar
    @let~=@normaltilde
    @let\=@ttbackslash
-   @markupsetuplqdefault
-   @markupsetuprqdefault
+   @setregularquotes
    @unsepspaces
  }
 }
@@ -11756,8 +11718,7 @@
 @c Do this last of all since we use ` in the previous @catcode assignments.
 @catcode`@'=@active
 @catcode`@`=@active
- at markupsetuplqdefault
- at markupsetuprqdefault
+ at setregularquotes
 
 @c Local variables:
 @c eval: (add-hook 'before-save-hook 'time-stamp)

Modified: branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog	2021-01-18 09:48:50 UTC (rev 843)
+++ branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog	2021-01-20 18:48:45 UTC (rev 844)
@@ -1,3 +1,26 @@
+2021-01-20  Karl Berry  <karl at freefriends.org>
+
+	* NEWS: update.
+	* ptexmac.h (undumpcharptr): use xmalloc, not malloc.
+
+2021-01-20  Marcel Fabian Krueger  <tex at 2krueger.de>
+
+	(Un)dump \pdfglyphtounicode assignments in the .fmt.
+	* pdftex.web (Dump/Undump pdftex data): call (un)dumptounicode.
+	* ptexlib.h ((un)dumptounicode): declare.
+	* tounicode.c ((un)dumptounicode): define.
+	* ptexmac.h ((un)dumpcharptr): #define here, from writeimg.c
+	(using generic_dump).
+	* writeimg.c: #defines moved.
+	ntg-pdftex mail, 17 Jan 2021 21:47:33.
+
+2021-01-04  Thanh Han The  <hanthethanh at gmail.com>
+
+	* ttf2afm.c (make_name): yet another attempt at filtering
+	control characters, since the test font, SourceCodePro (as well
+	as many other Mac fonts), actually contains control characters
+	(24 and 25), due to UTF-16BE.
+
 2021-01-11  Karl Berry  <karl at freefriends.org>
 
 	* ttf2afm.c (make_name): better to use unsigned char.

Modified: branches/stable/source/src/texk/web2c/pdftexdir/NEWS
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/NEWS	2021-01-18 09:48:50 UTC (rev 843)
+++ branches/stable/source/src/texk/web2c/pdftexdir/NEWS	2021-01-20 18:48:45 UTC (rev 844)
@@ -3,6 +3,8 @@
     turning off generation of links in headers and footers.
   - warn instead of aborting when "\pdfendlink ended up in
     different nesting level than \pdfstartlink". 
+  - dump \pdfglyphtounicode assignments in fmt file.
+  - ttf2afm outputs name information.
 
 - bugfixes:
   - avoid crash in unusual autoexpand cases.

Modified: branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web	2021-01-18 09:48:50 UTC (rev 843)
+++ branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web	2021-01-20 18:48:45 UTC (rev 844)
@@ -1,4 +1,4 @@
-% Copyright 1996-2020 Han Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh,
+% Copyright 1996-2021 Han Th\^e\llap{\raise 0.5ex\hbox{\'{}}} Th\`anh,
 % <thanh@@pdftex.org>
 
 % This file is part of pdfTeX.
@@ -33017,6 +33017,7 @@
 dump_int(pdf_last_obj);
 dump_int(pdf_last_xform);
 dump_int(pdf_last_ximage);
+dumptounicode;
 end
 
 @ And restoring the pdftex data structures from the format. The
@@ -33051,6 +33052,7 @@
 undump_int(pdf_last_obj);
 undump_int(pdf_last_xform);
 undump_int(pdf_last_ximage);
+undumptounicode;
 end
 
 @ We have already printed a lot of statistics, so we set |tracing_stats:=0|

Modified: branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h	2021-01-18 09:48:50 UTC (rev 843)
+++ branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h	2021-01-20 18:48:45 UTC (rev 844)
@@ -1,5 +1,5 @@
 /* ptexlib.h: macros for pdfTeX library code.
-Copyright 1996-2018 Han The Thanh, <thanh at pdftex.org>
+Copyright 1996-2021 Han The Thanh, <thanh at pdftex.org>
 
 This file is part of pdfTeX.
 
@@ -206,6 +206,8 @@
 extern void glyph_unicode_free(void);
 extern void deftounicode(strnumber, strnumber);
 extern integer write_tounicode(char **, const char *, const char *);
+extern void dumptounicode(void);
+extern void undumptounicode(void);
 
 /* utils.c */
 extern boolean str_eq_cstr(strnumber, char *);

Modified: branches/stable/source/src/texk/web2c/pdftexdir/ptexmac.h
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/ptexmac.h	2021-01-18 09:48:50 UTC (rev 843)
+++ branches/stable/source/src/texk/web2c/pdftexdir/ptexmac.h	2021-01-20 18:48:45 UTC (rev 844)
@@ -1,5 +1,5 @@
 /* ptexmac.h: common macros for pdfTeX.
-Copyright 1996-2018 Han The Thanh, <thanh at pdftex.org>
+Copyright 1996-2021 Han The Thanh, <thanh at pdftex.org>
 
 This file is part of pdfTeX.
 
@@ -215,4 +215,32 @@
 
 #  define str_prefix(s1, s2)  (strncmp((s1), (s2), strlen(s2)) == 0)
 
+/* (un)dumping a string means dumping the allocation size, followed
+ * by the bytes. The trailing \0 is (un)dumped as well, because that
+ * makes the code simpler.
+ */
+
+#define dumpcharptr(a)				\
+  do {						\
+    integer x;					\
+    if (a!=NULL) {				\
+      x = strlen(a)+1;				\
+      generic_dump(x);  dumpthings(*a, x);	\
+    } else {					\
+      x = 0; generic_dump(x);			\
+    }						\
+  } while (0)
+
+#define undumpcharptr(s)			\
+  do {						\
+    integer x;					\
+    char *a;					\
+    generic_undump (x);				\
+    if (x>0) {					\
+      a = xmalloc(x);				\
+      undumpthings(*a,x);			\
+      s = a ;					\
+    } else { s = NULL; }			\
+  } while (0)
+
 #endif                          /* PDFTEXMAC */

Modified: branches/stable/source/src/texk/web2c/pdftexdir/tounicode.c
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/tounicode.c	2021-01-18 09:48:50 UTC (rev 843)
+++ branches/stable/source/src/texk/web2c/pdftexdir/tounicode.c	2021-01-20 18:48:45 UTC (rev 844)
@@ -1,5 +1,5 @@
 /*
-Copyright 2006-2019 Han The Thanh, <thanh at pdftex.org>
+Copyright 2006-2021 Han The Thanh, <thanh at pdftex.org>
 
 This file is part of pdfTeX.
 
@@ -475,3 +475,57 @@
     pdfendstream();
     return objnum;
 }
+
+void dumptounicode(void)
+{
+    struct avl_traverser traverse;
+    size_t count;
+    glyph_unicode_entry *gu;
+
+    if (glyph_unicode_tree == NULL) {
+        count = 0;
+        generic_dump(count);
+        return;
+    }
+
+    count = avl_count(glyph_unicode_tree);
+    generic_dump(count);
+
+    avl_t_init(&traverse, glyph_unicode_tree);
+    while (gu = avl_t_next(&traverse)) {
+        dumpcharptr(gu->name);
+        generic_dump(gu->code);
+
+        if (gu->code == UNI_STRING)
+            dumpcharptr(gu->unicode_seq);
+    }
+}
+
+void undumptounicode(void)
+{
+    glyph_unicode_entry *tmp;
+    size_t remaining;
+
+    generic_undump(remaining);
+
+    if (remaining == 0)
+        return;
+
+    assert(glyph_unicode_tree == NULL);
+    glyph_unicode_tree =
+        avl_create(comp_glyph_unicode_entry, NULL, &avl_xallocator);
+    assert(glyph_unicode_tree != NULL);
+
+    while (remaining--) {
+        void **result;
+        glyph_unicode_entry *gu = new_glyph_unicode_entry();
+        undumpcharptr(gu->name);
+        generic_undump(gu->code);
+
+        if (gu->code == UNI_STRING)
+            undumpcharptr(gu->unicode_seq);
+
+        result = avl_probe(glyph_unicode_tree, gu);
+        assert(*result == gu);
+    }
+}

Modified: branches/stable/source/src/texk/web2c/pdftexdir/ttf2afm.c
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/ttf2afm.c	2021-01-18 09:48:50 UTC (rev 843)
+++ branches/stable/source/src/texk/web2c/pdftexdir/ttf2afm.c	2021-01-20 18:48:45 UTC (rev 844)
@@ -1,5 +1,5 @@
 /*
-Copyright 1996-2014 Han The Thanh, <thanh at pdftex.org>
+Copyright 1996-2021 Han The Thanh, <thanh at pdftex.org>
 
 This file is part of pdfTeX.
 
@@ -444,15 +444,17 @@
             *p = (unsigned char) get_char();
             i++;
         }
-        /* sometime a UTF-16BE string will contain chars where the 1st or 2nd byte is in range (0..32) */
+        /* sometime a UTF-16BE string will contain chars where the 1st
+           or 2nd byte is in range (0..32) */
         if (*p < 32
             && *p != '\r'
             && *p != '\n'
             && *p != '\t'
-           )
-            ttf_warn("skip unsafe character: %i", *p);
-        else
+           ) {
+            ttf_warn("skipping unsafe character: %i", *p);
+        } else {
             p++;
+        }
     }
     *p = 0;
     return xstrdup(buf);

Modified: branches/stable/source/src/texk/web2c/pdftexdir/writeimg.c
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/writeimg.c	2021-01-18 09:48:50 UTC (rev 843)
+++ branches/stable/source/src/texk/web2c/pdftexdir/writeimg.c	2021-01-20 18:48:45 UTC (rev 844)
@@ -1,5 +1,5 @@
 /*
-Copyright 1996-2014 Han The Thanh, <thanh at pdftex.org>
+Copyright 1996-2021 Han The Thanh, <thanh at pdftex.org>
 
 This file is part of pdfTeX.
 
@@ -443,36 +443,6 @@
 /* #define undumpsizet   generic_undump */
 #define undumpinteger generic_undump
 
-/* (un)dumping a string means dumping the allocation size, followed
- * by the bytes. The trailing \0 is dumped as well, because that 
- * makes the code simpler.
- */
-
-#define dumpcharptr(a)				\
-  do {						\
-    integer x;					\
-    if (a!=NULL) {				\
-      x = strlen(a)+1;				\
-      dumpinteger(x);  dumpthings(*a, x);	\
-    } else {					\
-      x = 0; dumpinteger(x);			\
-    }						\
-  } while (0)
-
-#define undumpcharptr(s)			\
-  do {						\
-    integer x;					\
-    char *a;					\
-    undumpinteger (x);				\
-    if (x>0) {					\
-      a = malloc(x);				\
-      undumpthings(*a,x);			\
-      s = a ;					\
-    } else { s = NULL; }			\
-  } while (0)
-
-
-
 void dumpimagemeta(void)
 {
     int cur_image, img;

Modified: branches/stable/source/sync-pdftex.sh
===================================================================
--- branches/stable/source/sync-pdftex.sh	2021-01-18 09:48:50 UTC (rev 843)
+++ branches/stable/source/sync-pdftex.sh	2021-01-20 18:48:45 UTC (rev 844)
@@ -34,7 +34,7 @@
 
 # use rsync instead of cp so we can get local deletion for free.
 # don't bother preserving permissions, original might be readonly.
-copy="rsync -ari --delete --no-p --exclude=.svn --exclude=autom4te.cache"
+copy="rsync -ari --delete --no-p --exclude=*~ --exclude=.svn --exclude=autom4te.cache"
 if $chicken; then
   copy="$copy -n"
 fi
@@ -79,7 +79,7 @@
       echo "$0: recursively syncing directory $f"
       sync_dir $f
     
-    elif test $f = autom4te.cache; then
+    elif echo $f | grep 'autom4te.cache$' >/dev/null; then
       :
 
     elif test -d $f; then  # other directories
@@ -111,6 +111,9 @@
     printf "\n\f\n$0: syncing major directory $f\n"
     sync_dir $f
 
+  elif test $f = autom4te.cache; then
+    :
+
   elif test -d $f; then
     # Other subdirectories (build-aux, etc.), copy in their entirety,
     # including removals from the local dir.



More information about the pdftex-commits mailing list.