[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.308 and 1.313

version 1.308, 2015/02/05 01:46:56 version 1.313, 2015/03/06 15:48:52
Line 309  print_mdoc_node(DECL_ARGS)
Line 309  print_mdoc_node(DECL_ARGS)
         chld = 1;          chld = 1;
         offset = p->offset;          offset = p->offset;
         rmargin = p->rmargin;          rmargin = p->rmargin;
           n->flags &= ~MDOC_ENDED;
         n->prev_font = p->fonti;          n->prev_font = p->fonti;
   
         memset(&npair, 0, sizeof(struct termpair));          memset(&npair, 0, sizeof(struct termpair));
Line 347  print_mdoc_node(DECL_ARGS)
Line 348  print_mdoc_node(DECL_ARGS)
                         p->flags |= TERMP_NOSPACE;                          p->flags |= TERMP_NOSPACE;
                 break;                  break;
         case MDOC_TBL:          case MDOC_TBL:
                   if (p->tbl.cols == NULL)
                           term_newln(p);
                 term_tbl(p, n->span);                  term_tbl(p, n->span);
                 break;                  break;
         default:          default:
Line 361  print_mdoc_node(DECL_ARGS)
Line 364  print_mdoc_node(DECL_ARGS)
                 print_mdoc_nodelist(p, &npair, meta, n->child);                  print_mdoc_nodelist(p, &npair, meta, n->child);
   
         term_fontpopq(p,          term_fontpopq(p,
             (ENDBODY_NOT == n->end ? n : n->pending)->prev_font);              (ENDBODY_NOT == n->end ? n : n->body)->prev_font);
   
         switch (n->type) {          switch (n->type) {
         case MDOC_TEXT:          case MDOC_TEXT:
Line 381  print_mdoc_node(DECL_ARGS)
Line 384  print_mdoc_node(DECL_ARGS)
                  * that it must not call the post handler again.                   * that it must not call the post handler again.
                  */                   */
                 if (ENDBODY_NOT != n->end)                  if (ENDBODY_NOT != n->end)
                         n->pending->flags |= MDOC_ENDED;                          n->body->flags |= MDOC_ENDED;
   
                 /*                  /*
                  * End of line terminating an implicit block                   * End of line terminating an implicit block
Line 1807  static int
Line 1810  static int
 termp_sp_pre(DECL_ARGS)  termp_sp_pre(DECL_ARGS)
 {  {
         struct roffsu    su;          struct roffsu    su;
         size_t           i, len;          int              i, len;
   
         switch (n->tok) {          switch (n->tok) {
         case MDOC_sp:          case MDOC_sp:
Line 1828  termp_sp_pre(DECL_ARGS)
Line 1831  termp_sp_pre(DECL_ARGS)
   
         if (0 == len)          if (0 == len)
                 term_newln(p);                  term_newln(p);
         for (i = 0; i < len; i++)          else if (len < 0)
                 term_vspace(p);                  p->skipvsp -= len;
           else
                   for (i = 0; i < len; i++)
                           term_vspace(p);
   
         return(0);          return(0);
 }  }
Line 1872  termp_quote_pre(DECL_ARGS)
Line 1878  termp_quote_pre(DECL_ARGS)
         case MDOC_Do:          case MDOC_Do:
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case MDOC_Dq:          case MDOC_Dq:
                 term_word(p, "\\(lq");                  term_word(p, "\\(Lq");
                 break;                  break;
         case MDOC_En:          case MDOC_En:
                 if (NULL == n->norm->Es ||                  if (NULL == n->norm->Es ||
Line 1941  termp_quote_post(DECL_ARGS)
Line 1947  termp_quote_post(DECL_ARGS)
         case MDOC_Do:          case MDOC_Do:
                 /* FALLTHROUGH */                  /* FALLTHROUGH */
         case MDOC_Dq:          case MDOC_Dq:
                 term_word(p, "\\(rq");                  term_word(p, "\\(Rq");
                 break;                  break;
         case MDOC_En:          case MDOC_En:
                 if (n->norm->Es == NULL ||                  if (n->norm->Es == NULL ||
Line 1989  termp_eo_pre(DECL_ARGS)
Line 1995  termp_eo_pre(DECL_ARGS)
             n->child->end != ENDBODY_NOT)              n->child->end != ENDBODY_NOT)
                 term_word(p, "\\&");                  term_word(p, "\\&");
         else if (n->end != ENDBODY_NOT ? n->child != NULL :          else if (n->end != ENDBODY_NOT ? n->child != NULL :
              n->parent->head->child != NULL &&               n->parent->head->child != NULL && (n->child != NULL ||
              (n->parent->body->child != NULL ||               (n->parent->tail != NULL && n->parent->tail->child != NULL)))
               n->parent->tail->child != NULL))  
                 p->flags |= TERMP_NOSPACE;                  p->flags |= TERMP_NOSPACE;
   
         return(1);          return(1);

Legend:
Removed from v.1.308  
changed lines
  Added in v.1.313

CVSweb