[BACK]Return to mdoc_man.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/mdoc_man.c between version 1.101 and 1.107

version 1.101, 2017/01/11 17:39:53 version 1.107, 2017/04/17 12:53:29
Line 639  print_node(DECL_ARGS)
Line 639  print_node(DECL_ARGS)
   
         if (ENDBODY_NOT != n->end)          if (ENDBODY_NOT != n->end)
                 n->body->flags |= NODE_ENDED;                  n->body->flags |= NODE_ENDED;
   
         if (ENDBODY_NOSPACE == n->end)  
                 outflags &= ~(MMAN_spc | MMAN_nl);  
 }  }
   
 static int  static int
Line 718  static int
Line 715  static int
 pre__t(DECL_ARGS)  pre__t(DECL_ARGS)
 {  {
   
         if (n->parent && MDOC_Rs == n->parent->tok &&          if (n->parent->tok == MDOC_Rs && n->parent->norm->Rs.quote_T) {
             n->parent->norm->Rs.quote_T) {                  print_word("\\(lq");
                 print_word("");  
                 putchar('\"');  
                 outflags &= ~MMAN_spc;                  outflags &= ~MMAN_spc;
         } else          } else
                 font_push('I');                  font_push('I');
Line 732  static void
Line 727  static void
 post__t(DECL_ARGS)  post__t(DECL_ARGS)
 {  {
   
         if (n->parent && MDOC_Rs == n->parent->tok &&          if (n->parent->tok  == MDOC_Rs && n->parent->norm->Rs.quote_T) {
             n->parent->norm->Rs.quote_T) {  
                 outflags &= ~MMAN_spc;                  outflags &= ~MMAN_spc;
                 print_word("");                  print_word("\\(rq");
                 putchar('\"');  
         } else          } else
                 font_pop();                  font_pop();
         post_percent(meta, n);          post_percent(meta, n);
Line 1472  pre_lk(DECL_ARGS)
Line 1465  pre_lk(DECL_ARGS)
 {  {
         const struct roff_node *link, *descr;          const struct roff_node *link, *descr;
   
         if (NULL == (link = n->child))          if ((link = n->child) == NULL)
                 return 0;                  return 0;
   
         if (NULL != (descr = link->next)) {          /* Link text. */
           if ((descr = link->next) != NULL && !(descr->flags & NODE_DELIMC)) {
                 font_push('I');                  font_push('I');
                 while (NULL != descr) {                  while (descr != NULL && !(descr->flags & NODE_DELIMC)) {
                         print_word(descr->string);                          print_word(descr->string);
                         descr = descr->next;                          descr = descr->next;
                 }                  }
                 print_word(":");  
                 font_pop();                  font_pop();
                   print_word(":");
         }          }
   
           /* Link target. */
         font_push('B');          font_push('B');
         print_word(link->string);          print_word(link->string);
         font_pop();          font_pop();
   
           /* Trailing punctuation. */
           while (descr != NULL) {
                   print_word(descr->string);
                   descr = descr->next;
           }
         return 0;          return 0;
 }  }
   
Line 1518  pre_nm(DECL_ARGS)
Line 1519  pre_nm(DECL_ARGS)
         }          }
         if (n->type != ROFFT_ELEM && n->type != ROFFT_HEAD)          if (n->type != ROFFT_ELEM && n->type != ROFFT_HEAD)
                 return 1;                  return 1;
         name = n->child ? n->child->string : meta->name;          name = n->child == NULL ? NULL : n->child->string;
         if (NULL == name)          if (NULL == name)
                 return 0;                  return 0;
         if (n->type == ROFFT_HEAD) {          if (n->type == ROFFT_HEAD) {
Line 1529  pre_nm(DECL_ARGS)
Line 1530  pre_nm(DECL_ARGS)
                 outflags |= MMAN_nl;                  outflags |= MMAN_nl;
         }          }
         font_push('B');          font_push('B');
         if (NULL == n->child)  
                 print_word(meta->name);  
         return 1;          return 1;
 }  }
   
Line 1544  post_nm(DECL_ARGS)
Line 1543  post_nm(DECL_ARGS)
                 break;                  break;
         case ROFFT_HEAD:          case ROFFT_HEAD:
         case ROFFT_ELEM:          case ROFFT_ELEM:
                 if (n->child != NULL || meta->name != NULL)                  if (n->child != NULL && n->child->string != NULL)
                         font_pop();                          font_pop();
                 break;                  break;
         default:          default:

Legend:
Removed from v.1.101  
changed lines
  Added in v.1.107

CVSweb