version 1.142, 2011/05/17 11:34:31 |
version 1.144, 2011/05/17 11:50:20 |
Line 315 html_strlen(const char *cp) |
|
Line 315 html_strlen(const char *cp) |
|
switch (mandoc_escape(&cp, &seq, &ssz)) { |
switch (mandoc_escape(&cp, &seq, &ssz)) { |
case (ESCAPE_ERROR): |
case (ESCAPE_ERROR): |
return(sz); |
return(sz); |
|
case (ESCAPE_UNICODE): |
|
/* FALLTHROUGH */ |
case (ESCAPE_NUMBERED): |
case (ESCAPE_NUMBERED): |
/* FALLTHROUGH */ |
/* FALLTHROUGH */ |
case (ESCAPE_PREDEF): |
case (ESCAPE_PREDEF): |
Line 373 print_encode(struct html *h, const char *p, int norecu |
|
Line 375 print_encode(struct html *h, const char *p, int norecu |
|
break; |
break; |
|
|
switch (esc) { |
switch (esc) { |
|
case (ESCAPE_UNICODE): |
|
/* Skip passed "u" header. */ |
|
c = mchars_num2uc(seq + 1, len - 1); |
|
if ('\0' != c) |
|
printf("&#x%x;", c); |
|
break; |
case (ESCAPE_NUMBERED): |
case (ESCAPE_NUMBERED): |
c = mchars_num2char(seq, len); |
c = mchars_num2char(seq, len); |
if ('\0' != c) |
if ('\0' != c) |
Line 656 buffmt_includes(struct html *h, const char *name) |
|
Line 664 buffmt_includes(struct html *h, const char *name) |
|
|
|
pp = h->base_includes; |
pp = h->base_includes; |
|
|
|
bufinit(h); |
while (NULL != (p = strchr(pp, '%'))) { |
while (NULL != (p = strchr(pp, '%'))) { |
bufncat(h, pp, (size_t)(p - pp)); |
bufncat(h, pp, (size_t)(p - pp)); |
switch (*(p + 1)) { |
switch (*(p + 1)) { |
Line 680 buffmt_man(struct html *h, |
|
Line 689 buffmt_man(struct html *h, |
|
|
|
pp = h->base_man; |
pp = h->base_man; |
|
|
/* LINTED */ |
bufinit(h); |
while (NULL != (p = strchr(pp, '%'))) { |
while (NULL != (p = strchr(pp, '%'))) { |
bufncat(h, pp, (size_t)(p - pp)); |
bufncat(h, pp, (size_t)(p - pp)); |
switch (*(p + 1)) { |
switch (*(p + 1)) { |
Line 718 bufcat_id(struct html *h, const char *src) |
|
Line 727 bufcat_id(struct html *h, const char *src) |
|
|
|
/* Cf. <http://www.w3.org/TR/html4/types.html#h-6.2>. */ |
/* Cf. <http://www.w3.org/TR/html4/types.html#h-6.2>. */ |
|
|
if (0 == h->buflen) |
|
bufcat(h, "#x"); |
|
while ('\0' != *src) |
while ('\0' != *src) |
bufcat_fmt(h, "%.2x", *src++); |
bufcat_fmt(h, "%.2x", *src++); |
} |
} |