version 1.145, 2019/05/01 12:52:05 |
version 1.147, 2019/05/01 17:20:47 |
Line 40 pnode_printtext(struct format *f, struct pnode *n) |
|
Line 40 pnode_printtext(struct format *f, struct pnode *n) |
|
char *cp; |
char *cp; |
int accept_arg; |
int accept_arg; |
|
|
|
para_check(f); |
cp = n->b; |
cp = n->b; |
accept_arg = f->flags & FMT_ARG; |
accept_arg = f->flags & FMT_ARG; |
if (f->linestate == LINE_MACRO && !accept_arg && |
if (f->linestate == LINE_MACRO && !accept_arg && |
Line 930 pnode_print(struct format *f, struct pnode *n) |
|
Line 931 pnode_print(struct format *f, struct pnode *n) |
|
if (n == NULL) |
if (n == NULL) |
return; |
return; |
|
|
|
if (n->flags & NFLAG_LINE && |
|
(f->nofill || (f->flags & (FMT_ARG | FMT_IMPL)) == 0)) |
|
macro_close(f); |
|
|
was_impl = f->flags & FMT_IMPL; |
was_impl = f->flags & FMT_IMPL; |
if (n->flags & NFLAG_SPC) |
if (n->flags & NFLAG_SPC) |
f->flags &= ~FMT_NOSPC; |
f->flags &= ~FMT_NOSPC; |
Line 1193 pnode_print(struct format *f, struct pnode *n) |
|
Line 1198 pnode_print(struct format *f, struct pnode *n) |
|
break; |
break; |
} |
} |
|
|
|
if (pnode_class(n->node) == CLASS_NOFILL) |
|
f->nofill++; |
|
|
TAILQ_FOREACH(nc, &n->childq, child) |
TAILQ_FOREACH(nc, &n->childq, child) |
pnode_print(f, nc); |
pnode_print(f, nc); |
|
|
Line 1306 pnode_print(struct format *f, struct pnode *n) |
|
Line 1314 pnode_print(struct format *f, struct pnode *n) |
|
break; |
break; |
} |
} |
f->flags &= ~FMT_ARG; |
f->flags &= ~FMT_ARG; |
|
if (pnode_class(n->node) == CLASS_NOFILL) |
|
f->nofill--; |
} |
} |
|
|
void |
void |
Line 1313 ptree_print_mdoc(struct ptree *tree) |
|
Line 1323 ptree_print_mdoc(struct ptree *tree) |
|
{ |
{ |
struct format formatter; |
struct format formatter; |
|
|
formatter.level = 0; |
formatter.level = formatter.nofill = 0; |
formatter.linestate = LINE_NEW; |
formatter.linestate = LINE_NEW; |
formatter.parastate = PARA_HAVE; |
formatter.parastate = PARA_HAVE; |
pnode_printprologue(&formatter, tree->root); |
pnode_printprologue(&formatter, tree->root); |