1: # include "e.h" 2: 3: fromto(p1, p2, p3) int p1, p2, p3; { 4: int b, h1, b1, pss; 5: yyval = oalloc(); 6: lfont[yyval] = rfont[yyval] = 0; 7: h1 = eht[yyval] = eht[p1]; 8: b1 = ebase[p1]; 9: b = 0; 10: pss = EFFPS(ps); 11: ps += 3; 12: nrwid(p1, ps, p1); 13: printf(".nr %d \\n(%d\n", yyval, p1); 14: if( p2>0 ) { 15: nrwid(p2, pss, p2); 16: printf(".if \\n(%d>\\n(%d .nr %d \\n(%d\n", p2, yyval, yyval, p2); 17: eht[yyval] += eht[p2]; 18: b = eht[p2]; 19: } 20: if( p3>0 ) { 21: nrwid(p3, pss, p3); 22: printf(".if \\n(%d>\\n(%d .nr %d \\n(%d\n", p3, yyval, yyval, p3); 23: eht[yyval] += eht[p3]; 24: } 25: printf(".ds %d ", yyval); /* bottom of middle box */ 26: if( p2>0 ) { 27: printf("\\v'%du'\\h'\\n(%du-\\n(%du/2u'\\s%d\\*(%d\\s%d", 28: eht[p2]-ebase[p2]+b1, yyval, p2, pss, p2, EFFPS(ps)); 29: printf("\\h'-\\n(%du-\\n(%du/2u'\\v'%du'\\\n", 30: yyval, p2, -(eht[p2]-ebase[p2]+b1)); 31: } 32: printf("\\h'\\n(%du-\\n(%du/2u'\\*(%d\\h'\\n(%du-\\n(%du+2u/2u'\\\n", 33: yyval, p1, p1, yyval, p1); 34: if( p3>0 ) { 35: printf("\\v'%du'\\h'-\\n(%du-\\n(%du/2u'\\s%d\\*(%d\\s%d\\h'\\n(%du-\\n(%du/2u'\\v'%du'\\\n", 36: -(h1-b1+ebase[p3]), yyval, p3, pss, p3, EFFPS(ps), yyval, p3, (h1-b1+ebase[p3])); 37: } 38: printf("\n"); 39: ebase[yyval] = b + b1; 40: if(dbg)printf(".\tfrom to: S%d <- %d f %d t %d; h=%d b=%d\n", 41: yyval, p1, p2, p3, eht[yyval], ebase[yyval]); 42: ofree(p1); 43: if( p2>0 ) ofree(p2); 44: if( p3>0 ) ofree(p3); 45: }