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

Diff for /mandoc/man_term.c between version 1.37 and 1.38

version 1.37, 2009/10/18 11:14:04 version 1.38, 2009/10/18 11:52:18
Line 140  static void    print_foot(struct termp *, 
Line 140  static void    print_foot(struct termp *, 
 static  void              fmt_block_vspace(struct termp *,  static  void              fmt_block_vspace(struct termp *,
                                 const struct man_node *);                                  const struct man_node *);
 static  int               a2width(const char *);  static  int               a2width(const char *);
   static  int               a2height(const char *);
   
   
 void  void
Line 196  fmt_block_vspace(struct termp *p, const struct man_nod
Line 197  fmt_block_vspace(struct termp *p, const struct man_nod
   
   
 static int  static int
   a2height(const char *p)
   {
           struct roffsu    su;
           double           r;
   
           if ( ! a2roffsu(p, &su))
                   return(1);
   
           switch (su.unit) {
           case (SCALE_CM):
                   r = su.scale * 2;
                   break;
           case (SCALE_IN):
                   r = su.scale * 6;
                   break;
           case (SCALE_PC):
                   r = su.scale;
                   break;
           case (SCALE_PT):
                   r = su.scale / 8;
                   break;
           case (SCALE_MM):
                   r = su.scale / 1000;
                   break;
           case (SCALE_VS):
                   r = su.scale;
                   break;
           default:
                   r = su.scale - 1;
                   break;
           }
   
           if (r < 0.0)
                   r = 0.0;
           return(/* LINTED */(int)
                           r);
   }
   
   
   static int
 a2width(const char *p)  a2width(const char *p)
 {  {
         struct roffsu    su;          struct roffsu    su;
Line 435  pre_sp(DECL_ARGS)
Line 476  pre_sp(DECL_ARGS)
                 return(0);                  return(0);
         }          }
   
         len = atoi(n->child->string);          assert(MAN_TEXT == n->child->type);
           len = a2height(n->child->string);
   
         if (0 == len)          if (0 == len)
                 term_newln(p);                  term_newln(p);
         for (i = 0; i < len; i++)          for (i = 0; i < len; i++)

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

CVSweb