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

Diff for /mandoc/term.c between version 1.186 and 1.187

version 1.186, 2011/04/30 22:24:31 version 1.187, 2011/05/14 17:54:42
Line 532  adjbuf(struct termp *p, size_t sz)
Line 532  adjbuf(struct termp *p, size_t sz)
         while (sz >= p->maxcols)          while (sz >= p->maxcols)
                 p->maxcols <<= 2;                  p->maxcols <<= 2;
   
         p->buf = mandoc_realloc(p->buf, p->maxcols);          p->buf = mandoc_realloc(p->buf, sizeof(int) * p->maxcols);
 }  }
   
   
Line 562  encode(struct termp *p, const char *word, size_t sz)
Line 562  encode(struct termp *p, const char *word, size_t sz)
         if (TERMFONT_NONE == (f = term_fonttop(p))) {          if (TERMFONT_NONE == (f = term_fonttop(p))) {
                 if (p->col + sz >= p->maxcols)                  if (p->col + sz >= p->maxcols)
                         adjbuf(p, p->col + sz);                          adjbuf(p, p->col + sz);
                 memcpy(&p->buf[(int)p->col], word, sz);                  for (i = 0; i < (int)sz; i++)
                 p->col += sz;                          p->buf[(int)p->col++] = word[i];
                 return;                  return;
         }          }
   

Legend:
Removed from v.1.186  
changed lines
  Added in v.1.187

CVSweb