[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.160 and 1.163

version 1.160, 2010/06/27 16:18:13 version 1.163, 2010/07/01 14:34:03
Line 325  print_mdoc_node(DECL_ARGS)
Line 325  print_mdoc_node(DECL_ARGS)
         memset(&npair, 0, sizeof(struct termpair));          memset(&npair, 0, sizeof(struct termpair));
         npair.ppair = pair;          npair.ppair = pair;
   
         if (MDOC_TEXT != n->type) {          if (MDOC_TEXT == n->type)
                 if (termacts[n->tok].pre)  
                         chld = (*termacts[n->tok].pre)(p, &npair, m, n);  
         } else  
                 term_word(p, n->string);                  term_word(p, n->string);
           else if (termacts[n->tok].pre && ENDBODY_NOT == n->end)
                   chld = (*termacts[n->tok].pre)(p, &npair, m, n);
   
         if (chld && n->child)          if (chld && n->child)
                 print_mdoc_nodelist(p, &npair, m, n->child);                  print_mdoc_nodelist(p, &npair, m, n->child);
   
         term_fontpopq(p, font);          term_fontpopq(p, font);
   
         if (MDOC_TEXT != n->type)          if (MDOC_TEXT != n->type &&
                 if (termacts[n->tok].post)              termacts[n->tok].post &&
                         (*termacts[n->tok].post)(p, &npair, m, n);              ! (MDOC_ENDED & n->flags)) {
                   (*termacts[n->tok].post)(p, &npair, m, n);
   
                   /*
                    * Explicit end tokens not only call the post
                    * handler, but also tell the respective block
                    * that it must not call the post handler again.
                    */
                   if (n->end)
                           n->pending->flags |= MDOC_ENDED;
   
                   /*
                    * End of line terminating an implicit block
                    * while an explicit block is still open.
                    * Continue the explicit block without spacing.
                    */
                   if (ENDBODY_NOSPACE == n->end)
                           p->flags |= TERMP_NOSPACE;
           }
   
         if (MDOC_EOS & n->flags)          if (MDOC_EOS & n->flags)
                 p->flags |= TERMP_SENTENCE;                  p->flags |= TERMP_SENTENCE;
   
Line 2109  static int
Line 2126  static int
 termp_bk_pre(DECL_ARGS)  termp_bk_pre(DECL_ARGS)
 {  {
   
         p->flags |= TERMP_PREKEEP;          switch (n->type) {
         return(1);          case (MDOC_BLOCK):
                   return(1);
           case (MDOC_HEAD):
                   return(0);
           case (MDOC_BODY):
                   p->flags |= TERMP_PREKEEP;
                   return(1);
           default:
                   abort();
           }
 }  }
   
   
Line 2119  static void
Line 2145  static void
 termp_bk_post(DECL_ARGS)  termp_bk_post(DECL_ARGS)
 {  {
   
         p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP);          if (MDOC_BODY == n->type)
                   p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP);
 }  }
   
 /* ARGSUSED */  /* ARGSUSED */

Legend:
Removed from v.1.160  
changed lines
  Added in v.1.163

CVSweb