1*48252Sbostic /*-
2*48252Sbostic * Copyright (c) 1991 The Regents of the University of California.
3*48252Sbostic * All rights reserved.
4*48252Sbostic *
5*48252Sbostic * %sccs.include.proprietary.c%
6*48252Sbostic */
7*48252Sbostic
814486Ssam #ifndef lint
9*48252Sbostic static char sccsid[] = "@(#)integral.c 4.4 (Berkeley) 04/17/91";
10*48252Sbostic #endif /* not lint */
1111006Sshannon
1211006Sshannon # include "e.h"
1311006Sshannon # include "e.def"
1411006Sshannon
integral(p,p1,p2)1511006Sshannon integral(p, p1, p2) {
1611023Sshannon #ifndef NEQN
1711006Sshannon if (p1 != 0)
1811006Sshannon printf(".ds %d \\h'-0.4m'\\v'0.4m'\\*(%d\\v'-0.4m'\n", p1, p1);
1911006Sshannon if (p2 != 0)
2011006Sshannon printf(".ds %d \\v'-0.3m'\\*(%d\\v'0.3m'\n", p2, p2);
2111023Sshannon #endif
2211006Sshannon if (p1 != 0 && p2 != 0)
2311006Sshannon shift2(p, p1, p2);
2411006Sshannon else if (p1 != 0)
2511006Sshannon bshiftb(p, SUB, p1);
2611006Sshannon else if (p2 != 0)
2711006Sshannon bshiftb(p, SUP, p2);
2811006Sshannon if(dbg)printf(".\tintegral: S%d; h=%d b=%d\n",
2911006Sshannon p, eht[p], ebase[p]);
3011006Sshannon lfont[p] = ROM;
3111006Sshannon }
3211006Sshannon
setintegral()3311006Sshannon setintegral() {
3411006Sshannon char *f;
3511006Sshannon
3611006Sshannon yyval = oalloc();
3711006Sshannon f = "\\(is";
3811023Sshannon #ifndef NEQN
3911006Sshannon printf(".ds %d \\s%d\\v'.1m'\\s+4%s\\s-4\\v'-.1m'\\s%d\n",
4011006Sshannon yyval, ps, f, ps);
4111006Sshannon eht[yyval] = VERT( (((ps+4)*12)/10)*6 );
4211006Sshannon ebase[yyval] = VERT( (ps*6*3)/10 );
4311023Sshannon #else NEQN
4411023Sshannon printf(".ds %d %s\n", yyval, f);
4511023Sshannon eht[yyval] = VERT(2);
4611023Sshannon ebase[yyval] = 0;
4711023Sshannon #endif NEQN
4811006Sshannon lfont[yyval] = rfont[yyval] = ROM;
4911006Sshannon }
50