~ubuntu-branches/ubuntu/jaunty/texlive-bin/jaunty-security

« back to all changes in this revision

Viewing changes to build/source/texk/web2c/eomegadir/eomem-rc1.ch

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2008-06-26 23:14:59 UTC
  • mfrom: (2.1.30 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080626231459-y02rjsrgtafu83yr
Tags: 2007.dfsg.2-3
add missing source roadmap.fig of roadmap.eps in fontinst documentation
(Closes: #482915) (urgency medium due to RC bug)
(new patch add-missing-fontinst-source)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
% vim ft=ch
 
2
% This file is part of the e-Omega project
 
3
% Purpouse of this file: adapting e-TeX to Omega memory management
 
4
% Most registers are reverted to the Omega model. The only exception
 
5
% is markings.
 
6
%---------------------------------------
 
7
 @x eobase.ch l.672
 
8
begin if eTeX_ex and(eqtb[p].int=w) then
 
9
 @y
 
10
begin if eTeX_ex and(new_eqtb_int(p)=w) then
 
11
 @z
 
12
%---------------------------------------
 
13
@x eobase.ch l.1071
 
14
    if m=mem_bot then
 
15
      begin scan_register_num;
 
16
      if cur_val<256 then cur_val:=equiv(toks_base+cur_val)
 
17
      else  begin find_sa_element(tok_val,cur_val,false);
 
18
        if cur_ptr=null then cur_val:=null
 
19
        else cur_val:=sa_ptr(cur_ptr);
 
20
        end;
 
21
      end
 
22
    else cur_val:=sa_ptr(m)
 
23
  else cur_val:=equiv(m);
 
24
  cur_val_level:=tok_val;
 
25
@y
 
26
    begin scan_eight_bit_int; m:=toks_base+cur_val;
 
27
    end;
 
28
  scanned_result(equiv(m))(tok_val);
 
29
@z
 
30
%----------------------------------------
 
31
@x l.1220
 
32
begin if (m<mem_bot)or(m>lo_mem_stat_max) then
 
33
  begin cur_val_level:=sa_type(m);
 
34
  if cur_val_level<glue_val then cur_val:=sa_int(m)
 
35
  else cur_val:=sa_ptr(m);
 
36
  end
 
37
else  begin scan_register_num; cur_val_level:=m-mem_bot;
 
38
  if cur_val>255 then
 
39
    begin find_sa_element(cur_val_level,cur_val,false);
 
40
    if cur_ptr=null then
 
41
      if cur_val_level<glue_val then cur_val:=0
 
42
      else cur_val:=zero_glue
 
43
    else if cur_val_level<glue_val then cur_val:=sa_int(cur_ptr)
 
44
    else cur_val:=sa_ptr(cur_ptr);
 
45
    end
 
46
  else
 
47
  case cur_val_level of
 
48
@y
 
49
begin scan_eight_bit_int;
 
50
case m of
 
51
@z
 
52
%---------------------------------------
 
53
@x
 
54
  end;
 
55
@y
 
56
cur_val_level:=m;
 
57
@z
 
58
%----------------------------------------
 
59
@x l.1420
 
60
 if eTeX_ex and(tracing_lost_chars>1) then tracing_online:=1;
 
61
@y
 
62
 if eTeX_ex and(tracing_lost_chars>1) then set_new_eqtb_int(int_base+tracing_online_code,1);
 
63
@z
 
64
%----------------------------------------
 
65
@x 
 
66
 tracing_online:=old_setting;
 
67
@y
 
68
 set_new_eqtb_int(int_base+tracing_online_code,old_setting);
 
69
@z
 
70
%----------------------------------------
 
71
@x eobase.ch l.2309
 
72
begin if box_context<global_box_flag then
 
73
  begin cur_val:=box_context-box_flag; a:=0;
 
74
  end
 
75
else  begin cur_val:=box_context-global_box_flag; a:=4;
 
76
  end;
 
77
if cur_val<256 then define(box_base+cur_val,box_ref,cur_box)
 
78
else sa_def_box;
 
79
end
 
80
@y
 
81
if box_context<box_flag+number_regs then
 
82
  eq_define(box_base-box_flag+box_context,box_ref,cur_box)
 
83
else geq_define(box_base-box_flag-number_regs+box_context,box_ref,cur_box)
 
84
@z
 
85
%---------------------------------------
 
86
@x eobase.ch l.2328
 
87
@!n:halfword; {a box number}
 
88
begin case cur_chr of
 
89
box_code: begin scan_register_num; fetch_box(cur_box);
 
90
  set_equiv(box_base+cur_val,null);
 
91
      {the box becomes void, at the same level}
 
92
  end;
 
93
copy_code: begin scan_register_num; fetch_box(q); cur_box:=copy_node_list(q);
 
94
@y
 
95
@!n:eight_bits; {a box number}
 
96
begin case cur_chr of
 
97
box_code: begin scan_eight_bit_int; cur_box:=box(cur_val);
 
98
  set_equiv(box_base+cur_val,null);
 
99
      {the box becomes void, at the same level}
 
100
  end;
 
101
copy_code: begin scan_eight_bit_int; cur_box:=copy_node_list(box(cur_val));
 
102
@z
 
103
%---------------------------------------
 
104
@x eobase.ch l.2359
 
105
begin scan_register_num; n:=cur_val;
 
106
@y
 
107
begin scan_eight_bit_int; n:=cur_val;
 
108
@z
 
109
%---------------------------------------
 
110
@x eobase.ch l.2422
 
111
begin if cur_chr>copy_code then @<Handle saved items and |goto done|@>;
 
112
c:=cur_chr; scan_register_num; fetch_box(p);
 
113
@y
 
114
begin if cur_chr>copy_code then @<Handle saved items and |goto done|@>;
 
115
c:=cur_chr; scan_eight_bit_int; p:=box(cur_val);
 
116
@z
 
117
%---------------------------------------
 
118
@x eobase.ch l.2431
 
119
else  begin link(tail):=list_ptr(p);
 
120
change_box(null);
 
121
@y
 
122
else  begin link(tail):=list_ptr(p);
 
123
set_equiv(box_base+cur_val,null);
 
124
@z
 
125
%----------------------------------------
 
126
@x eobase.ch l.2698
 
127
  othercases begin scan_register_num;
 
128
    if cur_val>255 then
 
129
      begin j:=n-count_def_code; {|int_val..box_val|}
 
130
      if j>mu_val then j:=tok_val; {|int_val..mu_val| or |tok_val|}
 
131
      find_sa_element(j,cur_val,true); add_sa_ref(cur_ptr);
 
132
      if j=tok_val then j:=toks_register@+else j:=register;
 
133
      define(p,j,cur_ptr);
 
134
      end
 
135
    else
 
136
@y
 
137
  othercases begin scan_eight_bit_int;
 
138
@z
 
139
%---------------------------------------
 
140
@x eobase.ch l.2726
 
141
  e:=false; {just in case, will be set |true| for sparse array elements}
 
142
  if cur_cmd=toks_register then
 
143
    if cur_chr=mem_bot then
 
144
      begin scan_register_num;
 
145
      if cur_val>255 then
 
146
        begin find_sa_element(tok_val,cur_val,true);
 
147
        cur_chr:=cur_ptr; e:=true;
 
148
        end
 
149
      else cur_chr:=toks_base+cur_val;
 
150
      end
 
151
    else e:=true;
 
152
  p:=cur_chr; {|p=every_par_loc| or |output_routine_loc| or \dots}
 
153
@y
 
154
  if cur_cmd=toks_register then
 
155
    begin scan_eight_bit_int; p:=toks_base+cur_val;
 
156
    end
 
157
  else p:=cur_chr; {|p=every_par_loc| or |output_routine_loc| or \dots}
 
158
@z
 
159
%---------------------------------------
 
160
@x eobase.ch l.2746
 
161
    begin sa_define(p,null)(p,undefined_cs,null); free_avail(def_ref);
 
162
    end
 
163
  else  begin if (p=output_routine_loc)and not e then {enclose in curlies}
 
164
@y
 
165
    begin define(p,undefined_cs,null); free_avail(def_ref);
 
166
    end
 
167
  else  begin if p=output_routine_loc then {enclose in curlies}
 
168
@z
 
169
%---------------------------------------
 
170
@x eobase.ch l.2754
 
171
    sa_define(p,def_ref)(p,call,def_ref);
 
172
@y
 
173
    define(p,call,def_ref);
 
174
@z
 
175
%---------------------------------------
 
176
@x eobase.ch l.2770
 
177
if (cur_cmd=toks_register)or(cur_cmd=assign_toks) then
 
178
  begin if cur_cmd=toks_register then
 
179
    if cur_chr=mem_bot then
 
180
      begin scan_register_num;
 
181
      if cur_val<256 then q:=equiv(toks_base+cur_val)
 
182
      else  begin find_sa_element(tok_val,cur_val,false);
 
183
        if cur_ptr=null then q:=null
 
184
        else q:=sa_ptr(cur_ptr);
 
185
        end;
 
186
      end
 
187
    else q:=sa_ptr(cur_ptr)
 
188
  else q:=equiv(cur_chr);
 
189
  if q=null then sa_define(p,null)(p,undefined_cs,null)
 
190
  else  begin add_token_ref(q); sa_define(p,q)(p,call,q);
 
191
    end;
 
192
  goto done;
 
193
  end
 
194
@y
 
195
begin if cur_cmd=toks_register then
 
196
  begin scan_eight_bit_int; cur_cmd:=assign_toks; cur_chr:=toks_base+cur_val;
 
197
  end;
 
198
if cur_cmd=assign_toks then
 
199
  begin q:=equiv(cur_chr);
 
200
  if q=null then define(p,undefined_cs,null)
 
201
  else  begin add_token_ref(q); define(p,call,q);
 
202
    end;
 
203
  goto done;
 
204
  end;
 
205
end
 
206
@z
 
207
%---------------------------------------
 
208
@x eobase.ch l.2792
 
209
@!e:boolean; {does |l| refer to a sparse array element?}
 
210
@!w:integer; {integer or dimen value of |l|}
 
211
begin q:=cur_cmd;
 
212
e:=false; {just in case, will be set |true| for sparse array elements}
 
213
@y
 
214
begin q:=cur_cmd;
 
215
@z
 
216
%----------------------------------------
 
217
@x eobase.ch l.2802
 
218
if p<glue_val then sa_word_define(l,cur_val)
 
219
else  begin trap_zero_glue; sa_define(l,cur_val)(l,glue_ref,cur_val);
 
220
@y
 
221
if p<glue_val then word_define(l,cur_val)
 
222
else  begin trap_zero_glue; define(l,glue_ref,cur_val);
 
223
@z
 
224
%---------------------------------------
 
225
@x eobase.ch l.2809
 
226
if (cur_chr<mem_bot)or(cur_chr>lo_mem_stat_max) then
 
227
  begin l:=cur_chr; p:=sa_type(l); e:=true;
 
228
  end
 
229
else  begin p:=cur_chr-mem_bot; scan_register_num;
 
230
  if cur_val>255 then
 
231
    begin find_sa_element(p,cur_val,true); l:=cur_ptr; e:=true;
 
232
    end
 
233
  else
 
234
@y
 
235
p:=cur_chr; scan_eight_bit_int;
 
236
@z
 
237
%---------------------------------------
 
238
@x eobase.ch l.2823
 
239
  end;
 
240
end;
 
241
found: if p<glue_val then@+if e then w:=sa_int(l)@+else w:=new_eqtb_int(l);
 
242
else if e then s:=sa_ptr(l)@+else s:=equiv(l)
 
243
@y
 
244
end;
 
245
found:
 
246
@z
 
247
%---------------------------------------
 
248
@x eobase.ch l.2832
 
249
  if q=advance then cur_val:=cur_val+w;
 
250
@y
 
251
  if q=advance then cur_val:=cur_val+new_eqtb_int(l);
 
252
@z
 
253
%---------------------------------------
 
254
@x eobase.ch l.2838
 
255
begin q:=new_spec(cur_val); r:=s;
 
256
@y
 
257
begin q:=new_spec(cur_val); r:=equiv(l);
 
258
@z
 
259
%---------------------------------------
 
260
@x eobase.ch l.2847
 
261
    if p=int_val then cur_val:=mult_integers(w,cur_val)
 
262
    else cur_val:=nx_plus_y(w,cur_val,0)
 
263
  else cur_val:=x_over_n(w,cur_val)
 
264
else  begin r:=new_spec(s);
 
265
@y
 
266
    if p=int_val then cur_val:=mult_integers(new_eqtb_int(l),cur_val)
 
267
    else cur_val:=nx_plus_y(new_eqtb_int(l),cur_val,0)
 
268
  else cur_val:=x_over_n(new_eqtb_int(l),cur_val)
 
269
else  begin s:=equiv(l); r:=new_spec(s);
 
270
@z
 
271
%---------------------------------------
 
272
@x eobase.ch l.2859
 
273
set_box: begin scan_register_num;
 
274
  if global then n:=global_box_flag+cur_val@+else n:=box_flag+cur_val;
 
275
  scan_optional_equals;
 
276
  if set_box_allowed then scan_box(n)
 
277
@y
 
278
set_box: begin scan_eight_bit_int;
 
279
  if global then n:=number_regs+cur_val@+else n:=cur_val;
 
280
  scan_optional_equals;
 
281
  if set_box_allowed then scan_box(box_flag+n)
 
282
@z
 
283
%---------------------------------------
 
284
@x eobase.ch l.2883
 
285
@!b:pointer; {box register}
 
286
begin c:=cur_chr; scan_register_num; fetch_box(b); scan_optional_equals;
 
287
scan_normal_dimen;
 
288
if b<>null then mem[b+c].sc:=cur_val;
 
289
@y
 
290
@!b:eight_bits; {box number}
 
291
begin c:=cur_chr; scan_eight_bit_int; b:=cur_val; scan_optional_equals;
 
292
scan_normal_dimen;
 
293
if box(b)<>null then mem[box(b)+c].sc:=cur_val;
 
294
@z
 
295
%---------------------------------------
 
296
@x [49] m.1296 l.23637 - e-TeX sparse arrays
 
297
begin scan_register_num; fetch_box(p); begin_diagnostic;
 
298
print_nl("> \box"); print_int(cur_val); print_char("=");
 
299
if p=null then print("void")@+else show_box(p);
 
300
@y
 
301
begin scan_eight_bit_int; begin_diagnostic;
 
302
print_nl("> \box"); print_int(cur_val); print_char("=");
 
303
if box(cur_val)=null then print("void")
 
304
else show_box(box(cur_val));
 
305
@z
 
306
%----------------------------------------
 
307
@x eobase.ch l.2979
 
308
if eTeX_ex then for k:=int_val to tok_val do dump_int(sa_root[k]);
 
309
@y
 
310
@z
 
311
%----------------------------------------
 
312
@x eobase.ch l.2986
 
313
if eTeX_ex then for k:=int_val to tok_val do
 
314
  undump(null)(lo_mem_max)(sa_root[k]);
 
315
@y
 
316
@z
 
317
@x l. 3132
 
318
for j:=0 to eTeX_states-1 do eTeX_state(j):=0; {disable all enhancements}
 
319
@y
 
320
for j:=0 to eTeX_states-1 do set_new_eqtb_int(eTeX_state_base+j,0); {disable all enhancements}
 
321
@z