[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.204 and 1.209

version 1.204, 2010/12/25 23:25:53 version 1.209, 2011/01/12 10:43:22
Line 312  print_mdoc_node(DECL_ARGS)
Line 312  print_mdoc_node(DECL_ARGS)
   
         memset(&npair, 0, sizeof(struct termpair));          memset(&npair, 0, sizeof(struct termpair));
         npair.ppair = pair;          npair.ppair = pair;
   
           switch (n->type) {
           case (MDOC_TEXT):
                   if (' ' == *n->string && MDOC_LINE & n->flags)
                           term_newln(p);
                   term_word(p, n->string);
                   break;
           case (MDOC_TBL):
                   term_tbl(p, n->span);
                   break;
           default:
                   if (termacts[n->tok].pre && ENDBODY_NOT == n->end)
                           chld = (*termacts[n->tok].pre)
                                   (p, &npair, m, n);
                   break;
           }
   
         if (MDOC_TEXT == n->type)  
                 term_word(p, n->string);  
         else if (termacts[n->tok].pre && ENDBODY_NOT == n->end)  
                 chld = (*termacts[n->tok].pre)(p, &npair, m, n);  
   
         /*          /*
          * 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.
Line 353  print_mdoc_node(DECL_ARGS)
Line 364  print_mdoc_node(DECL_ARGS)
   
         term_fontpopq(p, font);          term_fontpopq(p, font);
   
         if (MDOC_TEXT != n->type && termacts[n->tok].post &&          switch (n->type) {
                         ! (MDOC_ENDED & n->flags)) {          case (MDOC_TEXT):
                   break;
           case (MDOC_TBL):
                   break;
           default:
                   if ( ! termacts[n->tok].post || MDOC_ENDED & n->flags)
                           break;
                 (void)(*termacts[n->tok].post)(p, &npair, m, n);                  (void)(*termacts[n->tok].post)(p, &npair, m, n);
   
                 /*                  /*
Line 372  print_mdoc_node(DECL_ARGS)
Line 389  print_mdoc_node(DECL_ARGS)
                  */                   */
                 if (ENDBODY_NOSPACE == n->end)                  if (ENDBODY_NOSPACE == n->end)
                         p->flags |= TERMP_NOSPACE;                          p->flags |= TERMP_NOSPACE;
                   break;
         }          }
   
         if (MDOC_EOS & n->flags)          if (MDOC_EOS & n->flags)
Line 1583  termp_bd_pre(DECL_ARGS)
Line 1601  termp_bd_pre(DECL_ARGS)
                 return(1);                  return(1);
   
         tabwidth = p->tabwidth;          tabwidth = p->tabwidth;
         p->tabwidth = term_len(p, 8);          if (DISP_literal == n->norm->Bd.type)
                   p->tabwidth = term_len(p, 8);
   
         rm = p->rmargin;          rm = p->rmargin;
         rmax = p->maxrmargin;          rmax = p->maxrmargin;
         p->rmargin = p->maxrmargin = TERM_MAXMARGIN;          p->rmargin = p->maxrmargin = TERM_MAXMARGIN;
Line 1855  termp_quote_pre(DECL_ARGS)
Line 1875  termp_quote_pre(DECL_ARGS)
         case (MDOC_Bq):          case (MDOC_Bq):
                 term_word(p, "[");                  term_word(p, "[");
                 break;                  break;
         case (MDOC__T):  
                 /* FALLTHROUGH */  
         case (MDOC_Do):          case (MDOC_Do):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case (MDOC_Dq):          case (MDOC_Dq):
Line 1867  termp_quote_pre(DECL_ARGS)
Line 1885  termp_quote_pre(DECL_ARGS)
         case (MDOC_Pq):          case (MDOC_Pq):
                 term_word(p, "(");                  term_word(p, "(");
                 break;                  break;
           case (MDOC__T):
                   /* FALLTHROUGH */
         case (MDOC_Qo):          case (MDOC_Qo):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case (MDOC_Qq):          case (MDOC_Qq):
Line 1919  termp_quote_post(DECL_ARGS)
Line 1939  termp_quote_post(DECL_ARGS)
         case (MDOC_Bq):          case (MDOC_Bq):
                 term_word(p, "]");                  term_word(p, "]");
                 break;                  break;
         case (MDOC__T):  
                 /* FALLTHROUGH */  
         case (MDOC_Do):          case (MDOC_Do):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case (MDOC_Dq):          case (MDOC_Dq):
Line 1931  termp_quote_post(DECL_ARGS)
Line 1949  termp_quote_post(DECL_ARGS)
         case (MDOC_Pq):          case (MDOC_Pq):
                 term_word(p, ")");                  term_word(p, ")");
                 break;                  break;
           case (MDOC__T):
                   /* FALLTHROUGH */
         case (MDOC_Qo):          case (MDOC_Qo):
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case (MDOC_Qq):          case (MDOC_Qq):

Legend:
Removed from v.1.204  
changed lines
  Added in v.1.209

CVSweb