[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.342 and 1.347

version 1.342, 2017/02/04 11:58:09 version 1.347, 2017/04/14 18:25:04
Line 395  print_mdoc_node(DECL_ARGS)
Line 395  print_mdoc_node(DECL_ARGS)
                  */                   */
                 if (ENDBODY_NOT != n->end)                  if (ENDBODY_NOT != n->end)
                         n->body->flags |= NODE_ENDED;                          n->body->flags |= NODE_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;  
                 break;                  break;
         }          }
   
Line 614  termp_ll_pre(DECL_ARGS)
Line 606  termp_ll_pre(DECL_ARGS)
 static int  static int
 termp_it_pre(DECL_ARGS)  termp_it_pre(DECL_ARGS)
 {  {
           struct roffsu           su;
         char                    buf[24];          char                    buf[24];
         const struct roff_node *bl, *nn;          const struct roff_node *bl, *nn;
         size_t                  ncols, dcol;          size_t                  ncols, dcol;
Line 691  termp_it_pre(DECL_ARGS)
Line 684  termp_it_pre(DECL_ARGS)
   
                 for (i = 0, nn = n->prev;                  for (i = 0, nn = n->prev;
                     nn->prev && i < (int)ncols;                      nn->prev && i < (int)ncols;
                     nn = nn->prev, i++)                      nn = nn->prev, i++) {
                         offset += dcol + a2width(p,                          SCALE_HS_INIT(&su,
                             bl->norm->Bl.cols[i]);                              term_strlen(p, bl->norm->Bl.cols[i]));
                           su.scale /= term_strlen(p, "0");
                           offset += term_hspan(p, &su) / 24 + dcol;
                   }
   
                 /*                  /*
                  * When exceeding the declared number of columns, leave                   * When exceeding the declared number of columns, leave
Line 708  termp_it_pre(DECL_ARGS)
Line 704  termp_it_pre(DECL_ARGS)
                  * Use the declared column widths, extended as explained                   * Use the declared column widths, extended as explained
                  * in the preceding paragraph.                   * in the preceding paragraph.
                  */                   */
                 width = a2width(p, bl->norm->Bl.cols[i]) + dcol;                  SCALE_HS_INIT(&su, term_strlen(p, bl->norm->Bl.cols[i]));
                   su.scale /= term_strlen(p, "0");
                   width = term_hspan(p, &su) / 24 + dcol;
                 break;                  break;
         default:          default:
                 if (NULL == bl->norm->Bl.width)                  if (NULL == bl->norm->Bl.width)
Line 996  termp_nm_pre(DECL_ARGS)
Line 994  termp_nm_pre(DECL_ARGS)
                 return 1;                  return 1;
         }          }
   
         if (NULL == n->child && NULL == meta->name)          if (n->child == NULL)
                 return 0;                  return 0;
   
         if (n->type == ROFFT_HEAD)          if (n->type == ROFFT_HEAD)
Line 1020  termp_nm_pre(DECL_ARGS)
Line 1018  termp_nm_pre(DECL_ARGS)
         }          }
   
         term_fontpush(p, TERMFONT_BOLD);          term_fontpush(p, TERMFONT_BOLD);
         if (NULL == n->child)  
                 term_word(p, meta->name);  
         return 1;          return 1;
 }  }
   
Line 1718  termp_quote_pre(DECL_ARGS)
Line 1714  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:
         case MDOC_Dq:          case MDOC_Dq:
                 term_word(p, "\\(Lq");                  term_word(p, "\\(Lq");
Line 1732  termp_quote_pre(DECL_ARGS)
Line 1730  termp_quote_pre(DECL_ARGS)
         case MDOC_Pq:          case MDOC_Pq:
                 term_word(p, "(");                  term_word(p, "(");
                 break;                  break;
         case MDOC__T:  
         case MDOC_Qo:          case MDOC_Qo:
         case MDOC_Qq:          case MDOC_Qq:
                 term_word(p, "\"");                  term_word(p, "\"");
Line 1775  termp_quote_post(DECL_ARGS)
Line 1772  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:
         case MDOC_Dq:          case MDOC_Dq:
                 term_word(p, "\\(Rq");                  term_word(p, "\\(Rq");
Line 1791  termp_quote_post(DECL_ARGS)
Line 1790  termp_quote_post(DECL_ARGS)
         case MDOC_Pq:          case MDOC_Pq:
                 term_word(p, ")");                  term_word(p, ")");
                 break;                  break;
         case MDOC__T:  
         case MDOC_Qo:          case MDOC_Qo:
         case MDOC_Qq:          case MDOC_Qq:
                 term_word(p, "\"");                  term_word(p, "\"");
Line 2005  termp_lk_pre(DECL_ARGS)
Line 2003  termp_lk_pre(DECL_ARGS)
                         term_word(p, descr->string);                          term_word(p, descr->string);
                         descr = descr->next;                          descr = descr->next;
                 }                  }
                   term_fontpop(p);
                 p->flags |= TERMP_NOSPACE;                  p->flags |= TERMP_NOSPACE;
                 term_word(p, ":");                  term_word(p, ":");
                 term_fontpop(p);  
         }          }
   
         term_fontpush(p, TERMFONT_BOLD);          term_fontpush(p, TERMFONT_BOLD);

Legend:
Removed from v.1.342  
changed lines
  Added in v.1.347

CVSweb