[PATCH] Fix stuff I broke -- part 2 (was: Re: Format file differences)

Marcel Fabian Krüger tex at 2krueger.de
Tue Jun 15 22:10:30 CEST 2021


Also known as: Platform independent .fmt files are hard.

Since recent pdfTeX versions allow dumping glyph to unicode mappings,
their type have a platform independent size.

Changing the type is safe since even on 64 bit platforms, the value is
never bigger than 32 bit since it only contains unicode values
(<0x110000 << 2^31-1) or negative values bigger than -3 (>>> -2^31).
---
 texk/web2c/pdftexdir/ChangeLog | 5 +++++
 texk/web2c/pdftexdir/ptexlib.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/texk/web2c/pdftexdir/ChangeLog b/texk/web2c/pdftexdir/ChangeLog
index 92be2f93c..3e594b6a4 100644
--- a/texk/web2c/pdftexdir/ChangeLog
+++ b/texk/web2c/pdftexdir/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-15  Marcel Fabian Krueger  <tex at 2krueger.de>
+
+	* ptexlib.h (glyph_unicode_entry): use integer, not long,
+	to allow dumping without making .fmt platform dependent.
+
 2021-03-23  Karl Berry  <karl at tug.org>
 
 	* TL'21.
diff --git a/texk/web2c/pdftexdir/ptexlib.h b/texk/web2c/pdftexdir/ptexlib.h
index b10d289b3..4a58e2111 100644
--- a/texk/web2c/pdftexdir/ptexlib.h
+++ b/texk/web2c/pdftexdir/ptexlib.h
@@ -77,7 +77,7 @@ typedef struct {
 
 typedef struct {
     char *name;                 /* glyph name */
-    long code;                  /* -1 = undefined; -2 = multiple codes, stored
+    integer code;               /* -1 = undefined; -2 = multiple codes, stored
                                    as string in unicode_seq; otherwise unicode value */
     char *unicode_seq;          /* multiple unicode sequence */
 } glyph_unicode_entry;
-- 
2.32.0



More information about the tex-live mailing list.