version 1.6, 2009/09/24 11:05:45 |
version 1.8, 2009/09/24 13:18:37 |
|
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
#include <sys/types.h> |
#include <sys/types.h> |
|
#include <sys/param.h> |
#include <sys/queue.h> |
#include <sys/queue.h> |
|
|
#include <assert.h> |
#include <assert.h> |
Line 1560 mdoc_ft_pre(MDOC_ARGS) |
|
Line 1561 mdoc_ft_pre(MDOC_ARGS) |
|
} |
} |
|
|
tag.key = ATTR_CLASS; |
tag.key = ATTR_CLASS; |
tag.val = "type"; |
tag.val = "ftype"; |
print_otag(h, TAG_SPAN, 1, &tag); |
print_otag(h, TAG_SPAN, 1, &tag); |
return(1); |
return(1); |
} |
} |
Line 1573 mdoc_fn_pre(MDOC_ARGS) |
|
Line 1574 mdoc_fn_pre(MDOC_ARGS) |
|
struct tag *t; |
struct tag *t; |
struct htmlpair tag; |
struct htmlpair tag; |
const struct mdoc_node *nn; |
const struct mdoc_node *nn; |
|
char nbuf[BUFSIZ]; |
|
const char *sp, *ep; |
|
int sz; |
|
|
if (SEC_SYNOPSIS == n->sec) { |
if (SEC_SYNOPSIS == n->sec) { |
if (n->next) { |
if (n->next) { |
Line 1583 mdoc_fn_pre(MDOC_ARGS) |
|
Line 1587 mdoc_fn_pre(MDOC_ARGS) |
|
print_otag(h, TAG_DIV, 0, NULL); |
print_otag(h, TAG_DIV, 0, NULL); |
} |
} |
|
|
|
/* Split apart into type and name. */ |
|
|
tag.key = ATTR_CLASS; |
tag.key = ATTR_CLASS; |
tag.val = "type"; |
tag.val = "ftype"; |
|
t = print_otag(h, TAG_SPAN, 1, &tag); |
|
|
/* FIXME: can be "type funcname" "type varname"... */ |
assert(n->child->string); |
|
sp = n->child->string; |
|
while ((ep = strchr(sp, ' '))) { |
|
sz = MIN(ep - sp, BUFSIZ - 1); |
|
(void)memcpy(nbuf, sp, sz); |
|
nbuf[sz] = '\0'; |
|
print_text(h, nbuf); |
|
sp = ++ep; |
|
} |
|
|
|
print_tagq(h, t); |
|
|
|
tag.key = ATTR_CLASS; |
|
tag.val = "fname"; |
t = print_otag(h, TAG_SPAN, 1, &tag); |
t = print_otag(h, TAG_SPAN, 1, &tag); |
print_text(h, n->child->string); |
|
|
if (sp) { |
|
(void)strlcpy(nbuf, sp, BUFSIZ); |
|
print_text(h, nbuf); |
|
} |
|
|
print_tagq(h, t); |
print_tagq(h, t); |
|
|
h->flags |= HTML_NOSPACE; |
h->flags |= HTML_NOSPACE; |
Line 1991 mdoc_pf_post(MDOC_ARGS) |
|
Line 2015 mdoc_pf_post(MDOC_ARGS) |
|
static int |
static int |
mdoc_rs_pre(MDOC_ARGS) |
mdoc_rs_pre(MDOC_ARGS) |
{ |
{ |
struct htmlpair tag[2]; |
struct htmlpair tag; |
int i; |
|
|
|
if (MDOC_BLOCK != n->type) |
if (MDOC_BLOCK != n->type) |
return(1); |
return(1); |
|
|
tag[i = 0].key = ATTR_CLASS; |
if (n->prev && SEC_SEE_ALSO == n->sec) { |
tag[i++].val = "ref"; |
tag.key = ATTR_STYLE; |
|
tag.val = "margin-top: 1em;"; |
if (n->prev && SEC_SYNOPSIS == n->sec) { |
print_otag(h, TAG_DIV, 1, &tag); |
tag[i].key = ATTR_STYLE; |
|
tag[i++].val = "margin-top: 1em;"; |
|
} else if (SEC_SYNOPSIS != n->sec) { |
|
tag[i].key = ATTR_STYLE; |
|
tag[i++].val = "display: inline; margin-right: 1em"; |
|
} |
} |
|
|
/* FIXME: div's have spaces stripped--we want them. */ |
tag.key = ATTR_CLASS; |
|
tag.val = "ref"; |
print_otag(h, TAG_DIV, i, tag); |
print_otag(h, TAG_SPAN, 1, &tag); |
return(1); |
return(1); |
} |
} |
|
|