version 1.101, 2009/09/17 07:41:28 |
version 1.104, 2009/10/10 11:05:23 |
|
|
#include "man.h" |
#include "man.h" |
#include "mdoc.h" |
#include "mdoc.h" |
|
|
|
/* FIXME: accomodate non-breaking, non-collapsing white-space. */ |
|
/* FIXME: accomodate non-breaking, collapsing white-space. */ |
|
|
extern void man_run(struct termp *, |
extern void man_run(struct termp *, |
const struct man *); |
const struct man *); |
extern void mdoc_run(struct termp *, |
extern void mdoc_run(struct termp *, |
Line 90 term_free(struct termp *p) |
|
Line 93 term_free(struct termp *p) |
|
|
|
if (p->buf) |
if (p->buf) |
free(p->buf); |
free(p->buf); |
if (TERMENC_ASCII == p->enc && p->symtab) |
if (p->symtab) |
chars_free(p->symtab); |
chars_free(p->symtab); |
|
|
free(p); |
free(p); |
|
|
term_flushln(struct termp *p) |
term_flushln(struct termp *p) |
{ |
{ |
int i, j; |
int i, j; |
size_t vbl, vsz, vis, maxvis, mmax, bp; |
size_t vbl, vsz, vis, maxvis, mmax, bp, os; |
static int overstep = 0; |
static int overstep = 0; |
|
|
/* |
/* |
Line 169 term_flushln(struct termp *p) |
|
Line 172 term_flushln(struct termp *p) |
|
assert(p->offset < p->rmargin); |
assert(p->offset < p->rmargin); |
assert((int)(p->rmargin - p->offset) - overstep > 0); |
assert((int)(p->rmargin - p->offset) - overstep > 0); |
|
|
|
/* Save the overstep. */ |
|
os = (size_t)overstep; |
|
|
maxvis = /* LINTED */ |
maxvis = /* LINTED */ |
p->rmargin - p->offset - overstep; |
p->rmargin - p->offset - overstep; |
mmax = /* LINTED */ |
mmax = /* LINTED */ |
Line 230 term_flushln(struct termp *p) |
|
Line 236 term_flushln(struct termp *p) |
|
putchar(' '); |
putchar(' '); |
vis = 0; |
vis = 0; |
} |
} |
|
/* Remove the overstep width. */ |
|
bp += os; |
|
os = 0; |
} else { |
} else { |
for (j = 0; j < (int)vbl; j++) |
for (j = 0; j < (int)vbl; j++) |
putchar(' '); |
putchar(' '); |