texlive[46399] Build/source/texk/web2c: (e-)(u)pTeX: Add \ptexversion

commits+hironobu at tug.org commits+hironobu at tug.org
Sun Jan 21 04:48:06 CET 2018


Revision: 46399
          http://tug.org/svn/texlive?view=revision&revision=46399
Author:   hironobu
Date:     2018-01-21 04:48:06 +0100 (Sun, 21 Jan 2018)
Log Message:
-----------
(e-)(u)pTeX: Add \ptexversion and co. (H. Kitagawa)

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/Makefile.in
    trunk/Build/source/texk/web2c/eptexdir/ChangeLog
    trunk/Build/source/texk/web2c/eptexdir/eptex.ech
    trunk/Build/source/texk/web2c/eptexdir/eptex_version.h
    trunk/Build/source/texk/web2c/eptexdir/etex.ch0
    trunk/Build/source/texk/web2c/eptexdir/etex.ch1
    trunk/Build/source/texk/web2c/eptexdir/pdfutils.ch
    trunk/Build/source/texk/web2c/euptexdir/ChangeLog
    trunk/Build/source/texk/web2c/euptexdir/am/euptex.am
    trunk/Build/source/texk/web2c/euptexdir/euptex.ch0
    trunk/Build/source/texk/web2c/euptexdir/euptex.ch1
    trunk/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch
    trunk/Build/source/texk/web2c/ptexdir/ChangeLog
    trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
    trunk/Build/source/texk/web2c/ptexdir/ptex_version.h
    trunk/Build/source/texk/web2c/uptexdir/ChangeLog
    trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch

Added Paths:
-----------
    trunk/Build/source/texk/web2c/tests/ptexversion.tex

Modified: trunk/Build/source/texk/web2c/Makefile.in
===================================================================
--- trunk/Build/source/texk/web2c/Makefile.in	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/Makefile.in	2018-01-21 03:48:06 UTC (rev 46399)
@@ -3281,8 +3281,8 @@
 	uptexdir/uptex-m.ch \
 	euptexdir/euptex.ch0 \
 	eptexdir/eptex.ech \
+	eptexdir/etex.ch1 \
 	euptexdir/euptex.ch1 \
-	eptexdir/etex.ch1 \
 	$(euptex_ch_synctex) \
 	eptexdir/fam256.ch \
 	euptexdir/pdfstrcmp-eup-pre.ch \

Modified: trunk/Build/source/texk/web2c/eptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/ChangeLog	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/eptexdir/ChangeLog	2018-01-21 03:48:06 UTC (rev 46399)
@@ -1,3 +1,8 @@
+2018-01-21  Hironori Kitagawa  <h_kitagawa2001 at 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 at yahoo.co.jp>
 
 	* fam256.ch: \delcode defaults to -1, not -4097, to be compatible

Modified: trunk/Build/source/texk/web2c/eptexdir/eptex.ech
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/eptex.ech	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/eptexdir/eptex.ech	2018-01-21 03:48:06 UTC (rev 46399)
@@ -19,7 +19,8 @@
 @y
 @d eTeX_version_string=='-2.6' {current \eTeX\ version}
 @#
- at d epTeX_version_string=='-170924'
+ at d epTeX_version_string=='-180121'
+ at d epTeX_version_number==180121
 @z
 
 @x e-pTeX: banner
@@ -71,11 +72,38 @@
 
 @x
 @d input_line_no_code=glue_val+2 {code for \.{\\inputlineno}}
+ at 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}}
+ at d badness_code=glue_val+4 {code for \.{\\badness}}
 @z
 
