1 #ifndef lint 2 static char sccsid[] = "@(#)integral.c 2.2 (CWI) 87/04/01"; 3 #endif lint 4 #include "e.h" 5 #include "y.tab.h" 6 7 extern int Intps; 8 extern float Intht, Intbase, Int1h, Int1v, Int2h, Int2v; 9 extern char *Integral; 10 11 integral(p, p1, p2) 12 { 13 if (p1 != 0) 14 printf(".ds %d \\h'%gm'\\v'%gm'\\*(%d\\v'%gm'\n", p1, -Int1h, Int1v, p1, -Int1v); 15 if (p2 != 0) 16 printf(".ds %d \\v'%gm'\\h'%gm'\\*(%d\\v'%gm'\n", p2, -Int2v, Int2h, p2, Int2v); 17 if (p1 != 0 && p2 != 0) 18 shift2(p, p1, p2); 19 else if (p1 != 0) 20 bshiftb(p, SUB, p1); 21 else if (p2 != 0) 22 bshiftb(p, SUP, p2); 23 dprintf(".\tintegral: S%d; h=%g b=%g\n", p, eht[p], ebase[p]); 24 lfont[p] = ROM; 25 } 26 27 setintegral() 28 { 29 yyval = salloc(); 30 printf(".ds %d %s\n", yyval, Integral); 31 eht[yyval] = EM(Intht, ps+Intps); 32 ebase[yyval] = EM(Intbase, ps); 33 eps[yyval] = ps; 34 lfont[yyval] = rfont[yyval] = ROM; 35 } 36