BSD 4_4 release
[unix-history] / usr / src / old / eqn / common_source / move.c
CommitLineData
2791ff57
KB
1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
ad787160
C
5 * This module is believed to contain source code proprietary to AT&T.
6 * Use and redistribution is subject to the Berkeley Software License
7 * Agreement and your Software Agreement with AT&T (Western Electric).
2791ff57
KB
8 */
9
f6227721 10#ifndef lint
ad787160 11static char sccsid[] = "@(#)move.c 4.4 (Berkeley) 4/17/91";
2791ff57 12#endif /* not lint */
551e5a30
BS
13
14# include "e.h"
15# include "e.def"
16
17move(dir, amt, p) int dir, amt, p; {
18 int a;
19
20 yyval = p;
6f1a2a65 21#ifndef NEQN
551e5a30 22 a = VERT( (EFFPS(ps) * 6 * amt) / 100);
6f1a2a65
BS
23#else NEQN
24 a = VERT( (amt+49)/50 ); /* nearest number of half-lines */
25#endif NEQN
551e5a30
BS
26 printf(".ds %d ", yyval);
27 if( dir == FWD || dir == BACK ) /* fwd, back */
28 printf("\\h'%s%du'\\*(%d\n", (dir==BACK) ? "-" : "", a, p);
29 else if (dir == UP)
30 printf("\\v'-%du'\\*(%d\\v'%du'\n", a, p, a);
31 else if (dir == DOWN)
32 printf("\\v'%du'\\*(%d\\v'-%du'\n", a, p, a);
33 if(dbg)printf(".\tmove %d dir %d amt %d; h=%d b=%d\n",
34 p, dir, a, eht[yyval], ebase[yyval]);
35}