diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-05-07 06:05:38 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-05-07 06:05:38 +0000 |
commit | 14c096e3772b640b87176e27eaa291c9fefbe0de (patch) | |
tree | d7a7cb82808c9a2b51ea93b7df5d0a256b09f320 /mdoc_macro.c | |
parent | affb60f9d063ad854386b239fbe7688abd4cdeac (diff) | |
download | mandoc-14c096e3772b640b87176e27eaa291c9fefbe0de.tar.gz |
Initial ARGS_PPHRASE (partial phrase) framework.
Running tally of changes in index.sgml.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r-- | mdoc_macro.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c index eef40906..8bde22e5 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -632,7 +632,6 @@ append_delims(struct mdoc *mdoc, int line, int *pos, char *buf) for (;;) { lastarg = *pos; ac = mdoc_zargs(mdoc, line, pos, buf, ARGS_NOWARN, &p); - assert(ARGS_PHRASE != ac); if (ARGS_ERROR == ac) return(0); @@ -965,6 +964,7 @@ blk_full(MACRO_PROT_ARGS) /* Don't emit leading punct. for phrases. */ if (NULL == head && ARGS_PHRASE != ac && + ARGS_PPHRASE != ac && ARGS_QWORD != ac && 1 == mdoc_isdelim(p)) { if ( ! mdoc_word_alloc(m, line, la, p)) @@ -974,13 +974,14 @@ blk_full(MACRO_PROT_ARGS) /* Always re-open head for phrases. */ - if (NULL == head || ARGS_PHRASE == ac) { + if (NULL == head || ARGS_PHRASE == ac || + ARGS_PPHRASE == ac) { if ( ! mdoc_head_alloc(m, line, ppos, tok)) return(0); head = m->last; } - if (ARGS_PHRASE == ac) { + if (ARGS_PHRASE == ac || ARGS_PPHRASE == ac) { if ( ! phrase(m, line, la, buf)) return(0); if ( ! rew_sub(MDOC_HEAD, m, tok, line, ppos)) @@ -1084,8 +1085,6 @@ blk_part_imp(MACRO_PROT_ARGS) la = *pos; ac = mdoc_args(m, line, pos, buf, tok, &p); - assert(ARGS_PHRASE != ac); - if (ARGS_ERROR == ac) return(0); if (ARGS_EOLN == ac) @@ -1187,8 +1186,6 @@ blk_part_exp(MACRO_PROT_ARGS) if (ARGS_EOLN == ac) break; - assert(ARGS_PHRASE != ac); - /* Flush out leading punctuation. */ if (NULL == head && ARGS_QWORD != ac && |