[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.281 and 1.282

version 1.281, 2014/09/03 05:22:45 version 1.282, 2014/09/17 20:18:58
Line 65  static void   synopsis_pre(struct termp *,
Line 65  static void   synopsis_pre(struct termp *,
   
 static  void      termp____post(DECL_ARGS);  static  void      termp____post(DECL_ARGS);
 static  void      termp__t_post(DECL_ARGS);  static  void      termp__t_post(DECL_ARGS);
 static  void      termp_an_post(DECL_ARGS);  
 static  void      termp_bd_post(DECL_ARGS);  static  void      termp_bd_post(DECL_ARGS);
 static  void      termp_bk_post(DECL_ARGS);  static  void      termp_bk_post(DECL_ARGS);
 static  void      termp_bl_post(DECL_ARGS);  static  void      termp_bl_post(DECL_ARGS);
Line 138  static const struct termact termacts[MDOC_MAX] = {
Line 137  static const struct termact termacts[MDOC_MAX] = {
         { NULL, NULL }, /* El */          { NULL, NULL }, /* El */
         { termp_it_pre, termp_it_post }, /* It */          { termp_it_pre, termp_it_post }, /* It */
         { termp_under_pre, NULL }, /* Ad */          { termp_under_pre, NULL }, /* Ad */
         { termp_an_pre, termp_an_post }, /* An */          { termp_an_pre, NULL }, /* An */
         { termp_under_pre, NULL }, /* Ar */          { termp_under_pre, NULL }, /* Ar */
         { termp_cd_pre, NULL }, /* Cd */          { termp_cd_pre, NULL }, /* Cd */
         { termp_bold_pre, NULL }, /* Cm */          { termp_bold_pre, NULL }, /* Cm */
Line 1106  static int
Line 1105  static int
 termp_an_pre(DECL_ARGS)  termp_an_pre(DECL_ARGS)
 {  {
   
         if (NULL == n->child)          if (n->norm->An.auth == AUTH_split) {
                 return(1);  
   
         /*  
          * If not in the AUTHORS section, `An -split' will cause  
          * newlines to occur before the author name.  If in the AUTHORS  
          * section, by default, the first `An' invocation is nosplit,  
          * then all subsequent ones, regardless of whether interspersed  
          * with other macros/text, are split.  -split, in this case,  
          * will override the condition of the implied first -nosplit.  
          */  
   
         if (n->sec == SEC_AUTHORS) {  
                 if ( ! (TERMP_ANPREC & p->flags)) {  
                         if (TERMP_SPLIT & p->flags)  
                                 term_newln(p);  
                         return(1);  
                 }  
                 if (TERMP_NOSPLIT & p->flags)  
                         return(1);  
                 term_newln(p);  
                 return(1);  
         }  
   
         if (TERMP_SPLIT & p->flags)  
                 term_newln(p);  
   
         return(1);  
 }  
   
 static void  
 termp_an_post(DECL_ARGS)  
 {  
   
         if (n->child) {  
                 if (SEC_AUTHORS == n->sec)  
                         p->flags |= TERMP_ANPREC;  
                 return;  
         }  
   
         if (AUTH_split == n->norm->An.auth) {  
                 p->flags &= ~TERMP_NOSPLIT;                  p->flags &= ~TERMP_NOSPLIT;
                 p->flags |= TERMP_SPLIT;                  p->flags |= TERMP_SPLIT;
         } else if (AUTH_nosplit == n->norm->An.auth) {                  return(0);
           }
           if (n->norm->An.auth == AUTH_nosplit) {
                 p->flags &= ~TERMP_SPLIT;                  p->flags &= ~TERMP_SPLIT;
                 p->flags |= TERMP_NOSPLIT;                  p->flags |= TERMP_NOSPLIT;
                   return(0);
         }          }
   
           if (n->child == NULL)
                   return(0);
   
           if (p->flags & TERMP_SPLIT)
                   term_newln(p);
   
           if (n->sec == SEC_AUTHORS && ! (p->flags & TERMP_NOSPLIT))
                   p->flags |= TERMP_SPLIT;
   
           return(1);
 }  }
   
 static int  static int

Legend:
Removed from v.1.281  
changed lines
  Added in v.1.282

CVSweb