version 1.147, 2019/05/01 17:20:47 |
version 1.148, 2019/05/02 04:15:40 |
Line 55 pnode_printtext(struct format *f, struct pnode *n) |
|
Line 55 pnode_printtext(struct format *f, struct pnode *n) |
|
if (isspace((unsigned char)*cp)) { |
if (isspace((unsigned char)*cp)) { |
while (isspace((unsigned char)*cp)) |
while (isspace((unsigned char)*cp)) |
cp++; |
cp++; |
macro_close(f); |
n->flags |= NFLAG_SPC; |
} else { |
} else { |
fputs(" Ns", stdout); |
f->flags &= ~FMT_NOSPC; |
f->flags &= FMT_IMPL; |
f->flags |= FMT_CHILD; |
|
macro_open(f, "Ns"); |
|
f->flags &= ~FMT_ARG; |
|
f->flags |= FMT_CHILD; |
accept_arg = 1; |
accept_arg = 1; |
} |
} |
} |
} |
if (f->linestate == LINE_MACRO && !accept_arg && |
if (f->linestate == LINE_MACRO && f->nofill == 0 && |
(f->flags & (FMT_CHILD | FMT_IMPL)) == 0) |
!accept_arg && (f->flags & FMT_IMPL) == 0) |
macro_close(f); |
macro_close(f); |
|
|
/* |
/* |
Line 72 pnode_printtext(struct format *f, struct pnode *n) |
|
Line 75 pnode_printtext(struct format *f, struct pnode *n) |
|
* Set the spacing flag to avoid a redundant .Ns macro. |
* Set the spacing flag to avoid a redundant .Ns macro. |
*/ |
*/ |
|
|
if (f->linestate != LINE_MACRO && |
if ((f->nofill || f->linestate != LINE_MACRO) && |
(nn = TAILQ_NEXT(n, child)) != NULL && |
(nn = TAILQ_NEXT(n, child)) != NULL && |
(nn->flags & NFLAG_SPC) == 0) { |
(nn->flags & NFLAG_SPC) == 0) { |
switch (pnode_class(nn->node)) { |
switch (pnode_class(nn->node)) { |
Line 101 pnode_printtext(struct format *f, struct pnode *n) |
|
Line 104 pnode_printtext(struct format *f, struct pnode *n) |
|
} |
} |
break; |
break; |
case LINE_MACRO: |
case LINE_MACRO: |
if (accept_arg == 0) |
if (accept_arg == 0) { |
macro_close(f); |
if (f->nofill) { |
else if (n->flags & NFLAG_SPC || |
f->flags &= ~FMT_NOSPC; |
|
f->flags |= FMT_CHILD; |
|
macro_open(f, "No "); |
|
f->flags &= ~FMT_ARG; |
|
f->flags |= FMT_CHILD; |
|
} else |
|
macro_close(f); |
|
} else if (n->flags & NFLAG_SPC || |
(f->flags & FMT_ARG) == 0 || |
(f->flags & FMT_ARG) == 0 || |
(nn = TAILQ_PREV(n, pnodeq, child)) == NULL || |
(nn = TAILQ_PREV(n, pnodeq, child)) == NULL || |
pnode_class(nn->node) != CLASS_TEXT) |
pnode_class(nn->node) != CLASS_TEXT) |