[BACK]Return to mdoc_term.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/mdoc_term.c between version 1.167 and 1.168

version 1.167, 2014/04/20 19:39:35 version 1.168, 2014/04/20 20:17:36
Line 26 
Line 26 
 #include <string.h>  #include <string.h>
   
 #include "mandoc.h"  #include "mandoc.h"
   #include "mandoc_aux.h"
 #include "out.h"  #include "out.h"
 #include "term.h"  #include "term.h"
 #include "mdoc.h"  #include "mdoc.h"
Line 437 
Line 438 
 static void  static void
 print_mdoc_head(struct termp *p, const void *arg)  print_mdoc_head(struct termp *p, const void *arg)
 {  {
         char            buf[BUFSIZ], title[BUFSIZ];          char                     buf[BUFSIZ];
         size_t          buflen, titlen;          const struct mdoc_meta  *meta;
         const struct mdoc_meta *meta;          char                    *title;
           size_t                   buflen, titlen;
   
         meta = (const struct mdoc_meta *)arg;          meta = (const struct mdoc_meta *)arg;
   
Line 469 
Line 471 
                 strlcat(buf, ")", BUFSIZ);                  strlcat(buf, ")", BUFSIZ);
         }          }
   
         snprintf(title, BUFSIZ, "%s(%s)", meta->title, meta->msec);          mandoc_asprintf(&title, "%s(%s)", meta->title, meta->msec);
         titlen = term_strlen(p, title);          titlen = term_strlen(p, title);
   
         p->flags |= TERMP_NOBREAK | TERMP_NOSPACE;          p->flags |= TERMP_NOBREAK | TERMP_NOSPACE;
Line 504 
Line 506 
         p->flags &= ~TERMP_NOSPACE;          p->flags &= ~TERMP_NOSPACE;
         p->offset = 0;          p->offset = 0;
         p->rmargin = p->maxrmargin;          p->rmargin = p->maxrmargin;
           free(title);
 }  }
   
 static size_t  static size_t

Legend:
Removed from v.1.167  
changed lines
  Added in v.1.168