xref: /csrg-svn/old/eqn/common_source/move.c (revision 11023)
1 /*	move.c	4.2	83/02/12	*/
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;
10 #ifndef NEQN
11 	a = VERT( (EFFPS(ps) * 6 * amt) / 100);
12 #else NEQN
13 	a = VERT( (amt+49)/50 );	/* nearest number of half-lines */
14 #endif NEQN
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 }
25