[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.59 and 1.61

version 1.59, 2014/04/20 16:46:05 version 1.61, 2014/07/27 21:53:17
Line 628  pdf_obj(struct termp *p, size_t obj)
Line 628  pdf_obj(struct termp *p, size_t obj)
   
         if ((obj - 1) >= p->ps->pdfobjsz) {          if ((obj - 1) >= p->ps->pdfobjsz) {
                 p->ps->pdfobjsz = obj + 128;                  p->ps->pdfobjsz = obj + 128;
                 p->ps->pdfobjs = realloc(p->ps->pdfobjs,                  p->ps->pdfobjs = mandoc_reallocarray(p->ps->pdfobjs,
                     p->ps->pdfobjsz * sizeof(size_t));                      p->ps->pdfobjsz, sizeof(size_t));
                 if (NULL == p->ps->pdfobjs) {  
                         perror(NULL);  
                         exit((int)MANDOCLEVEL_SYSERR);  
                 }  
         }          }
   
         p->ps->pdfobjs[(int)obj - 1] = p->ps->pdfbytes;          p->ps->pdfobjs[(int)obj - 1] = p->ps->pdfbytes;
Line 918  ps_pletter(struct termp *p, int c)
Line 914  ps_pletter(struct termp *p, int c)
   
         f = (int)p->ps->lastf;          f = (int)p->ps->lastf;
   
         if (c <= 32 || (c - 32 >= MAXCHAR)) {          if (c <= 32 || c - 32 >= MAXCHAR)
                 ps_putchar(p, ' ');                  c = 32;
                 p->ps->pscol += (size_t)fonts[f].gly[0].wx;  
                 return;  
         }  
   
         ps_putchar(p, (char)c);          ps_putchar(p, (char)c);
         c -= 32;          c -= 32;
Line 1108  ps_width(const struct termp *p, int c)
Line 1101  ps_width(const struct termp *p, int c)
 {  {
   
         if (c <= 32 || c - 32 >= MAXCHAR)          if (c <= 32 || c - 32 >= MAXCHAR)
                 return((size_t)fonts[(int)TERMFONT_NONE].gly[0].wx);                  c = 0;
           else
                   c -= 32;
   
         c -= 32;  
         return((size_t)fonts[(int)TERMFONT_NONE].gly[c].wx);          return((size_t)fonts[(int)TERMFONT_NONE].gly[c].wx);
 }  }
   
Line 1169  ps_growbuf(struct termp *p, size_t sz)
Line 1163  ps_growbuf(struct termp *p, size_t sz)
                 sz = PS_BUFSLOP;                  sz = PS_BUFSLOP;
   
         p->ps->psmargsz += sz;          p->ps->psmargsz += sz;
           p->ps->psmarg = mandoc_realloc(p->ps->psmarg, p->ps->psmargsz);
         p->ps->psmarg = mandoc_realloc  
                 (p->ps->psmarg, p->ps->psmargsz);  
 }  }

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.61

CVSweb