Commit | Line | Data |
---|---|---|
6f1a2a65 | 1 | /* move.c 4.2 83/02/12 */ |
551e5a30 BS |
2 | |
3 | # include "e.h" | |
4 | # include "e.def" | |
5 | ||
6 | move(dir, amt, p) int dir, amt, p; { | |
7 | int a; | |
8 | ||
9 | yyval = p; | |
6f1a2a65 | 10 | #ifndef NEQN |
551e5a30 | 11 | a = VERT( (EFFPS(ps) * 6 * amt) / 100); |
6f1a2a65 BS |
12 | #else NEQN |
13 | a = VERT( (amt+49)/50 ); /* nearest number of half-lines */ | |
14 | #endif NEQN | |
551e5a30 BS |
15 | printf(".ds %d ", yyval); |
16 | if( dir == FWD || dir == BACK ) /* fwd, back */ | |
17 | printf("\\h'%s%du'\\*(%d\n", (dir==BACK) ? "-" : "", a, p); | |
18 | else if (dir == UP) | |
19 | printf("\\v'-%du'\\*(%d\\v'%du'\n", a, p, a); | |
20 | else if (dir == DOWN) | |
21 | printf("\\v'%du'\\*(%d\\v'-%du'\n", a, p, a); | |
22 | if(dbg)printf(".\tmove %d dir %d amt %d; h=%d b=%d\n", | |
23 | p, dir, a, eht[yyval], ebase[yyval]); | |
24 | } |