[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.112 and 1.116

version 1.112, 2017/05/05 13:17:55 version 1.116, 2017/05/30 16:31:29
Line 73  static void   post_nm(DECL_ARGS);
Line 73  static void   post_nm(DECL_ARGS);
 static  void      post_percent(DECL_ARGS);  static  void      post_percent(DECL_ARGS);
 static  void      post_pf(DECL_ARGS);  static  void      post_pf(DECL_ARGS);
 static  void      post_sect(DECL_ARGS);  static  void      post_sect(DECL_ARGS);
 static  void      post_sp(DECL_ARGS);  
 static  void      post_vt(DECL_ARGS);  static  void      post_vt(DECL_ARGS);
 static  int       pre__t(DECL_ARGS);  static  int       pre__t(DECL_ARGS);
 static  int       pre_an(DECL_ARGS);  static  int       pre_an(DECL_ARGS);
Line 102  static int   pre_in(DECL_ARGS);
Line 101  static int   pre_in(DECL_ARGS);
 static  int       pre_it(DECL_ARGS);  static  int       pre_it(DECL_ARGS);
 static  int       pre_lk(DECL_ARGS);  static  int       pre_lk(DECL_ARGS);
 static  int       pre_li(DECL_ARGS);  static  int       pre_li(DECL_ARGS);
 static  void      pre_ll(DECL_ARGS);  
 static  int       pre_nm(DECL_ARGS);  static  int       pre_nm(DECL_ARGS);
 static  int       pre_no(DECL_ARGS);  static  int       pre_no(DECL_ARGS);
 static  int       pre_ns(DECL_ARGS);  static  int       pre_ns(DECL_ARGS);
   static  void      pre_onearg(DECL_ARGS);
 static  int       pre_pp(DECL_ARGS);  static  int       pre_pp(DECL_ARGS);
 static  int       pre_rs(DECL_ARGS);  static  int       pre_rs(DECL_ARGS);
 static  int       pre_sm(DECL_ARGS);  static  int       pre_sm(DECL_ARGS);
 static  int       pre_sp(DECL_ARGS);  static  void      pre_sp(DECL_ARGS);
 static  int       pre_sect(DECL_ARGS);  static  int       pre_sect(DECL_ARGS);
 static  int       pre_sy(DECL_ARGS);  static  int       pre_sy(DECL_ARGS);
 static  void      pre_syn(const struct roff_node *);  static  void      pre_syn(const struct roff_node *);
   static  void      pre_ta(DECL_ARGS);
 static  int       pre_vt(DECL_ARGS);  static  int       pre_vt(DECL_ARGS);
 static  int       pre_xr(DECL_ARGS);  static  int       pre_xr(DECL_ARGS);
 static  void      print_word(const char *);  static  void      print_word(const char *);
Line 127  static void   print_node(DECL_ARGS);
Line 127  static void   print_node(DECL_ARGS);
 static  const void_fp roff_manacts[ROFF_MAX] = {  static  const void_fp roff_manacts[ROFF_MAX] = {
         pre_br,          pre_br,
         pre_ft,          pre_ft,
         pre_ll,          pre_onearg,
           pre_sp,
           pre_ta,
           pre_onearg,
 };  };
   
 static  const struct manact __manacts[MDOC_MAX - MDOC_Dd] = {  static  const struct manact __manacts[MDOC_MAX - MDOC_Dd] = {
Line 249  static const struct manact __manacts[MDOC_MAX - MDOC_D
Line 252  static const struct manact __manacts[MDOC_MAX - MDOC_D
         { cond_body, pre_en, post_en, NULL, NULL }, /* En */          { cond_body, pre_en, post_en, NULL, NULL }, /* En */
         { NULL, NULL, NULL, NULL, NULL }, /* Dx */          { NULL, NULL, NULL, NULL, NULL }, /* Dx */
         { NULL, NULL, post_percent, NULL, NULL }, /* %Q */          { NULL, NULL, post_percent, NULL, NULL }, /* %Q */
         { NULL, pre_sp, post_sp, NULL, NULL }, /* sp */  
         { NULL, NULL, post_percent, NULL, NULL }, /* %U */          { NULL, NULL, post_percent, NULL, NULL }, /* %U */
         { NULL, NULL, NULL, NULL, NULL }, /* Ta */          { NULL, NULL, NULL, NULL, NULL }, /* Ta */
 };  };
Line 444  static void
Line 446  static void
 print_line(const char *s, int newflags)  print_line(const char *s, int newflags)
 {  {
   
         outflags &= ~MMAN_br;  
         outflags |= MMAN_nl;          outflags |= MMAN_nl;
         print_word(s);          print_word(s);
         outflags |= newflags;          outflags |= newflags;
Line 1526  post_lb(DECL_ARGS)
Line 1527  post_lb(DECL_ARGS)
 static int  static int
 pre_lk(DECL_ARGS)  pre_lk(DECL_ARGS)
 {  {
         const struct roff_node *link, *descr;          const struct roff_node *link, *descr, *punct;
         int display;          int display;
   
         if ((link = n->child) == NULL)          if ((link = n->child) == NULL)
                 return 0;                  return 0;
   
           /* Find beginning of trailing punctuation. */
           punct = n->last;
           while (punct != link && punct->flags & NODE_DELIMC)
                   punct = punct->prev;
           punct = punct->next;
   
         /* Link text. */          /* Link text. */
         if ((descr = link->next) != NULL && !(descr->flags & NODE_DELIMC)) {          if ((descr = link->next) != NULL && descr != punct) {
                 font_push('I');                  font_push('I');
                 while (descr != NULL && !(descr->flags & NODE_DELIMC)) {                  while (descr != punct) {
                         print_word(descr->string);                          print_word(descr->string);
                         descr = descr->next;                          descr = descr->next;
                 }                  }
Line 1555  pre_lk(DECL_ARGS)
Line 1562  pre_lk(DECL_ARGS)
         font_pop();          font_pop();
   
         /* Trailing punctuation. */          /* Trailing punctuation. */
         while (descr != NULL) {          while (punct != NULL) {
                 print_word(descr->string);                  print_word(punct->string);
                 descr = descr->next;                  punct = punct->next;
         }          }
         if (display)          if (display)
                 print_line(".RE", MMAN_nl);                  print_line(".RE", MMAN_nl);
Line 1565  pre_lk(DECL_ARGS)
Line 1572  pre_lk(DECL_ARGS)
 }  }
   
 static void  static void
 pre_ll(DECL_ARGS)  pre_onearg(DECL_ARGS)
 {  {
         print_line(".ll", 0);          outflags |= MMAN_nl;
           print_word(".");
           outflags &= ~MMAN_spc;
           print_word(roff_name[n->tok]);
         if (n->child != NULL)          if (n->child != NULL)
                 print_word(n->child->string);                  print_word(n->child->string);
         outflags |= MMAN_nl;          outflags |= MMAN_nl;
Line 1694  pre_sm(DECL_ARGS)
Line 1704  pre_sm(DECL_ARGS)
         return 0;          return 0;
 }  }
   
 static int  static void
 pre_sp(DECL_ARGS)  pre_sp(DECL_ARGS)
 {  {
           if (outflags & MMAN_PP) {
         if (MMAN_PP & outflags) {  
                 outflags &= ~MMAN_PP;                  outflags &= ~MMAN_PP;
                 print_line(".PP", 0);                  print_line(".PP", 0);
         } else          } else {
                 print_line(".sp", 0);                  print_line(".sp", 0);
         return 1;                  if (n->child != NULL)
 }                          print_word(n->child->string);
           }
 static void  
 post_sp(DECL_ARGS)  
 {  
   
         outflags |= MMAN_nl;          outflags |= MMAN_nl;
 }  }
   
Line 1719  pre_sy(DECL_ARGS)
Line 1724  pre_sy(DECL_ARGS)
   
         font_push('B');          font_push('B');
         return 1;          return 1;
   }
   
   static void
   pre_ta(DECL_ARGS)
   {
           print_line(".ta", 0);
           for (n = n->child; n != NULL; n = n->next)
                   print_word(n->string);
           outflags |= MMAN_nl;
 }  }
   
 static int  static int

Legend:
Removed from v.1.112  
changed lines
  Added in v.1.116

CVSweb