# include "e.h" lpile(type, p1, p2) int type, p1, p2; { int bi, hi, i, gap, h, b, nlist, nlist2, mid; yyval = oalloc(); gap = VERT(1); if( type=='-' ) gap = 0; nlist = p2 - p1; nlist2 = (nlist+1)/2; mid = p1 + nlist2 -1; h = 0; for( i=p1; imid; i-- ) b += eht[lp[i]] + gap; ebase[yyval] = (nlist%2) ? b + ebase[lp[mid]] : b - VERT(1) - gap; if(dbg) { printf(".\tS%d <- %c pile of:", yyval, type); for( i=p1; i\\n(%d .nr %d \\n(%d\n", lp[i], yyval, yyval, lp[i]); } printf(".ds %d \\v'%du'\\h'%du*\\n(%du'\\\n", yyval, ebase[yyval], type=='R' ? 1 : 0, yyval); for(i = p2-1; i >=p1; i--) { hi = eht[lp[i]]; bi = ebase[lp[i]]; switch(type) { case 'L': printf("\\v'%du'\\*(%d\\h'-\\n(%du'\\v'0-%du'\\\n", -bi, lp[i], lp[i], hi-bi+gap); continue; case 'R': printf("\\v'%du'\\h'-\\n(%du'\\*(%d\\v'0-%du'\\\n", -bi, lp[i], lp[i], hi-bi+gap); continue; case 'C': case '-': printf("\\v'%du'\\h'\\n(%du-\\n(%du/2u'\\*(%d", -bi, yyval, lp[i], lp[i]); printf("\\h'-\\n(%du-\\n(%du/2u'\\v'0-%du'\\\n", yyval, lp[i], hi-bi+gap); continue; } } printf("\\v'%du'\\h'%du*\\n(%du'\n", eht[yyval]-ebase[yyval]+gap, type!='R' ? 1 : 0, yyval); for( i=p1; i