stuck with dvitomp

Fabrice POPINEAU popineau@ese-metz.fr
05 Jan 1999 11:13:20 +0100


Ok. Found something :  the array local_only[]  is used with indexes up
to max_fnums, not max_fonts :

dvitomp.web, line 669:
@<Glob...@>=
@!font_num:array [0..max_fnums] of integer; {external font numbers}
@!internal_num:array [0..max_fnums] of integer; {internal font numbers}
@!local_only:array [0..max_fonts] of boolean; {|font_num| meaningless?}
@!font_name:array [0..max_fonts] of 0..name_size; {starting positions
  of external font names}

@!local_only:array [0..max_fnums] of boolean; {|font_num| meaningless?}

In this piece of code :

dvitomp.web, line 1082:
@ @<Set |f| to the internal font number that corresponds to |e|,...@>=
if cur_ftop<=nf then cur_ftop:=nf;
font_num[cur_ftop]:=e;
k:=cur_fbase;
while (font_num[k]<>e)or local_only[k] do incr(k);
if k=cur_ftop then abort('Undefined font selected');
f:=internal_num[k]

the k index varies in the range 0..max_fnums.

Is this the proper fix :

@ @<Set |f| to the internal font number that corresponds to |e|,...@>=
if cur_ftop<=nf then cur_ftop:=nf;
font_num[cur_ftop]:=e;
k:=cur_fbase;
while (font_num[k]<>e)or local_only[font_num[i]] do incr(k);
if k=cur_ftop then abort('Undefined font selected');
f:=internal_num[k]

At least, it seems to be ok for me.

-- 
Fabrice POPINEAU