diff options
| author | rsc <devnull@localhost> | 2004-05-15 23:24:00 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2004-05-15 23:24:00 +0000 |
| commit | 5cedca1b69d020c32466f70843a11767773d7e3b (patch) | |
| tree | a15a3d84e92aa262543b0010763a5e6920c9ba24 /src/cmd/eqn/integral.c | |
| parent | 76e6aca867e3e48ea04fbcf7284c45369a69829e (diff) | |
| download | plan9port-5cedca1b69d020c32466f70843a11767773d7e3b.tar.gz plan9port-5cedca1b69d020c32466f70843a11767773d7e3b.zip | |
Let's try this. It's BUGGERED.
Diffstat (limited to 'src/cmd/eqn/integral.c')
| -rw-r--r-- | src/cmd/eqn/integral.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/cmd/eqn/integral.c b/src/cmd/eqn/integral.c new file mode 100644 index 00000000..2b1c9e3f --- /dev/null +++ b/src/cmd/eqn/integral.c @@ -0,0 +1,30 @@ +#include "e.h" +#include "y.tab.h" + +extern int Intps; +extern double Intht, Intbase, Int1h, Int1v, Int2h, Int2v; + +void integral(int p, int p1, int p2) +{ + if (p1 != 0) + printf(".ds %d \\h'%gm'\\v'%gm'\\*(%d\\v'%gm'\n", p1, -Int1h, Int1v, p1, -Int1v); + if (p2 != 0) + printf(".ds %d \\v'%gm'\\h'%gm'\\*(%d\\v'%gm'\n", p2, -Int2v, Int2h, p2, Int2v); + if (p1 != 0 && p2 != 0) + shift2(p, p1, p2); + else if (p1 != 0) + bshiftb(p, SUB, p1); + else if (p2 != 0) + bshiftb(p, SUP, p2); + dprintf(".\tintegral: S%d; h=%g b=%g\n", p, eht[p], ebase[p]); + lfont[p] = ROM; +} + +void setintegral(void) +{ + yyval = salloc(); + printf(".ds %d %s\n", yyval, lookup(deftbl, "int_def")->cval); + eht[yyval] = EM(Intht, ps+Intps); + ebase[yyval] = EM(Intbase, ps); + lfont[yyval] = rfont[yyval] = ROM; +} |
