/* * This file is part of the UCB release of Plan 9. It is subject to the license * terms in the LICENSE file found in the top-level directory of this * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No * part of the UCB release of Plan 9, including this file, may be copied, * modified, propagated, or distributed except according to the terms contained * in the LICENSE file. */ # 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]); }