date and time created 85/03/01 15:27:10 by jaap
authorJaap Akkerhuis <jaap@ucbvax.Berkeley.EDU>
Sat, 2 Mar 1985 07:27:10 +0000 (23:27 -0800)
committerJaap Akkerhuis <jaap@ucbvax.Berkeley.EDU>
Sat, 2 Mar 1985 07:27:10 +0000 (23:27 -0800)
SCCS-vsn: local/ditroff/ditroff.okeeffe/eqn/over.c 1.1

usr/src/local/ditroff/ditroff.okeeffe/eqn/over.c [new file with mode: 0644]

diff --git a/usr/src/local/ditroff/ditroff.okeeffe/eqn/over.c b/usr/src/local/ditroff/ditroff.okeeffe/eqn/over.c
new file mode 100644 (file)
index 0000000..052e763
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef lint
+static char *sccsid = "over.c  (CWI)   1.1     85/03/01";
+#endif
+# include "e.h"
+
+boverb(p1, p2) int p1, p2; {
+       int h, b, treg, d;
+
+       treg = oalloc();
+       yyval = p1;
+       d = VERT( EM(0.3, ps) );
+       h = eht[p1] + eht[p2] + d;
+       b = eht[p2] - d;
+       if(dbg)printf(".\tb:bob: S%d <- S%d over S%d; b=%d, h=%d\n", 
+               yyval, p1, p2, b, h);
+       nrwid(p1, ps, p1);
+       nrwid(p2, ps, p2);
+       printf(".nr %d \\n(%d\n", treg, p1);
+       printf(".if \\n(%d>\\n(%d .nr %d \\n(%d\n", p2, treg, treg, p2);
+       printf(".nr %d \\n(%d+\\s%d.5m\\s0\n", treg, treg, EFFPS(ps));
+       printf(".ds %d \\v'%du'\\h'\\n(%du-\\n(%du/2u'\\*(%d\\\n", 
+               yyval, eht[p2]-ebase[p2]-d, treg, p2, p2);
+       printf("\\h'-\\n(%du-\\n(%du/2u'\\v'%du'\\*(%d\\\n", 
+               p2, p1, -(eht[p2]-ebase[p2]+d+ebase[p1]), p1);
+       printf("\\h'-\\n(%du-\\n(%du/2u+.1m'\\v'%du'\\l'\\n(%du-.2m'\\h'.1m'\\v'%du'\n", 
+                treg, p1, ebase[p1]+d, treg, d);
+       ebase[yyval] = b;
+       eht[yyval] = h;
+       lfont[yyval] = rfont[yyval] = 0;
+       ofree(p2);
+       ofree(treg);
+}