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

Diff for /mandoc/mdoc_term.c between version 1.200 and 1.201

version 1.200, 2010/12/19 12:11:42 version 1.201, 2010/12/22 11:15:16
Line 556  print_bvspace(struct termp *p, 
Line 556  print_bvspace(struct termp *p, 
   
         term_newln(p);          term_newln(p);
   
         if (MDOC_Bd == bl->tok && bl->data.Bd->comp)          if (MDOC_Bd == bl->tok && bl->norm->d.Bd.comp)
                 return;                  return;
         if (MDOC_Bl == bl->tok && bl->data.Bl->comp)          if (MDOC_Bl == bl->tok && bl->norm->d.Bl.comp)
                 return;                  return;
   
         /* Do not vspace directly after Ss/Sh. */          /* Do not vspace directly after Ss/Sh. */
Line 577  print_bvspace(struct termp *p, 
Line 577  print_bvspace(struct termp *p, 
   
         /* A `-column' does not assert vspace within the list. */          /* A `-column' does not assert vspace within the list. */
   
         if (MDOC_Bl == bl->tok && LIST_column == bl->data.Bl->type)          if (MDOC_Bl == bl->tok && LIST_column == bl->norm->d.Bl.type)
                 if (n->prev && MDOC_It == n->prev->tok)                  if (n->prev && MDOC_It == n->prev->tok)
                         return;                          return;
   
         /* A `-diag' without body does not vspace. */          /* A `-diag' without body does not vspace. */
   
         if (MDOC_Bl == bl->tok && LIST_diag == bl->data.Bl->type)          if (MDOC_Bl == bl->tok && LIST_diag == bl->norm->d.Bl.type)
                 if (n->prev && MDOC_It == n->prev->tok) {                  if (n->prev && MDOC_It == n->prev->tok) {
                         assert(n->prev->body);                          assert(n->prev->body);
                         if (NULL == n->prev->body->child)                          if (NULL == n->prev->body->child)
Line 610  termp_it_pre(DECL_ARGS)
Line 610  termp_it_pre(DECL_ARGS)
         }          }
   
         bl = n->parent->parent->parent;          bl = n->parent->parent->parent;
         assert(bl->data.Bl);          type = bl->norm->d.Bl.type;
         type = bl->data.Bl->type;  
   
         /*          /*
          * First calculate width and offset.  This is pretty easy unless           * First calculate width and offset.  This is pretty easy unless
Line 621  termp_it_pre(DECL_ARGS)
Line 620  termp_it_pre(DECL_ARGS)
   
         width = offset = 0;          width = offset = 0;
   
         if (bl->data.Bl->offs)          if (bl->norm->d.Bl.offs)
                 offset = a2offs(p, bl->data.Bl->offs);                  offset = a2offs(p, bl->norm->d.Bl.offs);
   
         switch (type) {          switch (type) {
         case (LIST_column):          case (LIST_column):
Line 638  termp_it_pre(DECL_ARGS)
Line 637  termp_it_pre(DECL_ARGS)
                  *   column.                   *   column.
                  * - For more than 5 columns, add only one column.                   * - For more than 5 columns, add only one column.
                  */                   */
                 ncols = bl->data.Bl->ncols;                  ncols = bl->norm->d.Bl.ncols;
   
                 /* LINTED */                  /* LINTED */
                 dcol = ncols < 5 ? term_len(p, 4) :                  dcol = ncols < 5 ? term_len(p, 4) :
Line 653  termp_it_pre(DECL_ARGS)
Line 652  termp_it_pre(DECL_ARGS)
                                 nn->prev && i < (int)ncols;                                  nn->prev && i < (int)ncols;
                                 nn = nn->prev, i++)                                  nn = nn->prev, i++)
                         offset += dcol + a2width                          offset += dcol + a2width
                                 (p, bl->data.Bl->cols[i]);                                  (p, bl->norm->d.Bl.cols[i]);
   
                 /*                  /*
                  * When exceeding the declared number of columns, leave                   * When exceeding the declared number of columns, leave
Line 668  termp_it_pre(DECL_ARGS)
Line 667  termp_it_pre(DECL_ARGS)
                  * Use the declared column widths, extended as explained                   * Use the declared column widths, extended as explained
                  * in the preceding paragraph.                   * in the preceding paragraph.
                  */                   */
                 width = a2width(p, bl->data.Bl->cols[i]) + dcol;                  width = a2width(p, bl->norm->d.Bl.cols[i]) + dcol;
                 break;                  break;
         default:          default:
                 if (NULL == bl->data.Bl->width)                  if (NULL == bl->norm->d.Bl.width)
                         break;                          break;
   
                 /*                  /*
Line 679  termp_it_pre(DECL_ARGS)
Line 678  termp_it_pre(DECL_ARGS)
                  * number for buffering single arguments.  See the above                   * number for buffering single arguments.  See the above
                  * handling for column for how this changes.                   * handling for column for how this changes.
                  */                   */
                 assert(bl->data.Bl->width);                  assert(bl->norm->d.Bl.width);
                 width = a2width(p, bl->data.Bl->width) + term_len(p, 2);                  width = a2width(p, bl->norm->d.Bl.width) + term_len(p, 2);
                 break;                  break;
         }          }
   
