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

Diff for /mandoc/term.c between version 1.217 and 1.220

version 1.217, 2014/03/13 19:23:50 version 1.220, 2014/04/05 21:18:19
Line 23 
Line 23 
   
 #include <assert.h>  #include <assert.h>
 #include <ctype.h>  #include <ctype.h>
 #include <stdint.h>  
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #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 "main.h"  #include "main.h"
Line 621  encode(struct termp *p, const char *word, size_t sz)
Line 621  encode(struct termp *p, const char *word, size_t sz)
                 else                  else
                         p->buf[p->col++] = word[i];                          p->buf[p->col++] = word[i];
         }          }
   }
   
   void
   term_setwidth(struct termp *p, const char *wstr)
   {
           struct roffsu    su;
           size_t           width;
           int              iop;
   
           iop = 0;
           width = 0;
           if (NULL != wstr) {
                   switch (*wstr) {
                   case ('+'):
                           iop = 1;
                           wstr++;
                           break;
                   case ('-'):
                           iop = -1;
                           wstr++;
                           break;
                   default:
                           break;
                   }
                   if (a2roffsu(wstr, &su, SCALE_MAX))
                           width = term_hspan(p, &su);
                   else
                           iop = 0;
           }
           (*p->setwidth)(p, iop, width);
 }  }
   
 size_t  size_t

Legend:
Removed from v.1.217  
changed lines
  Added in v.1.220

CVSweb