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

Diff for /src/usr.bin/mandoc/man_term.c between version 1.101 and 1.102

version 1.101, 2014/04/20 20:17:36 version 1.102, 2014/04/23 16:07:06
Line 1115 
Line 1115 
 static void  static void
 print_man_head(struct termp *p, const void *arg)  print_man_head(struct termp *p, const void *arg)
 {  {
         char                     buf[BUFSIZ];  
         const struct man_meta   *meta;          const struct man_meta   *meta;
           const char              *volume;
         char                    *title;          char                    *title;
         size_t                   buflen, titlen;          size_t                   vollen, titlen;
   
         meta = (const struct man_meta *)arg;          meta = (const struct man_meta *)arg;
         assert(meta->title);          assert(meta->title);
         assert(meta->msec);          assert(meta->msec);
   
         if (meta->vol)          volume = NULL == meta->vol ? "" : meta->vol;
                 strlcpy(buf, meta->vol, BUFSIZ);          vollen = term_strlen(p, volume);
         else  
                 buf[0] = '\0';  
         buflen = term_strlen(p, buf);  
   
         /* Top left corner: manual title and section. */          /* Top left corner: manual title and section. */
   
Line 1138 
Line 1135 
         p->flags |= TERMP_NOBREAK | TERMP_NOSPACE;          p->flags |= TERMP_NOBREAK | TERMP_NOSPACE;
         p->trailspace = 1;          p->trailspace = 1;
         p->offset = 0;          p->offset = 0;
         p->rmargin = 2 * (titlen+1) + buflen < p->maxrmargin ?          p->rmargin = 2 * (titlen+1) + vollen < p->maxrmargin ?
             (p->maxrmargin -              (p->maxrmargin - vollen + term_len(p, 1)) / 2 :
              term_strlen(p, buf) + term_len(p, 1)) / 2 :              p->maxrmargin - vollen;
             p->maxrmargin - buflen;  
   
         term_word(p, title);          term_word(p, title);
         term_flushln(p);          term_flushln(p);
Line 1150 
Line 1146 
   
         p->flags |= TERMP_NOSPACE;          p->flags |= TERMP_NOSPACE;
         p->offset = p->rmargin;          p->offset = p->rmargin;
         p->rmargin = p->offset + buflen + titlen < p->maxrmargin ?          p->rmargin = p->offset + vollen + titlen < p->maxrmargin ?
             p->maxrmargin - titlen : p->maxrmargin;              p->maxrmargin - titlen : p->maxrmargin;
   
         term_word(p, buf);          term_word(p, volume);
         term_flushln(p);          term_flushln(p);
   
         /* Top right corner: title and section, again. */          /* Top right corner: title and section, again. */

Legend:
Removed from v.1.101  
changed lines
  Added in v.1.102