[BACK]Return to tbl.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/tbl.c between version 1.9 and 1.10

version 1.9, 2014/03/21 22:17:01 version 1.10, 2014/04/20 16:44:44
Line 26 
Line 26 
 #include "libmandoc.h"  #include "libmandoc.h"
 #include "libroff.h"  #include "libroff.h"
   
   
 enum rofferr  enum rofferr
 tbl_read(struct tbl_node *tbl, int ln, const char *p, int offs)  tbl_read(struct tbl_node *tbl, int ln, const char *p, int offs)
 {  {
Line 49 
Line 50 
         /* Now process each logical section of the table.  */          /* Now process each logical section of the table.  */
   
         switch (tbl->part) {          switch (tbl->part) {
         case (TBL_PART_OPTS):          case TBL_PART_OPTS:
                 return(tbl_option(tbl, ln, p) ? ROFF_IGN : ROFF_ERR);                  return(tbl_option(tbl, ln, p) ? ROFF_IGN : ROFF_ERR);
         case (TBL_PART_LAYOUT):          case TBL_PART_LAYOUT:
                 return(tbl_layout(tbl, ln, p) ? ROFF_IGN : ROFF_ERR);                  return(tbl_layout(tbl, ln, p) ? ROFF_IGN : ROFF_ERR);
         case (TBL_PART_CDATA):          case TBL_PART_CDATA:
                 return(tbl_cdata(tbl, ln, p) ? ROFF_TBL : ROFF_IGN);                  return(tbl_cdata(tbl, ln, p) ? ROFF_TBL : ROFF_IGN);
         default:          default:
                 break;                  break;
Line 125 
Line 126 
 tbl_restart(int line, int pos, struct tbl_node *tbl)  tbl_restart(int line, int pos, struct tbl_node *tbl)
 {  {
         if (TBL_PART_CDATA == tbl->part)          if (TBL_PART_CDATA == tbl->part)
                 mandoc_msg(MANDOCERR_TBLBLOCK, tbl->parse,                  mandoc_msg(MANDOCERR_TBLBLOCK, tbl->parse,
                                 tbl->line, tbl->pos, NULL);                      tbl->line, tbl->pos, NULL);
   
         tbl->part = TBL_PART_LAYOUT;          tbl->part = TBL_PART_LAYOUT;
         tbl->line = line;          tbl->line = line;
Line 134 
Line 135 
   
         if (NULL == tbl->first_span || NULL == tbl->first_span->first)          if (NULL == tbl->first_span || NULL == tbl->first_span->first)
                 mandoc_msg(MANDOCERR_TBLNODATA, tbl->parse,                  mandoc_msg(MANDOCERR_TBLNODATA, tbl->parse,
                                 tbl->line, tbl->pos, NULL);                      tbl->line, tbl->pos, NULL);
 }  }
   
 const struct tbl_span *  const struct tbl_span *
Line 159 
Line 160 
         *tblp = NULL;          *tblp = NULL;
   
         if (NULL == tbl->first_span || NULL == tbl->first_span->first)          if (NULL == tbl->first_span || NULL == tbl->first_span->first)
                 mandoc_msg(MANDOCERR_TBLNODATA, tbl->parse,                  mandoc_msg(MANDOCERR_TBLNODATA, tbl->parse,
                                 tbl->line, tbl->pos, NULL);                      tbl->line, tbl->pos, NULL);
   
         if (tbl->last_span)          if (tbl->last_span)
                 tbl->last_span->flags |= TBL_SPAN_LAST;                  tbl->last_span->flags |= TBL_SPAN_LAST;
   
         if (TBL_PART_CDATA == tbl->part)          if (TBL_PART_CDATA == tbl->part)
                 mandoc_msg(MANDOCERR_TBLBLOCK, tbl->parse,                  mandoc_msg(MANDOCERR_TBLBLOCK, tbl->parse,
                                 tbl->line, tbl->pos, NULL);                      tbl->line, tbl->pos, NULL);
 }  }
   

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10