version 1.93, 2019/04/07 13:16:21 |
version 1.94, 2019/04/07 14:49:26 |
Line 34 static void pnode_print(struct format *, struct pnode |
|
Line 34 static void pnode_print(struct format *, struct pnode |
|
static void |
static void |
pnode_printtext(struct format *f, struct pnode *n) |
pnode_printtext(struct format *f, struct pnode *n) |
{ |
{ |
|
struct pnode *nn; |
char *cp; |
char *cp; |
char last; |
char last; |
|
|
if (n->bsz == 0) { |
if (n->bsz == 0) { |
assert(n->real < n->b); |
assert(n->real < n->b); |
return; |
return; |
|
} |
|
|
|
/* |
|
* Text preceding a macro without intervening whitespace |
|
* requires a .Pf macro. |
|
* Set the spacing flag to avoid a redundant .Ns macro. |
|
*/ |
|
|
|
if (f->linestate != LINE_MACRO && |
|
(nn = TAILQ_NEXT(n, child)) != NULL && nn->spc == 0 && |
|
(nn->node != NODE_TEXT && nn->node != NODE_ESCAPE)) { |
|
macro_open(f, "Pf"); |
|
nn->spc = 1; |
} |
} |
|
|
if (f->linestate == LINE_NEW) { |
if (f->linestate == LINE_NEW) { |