texlive[65847] Build/source/texk/web2c: late \special for aleph,
commits+karl at tug.org
commits+karl at tug.org
Wed Feb 15 23:44:14 CET 2023
Revision: 65847
http://tug.org/svn/texlive?view=revision&revision=65847
Author: karl
Date: 2023-02-15 23:44:14 +0100 (Wed, 15 Feb 2023)
Log Message:
-----------
late \special for aleph, following other engines
Modified Paths:
--------------
trunk/Build/source/texk/web2c/Makefile.in
trunk/Build/source/texk/web2c/alephdir/ChangeLog
trunk/Build/source/texk/web2c/alephdir/am/aleph.am
Added Paths:
-----------
trunk/Build/source/texk/web2c/alephdir/latespecial.ch
Modified: trunk/Build/source/texk/web2c/Makefile.in
===================================================================
--- trunk/Build/source/texk/web2c/Makefile.in 2023-02-15 20:39:08 UTC (rev 65846)
+++ trunk/Build/source/texk/web2c/Makefile.in 2023-02-15 22:44:14 UTC (rev 65847)
@@ -5477,7 +5477,8 @@
alephdir/eonewdir.ch \
alephdir/eover.ch \
alephdir/eopage.ch \
- alephdir/eochar.ch
+ alephdir/eochar.ch \
+ alephdir/latespecial.ch
# Generate aleph.ch
Modified: trunk/Build/source/texk/web2c/alephdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/alephdir/ChangeLog 2023-02-15 20:39:08 UTC (rev 65846)
+++ trunk/Build/source/texk/web2c/alephdir/ChangeLog 2023-02-15 22:44:14 UTC (rev 65847)
@@ -1,3 +1,8 @@
+2023-02-15 Phelype Oleinik <phelype.oleinik at latex-project.org>
+
+ * latespecial.ch: new change file for "\special shipout".
+ * am/aleph.am (aleph_web_srcs): add latespecial.ch.
+
2022-10-22 Hironobu Yamashita <h.y.acetaminophen at gmail.com>
* com16bit.ch: Sync with tex.ch changes:
Modified: trunk/Build/source/texk/web2c/alephdir/am/aleph.am
===================================================================
--- trunk/Build/source/texk/web2c/alephdir/am/aleph.am 2023-02-15 20:39:08 UTC (rev 65846)
+++ trunk/Build/source/texk/web2c/alephdir/am/aleph.am 2023-02-15 22:44:14 UTC (rev 65847)
@@ -1,7 +1,7 @@
## $Id$
## texk/web2c/alephdir/am/aleph.am: Makefile fragment for Aleph.
##
-## Copyright 2015-2022 Karl Berry <tex-live at tug.org>
+## Copyright 2015-2023 Karl Berry <tex-live at tug.org>
## Copyright 2009-2015 Peter Breitenlohner <tex-live at tug.org>
## You may freely use, modify and/or distribute this file.
@@ -69,7 +69,8 @@
alephdir/eonewdir.ch \
alephdir/eover.ch \
alephdir/eopage.ch \
- alephdir/eochar.ch
+ alephdir/eochar.ch \
+ alephdir/latespecial.ch
aleph.web: tie$(EXEEXT) $(aleph_web_srcs)
$(tie_m) $(aleph_web_srcs)
Added: trunk/Build/source/texk/web2c/alephdir/latespecial.ch
===================================================================
--- trunk/Build/source/texk/web2c/alephdir/latespecial.ch (rev 0)
+++ trunk/Build/source/texk/web2c/alephdir/latespecial.ch 2023-02-15 22:44:14 UTC (rev 65847)
@@ -0,0 +1,95 @@
+% latespecial.ch: Adding the "shipout" keyword to \special
+%
+% This file is part of the Omega project, which
+% is based on the web2c distribution of TeX.
+%
+% Copyright (c) 2023 Phelype Oleinik
+%
+% This library is free software; you can redistribute it and/or
+% modify it under the terms of the GNU Library General Public
+% License as published by the Free Software Foundation; either
+% version 2 of the License, or (at your option) any later version.
+%
+% This library is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+% Library General Public License for more details.
+%
+% You should have received a copy of the GNU Library General Public
+% License along with this library; if not, write to the Free Software
+% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ at x
+ at d language_node=4 {|subtype| in whatsits that change the current language}
+ at y
+ at d latespecial_node=4 {|subtype| in whatsits for \.{\\special shipout}}
+ at d language_node=5 {|subtype| in whatsits that change the current language}
+ at z
+
+ at x
+ at d immediate_code=4 {command modifier for \.{\\immediate}}
+ at d set_language_code=5 {command modifier for \.{\\setlanguage}}
+ at y
+ at d immediate_code=5 {command modifier for \.{\\immediate}}
+ at d set_language_code=6 {command modifier for \.{\\setlanguage}}
+ at z
+
+ at x
+begin new_whatsit(special_node,write_node_size); write_stream(tail):=null;
+p:=scan_toks(false,true); write_tokens(tail):=def_ref;
+end
+ at y
+begin if scan_keyword("shipout") then
+begin new_whatsit(latespecial_node,write_node_size); write_stream(tail):=null;
+p:=scan_toks(false,false); write_tokens(tail):=def_ref;
+end else
+begin new_whatsit(special_node,write_node_size); write_stream(tail):=null;
+p:=scan_toks(false,true); write_tokens(tail):=def_ref;
+end; end
+ at z
+
+ at x
+language_node:begin print_esc("setlanguage");
+ at y
+latespecial_node:begin print_esc("special"); print(" shipout");
+ print_mark(write_tokens(p));
+ end;
+language_node:begin print_esc("setlanguage");
+ at z
+
+ at x
+write_node,special_node: begin r:=get_node(write_node_size);
+ at y
+write_node,special_node,latespecial_node: begin r:=get_node(write_node_size);
+ at z
+
+ at x
+write_node,special_node: begin delete_token_ref(write_tokens(p));
+ at y
+write_node,special_node,latespecial_node: begin delete_token_ref(write_tokens(p));
+ at z
+
+ at x
+begin synch_h; synch_v;@/
+old_setting:=selector; selector:=new_string;
+show_token_list(link(write_tokens(p)),null,pool_size-pool_ptr);
+ at y
+@!q,@!r:pointer; {temporary variables for list manipulation}
+@!old_mode:integer; {saved |mode|}
+begin synch_h; synch_v;@/
+old_setting:=selector; selector:=new_string;
+selector:=old_setting;
+if subtype(p)=latespecial_node then
+ begin @<Expand macros in the token list
+ and make |link(def_ref)| point to the result@>;
+ write_tokens(p):=def_ref;
+ end;
+selector:=new_string;
+show_token_list(link(write_tokens(p)),null,pool_size-pool_ptr);
+ at z
+
+ at x
+special_node:special_out(p);
+ at y
+special_node,latespecial_node:special_out(p);
+ at z
Property changes on: trunk/Build/source/texk/web2c/alephdir/latespecial.ch
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
More information about the tex-live-commits
mailing list.