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

Diff for /mandoc/term.c between version 1.218 and 1.219

version 1.218, 2014/03/23 11:25:26 version 1.219, 2014/03/30 21:28:01
Line 623  encode(struct termp *p, const char *word, size_t sz)
Line 623  encode(struct termp *p, const char *word, size_t sz)
         }          }
 }  }
   
   void
   term_setwidth(struct termp *p, const char *wstr)
   {
           struct roffsu    su;
           size_t           width;
           int              iop;
   
           if (NULL != wstr) {
                   switch (*wstr) {
                   case ('+'):
                           iop = 1;
                           wstr++;
                           break;
                   case ('-'):
                           iop = -1;
                           wstr++;
                           break;
                   default:
                           iop = 0;
                           break;
                   }
                   if ( ! a2roffsu(wstr, &su, SCALE_MAX)) {
                           wstr = NULL;
                           iop = 0;
                   }
           }
           width = (NULL != wstr) ? term_hspan(p, &su) : 0;
           (*p->setwidth)(p, iop, width);
   }
   
 size_t  size_t
 term_len(const struct termp *p, size_t sz)  term_len(const struct termp *p, size_t sz)
 {  {

Legend:
Removed from v.1.218  
changed lines
  Added in v.1.219

CVSweb