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

Diff for /mandoc/term.c between version 1.215 and 1.216

version 1.215, 2013/12/31 18:07:42 version 1.216, 2014/01/22 20:58:39
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2010, 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2010-2014 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
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 179  term_flushln(struct termp *p)
Line 179  term_flushln(struct termp *p)
                         /* Regular word. */                          /* Regular word. */
                         /* Break at the hyphen point if we overrun. */                          /* Break at the hyphen point if we overrun. */
                         if (vend > vis && vend < bp &&                          if (vend > vis && vend < bp &&
                                         ASCII_HYPH == p->buf[j])                              (ASCII_HYPH == p->buf[j] ||
                                ASCII_BREAK == p->buf[j]))
                                 jhy = j;                                  jhy = j;
   
                         vend += (*p->width)(p, p->buf[j]);                          vend += (*p->width)(p, p->buf[j]);
Line 233  term_flushln(struct termp *p)
Line 234  term_flushln(struct termp *p)
                                 vbl += (*p->width)(p, ' ');                                  vbl += (*p->width)(p, ' ');
                                 continue;                                  continue;
                         }                          }
                           if (ASCII_BREAK == p->buf[i])
                                   continue;
   
                         /*                          /*
                          * Now we definitely know there will be                           * Now we definitely know there will be
Line 644  term_strlen(const struct termp *p, const char *cp)
Line 647  term_strlen(const struct termp *p, const char *cp)
         int              ssz, skip, c;          int              ssz, skip, c;
         const char      *seq, *rhs;          const char      *seq, *rhs;
         enum mandoc_esc  esc;          enum mandoc_esc  esc;
         static const char rej[] = { '\\', ASCII_HYPH, ASCII_NBRSP, '\0' };          static const char rej[] = { '\\', ASCII_NBRSP, ASCII_HYPH,
                           ASCII_BREAK, '\0' };
   
         /*          /*
          * Account for escaped sequences within string length           * Account for escaped sequences within string length
Line 732  term_strlen(const struct termp *p, const char *cp)
Line 736  term_strlen(const struct termp *p, const char *cp)
                 case (ASCII_HYPH):                  case (ASCII_HYPH):
                         sz += cond_width(p, '-', &skip);                          sz += cond_width(p, '-', &skip);
                         cp++;                          cp++;
                           /* FALLTHROUGH */
                   case (ASCII_BREAK):
                         break;                          break;
                 default:                  default:
                         break;                          break;

Legend:
Removed from v.1.215  
changed lines
  Added in v.1.216

CVSweb