diff options
author | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2018-01-21 03:48:06 +0000 |
---|---|---|
committer | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2018-01-21 03:48:06 +0000 |
commit | fa0ffd9d1a8e3b86577dd54956b457241ec574aa (patch) | |
tree | 7317222dd8f72114f8ccf6582259e48a6c5b5d36 /Build/source/texk/web2c/eptexdir | |
parent | 9fe3d1656ac8c1b2082509299124a030d8a55285 (diff) |
(e-)(u)pTeX: Add \ptexversion and co. (H. Kitagawa)
git-svn-id: svn://tug.org/texlive/trunk@46399 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/eptexdir')
-rw-r--r-- | Build/source/texk/web2c/eptexdir/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/eptexdir/eptex.ech | 37 | ||||
-rw-r--r-- | Build/source/texk/web2c/eptexdir/eptex_version.h | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/eptexdir/etex.ch0 | 24 | ||||
-rw-r--r-- | Build/source/texk/web2c/eptexdir/etex.ch1 | 32 | ||||
-rw-r--r-- | Build/source/texk/web2c/eptexdir/pdfutils.ch | 8 |
6 files changed, 102 insertions, 6 deletions
diff --git a/Build/source/texk/web2c/eptexdir/ChangeLog b/Build/source/texk/web2c/eptexdir/ChangeLog index 7eefff664e9..61d620c1491 100644 --- a/Build/source/texk/web2c/eptexdir/ChangeLog +++ b/Build/source/texk/web2c/eptexdir/ChangeLog @@ -1,3 +1,8 @@ +2018-01-21 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp> + + * eptex.ech, etex.ch0, etex.ch1, pdfutils.ch: New primitive \epTeXversion. + * eptex.ech, eptex_version.h: e-pTeX version 180121. + 2017-12-22 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp> * fam256.ch: \delcode defaults to -1, not -4097, to be compatible diff --git a/Build/source/texk/web2c/eptexdir/eptex.ech b/Build/source/texk/web2c/eptexdir/eptex.ech index 57592ac0308..3f3b0e01e4b 100644 --- a/Build/source/texk/web2c/eptexdir/eptex.ech +++ b/Build/source/texk/web2c/eptexdir/eptex.ech @@ -19,7 +19,8 @@ @y @d eTeX_version_string=='-2.6' {current \eTeX\ version} @# -@d epTeX_version_string=='-170924' +@d epTeX_version_string=='-180121' +@d epTeX_version_number==180121 @z @x e-pTeX: banner @@ -71,11 +72,38 @@ var m:halfword; {|chr_code| part of the operand token} @x @d input_line_no_code=glue_val+2 {code for \.{\\inputlineno}} +@d badness_code=glue_val+2 {code for \.{\\badness}} @y @d last_node_char_code=glue_val+2 {code for \.{\\lastnodechar}} @d input_line_no_code=glue_val+3 {code for \.{\\inputlineno}} +@d badness_code=glue_val+4 {code for \.{\\badness}} @z +@x +@d ptex_minor_version_code=ptex_version_code+1 {code for \.{\\ptexminorversion}} +@y +@d ptex_minor_version_code=ptex_version_code+1 {code for \.{\\ptexminorversion}} +@d eptex_version_code=ptex_minor_version_code+1 {code for \.{\\epTeXversion}} +@z + +@x +primitive("ptexversion",last_item,ptex_version_code); +@!@:ptexversion_}{\.{\\ptexversion} primitive@> +@y +primitive("ptexversion",last_item,ptex_version_code); +@!@:ptexversion_}{\.{\\ptexversion} primitive@> +primitive("epTeXversion",last_item,eptex_version_code); +@!@:epTeXversion_}{\.{\\epTeXversion} primitive@> +@z + +@x + ptex_version_code: print_esc("ptexversion"); +@y + ptex_version_code: print_esc("ptexversion"); + eptex_version_code: print_esc("epTeXversion"); +@z + + @x [26.420] l.8474 - pTeX: Fetch a box dimension: dir_node begin scan_eight_bit_int; q:=box(cur_val); @y @@ -139,6 +167,13 @@ else find_last_char; end @z +@x + ptex_version_code: cur_val:=pTeX_version; +@y + ptex_version_code: cur_val:=pTeX_version; + eptex_version_code: cur_val:=epTeX_version_number; +@z + @x [26.424] e-pTeX: node char if cur_chr=last_node_type_code then begin cur_val_level:=int_val; diff --git a/Build/source/texk/web2c/eptexdir/eptex_version.h b/Build/source/texk/web2c/eptexdir/eptex_version.h index 93f2647018d..f2c3c67db9b 100644 --- a/Build/source/texk/web2c/eptexdir/eptex_version.h +++ b/Build/source/texk/web2c/eptexdir/eptex_version.h @@ -1 +1 @@ -#define EPTEX_VERSION "170924" +#define EPTEX_VERSION "180121" diff --git a/Build/source/texk/web2c/eptexdir/etex.ch0 b/Build/source/texk/web2c/eptexdir/etex.ch0 index 154391e42c6..782af3cf038 100644 --- a/Build/source/texk/web2c/eptexdir/etex.ch0 +++ b/Build/source/texk/web2c/eptexdir/etex.ch0 @@ -33,6 +33,12 @@ exit:end; end; @z +@x +@d badness_code=input_line_no_code+1 {code for \.{\\badness}} +@y +@d badness_code=glue_val+2 {code for \.{\\badness}} +@z + @x [26.420] begin scan_register_num; fetch_box(q); if q=null then cur_val:=0 @+else cur_val:=mem[q+m].sc; @@ -54,6 +60,24 @@ legal in similar contexts. @y @z +@x + if m>=eTeX_glue then @<Process an expression and |return|@>@; + else if m>=eTeX_dim then + begin case m of + @/@<Cases for fetching a dimension value@>@/ + end; {there are no other cases} + cur_val_level:=dimen_val; + end + else begin case m of + input_line_no_code: cur_val:=line; + badness_code: cur_val:=last_badness; + @/@<Cases for fetching an integer value@>@/ + end; {there are no other cases} +@y + begin if cur_chr=input_line_no_code then cur_val:=line + else cur_val:=last_badness; {|cur_chr=badness_code|} +@z + @x [26.424] find_effective_tail; @y diff --git a/Build/source/texk/web2c/eptexdir/etex.ch1 b/Build/source/texk/web2c/eptexdir/etex.ch1 index 68405f2c08a..965465cd919 100644 --- a/Build/source/texk/web2c/eptexdir/etex.ch1 +++ b/Build/source/texk/web2c/eptexdir/etex.ch1 @@ -16,6 +16,38 @@ @d etex_int_base=tex_int_pars {base for \eTeX's integer parameters} @z +@x +@d eTeX_int=badness_code+1 {first of \eTeX\ codes for integers} +@y +@d eTeX_int=ptex_minor_version_code+1 {first of \eTeX\ codes for integers} +@z + +@x + begin case m of + input_line_no_code: cur_val:=line; + badness_code: cur_val:=last_badness; + ptex_version_code: cur_val:=pTeX_version; + eptex_version_code: cur_val:=epTeX_version_number; + ptex_minor_version_code: cur_val:=pTeX_minor_version; + end; {there and no other cases} +@y + if m>=eTeX_glue then @<Process an expression and |return|@>@; + else if m>=eTeX_dim then + begin case m of + @/@<Cases for fetching a dimension value@>@/ + end; {there are no other cases} + cur_val_level:=dimen_val; + end + else begin case m of + input_line_no_code: cur_val:=line; + badness_code: cur_val:=last_badness; + ptex_version_code: cur_val:=pTeX_version; + eptex_version_code: cur_val:=epTeX_version_number; + ptex_minor_version_code: cur_val:=pTeX_minor_version; + @/@<Cases for fetching an integer value@>@/ + end; {there are no other cases} +@z + @x [27.468] @d job_name_code=ptex_convert_codes {command code for \.{\\jobname}} @y diff --git a/Build/source/texk/web2c/eptexdir/pdfutils.ch b/Build/source/texk/web2c/eptexdir/pdfutils.ch index fb0511d05ac..14e095ce60f 100644 --- a/Build/source/texk/web2c/eptexdir/pdfutils.ch +++ b/Build/source/texk/web2c/eptexdir/pdfutils.ch @@ -758,10 +758,10 @@ ignore_spaces: {trap unexpandable primitives} @z @x -@d badness_code=input_line_no_code+1 {code for \.{\\badness}} +@d eptex_version_code=ptex_minor_version_code+1 {code for \.{\\epTeXversion}} @y -@d badness_code=input_line_no_code+1 {code for \.{\\badness}} -@d pdf_last_x_pos_code=badness_code+1 {code for \.{\\pdflastxpos}} +@d eptex_version_code=ptex_minor_version_code+1 {code for \.{\\epTeXversion}} +@d pdf_last_x_pos_code=eptex_version_code+1 {code for \.{\\pdflastxpos}} @d pdf_last_y_pos_code=pdf_last_x_pos_code+1 {code for \.{\\pdflastypos}} @d pdf_shell_escape_code=pdf_last_y_pos_code+1 {code for \.{\\pdflastypos}} @d elapsed_time_code =pdf_shell_escape_code+1 {code for \.{\\pdfelapsedtime}} @@ -769,7 +769,7 @@ ignore_spaces: {trap unexpandable primitives} @z @x -@d eTeX_int=badness_code+1 {first of \eTeX\ codes for integers} +@d eTeX_int=ptex_minor_version_code+1 {first of \eTeX\ codes for integers} @y @d eTeX_int=random_seed_code+1 {first of \eTeX\ codes for integers} @z |