version 1.14, 2019/04/16 14:26:27 |
version 1.17, 2019/05/01 15:05:39 |
Line 49 macro_open(struct format *f, const char *name) |
|
Line 49 macro_open(struct format *f, const char *name) |
|
} |
} |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case LINE_TEXT: |
case LINE_TEXT: |
|
if (f->nofill) |
|
fputs(" \\c", stdout); |
putchar('\n'); |
putchar('\n'); |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case LINE_NEW: |
case LINE_NEW: |
|
|
macro_addnode(struct format *f, struct pnode *n, int flags) |
macro_addnode(struct format *f, struct pnode *n, int flags) |
{ |
{ |
struct pnode *nc; |
struct pnode *nc; |
int quote_now; |
int is_text, quote_now; |
|
|
assert(f->linestate == LINE_MACRO); |
assert(f->linestate == LINE_MACRO); |
|
|
Line 209 macro_addnode(struct format *f, struct pnode *n, int f |
|
Line 211 macro_addnode(struct format *f, struct pnode *n, int f |
|
|
|
while (nc != NULL) { |
while (nc != NULL) { |
macro_addnode(f, nc, flags); |
macro_addnode(f, nc, flags); |
|
is_text = pnode_class(nc->node) == CLASS_TEXT; |
nc = TAILQ_NEXT(nc, child); |
nc = TAILQ_NEXT(nc, child); |
flags |= ARG_SPACE; |
if (nc == NULL || pnode_class(nc->node) != CLASS_TEXT) |
|
is_text = 0; |
|
if (is_text && (nc->flags & NFLAG_SPC) == 0) |
|
flags &= ~ARG_SPACE; |
|
else |
|
flags |= ARG_SPACE; |
} |
} |
if (quote_now) |
if (quote_now) |
putchar('"'); |
putchar('"'); |