+ at x
+ at d ptex_minor_version_code=ptex_version_code+1 {code for \.{\\ptexminorversion}}
+ at y
+ at d ptex_minor_version_code=ptex_version_code+1 {code for \.{\\ptexminorversion}}
+ at d eptex_version_code=ptex_minor_version_code+1 {code for \.{\\epTeXversion}}
+ at z
+
+ at x
+primitive("ptexversion",last_item,ptex_version_code);
+@!@:ptexversion_}{\.{\\ptexversion} primitive@>
+ at y
+primitive("ptexversion",last_item,ptex_version_code);
+@!@:ptexversion_}{\.{\\ptexversion} primitive@>
+primitive("epTeXversion",last_item,eptex_version_code);
+@!@:epTeXversion_}{\.{\\epTeXversion} primitive@>
+ at z
+
+ at x
+  ptex_version_code: print_esc("ptexversion");
+ at y
+  ptex_version_code: print_esc("ptexversion");
+  eptex_version_code: print_esc("epTeXversion");
+ at 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 @@
 end
 @z
 
+ at x
+    ptex_version_code: cur_val:=pTeX_version;
+ at y
+    ptex_version_code: cur_val:=pTeX_version;
+    eptex_version_code: cur_val:=epTeX_version_number;
+ at z
+
 @x [26.424] e-pTeX: node char
   if cur_chr=last_node_type_code then
     begin cur_val_level:=int_val;

Modified: trunk/Build/source/texk/web2c/eptexdir/eptex_version.h
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/eptex_version.h	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/eptexdir/eptex_version.h	2018-01-21 03:48:06 UTC (rev 46399)
@@ -1 +1 @@
-#define EPTEX_VERSION "170924"
+#define EPTEX_VERSION "180121"

Modified: trunk/Build/source/texk/web2c/eptexdir/etex.ch0
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/etex.ch0	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/eptexdir/etex.ch0	2018-01-21 03:48:06 UTC (rev 46399)
@@ -33,6 +33,12 @@
 end;
 @z
 
+ at x
+ at d badness_code=input_line_no_code+1 {code for \.{\\badness}}
+ at y
+ at d badness_code=glue_val+2 {code for \.{\\badness}}
+ at 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 @@
 @y
 @z
 
+ at 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}
+ at y
+  begin if cur_chr=input_line_no_code then cur_val:=line
+  else cur_val:=last_badness; {|cur_chr=badness_code|}
+ at z
+
 @x [26.424]
   find_effective_tail;
 @y

Modified: trunk/Build/source/texk/web2c/eptexdir/etex.ch1
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/etex.ch1	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/eptexdir/etex.ch1	2018-01-21 03:48:06 UTC (rev 46399)
@@ -16,6 +16,38 @@
 @d etex_int_base=tex_int_pars {base for \eTeX's integer parameters}
 @z
 
+ at x
+ at d eTeX_int=badness_code+1 {first of \eTeX\ codes for integers}
+ at y
+ at d eTeX_int=ptex_minor_version_code+1 {first of \eTeX\ codes for integers}
+ at z
+
+ at 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}
+ at 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}
+ at z
+
 @x [27.468]
 @d job_name_code=ptex_convert_codes {command code for \.{\\jobname}}
 @y

Modified: trunk/Build/source/texk/web2c/eptexdir/pdfutils.ch
===================================================================
--- trunk/Build/source/texk/web2c/eptexdir/pdfutils.ch	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/eptexdir/pdfutils.ch	2018-01-21 03:48:06 UTC (rev 46399)
@@ -758,10 +758,10 @@
 @z
 
 @x
- at d badness_code=input_line_no_code+1 {code for \.{\\badness}}
+ at d eptex_version_code=ptex_minor_version_code+1 {code for \.{\\epTeXversion}}
 @y
- at d badness_code=input_line_no_code+1 {code for \.{\\badness}}
- at d pdf_last_x_pos_code=badness_code+1 {code for \.{\\pdflastxpos}}
+ at d eptex_version_code=ptex_minor_version_code+1 {code for \.{\\epTeXversion}}
+ at 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 @@
 @z
 
 @x
- at d eTeX_int=badness_code+1 {first of \eTeX\ codes for integers}
+ at 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

Modified: trunk/Build/source/texk/web2c/euptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/ChangeLog	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/euptexdir/ChangeLog	2018-01-21 03:48:06 UTC (rev 46399)
@@ -1,3 +1,8 @@
+2018-01-21  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
+
+	* euptex.ch0, euptex.ch1, pdfstrcmp-eup-post.ch, am/euptex.am:
+	Adapt to changes in ptexdir/, eptexdir, and uptexdir/.
+
 2017-11-30  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
 
 	* pdfstrcmp-eup-post.ch, tests/pdfprimitive-euptex.log: Adapt

