aro@aber-cs.UUCP (Andrew Ormsby) (07/17/90)
I'm trying to build the TeX distribution from the Washington UNIX
tape. I obtained the tape from Aston University in the U.K. The files
seem to be dated at 24th March 1990.
I encounter a problem when I reach the compilation of gftodvi.c in the
"mfware" directory. The compilation fails with the following message:
sibyl-(aro) 274 # cc -v -Dlink=link_array -I.. -c gftodvi.c
/lib/cpp -I.. -undef -Dunix -Dsun -Dsparc -Dlink=link_array gftodvi.c
>/tmp/cpp.
07022.0.i
/lib/ccom - </tmp/cpp.07022.0.i >/tmp/ccom.07022.1.s
"gftodvi.c", line 2279: yacc stack overflow
rm /tmp/cpp.07022.0.i
rm /tmp/ccom.07022.1.s
sibyl-(aro) 275 #
This is compiling on a Sparcstation 1, running SunOS 4.0.3c, using the
standard C compiler. (No, I'm afraid I don't have gcc for the sparc
yet).
Any ideas?
Andrew Ormsby aro@cs.aber.ac.uk
Department of Computer Science, University College of Wales,
Aberystwyth, Dyfed SY23 3BZ, Wales.
spqr@ecs.soton.ac.uk (Sebastian Rahtz) (07/18/90)
In article <1962@aber-cs.UUCP> aro@aber-cs.UUCP (Andrew Ormsby) writes:
I'm trying to build the TeX distribution from the Washington UNIX
tape. I obtained the tape from Aston University in the U.K. The files
seem to be dated at 24th March 1990.
I encounter a problem when I reach the compilation of gftodvi.c in the
"mfware" directory. The compilation fails with the following message:
Here is a relevant paragraph from the PROBLEMS file of your
distribution (or maybe you have a version just behind this).
sebastian
* On a Sun Sparcstation running 4.0.3c and also a Sun 3 running 3.x, and
probably other machines, cc on both gftodvi.c and vftovp.c fails with a
`yacc stack overflow' message. (From ekrell@ulysses.att.com.)
justin@crim.ca has contributed a patch to the change files, which
follows. (This was for the web2c 5.0c change files; if someone makes it
work with a later version, I will incorporate this patch into the change
file itself, although I won't be happy about it.)
*** mfware/gftodvi.ch- Sat Jan 20 12:33:03 1990
--- mfware/gftodvi.ch Thu Apr 5 12:54:14 1990
***************
*** 702,707 ****
--- 702,750 ----
@y
@z
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % [??] Sun cc cannot handle 165 labels for the same branch of a switch.
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ @x
+ @<Read and process...@>=
+ loop @+begin continue: case cur_gf of
+ sixty_four_cases(0): k:=cur_gf;
+ paint1:k:=get_byte;
+ paint2:k:=get_two_bytes;
+ paint3:k:=get_three_bytes;
+ eoc:goto done1;
+ skip0:end_with(blank_rows:=0; do_skip);
+ skip1:end_with(blank_rows:=get_byte; do_skip);
+ skip2:end_with(blank_rows:=get_two_bytes; do_skip);
+ skip3:end_with(blank_rows:=get_three_bytes; do_skip);
+ sixty_four_cases(new_row_0),sixty_four_cases(new_row_0+64),
+ thirty_two_cases(new_row_0+128),five_cases(new_row_0+160):
+ end_with(z:=cur_gf-new_row_0;paint_black:=true);
+ xxx1,xxx2,xxx3,xxx4,yyy,no_op:begin skip_nop; goto continue;
+ end;
+ othercases bad_gf('Improper opcode')
+ endcases;@/
+ @y
+ @<Read and process...@>=
+ loop @+begin continue:
+ if (cur_gf>=new_row_0)and(cur_gf<=new_row_0+164) then
+ end_with(z:=cur_gf-new_row_0;paint_black:=true)
+ else case cur_gf of
+ sixty_four_cases(0): k:=cur_gf;
+ paint1:k:=get_byte;
+ paint2:k:=get_two_bytes;
+ paint3:k:=get_three_bytes;
+ eoc:goto done1;
+ skip0:end_with(blank_rows:=0; do_skip);
+ skip1:end_with(blank_rows:=get_byte; do_skip);
+ skip2:end_with(blank_rows:=get_two_bytes; do_skip);
+ skip3:end_with(blank_rows:=get_three_bytes; do_skip);
+ xxx1,xxx2,xxx3,xxx4,yyy,no_op:begin skip_nop; goto continue;
+ end;
+ othercases bad_gf('Improper opcode')
+ endcases;@/
+ @z
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% [??] call set_paths before gf_start to initialize paths.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*** fontutil/vftovp.ch- Thu Feb 8 16:17:50 1990
--- fontutil/vftovp.ch Thu Apr 5 14:23:19 1990
***************
*** 389,394 ****
--- 389,427 ----
@z
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % [124] Sun cc can't handle 136 case labels in a row.
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ @x
+ begin o:=vf[vf_ptr]; incr(vf_ptr);
+ case o of
+ @<Cases of \.{DVI} instructions that can appear in character packets@>
+ @y
+ begin o:=vf[vf_ptr]; incr(vf_ptr);
+ if ((o>=set_char_0)and(o<=set_char_0+127))or
+ ((o>=set1)and(o<=set1+3))or((o>=put1)and(o<=put1+3)) then
+ begin if o>=set1 then
+ if o>=put1 then c:=get_bytes(o-put1+1,false)
+ else c:=get_bytes(o-set1+1,false)
+ else c:=o;
+ if f=font_ptr then
+ bad_vf('Character ',c:1,' in undeclared font will be ignored')
+ @.Character...will be ignored@>
+ else begin vf[font_start[f+1]-1]:=c; {store |c| in the ``hole'' we left}
+ k:=font_chars[f];@+while vf[k]<>c do incr(k);
+ if k=font_start[f+1]-1 then
+ bad_vf('Character ',c:1,' in font ',f:1,' will be ignored')
+ else begin if o>=put1 then out('(PUSH)');
+ left; out('SETCHAR'); out_char(c);
+ if o>=put1 then out(')(POP');
+ right;
+ end;
+ end;
+ end
+ else case o of
+ @<Cases of \.{DVI} instructions that can appear in character packets@>
+ @z
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% [125] `signed' is a keyword in ANSI C.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@x
***************
*** 410,415 ****
--- 443,479 ----
begin print_ln('Stack overflow!'); goto final_end;
@y
begin print_ln('Stack overflow!'); uexit(1);
+ @z
+
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % [??] This code moved outside the case statement
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ @x
+ @ Before we typeset a character we make sure that it exists.
+
+ @<Cases...@>=
+ sixty_four_cases(set_char_0),sixty_four_cases(set_char_0+64),
+ four_cases(set1),four_cases(put1):begin if o>=set1 then
+ if o>=put1 then c:=get_bytes(o-put1+1,false)
+ else c:=get_bytes(o-set1+1,false)
+ else c:=o;
+ if f=font_ptr then
+ bad_vf('Character ',c:1,' in undeclared font will be ignored')
+ @.Character...will be ignored@>
+ else begin vf[font_start[f+1]-1]:=c; {store |c| in the ``hole'' we left}
+ k:=font_chars[f];@+while vf[k]<>c do incr(k);
+ if k=font_start[f+1]-1 then
+ bad_vf('Character ',c:1,' in font ',f:1,' will be ignored')
+ else begin if o>=put1 then out('(PUSH)');
+ left; out('SETCHAR'); out_char(c);
+ if o>=put1 then out(')(POP');
+ right;
+ end;
+ end;
+ end;
+ @y
+ @ Before we typeset a character we make sure that it exists.
+ (These cases moved outside the case statement, section 124.)
@z
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--
Sebastian Rahtz S.Rahtz@uk.ac.soton.ecs (JANET)
Computer Science S.Rahtz@ecs.soton.ac.uk (Bitnet)
Southampton S09 5NH, UK S.Rahtz@sot-ecs.uucp (uucp)