summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3unicode-data.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-07-24 21:33:14 +0000
committerKarl Berry <karl@freefriends.org>2015-07-24 21:33:14 +0000
commit4659d41ea5da1bb6a6cde1a4d1cdabd339c6a053 (patch)
tree67f5f637dae41d69727f3c018a3ac832ccf16c02 /Master/texmf-dist/source/latex/l3kernel/l3unicode-data.dtx
parent45753dabbb93091efcea2a70996bcbdc51a39761 (diff)
l3
git-svn-id: svn://tug.org/texlive/trunk@37947 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3unicode-data.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3unicode-data.dtx78
1 files changed, 72 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3unicode-data.dtx b/Master/texmf-dist/source/latex/l3kernel/l3unicode-data.dtx
index 72eb1029080..9f3e03cf38f 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3unicode-data.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3unicode-data.dtx
@@ -38,7 +38,7 @@
% plain \TeX{}, set up in generic mode.
%<*driver|script>
\input expl3-generic\relax
-\GetIdInfo$Id: l3unicode-data.dtx 5544 2015-03-01 18:30:00Z joseph $
+\GetIdInfo$Id: l3unicode-data.dtx 5647 2015-07-01 12:44:26Z joseph $
{L3 Case data script}
%</driver|script>
%
@@ -270,9 +270,75 @@
%% generated using the script l3unicode-data.dtx.
%%
%% The data here are derived from the files
-%% - UnicodeData.txt
-%% - SpecialCasing.txt
-%% - CaseFolding.txt
+\__unicode_verb_end:
+% \end{macrocode}
+% \begin{macro}{\__unicode_parse_line:w}
+% \begin{macro}[aux]{\__unicode_parse_line_auxi:w}
+% Extract version information from the source files so this is
+% recorded. The main Unicode databse file doesn't have a header
+% but the other files do.
+% \begin{macrocode}
+\use:x
+ {
+ \cs_new_protected:Npn
+ \exp_not:N \__unicode_parse_line:w ##1 - ##2 \tl_to_str:n { .txt }
+ }
+ #3 \scan_stop: #4
+ {
+ \tl_if_empty:nF {#2}
+ {
+ \ior_get_str:NN \g__unicode_data_ior \l__unicode_tmp_tl
+ \exp_after:wN \__unicode_parse_line_auxi:w
+ \l__unicode_tmp_tl \scan_stop:
+ \iow_now:Nx \g__unicode_result_iow
+ {
+ \iow_char:N \%
+ \iow_char:N \%
+ \c_space_tl \c_space_tl \c_space_tl
+ Version ~ #2 ~ dated \l__unicode_tmp_tl
+ }
+ }
+ }
+\group_begin:
+\char_set_lccode:nn { `\* } { `\: }
+\tex_lowercase:D
+ {
+ \group_end:
+ \cs_new_protected:Npn \__unicode_parse_line_auxi:w #1 *
+ }
+ ~ #2 , ~ #3 ~ #4 \scan_stop:
+ { \tl_set:Nn \l__unicode_tmp_tl { #2 , ~ #3 } }
+\clist_map_inline:nn
+ { UnicodeData , SpecialCasing , CaseFolding }
+ {
+ \ior_open:Nn \g__unicode_data_ior { #1 .txt }
+ \ior_if_eof:NTF \g__unicode_data_ior
+ { \__msg_kernel_error:nnn { unicode } { file-not-found } {#1} }
+ {
+ \iow_now:Nx \g__unicode_result_iow
+ {
+ \iow_char:N \%
+ \iow_char:N \%
+ \c_space_tl
+ - ~ #1 .txt
+ }
+ \ior_get_str:NN \g__unicode_data_ior \l__unicode_tmp_tl
+ \tl_set:Nx \l__unicode_tmp_tl
+ {
+ \l__unicode_tmp_tl
+ \tl_to_str:n { - .txt }
+ }
+ \exp_after:wN \__unicode_parse_line:w
+ \l__unicode_tmp_tl \scan_stop: {#1}
+ \ior_close:N \g__unicode_data_ior
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% Finish off this part of the header.
+% \begin{macrocode}
+\__unicode_verb:
%% which are maintained by the Unicode Consortium.
%%
\__unicode_verb_end:
@@ -411,7 +477,7 @@
% and |#6| (details about the code point which may include the fact it's a
% compatibility char).
% \begin{macrocode}
-\cs_new_protected:Npn \__unicode_parse_line:w
+\cs_set_protected:Npn \__unicode_parse_line:w
#1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ; #8 ; #9 ;
{
\__unicode_parse_line_auxi:w #1 ; #6 ;
@@ -432,7 +498,7 @@
% later parts of the code do not need to be concerned with string
% \emph{versus} standard category codes.
% \begin{macrocode}
-\cs_new_protected:Npn \__unicode_parse_line_auxi:w
+\cs_set_protected:Npn \__unicode_parse_line_auxi:w
#1 ; #2 ; #3 ; #4 ; #5 ; #6 ; #7 ; #8 \q_stop
{
\use:x