[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.92 and 1.94

version 1.92, 2009/10/18 19:03:37 version 1.94, 2009/10/22 18:55:32
Line 347  print_node(DECL_ARGS)
Line 347  print_node(DECL_ARGS)
 static void  static void
 print_foot(DECL_ARGS)  print_foot(DECL_ARGS)
 {  {
         struct tm       *tm;          char             buf[DATESIZ];
         char            *buf, *os;          char            *os;
   
         /*          /*
          * Output the footer in new-groff style, that is, three columns           * Output the footer in new-groff style, that is, three columns
Line 358  print_foot(DECL_ARGS)
Line 358  print_foot(DECL_ARGS)
          * SYSTEM                  DATE                    SYSTEM           * SYSTEM                  DATE                    SYSTEM
          */           */
   
         if (NULL == (buf = malloc(p->rmargin)))  
                 err(EXIT_FAILURE, "malloc");  
         if (NULL == (os = malloc(p->rmargin)))          if (NULL == (os = malloc(p->rmargin)))
                 err(EXIT_FAILURE, "malloc");                  err(EXIT_FAILURE, "malloc");
   
         tm = localtime(&m->date);          time2a(m->date, buf, DATESIZ);
   
         if (0 == strftime(buf, p->rmargin, "%B %e, %Y", tm))  
                 err(EXIT_FAILURE, "strftime");  
   
         (void)strlcpy(os, m->os, p->rmargin);          (void)strlcpy(os, m->os, p->rmargin);
   
         term_vspace(p);          term_vspace(p);
Line 398  print_foot(DECL_ARGS)
Line 393  print_foot(DECL_ARGS)
         p->rmargin = p->maxrmargin;          p->rmargin = p->maxrmargin;
         p->flags = 0;          p->flags = 0;
   
         free(buf);  
         free(os);          free(os);
 }  }
   
Line 494  arg2width(const struct mdoc_argv *arg, int pos)
Line 488  arg2width(const struct mdoc_argv *arg, int pos)
   
         assert(arg->value[pos]);          assert(arg->value[pos]);
         if ( ! a2roffsu(arg->value[pos], &su, SCALE_MAX))          if ( ! a2roffsu(arg->value[pos], &su, SCALE_MAX))
                 SCALE_HS_INIT(&su, strlen(arg->value[pos]) + 2);                  SCALE_HS_INIT(&su, strlen(arg->value[pos]));
   
         return(term_hspan(&su));          /* XXX: pachemu? */
           return(term_hspan(&su) + 2);
 }  }
   
   
 /* FIXME: put in utility file for front-ends. */  
 static int  static int
 arg_listtype(const struct mdoc_node *n)  arg_listtype(const struct mdoc_node *n)
 {  {

Legend:
Removed from v.1.92  
changed lines
  Added in v.1.94

CVSweb