summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/euptexdir/euptex.ch1
blob: f4973c7ff1acaf4d5469f630e8c8259404997f14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
@x e-upTeX: logo
\def\epTeX{$\varepsilon$-\pTeX}
@y
\def\epTeX{$\varepsilon$-\pTeX}
\def\eupTeX{$\varepsilon$-\upTeX}
@z

@x e-upTeX: banner
  {printed when \upTeX\ starts}
@y
  {printed when \upTeX\ starts}
@#
@d eupTeX_version==pTeX_version_string,upTeX_version_string,epTeX_version_string,eTeX_version_string
@d eupTeX_banner=='This is e-upTeX, Version 3.141592653',eupTeX_version
@d eupTeX_banner_k==eupTeX_banner
  {printed when \eupTeX\ starts}
@z

@x [1.2]
@d banner==epTeX_banner
@d banner_k==epTeX_banner_k
@y
@d banner==eupTeX_banner
@d banner_k==eupTeX_banner_k
@z

@x
@d protected_token=@'7001 {$2^8\cdot|end_match|+1$}
@y
@d protected_token=@"E01 {$2^8\cdot|end_match|+1$}
@z

@x
@d eptex_version_code=ptex_version_code+1 {code for \.{\\epTeXversion}}
@y
@d uptex_version_code=ptex_version_code+1 {code for \.{\\uptexversion}}
@d eptex_version_code=uptex_version_code+1 {code for \.{\\epTeXversion}}
@z

@x e-upTeX: \currentcjktoken
@d eTeX_dim=eTeX_int+10 {first of \eTeX\ codes for dimensions}
@y
@d eTeX_dim=eTeX_int+11 {first of \eTeX\ codes for dimensions}
@z

@x
  eptex_version_code: print_esc("epTeXversion");
@y
  uptex_version_code: print_esc("uptexversion");
  eptex_version_code: print_esc("epTeXversion");
@z

@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

@x
  eptex_version_code: cur_val:=epTeX_version_number;
@y
  uptex_version_code: cur_val:=upTeX_version;
  eptex_version_code: cur_val:=epTeX_version_number;
@z

@x
@ @<Handle \.{\\readline} and |goto done|@>=
if j=1 then
  begin while loc<=limit do {current line not yet finished}
    begin cur_chr:=buffer[loc]; incr(loc);
    if multistrlen(ustringcast(buffer), limit+1, loc-1)=2 then
      begin cur_tok:=fromBUFF(ustringcast(buffer),  limit+1, loc-1); incr(loc);
      end
    else if cur_chr=" " then cur_tok:=space_token
    @+else cur_tok:=cur_chr+other_token;
@y
@ @<Handle \.{\\readline} and |goto done|@>=
if j=1 then
  begin while loc<=limit do {current line not yet finished}
    begin cur_chr:=fromBUFF(ustringcast(buffer), limit+1, loc);
    cur_tok:=kcat_code(kcatcodekey(cur_chr));
    if (multistrlen(ustringcast(buffer), limit+1,loc)>1)and
         check_kcat_code(cur_tok) then
      begin if (cur_tok=not_cjk) then cur_tok:=other_kchar;
	  cur_tok:=cur_chr+cur_tok*max_cjk_val;
	  loc:=loc+multistrlen(ustringcast(buffer), limit+1,loc);
      end
    else begin cur_chr:=buffer[loc]; incr(loc);
      if cur_chr=" " then cur_tok:=space_token
      else cur_tok:=cur_chr+other_token;
    end;
@z

@x e-pTeX: ifcsname l.28620
    begin buffer[m]:=Hi(info(p)); buffer2[m]:=1; incr(m); buffer2[m]:=1;
    end
  else buffer2[m]:=0;
  buffer[m]:=Lo(info(p)); incr(m); p:=link(p);
@y
    begin
    if BYTE1(toBUFF(info(p) mod max_cjk_val))<>0 then
      begin buffer[m]:=BYTE1(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m); end;
    if BYTE2(toBUFF(info(p) mod max_cjk_val))<>0 then
      begin buffer[m]:=BYTE2(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m); end;
    if BYTE3(toBUFF(info(p) mod max_cjk_val))<>0 then
      begin buffer[m]:=BYTE3(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m); end;
    buffer[m]:=BYTE4(toBUFF(info(p) mod max_cjk_val)); buffer2[m]:=1; incr(m);
    p:=link(p);
    end
  else
    begin buffer[m]:=info(p) mod max_char_val; buffer2[m]:=0; incr(m); p:=link(p);
    end;
@z

@x e-upTeX: fetch \(disable|enable|force)cjktoken status
@* \[54] System-dependent changes.
@y
@ The \.{\\currentcjktoken} command returns the current \upTeX's
status of \.{\\(disable|enable|force)cjktoken}.

@d current_cjk_token_code=eTeX_int+10 {code for \.{\\currentcjktoken}}

@<Generate all \eTeX...@>=
primitive("currentcjktoken",last_item,current_cjk_token_code);
@!@:current_cjk_token_}{\.{\\currentcjktoken} primitive@>

@ @<Cases of |last_item| for |print_cmd_chr|@>=
current_cjk_token_code: print_esc("currentcjktoken");

@ @<Cases for fetching an integer value@>=
current_cjk_token_code: cur_val:=enable_cjk_token;

@* \[54] System-dependent changes.
@z