diff --git a/source/build-aux/compile b/source/build-aux/compile index ba883b54aa..58f7f214a3 100755 --- a/source/build-aux/compile +++ b/source/build-aux/compile @@ -1,7 +1,7 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2018-03-07.03; # UTC +scriptversion=2023-11-23.18; # UTC # Copyright (C) 1999-2023 Free Software Foundation, Inc. # Written by Tom Tromey . @@ -143,7 +143,7 @@ func_cl_wrapper () # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in - *.o | *.[oO][bB][jJ]) + *.o | *.lo | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift @@ -248,6 +248,8 @@ If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . +GNU Automake home page: . +General help using GNU software: . EOF exit $? ;; diff --git a/source/build-aux/depcomp b/source/build-aux/depcomp index ecee3e7883..0e48ffab42 100755 --- a/source/build-aux/depcomp +++ b/source/build-aux/depcomp @@ -1,7 +1,7 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2022-09-18.14; # UTC +scriptversion=2023-11-23.18; # UTC # Copyright (C) 1999-2023 Free Software Foundation, Inc. @@ -47,6 +47,8 @@ Environment variables: libtool Whether libtool is used (yes/no). Report bugs to . +GNU Automake home page: . +General help using GNU software: . EOF exit $? ;; diff --git a/source/build-aux/install-sh b/source/build-aux/install-sh index ec298b5374..7c56c9c015 100755 --- a/source/build-aux/install-sh +++ b/source/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2020-11-14.01; # UTC +scriptversion=2023-11-23.18; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -124,9 +124,9 @@ it's up to you to specify -f if you want it. If -S is not specified, no backups are attempted. -Email bug reports to bug-automake@gnu.org. -Automake home page: https://www.gnu.org/software/automake/ -" +Report bugs to . +GNU Automake home page: . +General help using GNU software: ." while test $# -ne 0; do case $1 in diff --git a/source/libs/icu/icu-src/source/install-sh b/source/libs/icu/icu-src/source/install-sh index ec298b5374..7c56c9c015 100755 --- a/source/libs/icu/icu-src/source/install-sh +++ b/source/libs/icu/icu-src/source/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2020-11-14.01; # UTC +scriptversion=2023-11-23.18; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -124,9 +124,9 @@ it's up to you to specify -f if you want it. If -S is not specified, no backups are attempted. -Email bug reports to bug-automake@gnu.org. -Automake home page: https://www.gnu.org/software/automake/ -" +Report bugs to . +GNU Automake home page: . +General help using GNU software: ." while test $# -ne 0; do case $1 in diff --git a/source/texk/dvipdfm-x/ChangeLog b/source/texk/dvipdfm-x/ChangeLog index 0d24958d8c..af85c6377c 100644 --- a/source/texk/dvipdfm-x/ChangeLog +++ b/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,8 @@ +2023-11-24 Akira Kakuto + * dpxutil.c: Calculate time zone offset in the same way as + in pdftex. + * configure.ac: version 20231124. + 2023-11-18 Yukimasa Morimi * cidtype2.c, unicode.c: Support for new Adobe-Japan1-UCS2 CMap. diff --git a/source/texk/dvipdfm-x/configure b/source/texk/dvipdfm-x/configure index 58f9233258..51faad01e0 100755 --- a/source/texk/dvipdfm-x/configure +++ b/source/texk/dvipdfm-x/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for dvipdfm-x (TeX Live) 20231118. +# Generated by GNU Autoconf 2.71 for dvipdfm-x (TeX Live) 20231124. # # Report bugs to . # @@ -629,8 +629,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dvipdfm-x (TeX Live)' PACKAGE_TARNAME='dvipdfm-x--tex-live-' -PACKAGE_VERSION='20231118' -PACKAGE_STRING='dvipdfm-x (TeX Live) 20231118' +PACKAGE_VERSION='20231124' +PACKAGE_STRING='dvipdfm-x (TeX Live) 20231124' PACKAGE_BUGREPORT='dvipdfmx@tug.org' PACKAGE_URL='' @@ -1396,7 +1396,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dvipdfm-x (TeX Live) 20231118 to adapt to many kinds of systems. +\`configure' configures dvipdfm-x (TeX Live) 20231124 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1468,7 +1468,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20231118:";; + short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20231124:";; esac cat <<\_ACEOF @@ -1598,7 +1598,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dvipdfm-x (TeX Live) configure 20231118 +dvipdfm-x (TeX Live) configure 20231124 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2354,7 +2354,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dvipdfm-x (TeX Live) $as_me 20231118, which was +It was created by dvipdfm-x (TeX Live) $as_me 20231124, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -8795,7 +8795,7 @@ fi # Define the identity of the package. PACKAGE='dvipdfm-x--tex-live-' - VERSION='20231118' + VERSION='20231124' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15801,7 +15801,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -dvipdfm-x (TeX Live) config.lt 20231118 +dvipdfm-x (TeX Live) config.lt 20231124 configured by $0, generated by GNU Autoconf 2.71. Copyright (C) 2011 Free Software Foundation, Inc. @@ -17723,7 +17723,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dvipdfm-x (TeX Live) $as_me 20231118, which was +This file was extended by dvipdfm-x (TeX Live) $as_me 20231124, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17795,7 +17795,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -dvipdfm-x (TeX Live) config.status 20231118 +dvipdfm-x (TeX Live) config.status 20231124 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/source/texk/dvipdfm-x/configure.ac b/source/texk/dvipdfm-x/configure.ac index fcc32d2642..b4b9a14f8f 100644 --- a/source/texk/dvipdfm-x/configure.ac +++ b/source/texk/dvipdfm-x/configure.ac @@ -8,7 +8,7 @@ dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -AC_INIT([dvipdfm-x (TeX Live)], [20231118], [dvipdfmx@tug.org]) +AC_INIT([dvipdfm-x (TeX Live)], [20231124], [dvipdfmx@tug.org]) AC_PREREQ([2.65]) AC_CONFIG_SRCDIR([agl.c]) AC_CONFIG_AUX_DIR([../../build-aux]) diff --git a/source/texk/dvipdfm-x/dpxutil.c b/source/texk/dvipdfm-x/dpxutil.c index 379fb51505..c49268ea63 100644 --- a/source/texk/dvipdfm-x/dpxutil.c +++ b/source/texk/dvipdfm-x/dpxutil.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2020 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2023 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. Copyright (C) 1998, 1999 by Mark A. Wicks @@ -190,80 +190,66 @@ dpx_util_get_unique_time_if_given(void) return ret; } - -#ifndef HAVE_TM_GMTOFF -#ifndef HAVE_TIMEZONE - -/* auxiliary function to compute timezone offset on - systems that do not support the tm_gmtoff in struct tm, - or have a timezone variable. Such as i386-solaris. */ - -static int32_t -compute_timezone_offset() -{ - time_t now; - struct tm tm; - struct tm local; - time_t gmtoff; - - now = get_unique_time_if_given(); - if (now == INVALID_EPOCH_VALUE) { - now = time(NULL); - localtime_r(&now, &local); - gmtime_r(&now, &tm); - return (mktime(&local) - mktime(&tm)); - } else { - return(0); - } -} - -#endif /* HAVE_TIMEZONE */ -#endif /* HAVE_TM_GMTOFF */ - /* * Docinfo */ +#define TIME_STR_SIZE 30 int dpx_util_format_asn_date (char *date_string, int need_timezone) { - int32_t tz_offset; + int32_t off, off_hours, off_mins; time_t current_time; - struct tm *bd_time; + struct tm bd_time, gmt; + size_t size; current_time = dpx_util_get_unique_time_if_given(); if (current_time == INVALID_EPOCH_VALUE) { time(¤t_time); - bd_time = localtime(¤t_time); - -#ifdef HAVE_TM_GMTOFF - tz_offset = bd_time->tm_gmtoff; -#else -# ifdef HAVE_TIMEZONE - tz_offset = -timezone; -# else - tz_offset = compute_timezone_offset(); -# endif /* HAVE_TIMEZONE */ -#endif /* HAVE_TM_GMTOFF */ + bd_time = *localtime(¤t_time); } else { - bd_time = gmtime(¤t_time); - tz_offset = 0; + bd_time = *gmtime(¤t_time); } + + size = strftime(date_string, TIME_STR_SIZE, "D:%Y%m%d%H%M%S", &bd_time); + /* expected format: "YYYYmmddHHMMSS" */ + if (size == 0) { + /* unexpected, contents of date_string is undefined */ + date_string[0] = '\0'; + return 0; + } + + /* correction for seconds: %S can be in range 00..61, + the PDF reference expects 00..59, + therefore we map "60" and "61" to "59" */ + if (date_string[14] == '6') { + date_string[14] = '5'; + date_string[15] = '9'; + date_string[16] = '\0'; /* for safety */ + } + +/* calculate the time zone offset in the same way as in texmfmp.c */ + gmt = *gmtime(¤t_time); + off = 60 * (bd_time.tm_hour - gmt.tm_hour) + bd_time.tm_min - gmt.tm_min; + if (bd_time.tm_year != gmt.tm_year) { + off += (bd_time.tm_year > gmt.tm_year) ? 1440 : -1440; + } else if (bd_time.tm_yday != gmt.tm_yday) { + off += (bd_time.tm_yday > gmt.tm_yday) ? 1440 : -1440; + } + if (need_timezone) { - if (bd_time->tm_isdst > 0) { - tz_offset += 3600; + if (off == 0) { + date_string[size++] = 'Z'; + date_string[size] = 0; + } else { + off_hours = off / 60; + off_mins = abs(off - off_hours * 60); + sprintf(&date_string[size], "%+03d'%02d'", off_hours, off_mins); } - sprintf(date_string, "D:%04d%02d%02d%02d%02d%02d%c%02d'%02d'", - bd_time->tm_year + 1900, bd_time->tm_mon + 1, bd_time->tm_mday, - bd_time->tm_hour, bd_time->tm_min, bd_time->tm_sec, - (tz_offset > 0) ? '+' : '-', abs(tz_offset) / 3600, - (abs(tz_offset) / 60) % 60); } else { - sprintf(date_string, "D:%04d%02d%02d%02d%02d%02d", - bd_time->tm_year + 1900, bd_time->tm_mon + 1, bd_time->tm_mday, - bd_time->tm_hour, bd_time->tm_min, bd_time->tm_sec); + date_string[size] = 0; } - return strlen(date_string); + return (int)strlen(date_string); } void diff --git a/source/texk/texlive/linked_scripts/Makefile.in b/source/texk/texlive/linked_scripts/Makefile.in index 3e350511bc..1e3b225408 100644 --- a/source/texk/texlive/linked_scripts/Makefile.in +++ b/source/texk/texlive/linked_scripts/Makefile.in @@ -442,6 +442,7 @@ texmf_other_scripts = \ sty2dtx/sty2dtx.pl \ svn-multi/svn-multi.pl \ tex4ebook/tex4ebook \ + texblend/texblend \ texcount/texcount.pl \ texdef/texdef.pl \ texdiff/texdiff \ diff --git a/source/texk/web2c/ChangeLog b/source/texk/web2c/ChangeLog index d8b8c81d16..3b798cb1af 100644 --- a/source/texk/web2c/ChangeLog +++ b/source/texk/web2c/ChangeLog @@ -1,3 +1,15 @@ +2023-11-24 TANAKA Takuji + + * tests/fn-generate.perl: Add test for file names with + over-BMP (4byte UTF-8). + https://tug.org/pipermail/tex-live/2023-November/049685.html + +2023-11-19 Karl Berry + + * tex.ch, + * mf.ch (Undump the dynamic memory): improve fmt/base corruption + checks, from DRF. + 2023-11-19 Andreas Scherer * ctangleboot.cin, diff --git a/source/texk/web2c/cwebdir/ChangeLog b/source/texk/web2c/cwebdir/ChangeLog index 437c2b6e75..0bb9d9bb58 100644 --- a/source/texk/web2c/cwebdir/ChangeLog +++ b/source/texk/web2c/cwebdir/ChangeLog @@ -1,3 +1,11 @@ +2023-11-19 Andreas Scherer + + * ctwill-hint.ch, + * ctwill-mini.ch, + * ctwill-w2c.ch, + * cweav-w2c.ch, + * cweave.w: Make 'k_section' block-local. + 2023-11-19 Andreas Scherer * common.c, diff --git a/source/texk/web2c/cwebdir/ctwill-hint.ch b/source/texk/web2c/cwebdir/ctwill-hint.ch index 59366ed8c1..f78891cd85 100644 --- a/source/texk/web2c/cwebdir/ctwill-hint.ch +++ b/source/texk/web2c/cwebdir/ctwill-hint.ch @@ -707,7 +707,7 @@ Section 248. @-phase_three@> @z -Section 251. +Section 250. @x @ A left-to-right radix sorting method is used, since this makes it easy to @@ -716,7 +716,7 @@ Section 251. @-c@> @z -Section 253. +Section 252. @x @= @@ -726,7 +726,7 @@ Section 253. @-k@> @z -Section 254. +Section 253. @x @ @d depth cat /* reclaims memory that is no longer needed for parsing */ @@ -736,22 +736,22 @@ Section 254. @-head@> @-sort_ptr@> @-max_sorts@> -@$depth {CTWILL}254 =\\{cat}@> -@$head {CTWILL}254 =\\{trans\_plus}.\\{Head}@> -@$sort_ptr {CTWILL}254 =\\{scrap\_ptr}@> +@$depth {CTWILL}253 =\\{cat}@> +@$head {CTWILL}253 =\\{trans\_plus}.\\{Head}@> +@$sort_ptr {CTWILL}253 =\\{scrap\_ptr}@> @z -Section 258. +Section 257. @x @ Procedure |unbucket| goes through the buckets and adds nonempty lists @y @ Procedure |unbucket| goes through the buckets and adds nonempty lists @-unbucket@> -@$unbucket {CTWILL}258 \&{static} \&{void} (\,)@> +@$unbucket {CTWILL}257 \&{static} \&{void} (\,)@> @z -Section 259. +Section 258. @x @ @=@+static void unbucket(eight_bits); @@ -760,7 +760,7 @@ Section 259. @-unbucket@> @z -Section 261. +Section 260. @x next_name=sort_ptr->head; @@ -768,7 +768,7 @@ Section 261. next_name=sort_ptr->head;@/ @z -Section 262. +Section 261. @x cur_name=sort_ptr->head; @@ -776,7 +776,7 @@ Section 262. cur_name=sort_ptr->head;@/ @z -Section 268. +Section 267. @x @ @=@+static void section_print(name_pointer); @@ -785,7 +785,7 @@ Section 268. @-section_print@> @z -Section 270. +Section 269. @x puts(_("\nMemory usage statistics:")); @@ -849,10 +849,10 @@ Section 270. @t\5\5\5\5@>(long)max_scraps); @z -Section 272. +Section 271. @x -@q Section 2->272. @> +@q Section 2->271. @> @* {\tentex CTWILL} user manual. @y @* {\tentex CTWILL} user manual. @@ -862,17 +862,17 @@ Section 272. @-printf@> @z -Section 274. +Section 273. @x static struct perm_meaning { @y static struct perm_meaning { @-perm_meaning@> -@$perm_meaning {CTWILL}274 \&{static} \&{struct}@> +@$perm_meaning {CTWILL}273 \&{static} \&{struct}@> @z -Section 283. +Section 282. @x @ @=@+static boolean app_supp(text_pointer); @@ -881,7 +881,7 @@ Section 283. @-app_supp@> @z -Section 284. +Section 283. @x @ The trickiest part of \.{CTWILL} is the procedure |make_ministring(pp+l)|, @@ -892,10 +892,10 @@ Section 284. @-c@> @-l@> @-make_ministring@> -@$make_ministring {CTWILL}284 \&{static} \&{void} (\,)@> +@$make_ministring {CTWILL}283 \&{static} \&{void} (\,)@> @z -Section 285. +Section 284. @x @ @=@+static void make_ministring(scrap_pointer); @@ -904,18 +904,18 @@ Section 285. @-make_ministring@> @z -Section 293. +Section 292. @x @ @= @y @ @= @% -@$p {CTWILL}277 \&{name\_pointer}@> -@$q {CTWILL}277 \&{struct perm\_meaning} ${}{*}{}$@> +@$p {CTWILL}276 \&{name\_pointer}@> +@$q {CTWILL}276 \&{struct perm\_meaning} ${}{*}{}$@> @z -Section 294. +Section 293. @x @= @@ -925,7 +925,7 @@ Section 294. @$p {CTWILL}202 \&{name\_pointer}@> @z -Section 297. +Section 296. @x @ @=@+static void out_mini(meaning_struct *); @@ -934,7 +934,7 @@ Section 297. @-out_mini@> @z -Section 300. +Section 299. @x @ @=@+static sixteen_bits title_lookup(void); @@ -943,27 +943,27 @@ Section 300. @-title_lookup@> @z -Section 303. +Section 302. @x @d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */ @y @d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */ @-indent_param_decl@> -@$indent_param_decl {CTWILL}303 =\\{flags}[\.{'i'}]@> +@$indent_param_decl {CTWILL}302 =\\{flags}[\.{'i'}]@> @z -Section 304. +Section 303. @x @d order_decl_stmt flags['o'] /* should declarations and statements be separated? */ @y @d order_decl_stmt flags['o'] /* should declarations and statements be separated? */ @-order_decl_stmt@> -@$order_decl_stmt {CTWILL}304 =\\{flags}[\.{'o'}]@> +@$order_decl_stmt {CTWILL}303 =\\{flags}[\.{'o'}]@> @z -Section 310. +Section 309. @x l.102 of CTWILL-TEXLIVE.CH @d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true) diff --git a/source/texk/web2c/cwebdir/ctwill-mini.ch b/source/texk/web2c/cwebdir/ctwill-mini.ch index d08f0c6b8d..69eb962342 100644 --- a/source/texk/web2c/cwebdir/ctwill-mini.ch +++ b/source/texk/web2c/cwebdir/ctwill-mini.ch @@ -32,14 +32,14 @@ Section 1. @x A kind of ``user manual'' for \.{CTWILL} can be found in the appendix -\X271:Mogrify \.{CWEAVE} into \.{CTWILL}\X~and beyond, together with +\X270:Mogrify \.{CWEAVE} into \.{CTWILL}\X~and beyond, together with additional material specific to \.{CTWILL}. % FIXME Until then, \.{CWEAVE}'s sequence of sections will be preserved. The ``banner line'' defined here should be changed whenever \.{CTWILL} is @y A kind of ``user manual'' for \.{CTWILL} can be found in section~% -\X288:Mogrify {\tentex CWEAVE} into {\tentex CTWILL}\X~and beyond, +\X287:Mogrify {\tentex CWEAVE} into {\tentex CTWILL}\X~and beyond, together with additional material specific to \.{CTWILL}. % FIXME \bigskip {\font\itt=cmitt10 \font\bit=cmbxti10 @@ -1909,7 +1909,7 @@ Section 265. @-phase_three@> @z -Section 268. +Section 267. @x @ A left-to-right radix sorting method is used, since this makes it easy to @@ -1918,7 +1918,14 @@ Section 268. @-c@> @z -Section 270. +@x l.4596 +the |blink| array. +@y +the |blink| array. +\vadjust{\goodbreak}% +@z + +Section 269. @x @= @@ -1928,7 +1935,7 @@ Section 270. @-k@> @z -Section 271. +Section 270. @x @ @d depth cat /* reclaims memory that is no longer needed for parsing */ @@ -1938,12 +1945,12 @@ Section 271. @-head@> @-sort_ptr@> @-max_sorts@> -@$depth {CTWILL}271 =\\{cat}@> -@$head {CTWILL}271 =\\{trans\_plus}.\\{Head}@> -@$sort_ptr {CTWILL}271 =\\{scrap\_ptr}@> +@$depth {CTWILL}270 =\\{cat}@> +@$head {CTWILL}270 =\\{trans\_plus}.\\{Head}@> +@$sort_ptr {CTWILL}270 =\\{scrap\_ptr}@> @z -Section 273. +Section 272. @x $|collate|[0]<|collate|[1]<\cdots<|collate|[100]$. @@ -1951,17 +1958,17 @@ $|collate|[0]<|collate|[1]<\cdots<|collate|[100]$. |collate[0]| ${}<{}$|collate[1]|${}<\cdots<{}$|collate[100]|. @z -Section 275. +Section 274. @x @ Procedure |unbucket| goes through the buckets and adds nonempty lists @y @ Procedure |unbucket| goes through the buckets and adds nonempty lists @-unbucket@> -@$unbucket {CTWILL}275 \&{static} \&{void} (\,)@> +@$unbucket {CTWILL}274 \&{static} \&{void} (\,)@> @z -Section 276. +Section 275. @x @ @=@+static void unbucket(eight_bits); @@ -1970,7 +1977,7 @@ Section 276. @-unbucket@> @z -Section 278. +Section 277. @x @ @= { @@ -1982,7 +1989,7 @@ Section 278. next_name=sort_ptr->head;@/ @z -Section 279. +Section 278. @x @ @= { @@ -1992,7 +1999,7 @@ Section 279. cur_name=sort_ptr->head;@/ @z -Section 281. +Section 280. @x else {out_str("\\["); out_section(cur_val-def_flag); out(']');} @@ -2000,7 +2007,7 @@ Section 281. else {@+out_str("\\["); out_section(cur_val-def_flag); out(']');@+} @z -Section 285. +Section 284. @x @ @=@+static void section_print(name_pointer); @@ -2009,7 +2016,7 @@ Section 285. @-section_print@> @z -Section 287. +Section 286. @x puts(_("\nMemory usage statistics:")); @@ -2073,7 +2080,7 @@ Section 287. @t\5\5\5\5@>(long)max_scraps); @z -Section 288. +Section 287. @x @** Mogrify {\tentex CWEAVE} into {\tentex CTWILL}. The following sections @@ -2081,9 +2088,9 @@ introduce material that is specific to \.{CTWILL}. Care has been taken to keep the original section numbering of \.{CWEAVE} up to this point intact, so this new material should nicely integrate -with the original ``\&{271.~Index}.'' +with the original ``\&{270.~Index}.'' -@q Section 2->272. @> +@q Section 2->271. @> @* {\tentex CTWILL} user manual. Here is a sort of user manual for \.{CTWILL}---which is exactly like @y @@ -2101,7 +2108,7 @@ give it the necessary hints in other places via your change file. @-x@> @z -Section 289--290. +Section 288--289. @x The current meaning of every identifier is initially `\.{\\uninitialized}'. @@ -2126,17 +2133,17 @@ must have fewer than 80 characters. @y @z -Section 292. +Section 291. @x static struct perm_meaning { @y static struct perm_meaning { @-perm_meaning@> -@$perm_meaning {CTWILL}292 \&{static} \&{struct}@> +@$perm_meaning {CTWILL}291 \&{static} \&{struct}@> @z -Section 301. +Section 300. @x @ @=@+static boolean app_supp(text_pointer); @@ -2145,7 +2152,7 @@ Section 301. @-app_supp@> @z -Section 302. +Section 301. @x @ The trickiest part of \.{CTWILL} is the procedure |make_ministring(pp+l)|, @@ -2156,10 +2163,10 @@ Section 302. @-c@> @-l@> @-make_ministring@> -@$make_ministring {CTWILL}302 \&{static} \&{void} (\,)@> +@$make_ministring {CTWILL}301 \&{static} \&{void} (\,)@> @z -Section 303. +Section 302. @x @ @=@+static void make_ministring(scrap_pointer); @@ -2168,7 +2175,7 @@ Section 303. @-make_ministring@> @z -Section 306. +Section 305. @x @ @= @@ -2182,18 +2189,18 @@ Section 306. @|&& *(*r+1)=='{') app(**q); /* |struct_like| identifier */ @z -Section 311. +Section 310. @x @ @= @y @ @= @% -@$p {CTWILL}295 \&{name\_pointer}@> -@$q {CTWILL}295 \&{struct perm\_meaning} ${}{*}{}$@> +@$p {CTWILL}294 \&{name\_pointer}@> +@$q {CTWILL}294 \&{struct perm\_meaning} ${}{*}{}$@> @z -Section 312. +Section 311. @x @= @@ -2203,7 +2210,7 @@ Section 312. @$p {CTWILL}218 \&{name\_pointer}@> @z -Section 315. +Section 314. @x @ @=@+static void out_mini(meaning_struct *); @@ -2212,7 +2219,7 @@ Section 315. @-out_mini@> @z -Section 318. +Section 317. @x @ @=@+static sixteen_bits title_lookup(void); @@ -2221,27 +2228,27 @@ Section 318. @-title_lookup@> @z -Section 321. +Section 320. @x @d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */ @y @d indent_param_decl flags['i'] /* should formal parameter declarations be indented? */ @-indent_param_decl@> -@$indent_param_decl {CTWILL}321 =\\{flags}[\.{'i'}]@> +@$indent_param_decl {CTWILL}320 =\\{flags}[\.{'i'}]@> @z -Section 322. +Section 321. @x @d order_decl_stmt flags['o'] /* should declarations and statements be separated? */ @y @d order_decl_stmt flags['o'] /* should declarations and statements be separated? */ @-order_decl_stmt@> -@$order_decl_stmt {CTWILL}322 =\\{flags}[\.{'o'}]@> +@$order_decl_stmt {CTWILL}321 =\\{flags}[\.{'o'}]@> @z -Section 328. +Section 327. @x l.102 of CTWILL-TEXLIVE.CH @d kpse_find_cweb(name) kpse_find_file(name,kpse_cweb_format,true) @@ -2250,7 +2257,7 @@ Section 328. @-name@> @z -Section 330. +Section 329. @x @** Index. diff --git a/source/texk/web2c/cwebdir/ctwill-w2c.ch b/source/texk/web2c/cwebdir/ctwill-w2c.ch index 40e571d0d5..358bfa6264 100644 --- a/source/texk/web2c/cwebdir/ctwill-w2c.ch +++ b/source/texk/web2c/cwebdir/ctwill-w2c.ch @@ -94,7 +94,7 @@ can be found in Knuth's article ``Mini-indexes for literate programs,'' reprinted in {\sl Digital Typography\/} (1999), 225--245. A kind of ``user manual'' for \.{CTWILL} can be found in the appendix -\X271:Mogrify \.{CWEAVE} into \.{CTWILL}\X~and beyond, together with +\X270:Mogrify \.{CWEAVE} into \.{CTWILL}\X~and beyond, together with additional material specific to \.{CTWILL}. % FIXME Until then, \.{CWEAVE}'s sequence of sections will be preserved. @@ -1154,16 +1154,9 @@ if (check_for_change) @@; @x the index section itself. -@= -static sixteen_bits k_section; /* runs through the sections */ -@y -the index section itself---NOT! -@z - -@x -@ @= +@= /* remember that the index is already marked as changed */ -k_section=0; +sixteen_bits k_section=0; /* runs through the sections */ while (!changed_section[++k_section]); out_str("\\ch "); @.\\ch@> @@ -1174,7 +1167,7 @@ while (k_section +@q Section 270. @> @** Mogrify {\tentex CWEAVE} into {\tentex CTWILL}. The following sections introduce material that is specific to \.{CTWILL}. Care has been taken to keep the original section numbering of \.{CWEAVE} up to this point intact, so this new material should nicely integrate -with the original ``\&{271.~Index}.'' +with the original ``\&{270.~Index}.'' -@q Section 2->272. @> +@q Section 2->271. @> @* {\tentex CTWILL} user manual. Here is a sort of user manual for \.{CTWILL}---which is exactly like \.{CWEAVE} except that it produces much better documentation, for which you @@ -1449,7 +1442,7 @@ which are quite different from the change files you set up for tangling. @d max_tex_chars 80 /* limit on the \TeX\ part of a meaning */ -@q Section 25->273. @> +@q Section 25->272. @> @* Temporary and permanent meanings. \.{CTWILL} has special data structures to keep track of current and temporary meanings. These structures were not designed for maximum @@ -1467,7 +1460,7 @@ typedef struct { char tex_part[max_tex_chars]; /* \TeX\ part of meaning */ } meaning_struct; -@q Section 26->274. @> +@q Section 26->273. @> @ @= static struct perm_meaning { meaning_struct perm; /* current meaning of an identifier */ @@ -1490,16 +1483,16 @@ static char *ministring_buf_end=ministring_buf+max_tex_chars-1; static char *ministring_ptr; /* first available slot in |ministring_buf| */ static boolean ms_mode; /* are we outputting to |ministring_buf|? */ -@q Section 27->275. @> +@q Section 27->274. @> @ @= max_temp_meaning_ptr=temp_meaning_stack; title_code_ptr=title_code; ms_mode=false; -@q Section 276. @> +@q Section 275. @> @ @=@+static void new_meaning(name_pointer); -@q Section 30->277. @> +@q Section 30->276. @> @ The |new_meaning| routine changes the current ``permanent meaning'' when an identifier is redeclared. It gets the |tex_part| from |ministring_buf|. @@ -1523,7 +1516,7 @@ new_meaning( @@; } -@q Section 75->278. @> +@q Section 75->277. @> @ @= { char *first=id_first; while (xisspace(*first)) first++; @@ -1544,7 +1537,7 @@ new_meaning( loc=id_loc+2; } -@q Section 76->279. @> +@q Section 76->278. @> @ @= { char *first=id_first,*last=id_loc; while (xisspace(*first)) first++; @@ -1555,7 +1548,7 @@ new_meaning( } } -@q Section 77->280. @> +@q Section 77->279. @> @ @= { meaning_struct *m; struct perm_meaning *q=get_meaning(p); @@ -1578,7 +1571,7 @@ new_meaning( } } -@q Section 141->281/2. @> +@q Section 141->280/1. @> @* Make ministrings. \.{CTWILL} needs the following procedure, which appends tokens of a translated text until coming to |tok_loc|, then suppresses text that may @@ -1608,10 +1601,10 @@ static boolean app_supp( catch14: return *(*(p+1)-1)=='9'; /* was production 14 used? */ } -@q Section 283. @> +@q Section 282. @> @ @=@+static boolean app_supp(text_pointer); -@q Section 142->284. @> +@q Section 142->283. @> @ The trickiest part of \.{CTWILL} is the procedure |make_ministring(pp+l)|, with offset $l\in\{0,1,2\}$, which tries to figure out a symbolic form of definition after |make_underlined(pp+l)| has been called. We rely heavily @@ -1639,14 +1632,14 @@ make_ministring(scrap_pointer p) cur_mathness=maybe_math; /* restore it */ } -@q Section 285. @> +@q Section 284. @> @ @=@+static void make_ministring(scrap_pointer); -@q Section 43->286. @> +@q Section 43->285. @> @ @= static sixteen_bits int_loc, ext_loc; /* locations of special reserved words */ -@q Section 143->287. @> +@q Section 143->286. @> @ Here we use the fact that a |decl_head| comes from |int_like| only in production~27, whose translation is fairly easy to recognize. (Well, production 28 has been added for \CPLUSPLUS/, but we hope that doesn't @@ -1687,7 +1680,7 @@ else { @@; } -@q Section 144->288. @> +@q Section 144->287. @> @ @= cur_mathness=no_math; /* it was |maybe_math| */ if (*(q+1)==*q+8 && *(*q+1)==' ' && *(*q+3)==' ') { @@ -1699,13 +1692,13 @@ while (ast_count) { big_app('{');@+app('*');@+app('}');@+ast_count--; } -@q Section 253->289. @> +@q Section 253->288. @> @ @= static boolean is_macro; /* it's a macro def, not a format def */ static boolean def_diff; /* |false| iff the current macro has parameters */ static name_pointer id_being_defined; /* the definee */ -@q Section 257->290. @> +@q Section 257->289. @> @ @= { ms_mode=true; ministring_ptr=ministring_buf; @@ -1723,14 +1716,14 @@ static name_pointer id_being_defined; /* the definee */ new_meaning(id_being_defined); } -@q Section 246->291. @> +@q Section 246->290. @> @* Process {\tentex .aux} files. @= static FILE *aux_file; static char aux_file_name[max_file_name_length]; /* name of \.{.aux} file */ -@q Section 247->292. @> +@q Section 247->291. @> @ @= memcpy(aux_file_name,tex_file_name,strlen(tex_file_name)-4); strcat(aux_file_name,".bux"); @@ -1759,7 +1752,7 @@ if (include_depth) { /* at least one new file was opened */ if ((aux_file=fopen(aux_file_name,"wb"))==NULL) fatal(_("! Cannot open aux output file "),aux_file_name); -@q Section 31->293. @> +@q Section 31->292. @> @ @= {@+int n=q->perm.prog_no; ms_mode=false;@/ @@ -1770,7 +1763,7 @@ if ((aux_file=fopen(aux_file_name,"wb"))==NULL) fprintf(aux_file," %s@@>\n",q->perm.tex_part); } -@q Section 268->294. @> +@q Section 268->293. @> @* Usage of identifiers. The following code is performed for each identifier parsed during a section. Variable |top_usage| is always nonzero; it has the sentinel @@ -1789,7 +1782,7 @@ placed on the list, unless they are reserved and their current } } -@q Section 269->295. @> +@q Section 269->294. @> @ @= { struct perm_meaning *q; while (temp_meaning_ptr>temp_meaning_stack) { @@ -1805,7 +1798,7 @@ placed on the list, unless they are reserved and their current } } -@q Section 270->296. @> +@q Section 270->295. @> @ @c static void out_mini( meaning_struct *m) @@ -1824,10 +1817,10 @@ out_mini( out(' '); out_str(m->tex_part); finish_line(); } -@q Section 271->297. @> +@q Section 270->296. @> @ @=@+static void out_mini(meaning_struct *); -@q Section 272->298. @> +@q Section 271->297. @> @ Compare this code with section |@|. @= @@ -1862,7 +1855,7 @@ switch (cur_name->ilk) {@+char *p; /* index into |byte_mem| */@+@t}\6{\4@> out_name(cur_name,true); name_done:@; -@q Section 28->299. @> +@q Section 28->298. @> @* Handle program title. Here's a routine that converts a program title from the buffer into an internal number for the |prog_no| field of a meaning. @@ -1892,10 +1885,10 @@ It advances |loc| past the title found. return p-title_code; } -@q Section 300. @> +@q Section 299. @> @ @=@+static sixteen_bits title_lookup(void); -@q Section 29->301. @> +@q Section 29->300. @> @ @= if (title_code_ptr==title_code) { /* no \.{\\def\\title} found in limbo */ char *saveloc=loc,*savelimit=limit; /* save */ @@ -1908,7 +1901,7 @@ if (title_code_ptr==title_code) { /* no \.{\\def\\title} found in limbo */ loc=saveloc; limit=savelimit; /* restore */ } -@q Section 302. @> +@q Section 301. @> @** Extensions to {\tentex CWEB}. The following sections introduce new or improved features that have been created by numerous contributors over the course of a quarter century. diff --git a/source/texk/web2c/cwebdir/cweav-w2c.ch b/source/texk/web2c/cwebdir/cweav-w2c.ch index 4a1526462f..0316fef266 100644 --- a/source/texk/web2c/cwebdir/cweav-w2c.ch +++ b/source/texk/web2c/cwebdir/cweav-w2c.ch @@ -603,7 +603,7 @@ improved features that have been created by numerous contributors over the course of a quarter century. Care has been taken to keep the original section numbering intact, so this new -material should nicely integrate with the original ``\&{271.~Index}.'' +material should nicely integrate with the original ``\&{270.~Index}.'' @* Formatting alternatives. \.{CWEAVE} indents declarations after old-style function definitions and diff --git a/source/texk/web2c/cwebdir/cweave.w b/source/texk/web2c/cwebdir/cweave.w index f3e24eb483..4e788f6a73 100644 --- a/source/texk/web2c/cwebdir/cweave.w +++ b/source/texk/web2c/cwebdir/cweave.w @@ -4573,12 +4573,9 @@ check_complete(); /* was all of the change file used? */ @ Just before the index comes a list of all the changed sections, including the index section itself. -@= -static sixteen_bits k_section; /* runs through the sections */ - -@ @= +@= /* remember that the index is already marked as changed */ -k_section=0; +sixteen_bits k_section=0; /* runs through the sections */ while (!changed_section[++k_section]); out_str("\\ch "); @.\\ch@> diff --git a/source/texk/web2c/eptexdir/ChangeLog b/source/texk/web2c/eptexdir/ChangeLog index 71d93499f2..baada61bbc 100644 --- a/source/texk/web2c/eptexdir/ChangeLog +++ b/source/texk/web2c/eptexdir/ChangeLog @@ -1,3 +1,14 @@ +2023-11-25 TANAKA Takuji + + * wcfname.test: Add tests for --recorder and *.fls. + https://github.com/texjporg/tex-jp-build/issues/45 + +2023-11-24 TANAKA Takuji + + * eptriptest.test, eptrip/eptrip.{log,tex}: + Check diffs of trip.{fot,typ} with ignoring trivial changes + in trip tests. + 2023-09-03 TANAKA Takuji * {eptriptest,epver}.test: diff --git a/source/texk/web2c/eptexdir/eptrip/eptrip.log b/source/texk/web2c/eptexdir/eptrip/eptrip.log index ee7da67d4f..1d166fdd58 100644 --- a/source/texk/web2c/eptexdir/eptrip/eptrip.log +++ b/source/texk/web2c/eptexdir/eptrip/eptrip.log @@ -1,8 +1,8 @@ -This is e-pTeX, Version 3.14159265-p3.4-130605-2.6 (utf8.euc) (TeX Live 2014) (preloaded format=etrip 2014.1.22) 22 JAN 2014 11:25 +This is e-pTeX, Version 3.141592653-p4.1.1-230214-2.6 (utf8.euc) (TeX Live 2023) (preloaded format=etrip 2023.2.14) 14 FEB 2023 11:25 entering extended mode **&etrip etrip (./etrip.tex e-IniTeX: e-Trip format loaded. -This is the e-Trip test [2014-01-22] for e-TeX v3.14159265-2.6. +This is the e-Trip test [2021-01-28] for e-TeX v3.141592653-2.6. (You are using e-TeX version/revision 2.6) Missing character: There is no b in font nullfont! @@ -1423,7 +1423,7 @@ you left one out. Proceed, with fingers crossed. ### math mode entered at line 524 \mathord .\fam1 r -this will be denominator of: +this will begin denominator of: \fraction, thickness = default \\left"161361 \\mathord @@ -1447,7 +1447,7 @@ this will be denominator of: ### math mode entered at line 517 \mathord .\fam1 r -this will be denominator of: +this will begin denominator of: \fraction, thickness = default \\left"161361 \\mathord @@ -1494,7 +1494,7 @@ l.525 ... \over r\showlists ### math mode entered at line 517 \mathord .\fam1 r -this will be denominator of: +this will begin denominator of: \fraction, thickness = default \\left"161361 \\mathord @@ -1542,7 +1542,7 @@ l.526 ... \right]\showlists ../.\fam1 r ..\right"162362 .\right"162362 -this will be denominator of: +this will begin denominator of: \fraction, thickness = default \\left"161361 \\mathord diff --git a/source/texk/web2c/eptexdir/eptrip/eptrip.tex b/source/texk/web2c/eptexdir/eptrip/eptrip.tex index 60590e17c0..6d359151e4 100644 --- a/source/texk/web2c/eptexdir/eptrip/eptrip.tex +++ b/source/texk/web2c/eptexdir/eptrip/eptrip.tex @@ -1,4 +1,4 @@ -%%; This is `eptrip.tex' for e-pTeX v3.14159265-2.6 as of Jan 22, 2014. +%%; This is `eptrip.tex' for e-pTeX v3.141592653-2.6 as of Jan 28, 2021. %%; %%; This is a diabolical test file for e-pTeX, an extension of TeX82. %%; It is not as diabolical as `trip.tex', Knuth's torture test for TeX. @@ -9,8 +9,8 @@ %%; ==>> wrong e-TeX input to produce errors and warnings. <<== %%; \catcode`\{=1\catcode`\}=2\catcode`\#=6 \let\bgroup={ \let\egroup=} -\def\etripdate {2014-01-22} -\def\texversion {3.14159265} +\def\etripdate {2021-01-28} +\def\texversion {3.141592653} \def\etripversion{2.6} % \message{This is the e-Trip test [\etripdate] for diff --git a/source/texk/web2c/eptexdir/eptriptest.test b/source/texk/web2c/eptexdir/eptriptest.test index db82a98d1b..c295d74555 100755 --- a/source/texk/web2c/eptexdir/eptriptest.test +++ b/source/texk/web2c/eptexdir/eptriptest.test @@ -1,5 +1,6 @@ #! /bin/sh -vx # $Id$ +# Copyright 2023 Japanese TeX Development Community # Copyright 2017-2018 Karl Berry # Copyright 2011-2014 Peter Breitenlohner # Copyright 2010 Hironori Kitagawa @@ -23,6 +24,58 @@ TEXMFCNF=$eptestdir; export TEXMFCNF rm -rf eptripdir mkdir eptripdir cd eptripdir +mkdir -p a b + +# TeX Live generic +cat >filter <<-\_EOF + /^\*\* \&trip trip/d + /^\*\*entering extended mode/d + s,^(trip\.tex ##,**(./trip.tex ##, + s,^## (\./trip\.tex,**(./trip.tex ##, + s/ (TeX Live 20[^)]*)// + s/ (Web2C 202[3-9])// + s/(preloaded format=.*tex)/(INITEX)/ + s/format=trip [^)][^)]*)/format=trip)/ + s/) [0-9A-Z: ]*$/)/ + s,^(\./,(, + s/[1-9][0-9]* strings out of [1-9].*/XX strings out of YYY/ + s/[1-9][0-9]* string characters out of [1-9].*/XXX string characters out of YYYY/ + s/sequences out of [1-9].*/sequences out of YYYY/ + s/[1-9] hyphenation exceptions* out of [1-9].*/X hyphenation exceptions out of YYY/ + s/[1-9][0-9]* strings of total length [1-9].*/XXXX strings of total length YYYYY/ + s/9 ops out of [1-9][0-9]*/9 ops out of YYY/ + s/TeX output ....\...\...:..../TeX output YYYY.MM.DD:hhmm/ + _EOF + +# x86 glue rounding +cat >>filter <<-\_EOF + s/ 16341\.999.*fil/ 16342.0fil/ + s/ 16238\.999.*fil/ 16239.0fil/ + s/ 16317\.999.*fil/ 16318.0fil/ + s/ 16330\.999.*fil/ 16331.0fil/ + s/ 16331\.999.*fil/ 16332.0fil/ + s/ 16343\.999.*fil/ 16344.0fil/ + s/ 9737\.587..fil/ 9737.58789fil/ + s/down4 639342.../down4 639342208/ + s/y4 2039217../y4 203921760/ + s/y0 2039217../y0 203921760/ + _EOF + +# epTeX +cat >>filter <<-\_EOF + s/This is .*TeX,/This is *TeX,/ + s/(utf8[^)]*) // + s/ Version 3\.141592653[^(]*(/ Version 3.141592653* (/ + s/ before: [1-9][0-9][0-9][0-9]*&[1-9][0-9][0-9][0-9]*; / before: XXX\&YYY; / + s/ after: [1-9][0-9][0-9][0-9]*&[1-9][0-9][0-9][0-9]*; / after: XXX\&YYY; / + s/ still untouched: [1-9][0-9][0-9][0-9]*/ still untouched: XXX/ + _EOF +cat >filter1 <<-\_EOF + :l + N + $!b l + s/ inside a group at level 1).*bottom level/ inside a group at level 1)/ + _EOF dvitype_args="-output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'" @@ -61,17 +114,23 @@ diff $testdir/tripin.log cptripin.log rm -f trip.log $_eptex --progname=eptex <$testdir/trip2.in >cptrip.fot sed "$P_SED1;$P_SED2" trip.log > cptrip.log -diff $testdir/trip.fot cptrip.fot +#diff $testdir/trip.fot cptrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. -$DIFF $DIFFFLAGS $testdir/trip.log cptrip.log +$DIFF $DIFFFLAGS $testdir/trip.log cptrip.log mv tripos.tex cptripos.tex diff $testdir/tripos.tex cptripos.tex eval $_dvitype $dvitype_args trip.dvi >cptrip.typ || exit 1 -$DIFF $DIFFFLAGS $testdir/trip.typ cptrip.typ +#$DIFF $DIFFFLAGS $testdir/trip.typ cptrip.typ + +for f in trip.fot trip.typ; do + sed -f filter $testdir/$f >a/$f + sed -f filter cp$f >b/$f + diff a/$f b/$f || is_OK=false +done mv trip.fmt ctrip.fmt @@ -92,17 +151,23 @@ diff $testdir/tripin.log xptripin.log rm -f trip.log $_eptex --progname=eptex <$etestdir/trip2.in >xptrip.fot sed "$P_SED1;$P_SED2" trip.log > xptrip.log -diff $testdir/trip.fot xptrip.fot +#diff $testdir/trip.fot xptrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. -$DIFF $DIFFFLAGS $testdir/trip.log xptrip.log +$DIFF $DIFFFLAGS $testdir/trip.log xptrip.log mv tripos.tex xptripos.tex diff $testdir/tripos.tex xptripos.tex eval $_dvitype $dvitype_args trip.dvi >xptrip.typ || exit 1 -$DIFF $DIFFFLAGS $testdir/trip.typ xptrip.typ +#$DIFF $DIFFFLAGS $testdir/trip.typ xptrip.typ + +for f in trip.fot trip.typ; do + sed -f filter $testdir/$f >a/x$f + sed -f filter xp$f | sed -f filter1 >b/x$f + diff a/x$f b/x$f || is_OK=false +done mv trip.fmt xtrip.fmt @@ -130,7 +195,7 @@ diff $etestdir/etripin.log eptripin.log # May as well test non-ini second time through. $_eptex --progname=eptex <$etestdir/etrip3.in >eptrip.fot sed "$P_SED1;$P_SED2" etrip.log > eptrip.log -diff $etestdir/etrip.fot eptrip.fot +#diff $etestdir/etrip.fot eptrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. @@ -140,7 +205,13 @@ mv etrip.out eptrip.out diff $etestdir/etrip.out eptrip.out eval $_dvitype $dvitype_args etrip.dvi >eptrip.typ || exit 1 -$DIFF $DIFFFLAGS $etestdir/etrip.typ eptrip.typ +#$DIFF $DIFFFLAGS $etestdir/etrip.typ eptrip.typ + +for f in trip.fot trip.typ; do + sed -f filter $etestdir/e$f >a/e$f + sed -f filter ep$f >b/e$f + diff a/e$f b/e$f || is_OK=false +done $is_OK || { echo ">>> There were some errors." >&2 diff --git a/source/texk/web2c/eptexdir/wcfname.test b/source/texk/web2c/eptexdir/wcfname.test index ce448d9617..502880d742 100755 --- a/source/texk/web2c/eptexdir/wcfname.test +++ b/source/texk/web2c/eptexdir/wcfname.test @@ -72,11 +72,12 @@ for doc in fn-$fenc fnさざ波-$fenc; do echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc $_kpsewhich -progname=$engine $doc.tex || rc=10 $_kpsewhich -progname=$engine fn±×÷§¶-utf8.tex || rc=11 - $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ + $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape --recorder $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ { rc=1 ; err1=$err1" $fenc:$ienc:$doc" ; } $_kpsewhich -progname=$engine $doc-tmp.tex || rc=12 $_kpsewhich -progname=$engine fn±×÷§¶-utf8-tmp.tex || rc=13 - mv $doc-$ienc.txt $doc-$ienc.log $testdir/ + mv $doc-$ienc.txt $doc-$ienc.log $testdir/ || rc=14 + mv $doc-$ienc.txt $testdir/ || : echo "FIXME" # check *.fls diff $testdir/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || \ { rc=2 ; err2=$err2" $fenc:$ienc:$doc" ; } rm -f $testdir/fn±×÷§¶-utf8-tmp.tex @@ -104,11 +105,11 @@ for doc in fnさざ波-$fenc; do echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc $_kpsewhich -progname=$engine $doc.tex || rc=20 $_kpsewhich -progname=$engine fn±×÷§¶-utf8.tex || rc=21 - $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ + $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape --recorder $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ { rc=3 ; err3=$err3" $fenc:$ienc:$doc" ; } $_kpsewhich -progname=$engine $doc-tmp.tex || rc=22 $_kpsewhich -progname=$engine fn±×÷§¶-utf8-tmp.tex || rc=23 - mv $doc-$ienc.txt $doc-$ienc.log $testdir/ + mv $doc-$ienc.txt $doc-$ienc.log $doc-$ienc.fls $testdir/ || : echo "FIXME" # check *.fls diff $testdir/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || \ { rc=4 ; err4=$err4" $fenc:$ienc:$doc" ; } diff --git a/source/texk/web2c/etexdir/ChangeLog b/source/texk/web2c/etexdir/ChangeLog index b7785ce5f0..3a0e2816d2 100644 --- a/source/texk/web2c/etexdir/ChangeLog +++ b/source/texk/web2c/etexdir/ChangeLog @@ -1,3 +1,9 @@ +2023-11-24 TANAKA Takuji + + * etriptest.test, etrip/etrip.{fot,log,typ}, etrip/etripin.log: + Check diffs of trip.{fot,typ} with ignoring trivial changes + in trip tests. + 2023-09-17 TANAKA Takuji * {etriptest,wprob}.test: diff --git a/source/texk/web2c/etexdir/etrip/etrip.fot b/source/texk/web2c/etexdir/etrip/etrip.fot index c1c8210f47..7292604842 100644 --- a/source/texk/web2c/etexdir/etrip/etrip.fot +++ b/source/texk/web2c/etexdir/etrip/etrip.fot @@ -1,7 +1,7 @@ -This is e-TeX, Version 3.14159265-2.6 (TeX Live 2014) (preloaded format=etex) +This is e-TeX, Version 3.141592653-2.6 (TeX Live 2023) (preloaded format=etex) **entering extended mode (./etrip.tex e-IniTeX: e-Trip format loaded. -This is the e-Trip test [2014-01-22] for e-TeX v3.14159265-2.6. +This is the e-Trip test [2021-01-28] for e-TeX v3.141592653-2.6. (You are using e-TeX version/revision 2.6) Missing character: There is no c in font nullfont! @@ -43,5 +43,3 @@ current interactionmode (l.247): scroll current interactionmode (l.247): nonstop -\openout1 = `etrip.out'. - diff --git a/source/texk/web2c/etexdir/etrip/etrip.log b/source/texk/web2c/etexdir/etrip/etrip.log index b694b2ce46..9be8d974dc 100644 --- a/source/texk/web2c/etexdir/etrip/etrip.log +++ b/source/texk/web2c/etexdir/etrip/etrip.log @@ -1,8 +1,8 @@ -This is e-TeX, Version 3.14159265-2.6 (TeX Live 2014) (preloaded format=etrip 2014.1.22) 22 JAN 2014 11:25 +This is e-TeX, Version 3.141592653-2.6 (TeX Live 2023) (preloaded format=etrip 2023.1.22) 22 JAN 2023 11:25 entering extended mode **&etrip etrip (./etrip.tex e-IniTeX: e-Trip format loaded. -This is the e-Trip test [2014-01-22] for e-TeX v3.14159265-2.6. +This is the e-Trip test [2021-01-28] for e-TeX v3.141592653-2.6. (You are using e-TeX version/revision 2.6) Missing character: There is no b in font nullfont! @@ -689,9 +689,7 @@ Completed box being shipped out [1] .\write1{\unexpanded \expandafter {\1}} .\closeout1 -\openout1 = `etrip.out'. - -Memory usage before: 52&184; after: 36&178; still untouched: 1672 +Memory usage before: 52&185; after: 36&179; still untouched: 1671 (./etrip.out) ( Warning: end of semi simple group (level 3) entered at line 433 of a dif ferent file @@ -1423,7 +1421,7 @@ you left one out. Proceed, with fingers crossed. ### math mode entered at line 524 \mathord .\fam1 r -this will be denominator of: +this will begin denominator of: \fraction, thickness = default \\left"161361 \\mathord @@ -1447,7 +1445,7 @@ this will be denominator of: ### math mode entered at line 517 \mathord .\fam1 r -this will be denominator of: +this will begin denominator of: \fraction, thickness = default \\left"161361 \\mathord @@ -1494,7 +1492,7 @@ l.525 ... \over r\showlists ### math mode entered at line 517 \mathord .\fam1 r -this will be denominator of: +this will begin denominator of: \fraction, thickness = default \\left"161361 \\mathord @@ -1542,7 +1540,7 @@ l.526 ... \right]\showlists ../.\fam1 r ..\right"162362 .\right"162362 -this will be denominator of: +this will begin denominator of: \fraction, thickness = default \\left"161361 \\mathord @@ -2717,9 +2715,9 @@ since the result is out of range. Expr fraction rounding 3 OK [1] -Memory usage before: 53&322; after: 44&322; still untouched: 835 +Memory usage before: 53&323; after: 44&323; still untouched: 834 [1] -Memory usage before: 53&322; after: 44&322; still untouched: 835 +Memory usage before: 53&323; after: 44&323; still untouched: 834 Checking \mutoglue and \gluetomu: ! You can't use `\mutoglue' in vertical mode. l.905 \mutoglue @@ -4418,9 +4416,9 @@ Overfull \hbox (12.0pt too wide) in paragraph at lines 1256--1256 ) Here is how much of TeX's memory you used: - 19 strings out of 1809 - 145 string characters out of 7742 - 3164 words of memory out of 3999 + 19 strings out of 1808 + 145 string characters out of 7702 + 3165 words of memory out of 3999 409 multiletter control sequences out of 15000+0 3796 words of font info for 5 fonts, out of 20000 for 75 10 hyphenation exceptions out of 659 diff --git a/source/texk/web2c/etexdir/etrip/etrip.typ b/source/texk/web2c/etexdir/etrip/etrip.typ index 1d6d871682..c2acaaf3bf 100644 --- a/source/texk/web2c/etexdir/etrip/etrip.typ +++ b/source/texk/web2c/etexdir/etrip/etrip.typ @@ -1,4 +1,4 @@ -This is DVItype, Version 3.6 (TeX Live 2014) +This is DVItype, Version 3.6 (TeX Live 2023) Options selected: Starting page = *.*.*.*.*.*.*.*.*.* Maximum number of pages = 1000000 @@ -6,7 +6,7 @@ Options selected: Resolution = 72.27000000 pixels per inch numerator/denominator=25400000/473628672 magnification=1000; 0.00001526 pixels per DVI unit -' TeX output 2014.01.22:1125' +' TeX output 2023.01.22:1125' 42: beginning of page 1.0.0.0.0.0.0.0.0.0 87: eop diff --git a/source/texk/web2c/etexdir/etrip/etripin.log b/source/texk/web2c/etexdir/etrip/etripin.log index af805ca4c6..9fa35b916e 100644 --- a/source/texk/web2c/etexdir/etrip/etripin.log +++ b/source/texk/web2c/etexdir/etrip/etripin.log @@ -1,8 +1,8 @@ -This is e-TeX, Version 3.14159265-2.6 (TeX Live 2014) (INITEX) 22 JAN 2014 11:25 +This is e-TeX, Version 3.141592653-2.6 (TeX Live 2023) (INITEX) 22 JAN 2023 11:25 entering extended mode ***etrip (./etrip.tex -This is the e-Trip test [2014-01-22] for e-TeX v3.14159265-2.6. +This is the e-Trip test [2021-01-28] for e-TeX v3.141592653-2.6. (You are using e-TeX version/revision 2.6) e-IniTeX: Assigning category codes, tracing switches, other codes, definitions for e-VirTeX e-Trip test run, constants and registers, @@ -23,9 +23,9 @@ Proceed; I'll ignore the character I just read. enable e-TeX enhancements (TeXXeT), prepare saved items (not to be dumped), everyjob ...dumped. ) Beginning to dump on file etrip.fmt - (preloaded format=etrip 2014.1.22) -1491 strings of total length 26258 -281 memory locations dumped; current usage is 36&167 + (preloaded format=etrip 2023.1.22) +1492 strings of total length 26298 +282 memory locations dumped; current usage is 36&168 408 multiletter control sequences \font\nullfont=nullfont \font\trip=etrip diff --git a/source/texk/web2c/etexdir/etriptest.test b/source/texk/web2c/etexdir/etriptest.test index 588f38b7e7..5b8807003e 100755 --- a/source/texk/web2c/etexdir/etriptest.test +++ b/source/texk/web2c/etexdir/etriptest.test @@ -1,5 +1,6 @@ #! /bin/sh -vx # $Id$ +# Copyright 2023 Japanese TeX Development Community # Copyright 2017 Karl Berry # Copyright 2009-2014 Peter Breitenlohner # You may freely use, modify and/or distribute this file. @@ -19,6 +20,57 @@ TEXMFCNF=$etestdir; export TEXMFCNF rm -rf etripdir mkdir etripdir cd etripdir +mkdir -p a b + +# TeX Live generic +cat >filter <<-\_EOF + /^\*\* \&trip trip/d + /^\*\*entering extended mode/d + s,^(trip\.tex ##,**(./trip.tex ##, + s,^## (\./trip\.tex,**(./trip.tex ##, + s/ (TeX Live 20[^)]*)// + s/ (Web2C 202[3-9])// + s/(preloaded format=.*tex)/(INITEX)/ + s/format=trip [^)][^)]*)/format=trip)/ + s/) [0-9A-Z: ]*$/)/ + s,^(\./,(, + s/[1-9][0-9]* strings out of [1-9].*/XX strings out of YYY/ + s/[1-9][0-9]* string characters out of [1-9].*/XXX string characters out of YYYY/ + s/sequences out of [1-9].*/sequences out of YYYY/ + s/[1-9] hyphenation exceptions* out of [1-9].*/X hyphenation exceptions out of YYY/ + s/[1-9][0-9]* strings of total length [1-9].*/XXXX strings of total length YYYYY/ + s/9 ops out of [1-9][0-9]*/9 ops out of YYY/ + s/TeX output ....\...\...:..../TeX output YYYY.MM.DD:hhmm/ + _EOF + +# x86 glue rounding +cat >>filter <<-\_EOF + s/ 16341\.999.*fil/ 16342.0fil/ + s/ 16238\.999.*fil/ 16239.0fil/ + s/ 16317\.999.*fil/ 16318.0fil/ + s/ 16330\.999.*fil/ 16331.0fil/ + s/ 16331\.999.*fil/ 16332.0fil/ + s/ 16343\.999.*fil/ 16344.0fil/ + s/ 9737\.587..fil/ 9737.58789fil/ + s/down4 639342.../down4 639342208/ + s/y4 2039217../y4 203921760/ + s/y0 2039217../y0 203921760/ + _EOF + +# eTeX +cat >>filter <<-\_EOF + s/This is .*TeX,/This is *TeX,/ + s/ Version 3\.141592653[^(]*(/ Version 3.141592653* (/ + s/ before: [1-9][0-9][0-9][0-9]*&[1-9][0-9][0-9][0-9]*; / before: XXX\&YYY; / + s/ after: [1-9][0-9][0-9][0-9]*&[1-9][0-9][0-9][0-9]*; / after: XXX\&YYY; / + s/ still untouched: [1-9][0-9][0-9][0-9]*/ still untouched: XXX/ + _EOF +cat >filter1 <<-\_EOF + :l + N + $!b l + s/ inside a group at level 1).*bottom level/ inside a group at level 1)/ + _EOF dvitype_args="-output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'" @@ -51,7 +103,7 @@ diff $testdir/tripin.log ctripin.log # May as well test non-ini second time through. $_etex --progname=etex <$testdir/trip2.in >ctrip.fot mv trip.log ctrip.log -diff $testdir/trip.fot ctrip.fot +#diff $testdir/trip.fot ctrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. @@ -61,7 +113,13 @@ mv tripos.tex ctripos.tex diff $testdir/tripos.tex ctripos.tex eval $_dvitype $dvitype_args trip.dvi >ctrip.typ || exit 1 -$DIFF $DIFFFLAGS $testdir/trip.typ ctrip.typ +#$DIFF $DIFFFLAGS $testdir/trip.typ ctrip.typ + +for f in trip.fot trip.typ; do + sed -f filter $testdir/$f >a/$f + sed -f filter c$f >b/$f + diff a/$f b/$f || is_OK=false +done mv trip.fmt ctrip.fmt @@ -80,7 +138,7 @@ diff ctripin.log xtripin.log # May as well test non-ini second time through. $_etex --progname=etex <$etestdir/trip2.in >xtrip.fot mv trip.log xtrip.log -diff ctrip.fot xtrip.fot +#diff ctrip.fot xtrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. @@ -90,7 +148,13 @@ mv tripos.tex xtripos.tex diff $testdir/tripos.tex xtripos.tex eval $_dvitype $dvitype_args trip.dvi >xtrip.typ || exit 1 -$DIFF $DIFFFLAGS ctrip.typ xtrip.typ +#$DIFF $DIFFFLAGS ctrip.typ xtrip.typ + +for f in trip.fot trip.typ; do + sed -f filter c$f >a/x$f + sed -f filter x$f | sed -f filter1 >b/x$f + diff a/x$f b/x$f || is_OK=false +done mv trip.fmt xtrip.fmt @@ -117,7 +181,7 @@ diff $etestdir/etripin.log etripin.log # May as well test non-ini second time through. $_etex --progname=etex <$etestdir/etrip3.in >etrip.fot -diff $etestdir/etrip.fot etrip.fot +#diff $etestdir/etrip.fot etrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. @@ -126,7 +190,13 @@ $DIFF $DIFFFLAGS $etestdir/etrip.log etrip.log diff $etestdir/etrip.out etrip.out eval $_dvitype $dvitype_args etrip.dvi >etrip.typ || exit 1 -$DIFF $DIFFFLAGS $etestdir/etrip.typ etrip.typ +#$DIFF $DIFFFLAGS $etestdir/etrip.typ etrip.typ + +for f in trip.fot trip.typ; do + sed -f filter $etestdir/e$f >a/e$f + sed -f filter e$f >b/e$f + diff a/e$f b/e$f || is_OK=false +done $is_OK || { echo ">>> There were some errors." >&2 diff --git a/source/texk/web2c/euptexdir/ChangeLog b/source/texk/web2c/euptexdir/ChangeLog index 4b1b80a083..f3cfab811b 100644 --- a/source/texk/web2c/euptexdir/ChangeLog +++ b/source/texk/web2c/euptexdir/ChangeLog @@ -1,3 +1,17 @@ +2023-11-25 TANAKA Takuji + + * wcfname{,0}.test: Add tests for --recorder and *.fls. + https://github.com/texjporg/tex-jp-build/issues/45 + +2023-11-24 TANAKA Takuji + + * wcfname.test: Add test for file names with over-BMP + (4byte UTF-8). + https://tug.org/pipermail/tex-live/2023-November/049685.html + * eptriptest.test, euptriptest.test: + Check diffs of trip.{fot,typ} with ignoring trivial changes + in trip tests. + 2023-09-03 TANAKA Takuji * {eptriptest,euptriptest,eupver}.test: diff --git a/source/texk/web2c/euptexdir/eptriptest.test b/source/texk/web2c/euptexdir/eptriptest.test index e99513fdc3..a3416f0920 100755 --- a/source/texk/web2c/euptexdir/eptriptest.test +++ b/source/texk/web2c/euptexdir/eptriptest.test @@ -1,6 +1,6 @@ #! /bin/sh -vx # $Id$ -# Copyright 2022-2023 Japanese TeX Development Community +# Copyright 2023 Japanese TeX Development Community # Copyright 2017-2018 Karl Berry # Copyright 2011-2014 Peter Breitenlohner # Copyright 2010 Hironori Kitagawa @@ -24,6 +24,58 @@ TEXMFCNF=$eptestdir; export TEXMFCNF rm -rf eupptripdir mkdir eupptripdir cd eupptripdir +mkdir -p a b + +# TeX Live generic +cat >filter <<-\_EOF + /^\*\* \&trip trip/d + /^\*\*entering extended mode/d + s,^(trip\.tex ##,**(./trip.tex ##, + s,^## (\./trip\.tex,**(./trip.tex ##, + s/ (TeX Live 20[^)]*)// + s/ (Web2C 202[3-9])// + s/(preloaded format=.*tex)/(INITEX)/ + s/format=trip [^)][^)]*)/format=trip)/ + s/) [0-9A-Z: ]*$/)/ + s,^(\./,(, + s/[1-9][0-9]* strings out of [1-9].*/XX strings out of YYY/ + s/[1-9][0-9]* string characters out of [1-9].*/XXX string characters out of YYYY/ + s/sequences out of [1-9].*/sequences out of YYYY/ + s/[1-9] hyphenation exceptions* out of [1-9].*/X hyphenation exceptions out of YYY/ + s/[1-9][0-9]* strings of total length [1-9].*/XXXX strings of total length YYYYY/ + s/9 ops out of [1-9][0-9]*/9 ops out of YYY/ + s/TeX output ....\...\...:..../TeX output YYYY.MM.DD:hhmm/ + _EOF + +# x86 glue rounding +cat >>filter <<-\_EOF + s/ 16341\.999.*fil/ 16342.0fil/ + s/ 16238\.999.*fil/ 16239.0fil/ + s/ 16317\.999.*fil/ 16318.0fil/ + s/ 16330\.999.*fil/ 16331.0fil/ + s/ 16331\.999.*fil/ 16332.0fil/ + s/ 16343\.999.*fil/ 16344.0fil/ + s/ 9737\.587..fil/ 9737.58789fil/ + s/down4 639342.../down4 639342208/ + s/y4 2039217../y4 203921760/ + s/y0 2039217../y0 203921760/ + _EOF + +# epTeX +cat >>filter <<-\_EOF + s/This is .*TeX,/This is *TeX,/ + s/(utf8[^)]*) // + s/ Version 3\.141592653[^(]*(/ Version 3.141592653* (/ + s/ before: [1-9][0-9][0-9][0-9]*&[1-9][0-9][0-9][0-9]*; / before: XXX\&YYY; / + s/ after: [1-9][0-9][0-9][0-9]*&[1-9][0-9][0-9][0-9]*; / after: XXX\&YYY; / + s/ still untouched: [1-9][0-9][0-9][0-9]*/ still untouched: XXX/ + _EOF +cat >filter1 <<-\_EOF + :l + N + $!b l + s/ inside a group at level 1).*bottom level/ inside a group at level 1)/ + _EOF dvitype_args="-output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'" @@ -62,17 +114,23 @@ diff $testdir/tripin.log cptripin.log rm -f trip.log $_euptex --kanji-internal=euc --progname=eptex <$testdir/trip2.in >cptrip.fot sed "$P_SED1;$P_SED2" trip.log > cptrip.log -diff $testdir/trip.fot cptrip.fot +#diff $testdir/trip.fot cptrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. -$DIFF $DIFFFLAGS $testdir/trip.log cptrip.log +$DIFF $DIFFFLAGS $testdir/trip.log cptrip.log mv tripos.tex cptripos.tex diff $testdir/tripos.tex cptripos.tex eval $_dvitype $dvitype_args trip.dvi >cptrip.typ || exit 1 -$DIFF $DIFFFLAGS $testdir/trip.typ cptrip.typ +#$DIFF $DIFFFLAGS $testdir/trip.typ cptrip.typ + +for f in trip.fot trip.typ; do + sed -f filter $testdir/$f >a/$f + sed -f filter cp$f >b/$f + diff a/$f b/$f || is_OK=false +done mv trip.fmt ctrip.fmt @@ -93,17 +151,23 @@ diff $testdir/tripin.log xptripin.log rm -f trip.log $_euptex --kanji-internal=euc --progname=eptex <$etestdir/trip2.in >xptrip.fot sed "$P_SED1;$P_SED2" trip.log > xptrip.log -diff $testdir/trip.fot xptrip.fot +#diff $testdir/trip.fot xptrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. -$DIFF $DIFFFLAGS $testdir/trip.log xptrip.log +$DIFF $DIFFFLAGS $testdir/trip.log xptrip.log mv tripos.tex xptripos.tex diff $testdir/tripos.tex xptripos.tex eval $_dvitype $dvitype_args trip.dvi >xptrip.typ || exit 1 -$DIFF $DIFFFLAGS $testdir/trip.typ xptrip.typ +#$DIFF $DIFFFLAGS $testdir/trip.typ xptrip.typ + +for f in trip.fot trip.typ; do + sed -f filter $testdir/$f >a/x$f + sed -f filter xp$f | sed -f filter1 >b/x$f + diff a/x$f b/x$f || is_OK=false +done mv trip.fmt xtrip.fmt @@ -131,7 +195,7 @@ diff $etestdir/etripin.log eptripin.log # May as well test non-ini second time through. $_euptex --kanji-internal=euc --progname=eptex <$etestdir/etrip3.in >eptrip.fot sed "$P_SED1;$P_SED2" etrip.log > eptrip.log -diff $etestdir/etrip.fot eptrip.fot +#diff $etestdir/etrip.fot eptrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. @@ -141,7 +205,13 @@ mv etrip.out eptrip.out diff $etestdir/etrip.out eptrip.out eval $_dvitype $dvitype_args etrip.dvi >eptrip.typ || exit 1 -$DIFF $DIFFFLAGS $etestdir/etrip.typ eptrip.typ +#$DIFF $DIFFFLAGS $etestdir/etrip.typ eptrip.typ + +for f in trip.fot trip.typ; do + sed -f filter $etestdir/e$f >a/e$f + sed -f filter ep$f >b/e$f + diff a/e$f b/e$f || is_OK=false +done $is_OK || { echo ">>> There were some errors." >&2 diff --git a/source/texk/web2c/euptexdir/euptriptest.test b/source/texk/web2c/euptexdir/euptriptest.test index 848f6bb425..d6a1239ded 100755 --- a/source/texk/web2c/euptexdir/euptriptest.test +++ b/source/texk/web2c/euptexdir/euptriptest.test @@ -1,5 +1,6 @@ #! /bin/sh -vx # $Id$ +# Copyright 2023 Japanese TeX Development Community # Copyright 2017-2018 Karl Berry # Copyright 2011-2014 Peter Breitenlohner # Copyright 2010 Hironori Kitagawa @@ -24,6 +25,58 @@ TEXMFCNF=$euptestdir; export TEXMFCNF rm -rf euptripdir mkdir euptripdir cd euptripdir +mkdir -p a b + +# TeX Live generic +cat >filter <<-\_EOF + /^\*\* \&trip trip/d + /^\*\*entering extended mode/d + s,^(trip\.tex ##,**(./trip.tex ##, + s,^## (\./trip\.tex,**(./trip.tex ##, + s/ (TeX Live 20[^)]*)// + s/ (Web2C 202[3-9])// + s/(preloaded format=.*tex)/(INITEX)/ + s/format=trip [^)][^)]*)/format=trip)/ + s/) [0-9A-Z: ]*$/)/ + s,^(\./,(, + s/[1-9][0-9]* strings out of [1-9].*/XX strings out of YYY/ + s/[1-9][0-9]* string characters out of [1-9].*/XXX string characters out of YYYY/ + s/sequences out of [1-9].*/sequences out of YYYY/ + s/[1-9] hyphenation exceptions* out of [1-9].*/X hyphenation exceptions out of YYY/ + s/[1-9][0-9]* strings of total length [1-9].*/XXXX strings of total length YYYYY/ + s/9 ops out of [1-9][0-9]*/9 ops out of YYY/ + s/TeX output ....\...\...:..../TeX output YYYY.MM.DD:hhmm/ + _EOF + +# x86 glue rounding +cat >>filter <<-\_EOF + s/ 16341\.999.*fil/ 16342.0fil/ + s/ 16238\.999.*fil/ 16239.0fil/ + s/ 16317\.999.*fil/ 16318.0fil/ + s/ 16330\.999.*fil/ 16331.0fil/ + s/ 16331\.999.*fil/ 16332.0fil/ + s/ 16343\.999.*fil/ 16344.0fil/ + s/ 9737\.587..fil/ 9737.58789fil/ + s/down4 639342.../down4 639342208/ + s/y4 2039217../y4 203921760/ + s/y0 2039217../y0 203921760/ + _EOF + +# epTeX +cat >>filter <<-\_EOF + s/This is .*TeX,/This is *TeX,/ + s/(utf8[^)]*) // + s/ Version 3\.141592653[^(]*(/ Version 3.141592653* (/ + s/ before: [1-9][0-9][0-9][0-9]*&[1-9][0-9][0-9][0-9]*; / before: XXX\&YYY; / + s/ after: [1-9][0-9][0-9][0-9]*&[1-9][0-9][0-9][0-9]*; / after: XXX\&YYY; / + s/ still untouched: [1-9][0-9][0-9][0-9]*/ still untouched: XXX/ + _EOF +cat >filter1 <<-\_EOF + :l + N + $!b l + s/ inside a group at level 1).*bottom level/ inside a group at level 1)/ + _EOF dvitype_args="-output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'" @@ -62,17 +115,23 @@ diff $testdir/tripin.log cuptripin.log rm -f trip.log $_euptex --progname=euptex <$testdir/trip2.in >cuptrip.fot sed "$P_SED1;$P_SED2" trip.log > cuptrip.log -diff $testdir/trip.fot cuptrip.fot +#diff $testdir/trip.fot cuptrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. -$DIFF $DIFFFLAGS $testdir/trip.log cuptrip.log +$DIFF $DIFFFLAGS $testdir/trip.log cuptrip.log mv tripos.tex cuptripos.tex diff $testdir/tripos.tex cuptripos.tex eval $_dvitype $dvitype_args trip.dvi >cuptrip.typ || exit 1 -$DIFF $DIFFFLAGS $testdir/trip.typ cuptrip.typ +#$DIFF $DIFFFLAGS $testdir/trip.typ cuptrip.typ + +for f in trip.fot trip.typ; do + sed -f filter $testdir/$f >a/$f + sed -f filter cup$f >b/$f + diff a/$f b/$f || is_OK=false +done mv trip.fmt ctrip.fmt @@ -93,17 +152,23 @@ diff $testdir/tripin.log xuptripin.log rm -f trip.log $_euptex --progname=euptex <$etestdir/trip2.in >xuptrip.fot sed "$P_SED1;$P_SED2" trip.log > xuptrip.log -diff $testdir/trip.fot xuptrip.fot +#diff $testdir/trip.fot xuptrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. -$DIFF $DIFFFLAGS $testdir/trip.log xuptrip.log +$DIFF $DIFFFLAGS $testdir/trip.log xuptrip.log mv tripos.tex xuptripos.tex diff $testdir/tripos.tex xuptripos.tex eval $_dvitype $dvitype_args trip.dvi >xuptrip.typ || exit 1 -$DIFF $DIFFFLAGS $testdir/trip.typ xuptrip.typ +#$DIFF $DIFFFLAGS $testdir/trip.typ xuptrip.typ + +for f in trip.fot trip.typ; do + sed -f filter $testdir/$f >a/x$f + sed -f filter xup$f | sed -f filter1 >b/x$f + diff a/x$f b/x$f || is_OK=false +done mv trip.fmt xtrip.fmt @@ -131,7 +196,7 @@ diff $etestdir/etripin.log euptripin.log # May as well test non-ini second time through. $_euptex --progname=euptex <$etestdir/etrip3.in >euptrip.fot sed "$P_SED1;$P_SED2" etrip.log > euptrip.log -diff $etestdir/etrip.fot euptrip.fot +#diff $etestdir/etrip.fot euptrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. @@ -141,7 +206,13 @@ mv etrip.out euptrip.out diff $etestdir/etrip.out euptrip.out eval $_dvitype $dvitype_args etrip.dvi >euptrip.typ || exit 1 -$DIFF $DIFFFLAGS $etestdir/etrip.typ euptrip.typ +#$DIFF $DIFFFLAGS $etestdir/etrip.typ euptrip.typ + +for f in trip.fot trip.typ; do + sed -f filter $etestdir/e$f >a/e$f + sed -f filter eup$f >b/e$f + diff a/e$f b/e$f || is_OK=false +done $is_OK || { echo ">>> There were some errors." >&2 diff --git a/source/texk/web2c/euptexdir/wcfname.test b/source/texk/web2c/euptexdir/wcfname.test index acfbddf0d3..f8c56d732f 100755 --- a/source/texk/web2c/euptexdir/wcfname.test +++ b/source/texk/web2c/euptexdir/wcfname.test @@ -65,9 +65,9 @@ fi # upTeX internal encoding fenc="utf8" for ienc in uptex; do -for doc in fn-$fenc fnさざ波-$fenc fn£¥µÆÇñß-$fenc; do +for doc in fn-$fenc fnさざ波-$fenc fn£¥µÆÇñß-$fenc fnΔДदダ打다𝕯🎉-$fenc; do - if [ $ienc != uptex -a $doc = fn£¥µÆÇñß-$fenc ]; then + if [ $ienc != uptex -a \( $doc = fn£¥µÆÇñß-$fenc -o $doc = fnΔДदダ打다𝕯🎉$fenc \) ]; then continue fi @@ -84,11 +84,11 @@ for doc in fn-$fenc fnさざ波-$fenc fn£¥µÆÇñß-$fenc; do echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc $_kpsewhich -progname=$engine $doc.tex || rc=10 $_kpsewhich -progname=$engine fn±×÷§¶-utf8.tex || rc=11 - $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ + $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape --recorder $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ { rc=1 ; err1=$err1" $fenc:$ienc:$doc" ; } $_kpsewhich -progname=$engine $doc-tmp.tex || rc=12 $_kpsewhich -progname=$engine fn±×÷§¶-utf8-tmp.tex || rc=13 - mv $doc-$ienc.txt $doc-$ienc.log $testdir/ + mv $doc-$ienc.txt $doc-$ienc.log $doc-$ienc.fls $testdir/ || rc=14 diff $testdir/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || \ { rc=2 ; err2=$err2" $fenc:$ienc:$doc" ; } diff --git a/source/texk/web2c/euptexdir/wcfname0.test b/source/texk/web2c/euptexdir/wcfname0.test index 9aaa3d9157..e6199b0c8d 100755 --- a/source/texk/web2c/euptexdir/wcfname0.test +++ b/source/texk/web2c/euptexdir/wcfname0.test @@ -77,11 +77,12 @@ for doc in fn-$fenc fnさざ波-$fenc; do echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc $_kpsewhich -progname=$engine $doc.tex || rc=10 $_kpsewhich -progname=$engine fn±×÷§¶-utf8.tex || rc=11 - $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ + $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape --recorder $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ { rc=1 ; err1=$err1" $fenc:$ienc:$doc" ; } $_kpsewhich -progname=$engine $doc-tmp.tex || rc=12 $_kpsewhich -progname=$engine fn±×÷§¶-utf8-tmp.tex || rc=13 - mv $doc-$ienc.txt $doc-$ienc.log $testdir/ + mv $doc-$ienc.txt $doc-$ienc.log $testdir/ || rc=14 + mv $doc-$ienc.fls $testdir/ || : echo "FIXME" # check *.fls diff $testdir/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || \ { rc=2 ; err2=$err2" $fenc:$ienc:$doc" ; } rm -f $testdir/fn±×÷§¶-utf8-tmp.tex @@ -113,11 +114,12 @@ for doc in fnさざ波-$fenc; do echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc $_kpsewhich -progname=$engine $doc.tex || rc=20 $_kpsewhich -progname=$engine fn±×÷§¶-utf8.tex || rc=21 - $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ + $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape --recorder $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ { rc=3 ; err3=$err3" $fenc:$ienc:$doc" ; } $_kpsewhich -progname=$engine $doc-tmp.tex || rc=22 $_kpsewhich -progname=$engine fn±×÷§¶-utf8-tmp.tex || rc=23 - mv $doc-$ienc.txt $doc-$ienc.log $testdir/ + mv $doc-$ienc.txt $doc-$ienc.log $testdir/ || rc=24 + mv $doc-$ienc.fls $testdir/ || : echo "FIXME" # check *.fls diff $testdir/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || \ { rc=4 ; err4=$err4" $fenc:$ienc:$doc" ; } diff --git a/source/texk/web2c/mf.ch b/source/texk/web2c/mf.ch index 4b13cacb44..af7a1ca1e9 100644 --- a/source/texk/web2c/mf.ch +++ b/source/texk/web2c/mf.ch @@ -1854,12 +1854,19 @@ mem:=xmalloc_array (memory_word, mem_max - mem_min + 1); @z @x [48.1195] l.22714 - Check that p did not become corrupt. +p:=q+node_size(q); if (p>lo_mem_max)or((q>=rlink(q))and(rlink(q)<>rover)) then goto off_base; @y {If the base file is messed up, that addition to |p| might cause it to become garbage. Report from Gregory James DUCK to Karl, 14 Sep 2023. - Found with a fuzz tester similar to AFL-fuzz. Also changed in \TeX.} -if (plo_mem_max)or((q>=rlink(q))and(rlink(q)<>rover)) then goto off_base; + Also changed in \MF. Fix from DRF, who explains: we test before doing the + addition to avoid assuming silent wrap-around overflow, and also to to + catch cases where |node_size| was, say, bogusly the equivalent of $-1$ + and thus |p+node_size| would still look valid.} +if (node_size(q)>lo_mem_max-q) or (rlink(q)>lo_mem_max) + or ((q>=rlink(q))and(rlink(q)<>rover)) +then goto off_base; +p:=q+node_size(q); @z @x [48.1199] l.22750 - Allow command line to override dumped value. diff --git a/source/texk/web2c/ptexdir/ChangeLog b/source/texk/web2c/ptexdir/ChangeLog index 890d153de6..ffd56a55c8 100644 --- a/source/texk/web2c/ptexdir/ChangeLog +++ b/source/texk/web2c/ptexdir/ChangeLog @@ -1,3 +1,14 @@ +2023-11-25 TANAKA Takuji + + * wcfname.test: Add tests for --recorder and *.fls. + https://github.com/texjporg/tex-jp-build/issues/45 + +2023-11-24 TANAKA Takuji + + * ptriptest.test: + Check diffs of trip.{fot,typ} with ignoring trivial changes + in trip tests. + 2023-09-17 Hironobu Yamashita * ptex-base.ch: Support more than 256 different glue/kern. diff --git a/source/texk/web2c/ptexdir/ptriptest.test b/source/texk/web2c/ptexdir/ptriptest.test index 35099794b3..330e5d4388 100755 --- a/source/texk/web2c/ptexdir/ptriptest.test +++ b/source/texk/web2c/ptexdir/ptriptest.test @@ -1,5 +1,6 @@ #! /bin/sh -vx # $Id$ +# Copyright 2023 Japanese TeX Development Community # Copyright 2017-2018 Karl Berry # Copyright 2010-2014 Peter Breitenlohner # You may freely use, modify and/or distribute this file. @@ -21,6 +22,50 @@ TEXMFCNF=$ptestdir; export TEXMFCNF rm -rf ptripdir mkdir ptripdir cd ptripdir +mkdir -p a b + +# TeX Live generic +cat >filter <<-\_EOF + s,^\*\*(\./trip\.tex ##,** \&trip trip \ + (trip.tex ##, + s/ (TeX Live 20[^)]*)// + s/ (Web2C 202[3-9])// + s/(preloaded format=.*tex)/(INITEX)/ + s/format=trip [^)][^)]*)/format=trip)/ + s/) [0-9A-Z: ]*$/)/ + s,^(\./,(, + s/[1-9][0-9]* strings out of [1-9].*/XX strings out of YYY/ + s/[1-9][0-9]* string characters out of [1-9].*/XXX string characters out of YYYY/ + s/sequences out of [1-9].*/sequences out of YYYY/ + s/[1-9] hyphenation exceptions* out of [1-9].*/X hyphenation exceptions out of YYY/ + s/[1-9][0-9]* strings of total length [1-9].*/XXXX strings of total length YYYYY/ + s/9 ops out of [1-9][0-9]*/9 ops out of YYY/ + s/TeX output ....\...\...:..../TeX output YYYY.MM.DD:hhmm/ + _EOF + +# x86 glue rounding +cat >>filter <<-\_EOF + s/ 16341\.999.*fil/ 16342.0fil/ + s/ 16238\.999.*fil/ 16239.0fil/ + s/ 16317\.999.*fil/ 16318.0fil/ + s/ 16330\.999.*fil/ 16331.0fil/ + s/ 16331\.999.*fil/ 16332.0fil/ + s/ 16343\.999.*fil/ 16344.0fil/ + s/ 9737\.587..fil/ 9737.58789fil/ + s/down4 639342.../down4 639342208/ + s/y4 2039217../y4 203921760/ + s/y0 2039217../y0 203921760/ + _EOF + +# pTeX +cat >>filter <<-\_EOF + s/This is .*TeX,/This is *TeX,/ + s/ (utf8[^)]*)/ / + s/ Version 3\.141592653-[^ ]* / Version 3.141592653/ + s/ before: [1-9][0-9][0-9][0-9]*&[1-9][0-9][0-9][0-9]*; / before: XXX\&YYY; / + s/ after: [1-9][0-9][0-9][0-9]*&[1-9][0-9][0-9][0-9]*; / after: XXX\&YYY; / + s/ still untouched: [1-9][0-9][0-9][0-9]*/ still untouched: XXX/ + _EOF dvitype_args="-output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'" @@ -53,23 +98,29 @@ if test ! -s trip.fmt; then exit 1 fi sed "$P_SED1" trip.log > ptripin.log || exit 1 -diff $testdir/tripin.log ptripin.log +$DIFF $testdir/tripin.log ptripin.log # May as well test non-ini second time through. rm -f trip.log $_ptex --progname=ptex <$testdir/trip2.in >ptrip.fot sed "$P_SED1;$P_SED2" trip.log > ptrip.log -diff $testdir/trip.fot ptrip.fot +#diff $testdir/trip.fot ptrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. -$DIFF $DIFFFLAGS $testdir/trip.log ptrip.log +$DIFF $DIFFFLAGS $testdir/trip.log ptrip.log mv tripos.tex ptripos.tex diff $testdir/tripos.tex ptripos.tex || is_OK=false eval $_dvitype $dvitype_args trip.dvi >ptrip.typ || exit 1 -$DIFF $DIFFFLAGS $testdir/trip.typ ptrip.typ +#$DIFF $DIFFFLAGS $testdir/trip.typ ptrip.typ + +for f in trip.fot trip.typ; do + sed -f filter $testdir/$f >a/$f + sed -f filter p$f >b/$f + diff a/$f b/$f || is_OK=false +done $is_OK || { echo ">>> There were some errors." >&2 diff --git a/source/texk/web2c/ptexdir/wcfname.test b/source/texk/web2c/ptexdir/wcfname.test index e53866f61d..f20a66a75b 100755 --- a/source/texk/web2c/ptexdir/wcfname.test +++ b/source/texk/web2c/ptexdir/wcfname.test @@ -72,11 +72,12 @@ for doc in fn-$fenc fnさざ波-$fenc; do echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc $_kpsewhich -progname=$engine $doc.tex || rc=10 $_kpsewhich -progname=$engine fn±×÷§¶-utf8.tex || rc=11 - $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ + $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape --recorder $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ { rc=1 ; err1=$err1" $fenc:$ienc:$doc" ; } $_kpsewhich -progname=$engine $doc-tmp.tex || rc=12 $_kpsewhich -progname=$engine fn±×÷§¶-utf8-tmp.tex || rc=13 - mv $doc-$ienc.txt $doc-$ienc.log $testdir/ + mv $doc-$ienc.txt $doc-$ienc.log $testdir/ || rc=14 + mv $doc-$ienc.fls $testdir/ || : echo "FIXME" # check *.fls diff $testdir/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || \ { rc=2 ; err2=$err2" $fenc:$ienc:$doc" ; } rm -f $testdir/fn±×÷§¶-utf8-tmp.tex @@ -104,11 +105,12 @@ for doc in fnさざ波-$fenc; do echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc $_kpsewhich -progname=$engine $doc.tex || rc=20 $_kpsewhich -progname=$engine fn±×÷§¶-utf8.tex || rc=21 - $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ + $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape --recorder $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ { rc=3 ; err3=$err3" $fenc:$ienc:$doc" ; } $_kpsewhich -progname=$engine $doc-tmp.tex || rc=22 $_kpsewhich -progname=$engine fn±×÷§¶-utf8-tmp.tex || rc=23 - mv $doc-$ienc.txt $doc-$ienc.log $testdir/ + mv $doc-$ienc.txt $doc-$ienc.log $testdir/ || rc=24 + mv $doc-$ienc.fls $testdir/ || : echo "FIXME" # check *.fls diff $testdir/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || \ { rc=4 ; err4=$err4" $fenc:$ienc:$doc" ; } diff --git a/source/texk/web2c/ptexdir/zfmtcompress.test b/source/texk/web2c/ptexdir/zfmtcompress.test index 35733a5d4c..31b67dce06 100755 --- a/source/texk/web2c/ptexdir/zfmtcompress.test +++ b/source/texk/web2c/ptexdir/zfmtcompress.test @@ -47,7 +47,7 @@ test0() { rm -f stress-$ENGINE.fmt test0.dvi test0.xdv &>/dev/null $_engine -ini -etex -progname=$ENGINE -jobname=stress-$ENGINE stress &>/dev/null ls -l stress-$ENGINE.fmt - if [[ $ENGINE = "xetex" ]]; then + if [[ "$ENGINE" = "xetex" ]]; then $_engine -fmt=./stress-$ENGINE.fmt -no-pdf test0.tex &>/dev/null ls -l test0.xdv else @@ -86,7 +86,7 @@ test1() { rm -f latex-$ENGINE.fmt test1.dvi test1.xdv &>/dev/null $_engine -ini -etex -progname=latex-dev -jobname=latex-$ENGINE latex.ini &>/dev/null ls -l latex-$ENGINE.fmt - if [[ $ENGINE = "xetex" ]]; then + if [[ "$ENGINE" = "xetex" ]]; then $_engine -fmt=./latex-$ENGINE.fmt -no-pdf test1.tex &>/dev/null ls -l test1.xdv else diff --git a/source/texk/web2c/tests/fn-generate.perl b/source/texk/web2c/tests/fn-generate.perl index b08cc1b345..11829c66da 100755 --- a/source/texk/web2c/tests/fn-generate.perl +++ b/source/texk/web2c/tests/fn-generate.perl @@ -81,6 +81,7 @@ END UTF-8 fn±×÷§¶-utf8.tex UTF-8 fn-utf8.tex fn±×÷§¶-utf8.tex UTF-8 fn£¥µÆÇñß-utf8.tex fn±×÷§¶-utf8.tex +UTF-8 fnΔДदダ打다𝕯🎉-utf8.tex fn±×÷§¶-utf8.tex UTF-8 fnさざ波-utf8.tex fn±×÷§¶-utf8.tex EUC-JP fnさざ波-euc.tex fn±×÷§¶-utf8.tex Shift_JIS fnさざ波-sjis.tex fn±×÷§¶-utf8.tex diff --git a/source/texk/web2c/tex.ch b/source/texk/web2c/tex.ch index 51307bf7c7..3243105730 100644 --- a/source/texk/web2c/tex.ch +++ b/source/texk/web2c/tex.ch @@ -3654,12 +3654,19 @@ repeat undump_things(mem[p], q+2-p); @z @x [50.1312] l.23955 - Check that p did not become corrupt. +p:=q+node_size(q); if (p>lo_mem_max)or((q>=rlink(q))and(rlink(q)<>rover)) then goto bad_fmt; @y {If the format file is messed up, that addition to |p| might cause it to become garbage. Report from Gregory James DUCK to Karl, 14 Sep 2023. - Found with a fuzz tester similar to AFL-fuzz. Also changed in \MF.} -if (plo_mem_max)or((q>=rlink(q))and(rlink(q)<>rover)) then goto bad_fmt; + Also changed in \MF. Fix from DRF, who explains: we test before doing the + addition to avoid assuming silent wrap-around overflow, and also to to + catch cases where |node_size| was, say, bogusly the equivalent of $-1$ + and thus |p+node_size| would still look valid.} +if (node_size(q)>lo_mem_max-q) or (rlink(q)>lo_mem_max) + or ((q>=rlink(q))and(rlink(q)<>rover)) +then goto bad_fmt; +p:=q+node_size(q); @z @x [50.1312] l.23878 - Make dumping/undumping more efficient. diff --git a/source/texk/web2c/uptexdir/ChangeLog b/source/texk/web2c/uptexdir/ChangeLog index ee6bbf40c0..18d98a8809 100644 --- a/source/texk/web2c/uptexdir/ChangeLog +++ b/source/texk/web2c/uptexdir/ChangeLog @@ -1,3 +1,18 @@ +2023-11-25 TANAKA Takuji + + * wcfname{,0}.test: Add tests for --recorder and *.fls. + https://github.com/texjporg/tex-jp-build/issues/45 + +2023-11-24 TANAKA Takuji + + * wcfname.test: Add test for file names with over-BMP + (4byte UTF-8). + https://tug.org/pipermail/tex-live/2023-November/049685.html + * ptriptest.test, uptriptest.test: + Check diffs of trip.{fot,typ} with ignoring trivial changes + in trip tests. + * gkhuge.test: Update test for Windows. + 2023-09-21 Hironobu Yamashita * uptex-m.ch: Clean up changes on 2023-09-03. diff --git a/source/texk/web2c/uptexdir/gkhuge.test b/source/texk/web2c/uptexdir/gkhuge.test index b3d8cdc3e6..e8fe12c3de 100755 --- a/source/texk/web2c/uptexdir/gkhuge.test +++ b/source/texk/web2c/uptexdir/gkhuge.test @@ -13,6 +13,14 @@ test -d uptests || mkdir -p uptests TEXMFCNF=$srcdir/../kpathsea export TEXMFCNF +DIFF="diff" +# pre-generated test results in the repository are stored in LF +# but the output might be written in CRLF on some platform. +# if 'diff --strip-trailing-cr' is available, exploit it. +# (useful for tests on win32 binaries run on MSYS shell) +$DIFF --strip-trailing-cr $0 $0 \ + && DIFF="diff --strip-trailing-cr" || echo + # Test inputs testdir=$srcdir/uptexdir/tests @@ -37,7 +45,7 @@ for font in gkhugeng; do # web2c/pltotf.ch change 2017-09-10, due to overflow $_uptftopl $testdir/$font.tfm uptests/y$font.pl \ 2>uptests/y$font.err && exit 1 || echo - diff $testdir/$font.err uptests/y$font.err && echo || exit 2 + $DIFF $testdir/$font.err uptests/y$font.err && echo || exit 2 done diff --git a/source/texk/web2c/uptexdir/ptriptest.test b/source/texk/web2c/uptexdir/ptriptest.test index aef48daa3e..37d1bd5d29 100755 --- a/source/texk/web2c/uptexdir/ptriptest.test +++ b/source/texk/web2c/uptexdir/ptriptest.test @@ -1,6 +1,6 @@ #! /bin/sh -vx # $Id$ -# Copyright 2022-2023 Japanese TeX Development Community +# Copyright 2023 Japanese TeX Development Community # Copyright 2017-2018 Karl Berry # Copyright 2010-2014 Peter Breitenlohner # You may freely use, modify and/or distribute this file. @@ -22,6 +22,50 @@ TEXMFCNF=$ptestdir; export TEXMFCNF rm -rf upptripdir mkdir upptripdir cd upptripdir +mkdir -p a b + +# TeX Live generic +cat >filter <<-\_EOF + s,^\*\*(\./trip\.tex ##,** \&trip trip \ + (trip.tex ##, + s/ (TeX Live 20[^)]*)// + s/ (Web2C 202[3-9])// + s/(preloaded format=.*tex)/(INITEX)/ + s/format=trip [^)][^)]*)/format=trip)/ + s/) [0-9A-Z: ]*$/)/ + s,^(\./,(, + s/[1-9][0-9]* strings out of [1-9].*/XX strings out of YYY/ + s/[1-9][0-9]* string characters out of [1-9].*/XXX string characters out of YYYY/ + s/sequences out of [1-9].*/sequences out of YYYY/ + s/[1-9] hyphenation exceptions* out of [1-9].*/X hyphenation exceptions out of YYY/ + s/[1-9][0-9]* strings of total length [1-9].*/XXXX strings of total length YYYYY/ + s/9 ops out of [1-9][0-9]*/9 ops out of YYY/ + s/TeX output ....\...\...:..../TeX output YYYY.MM.DD:hhmm/ + _EOF + +# x86 glue rounding +cat >>filter <<-\_EOF + s/ 16341\.999.*fil/ 16342.0fil/ + s/ 16238\.999.*fil/ 16239.0fil/ + s/ 16317\.999.*fil/ 16318.0fil/ + s/ 16330\.999.*fil/ 16331.0fil/ + s/ 16331\.999.*fil/ 16332.0fil/ + s/ 16343\.999.*fil/ 16344.0fil/ + s/ 9737\.587..fil/ 9737.58789fil/ + s/down4 639342.../down4 639342208/ + s/y4 2039217../y4 203921760/ + s/y0 2039217../y0 203921760/ + _EOF + +# pTeX +cat >>filter <<-\_EOF + s/This is .*TeX,/This is *TeX,/ + s/ (utf8[^)]*)/ / + s/ Version 3\.141592653-[^ ]* / Version 3.141592653/ + s/ before: [1-9][0-9][0-9][0-9]*&[1-9][0-9][0-9][0-9]*; / before: XXX\&YYY; / + s/ after: [1-9][0-9][0-9][0-9]*&[1-9][0-9][0-9][0-9]*; / after: XXX\&YYY; / + s/ still untouched: [1-9][0-9][0-9][0-9]*/ still untouched: XXX/ + _EOF dvitype_args="-output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'" @@ -54,13 +98,13 @@ if test ! -s trip.fmt; then exit 1 fi sed "$P_SED1" trip.log > ptripin.log || exit 1 -diff $testdir/tripin.log ptripin.log +$DIFF $testdir/tripin.log ptripin.log # May as well test non-ini second time through. rm -f trip.log $_uptex --kanji-internal=euc --progname=ptex <$testdir/trip2.in >ptrip.fot sed "$P_SED1;$P_SED2" trip.log > ptrip.log -diff $testdir/trip.fot ptrip.fot +#diff $testdir/trip.fot ptrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. @@ -70,7 +114,13 @@ mv tripos.tex ptripos.tex diff $testdir/tripos.tex ptripos.tex || is_OK=false eval $_dvitype $dvitype_args trip.dvi >ptrip.typ || exit 1 -$DIFF $DIFFFLAGS $testdir/trip.typ ptrip.typ +#$DIFF $DIFFFLAGS $testdir/trip.typ ptrip.typ + +for f in trip.fot trip.typ; do + sed -f filter $testdir/$f >a/$f + sed -f filter p$f >b/$f + diff a/$f b/$f || is_OK=false +done $is_OK || { echo ">>> There were some errors." >&2 diff --git a/source/texk/web2c/uptexdir/uptriptest.test b/source/texk/web2c/uptexdir/uptriptest.test index 85055eb40c..0b2af38552 100755 --- a/source/texk/web2c/uptexdir/uptriptest.test +++ b/source/texk/web2c/uptexdir/uptriptest.test @@ -1,5 +1,6 @@ #! /bin/sh -vx # $Id$ +# Copyright 2023 Japanese TeX Development Community # Copyright 2017-2018 Karl Berry # Copyright 2011-2014 Peter Breitenlohner # You may freely use, modify and/or distribute this file. @@ -21,6 +22,50 @@ TEXMFCNF=$uptestdir; export TEXMFCNF rm -rf uptripdir mkdir uptripdir cd uptripdir +mkdir -p a b + +# TeX Live generic +cat >filter <<-\_EOF + s,^\*\*(\./trip\.tex ##,** \&trip trip \ + (trip.tex ##, + s/ (TeX Live 20[^)]*)// + s/ (Web2C 202[3-9])// + s/(preloaded format=.*tex)/(INITEX)/ + s/format=trip [^)][^)]*)/format=trip)/ + s/) [0-9A-Z: ]*$/)/ + s,^(\./,(, + s/[1-9][0-9]* strings out of [1-9].*/XX strings out of YYY/ + s/[1-9][0-9]* string characters out of [1-9].*/XXX string characters out of YYYY/ + s/sequences out of [1-9].*/sequences out of YYYY/ + s/[1-9] hyphenation exceptions* out of [1-9].*/X hyphenation exceptions out of YYY/ + s/[1-9][0-9]* strings of total length [1-9].*/XXXX strings of total length YYYYY/ + s/9 ops out of [1-9][0-9]*/9 ops out of YYY/ + s/TeX output ....\...\...:..../TeX output YYYY.MM.DD:hhmm/ + _EOF + +# x86 glue rounding +cat >>filter <<-\_EOF + s/ 16341\.999.*fil/ 16342.0fil/ + s/ 16238\.999.*fil/ 16239.0fil/ + s/ 16317\.999.*fil/ 16318.0fil/ + s/ 16330\.999.*fil/ 16331.0fil/ + s/ 16331\.999.*fil/ 16332.0fil/ + s/ 16343\.999.*fil/ 16344.0fil/ + s/ 9737\.587..fil/ 9737.58789fil/ + s/down4 639342.../down4 639342208/ + s/y4 2039217../y4 203921760/ + s/y0 2039217../y0 203921760/ + _EOF + +# pTeX +cat >>filter <<-\_EOF + s/This is .*TeX,/This is *TeX,/ + s/ (utf8[^)]*)/ / + s/ Version 3\.141592653-[^ ]* / Version 3.141592653/ + s/ before: [1-9][0-9][0-9][0-9]*&[1-9][0-9][0-9][0-9]*; / before: XXX\&YYY; / + s/ after: [1-9][0-9][0-9][0-9]*&[1-9][0-9][0-9][0-9]*; / after: XXX\&YYY; / + s/ still untouched: [1-9][0-9][0-9][0-9]*/ still untouched: XXX/ + _EOF dvitype_args="-output-level=2 -dpi=72.27 -page-start='*.*.*.*.*.*.*.*.*.*'" @@ -53,23 +98,29 @@ if test ! -s trip.fmt; then exit 1 fi sed "$P_SED1" trip.log > uptripin.log || exit 1 -diff $testdir/tripin.log uptripin.log +$DIFF $testdir/tripin.log uptripin.log # May as well test non-ini second time through. rm -f trip.log $_uptex --progname=uptex <$testdir/trip2.in >uptrip.fot sed "$P_SED1;$P_SED2" trip.log > uptrip.log -diff $testdir/trip.fot uptrip.fot +#diff $testdir/trip.fot uptrip.fot # We use $DIFF instead of `diff' only for those files where there # might actually be legitimate numerical differences. -$DIFF $DIFFFLAGS $testdir/trip.log uptrip.log +$DIFF $DIFFFLAGS $testdir/trip.log uptrip.log mv tripos.tex uptripos.tex diff $testdir/tripos.tex uptripos.tex || is_OK=false eval $_dvitype $dvitype_args trip.dvi >uptrip.typ || exit 1 -$DIFF $DIFFFLAGS $testdir/trip.typ uptrip.typ +#$DIFF $DIFFFLAGS $testdir/trip.typ uptrip.typ + +for f in trip.fot trip.typ; do + sed -f filter $testdir/$f >a/$f + sed -f filter up$f >b/$f + diff a/$f b/$f || is_OK=false +done $is_OK || { echo ">>> There were some errors." >&2 diff --git a/source/texk/web2c/uptexdir/wcfname.test b/source/texk/web2c/uptexdir/wcfname.test index f02c876ce5..c0bf2a2c26 100755 --- a/source/texk/web2c/uptexdir/wcfname.test +++ b/source/texk/web2c/uptexdir/wcfname.test @@ -65,9 +65,9 @@ fi # upTeX internal encoding fenc="utf8" for ienc in uptex; do -for doc in fn-$fenc fnさざ波-$fenc fn£¥µÆÇñß-$fenc; do +for doc in fn-$fenc fnさざ波-$fenc fn£¥µÆÇñß-$fenc fnΔДदダ打다𝕯🎉-$fenc; do - if [ $ienc != uptex -a $doc = fn£¥µÆÇñß-$fenc ]; then + if [ $ienc != uptex -a \( $doc = fn£¥µÆÇñß-$fenc -o $doc = fnΔДदダ打다𝕯🎉-$fenc \) ]; then continue fi @@ -84,11 +84,11 @@ for doc in fn-$fenc fnさざ波-$fenc fn£¥µÆÇñß-$fenc; do echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc $_kpsewhich -progname=$engine $doc.tex || rc=10 $_kpsewhich -progname=$engine fn±×÷§¶-utf8.tex || rc=11 - $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ + $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape --recorder $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ { rc=1 ; err1=$err1" $fenc:$ienc:$doc" ; } $_kpsewhich -progname=$engine $doc-tmp.tex || rc=12 $_kpsewhich -progname=$engine fn±×÷§¶-utf8-tmp.tex || rc=13 - mv $doc-$ienc.txt $doc-$ienc.log $testdir/ + mv $doc-$ienc.txt $doc-$ienc.log $doc-$ienc.fls $testdir/ || rc=14 diff $testdir/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || \ { rc=2 ; err2=$err2" $fenc:$ienc:$doc" ; } diff --git a/source/texk/web2c/uptexdir/wcfname0.test b/source/texk/web2c/uptexdir/wcfname0.test index bc67f869db..3ee99ce45d 100755 --- a/source/texk/web2c/uptexdir/wcfname0.test +++ b/source/texk/web2c/uptexdir/wcfname0.test @@ -77,11 +77,12 @@ for doc in fn-$fenc fnさざ波-$fenc; do echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc $_kpsewhich -progname=$engine $doc.tex || rc=10 $_kpsewhich -progname=$engine fn±×÷§¶-utf8.tex || rc=11 - $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ + $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape --recorder $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ { rc=1 ; err1=$err1" $fenc:$ienc:$doc" ; } $_kpsewhich -progname=$engine $doc-tmp.tex || rc=12 $_kpsewhich -progname=$engine fn±×÷§¶-utf8-tmp.tex || rc=13 - mv $doc-$ienc.txt $doc-$ienc.log $testdir/ + mv $doc-$ienc.txt $doc-$ienc.log $testdir/ || rc=14 + mv $doc-$ienc.fls $testdir/ || : echo "FIXME" # check *.fls diff $testdir/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || \ { rc=2 ; err2=$err2" $fenc:$ienc:$doc" ; } rm -f $testdir/fn±×÷§¶-utf8-tmp.tex @@ -113,11 +114,11 @@ for doc in fnさざ波-$fenc; do echo '>>> Document:'$doc ' File Encoding:'$fenc ' Internal Encoding:'$ienc $_kpsewhich -progname=$engine $doc.tex || rc=20 $_kpsewhich -progname=$engine fn±×÷§¶-utf8.tex || rc=21 - $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ + $_tex -ini -interaction nonstopmode -jobname=$doc-$ienc -kanji=$fenc --kanji-internal=$ienc --shell-escape --recorder $doc.tex >$testdir/$doc-$fenc-$ienc-term.log || \ { rc=3 ; err3=$err3" $fenc:$ienc:$doc" ; } $_kpsewhich -progname=$engine $doc-tmp.tex || rc=22 $_kpsewhich -progname=$engine fn±×÷§¶-utf8-tmp.tex || rc=23 - mv $doc-$ienc.txt $doc-$ienc.log $testdir/ + mv $doc-$ienc.txt $doc-$ienc.log $doc-$ienc.fls $testdir/ || : echo "FIXME" # check *.fls diff $testdir/$doc-$ienc.txt $srcdir/tests/fn-$fenc.txt || \ { rc=4 ; err4=$err4" $fenc:$ienc:$doc" ; }