version 1.217, 2014/03/13 19:23:50 |
version 1.219, 2014/03/30 21:28:01 |
|
|
|
|
#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; |
|
|
|
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 |