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

Diff for /mandoc/read.c between version 1.8 and 1.14

version 1.8, 2011/03/31 10:54:39 version 1.14, 2011/04/30 10:18:24
Line 15 
Line 15 
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */   */
   #ifdef HAVE_CONFIG_H
   #include "config.h"
   #endif
   
 #include <sys/stat.h>  #include <sys/stat.h>
 #include <sys/mman.h>  #include <sys/mman.h>
   
Line 138  static const char * const mandocerrs[MANDOCERR_MAX] = 
Line 142  static const char * const mandocerrs[MANDOCERR_MAX] = 
         "tab in non-literal context",          "tab in non-literal context",
         "end of line whitespace",          "end of line whitespace",
         "bad comment style",          "bad comment style",
         "unknown escape sequence",          "bad escape sequence",
         "unterminated quoted string",          "unterminated quoted string",
   
         "generic error",          "generic error",
Line 350  mparse_buf_r(struct mparse *curp, struct buf blk, int 
Line 354  mparse_buf_r(struct mparse *curp, struct buf blk, int 
                                 continue;                                  continue;
                         }                          }
   
                         if ('"' == blk.buf[i + 1]) {                          if ('"' == blk.buf[i + 1] || '#' == blk.buf[i + 1]) {
                                 i += 2;                                  i += 2;
                                 /* Comment, skip to end of line */                                  /* Comment, skip to end of line */
                                 for (; i < (int)blk.sz; ++i) {                                  for (; i < (int)blk.sz; ++i) {
Line 441  rerun:
Line 445  rerun:
   
                 /*                  /*
                  * If input parsers have not been allocated, do so now.                   * If input parsers have not been allocated, do so now.
                  * We keep these instanced betwen parsers, but set them                   * We keep these instanced between parsers, but set them
                  * locally per parse routine since we can use different                   * locally per parse routine since we can use different
                  * parsers with each one.                   * parsers with each one.
                  */                   */
Line 662  mparse_alloc(enum mparset inttype, enum mandoclevel wl
Line 666  mparse_alloc(enum mparset inttype, enum mandoclevel wl
 {  {
         struct mparse   *curp;          struct mparse   *curp;
   
           assert(wlevel <= MANDOCLEVEL_FATAL);
   
         curp = mandoc_calloc(1, sizeof(struct mparse));          curp = mandoc_calloc(1, sizeof(struct mparse));
   
         curp->wlevel = wlevel;          curp->wlevel = wlevel;
Line 709  void
Line 715  void
 mparse_result(struct mparse *curp, struct mdoc **mdoc, struct man **man)  mparse_result(struct mparse *curp, struct mdoc **mdoc, struct man **man)
 {  {
   
         *mdoc = curp->mdoc;          if (mdoc)
         *man = curp->man;                  *mdoc = curp->mdoc;
           if (man)
                   *man = curp->man;
 }  }
   
 void  void

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.14

CVSweb