version 1.95, 2019/04/07 15:06:56 |
version 1.96, 2019/04/07 17:00:56 |
Line 521 pnode_printauthor(struct format *f, struct pnode *n) |
|
Line 521 pnode_printauthor(struct format *f, struct pnode *n) |
|
} |
} |
|
|
static void |
static void |
|
pnode_printlink(struct format *f, struct pnode *n) |
|
{ |
|
const char *uri, *text; |
|
|
|
uri = pnode_getattr_raw(n, ATTRKEY_LINKEND, NULL); |
|
if (uri != NULL) { |
|
if (TAILQ_FIRST(&n->childq) != NULL) { |
|
print_textnode(f, n); |
|
text = ""; |
|
} else { |
|
text = pnode_getattr_raw(n, ATTRKEY_ENDTERM, NULL); |
|
if (text != NULL) |
|
print_text(f, text, ARG_SPACE); |
|
} |
|
if (text != NULL) |
|
macro_open(f, "Pq"); |
|
macro_open(f, "Sx"); |
|
macro_addarg(f, uri, ARG_SPACE); |
|
pnode_unlinksub(n); |
|
return; |
|
} |
|
uri = pnode_getattr_raw(n, ATTRKEY_XLINK_HREF, NULL); |
|
if (uri == NULL) |
|
uri = pnode_getattr_raw(n, ATTRKEY_URL, NULL); |
|
if (uri != NULL) { |
|
macro_open(f, "Lk"); |
|
macro_addarg(f, uri, ARG_SPACE | ARG_SINGLE); |
|
if (TAILQ_FIRST(&n->childq) != NULL) |
|
macro_addnode(f, n, ARG_SPACE | ARG_SINGLE); |
|
pnode_unlinksub(n); |
|
return; |
|
} |
|
} |
|
|
|
static void |
pnode_printprologue(struct format *p, struct ptree *tree) |
pnode_printprologue(struct format *p, struct ptree *tree) |
{ |
{ |
struct pnode *refmeta; |
struct pnode *refmeta; |
|
|
pnode_print(struct format *p, struct pnode *pn) |
pnode_print(struct format *p, struct pnode *pn) |
{ |
{ |
struct pnode *pp; |
struct pnode *pp; |
const char *ccp; |
|
enum linestate sv; |
enum linestate sv; |
|
|
if (pn == NULL) |
if (pn == NULL) |
Line 794 pnode_print(struct format *p, struct pnode *pn) |
|
Line 828 pnode_print(struct format *p, struct pnode *pn) |
|
macro_line(p, "Sh LEGAL NOTICE"); |
macro_line(p, "Sh LEGAL NOTICE"); |
break; |
break; |
case NODE_LINK: |
case NODE_LINK: |
ccp = pnode_getattr_raw(pn, ATTRKEY_LINKEND, NULL); |
pnode_printlink(p, pn); |
if (ccp == NULL) |
break; |
break; |
|
macro_argline(p, "Sx", ccp); |
|
return; |
|
case NODE_LITERAL: |
case NODE_LITERAL: |
macro_open(p, "Ql"); |
macro_open(p, "Ql"); |
break; |
break; |
Line 964 pnode_print(struct format *p, struct pnode *pn) |
|
Line 995 pnode_print(struct format *p, struct pnode *pn) |
|
case NODE_FUNCTION: |
case NODE_FUNCTION: |
case NODE_FUNCSYNOPSISINFO: |
case NODE_FUNCSYNOPSISINFO: |
case NODE_KEYSYM: |
case NODE_KEYSYM: |
|
case NODE_LINK: |
case NODE_LITERAL: |
case NODE_LITERAL: |
case NODE_OPTION: |
case NODE_OPTION: |
case NODE_PARAMETER: |
case NODE_PARAMETER: |