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

Diff for /mandoc/main.c between version 1.98 and 1.99

version 1.98, 2010/07/07 15:04:54 version 1.99, 2010/07/20 14:56:42
Line 23 
Line 23 
 #include <sys/stat.h>  #include <sys/stat.h>
   
 #include <assert.h>  #include <assert.h>
   #include <ctype.h>
 #include <fcntl.h>  #include <fcntl.h>
 #include <stdio.h>  #include <stdio.h>
 #include <stdint.h>  #include <stdint.h>
Line 110  static const char * const mandocerrs[MANDOCERR_MAX] = 
Line 111  static const char * const mandocerrs[MANDOCERR_MAX] = 
         "list type must come first",          "list type must come first",
         "bad standard",          "bad standard",
         "bad library",          "bad library",
           "tab in non-literal context",
         "bad escape sequence",          "bad escape sequence",
         "unterminated quoted string",          "unterminated quoted string",
         "argument requires the width argument",          "argument requires the width argument",
Line 491  fdesc(struct curparse *curp)
Line 493  fdesc(struct curparse *curp)
                                 ++lnn;                                  ++lnn;
                                 break;                                  break;
                         }                          }
   
                           /*
                            * Warn about bogus characters.  If you're using
                            * non-ASCII encoding, you're screwing your
                            * readers.  Since I'd rather this not happen,
                            * I'll be helpful and drop these characters so
                            * we don't display gibberish.  Note to manual
                            * writers: use special characters.
                            */
   
                           if ( ! isgraph((u_char)blk.buf[i]) &&
                                           ! isblank((u_char)blk.buf[i])) {
                                   if ( ! mmsg(MANDOCERR_BADCHAR, curp,
                                                   lnn_start, pos,
                                                   "ignoring byte"))
                                           goto bailout;
                                   i++;
                                   continue;
                           }
   
                         /* Trailing backslash is like a plain character. */                          /* Trailing backslash is like a plain character. */
                         if ('\\' != blk.buf[i] || i + 1 == (int)blk.sz) {                          if ('\\' != blk.buf[i] || i + 1 == (int)blk.sz) {
                                 if (pos >= (int)ln.sz)                                  if (pos >= (int)ln.sz)

Legend:
Removed from v.1.98  
changed lines
  Added in v.1.99

CVSweb