[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.299 and 1.300

version 1.299, 2014/12/02 10:08:06 version 1.300, 2014/12/23 09:31:46
Line 50  struct termact {
Line 50  struct termact {
 };  };
   
 static  size_t    a2width(const struct termp *, const char *);  static  size_t    a2width(const struct termp *, const char *);
 static  size_t    a2height(const struct termp *, const char *);  
   
 static  void      print_bvspace(struct termp *,  static  void      print_bvspace(struct termp *,
                         const struct mdoc_node *,                          const struct mdoc_node *,
Line 527  print_mdoc_head(struct termp *p, const void *arg)
Line 526  print_mdoc_head(struct termp *p, const void *arg)
 }  }
   
 static size_t  static size_t
 a2height(const struct termp *p, const char *v)  
 {  
         struct roffsu    su;  
   
   
         assert(v);  
         if ( ! a2roffsu(v, &su, SCALE_VS))  
                 SCALE_VS_INIT(&su, atoi(v));  
   
         return(term_vspan(p, &su));  
 }  
   
 static size_t  
 a2width(const struct termp *p, const char *v)  a2width(const struct termp *p, const char *v)
 {  {
         struct roffsu    su;          struct roffsu    su;
   
         assert(v);          if (a2roffsu(v, &su, SCALE_MAX) < 2) {
         if ( ! a2roffsu(v, &su, SCALE_MAX)) {  
                 SCALE_HS_INIT(&su, term_strlen(p, v));                  SCALE_HS_INIT(&su, term_strlen(p, v));
                 su.scale /= term_strlen(p, "0");                  su.scale /= term_strlen(p, "0");
         }          }
Line 1816  termp_in_post(DECL_ARGS)
Line 1801  termp_in_post(DECL_ARGS)
 static int  static int
 termp_sp_pre(DECL_ARGS)  termp_sp_pre(DECL_ARGS)
 {  {
           struct roffsu    su;
         size_t           i, len;          size_t           i, len;
   
         switch (n->tok) {          switch (n->tok) {
         case MDOC_sp:          case MDOC_sp:
                 len = n->child ? a2height(p, n->child->string) : 1;                  if (n->child) {
                           if ( ! a2roffsu(n->child->string, &su, SCALE_VS))
                                   su.scale = 1.0;
                           len = term_vspan(p, &su);
                   } else
                           len = 1;
                 break;                  break;
         case MDOC_br:          case MDOC_br:
                 len = 0;                  len = 0;

Legend:
Removed from v.1.299  
changed lines
  Added in v.1.300

CVSweb