1*48252Sbostic /*-
2*48252Sbostic * Copyright (c) 1991 The Regents of the University of California.
3*48252Sbostic * All rights reserved.
4*48252Sbostic *
5*48252Sbostic * %sccs.include.proprietary.c%
6*48252Sbostic */
7*48252Sbostic
814486Ssam #ifndef lint
9*48252Sbostic static char sccsid[] = "@(#)over.c 4.4 (Berkeley) 04/17/91";
10*48252Sbostic #endif /* not lint */
1111013Sshannon
1211013Sshannon # include "e.h"
1311013Sshannon
boverb(p1,p2)1411013Sshannon boverb(p1, p2) int p1, p2; {
1511013Sshannon int h, b, treg, d;
1611013Sshannon
1711013Sshannon treg = oalloc();
1811013Sshannon yyval = p1;
1911023Sshannon #ifndef NEQN
2011013Sshannon d = VERT((ps*6*3) / 10); /* 0.3m */
2111013Sshannon h = eht[p1] + eht[p2] + d;
2211023Sshannon #else NEQN
2311023Sshannon d = VERT(1);
2411023Sshannon h = eht[p1] + eht[p2];
2511023Sshannon #endif NEQN
2611013Sshannon b = eht[p2] - d;
2711013Sshannon if(dbg)printf(".\tb:bob: S%d <- S%d over S%d; b=%d, h=%d\n",
2811013Sshannon yyval, p1, p2, b, h);
2911013Sshannon nrwid(p1, ps, p1);
3011013Sshannon nrwid(p2, ps, p2);
3111013Sshannon printf(".nr %d \\n(%d\n", treg, p1);
3211013Sshannon printf(".if \\n(%d>\\n(%d .nr %d \\n(%d\n", p2, treg, treg, p2);
3311023Sshannon #ifndef NEQN
3411013Sshannon printf(".nr %d \\n(%d+\\s%d.5m\\s0\n", treg, treg, EFFPS(ps));
3511023Sshannon #endif NEQN
3611013Sshannon printf(".ds %d \\v'%du'\\h'\\n(%du-\\n(%du/2u'\\*(%d\\\n",
3711013Sshannon yyval, eht[p2]-ebase[p2]-d, treg, p2, p2);
3811013Sshannon printf("\\h'-\\n(%du-\\n(%du/2u'\\v'%du'\\*(%d\\\n",
3911023Sshannon #ifndef NEQN
4011013Sshannon p2, p1, -(eht[p2]-ebase[p2]+d+ebase[p1]), p1);
4111013Sshannon printf("\\h'-\\n(%du-\\n(%du/2u+.1m'\\v'%du'\\l'\\n(%du-.2m'\\h'.1m'\\v'%du'\n",
4211013Sshannon treg, p1, ebase[p1]+d, treg, d);
4311023Sshannon #else NEQN
4411023Sshannon p2, p1, -eht[p2]+ebase[p2]-ebase[p1], p1);
4511023Sshannon printf("\\h'-\\n(%du-\\n(%du-2u/2u'\\v'%du'\\l'\\n(%du'\\v'%du'\n",
4611023Sshannon treg, p1, ebase[p1], treg, d);
4711023Sshannon #endif NEQN
4811013Sshannon ebase[yyval] = b;
4911013Sshannon eht[yyval] = h;
5011013Sshannon lfont[yyval] = rfont[yyval] = 0;
5111013Sshannon ofree(p2);
5211013Sshannon ofree(treg);
5311013Sshannon }
54