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

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

diff --git a/usr/src/local/ditroff/ditroff.okeeffe/eqn/eqnbox.c b/usr/src/local/ditroff/ditroff.okeeffe/eqn/eqnbox.c
new file mode 100644 (file)
index 0000000..e1216b2
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef lint
+static char *sccsid = "eqnbox.c        (CWI)   1.1     85/03/01";
+#endif
+# include "e.h"
+
+eqnbox(p1, p2, lu) {
+       int b, h;
+       char *sh;
+
+       yyval = p1;
+       b = max(ebase[p1], ebase[p2]);
+       eht[yyval] = h = b + max(eht[p1]-ebase[p1], 
+               eht[p2]-ebase[p2]);
+       ebase[yyval] = b;
+       if(dbg)printf(".\te:eb: S%d <- S%d S%d; b=%d, h=%d\n", 
+               yyval, p1, p2, b, h);
+       if (rfont[p1] == ITAL && lfont[p2] == ROM)
+               sh = "\\|";
+       else
+               sh = "";
+       if (lu) {
+               printf(".nr %d \\w'\\s%d\\*(%d%s'\n", p1, ps, p1, sh);
+               printf(".ds %d \\h'|\\n(97u-\\n(%du'\\*(%d\n", p1, p1, p1);
+       }
+       printf(".as %d \"%s\\*(%d\n", yyval, sh, p2);
+       rfont[p1] = rfont[p2];
+       ofree(p2);
+}