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

Diff for /mandoc/read.c between version 1.26 and 1.27

version 1.26, 2011/11/07 01:24:40 version 1.27, 2012/02/05 16:46:15
Line 325  mparse_buf_r(struct mparse *curp, struct buf blk, int 
Line 325  mparse_buf_r(struct mparse *curp, struct buf blk, int 
                          * Warn about bogus characters.  If you're using                           * Warn about bogus characters.  If you're using
                          * non-ASCII encoding, you're screwing your                           * non-ASCII encoding, you're screwing your
                          * readers.  Since I'd rather this not happen,                           * readers.  Since I'd rather this not happen,
                          * I'll be helpful and drop these characters so                           * I'll be helpful and replace these characters
                          * we don't display gibberish.  Note to manual                           * with "?", so we don't display gibberish.
                          * writers: use special characters.                           * Note to manual writers: use special characters.
                          */                           */
   
                         c = (unsigned char) blk.buf[i];                          c = (unsigned char) blk.buf[i];
Line 335  mparse_buf_r(struct mparse *curp, struct buf blk, int 
Line 335  mparse_buf_r(struct mparse *curp, struct buf blk, int 
                         if ( ! (isascii(c) &&                          if ( ! (isascii(c) &&
                                         (isgraph(c) || isblank(c)))) {                                          (isgraph(c) || isblank(c)))) {
                                 mandoc_msg(MANDOCERR_BADCHAR, curp,                                  mandoc_msg(MANDOCERR_BADCHAR, curp,
                                                 curp->line, pos, "ignoring byte");                                                  curp->line, pos, NULL);
                                 i++;                                  i++;
                                   if (pos >= (int)ln.sz)
                                           resize_buf(&ln, 256);
                                   ln.buf[pos++] = '?';
                                 continue;                                  continue;
                         }                          }
   

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

CVSweb