URI:
       tmove.c - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
       tmove.c (480B)
       ---
            1 # include "e.h"
            2 # include "y.tab.h"
            3 
            4 void move(int dir, int amt, int p)
            5 {
            6         double a;
            7 
            8         yyval = p;
            9         a = EM(amt/100.0, ps);
           10         printf(".ds %d ", (int)yyval);
           11         if (dir == FWD || dir == BACK)
           12                 printf("\\h'%s%gm'\\*(%d\n", (dir==BACK) ? "-" : "", a, p);
           13         else if (dir == UP)
           14                 printf("\\v'-%gm'\\*(%d\\v'%gm'\n", a, p, a);
           15         else if (dir == DOWN)
           16                 printf("\\v'%gm'\\*(%d\\v'-%gm'\n", a, p, a);
           17         dprintf(".\tmove %d dir %d amt %g; h=%g b=%g\n",
           18                 p, dir, a, eht[yyval], ebase[yyval]);
           19 }