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/funny.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/funny.c')
| -rw-r--r-- | src/cmd/eqn/funny.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/cmd/eqn/funny.c b/src/cmd/eqn/funny.c new file mode 100644 index 00000000..85955fce --- /dev/null +++ b/src/cmd/eqn/funny.c @@ -0,0 +1,30 @@ +#include "e.h" +#include "y.tab.h" + +extern int Funnyps; +extern double Funnyht, Funnybase; + +void funny(int n) +{ + char *f = 0; + + yyval = salloc(); + switch (n) { + case SUM: + f = lookup(deftbl, "sum_def")->cval; break; + case UNION: + f = lookup(deftbl, "union_def")->cval; break; + case INTER: /* intersection */ + f = lookup(deftbl, "inter_def")->cval; break; + case PROD: + f = lookup(deftbl, "prod_def")->cval; break; + default: + ERROR "funny type %d in funny", n FATAL; + } + printf(".ds %d %s\n", yyval, f); + eht[yyval] = EM(1.0, ps+Funnyps) - EM(Funnyht, ps); + ebase[yyval] = EM(Funnybase, ps); + dprintf(".\tS%d <- %s; h=%g b=%g\n", + yyval, f, eht[yyval], ebase[yyval]); + lfont[yyval] = rfont[yyval] = ROM; +} |
