[BACK]Return to term_ps.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/term_ps.c between version 1.13 and 1.14

version 1.13, 2010/06/28 13:45:28 version 1.14, 2010/06/28 22:46:21
Line 387  ps_alloc(void)
Line 387  ps_alloc(void)
         if (NULL == (p = term_alloc(TERMENC_ASCII)))          if (NULL == (p = term_alloc(TERMENC_ASCII)))
                 return(NULL);                  return(NULL);
   
         p->defrmargin = 78;          p->defrmargin = 612 - (PS_CHAR_LEFT * 2);
         p->tabwidth = 5;  
   
         p->type = TERMTYPE_PS;          p->type = TERMTYPE_PS;
         p->letter = ps_letter;          p->letter = ps_letter;
         p->begin = ps_begin;          p->begin = ps_begin;
Line 551  ps_begin(struct termp *p)
Line 549  ps_begin(struct termp *p)
 static void  static void
 ps_pletter(struct termp *p, int c)  ps_pletter(struct termp *p, int c)
 {  {
           int              f;
   
         /*          /*
          * If we're not in a PostScript "word" context, then open one           * If we're not in a PostScript "word" context, then open one
Line 585  ps_pletter(struct termp *p, int c)
Line 584  ps_pletter(struct termp *p, int c)
   
         /* Write the character and adjust where we are on the page. */          /* Write the character and adjust where we are on the page. */
   
         /*          f = (int)p->engine.ps.lastf;
          * FIXME: at this time we emit only blacnks on non-ASCII  
          * letters.  
          */  
   
         if (c < 32 || (c - 32 > MAXCHAR)) {          if (c <= 32 || (c - 32 > MAXCHAR)) {
                 ps_putchar(p, ' ');                  ps_putchar(p, ' ');
                 p->engine.ps.pscol +=                  p->engine.ps.pscol += (fonts[f].gly[0].wx / 100);
                         (fonts[p->engine.ps.lastf].gly[32].wx / 100);  
                 return;                  return;
         }          }
   
         ps_putchar(p, c);          ps_putchar(p, c);
         p->engine.ps.pscol +=          c -= 32;
                 (fonts[p->engine.ps.lastf].gly[(int)c - 32].wx / 100);          p->engine.ps.pscol += (fonts[f].gly[c].wx / 100);
 }  }
   
   
Line 709  ps_advance(struct termp *p, size_t len)
Line 704  ps_advance(struct termp *p, size_t len)
          */           */
   
         ps_fclose(p);          ps_fclose(p);
         p->engine.ps.pscol += 0 == len ? 0 :          p->engine.ps.pscol += len;
                 len * (fonts[p->engine.ps.lastf].gly[0].wx / 100);  
 }  }
   
   
Line 763  static size_t
Line 757  static size_t
 ps_width(const struct termp *p, char c)  ps_width(const struct termp *p, char c)
 {  {
   
         return(1);          if (c <= 32 || c - 32 >= MAXCHAR)
                   return(fonts[(int)TERMFONT_NONE].gly[0].wx / 100);
   
           c -= 32;
           return(fonts[(int)TERMFONT_NONE].gly[(int)c].wx / 100);
 }  }

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

CVSweb