[latex3-commits] [l3svn] branch master updated: Correct and extend range checks for \char_generate:nn
noreply at latex-project.org
noreply at latex-project.org
Wed Sep 9 23:43:12 CEST 2015
This is an automated email from the git hooks/post-receive script.
joseph pushed a commit to branch master
in repository l3svn.
The following commit(s) were added to refs/heads/master by this push:
new ce73d76 Correct and extend range checks for \char_generate:nn
ce73d76 is described below
commit ce73d7688f0122ed8e68c7a68dc3360186b56d45
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Sep 9 22:42:25 2015 +0100
Correct and extend range checks for \char_generate:nn
---
l3kernel/l3candidates.dtx | 20 +++++---
l3kernel/testfiles/m3char001.xetex.tlg | 88 +++++++++++++++++++++++---------
2 files changed, 78 insertions(+), 30 deletions(-)
diff --git a/l3kernel/l3candidates.dtx b/l3kernel/l3candidates.dtx
index 3def846..f312878 100644
--- a/l3kernel/l3candidates.dtx
+++ b/l3kernel/l3candidates.dtx
@@ -4428,14 +4428,22 @@
\cs_new:Npn \@@_generate_auxii:nn #1#2
{
\if_int_compare:w 0
- \if_int_compare:w #1 < \c_one 1 \fi:
- \if_int_compare:w #1 = \c_five 1 \fi:
- \if_int_compare:w #1 = \c_nine 1 \fi:
- \if_int_compare:w #1 > \c_thirteen 1 \fi:
- > \c_one
+ \if_int_compare:w #2 < \c_one 1 \fi:
+ \if_int_compare:w #2 = \c_five 1 \fi:
+ \if_int_compare:w #2 = \c_nine 1 \fi:
+ \if_int_compare:w #2 > \c_thirteen 1 \fi:
+ > \c_zero
\@@_generate_invalid_catcode:
\else:
- \@@_generate_auxiii:nn {#1} {#2}
+ \if_int_compare:w 0
+ \if_int_compare:w #1 < \c_zero 1 \fi:
+ \if_int_compare:w #1 > 1114111 ~ 1 \fi:
+ > \c_one
+ \__msg_kernel_expandable_error:nn { kernel }
+ { char-out-of-range }
+ \else:
+ \@@_generate_auxiii:nn {#1} {#2}
+ \fi:
\fi:
}
\cs_if_exist:NTF \luatex_directlua:D
diff --git a/l3kernel/testfiles/m3char001.xetex.tlg b/l3kernel/testfiles/m3char001.xetex.tlg
index e13ea27..0c3a6c6 100644
--- a/l3kernel/testfiles/m3char001.xetex.tlg
+++ b/l3kernel/testfiles/m3char001.xetex.tlg
@@ -332,22 +332,42 @@ TEST 4: Errors
l. ... }
A Unicode scalar value must be between 0 and "10FFFF.
I changed this one to zero.
-! Invalid code (-1), should be in the ranges 1..4, 6..8, 10..12.
-\__char_generate_auxiii:nn ...tex_charcat:D #1 #2
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+Invalid catcode for char generation.
l. ... }
-I'm going to use 12 instead of that illegal code value.
-! Invalid code (0), should be in the ranges 1..4, 6..8, 10..12.
-\__char_generate_auxiii:nn ...tex_charcat:D #1 #2
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+Invalid catcode for char generation.
l. ... }
-I'm going to use 12 instead of that illegal code value.
-! Invalid code (5), should be in the ranges 1..4, 6..8, 10..12.
-\__char_generate_auxiii:nn ...tex_charcat:D #1 #2
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+Invalid catcode for char generation.
l. ... }
-I'm going to use 12 instead of that illegal code value.
-! Invalid code (9), should be in the ranges 1..4, 6..8, 10..12.
-\__char_generate_auxiii:nn ...tex_charcat:D #1 #2
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+Invalid catcode for char generation.
l. ... }
-I'm going to use 12 instead of that illegal code value.
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> \LaTeX3 error:
Cannot generate space chars.
@@ -366,22 +386,42 @@ of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
-! Invalid code (14), should be in the ranges 1..4, 6..8, 10..12.
-\__char_generate_auxiii:nn ...tex_charcat:D #1 #2
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+Invalid catcode for char generation.
l. ... }
-I'm going to use 12 instead of that illegal code value.
-! Invalid code (15), should be in the ranges 1..4, 6..8, 10..12.
-\__char_generate_auxiii:nn ...tex_charcat:D #1 #2
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+Invalid catcode for char generation.
l. ... }
-I'm going to use 12 instead of that illegal code value.
-! Invalid code (16), should be in the ranges 1..4, 6..8, 10..12.
-\__char_generate_auxiii:nn ...tex_charcat:D #1 #2
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+Invalid catcode for char generation.
l. ... }
-I'm going to use 12 instead of that illegal code value.
-! Invalid code (18), should be in the ranges 1..4, 6..8, 10..12.
-\__char_generate_auxiii:nn ...tex_charcat:D #1 #2
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+! Undefined control sequence.
+<argument> \LaTeX3 error:
+Invalid catcode for char generation.
l. ... }
-I'm going to use 12 instead of that illegal code value.
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
! Undefined control sequence.
<argument> \LaTeX3 error:
Cannot generate null char as a space.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list