version 1.62, 2014/04/20 16:46:05 |
version 1.66, 2014/07/04 16:12:08 |
Line 51 static void post_bf(DECL_ARGS); |
|
Line 51 static void post_bf(DECL_ARGS); |
|
static void post_bk(DECL_ARGS); |
static void post_bk(DECL_ARGS); |
static void post_bl(DECL_ARGS); |
static void post_bl(DECL_ARGS); |
static void post_dl(DECL_ARGS); |
static void post_dl(DECL_ARGS); |
|
static void post_en(DECL_ARGS); |
static void post_enc(DECL_ARGS); |
static void post_enc(DECL_ARGS); |
static void post_eo(DECL_ARGS); |
static void post_eo(DECL_ARGS); |
static void post_fa(DECL_ARGS); |
static void post_fa(DECL_ARGS); |
Line 78 static int pre_bl(DECL_ARGS); |
|
Line 79 static int pre_bl(DECL_ARGS); |
|
static int pre_br(DECL_ARGS); |
static int pre_br(DECL_ARGS); |
static int pre_bx(DECL_ARGS); |
static int pre_bx(DECL_ARGS); |
static int pre_dl(DECL_ARGS); |
static int pre_dl(DECL_ARGS); |
|
static int pre_en(DECL_ARGS); |
static int pre_enc(DECL_ARGS); |
static int pre_enc(DECL_ARGS); |
static int pre_em(DECL_ARGS); |
static int pre_em(DECL_ARGS); |
|
static int pre_es(DECL_ARGS); |
static int pre_fa(DECL_ARGS); |
static int pre_fa(DECL_ARGS); |
static int pre_fd(DECL_ARGS); |
static int pre_fd(DECL_ARGS); |
static int pre_fl(DECL_ARGS); |
static int pre_fl(DECL_ARGS); |
Line 150 static const struct manact manacts[MDOC_MAX + 1] = { |
|
Line 153 static const struct manact manacts[MDOC_MAX + 1] = { |
|
{ cond_head, pre_enc, NULL, "\\- ", NULL }, /* Nd */ |
{ cond_head, pre_enc, NULL, "\\- ", NULL }, /* Nd */ |
{ NULL, pre_nm, post_nm, NULL, NULL }, /* Nm */ |
{ NULL, pre_nm, post_nm, NULL, NULL }, /* Nm */ |
{ cond_body, pre_enc, post_enc, "[", "]" }, /* Op */ |
{ cond_body, pre_enc, post_enc, "[", "]" }, /* Op */ |
{ NULL, NULL, NULL, NULL, NULL }, /* Ot */ |
{ NULL, pre_ft, post_font, NULL, NULL }, /* Ot */ |
{ NULL, pre_em, post_font, NULL, NULL }, /* Pa */ |
{ NULL, pre_em, post_font, NULL, NULL }, /* Pa */ |
{ NULL, pre_enc, post_enc, "The \\fB", |
{ NULL, pre_enc, post_enc, "The \\fB", |
"\\fP\nfunction returns the value 0 if successful;\n" |
"\\fP\nfunction returns the value 0 if successful;\n" |
Line 224 static const struct manact manacts[MDOC_MAX + 1] = { |
|
Line 227 static const struct manact manacts[MDOC_MAX + 1] = { |
|
{ NULL, NULL, NULL, NULL, NULL }, /* Ek */ |
{ NULL, NULL, NULL, NULL, NULL }, /* Ek */ |
{ NULL, pre_ux, NULL, "is currently in beta test.", NULL }, /* Bt */ |
{ NULL, pre_ux, NULL, "is currently in beta test.", NULL }, /* Bt */ |
{ NULL, NULL, NULL, NULL, NULL }, /* Hf */ |
{ NULL, NULL, NULL, NULL, NULL }, /* Hf */ |
{ NULL, NULL, NULL, NULL, NULL }, /* Fr */ |
{ NULL, pre_em, post_font, NULL, NULL }, /* Fr */ |
{ NULL, pre_ux, NULL, "currently under development.", NULL }, /* Ud */ |
{ NULL, pre_ux, NULL, "currently under development.", NULL }, /* Ud */ |
{ NULL, NULL, post_lb, NULL, NULL }, /* Lb */ |
{ NULL, NULL, post_lb, NULL, NULL }, /* Lb */ |
{ NULL, pre_pp, NULL, NULL, NULL }, /* Lp */ |
{ NULL, pre_pp, NULL, NULL, NULL }, /* Lp */ |
Line 234 static const struct manact manacts[MDOC_MAX + 1] = { |
|
Line 237 static const struct manact manacts[MDOC_MAX + 1] = { |
|
{ cond_body, pre_enc, post_enc, "{", "}" }, /* Bro */ |
{ cond_body, pre_enc, post_enc, "{", "}" }, /* Bro */ |
{ NULL, NULL, NULL, NULL, NULL }, /* Brc */ |
{ NULL, NULL, NULL, NULL, NULL }, /* Brc */ |
{ NULL, NULL, post_percent, NULL, NULL }, /* %C */ |
{ NULL, NULL, post_percent, NULL, NULL }, /* %C */ |
{ NULL, NULL, NULL, NULL, NULL }, /* Es */ |
{ NULL, pre_es, NULL, NULL, NULL }, /* Es */ |
{ NULL, NULL, NULL, NULL, NULL }, /* En */ |
{ cond_body, pre_en, post_en, NULL, NULL }, /* En */ |
{ NULL, pre_ux, NULL, "DragonFly", NULL }, /* Dx */ |
{ NULL, pre_ux, NULL, "DragonFly", NULL }, /* Dx */ |
{ NULL, NULL, post_percent, NULL, NULL }, /* %Q */ |
{ NULL, NULL, post_percent, NULL, NULL }, /* %Q */ |
{ NULL, pre_br, NULL, NULL, NULL }, /* br */ |
{ NULL, pre_br, NULL, NULL, NULL }, /* br */ |
Line 457 print_offs(const char *v) |
|
Line 460 print_offs(const char *v) |
|
if (Bl_stack_len) |
if (Bl_stack_len) |
sz += Bl_stack[Bl_stack_len - 1]; |
sz += Bl_stack[Bl_stack_len - 1]; |
|
|
snprintf(buf, sizeof(buf), "%zun", sz); |
(void)snprintf(buf, sizeof(buf), "%zun", sz); |
print_word(buf); |
print_word(buf); |
outflags |= MMAN_nl; |
outflags |= MMAN_nl; |
} |
} |
Line 510 print_width(const char *v, const struct mdoc_node *chi |
|
Line 513 print_width(const char *v, const struct mdoc_node *chi |
|
remain = sz + 2; |
remain = sz + 2; |
} |
} |
if (numeric) { |
if (numeric) { |
snprintf(buf, sizeof(buf), "%zun", sz + 2); |
(void)snprintf(buf, sizeof(buf), "%zun", sz + 2); |
print_word(buf); |
print_word(buf); |
} else |
} else |
print_word(v); |
print_word(v); |
Line 520 print_width(const char *v, const struct mdoc_node *chi |
|
Line 523 print_width(const char *v, const struct mdoc_node *chi |
|
static void |
static void |
print_count(int *count) |
print_count(int *count) |
{ |
{ |
char buf[12]; |
char buf[24]; |
|
|
snprintf(buf, sizeof(buf), "%d.", ++*count); |
(void)snprintf(buf, sizeof(buf), "%d.", ++*count); |
print_word(buf); |
print_word(buf); |
} |
} |
|
|
Line 1035 pre_em(DECL_ARGS) |
|
Line 1038 pre_em(DECL_ARGS) |
|
return(1); |
return(1); |
} |
} |
|
|
|
static int |
|
pre_en(DECL_ARGS) |
|
{ |
|
|
|
if (NULL == n->norm->Es || |
|
NULL == n->norm->Es->child) |
|
return(1); |
|
|
|
print_word(n->norm->Es->child->string); |
|
outflags &= ~MMAN_spc; |
|
return(1); |
|
} |
|
|
static void |
static void |
|
post_en(DECL_ARGS) |
|
{ |
|
|
|
if (NULL == n->norm->Es || |
|
NULL == n->norm->Es->child || |
|
NULL == n->norm->Es->child->next) |
|
return; |
|
|
|
outflags &= ~MMAN_spc; |
|
print_word(n->norm->Es->child->next->string); |
|
return; |
|
} |
|
|
|
static void |
post_eo(DECL_ARGS) |
post_eo(DECL_ARGS) |
{ |
{ |
|
|
Line 1044 post_eo(DECL_ARGS) |
|
Line 1074 post_eo(DECL_ARGS) |
|
} |
} |
|
|
static int |
static int |
|
pre_es(DECL_ARGS) |
|
{ |
|
|
|
return(0); |
|
} |
|
|
|
static int |
pre_fa(DECL_ARGS) |
pre_fa(DECL_ARGS) |
{ |
{ |
int am_Fa; |
int am_Fa; |
Line 1271 pre_it(DECL_ARGS) |
|
Line 1308 pre_it(DECL_ARGS) |
|
else |
else |
print_word("-"); |
print_word("-"); |
font_pop(); |
font_pop(); |
break; |
outflags |= MMAN_nl; |
|
return(0); |
case LIST_enum: |
case LIST_enum: |
print_width(bln->norm->Bl.width, NULL, 0); |
print_width(bln->norm->Bl.width, NULL, 0); |
TPremain = 0; |
TPremain = 0; |
outflags |= MMAN_nl; |
outflags |= MMAN_nl; |
print_count(&bln->norm->Bl.count); |
print_count(&bln->norm->Bl.count); |
break; |
outflags |= MMAN_nl; |
|
return(0); |
case LIST_hang: |
case LIST_hang: |
print_width(bln->norm->Bl.width, n->child, 6); |
print_width(bln->norm->Bl.width, n->child, 6); |
TPremain = 0; |
TPremain = 0; |
break; |
outflags |= MMAN_nl; |
|
return(1); |
case LIST_tag: |
case LIST_tag: |
print_width(bln->norm->Bl.width, n->child, 0); |
print_width(bln->norm->Bl.width, n->child, 0); |
putchar('\n'); |
putchar('\n'); |
Line 1290 pre_it(DECL_ARGS) |
|
Line 1330 pre_it(DECL_ARGS) |
|
default: |
default: |
return(1); |
return(1); |
} |
} |
outflags |= MMAN_nl; |
|
default: |
default: |
break; |
break; |
} |
} |
|
|
|
|
/* Restore the indentation of the enclosing list. */ |
/* Restore the indentation of the enclosing list. */ |
print_line(".RS", MMAN_Bk_susp); |
print_line(".RS", MMAN_Bk_susp); |
snprintf(buf, sizeof(buf), "%zun", Bl_stack[Bl_stack_len - 1]); |
(void)snprintf(buf, sizeof(buf), "%zun", |
|
Bl_stack[Bl_stack_len - 1]); |
print_word(buf); |
print_word(buf); |
|
|
/* Remeber to close out this .RS block later. */ |
/* Remeber to close out this .RS block later. */ |
|
|
pre_sm(DECL_ARGS) |
pre_sm(DECL_ARGS) |
{ |
{ |
|
|
assert(n->child && MDOC_TEXT == n->child->type); |
if (NULL == n->child) |
if (0 == strcmp("on", n->child->string)) |
outflags ^= MMAN_Sm; |
outflags |= MMAN_Sm | MMAN_spc; |
else if (0 == strcmp("on", n->child->string)) |
|
outflags |= MMAN_Sm; |
else |
else |
outflags &= ~MMAN_Sm; |
outflags &= ~MMAN_Sm; |
|
|
|
if (MMAN_Sm & outflags) |
|
outflags |= MMAN_spc; |
|
|
return(0); |
return(0); |
} |
} |
|
|