1 /*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.proprietary.c%
6 */
7
8 #ifndef lint
9 static char sccsid[] = "@(#)integral.c 4.4 (Berkeley) 04/17/91";
10 #endif /* not lint */
11
12 # include "e.h"
13 # include "e.def"
14
integral(p,p1,p2)15 integral(p, p1, p2) {
16 #ifndef NEQN
17 if (p1 != 0)
18 printf(".ds %d \\h'-0.4m'\\v'0.4m'\\*(%d\\v'-0.4m'\n", p1, p1);
19 if (p2 != 0)
20 printf(".ds %d \\v'-0.3m'\\*(%d\\v'0.3m'\n", p2, p2);
21 #endif
22 if (p1 != 0 && p2 != 0)
23 shift2(p, p1, p2);
24 else if (p1 != 0)
25 bshiftb(p, SUB, p1);
26 else if (p2 != 0)
27 bshiftb(p, SUP, p2);
28 if(dbg)printf(".\tintegral: S%d; h=%d b=%d\n",
29 p, eht[p], ebase[p]);
30 lfont[p] = ROM;
31 }
32
setintegral()33 setintegral() {
34 char *f;
35
36 yyval = oalloc();
37 f = "\\(is";
38 #ifndef NEQN
39 printf(".ds %d \\s%d\\v'.1m'\\s+4%s\\s-4\\v'-.1m'\\s%d\n",
40 yyval, ps, f, ps);
41 eht[yyval] = VERT( (((ps+4)*12)/10)*6 );
42 ebase[yyval] = VERT( (ps*6*3)/10 );
43 #else NEQN
44 printf(".ds %d %s\n", yyval, f);
45 eht[yyval] = VERT(2);
46 ebase[yyval] = 0;
47 #endif NEQN
48 lfont[yyval] = rfont[yyval] = ROM;
49 }
50