Modified: trunk/Build/source/texk/web2c/euptexdir/am/euptex.am
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/am/euptex.am	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/euptexdir/am/euptex.am	2018-01-21 03:48:06 UTC (rev 46399)
@@ -59,8 +59,8 @@
 	uptexdir/uptex-m.ch \
 	euptexdir/euptex.ch0 \
 	eptexdir/eptex.ech \
+	eptexdir/etex.ch1 \
 	euptexdir/euptex.ch1 \
-	eptexdir/etex.ch1 \
 	$(euptex_ch_synctex) \
 	eptexdir/fam256.ch \
 	euptexdir/pdfstrcmp-eup-pre.ch \

Modified: trunk/Build/source/texk/web2c/euptexdir/euptex.ch0
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/euptex.ch0	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/euptexdir/euptex.ch0	2018-01-21 03:48:06 UTC (rev 46399)
@@ -35,3 +35,14 @@
 @y
 @d protected_token=@"E01 {$2^8\cdot|end_match|+1$}
 @z
+
+ at x
+  uptex_version_code: print_esc("uptexversion");
+ at y
+ at z
+
+ at x
+    uptex_version_code: cur_val:=upTeX_version;
+ at y
+ at z
+

Modified: trunk/Build/source/texk/web2c/euptexdir/euptex.ch1
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/euptex.ch1	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/euptexdir/euptex.ch1	2018-01-21 03:48:06 UTC (rev 46399)
@@ -7,11 +7,31 @@
 @z
 
 @x
+ at d uptex_version_code=ptex_minor_version_code+1 {code for \.{\\uptexversion}}
+ at y
+ at d uptex_version_code=ptex_minor_version_code+2 {code for \.{\\uptexversion}}
+ at z
+
+ at x
+  eptex_version_code: print_esc("epTeXversion");
+ at y
+  eptex_version_code: print_esc("epTeXversion");
+  uptex_version_code: print_esc("uptexversion");
+ at z
+
+ at x
 if font_dir[font(tx)]<>dir_default then cur_val:=KANJI(info(link(tx)))
 @y
 if font_dir[font(tx)]<>dir_default then cur_val:=KANJI(info(link(tx))) mod max_cjk_val
 @z
 
+ at x
+  eptex_version_code: cur_val:=epTeX_version_number;
+ at y
+  eptex_version_code: cur_val:=epTeX_version_number;
+  uptex_version_code: cur_val:=upTeX_version;
+ at z
+
 @x e-pTeX: ifcsname l.28620
     begin buffer[m]:=Hi(info(p)); incr(m);
     end;

Modified: trunk/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch
===================================================================
--- trunk/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/euptexdir/pdfstrcmp-eup-post.ch	2018-01-21 03:48:06 UTC (rev 46399)
@@ -5,6 +5,18 @@
 @z
 
 @x
+ at d pdf_last_x_pos_code=eptex_version_code+1 {code for \.{\\pdflastxpos}}
+ at y
+ at d uptex_version_code=eptex_version_code+1 {code for \.{\\uptexversion}}
+ at d pdf_last_x_pos_code=uptex_version_code+1 {code for \.{\\pdflastxpos}}
+ at z
+
+ at x
+ at d uptex_version_code=ptex_minor_version_code+2 {code for \.{\\uptexversion}}
+ at y
+ at z
+
+ at x
 procedure print_kanji(@!s:integer); {prints a single character}
 begin
 if s>255 then begin

Modified: trunk/Build/source/texk/web2c/ptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ChangeLog	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/ptexdir/ChangeLog	2018-01-21 03:48:06 UTC (rev 46399)
@@ -1,3 +1,9 @@
+2018-01-21  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
+
+	* ptex-base.ch: New primitives: \ptexversion, \ptexminorversion
+	and \ptexrevision.
+	* ptex_version.h: pTeX version p3.8.0.
+
 2017-12-21  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
 
 	* ptex-base.ch: Include zw etc. in "Dimensions can be in units ..."

Modified: trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/ptexdir/ptex-base.ch	2018-01-21 03:48:06 UTC (rev 46399)
@@ -57,6 +57,7 @@
 % (2016-06-06) AK  Hironori Kitagawa fixed a bug in check_box(box_p:pointer).
 %                  pTeX p3.7.1.
 % (2017-09-07) HK  pTeX p3.7.2 More restrictions on direction change commands.
