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/move.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/move.c')
| -rw-r--r-- | src/cmd/eqn/move.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/cmd/eqn/move.c b/src/cmd/eqn/move.c new file mode 100644 index 00000000..a622487c --- /dev/null +++ b/src/cmd/eqn/move.c @@ -0,0 +1,19 @@ +# include "e.h" +# include "y.tab.h" + +void move(int dir, int amt, int p) +{ + double a; + + yyval = p; + a = EM(amt/100.0, ps); + printf(".ds %d ", yyval); + if (dir == FWD || dir == BACK) + printf("\\h'%s%gm'\\*(%d\n", (dir==BACK) ? "-" : "", a, p); + else if (dir == UP) + printf("\\v'-%gm'\\*(%d\\v'%gm'\n", a, p, a); + else if (dir == DOWN) + printf("\\v'%gm'\\*(%d\\v'-%gm'\n", a, p, a); + dprintf(".\tmove %d dir %d amt %g; h=%g b=%g\n", + p, dir, a, eht[yyval], ebase[yyval]); +} |