Line 942  termp_it_post(DECL_ARGS)
Line 941  termp_it_post(DECL_ARGS)
         if (MDOC_BLOCK == n->type)          if (MDOC_BLOCK == n->type)
                 return;                  return;
   
         type = n->parent->parent->parent->data.Bl->type;          type = n->parent->parent->parent->norm->d.Bl.type;
   
         switch (type) {          switch (type) {
         case (LIST_item):          case (LIST_item):
Line 1116  termp_an_post(DECL_ARGS)
Line 1115  termp_an_post(DECL_ARGS)
                 return;                  return;
         }          }
   
         if (AUTH_split == n->data.An->auth) {          if (AUTH_split == n->norm->d.An.auth) {
                 p->flags &= ~TERMP_NOSPLIT;                  p->flags &= ~TERMP_NOSPLIT;
                 p->flags |= TERMP_SPLIT;                  p->flags |= TERMP_SPLIT;
         } else if (AUTH_nosplit == n->data.An->auth) {          } else if (AUTH_nosplit == n->norm->d.An.auth) {
                 p->flags &= ~TERMP_SPLIT;                  p->flags &= ~TERMP_SPLIT;
                 p->flags |= TERMP_NOSPLIT;                  p->flags |= TERMP_NOSPLIT;
         }          }
Line 1566  termp_bd_pre(DECL_ARGS)
Line 1565  termp_bd_pre(DECL_ARGS)
         } else if (MDOC_HEAD == n->type)          } else if (MDOC_HEAD == n->type)
                 return(0);                  return(0);
   
         assert(n->data.Bd);          if (n->norm->d.Bd.offs)
         if (n->data.Bd->offs)                  p->offset += a2offs(p, n->norm->d.Bd.offs);
                 p->offset += a2offs(p, n->data.Bd->offs);  
   
         /*          /*
          * If -ragged or -filled are specified, the block does nothing           * If -ragged or -filled are specified, the block does nothing
Line 1578  termp_bd_pre(DECL_ARGS)
Line 1576  termp_bd_pre(DECL_ARGS)
          * lines are allowed.           * lines are allowed.
          */           */
   
         if (DISP_literal != n->data.Bd->type &&          if (DISP_literal != n->norm->d.Bd.type &&
                         DISP_unfilled != n->data.Bd->type)                          DISP_unfilled != n->norm->d.Bd.type)
                 return(1);                  return(1);
   
         tabwidth = p->tabwidth;          tabwidth = p->tabwidth;
Line 1641  termp_bd_post(DECL_ARGS)
Line 1639  termp_bd_post(DECL_ARGS)
         rm = p->rmargin;          rm = p->rmargin;
         rmax = p->maxrmargin;          rmax = p->maxrmargin;
   
         assert(n->data.Bd);          if (DISP_literal == n->norm->d.Bd.type ||
         if (DISP_literal == n->data.Bd->type ||                          DISP_unfilled == n->norm->d.Bd.type)
                         DISP_unfilled == n->data.Bd->type)  
                 p->rmargin = p->maxrmargin = TERM_MAXMARGIN;                  p->rmargin = p->maxrmargin = TERM_MAXMARGIN;
   
         p->flags |= TERMP_NOSPACE;          p->flags |= TERMP_NOSPACE;
Line 1998  termp_bf_pre(DECL_ARGS)
Line 1995  termp_bf_pre(DECL_ARGS)
         else if (MDOC_BLOCK != n->type)          else if (MDOC_BLOCK != n->type)
                 return(1);                  return(1);
   
         assert(n->data.Bf);          if (FONT_Em == n->norm->d.Bf.font)
   
         if (FONT_Em == n->data.Bf->font)  
                 term_fontpush(p, TERMFONT_UNDER);                  term_fontpush(p, TERMFONT_UNDER);
         else if (FONT_Sy == n->data.Bf->font)          else if (FONT_Sy == n->norm->d.Bf.font)
                 term_fontpush(p, TERMFONT_BOLD);                  term_fontpush(p, TERMFONT_BOLD);
         else          else
                 term_fontpush(p, TERMFONT_NONE);                  term_fontpush(p, TERMFONT_NONE);

Legend:
Removed from v.1.200  
changed lines
  Added in v.1.201

CVSweb