readdir now returns an eof indication
[unix-history] / usr / src / old / eqn / common_source / over.c
CommitLineData
f6227721
SL
1#ifndef lint
2static char sccsid[] = "@(#)over.c 4.3 %G%";
3#endif
7ff4b622
BS
4
5# include "e.h"
6
7boverb(p1, p2) int p1, p2; {
8 int h, b, treg, d;
9
10 treg = oalloc();
11 yyval = p1;
6f1a2a65 12#ifndef NEQN
7ff4b622
BS
13 d = VERT((ps*6*3) / 10); /* 0.3m */
14 h = eht[p1] + eht[p2] + d;
6f1a2a65
BS
15#else NEQN
16 d = VERT(1);
17 h = eht[p1] + eht[p2];
18#endif NEQN
7ff4b622
BS
19 b = eht[p2] - d;
20 if(dbg)printf(".\tb:bob: S%d <- S%d over S%d; b=%d, h=%d\n",
21 yyval, p1, p2, b, h);
22 nrwid(p1, ps, p1);
23 nrwid(p2, ps, p2);
24 printf(".nr %d \\n(%d\n", treg, p1);
25 printf(".if \\n(%d>\\n(%d .nr %d \\n(%d\n", p2, treg, treg, p2);
6f1a2a65 26#ifndef NEQN
7ff4b622 27 printf(".nr %d \\n(%d+\\s%d.5m\\s0\n", treg, treg, EFFPS(ps));
6f1a2a65 28#endif NEQN
7ff4b622
BS
29 printf(".ds %d \\v'%du'\\h'\\n(%du-\\n(%du/2u'\\*(%d\\\n",
30 yyval, eht[p2]-ebase[p2]-d, treg, p2, p2);
31 printf("\\h'-\\n(%du-\\n(%du/2u'\\v'%du'\\*(%d\\\n",
6f1a2a65 32#ifndef NEQN
7ff4b622
BS
33 p2, p1, -(eht[p2]-ebase[p2]+d+ebase[p1]), p1);
34 printf("\\h'-\\n(%du-\\n(%du/2u+.1m'\\v'%du'\\l'\\n(%du-.2m'\\h'.1m'\\v'%du'\n",
35 treg, p1, ebase[p1]+d, treg, d);
6f1a2a65
BS
36#else NEQN
37 p2, p1, -eht[p2]+ebase[p2]-ebase[p1], p1);
38 printf("\\h'-\\n(%du-\\n(%du-2u/2u'\\v'%du'\\l'\\n(%du'\\v'%du'\n",
39 treg, p1, ebase[p1], treg, d);
40#endif NEQN
7ff4b622
BS
41 ebase[yyval] = b;
42 eht[yyval] = h;
43 lfont[yyval] = rfont[yyval] = 0;
44 ofree(p2);
45 ofree(treg);
46}