summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-11-11 11:50:20 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-11-11 11:50:20 +0000
commit1ce822853b1272297e4690db12d0e0ecf8eb2f6d (patch)
tree9d16240efb3fe639251c24433fd08362b5be65a0
parent9a2121dc333c83fc07512eea307b52d7f9d91fd2 (diff)
Continue merging XeTeX change files (more)
git-svn-id: svn://tug.org/texlive/trunk@28233 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/ChangeLog5
-rw-r--r--Build/source/texk/web2c/Makefile.in1
-rw-r--r--Build/source/texk/web2c/enctex.ch18
-rw-r--r--Build/source/texk/web2c/ptexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/ptexdir/ptex-base.ch20
-rw-r--r--Build/source/texk/web2c/synctexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex-rec.ch06
-rw-r--r--Build/source/texk/web2c/tex.ch120
-rw-r--r--Build/source/texk/web2c/xetexdir/am/xetex.am1
-rw-r--r--Build/source/texk/web2c/xetexdir/tex.mod81
-rw-r--r--Build/source/texk/web2c/xetexdir/xetex.ch407
-rw-r--r--Build/source/texk/web2c/xetexdir/xetex.web69
12 files changed, 268 insertions, 468 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index 13f6e8232c8..c2c89c45d49 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,6 +1,9 @@
-2012-11-08 Peter Breitenlohner <peb@mppmu.mpg.de>
+2012-11-10 Peter Breitenlohner <peb@mppmu.mpg.de>
* tex.ch: Avoid conflict with xetexdir/xetex.web.
+ Introduce Web macros check_quoted and print_quoted.
+ (cs_error): Move "endmubyte" code from here ...
+ * enctex.ch (cs_error): ... to here.
2012-10-19 Peter Breitenlohner <peb@mppmu.mpg.de>
diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in
index 54361e3b603..872f0679975 100644
--- a/Build/source/texk/web2c/Makefile.in
+++ b/Build/source/texk/web2c/Makefile.in
@@ -2615,6 +2615,7 @@ Xold_web_srcs = \
etexdir/etex.ch \
etexdir/tex.ch0 \
tex.ch \
+ xetexdir/tex.mod \
etexdir/tex.ch1 \
etexdir/tex.ech \
tex-binpool.ch \
diff --git a/Build/source/texk/web2c/enctex.ch b/Build/source/texk/web2c/enctex.ch
index a402e7e68de..7eac4584618 100644
--- a/Build/source/texk/web2c/enctex.ch
+++ b/Build/source/texk/web2c/enctex.ch
@@ -414,6 +414,24 @@ if enctex_enabled_p then
end;
@z
+@x [48.1138] l.21648 - encTeX: \endmubyte primitive
+begin print_err("Extra "); print_esc("endcsname");
+@.Extra \\endcsname@>
+help1("I'm ignoring this, since I wasn't doing a \csname.");
+@y
+begin
+if cur_chr = 10 then
+begin
+ print_err("Extra "); print_esc("endmubyte");
+@.Extra \\endmubyte@>
+ help1("I'm ignoring this, since I wasn't doing a \mubyte.");
+end else begin
+ print_err("Extra "); print_esc("endcsname");
+@.Extra \\endcsname@>
+ help1("I'm ignoring this, since I wasn't doing a \csname.");
+end;
+@z
+
@x [49.1211] - encTeX: extra variables for \mubyte primitive
@!p,@!q:pointer; {for temporary short-term use}
@y
diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog
index d4a69447ee7..2327227b057 100644
--- a/Build/source/texk/web2c/ptexdir/ChangeLog
+++ b/Build/source/texk/web2c/ptexdir/ChangeLog
@@ -1,3 +1,7 @@
+2012-11-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * ptex-base.ch (cs_error): Remove "endmubyte" code.
+
2012-08-22 Peter Breitenlohner <peb@mppmu.mpg.de>
* ppltotf.ch: Remove putc kludge, convert knows (u)ppltotf.
diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch
index cd4d3a5c262..5b861145fa4 100644
--- a/Build/source/texk/web2c/ptexdir/ptex-base.ch
+++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch
@@ -5266,26 +5266,6 @@ else link(p):=tail;
p:=q;
@z
-@x l.22334 - pTeX
-procedure cs_error;
-begin
-if cur_chr = 10 then
-begin
- print_err("Extra "); print_esc("endmubyte");
-@.Extra \\endmubyte@>
- help1("I'm ignoring this, since I wasn't doing a \mubyte.");
-end else begin
- print_err("Extra "); print_esc("endcsname");
-@.Extra \\endcsname@>
- help1("I'm ignoring this, since I wasn't doing a \csname.");
-end;
-@y
-procedure cs_error;
-begin print_err("Extra "); print_esc("endcsname");
-@.Extra \\endcsname@>
-help1("I'm ignoring this, since I wasn't doing a \csname.");
-@z
-
@x [48.1138] l.22385 - pTeX: init math : direction < 0 ... math direction
if (cur_cmd=math_shift)and(mode>0) then @<Go into display math mode@>
else begin back_input; @<Go into ordinary math mode@>;
diff --git a/Build/source/texk/web2c/synctexdir/ChangeLog b/Build/source/texk/web2c/synctexdir/ChangeLog
index 03f407db01f..3453c0aa594 100644
--- a/Build/source/texk/web2c/synctexdir/ChangeLog
+++ b/Build/source/texk/web2c/synctexdir/ChangeLog
@@ -1,3 +1,7 @@
+2012-11-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * synctex-rec.ch0: Avoid conflict with xetexdir/xetex.web.
+
2012-10-08 Peter Breitenlohner <peb@mppmu.mpg.de>
* synctex_parser_utils.h: Avoid definition of FALSE and TRUE
diff --git a/Build/source/texk/web2c/synctexdir/synctex-rec.ch0 b/Build/source/texk/web2c/synctexdir/synctex-rec.ch0
index ce74ce86d0d..1ab4f1afa80 100644
--- a/Build/source/texk/web2c/synctexdir/synctex-rec.ch0
+++ b/Build/source/texk/web2c/synctexdir/synctex-rec.ch0
@@ -175,11 +175,11 @@ end
@p procedure vlist_out; {output a |vlist_node| box}
@z
-@x tex.web l.12533
-save_loc:=dvi_offset+dvi_ptr; left_edge:=cur_h; cur_v:=cur_v-height(this_box);
+@x tex.web l.12534
+top_edge:=cur_v;
@y
-save_loc:=dvi_offset+dvi_ptr; left_edge:=cur_h; cur_v:=cur_v-height(this_box);
MISSING @<Start vlist {\sl Sync\TeX} information record@> before cur_v:=cur_v-height(this_box);
+top_edge:=cur_v;
@z
@x tex.web l.12535
diff --git a/Build/source/texk/web2c/tex.ch b/Build/source/texk/web2c/tex.ch
index e3d402af235..c594699ea80 100644
--- a/Build/source/texk/web2c/tex.ch
+++ b/Build/source/texk/web2c/tex.ch
@@ -1699,12 +1699,10 @@ if ext_delimiter<>0 then begin
@z
@x [29.517] l.10011 - end_name: string recycling
- str_start[str_ptr+1]:=str_start[str_ptr]+area_delimiter; incr(str_ptr);
end;
if ext_delimiter=0 then
begin cur_ext:=""; cur_name:=make_string;
@y
- str_start[str_ptr+1]:=str_start[str_ptr]+area_delimiter; incr(str_ptr);
temp_str:=search_string(cur_area);
if temp_str>0 then
begin cur_area:=temp_str;
@@ -1720,12 +1718,8 @@ if ext_delimiter=0 then
@z
@x [29.517] l.10016 - end_name: string recycling
-else begin cur_name:=str_ptr;
- str_start[str_ptr+1]:=str_start[str_ptr]+ext_delimiter-area_delimiter-1;
incr(str_ptr); cur_ext:=make_string;
@y
-else begin cur_name:=str_ptr;
- str_start[str_ptr+1]:=str_start[str_ptr]+ext_delimiter-area_delimiter-1;
incr(str_ptr); cur_ext:=make_string;
decr(str_ptr); {undo extension string to look at name part}
temp_str:=search_string(cur_name);
@@ -1741,30 +1735,35 @@ else begin cur_name:=str_ptr;
@z
@x [29.518] l.10042 - print_file_name: quote if spaces in names.
+some operating systems put the file area last instead of first.)
+@^system dependencies@>
+@y
+some operating systems put the file area last instead of first.)
+@^system dependencies@>
+
+@d check_quoted(#) == {check if string |#| needs quoting}
+if #<>0 then begin
+ j:=str_start[#];
+ while (not must_quote) and (j<str_start[#+1]) do begin
+ must_quote:=str_pool[j]=" "; incr(j);
+ end;
+end
+@#
+@d print_quoted(#) == {print string |#|, omitting quotes}
+if #<>0 then
+ for j:=str_start[#] to str_start[#+1]-1 do
+ if so(str_pool[j])<>"""" then
+ print(so(str_pool[j]))
+@z
+
+@x [29.518] l.10042 - print_file_name: quote if spaces in names.
begin slow_print(a); slow_print(n); slow_print(e);
@y
var must_quote: boolean; {whether to quote the filename}
@!j:pool_pointer; {index into |str_pool|}
begin
must_quote:=false;
-if a<>0 then begin
- j:=str_start[a];
- while (not must_quote) and (j<str_start[a+1]) do begin
- must_quote:=str_pool[j]=" "; incr(j);
- end;
-end;
-if n<>0 then begin
- j:=str_start[n];
- while (not must_quote) and (j<str_start[n+1]) do begin
- must_quote:=str_pool[j]=" "; incr(j);
- end;
-end;
-if e<>0 then begin
- j:=str_start[e];
- while (not must_quote) and (j<str_start[e+1]) do begin
- must_quote:=str_pool[j]=" "; incr(j);
- end;
-end;
+check_quoted(a); check_quoted(n); check_quoted(e);
{FIXME: Alternative is to assume that any filename that has to be quoted has
at least one quoted component...if we pick this, a number of insertions
of |print_file_name| should go away.
@@ -1772,18 +1771,7 @@ end;
((|n|<>0)and(|str_pool|[|str_start|[|n|]]=""""))or
((|e|<>0)and(|str_pool|[|str_start|[|e|]]=""""));}
if must_quote then print_char("""");
-if a<>0 then
- for j:=str_start[a] to str_start[a+1]-1 do
- if so(str_pool[j])<>"""" then
- print(so(str_pool[j]));
-if n<>0 then
- for j:=str_start[n] to str_start[n+1]-1 do
- if so(str_pool[j])<>"""" then
- print(so(str_pool[j]));
-if e<>0 then
- for j:=str_start[e] to str_start[e+1]-1 do
- if so(str_pool[j])<>"""" then
- print(so(str_pool[j]));
+print_quoted(a); print_quoted(n); print_quoted(e);
if must_quote then print_char("""");
@z
@@ -1800,11 +1788,11 @@ if must_quote then print_char("""");
% [29.519] In pack_file_name, leave room for the extra null we append at
% the end of a filename.
@x [29.519] l.10047 - pack_file_name, leave room for the extra null
-for j:=str_start[a] to str_start[a+1]-1 do append_to_name(so(str_pool[j]));
+begin k:=0;
@y
+begin k:=0;
if name_of_file then libc_free (name_of_file);
name_of_file:= xmalloc_array (ASCII_code, length(a)+length(n)+length(e)+1);
-for j:=str_start[a] to str_start[a+1]-1 do append_to_name(so(str_pool[j]));
@z
@x [29.519] l.10051 - pack_file_name, append the extra null
@@ -1889,24 +1877,17 @@ name_of_file[name_length+1]:=0;
@.I can't find the format...@>
@z
-@x [29.525] l.10163 - make_name_string
-@p function make_name_string:str_number;
-var k:1..file_name_size; {index into |name_of_file|}
+@x [29.525] l.10170 - make_name_string
begin if (pool_ptr+name_length>pool_size)or(str_ptr=max_strings)or
- (cur_length>0) then
- make_name_string:="?"
-else begin for k:=1 to name_length do append_char(xord[name_of_file[k]]);
- make_name_string:=make_string;
- end;
@y
-@p function make_name_string:str_number;
-var k:1..file_name_size; {index into |name_of_file|}
save_area_delimiter, save_ext_delimiter: pool_pointer;
save_name_in_progress, save_stop_at_space: boolean;
begin if (pool_ptr+name_length>pool_size)or(str_ptr=max_strings)or
- (cur_length>0) then
- make_name_string:="?"
-else begin for k:=1 to name_length do append_char(xord[name_of_file[k]]);
+@z
+
+@x [29.525] l.10174 - make_name_string
+ make_name_string:=make_string;
+@y
make_name_string:=make_string;
{At this point we also set |cur_name|, |cur_ext|, and |cur_area| to
match the contents of |name_of_file|.}
@@ -1922,7 +1903,6 @@ else begin for k:=1 to name_length do append_char(xord[name_of_file[k]]);
end_name;
name_in_progress:=save_name_in_progress;
area_delimiter:=save_area_delimiter; ext_delimiter:=save_ext_delimiter;
- end;
@z
@x [29.526] l.10194 - stop scanning file name if we're at end-of-line.
@@ -2585,10 +2565,9 @@ else begin dvi_out(fnt1+1);
% We output each portion of the page as we get to it, if we are using
% IPC, so that the previewer (TeXView) can display it immediately. [SPM]
-@x [32.640] l.12690 - IPC
-dvi_out(eop); incr(total_pages); cur_s:=-1;
+@x [32.640] l.12723 - IPC
+done:
@y
-dvi_out(eop); incr(total_pages); cur_s:=-1;
ifdef ('IPC')
if ipc_on>0 then
begin if dvi_limit=half_buf then
@@ -2610,6 +2589,7 @@ if ipc_on>0 then
ipc_page(dvi_gone);
end;
endif ('IPC');
+done:
@z
@x [32.645] l.12766 - check dvi file size
@@ -2659,11 +2639,9 @@ if (qo(y)>=font_bc[g])and(qo(y)<=font_ec[g]) then
begin continue: q:=orig_char_info(g)(y);
@z
-@x [36.722] l.14172 - MLTeX: avoid substitution in |fetch|
-else begin if (qo(cur_c)>=font_bc[cur_f])and(qo(cur_c)<=font_ec[cur_f]) then
+@x [36.722] l.14207 - MLTeX: avoid substitution in |fetch|
cur_i:=char_info(cur_f)(cur_c)
@y
-else begin if (qo(cur_c)>=font_bc[cur_f])and(qo(cur_c)<=font_ec[cur_f]) then
cur_i:=orig_char_info(cur_f)(cur_c)
@z
@@ -3288,25 +3266,7 @@ if indented then
end;
@z
-@x
-begin print_err("Extra "); print_esc("endcsname");
-@.Extra \\endcsname@>
-help1("I'm ignoring this, since I wasn't doing a \csname.");
-@y
-begin
-if cur_chr = 10 then
-begin
- print_err("Extra "); print_esc("endmubyte");
-@.Extra \\endmubyte@>
- help1("I'm ignoring this, since I wasn't doing a \mubyte.");
-end else begin
- print_err("Extra "); print_esc("endcsname");
-@.Extra \\endcsname@>
- help1("I'm ignoring this, since I wasn't doing a \csname.");
-end;
-@z
-
-@x [48.1139] l.21650 - source specials
+@x [48.1142] l.21697 - source specials
if every_math<>null then begin_token_list(every_math,every_math_text);
@y
if (insert_src_special_every_math) then insert_src_special;
@@ -3393,11 +3353,11 @@ else begin n:=cur_chr; get_r_token; p:=cur_cs; define(p,relax,256);
% a) the string is already replaced in |scan_file_name| and therefore
% b) the wrong string will get flushed!!!
%
-@x [49.1257] l.23318 unused variable
+@x [49.1257] l.23328 unused variable
@!flushable_string:str_number; {string not yet referenced}
@y
@z
-@x [49.1260] l.23331 new_font: string recycling -- already done
+@x [49.1260] l.23383 new_font: string recycling -- already done
flushable_string:=str_ptr-1;
@y
@z
@@ -3416,7 +3376,7 @@ flushable_string:=str_ptr-1;
%
% otherwise the wrong string will get removed by |flush_string|!!
%
-@x [49.1260] l.23334 new_font: string recycling -- already done
+@x [49.1260] l.23386 new_font: string recycling -- already done
begin if cur_name=flushable_string then
begin flush_string; cur_name:=font_name[f];
end;
diff --git a/Build/source/texk/web2c/xetexdir/am/xetex.am b/Build/source/texk/web2c/xetexdir/am/xetex.am
index e578c9ee482..53702f67a7f 100644
--- a/Build/source/texk/web2c/xetexdir/am/xetex.am
+++ b/Build/source/texk/web2c/xetexdir/am/xetex.am
@@ -127,6 +127,7 @@ Xold_web_srcs = \
etexdir/etex.ch \
etexdir/tex.ch0 \
tex.ch \
+ xetexdir/tex.mod \
etexdir/tex.ch1 \
etexdir/tex.ech \
tex-binpool.ch \
diff --git a/Build/source/texk/web2c/xetexdir/tex.mod b/Build/source/texk/web2c/xetexdir/tex.mod
new file mode 100644
index 00000000000..61b923e6db5
--- /dev/null
+++ b/Build/source/texk/web2c/xetexdir/tex.mod
@@ -0,0 +1,81 @@
+% Compensate recent changes in ../tex.ch
+
+@x
+some operating systems put the file area last instead of first.)
+@^system dependencies@>
+
+@d check_quoted(#) == {check if string |#| needs quoting}
+if #<>0 then begin
+ j:=str_start[#];
+ while (not must_quote) and (j<str_start[#+1]) do begin
+ must_quote:=str_pool[j]=" "; incr(j);
+ end;
+end
+@#
+@d print_quoted(#) == {print string |#|, omitting quotes}
+if #<>0 then
+ for j:=str_start[#] to str_start[#+1]-1 do
+ if so(str_pool[j])<>"""" then
+ print(so(str_pool[j]))
+@y
+some operating systems put the file area last instead of first.)
+@^system dependencies@>
+@z
+
+@x
+check_quoted(a); check_quoted(n); check_quoted(e);
+@y
+if a<>0 then begin
+ j:=str_start[a];
+ while (not must_quote) and (j<str_start[a+1]) do begin
+ must_quote:=str_pool[j]=" "; incr(j);
+ end;
+end;
+if n<>0 then begin
+ j:=str_start[n];
+ while (not must_quote) and (j<str_start[n+1]) do begin
+ must_quote:=str_pool[j]=" "; incr(j);
+ end;
+end;
+if e<>0 then begin
+ j:=str_start[e];
+ while (not must_quote) and (j<str_start[e+1]) do begin
+ must_quote:=str_pool[j]=" "; incr(j);
+ end;
+end;
+@z
+
+@x
+print_quoted(a); print_quoted(n); print_quoted(e);
+@y
+if a<>0 then
+ for j:=str_start[a] to str_start[a+1]-1 do
+ if so(str_pool[j])<>"""" then
+ print(so(str_pool[j]));
+if n<>0 then
+ for j:=str_start[n] to str_start[n+1]-1 do
+ if so(str_pool[j])<>"""" then
+ print(so(str_pool[j]));
+if e<>0 then
+ for j:=str_start[e] to str_start[e+1]-1 do
+ if so(str_pool[j])<>"""" then
+ print(so(str_pool[j]));
+@z
+
+@x [48.1138] l.21648 - encTeX: \endmubyte primitive
+begin print_err("Extra "); print_esc("endcsname");
+@.Extra \\endcsname@>
+help1("I'm ignoring this, since I wasn't doing a \csname.");
+@y
+begin
+if cur_chr = 10 then
+begin
+ print_err("Extra "); print_esc("endmubyte");
+@.Extra \\endmubyte@>
+ help1("I'm ignoring this, since I wasn't doing a \mubyte.");
+end else begin
+ print_err("Extra "); print_esc("endcsname");
+@.Extra \\endcsname@>
+ help1("I'm ignoring this, since I wasn't doing a \csname.");
+end;
+@z
diff --git a/Build/source/texk/web2c/xetexdir/xetex.ch b/Build/source/texk/web2c/xetexdir/xetex.ch
index cd230bb423c..d74e3270a07 100644
--- a/Build/source/texk/web2c/xetexdir/xetex.ch
+++ b/Build/source/texk/web2c/xetexdir/xetex.ch
@@ -144,21 +144,6 @@ if last<>first then for k:=first to last-1 do print(buffer[k]);
@d max_halfword==@"3FFFFFFF {largest allowable value in a |halfword|}
@z
-@x
- words:=medium_node_size;
- end;
-@y
- words:=medium_node_size;
- end;
-margin_kern_node: begin
- r := get_node(margin_kern_node_size);
-{ fast_get_avail(margin_char(r)); }
-{ font(margin_char(r)) := font(margin_char(p)); }
-{ character(margin_char(r)) := character(margin_char(p)); }
- words := margin_kern_node_size;
- end;
-@z
-
@x [15.209] l.4165
@d shorthand_def=95 {code definition ( \.{\\chardef}, \.{\\countdef}, etc.~)}
@y
@@ -201,16 +186,12 @@ margin_kern_node: begin
@* \[29] File names.
@z
-@x
-@p function more_name(@!c:ASCII_code):boolean;
+@x [29.516] l.9992 - filenames: more_name
begin if (c=" ") and stop_at_space and (not quoted_filename) then
more_name:=false
else if c="""" then begin
quoted_filename:=not quoted_filename;
- more_name:=true;
- end
@y
-@p function more_name(@!c:ASCII_code):boolean;
begin if stop_at_space and (c=" ") and (file_name_quote_char=0) then
more_name:=false
else if stop_at_space and (file_name_quote_char<>0) and (c=file_name_quote_char) then begin
@@ -221,18 +202,15 @@ else if stop_at_space and (file_name_quote_char=0) and ((c="""") or (c="'") or (
if c="(" then file_name_quote_char:=")"
else file_name_quote_char:=c;
quoted_filename:=true;
- more_name:=true;
- end
@z
-@x
-@p procedure end_name;
-var temp_str: str_number; {result of file name cache lookups}
+@x [29.517] l.10002 - end_name: string recycling
@!j,@!s,@!t: pool_pointer; {running indices}
@!must_quote:boolean; {whether we need to quote a string}
-begin if str_ptr+3>max_strings then
- overflow("number of strings",max_strings-init_str_ptr);
-@:TeX capacity exceeded number of strings}{\quad number of strings@>
+@y
+@!j: pool_pointer; {running index}
+@z
+@x [29.517] l.10002 - end_name: string recycling
str_room(6); {Room for quotes, if needed.}
{add quotes if needed}
if area_delimiter<>0 then begin
@@ -287,18 +265,12 @@ if ext_delimiter<>0 then begin
end;
end;
@y
-@p procedure end_name;
-var temp_str: str_number; {result of file name cache lookups}
-@!j: pool_pointer; {running index}
-begin if str_ptr+3>max_strings then
- overflow("number of strings",max_strings-init_str_ptr);
-@:TeX capacity exceeded number of strings}{\quad number of strings@>
@z
@x
- str_start[str_ptr+1]:=str_start[str_ptr]+area_delimiter; incr(str_ptr);
+ for j:=str_start[str_ptr+1] to pool_ptr-1 do
@y
- str_start_macro(str_ptr+1):=str_start_macro(str_ptr)+area_delimiter; incr(str_ptr);
+ for j:=str_start_macro(str_ptr+1) to pool_ptr-1 do
@z
@x
@@ -307,42 +279,53 @@ begin if str_ptr+3>max_strings then
for j:=str_start_macro(str_ptr+1) to pool_ptr-1 do
@z
-@x
- str_start[str_ptr+1]:=str_start[str_ptr]+ext_delimiter-area_delimiter-1;
+@x [29.518] l.10042 - print_file_name: quote if spaces in names.
+@d check_quoted(#) == {check if string |#| needs quoting}
+if #<>0 then begin
+ j:=str_start[#];
+ while (not must_quote) and (j<str_start[#+1]) do begin
+ must_quote:=str_pool[j]=" "; incr(j);
+ end;
+end
@y
- str_start_macro(str_ptr+1):=str_start_macro(str_ptr)+ext_delimiter-area_delimiter-1;
+@d check_quoted(#) == {check if string |#| needs quoting}
+if #<>0 then begin
+ j:=str_start_macro(#);
+ while ((not must_quote) or (quote_char=0)) and (j<str_start_macro(#+1)) do begin
+ if (str_pool[j]=" ") then must_quote:=true
+ else if (str_pool[j]="""") or (str_pool[j]="'") then begin
+ must_quote:=true;
+ quote_char:="""" + "'" - str_pool[j];
+ end;
+ incr(j);
+ end;
+end
@z
-@x
- for j:=str_start[str_ptr+1] to pool_ptr-1 do
+@x [29.518] l.10042 - print_file_name: quote if spaces in names.
+@d print_quoted(#) == {print string |#|, omitting quotes}
+if #<>0 then
+ for j:=str_start[#] to str_start[#+1]-1 do
+ if so(str_pool[j])<>"""" then
+ print(so(str_pool[j]))
@y
- for j:=str_start_macro(str_ptr+1) to pool_ptr-1 do
+@d print_quoted(#) == {print string |#|, omitting quotes}
+if #<>0 then
+ for j:=str_start_macro(#) to str_start_macro(#+1)-1 do begin
+ if str_pool[j]=quote_char then begin
+ print(quote_char);
+ quote_char:="""" + "'" - quote_char;
+ print(quote_char);
+ end;
+ print(str_pool[j]);
+ end
@z
-@x
-procedure print_file_name(@!n,@!a,@!e:integer);
-var must_quote: boolean; {whether to quote the filename}
+@x [29.518] l.10042 - print_file_name: quote if spaces in names.
@!j:pool_pointer; {index into |str_pool|}
begin
must_quote:=false;
-if a<>0 then begin
- j:=str_start[a];
- while (not must_quote) and (j<str_start[a+1]) do begin
- must_quote:=str_pool[j]=" "; incr(j);
- end;
-end;
-if n<>0 then begin
- j:=str_start[n];
- while (not must_quote) and (j<str_start[n+1]) do begin
- must_quote:=str_pool[j]=" "; incr(j);
- end;
-end;
-if e<>0 then begin
- j:=str_start[e];
- while (not must_quote) and (j<str_start[e+1]) do begin
- must_quote:=str_pool[j]=" "; incr(j);
- end;
-end;
+check_quoted(a); check_quoted(n); check_quoted(e);
{FIXME: Alternative is to assume that any filename that has to be quoted has
at least one quoted component...if we pick this, a number of insertions
of |print_file_name| should go away.
@@ -350,94 +333,21 @@ end;
((|n|<>0)and(|str_pool|[|str_start|[|n|]]=""""))or
((|e|<>0)and(|str_pool|[|str_start|[|e|]]=""""));}
if must_quote then print_char("""");
-if a<>0 then
- for j:=str_start[a] to str_start[a+1]-1 do
- if so(str_pool[j])<>"""" then
- print(so(str_pool[j]));
-if n<>0 then
- for j:=str_start[n] to str_start[n+1]-1 do
- if so(str_pool[j])<>"""" then
- print(so(str_pool[j]));
-if e<>0 then
- for j:=str_start[e] to str_start[e+1]-1 do
- if so(str_pool[j])<>"""" then
- print(so(str_pool[j]));
+print_quoted(a); print_quoted(n); print_quoted(e);
if must_quote then print_char("""");
-end;
@y
-procedure print_file_name(@!n,@!a,@!e:integer);
-var @!must_quote: boolean; {whether to quote the filename}
@!quote_char: integer; {current quote char (single or double)}
@!j:pool_pointer; {index into |str_pool|}
begin
must_quote:=false;
quote_char:=0;
-if a<>0 then begin
- j:=str_start_macro(a);
- while ((not must_quote) or (quote_char=0)) and (j<str_start_macro(a+1)) do begin
- if (str_pool[j]=" ") then must_quote:=true
- else if (str_pool[j]="""") or (str_pool[j]="'") then begin
- must_quote:=true;
- quote_char:="""" + "'" - str_pool[j];
- end;
- incr(j);
- end;
-end;
-if n<>0 then begin
- j:=str_start_macro(n);
- while ((not must_quote) or (quote_char=0)) and (j<str_start_macro(n+1)) do begin
- if (str_pool[j]=" ") then must_quote:=true
- else if (str_pool[j]="""") or (str_pool[j]="'") then begin
- must_quote:=true;
- quote_char:="""" + "'" - str_pool[j];
- end;
- incr(j);
- end;
-end;
-if e<>0 then begin
- j:=str_start_macro(e);
- while ((not must_quote) or (quote_char=0)) and (j<str_start_macro(e+1)) do begin
- if (str_pool[j]=" ") then must_quote:=true
- else if (str_pool[j]="""") or (str_pool[j]="'") then begin
- must_quote:=true;
- quote_char:="""" + "'" - str_pool[j];
- end;
- incr(j);
- end;
-end;
+check_quoted(a); check_quoted(n); check_quoted(e);
if must_quote then begin
if quote_char=0 then quote_char:="""";
print_char(quote_char);
end;
-if a<>0 then
- for j:=str_start_macro(a) to str_start_macro(a+1)-1 do begin
- if str_pool[j]=quote_char then begin
- print(quote_char);
- quote_char:="""" + "'" - quote_char;
- print(quote_char);
- end;
- print(str_pool[j]);
- end;
-if n<>0 then
- for j:=str_start_macro(n) to str_start_macro(n+1)-1 do begin
- if str_pool[j]=quote_char then begin
- print(quote_char);
- quote_char:="""" + "'" - quote_char;
- print(quote_char);
- end;
- print(str_pool[j]);
- end;
-if e<>0 then
- for j:=str_start_macro(e) to str_start_macro(e+1)-1 do begin
- if str_pool[j]=quote_char then begin
- print(quote_char);
- quote_char:="""" + "'" - quote_char;
- print(quote_char);
- end;
- print(str_pool[j]);
- end;
+print_quoted(a); print_quoted(n); print_quoted(e);
if quote_char<>0 then print_char(quote_char);
-end;
@z
@x
@@ -462,14 +372,8 @@ end;
@x
name_of_file:= xmalloc_array (ASCII_code, length(a)+length(n)+length(e)+1);
-for j:=str_start[a] to str_start[a+1]-1 do append_to_name(so(str_pool[j]));
-for j:=str_start[n] to str_start[n+1]-1 do append_to_name(so(str_pool[j]));
-for j:=str_start[e] to str_start[e+1]-1 do append_to_name(so(str_pool[j]));
@y
name_of_file:= xmalloc_array (UTF8_code, (length(a)+length(n)+length(e))*3+1);
-for j:=str_start_macro(a) to str_start_macro(a+1)-1 do append_to_name(so(str_pool[j]));
-for j:=str_start_macro(n) to str_start_macro(n+1)-1 do append_to_name(so(str_pool[j]));
-for j:=str_start_macro(e) to str_start_macro(e+1)-1 do append_to_name(so(str_pool[j]));
@z
@x
@@ -487,62 +391,11 @@ for j:=1 to n do append_to_name(TEX_format_default[j]);
@z
@x
-@p function make_name_string:str_number;
-var k:1..file_name_size; {index into |name_of_file|}
-save_area_delimiter, save_ext_delimiter: pool_pointer;
-save_name_in_progress, save_stop_at_space: boolean;
-begin if (pool_ptr+name_length>pool_size)or(str_ptr=max_strings)or
- (cur_length>0) then
- make_name_string:="?"
-else begin for k:=1 to name_length do append_char(xord[name_of_file[k]]);
- make_name_string:=make_string;
- {At this point we also set |cur_name|, |cur_ext|, and |cur_area| to
- match the contents of |name_of_file|.}
- save_area_delimiter:=area_delimiter; save_ext_delimiter:=ext_delimiter;
- save_name_in_progress:=name_in_progress; save_stop_at_space:=stop_at_space;
- name_in_progress:=true;
- begin_name;
- stop_at_space:=false;
k:=1;
while (k<=name_length)and(more_name(name_of_file[k])) do
- incr(k);
- stop_at_space:=save_stop_at_space;
- end_name;
- name_in_progress:=save_name_in_progress;
- area_delimiter:=save_area_delimiter; ext_delimiter:=save_ext_delimiter;
- end;
-end;
@y
-@p function make_name_string:str_number;
-var k:0..file_name_size; {index into |name_of_file|}
-save_area_delimiter, save_ext_delimiter: pool_pointer;
-save_name_in_progress, save_stop_at_space: boolean;
-begin if (pool_ptr+name_length>pool_size)or(str_ptr=max_strings)or
- (cur_length>0) then
- make_name_string:="?"
-else begin
- make_utf16_name;
- for k:=0 to name_length16-1 do append_char(name_of_file16[k]);
- make_name_string:=make_string;
- {At this point we also set |cur_name|, |cur_ext|, and |cur_area| to
- match the contents of |name_of_file|.}
- save_area_delimiter:=area_delimiter; save_ext_delimiter:=ext_delimiter;
- save_name_in_progress:=name_in_progress; save_stop_at_space:=stop_at_space;
- name_in_progress:=true;
- begin_name;
- stop_at_space:=false;
k:=0;
while (k<name_length16)and(more_name(name_of_file16[k])) do
- incr(k);
- stop_at_space:=save_stop_at_space;
- end_name;
- name_in_progress:=save_name_in_progress;
- area_delimiter:=save_area_delimiter; ext_delimiter:=save_ext_delimiter;
- end;
-end;
-function u_make_name_string(var f:unicode_file):str_number;
-begin u_make_name_string:=make_name_string;
-end;
@z
@x
@@ -564,11 +417,9 @@ end;
@z
@x
- if kpse_in_name_ok(stringcast(name_of_file+1))
and a_open_in(cur_file, kpse_tex_format) then
goto done;
@y
- if kpse_in_name_ok(stringcast(name_of_file+1))
and u_open_in(cur_file, kpse_tex_format, XeTeX_default_input_mode, XeTeX_default_input_encoding) then
{At this point |name_of_file| contains the actual name found, as a UTF8 string.
We convert to UTF16, then extract the |cur_area|, |cur_name|, and |cur_ext| from it.}
@@ -627,10 +478,8 @@ end;
@z
@x
-@d start_font_error_message==print_err("Font "); sprint_cs(u);
print_char("="); print_file_name(nom,aire,"");
@y
-@d start_font_error_message==print_err("Font "); sprint_cs(u);
print_char("=");
if file_name_quote_char=")" then print_char("(")
else if file_name_quote_char<>0 then print_char(file_name_quote_char);
@@ -665,7 +514,12 @@ begin if tracing_lost_chars>0 then
begin begin_diagnostic;
print_nl("Missing character: There is no ");
@.Missing character@>
- print_ASCII(c); print(" in font ");
+ if c < @"10000 then print_ASCII(c)
+ else begin { non-Plane 0 Unicodes can't be sent through |print_ASCII| }
+ print("character number ");
+ print_hex(c);
+ end;
+ print(" in font ");
slow_print(font_name[f]); print_char("!"); end_diagnostic(false);
end;
tracing_online:=old_setting;
@@ -712,74 +566,14 @@ label reswitch, move_past, fin_rule, next_p, continue, found, check_next, end_no
@z
@x
-@p procedure vlist_out; {output a |vlist_node| box}
-@y
-@p procedure vlist_out; {output a |vlist_node| box}
-@z
-
-@x
-@!cur_g:scaled; {rounded equivalent of |cur_glue| times the glue ratio}
-begin cur_g:=0; cur_glue:=float_constant(0);
-this_box:=temp_ptr; g_order:=glue_order(this_box);
-g_sign:=glue_sign(this_box); p:=list_ptr(this_box);
-incr(cur_s);
-if cur_s>0 then dvi_out(push);
-if cur_s>max_push then max_push:=cur_s;
-save_loc:=dvi_offset+dvi_ptr; left_edge:=cur_h; cur_v:=cur_v-height(this_box);
-@y
-@!cur_g:scaled; {rounded equivalent of |cur_glue| times the glue ratio}
-@!upwards:boolean; {whether we're stacking upwards}
-begin cur_g:=0; cur_glue:=float_constant(0);
-this_box:=temp_ptr; g_order:=glue_order(this_box);
-g_sign:=glue_sign(this_box); p:=list_ptr(this_box);
-upwards:=(subtype(this_box)=min_quarterword+1);
-incr(cur_s);
-if cur_s>0 then dvi_out(push);
-if cur_s>max_push then max_push:=cur_s;
-save_loc:=dvi_offset+dvi_ptr; left_edge:=cur_h;
-if upwards then cur_v:=cur_v+depth(this_box) else cur_v:=cur_v-height(this_box);
-@z
-
-@x
-@<Output a box in a vlist@>=
if list_ptr(p)=null then cur_v:=cur_v+height(p)+depth(p)
@y
-@<Output a box in a vlist@>=
if list_ptr(p)=null then begin
if upwards then cur_v:=cur_v-depth(p)-height(p) else cur_v:=cur_v+height(p)+depth(p);
end
@z
@x
-else begin cur_v:=cur_v+height(p); synch_v;
- save_h:=dvi_h; save_v:=dvi_v;
- if cur_dir=right_to_left then cur_h:=left_edge-shift_amount(p)
- else cur_h:=left_edge+shift_amount(p); {shift the box right}
- temp_ptr:=p;
- if type(p)=vlist_node then vlist_out@+else hlist_out;
- dvi_h:=save_h; dvi_v:=save_v;
- cur_v:=save_v+depth(p); cur_h:=left_edge;
- end
-@y
-else begin if upwards then cur_v:=cur_v-depth(p) else cur_v:=cur_v+height(p); synch_v;
- save_h:=dvi_h; save_v:=dvi_v;
- if cur_dir=right_to_left then cur_h:=left_edge-shift_amount(p)
- else cur_h:=left_edge+shift_amount(p); {shift the box right}
- temp_ptr:=p;
- if type(p)=vlist_node then vlist_out@+else hlist_out;
- dvi_h:=save_h; dvi_v:=save_v;
- if upwards then cur_v:=save_v-height(p) else cur_v:=save_v+depth(p); cur_h:=left_edge;
- end
-@z
-
-@x
-dvi_out(eop); incr(total_pages); cur_s:=-1;
-@y
-dvi_out(eop); incr(total_pages); cur_s:=-1;
-if not no_pdf_output then fflush(dvi_file);
-@z
-
-@x
print_nl("Output written on "); print_file_name(0, output_file_name, 0);
@.Output written on x@>
print(" ("); print_int(total_pages);
@@ -813,27 +607,7 @@ if not no_pdf_output then fflush(dvi_file);
@* \[36] Typesetting math formulas.
@z
-% Conflict with ../tex.ch
-@x
-@p procedure fetch(@!a:pointer); {unpack the |math_char| field |a|}
-begin cur_c:=character(a); cur_f:=fam_fnt(fam(a)+cur_size);
-if cur_f=null_font then
- @<Complain about an undefined family and set |cur_i| null@>
-else begin if (qo(cur_c)>=font_bc[cur_f])and(qo(cur_c)<=font_ec[cur_f]) then
- cur_i:=orig_char_info(cur_f)(cur_c)
-@y
-@p procedure fetch(@!a:pointer); {unpack the |math_char| field |a|}
-begin cur_c:=cast_to_ushort(character(a)); cur_f:=fam_fnt(fam(a)+cur_size);
-cur_c:=cur_c + (plane_and_fam_field(a) div @"100) * @"10000;
-if cur_f=null_font then
- @<Complain about an undefined family and set |cur_i| null@>
-else if is_native_font(cur_f) then begin
- cur_i:=null_character;
-end else begin if (qo(cur_c)>=font_bc[cur_f])and(qo(cur_c)<=font_ec[cur_f]) then
- cur_i:=orig_char_info(cur_f)(cur_c)
-@z
-
-@x
+@x [36.749] l.14638 - MLTeX: avoid substitution in |make_op|
begin c:=rem_byte(cur_i); i:=orig_char_info(cur_f)(c);
@y
begin c:=rem_byte(cur_i); i:=orig_char_info(cur_f)(c);
@@ -903,83 +677,18 @@ for k:=0 to biggest_lang do trie_used[k]:=min_trie_op;
@z
@x
-@* \[46] The chief executive.
-@y
-@* \[46] The chief executive.
-@z
-
-% Revert ../tex.ch
-@x
-procedure cs_error;
-begin
-if cur_chr = 10 then
-begin
- print_err("Extra "); print_esc("endmubyte");
-@.Extra \\endmubyte@>
- help1("I'm ignoring this, since I wasn't doing a \mubyte.");
-end else begin
- print_err("Extra "); print_esc("endcsname");
-@.Extra \\endcsname@>
- help1("I'm ignoring this, since I wasn't doing a \csname.");
-end;
-@y
-procedure cs_error;
-begin print_err("Extra "); print_esc("endcsname");
-@.Extra \\endcsname@>
-help1("I'm ignoring this, since I wasn't doing a \csname.");
-@z
-
-@x
@* \[49] Mode-independent processing.
@y
@* \[49] Mode-independent processing.
@z
-% Conflict with ../tex.ch
-@x
+@x [49.1222] l.22833 - MLTeX: \charsubdef primitive
else begin n:=cur_chr; get_r_token; p:=cur_cs; define(p,relax,256);
@y
else begin n:=cur_chr; get_r_token; p:=cur_cs; define(p,relax,too_big_usv);
@z
-% Conflict with ../tex.ch
-@x
-for f:=font_base+1 to font_ptr do
- if str_eq_str(font_name[f],cur_name)and str_eq_str(font_area[f],cur_area) then
- begin if s>0 then
- begin if s=font_size[f] then goto common_ending;
- end
- else if font_size[f]=xn_over_d(font_dsize[f],-s,1000) then
- goto common_ending;
- end
-@y
-for f:=font_base+1 to font_ptr do begin
- if str_eq_str(font_name[f],cur_name) and
- (((cur_area = "") and is_native_font(f)) or str_eq_str(font_area[f],cur_area)) then
- begin if s>0 then
- begin if s=font_size[f] then goto common_ending;
- end
- else if font_size[f]=xn_over_d(font_dsize[f],-s,1000) then
- goto common_ending;
- end;
- { could be a native font whose "name" ended up partly in area or extension }
- append_str(cur_area); append_str(cur_name); append_str(cur_ext);
- if str_eq_str(font_name[f], make_string) then begin
- flush_string;
- if is_native_font(f) then
- begin if s>0 then
- begin if s=font_size[f] then goto common_ending;
- end
- else if font_size[f]=xn_over_d(font_dsize[f],-s,1000) then
- goto common_ending;
- end
- end
- else flush_string;
- end
-@z
-
-% Conflict with ../tex.ch
-@x
+@x [49.1275] l.23441 - Same stuff as for \input, this time for \openin.
and a_open_in(read_file[n], kpse_tex_format) then
read_open[n]:=just_open;
@y
diff --git a/Build/source/texk/web2c/xetexdir/xetex.web b/Build/source/texk/web2c/xetexdir/xetex.web
index fcf5f53907f..f83ede40cc0 100644
--- a/Build/source/texk/web2c/xetexdir/xetex.web
+++ b/Build/source/texk/web2c/xetexdir/xetex.web
@@ -4461,6 +4461,13 @@ glue_node: begin r:=get_node(small_node_size); add_glue_ref(glue_ptr(p));
kern_node,math_node,penalty_node: begin r:=get_node(small_node_size);
words:=small_node_size;
end;
+margin_kern_node: begin
+ r := get_node(margin_kern_node_size);
+{ fast_get_avail(margin_char(r)); }
+{ font(margin_char(r)) := font(margin_char(p)); }
+{ character(margin_char(r)) := character(margin_char(p)); }
+ words := margin_kern_node_size;
+ end;
ligature_node: begin r:=get_node(small_node_size);
mem[lig_char(r)]:=mem[lig_char(p)]; {copy |font| and |character|}
lig_ptr(r):=copy_node_list(lig_ptr(p));
@@ -11362,13 +11369,13 @@ begin if str_ptr+3>max_strings then
@:TeX capacity exceeded number of strings}{\quad number of strings@>
if area_delimiter=0 then cur_area:=""
else begin cur_area:=str_ptr;
- str_start[str_ptr+1]:=str_start[str_ptr]+area_delimiter; incr(str_ptr);
+ str_start_macro(str_ptr+1):=str_start_macro(str_ptr)+area_delimiter; incr(str_ptr);
end;
if ext_delimiter=0 then
begin cur_ext:=""; cur_name:=make_string;
end
else begin cur_name:=str_ptr;
- str_start[str_ptr+1]:=str_start[str_ptr]+ext_delimiter-area_delimiter-1;
+ str_start_macro(str_ptr+1):=str_start_macro(str_ptr)+ext_delimiter-area_delimiter-1;
incr(str_ptr); cur_ext:=make_string;
end;
end;
@@ -11398,9 +11405,9 @@ var k:integer; {number of positions filled in |name_of_file|}
@!c: ASCII_code; {character being packed}
@!j:pool_pointer; {index into |str_pool|}
begin k:=0;
-for j:=str_start[a] to str_start[a+1]-1 do append_to_name(so(str_pool[j]));
-for j:=str_start[n] to str_start[n+1]-1 do append_to_name(so(str_pool[j]));
-for j:=str_start[e] to str_start[e+1]-1 do append_to_name(so(str_pool[j]));
+for j:=str_start_macro(a) to str_start_macro(a+1)-1 do append_to_name(so(str_pool[j]));
+for j:=str_start_macro(n) to str_start_macro(n+1)-1 do append_to_name(so(str_pool[j]));
+for j:=str_start_macro(e) to str_start_macro(e+1)-1 do append_to_name(so(str_pool[j]));
if k<=file_name_size then name_length:=k@+else name_length:=file_name_size;
for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';
end;
@@ -11502,14 +11509,19 @@ This routine might be called after string memory has overflowed, hence
we dare not use `|str_room|'.
@p function make_name_string:str_number;
-var k:1..file_name_size; {index into |name_of_file|}
+var k:0..file_name_size; {index into |name_of_file|}
begin if (pool_ptr+name_length>pool_size)or(str_ptr=max_strings)or
(cur_length>0) then
make_name_string:="?"
-else begin for k:=1 to name_length do append_char(xord[name_of_file[k]]);
+else begin
+ make_utf16_name;
+ for k:=0 to name_length16-1 do append_char(name_of_file16[k]);
make_name_string:=make_string;
end;
end;
+function u_make_name_string(var f:unicode_file):str_number;
+begin u_make_name_string:=make_name_string;
+end;
function a_make_name_string(var f:alpha_file):str_number;
begin a_make_name_string:=make_name_string;
end;
@@ -12691,7 +12703,12 @@ begin if tracing_lost_chars>0 then
begin begin_diagnostic;
print_nl("Missing character: There is no ");
@.Missing character@>
- print_ASCII(c); print(" in font ");
+ if c < @"10000 then print_ASCII(c)
+ else begin { non-Plane 0 Unicodes can't be sent through |print_ASCII| }
+ print("character number ");
+ print_hex(c);
+ end;
+ print(" in font ");
slow_print(font_name[f]); print_char("!"); end_diagnostic(false);
end;
tracing_online:=old_setting;
@@ -14148,13 +14165,16 @@ var left_edge: scaled; {the left coordinate for this box}
@!glue_temp:real; {glue value before rounding}
@!cur_glue:real; {glue seen so far}
@!cur_g:scaled; {rounded equivalent of |cur_glue| times the glue ratio}
+@!upwards:boolean; {whether we're stacking upwards}
begin cur_g:=0; cur_glue:=float_constant(0);
this_box:=temp_ptr; g_order:=glue_order(this_box);
g_sign:=glue_sign(this_box); p:=list_ptr(this_box);
+upwards:=(subtype(this_box)=min_quarterword+1);
incr(cur_s);
if cur_s>0 then dvi_out(push);
if cur_s>max_push then max_push:=cur_s;
-save_loc:=dvi_offset+dvi_ptr; left_edge:=cur_h; cur_v:=cur_v-height(this_box);
+save_loc:=dvi_offset+dvi_ptr; left_edge:=cur_h;
+if upwards then cur_v:=cur_v+depth(this_box) else cur_v:=cur_v-height(this_box);
top_edge:=cur_v;
while p<>null do @<Output node |p| for |vlist_out| and move to the next node,
maintaining the condition |cur_h=left_edge|@>;
@@ -14192,14 +14212,14 @@ usually be constant.
@<Output a box in a vlist@>=
if list_ptr(p)=null then cur_v:=cur_v+height(p)+depth(p)
-else begin cur_v:=cur_v+height(p); synch_v;
+else begin if upwards then cur_v:=cur_v-depth(p) else cur_v:=cur_v+height(p); synch_v;
save_h:=dvi_h; save_v:=dvi_v;
if cur_dir=right_to_left then cur_h:=left_edge-shift_amount(p)
else cur_h:=left_edge+shift_amount(p); {shift the box right}
temp_ptr:=p;
if type(p)=vlist_node then vlist_out@+else hlist_out;
dvi_h:=save_h; dvi_v:=save_v;
- cur_v:=save_v+depth(p); cur_h:=left_edge;
+ if upwards then cur_v:=save_v-height(p) else cur_v:=save_v+depth(p); cur_h:=left_edge;
end
@ @<Output a rule in a vlist...@>=
@@ -14370,6 +14390,7 @@ cur_v:=height(p)+v_offset; { does this need changing for upwards mode ???? }
temp_ptr:=p;
if type(p)=vlist_node then vlist_out@+else hlist_out;
dvi_out(eop); incr(total_pages); cur_s:=-1;
+if not no_pdf_output then fflush(dvi_file);
done:
@ Sometimes the user will generate a huge page because other error messages
@@ -16261,10 +16282,13 @@ nonexistent characters; in such cases, |char_exists(cur_i)| will be |false|
after |fetch| has acted, and the field will also have been reset to |empty|.
@p procedure fetch(@!a:pointer); {unpack the |math_char| field |a|}
-begin cur_c:=character(a); cur_f:=fam_fnt(fam(a)+cur_size);
+begin cur_c:=cast_to_ushort(character(a)); cur_f:=fam_fnt(fam(a)+cur_size);
+cur_c:=cur_c + (plane_and_fam_field(a) div @"100) * @"10000;
if cur_f=null_font then
@<Complain about an undefined family and set |cur_i| null@>
-else begin if (qo(cur_c)>=font_bc[cur_f])and(qo(cur_c)<=font_ec[cur_f]) then
+else if is_native_font(cur_f) then begin
+ cur_i:=null_character;
+end else begin if (qo(cur_c)>=font_bc[cur_f])and(qo(cur_c)<=font_ec[cur_f]) then
cur_i:=char_info(cur_f)(cur_c)
else cur_i:=null_character;
if not(char_exists(cur_i)) then
@@ -26862,8 +26886,9 @@ the new name becomes the font identifier of record. Font names `\.{xyz}' and
@<If this font has already been loaded...@>=
flushable_string:=str_ptr-1;
-for f:=font_base+1 to font_ptr do
- if str_eq_str(font_name[f],cur_name)and str_eq_str(font_area[f],cur_area) then
+for f:=font_base+1 to font_ptr do begin
+ if str_eq_str(font_name[f],cur_name) and
+ (((cur_area = "") and is_native_font(f)) or str_eq_str(font_area[f],cur_area)) then
begin if cur_name=flushable_string then
begin flush_string; cur_name:=font_name[f];
end;
@@ -26872,7 +26897,21 @@ for f:=font_base+1 to font_ptr do
end
else if font_size[f]=xn_over_d(font_dsize[f],-s,1000) then
goto common_ending;
+ end;
+ { could be a native font whose "name" ended up partly in area or extension }
+ append_str(cur_area); append_str(cur_name); append_str(cur_ext);
+ if str_eq_str(font_name[f], make_string) then begin
+ flush_string;
+ if is_native_font(f) then
+ begin if s>0 then
+ begin if s=font_size[f] then goto common_ending;
+ end
+ else if font_size[f]=xn_over_d(font_dsize[f],-s,1000) then
+ goto common_ending;
+ end
end
+ else flush_string;
+ end
@ @<Cases of |print_cmd_chr|...@>=
set_font:begin print("select font ");