home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / src / cmd / neqn / diacrit.c next >
Encoding:
C/C++ Source or Header  |  1979-01-10  |  1000 b   |  45 lines

  1. # include "e.h"
  2. # include "e.def"
  3.  
  4. diacrit(p1, type) int p1, type; {
  5.     int c, t;
  6.  
  7.     c = oalloc();
  8.     t = oalloc();
  9.     nrwid(p1, ps, p1);
  10.     printf(".nr 10 %du\n", max(eht[p1]-ebase[p1]-VERT(2),0));
  11.     switch(type) {
  12.         case VEC:    /* vec */
  13.         case DYAD:    /* dyad */
  14.             printf(".ds %d \\v'-1'_\\v'1'\n", c);
  15.             break;
  16.         case HAT:
  17.             printf(".ds %d ^\n", c);
  18.             break;
  19.         case TILDE:
  20.             printf(".ds %d ~\n", c);
  21.             break;
  22.         case DOT:
  23.             printf(".ds %d \\v'-1'.\\v'1'\n", c);
  24.             break;
  25.         case DOTDOT:
  26.             printf(".ds %d \\v'-1'..\\v'1'\n", c);
  27.             break;
  28.         case BAR:
  29.             printf(".ds %d \\v'-1'\\l'\\n(%du'\\v'1'\n", 
  30.                 c, p1);
  31.             break;
  32.         case UNDER:
  33.             printf(".ds %d \\l'\\n(%du'\n", c, p1);
  34.             break;
  35.         }
  36.     nrwid(c, ps, c);
  37.     printf(".as %d \\h'-\\n(%du-\\n(%du/2u'\\v'0-\\n(10u'\\*(%d", 
  38.         p1, p1, c, c);
  39.     printf("\\v'\\n(10u'\\h'-\\n(%du+\\n(%du/2u'\n", c, p1);
  40.     if (type != UNDER)
  41.         eht[p1] += VERT(1);
  42.     if (dbg) printf(".\tdiacrit: %c over S%d, h=%d, b=%d\n", type, p1, eht[p1], ebase[p1]);
  43.     ofree(c); ofree(t);
  44. }
  45.