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

Diff for /mandoc/term.c between version 1.197 and 1.199

version 1.197, 2011/05/24 21:31:23 version 1.199, 2011/09/18 21:18:19
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
Line 576  encode(struct termp *p, const char *word, size_t sz)
Line 576  encode(struct termp *p, const char *word, size_t sz)
                 adjbuf(p, p->col + 1 + (len * 3));                  adjbuf(p, p->col + 1 + (len * 3));
   
         for (i = 0; i < len; i++) {          for (i = 0; i < len; i++) {
                 if ( ! isgraph((unsigned char)word[i])) {                  if (ASCII_HYPH != word[i] &&
                       ! isgraph((unsigned char)word[i])) {
                         p->buf[p->col++] = word[i];                          p->buf[p->col++] = word[i];
                         continue;                          continue;
                 }                  }
   
                 if (TERMFONT_UNDER == f)                  if (TERMFONT_UNDER == f)
                         p->buf[p->col++] = '_';                          p->buf[p->col++] = '_';
                   else if (ASCII_HYPH == word[i])
                           p->buf[p->col++] = '-';
                 else                  else
                         p->buf[p->col++] = word[i];                          p->buf[p->col++] = word[i];
   

Legend:
Removed from v.1.197  
changed lines
  Added in v.1.199

CVSweb