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

Diff for /mandoc/term.c between version 1.67 and 1.68

version 1.67, 2009/03/21 13:47:02 version 1.68, 2009/03/22 21:19:34
Line 98  static int    arg_getattr(int, const struct mdoc_node 
Line 98  static int    arg_getattr(int, const struct mdoc_node 
 static  size_t            arg_offset(const struct mdoc_argv *);  static  size_t            arg_offset(const struct mdoc_argv *);
 static  size_t            arg_width(const struct mdoc_argv *, int);  static  size_t            arg_width(const struct mdoc_argv *, int);
 static  int               arg_listtype(const struct mdoc_node *);  static  int               arg_listtype(const struct mdoc_node *);
   static  int               fmt_block_vspace(struct termp *,
                                   const struct mdoc_node *,
                                   const struct mdoc_node *);
   
 /*  /*
  * What follows describes prefix and postfix operations for the abstract   * What follows describes prefix and postfix operations for the abstract
Line 430  arg_getattrs(const int *keys, int *vals, 
Line 433  arg_getattrs(const int *keys, int *vals, 
   
 /* ARGSUSED */  /* ARGSUSED */
 static int  static int
   fmt_block_vspace(struct termp *p,
                   const struct mdoc_node *bl,
                   const struct mdoc_node *node)
   {
           const struct mdoc_node *n;
   
           term_newln(p);
   
           if (arg_hasattr(MDOC_Compact, bl))
                   return(1);
   
           for (n = node; n; n = n->parent) {
                   if (MDOC_BLOCK != n->type)
                           continue;
                   if (MDOC_Ss == n->tok)
                           break;
                   if (MDOC_Sh == n->tok)
                           break;
                   if (NULL == n->prev)
                           continue;
                   term_vspace(p);
                   break;
           }
   
           return(1);
   }
   
   
   /* ARGSUSED */
   static int
 termp_dq_pre(DECL_ARGS)  termp_dq_pre(DECL_ARGS)
 {  {
   
Line 457  termp_dq_post(DECL_ARGS)
Line 490  termp_dq_post(DECL_ARGS)
   
 /* ARGSUSED */  /* ARGSUSED */
 static int  static int
 termp_it_pre_block(DECL_ARGS)  
 {  
   
         term_newln(p);  
         if ( ! arg_hasattr(MDOC_Compact, node->parent->parent))  
                 term_vspace(p);  
   
         return(1);  
 }  
   
   
 /* ARGSUSED */  
 static int  
 termp_it_pre(DECL_ARGS)  termp_it_pre(DECL_ARGS)
 {  {
         const struct mdoc_node *bl, *n;          const struct mdoc_node *bl, *n;
Line 478  termp_it_pre(DECL_ARGS)
Line 498  termp_it_pre(DECL_ARGS)
         size_t                  width, offset;          size_t                  width, offset;
   
         if (MDOC_BLOCK == node->type)          if (MDOC_BLOCK == node->type)
                 return(termp_it_pre_block(p, pair, meta, node));                  return(fmt_block_vspace(p, node->parent->parent, node));
   
         bl = node->parent->parent->parent;          bl = node->parent->parent->parent;
   
Line 1265  termp_bd_pre(DECL_ARGS)
Line 1285  termp_bd_pre(DECL_ARGS)
          * line.  Blank lines are allowed.           * line.  Blank lines are allowed.
          */           */
   
         if (MDOC_BLOCK == node->type) {          if (MDOC_BLOCK == node->type)
                 /* FIXME: parent prev? */                  return(fmt_block_vspace(p, node, node));
                 if (node->prev)          else if (MDOC_BODY != node->type)
                         term_vspace(p);  
                 return(1);  
         } else if (MDOC_BODY != node->type)  
                 return(1);                  return(1);
   
         if (NULL == node->parent->args)          if (NULL == node->parent->args)

Legend:
Removed from v.1.67  
changed lines
  Added in v.1.68

CVSweb