version 1.127, 2018/08/17 20:33:37 |
version 1.132, 2018/08/18 20:41:54 |
Line 71 static const struct man_macro man_macros[MAN_MAX - MAN |
|
Line 71 static const struct man_macro man_macros[MAN_MAX - MAN |
|
{ in_line_eoln, MAN_NSCOPED }, /* PD */ |
{ in_line_eoln, MAN_NSCOPED }, /* PD */ |
{ in_line_eoln, 0 }, /* AT */ |
{ in_line_eoln, 0 }, /* AT */ |
{ in_line_eoln, MAN_NSCOPED }, /* in */ |
{ in_line_eoln, MAN_NSCOPED }, /* in */ |
|
{ blk_imp, MAN_BSCOPE }, /* SY */ |
|
{ blk_close, MAN_BSCOPE }, /* YS */ |
{ in_line_eoln, 0 }, /* OP */ |
{ in_line_eoln, 0 }, /* OP */ |
{ in_line_eoln, MAN_BSCOPE }, /* EX */ |
{ in_line_eoln, MAN_BSCOPE }, /* EX */ |
{ in_line_eoln, MAN_BSCOPE }, /* EE */ |
{ in_line_eoln, MAN_BSCOPE }, /* EE */ |
Line 223 blk_close(MACRO_PROT_ARGS) |
|
Line 225 blk_close(MACRO_PROT_ARGS) |
|
return; |
return; |
} |
} |
break; |
break; |
|
case MAN_YS: |
|
ntok = MAN_SY; |
|
break; |
case MAN_UE: |
case MAN_UE: |
ntok = MAN_UR; |
ntok = MAN_UR; |
break; |
break; |
Line 241 blk_close(MACRO_PROT_ARGS) |
|
Line 246 blk_close(MACRO_PROT_ARGS) |
|
mandoc_msg(MANDOCERR_BLK_NOTOPEN, man->parse, |
mandoc_msg(MANDOCERR_BLK_NOTOPEN, man->parse, |
line, ppos, roff_name[tok]); |
line, ppos, roff_name[tok]); |
rew_scope(man, MAN_PP); |
rew_scope(man, MAN_PP); |
|
if (tok == MAN_RE) { |
|
roff_elem_alloc(man, line, ppos, ROFF_br); |
|
man->last->flags |= NODE_LINE | |
|
NODE_VALID | NODE_ENDED; |
|
man->next = ROFF_NEXT_SIBLING; |
|
} |
return; |
return; |
} |
} |
|
|
Line 257 blk_close(MACRO_PROT_ARGS) |
|
Line 268 blk_close(MACRO_PROT_ARGS) |
|
if (buf[*pos] != '\0') { |
if (buf[*pos] != '\0') { |
roff_word_alloc(man, line, ppos, buf + *pos); |
roff_word_alloc(man, line, ppos, buf + *pos); |
man->last->flags |= NODE_DELIMC; |
man->last->flags |= NODE_DELIMC; |
|
if (mandoc_eos(man->last->string, strlen(man->last->string))) |
|
man->last->flags |= NODE_EOS; |
} |
} |
|
|
/* Move a trailing paragraph behind the block. */ |
/* Move a trailing paragraph behind the block. */ |
Line 265 blk_close(MACRO_PROT_ARGS) |
|
Line 278 blk_close(MACRO_PROT_ARGS) |
|
*pos = strlen(buf); |
*pos = strlen(buf); |
blk_imp(man, ctok, cline, cpos, pos, buf); |
blk_imp(man, ctok, cline, cpos, pos, buf); |
} |
} |
|
|
|
/* Synopsis blocks need an explicit end marker for spacing. */ |
|
|
|
if (tok == MAN_YS && man->last == nn) { |
|
roff_elem_alloc(man, line, ppos, tok); |
|
man_unscope(man, man->last); |
|
} |
} |
} |
|
|
void |
void |
Line 274 blk_exp(MACRO_PROT_ARGS) |
|
Line 294 blk_exp(MACRO_PROT_ARGS) |
|
char *p; |
char *p; |
int la; |
int la; |
|
|
rew_scope(man, tok); |
if (tok == MAN_RS) |
|
rew_scope(man, tok); |
roff_block_alloc(man, line, ppos, tok); |
roff_block_alloc(man, line, ppos, tok); |
head = roff_head_alloc(man, line, ppos, tok); |
head = roff_head_alloc(man, line, ppos, tok); |
|
|