date and time created 83/02/11 18:28:33 by shannon
[unix-history] / usr / src / old / eqn / common_source / over.c
CommitLineData
7ff4b622
BS
1/* over.c 4.1 83/02/11 */
2
3# include "e.h"
4
5boverb(p1, p2) int p1, p2; {
6 int h, b, treg, d;
7
8 treg = oalloc();
9 yyval = p1;
10 d = VERT((ps*6*3) / 10); /* 0.3m */
11 h = eht[p1] + eht[p2] + d;
12 b = eht[p2] - d;
13 if(dbg)printf(".\tb:bob: S%d <- S%d over S%d; b=%d, h=%d\n",
14 yyval, p1, p2, b, h);
15 nrwid(p1, ps, p1);
16 nrwid(p2, ps, p2);
17 printf(".nr %d \\n(%d\n", treg, p1);
18 printf(".if \\n(%d>\\n(%d .nr %d \\n(%d\n", p2, treg, treg, p2);
19 printf(".nr %d \\n(%d+\\s%d.5m\\s0\n", treg, treg, EFFPS(ps));
20 printf(".ds %d \\v'%du'\\h'\\n(%du-\\n(%du/2u'\\*(%d\\\n",
21 yyval, eht[p2]-ebase[p2]-d, treg, p2, p2);
22 printf("\\h'-\\n(%du-\\n(%du/2u'\\v'%du'\\*(%d\\\n",
23 p2, p1, -(eht[p2]-ebase[p2]+d+ebase[p1]), p1);
24 printf("\\h'-\\n(%du-\\n(%du/2u+.1m'\\v'%du'\\l'\\n(%du-.2m'\\h'.1m'\\v'%du'\n",
25 treg, p1, ebase[p1]+d, treg, d);
26 ebase[yyval] = b;
27 eht[yyval] = h;
28 lfont[yyval] = rfont[yyval] = 0;
29 ofree(p2);
30 ofree(treg);
31}