[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.133 and 1.134

version 1.133, 2010/05/29 18:58:52 version 1.134, 2010/05/30 22:56:02
Line 700  termp_it_pre(DECL_ARGS)
Line 700  termp_it_pre(DECL_ARGS)
   
         switch (type) {          switch (type) {
         case (LIST_column):          case (LIST_column):
                 if (MDOC_BODY == n->type)                  if (MDOC_HEAD == n->type)
                         break;                          break;
                 /*                  /*
                  * Imitate groff's column handling:                   * Imitate groff's column handling:
Line 715  termp_it_pre(DECL_ARGS)
Line 715  termp_it_pre(DECL_ARGS)
                 /* LINTED */                  /* LINTED */
                 dcol = ncols < 5 ? 4 : ncols == 5 ? 3 : 1;                  dcol = ncols < 5 ? 4 : ncols == 5 ? 3 : 1;
   
                   /*
                    * Calculate the offset by applying all prior MDOC_BODY,
                    * so we stop at the MDOC_HEAD (NULL == nn->prev).
                    */
   
                 for (i = 0, nn = n->prev;                  for (i = 0, nn = n->prev;
                                 nn && i < (int)ncols;                                  nn->prev && i < (int)ncols;
                                 nn = nn->prev, i++)                                  nn = nn->prev, i++)
                         offset += dcol + a2width                          offset += dcol + a2width
                                 (&bl->args->argv[vals[2]], i);                                  (&bl->args->argv[vals[2]], i);
Line 869  termp_it_pre(DECL_ARGS)
Line 874  termp_it_pre(DECL_ARGS)
                         p->flags |= TERMP_DANGLE;                          p->flags |= TERMP_DANGLE;
                 break;                  break;
         case (LIST_column):          case (LIST_column):
                 if (MDOC_HEAD == n->type) {                  if (MDOC_HEAD == n->type)
                         assert(n->next);                          break;
                         if (MDOC_BODY == n->next->type)  
                                 p->flags &= ~TERMP_NOBREAK;                  if (NULL == n->next)
                         else                          p->flags &= ~TERMP_NOBREAK;
                                 p->flags |= TERMP_NOBREAK;                  else
                         if (n->prev)                          p->flags |= TERMP_NOBREAK;
                                 p->flags |= TERMP_NOLPAD;  
                 }                  assert(n->prev);
                   if (MDOC_BODY == n->prev->type)
                           p->flags |= TERMP_NOLPAD;
   
                 break;                  break;
         case (LIST_diag):          case (LIST_diag):
                 if (MDOC_HEAD == n->type)                  if (MDOC_HEAD == n->type)
Line 929  termp_it_pre(DECL_ARGS)
Line 937  termp_it_pre(DECL_ARGS)
                  * XXX - this behaviour is not documented: the                   * XXX - this behaviour is not documented: the
                  * right-most column is filled to the right margin.                   * right-most column is filled to the right margin.
                  */                   */
                 if (MDOC_HEAD == n->type &&                  if (MDOC_HEAD == n->type)
                                 MDOC_BODY == n->next->type &&                          break;
                                 p->rmargin < p->maxrmargin)                  if (NULL == n->next && p->rmargin < p->maxrmargin)
                         p->rmargin = p->maxrmargin;                          p->rmargin = p->maxrmargin;
                 break;                  break;
         default:          default:
Line 985  termp_it_pre(DECL_ARGS)
Line 993  termp_it_pre(DECL_ARGS)
                         return(0);                          return(0);
                 break;                  break;
         case (LIST_column):          case (LIST_column):
                 if (MDOC_BODY == n->type)                  if (MDOC_HEAD == n->type)
                         return(0);                          return(0);
                 break;                  break;
         default:          default:
Line 1017  termp_it_post(DECL_ARGS)
Line 1025  termp_it_post(DECL_ARGS)
                         term_newln(p);                          term_newln(p);
                 break;                  break;
         case (LIST_column):          case (LIST_column):
                 if (MDOC_HEAD == n->type)                  if (MDOC_BODY == n->type)
                         term_flushln(p);                          term_flushln(p);
                 break;                  break;
         default:          default:

Legend:
Removed from v.1.133  
changed lines
  Added in v.1.134

CVSweb