[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.196 and 1.200

version 1.196, 2010/12/05 15:37:30 version 1.200, 2010/12/19 12:11:42
Line 319  print_mdoc_node(DECL_ARGS)
Line 319  print_mdoc_node(DECL_ARGS)
         /*          /*
          * Keeps only work until the end of a line.  If a keep was           * Keeps only work until the end of a line.  If a keep was
          * invoked in a prior line, revert it to PREKEEP.           * invoked in a prior line, revert it to PREKEEP.
            *
            * Also let SYNPRETTY sections behave as if they were wrapped
            * in a `Bk' block.
          */           */
   
         if (TERMP_KEEP & p->flags) {          if (TERMP_KEEP & p->flags || MDOC_SYNPRETTY & n->flags) {
                 if (n->prev && n->prev->line != n->line) {                  if (n->prev && n->prev->line != n->line) {
                         p->flags &= ~TERMP_KEEP;                          p->flags &= ~TERMP_KEEP;
                         p->flags |= TERMP_PREKEEP;                          p->flags |= TERMP_PREKEEP;
Line 333  print_mdoc_node(DECL_ARGS)
Line 336  print_mdoc_node(DECL_ARGS)
                 }                  }
         }          }
   
           /*
            * Since SYNPRETTY sections aren't "turned off" with `Ek',
            * we have to intuit whether we should disable formatting.
            */
   
           if ( ! (MDOC_SYNPRETTY & n->flags) &&
               ((n->prev   && MDOC_SYNPRETTY & n->prev->flags) ||
                (n->parent && MDOC_SYNPRETTY & n->parent->flags)))
                   p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP);
   
         if (chld && n->child)          if (chld && n->child)
                 print_mdoc_nodelist(p, &npair, m, n->child);                  print_mdoc_nodelist(p, &npair, m, n->child);
   
Line 1103  termp_an_post(DECL_ARGS)
Line 1116  termp_an_post(DECL_ARGS)
                 return;                  return;
         }          }
   
         if (AUTH_split == n->data.An.auth) {          if (AUTH_split == n->data.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->data.An->auth) {
                 p->flags &= ~TERMP_SPLIT;                  p->flags &= ~TERMP_SPLIT;
                 p->flags |= TERMP_NOSPLIT;                  p->flags |= TERMP_NOSPLIT;
         }          }
Line 1802  termp_sp_pre(DECL_ARGS)
Line 1815  termp_sp_pre(DECL_ARGS)
                 len = 0;                  len = 0;
                 break;                  break;
         default:          default:
                 assert(n->parent);  
                 if ((NULL == n->next || NULL == n->prev) &&  
                                 (MDOC_Ss == n->parent->tok ||  
                                  MDOC_Sh == n->parent->tok))  
                         return(0);  
                 len = 1;                  len = 1;
                 break;                  break;
         }          }
Line 2109  termp_bk_pre(DECL_ARGS)
Line 2117  termp_bk_pre(DECL_ARGS)
         case (MDOC_HEAD):          case (MDOC_HEAD):
                 return(0);                  return(0);
         case (MDOC_BODY):          case (MDOC_BODY):
                 p->flags |= TERMP_PREKEEP;                  if (n->parent->args || 0 == n->prev->nchild)
                           p->flags |= TERMP_PREKEEP;
                 break;                  break;
         default:          default:
                 abort();                  abort();

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

CVSweb