+% (2018-01-21) HK  Added \ptexversion primitive and co. pTeX p3.8.
 %
 
 @x
@@ -70,7 +71,10 @@
 @d banner==TeX_banner
 @d banner_k==TeX_banner_k
 @y
- at d pTeX_version_string=='-p3.7.2' {current \pTeX\ version}
+ at d pTeX_version=3
+ at d pTeX_minor_version=8
+ at d pTeX_revision==".0"
+ at d pTeX_version_string=='-p3.8.0' {current \pTeX\ version}
 @#
 @d pTeX_banner=='This is pTeX, Version 3.14159265',pTeX_version_string
 @d pTeX_banner_k==pTeX_banner
@@ -2067,6 +2071,34 @@
   scanned_result(eqtb[m+cur_val].int)(int_val) end;
 @z
 
+ at x pTeX: \ptexversion
+ at d badness_code=glue_val+2 {code for \.{\\badness}}
+ at y
+ at d badness_code=glue_val+2 {code for \.{\\badness}}
+ at d ptex_version_code=badness_code+1 {code for \.{\\ptexversion}}
+ at d ptex_minor_version_code=ptex_version_code+1 {code for \.{\\ptexminorversion}}
+ at z
+
+ at x pTeX: \ptexversion
+primitive("badness",last_item,badness_code);
+@!@:badness_}{\.{\\badness} primitive@>
+ at y
+primitive("badness",last_item,badness_code);
+@!@:badness_}{\.{\\badness} primitive@>
+primitive("ptexversion",last_item,ptex_version_code);
+@!@:ptexversion_}{\.{\\ptexversion} primitive@>
+primitive("ptexminorversion",last_item,ptex_minor_version_code);
+@!@:ptexminorversion_}{\.{\\ptexminorversion} primitive@>
+ at z
+
+ at x pTeX: \ptexversion
+  input_line_no_code: print_esc("inputlineno");
+ at y
+  input_line_no_code: print_esc("inputlineno");
+  ptex_version_code: print_esc("ptexversion");
+  ptex_minor_version_code: print_esc("ptexminorversion");
+ at z
+
 @x [26.420] l.8474 - pTeX: Fetch a box dimension: dir_node
 begin scan_eight_bit_int;
 if box(cur_val)=null then cur_val:=0 @+else cur_val:=mem[box(cur_val)+m].sc;
@@ -2119,6 +2151,18 @@
 @<Fetch an item in the current node...@>=
 @z
 
+ at x pTeX: \ptexversion 
+  begin if cur_chr=input_line_no_code then cur_val:=line
+  else cur_val:=last_badness; {|cur_chr=badness_code|}
+ at y
+  begin case m of
+    input_line_no_code: cur_val:=line;
+    badness_code: cur_val:=last_badness;
+    ptex_version_code: cur_val:=pTeX_version;
+    ptex_minor_version_code: cur_val:=pTeX_minor_version;
+  end; {there and no other cases}
+ at z
+
 @x [26.424] l.8516 - pTeX: Fetch an item ...: disp_node
 else begin if cur_chr=glue_val then cur_val:=zero_glue at +else cur_val:=0;
 @y
@@ -2296,7 +2340,8 @@
 @d sjis_code=7 {command code for \.{\\sjis}}
 @d jis_code=8 {command code for \.{\\jis}}
 @d kuten_code=9 {command code for \.{\\kuten}}
- at d ptex_convert_codes=10 {end of \pTeX's command codes}
+ at d ptex_revision_code=10 {command code for \.{\\ptexrevision}}
+ at d ptex_convert_codes=11 {end of \pTeX's command codes}
 @d job_name_code=ptex_convert_codes {command code for \.{\\jobname}}
 @z
 
@@ -2316,6 +2361,8 @@
 @!@:jis_}{\.{\\jis} primitive@>
 primitive("kuten",convert,kuten_code);
 @!@:kuten_}{\.{\\kuten} primitive@>
+primitive("ptexrevision",convert,ptex_revision_code);
+@!@:ptexrevision_}{\.{\\ptexrevision} primitive@>
 @z
 
 @x [27.469] l.9558 - pTeX:
@@ -2327,6 +2374,7 @@
   sjis_code:print_esc("sjis");
   jis_code:print_esc("jis");
   kuten_code:print_esc("kuten");
+  ptex_revision_code:print_esc("ptexrevision");
 @z
 
 @x [27.470] l.9566 - pTeX: convert KANJI code continue
@@ -2351,6 +2399,7 @@
 case c of
 number_code,roman_numeral_code,
 kansuji_code,euc_code,sjis_code,jis_code,kuten_code: scan_int;
+ptex_revision_code: do_nothing;
 string_code, meaning_code: begin save_scanner_status:=scanner_status;
   scanner_status:=normal; get_token;
   if (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar) then {|wchar_token|}
@@ -2375,6 +2424,7 @@
 euc_code:   print_int(fromEUC(cur_val));
 sjis_code:  print_int(fromSJIS(cur_val));
 kuten_code: print_int(fromKUTEN(cur_val));
+ptex_revision_code: print(pTeX_revision);
 kansuji_code: print_kansuji(cur_val);
 string_code:if cur_cs<>0 then sprint_cs(cur_cs)
   else if KANJI(cx)=0 then print_char(cur_chr)

Modified: trunk/Build/source/texk/web2c/ptexdir/ptex_version.h
===================================================================
--- trunk/Build/source/texk/web2c/ptexdir/ptex_version.h	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/ptexdir/ptex_version.h	2018-01-21 03:48:06 UTC (rev 46399)
@@ -1 +1 @@
-#define PTEX_VERSION "p3.7.2"
+#define PTEX_VERSION "p3.8.0"

Added: trunk/Build/source/texk/web2c/tests/ptexversion.tex
===================================================================
--- trunk/Build/source/texk/web2c/tests/ptexversion.tex	                        (rev 0)
+++ trunk/Build/source/texk/web2c/tests/ptexversion.tex	2018-01-21 03:48:06 UTC (rev 46399)
@@ -0,0 +1,44 @@
+\catcode`\@=11
+\def\R#1{%
+  \ifx#1\undefined\else
+  \immediate\write16{\meaning#1: \the#1\space}%
+  \fi}
+\def\S#1{%
+  \ifx#1\undefined\else
+  \immediate\write16{\meaning#1: "#1"\space}%
+  \fi}
+
+\ifx\eTeXversion\undefined\else
+  \R\eTeXversion
+  \S\eTeXrevision
+\fi
+
+\ifx\ptexversion\undefined\else
+  \R\ptexversion
+  \R\ptexminorversion
+  \S\ptexrevision
+  \R\epTeXversion
+  \R\uptexversion
+  \S\uptexrevision
+\fi
+
+\ifx\Omegaversion\undefined\else
+  \R\Omegaversion
+  \R\Omegaminorversion
+  \S\Omegarevision
+  \R\Alephversion
+  \R\Alephminorversion
+  \S\Alephrevision
+\fi
+
+\ifx\pdftexversion\undefined\else
+  \R\pdftexversion
+  \S\pdftexrevision
+\fi
+\ifx\luatexversion\undefined\else
+  \R\luatexversion
+  \S\luatexrevision
+\fi
+
+\end
+


Property changes on: trunk/Build/source/texk/web2c/tests/ptexversion.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Build/source/texk/web2c/uptexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/ChangeLog	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/uptexdir/ChangeLog	2018-01-21 03:48:06 UTC (rev 46399)
@@ -1,3 +1,7 @@
+2018-01-21  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
+
+	* uptex-m.ch: New primitives: \uptexversion and \uptexrevision.
+
 2017-04-24  Hironori Kitagawa  <h_kitagawa2001 at yahoo.co.jp>
 
 	* uptex-m.ch: Adapt to changes in ptexdir/ptex-base.ch (p\TeX -> \pTeX).

Modified: trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch
===================================================================
--- trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch	2018-01-21 01:23:19 UTC (rev 46398)
+++ trunk/Build/source/texk/web2c/uptexdir/uptex-m.ch	2018-01-21 03:48:06 UTC (rev 46399)
@@ -561,6 +561,37 @@
 @z
 
 @x
+ at d ptex_minor_version_code=ptex_version_code+1 {code for \.{\\ptexminorversion}}
+ at y
+ at d ptex_minor_version_code=ptex_version_code+1 {code for \.{\\ptexminorversion}}
+ at d uptex_version_code=ptex_minor_version_code+1 {code for \.{\\uptexversion}}
+ at z
+
+ at x
+primitive("ptexversion",last_item,ptex_version_code);
+@!@:ptexversion_}{\.{\\ptexversion} primitive@>
+ at y
+primitive("ptexversion",last_item,ptex_version_code);
+@!@:ptexversion_}{\.{\\ptexversion} primitive@>
+primitive("uptexversion",last_item,uptex_version_code);
+@!@:uptexversion_}{\.{\\uptexversion} primitive@>
+ at z
+
+ at x
+  ptex_version_code: print_esc("ptexversion");
+ at y
+  ptex_version_code: print_esc("ptexversion");
+  uptex_version_code: print_esc("uptexversion");
+ at z
+
+ at x
+    ptex_version_code: cur_val:=pTeX_version;
+ at y
+    ptex_version_code: cur_val:=pTeX_version;
+    uptex_version_code: cur_val:=upTeX_version;
+ at z
+
+ at x
   if (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar) then {|wchar_token|}
 @y
   if (cur_cmd>=kanji)and(cur_cmd<=hangul) then {|wchar_token|}
@@ -600,10 +631,14 @@
 @z
 
 @x
- at d ptex_convert_codes=10 {end of \pTeX's command codes}
+
+ at d ptex_revision_code=10 {command code for \.{\\ptexrevision}}
+ at d ptex_convert_codes=11 {end of \pTeX's command codes}
 @y
 @d ucs_code=10 {command code for \.{\\ucs}}
- at d ptex_convert_codes=11 {end of \pTeX's command codes}
+ at d ptex_revision_code=11 {command code for \.{\\ptexrevision}}
+ at d uptex_revision_code=12 {command code for \.{\\uptexrevision}}
+ at d ptex_convert_codes=13 {end of \pTeX's command codes}
 @z
 
 @x
@@ -615,6 +650,16 @@
 @z
 
 @x
+primitive("ptexrevision",convert,ptex_revision_code);
+@!@:ptexrevision_}{\.{\\ptexrevision} primitive@>
+ at y
+primitive("ptexrevision",convert,ptex_revision_code);
+@!@:ptexrevision_}{\.{\\ptexrevision} primitive@>
+primitive("uptexrevision",convert,uptex_revision_code);
+@!@:uptexrevision_}{\.{\\uptexrevision} primitive@>
+ at z
+
+ at x
   kuten_code:print_esc("kuten");
 @y
   kuten_code:print_esc("kuten");
@@ -622,12 +667,21 @@
 @z
 
 @x
+  ptex_revision_code:print_esc("ptexrevision");
+ at y
+  ptex_revision_code:print_esc("ptexrevision");
+  uptex_revision_code:print_esc("uptexrevision");
+ at z
+
+ at x
 kansuji_code,euc_code,sjis_code,jis_code,kuten_code: scan_int;
+ptex_revision_code: do_nothing;
 string_code, meaning_code: begin save_scanner_status:=scanner_status;
   scanner_status:=normal; get_token;
   if (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar) then {|wchar_token|}
 @y
 kansuji_code,euc_code,sjis_code,jis_code,kuten_code,ucs_code: scan_int;
+ptex_revision_code, uptex_revision_code: do_nothing;
 string_code, meaning_code: begin save_scanner_status:=scanner_status;
   scanner_status:=normal; get_token;
   if (cur_cmd>=kanji)and(cur_cmd<=hangul) then {|wchar_token|}
@@ -641,6 +695,13 @@
 @z
 
 @x
+ptex_revision_code: print(pTeX_revision);
+ at y
+ptex_revision_code: print(pTeX_revision);
+uptex_revision_code: print(upTeX_revision);
+ at z
+
+ at x
 if (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar) then
 @y
 if (cur_cmd>=kanji)and(cur_cmd<=hangul) then



More information about the tex-live-commits mailing list