version 1.50, 2010/01/01 13:17:58 |
version 1.52, 2010/01/01 17:14:29 |
|
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
*/ |
*/ |
|
#ifdef HAVE_CONFIG_H |
|
#include "config.h" |
|
#endif |
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/param.h> |
|
|
|
#include <assert.h> |
#include <assert.h> |
#include <ctype.h> |
#include <ctype.h> |
|
|
const struct mdoc_node *n, \ |
const struct mdoc_node *n, \ |
struct html *h |
struct html *h |
|
|
|
#ifndef MIN |
|
#define MIN(a,b) ((/*CONSTCOND*/(a)<(b))?(a):(b)) |
|
#endif |
|
|
struct htmlmdoc { |
struct htmlmdoc { |
int (*pre)(MDOC_ARGS); |
int (*pre)(MDOC_ARGS); |
void (*post)(MDOC_ARGS); |
void (*post)(MDOC_ARGS); |
Line 126 static int mdoc_vt_pre(MDOC_ARGS); |
|
Line 133 static int mdoc_vt_pre(MDOC_ARGS); |
|
static int mdoc_xr_pre(MDOC_ARGS); |
static int mdoc_xr_pre(MDOC_ARGS); |
static int mdoc_xx_pre(MDOC_ARGS); |
static int mdoc_xx_pre(MDOC_ARGS); |
|
|
#ifdef __linux__ |
|
extern size_t strlcpy(char *, const char *, size_t); |
|
extern size_t strlcat(char *, const char *, size_t); |
|
#endif |
|
|
|
static const struct htmlmdoc mdocs[MDOC_MAX] = { |
static const struct htmlmdoc mdocs[MDOC_MAX] = { |
{mdoc_ap_pre, NULL}, /* Ap */ |
{mdoc_ap_pre, NULL}, /* Ap */ |
{NULL, NULL}, /* Dd */ |
{NULL, NULL}, /* Dd */ |
Line 659 mdoc_fl_pre(MDOC_ARGS) |
|
Line 661 mdoc_fl_pre(MDOC_ARGS) |
|
{ |
{ |
struct htmlpair tag; |
struct htmlpair tag; |
|
|
|
PAIR_CLASS_INIT(&tag, "flag"); |
|
print_otag(h, TAG_SPAN, 1, &tag); |
|
|
/* `Cm' has no leading hyphen. */ |
/* `Cm' has no leading hyphen. */ |
|
|
if (MDOC_Cm == n->tok) { |
if (MDOC_Cm == n->tok) |
PAIR_CLASS_INIT(&tag, "flag"); |
|
print_otag(h, TAG_SPAN, 1, &tag); |
|
return(1); |
return(1); |
} |
|
|
|
/* A zero-length child shouldn't get a dash. */ |
|
|
|
if (n->child) { |
|
assert(MDOC_TEXT == n->child->type); |
|
assert(n->child->string); |
|
if ('\0' == *n->child->string) |
|
return(0); |
|
} |
|
|
|
PAIR_CLASS_INIT(&tag, "flag"); |
|
print_otag(h, TAG_SPAN, 1, &tag); |
|
|
|
print_text(h, "\\-"); |
print_text(h, "\\-"); |
|
|