[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.140 and 1.141

version 1.140, 2010/06/04 22:26:13 version 1.141, 2010/06/06 10:50:56
Line 82  static void   termp_dq_post(DECL_ARGS);
Line 82  static void   termp_dq_post(DECL_ARGS);
 static  void      termp_fd_post(DECL_ARGS);  static  void      termp_fd_post(DECL_ARGS);
 static  void      termp_fn_post(DECL_ARGS);  static  void      termp_fn_post(DECL_ARGS);
 static  void      termp_fo_post(DECL_ARGS);  static  void      termp_fo_post(DECL_ARGS);
 static  void      termp_ft_post(DECL_ARGS);  
 static  void      termp_in_post(DECL_ARGS);  static  void      termp_in_post(DECL_ARGS);
 static  void      termp_it_post(DECL_ARGS);  static  void      termp_it_post(DECL_ARGS);
 static  void      termp_lb_post(DECL_ARGS);  static  void      termp_lb_post(DECL_ARGS);
Line 166  static const struct termact termacts[MDOC_MAX] = {
Line 165  static const struct termact termacts[MDOC_MAX] = {
         { termp_bold_pre, termp_fd_post }, /* Fd */          { termp_bold_pre, termp_fd_post }, /* Fd */
         { termp_fl_pre, NULL }, /* Fl */          { termp_fl_pre, NULL }, /* Fl */
         { termp_fn_pre, termp_fn_post }, /* Fn */          { termp_fn_pre, termp_fn_post }, /* Fn */
         { termp_ft_pre, termp_ft_post }, /* Ft */          { termp_ft_pre, NULL }, /* Ft */
         { termp_bold_pre, NULL }, /* Ic */          { termp_bold_pre, NULL }, /* Ic */
         { termp_in_pre, termp_in_post }, /* In */          { termp_in_pre, termp_in_post }, /* In */
         { termp_li_pre, NULL }, /* Li */          { termp_li_pre, NULL }, /* Li */
Line 1511  static int
Line 1510  static int
 termp_ft_pre(DECL_ARGS)  termp_ft_pre(DECL_ARGS)
 {  {
   
         if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags)          /* NB: MDOC_LINE does not effect this! */
                 if (n->prev && MDOC_Fo == n->prev->tok)          if (SEC_SYNOPSIS == n->sec && n->prev)
                         term_vspace(p);                  term_vspace(p);
   
         term_fontpush(p, TERMFONT_UNDER);          term_fontpush(p, TERMFONT_UNDER);
         return(1);          return(1);
Line 1521  termp_ft_pre(DECL_ARGS)
Line 1520  termp_ft_pre(DECL_ARGS)
   
   
 /* ARGSUSED */  /* ARGSUSED */
 static void  
 termp_ft_post(DECL_ARGS)  
 {  
   
         if (SEC_SYNOPSIS == n->sec && MDOC_LINE & n->flags)  
                 term_newln(p);  
 }  
   
   
 /* ARGSUSED */  
 static int  static int
 termp_fn_pre(DECL_ARGS)  termp_fn_pre(DECL_ARGS)
 {  {
Line 1993  termp_pq_post(DECL_ARGS)
Line 1982  termp_pq_post(DECL_ARGS)
 static int  static int
 termp_fo_pre(DECL_ARGS)  termp_fo_pre(DECL_ARGS)
 {  {
         const struct mdoc_node *nn;  
   
         if (MDOC_BODY == n->type) {          if (MDOC_BLOCK == n->type) {
                   /* NB: MDOC_LINE has no effect on this macro! */
                   if (SEC_SYNOPSIS != n->sec)
                           return(1);
                   if (n->prev && MDOC_Ft == n->prev->tok)
                           term_newln(p);
                   else if (n->prev)
                           term_vspace(p);
                   return(1);
           } else if (MDOC_BODY == n->type) {
                 p->flags |= TERMP_NOSPACE;                  p->flags |= TERMP_NOSPACE;
                 term_word(p, "(");                  term_word(p, "(");
                 p->flags |= TERMP_NOSPACE;                  p->flags |= TERMP_NOSPACE;
                 return(1);                  return(1);
         } else if (MDOC_HEAD != n->type)          }
                 return(1);  
   
         term_fontpush(p, TERMFONT_BOLD);          /* XXX: we drop non-initial arguments as per groff. */
         for (nn = n->child; nn; nn = nn->next) {  
                 assert(MDOC_TEXT == nn->type);  
                 term_word(p, nn->string);  
         }  
         term_fontpop(p);  
   
           assert(n->child);
           assert(n->child->string);
           term_fontpush(p, TERMFONT_BOLD);
           term_word(p, n->child->string);
         return(0);          return(0);
 }  }
   
Line 2019  static void
Line 2014  static void
 termp_fo_post(DECL_ARGS)  termp_fo_post(DECL_ARGS)
 {  {
   
         if (MDOC_BODY != n->type)          if (MDOC_BLOCK == n->type) {
                 return;                  /* NB: MDOC_LINE has no effect on this macro! */
         p->flags |= TERMP_NOSPACE;                  if (SEC_SYNOPSIS == n->sec)
         term_word(p, ")");                          term_newln(p);
         p->flags |= TERMP_NOSPACE;          } else if (MDOC_BODY == n->type) {
         term_word(p, ";");                  p->flags |= TERMP_NOSPACE;
         term_newln(p);                  term_word(p, ")");
                   if (SEC_SYNOPSIS == n->sec) {
                           p->flags |= TERMP_NOSPACE;
                           term_word(p, ";");
                   }
           }
 }  }
   
   

Legend:
Removed from v.1.140  
changed lines
  Added in v.1.141

CVSweb