summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorMartin Ruckert <martin.ruckert@hm.edu>2023-08-11 15:14:48 +0000
committerMartin Ruckert <martin.ruckert@hm.edu>2023-08-11 15:14:48 +0000
commit673c73e2e15ed3913707bf24f18ca92857efc8ed (patch)
tree80570ed95c34eb696c0c4624197faa84391a2371 /Build
parent312568e4a550d6a982c70c80ea52b17194f59af9 (diff)
HINT moving hitex to use prote version 1.1
git-svn-id: svn://tug.org/texlive/trunk@67886 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/hitexdir/doc/hiformat.hntbin1132958 -> 1133017 bytes
-rw-r--r--Build/source/texk/web2c/hitexdir/doc/hiformat.pdfbin1291824 -> 1291831 bytes
-rw-r--r--Build/source/texk/web2c/hitexdir/hiformat.w2
-rw-r--r--Build/source/texk/web2c/hitexdir/hitex.w35
4 files changed, 26 insertions, 11 deletions
diff --git a/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt b/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt
index 7484f9d38e8..b686d218668 100644
--- a/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt
+++ b/Build/source/texk/web2c/hitexdir/doc/hiformat.hnt
Binary files differ
diff --git a/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf b/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf
index 1e7b72b40d8..72860e605c3 100644
--- a/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf
+++ b/Build/source/texk/web2c/hitexdir/doc/hiformat.pdf
Binary files differ
diff --git a/Build/source/texk/web2c/hitexdir/hiformat.w b/Build/source/texk/web2c/hitexdir/hiformat.w
index 4bd116d2ff7..caec3416b05 100644
--- a/Build/source/texk/web2c/hitexdir/hiformat.w
+++ b/Build/source/texk/web2c/hitexdir/hiformat.w
@@ -156,7 +156,7 @@ ISBN-13: 979-854992684-4\par
First printing: August 2019\par
Second edition: August 2021\par
\medskip
-\def\lastrevision{Date: Thursday, May 4, 2023, 17:21:47}
+\def\lastrevision{Date: Fri Aug 11 14:56:12 2023}
\lastrevision\par
}
}
diff --git a/Build/source/texk/web2c/hitexdir/hitex.w b/Build/source/texk/web2c/hitexdir/hitex.w
index b5329937f88..2cc32d43907 100644
--- a/Build/source/texk/web2c/hitexdir/hitex.w
+++ b/Build/source/texk/web2c/hitexdir/hitex.w
@@ -81,10 +81,18 @@
% A reward of $327.68 will be paid to the first finder of any remaining bug.
-% This is a beta version of 1.0 of Prote, developed during August 2021,
-% and corrected during september/october 2021.
+% This is the 1.1 version of Prote, developed during August 2021,
+% and corrected during september/october 2021 and amended in august 2023
+% for file primitives behavior matching input behavior.
%
% 1.0: adds primitives needed by LaTeX as listed in ltnews31.
+% - 2022-07-21: tiddying formal fix: a spurious line was a left over
+% of a removed paragraph (pointed by Martin Ruckert). Suppressed.
+%
+% 1.1: 2023-08-01: the new file primitives are used in LaTeX expecting
+% the input behavior that ".tex" be appended if no extension. So
+% modified to provide this.
+%
% History towards 1.0 release:
% 0.99.4:
% - typos and style corrections provided by Martin Ruckert for
@@ -110,6 +118,8 @@
% xchg_buffer_length:=0 (caught by Martin Ruckert).
% 0.99.10:
% - KerTeX Public License -> X11/MIT license.
+% 1.0:
+% - Just naming the official release. No change.
%
% This work was done by Thierry Laronde and is under the MIT/X11
% license.
@@ -358,9 +368,9 @@ known as `\Prote'.
@#
@d eTeX_states 1 /*number of \eTeX\ state variables in |eqtb|*/
@#
-@d Prote_version_string "3.141592653-2.6-0.99.9" /*current \Prote\ version*/
-@d Prote_version 0 /* \.{\\Proteversion} */
-@d Prote_revision ".99.9" /* \.{\\Proterevision} */
+@d Prote_version_string "3.141592653-2.6-1.1.0" /*current \Prote\ version*/
+@d Prote_version 1 /* \.{\\Proteversion} */
+@d Prote_revision ".1.0" /* \.{\\Proterevision} */
@#
@d Prote_banner "This is Prote, Version " Prote_version_string
/*printed when \Prote\ starts*/
@@ -29150,9 +29160,14 @@ old_setting=selector;selector=new_string;
@*1 \Prote\ added strings routines.
The next procedure sets |name_of_file| from the string given as an
-argument. It silently truncates if the length of the string exceeds the
-size of the name buffer and doesn't use |cur_area| and |cur_ext|: it
-takes the string as is and the string is not flushed.
+argument, mimicking the |input| primitive by adding an |.tex| extension
+if there is none. It silently truncates if the length of the string
+exceeds the size of the name buffer and doesn't use |cur_area| and
+|cur_ext|, but |name_length| is set to the real name length (without
+truncating) so a test about |k <= file_name_size| allows to detect the
+impossibility of opening the file without having to call external code.
+The string is not flushed: it is the responsability of the code calling
+the procedure to flush it if wanted.
@<Declare \Prote\ procedures for strings@>=
static void str_to_name(str_number @!s)
@@ -29587,6 +29602,7 @@ returned.
@<Cases of `Scan the argument for command |c|'@>=
case file_size_code: {@+scan_general_x_text();toks_to_str();
s=info(garbage);flush_list(link(garbage));str_to_name(s);
+ cur_val=-1; /*invalid value if error*/
cur_val=get_file_size();
flush_string;
} @+break;
@@ -29630,7 +29646,6 @@ If the length is $0$, nothing is printed.
case file_mod_date_code: for (k=0; time_str[k]!='\0'; k++)
print_char(time_str[k]);@+break;
-
@ The primitive \.{\\filedump} expands to the dump of the first
\.{length} bytes of the file, starting from \.{offset}. Offset and
length are optional integers given, in that order, introduced resp.
@@ -29750,7 +29765,7 @@ it, as a binary file.
@<Generate the MD5 hash for a file@>=
{@+str_to_name(s);
xchg_buffer_length=0; /*empty if file not opened*/
-if (b_open_in(&data_in)) {@+
+if ((name_length <= file_name_size)&&(b_open_in(&data_in))) {@+
mdfive_init;
r=false; /*reset it to indicate eof*/
while (!r)