diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty | 46 |
1 files changed, 18 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty index bedffef50f0..d7554d39c69 100644 --- a/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty +++ b/Master/texmf-dist/tex/latex/l3experimental/l3str/l3str-convert.sty @@ -46,24 +46,14 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{expl3} -\GetIdInfo$Id: l3str-convert.dtx 6443 2016-03-24 10:59:09Z joseph $ +\GetIdInfo$Id: l3str-convert.dtx 6699 2016-09-07 16:03:15Z bruno $ {L3 Experimental string encoding conversions} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} \RequirePackage{l3tl-analysis,l3tl-build,l3flag} \cs_if_exist:NF \use_ii_i:nn { \cs_new:Npn \use_ii_i:nn #1#2 { #2 #1 } } -\int_const:Nn \c_max_char_int - { - \bool_if:nTF - { - \sys_if_engine_luatex_p: || - \sys_if_engine_xetex_p: - } - { "10FFFF } - { "FF } - } -\cs_new_protected_nopar:Npn \__str_tmp:w { } +\cs_new_protected:Npn \__str_tmp:w { } \tl_new:N \l__str_internal_tl \int_new:N \l__str_internal_int \tl_new:N \g__str_result_tl @@ -140,7 +130,7 @@ \fi: \__str_if_contains_char_aux:NN #1 } -\cs_new_nopar:Npn \__str_if_contains_char_true: +\cs_new:Npn \__str_if_contains_char_true: { \__prg_break:n { \prg_return_true: \use_none:n } } \prg_new_conditional:Npnn \__str_octal_use:N #1 { TF } { @@ -185,7 +175,7 @@ \tl_const:cn { c__str_byte_-1_tl } { { } \use_none:n { } } \cs_new:Npn \__str_output_byte:n #1 { \__str_output_byte:w #1 \__str_output_end: } -\cs_new_nopar:Npn \__str_output_byte:w +\cs_new:Npn \__str_output_byte:w { \exp_after:wN \exp_after:wN \exp_after:wN \use_i:nnn @@ -193,13 +183,13 @@ } \cs_new:Npn \__str_output_hexadecimal:n #1 { \__str_output_hexadecimal:w #1 \__str_output_end: } -\cs_new_nopar:Npn \__str_output_hexadecimal:w +\cs_new:Npn \__str_output_hexadecimal:w { \exp_after:wN \exp_after:wN \exp_after:wN \use_none:n \cs:w c__str_byte_ \__int_value:w \__int_eval:w } -\cs_new_nopar:Npn \__str_output_end: +\cs_new:Npn \__str_output_end: { \__int_eval_end: _tl \cs_end: } \cs_new:Npn \__str_output_byte_pair_be:n #1 { @@ -259,9 +249,9 @@ { \flag_if_raised:nT {#1} { \bool_gset_true:N \g__str_error_bool } } \cs_new:Npn \__str_if_flag_times:nT #1#2 { \flag_if_raised:nT {#1} { #2~(x \flag_height:n {#1} ) } } -\cs_new_protected_nopar:Npn \str_set_convert:Nnnn +\cs_new_protected:Npn \str_set_convert:Nnnn { \__str_convert:nNNnnn { } \tl_set_eq:NN } -\cs_new_protected_nopar:Npn \str_gset_convert:Nnnn +\cs_new_protected:Npn \str_gset_convert:Nnnn { \__str_convert:nNNnnn { } \tl_gset_eq:NN } \prg_new_protected_conditional:Npnn \str_set_convert:Nnnn #1#2#3#4 { T , F , TF } @@ -429,7 +419,7 @@ \sys_if_engine_xetex_p: } { - \cs_new_protected_nopar:Npn \__str_convert_unescape_: + \cs_new_protected:Npn \__str_convert_unescape_: { \flag_clear:n { str_byte } \tl_gset:Nx \g__str_result_tl @@ -437,11 +427,11 @@ \__str_if_flag_error:nnx { str_byte } { non-byte } { bytes } } } - { \cs_new_protected_nopar:Npn \__str_convert_unescape_: { } } + { \cs_new_protected:Npn \__str_convert_unescape_: { } } \cs_new_eq:NN \__str_convert_unescape_bytes: \__str_convert_unescape_: -\cs_new_protected_nopar:Npn \__str_convert_escape_: { } +\cs_new_protected:Npn \__str_convert_escape_: { } \cs_new_eq:NN \__str_convert_escape_bytes: \__str_convert_escape_: -\cs_new_protected_nopar:Npn \__str_convert_decode_: +\cs_new_protected:Npn \__str_convert_decode_: { \__str_convert_gmap:N \__str_decode_native_char:N } \cs_new:Npn \__str_decode_native_char:N #1 { #1 \s__tl \__int_value:w `#1 \s__tl } @@ -453,7 +443,7 @@ \sys_if_engine_xetex_p: } { - \cs_new_protected_nopar:Npn \__str_convert_encode_: + \cs_new_protected:Npn \__str_convert_encode_: { \__tl_gbuild_x:Nw \g__str_result_tl \exp_after:wN \__str_encode_native_loop:w @@ -470,7 +460,7 @@ } } { - \cs_new_protected_nopar:Npn \__str_convert_encode_: + \cs_new_protected:Npn \__str_convert_encode_: { \flag_clear:n { str_error } \__str_convert_gmap_internal:N \__str_encode_native_char:n @@ -495,7 +485,7 @@ } } \group_end: -\cs_new_protected_nopar:Npn \__str_convert_decode_clist: +\cs_new_protected:Npn \__str_convert_decode_clist: { \clist_set:No \g__str_result_tl \g__str_result_tl \tl_gset:Nx \g__str_result_tl @@ -506,7 +496,7 @@ } \cs_new:Npn \__str_decode_clist_char:n #1 { #1 \s__tl \int_eval:n {#1} \s__tl } -\cs_new_protected_nopar:Npn \__str_convert_encode_clist: +\cs_new_protected:Npn \__str_convert_encode_clist: { \__str_convert_gmap_internal:N \__str_encode_clist_char:n \tl_gset:Nx \g__str_result_tl { \tl_tail:N \g__str_result_tl } @@ -515,9 +505,9 @@ \cs_new_protected:Npn \__str_declare_eight_bit_encoding:nnn #1#2#3 { \tl_set:Nn \l__str_internal_tl {#1} - \cs_new_protected_nopar:cpn { __str_convert_decode_#1: } + \cs_new_protected:cpn { __str_convert_decode_#1: } { \__str_convert_decode_eight_bit:n {#1} } - \cs_new_protected_nopar:cpn { __str_convert_encode_#1: } + \cs_new_protected:cpn { __str_convert_encode_#1: } { \__str_convert_encode_eight_bit:n {#1} } \tl_const:cn { c__str_encoding_#1_tl } {#2} \tl_const:cn { c__str_encoding_#1_missing_tl } {#3} |