diff options
author | Karl Berry <karl@freefriends.org> | 2010-03-31 00:04:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-03-31 00:04:47 +0000 |
commit | 3ab55a61f6f8d2218a8f3175bc7481ce162b60d3 (patch) | |
tree | f606e0c2117a8058213441400e50ba25400ba94a /Master/texmf-dist/tex/latex/expl3/l3precom.sty | |
parent | 035ea73193af75f6ade46e306603e61d82b24950 (diff) |
expl3 1881 (30mar10)
git-svn-id: svn://tug.org/texlive/trunk@17631 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/expl3/l3precom.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/expl3/l3precom.sty | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/l3precom.sty b/Master/texmf-dist/tex/latex/expl3/l3precom.sty index 7beb5d43c72..61cfe7c2a07 100644 --- a/Master/texmf-dist/tex/latex/expl3/l3precom.sty +++ b/Master/texmf-dist/tex/latex/expl3/l3precom.sty @@ -48,16 +48,12 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3precom.dtx 1453 2009-08-08 14:38:49Z joseph $ +\GetIdInfo$Id: l3precom.dtx 1793 2010-02-09 20:36:19Z joseph $ {L3 Experimental precompilation module} \ProvidesExplPackage {\filename}{\filedate}{\fileversion}{\filedescription} -\RequirePackage{l3num} -\RequirePackage{l3io} -\RequirePackage{l3seq} -\RequirePackage{l3int} -\iow_new:N\c_cs_dump_stream -\tl_new:Nn\g_cs_dump_name_tl{} +\package_check_loaded_expl: +\tl_new:N \g_cs_dump_name_tl \seq_new:N\g_cs_dump_seq \cs_new_nopar:Npn\cs_record_name:N#1{ \seq_gput_left:Nn @@ -67,8 +63,8 @@ \cs_generate_variant:Nn \cs_record_name:N {c} \cs_new_nopar:Npn\cs_dump:{ \iow_term:x{Precompiling~style~into~(\g_cs_dump_name_tl)} -\iow_open:Nn\c_cs_dump_stream{\g_cs_dump_name_tl} -\iow_now:Nx\c_cs_dump_stream +\iow_open:Nn\g_cs_dump_stream{\g_cs_dump_name_tl} +\iow_now:Nx\g_cs_dump_stream {\group_begin: \tex_catcode:D`\token_to_str:N\*=11\scan_stop: \token_to_str:N\ExplSyntaxOn @@ -76,19 +72,19 @@ \seq_map_inline:Nn \g_cs_dump_seq {\tex_message:D{.} -\iow_now:Nx\c_cs_dump_stream +\iow_now:Nx\g_cs_dump_stream {\exp_not:n{\cs_gset_nopar:Npn ##1} {\tl_to_str:N##1}} } -\iow_now:Nx \c_cs_dump_stream {\exp_not:n{\num_gset:Nn - \g_gen_sym_num} - {\num_use:N\g_gen_sym_num}^^J -\exp_not:n{\num_gset:Nn \g_ggen_sym_num} - {\num_use:N\g_ggen_sym_num}} +\iow_now:Nx \g_cs_dump_stream {\exp_not:n{\int_gset:Nn + \g_gen_sym_int} + {\int_use:N\g_gen_sym_int}^^J +\exp_not:n{\int_gset:Nn \g_ggen_sym_int} + {\int_use:N\g_ggen_sym_int}} \iow_now:Nx -\c_cs_dump_stream +\g_cs_dump_stream {\group_end:} -\iow_close:N\c_cs_dump_stream +\iow_close:N\g_cs_dump_stream \tex_message:D{~finished} } \cs_new_nopar:Npn \cs_load_dump:n #1 { @@ -100,16 +96,16 @@ \tl_gset:Nn \g_cs_dump_name_tl { #1 .cmp } } } -\num_new:N\g_gen_sym_num \num_gset:Nn\g_gen_sym_num{0} -\num_new:N\g_ggen_sym_num \num_gset:Nn\g_ggen_sym_num{0} +\int_new:N\g_gen_sym_int \int_gset:Nn\g_gen_sym_int{0} +\int_new:N\g_ggen_sym_int \int_gset:Nn\g_ggen_sym_int{0} \cs_new_nopar:Npn\cs_gen_sym:N#1{ -\num_gincr:N\g_gen_sym_num -\tl_set:Nc#1{l*\tex_romannumeral:D\num_use:N\g_gen_sym_num} +\int_gincr:N\g_gen_sym_num +\tl_set:Nc#1{l*\tex_romannumeral:D\int_use:N\g_gen_sym_int} \exp_after:wN\cs_record_name:N#1 \exp_after:wN\tl_clear_new:N#1} \cs_new_nopar:Npn\cs_ggen_sym:N#1{ -\num_gincr:N\g_ggen_sym_num -\tl_set:Nc#1{g*\tex_romannumeral:D\num_use:N\g_ggen_sym_num} +\int_gincr:N\g_ggen_sym_int +\tl_set:Nc#1{g*\tex_romannumeral:D\int_use:N\g_ggen_sym_int} \exp_after:wN\cs_record_name:N#1 \exp_after:wN\tl_clear_new:N#1} \seq_new:N\g_cs_trace_seq @@ -122,11 +118,11 @@ \g_register_trace_seq#1} \cs_new_nopar:Npn\dumpLaTeXstate#1{ \iow_term:x{Dumping~commands~into~(#1.dmp)} - \iow_open:Nn\c_cs_dump_stream{#1.dmp} + \iow_open:Nn\g_cs_dump_stream{#1.dmp} \seq_map_inline:Nn \g_cs_trace_seq {\tex_message:D{.} - \iow_now:Nx\c_cs_dump_stream + \iow_now:Nx\g_cs_dump_stream {\token_to_str:N##1~ \token_to_meaning:N##1} } @@ -134,10 +130,11 @@ \seq_map_inline:Nn \g_register_trace_seq {\tex_message:D{.} - \iow_now:Nx\c_cs_dump_stream + \iow_now:Nx\g_cs_dump_stream {\token_to_str:N##1 \toks_use:N##1} } + \iow_clos:Nn \g_cs_dump_stream \tex_message:D{~finished} } %% |