[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.271 and 1.272

version 1.271, 2014/07/07 15:03:43 version 1.272, 2014/07/29 13:58:18
Line 1571  termp_fa_pre(DECL_ARGS)
Line 1571  termp_fa_pre(DECL_ARGS)
 static int  static int
 termp_bd_pre(DECL_ARGS)  termp_bd_pre(DECL_ARGS)
 {  {
         size_t                   tabwidth, rm, rmax;          size_t                   tabwidth, lm, len, rm, rmax;
         struct mdoc_node        *nn;          struct mdoc_node        *nn;
   
         if (MDOC_BLOCK == n->type) {          if (MDOC_BLOCK == n->type) {
Line 1592  termp_bd_pre(DECL_ARGS)
Line 1592  termp_bd_pre(DECL_ARGS)
          */           */
   
         if (DISP_literal != n->norm->Bd.type &&          if (DISP_literal != n->norm->Bd.type &&
             DISP_unfilled != n->norm->Bd.type)              DISP_unfilled != n->norm->Bd.type &&
               DISP_centered != n->norm->Bd.type)
                 return(1);                  return(1);
   
         tabwidth = p->tabwidth;          tabwidth = p->tabwidth;
         if (DISP_literal == n->norm->Bd.type)          if (DISP_literal == n->norm->Bd.type)
                 p->tabwidth = term_len(p, 8);                  p->tabwidth = term_len(p, 8);
   
           lm = p->offset;
         rm = p->rmargin;          rm = p->rmargin;
         rmax = p->maxrmargin;          rmax = p->maxrmargin;
         p->rmargin = p->maxrmargin = TERM_MAXMARGIN;          p->rmargin = p->maxrmargin = TERM_MAXMARGIN;
   
         for (nn = n->child; nn; nn = nn->next) {          for (nn = n->child; nn; nn = nn->next) {
                   if (DISP_centered == n->norm->Bd.type) {
                           if (MDOC_TEXT == nn->type) {
                                   len = term_strlen(p, nn->string);
                                   p->offset = len >= rm ? 0 :
                                       lm + len >= rm ? rm - len :
                                       (lm + rm - len) / 2;
                           } else
                                   p->offset = lm;
                   }
                 print_mdoc_node(p, pair, meta, nn);                  print_mdoc_node(p, pair, meta, nn);
                 /*                  /*
                  * If the printed node flushes its own line, then we                   * If the printed node flushes its own line, then we

Legend:
Removed from v.1.271  
changed lines
  Added in v.1.272

CVSweb