1: #ifndef lint
   2: static char sccsid[] = "@(#)font.c	4.3 8/11/83";
   3: #endif
   4: 
   5: # include "e.h"
   6: 
   7: setfont(ch1) char ch1; {
   8:     /* use number '1', '2', '3' for roman, italic, bold */
   9:     yyval = ft;
  10:     if (ch1 == 'r' || ch1 == 'R')
  11:         ft = ROM;
  12:     else if (ch1 == 'i' || ch1 == 'I')
  13:         ft = ITAL;
  14:     else if (ch1 == 'b' || ch1 == 'B')
  15:         ft = BLD;
  16:     else
  17:         ft = ch1;
  18:     printf(".ft %c\n", ft);
  19: #ifndef NEQN
  20:     if(dbg)printf(".\tsetfont %c %c\n", ch1, ft);
  21: #else NEQN
  22:     if(dbg)printf(".\tsetfont %c\n", ft);
  23: #endif NEQN
  24: }
  25: 
  26: font(p1, p2) int p1, p2; {
  27:         /* old font in p1, new in ft */
  28:     yyval = p2;
  29:     lfont[yyval] = rfont[yyval] = ft==ITAL ? ITAL : ROM;
  30:     if(dbg)printf(".\tb:fb: S%d <- \\f%c S%d \\f%c b=%d,h=%d,lf=%c,rf=%c\n",
  31:         yyval, ft, p2, p1, ebase[yyval], eht[yyval], lfont[yyval], rfont[yyval]);
  32:     printf(".ds %d \\f%c\\*(%d\\f%c\n",
  33:         yyval, ft, p2, p1);
  34:     ft = p1;
  35:     printf(".ft %c\n", ft);
  36: }
  37: 
  38: fatbox(p) int p; {
  39:     int sh;
  40: 
  41:     yyval = p;
  42:     sh = ps / 4;
  43:     nrwid(p, ps, p);
  44:     printf(".ds %d \\*(%d\\h'-\\n(%du+%du'\\*(%d\n", p, p, p, sh, p);
  45:     if(dbg)printf(".\tfat %d, sh=%d\n", p, sh);
  46: }
  47: 
  48: globfont() {
  49:     char temp[20];
  50: 
  51:     getstr(temp, 20);
  52:     yyval = eqnreg = 0;
  53:     gfont = temp[0];
  54:     switch (gfont) {
  55:     case 'r': case 'R':
  56:         gfont = '1';
  57:         break;
  58:     case 'i': case 'I':
  59:         gfont = '2';
  60:         break;
  61:     case 'b': case 'B':
  62:         gfont = '3';
  63:         break;
  64:     }
  65:     printf(".ft %c\n", gfont);
  66:     ft = gfont;
  67: }

Defined functions

fatbox defined in line 38; used 1 times
font defined in line 26; used 1 times
globfont defined in line 48; used 1 times
setfont defined in line 7; used 4 times

Defined variables

sccsid defined in line 2; never used
Last modified: 1983-08-12
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1092
Valid CSS Valid XHTML 1.0 Strict