diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-26 16:07:08 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-06-26 16:07:08 +0000 |
commit | c5cf90497acc3621015972b85b9c079b43601342 (patch) | |
tree | 746bb9279cdca11169c3263e138d6798d88c4be5 /mdoc_macro.c | |
parent | 8ee307fc9980fbb248f1ed3b9c0da115e8c79440 (diff) | |
download | mandoc-c5cf90497acc3621015972b85b9c079b43601342.tar.gz |
Mechanical diff allowing the const struct regset to propogate through
libman and libmdoc.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r-- | mdoc_macro.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c index e13d0f9d..22acdff6 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -50,7 +50,9 @@ static int append_delims(struct mdoc *, int, int *, char *); static enum mdoct lookup(enum mdoct, const char *); static enum mdoct lookup_raw(const char *); -static int phrase(struct mdoc *, int, int, char *); +static int phrase(struct mdoc *, + const struct regset *, + int, int, char *); static enum mdoct rew_alt(enum mdoct); static int rew_dobreak(enum mdoct, const struct mdoc_node *); @@ -739,7 +741,7 @@ blk_exp_close(MACRO_PROT_ARGS) return(0); flushed = 1; } - if ( ! mdoc_macro(m, ntok, line, lastarg, pos, buf)) + if ( ! mdoc_macro(m, regs, ntok, line, lastarg, pos, buf)) return(0); break; } @@ -840,7 +842,7 @@ in_line(MACRO_PROT_ARGS) if ( ! mdoc_pmsg(m, line, ppos, MANDOCERR_MACROEMPTY)) return(0); } - if ( ! mdoc_macro(m, ntok, line, la, pos, buf)) + if ( ! mdoc_macro(m, regs, ntok, line, la, pos, buf)) return(0); if ( ! nl) return(1); @@ -1086,7 +1088,7 @@ blk_full(MACRO_PROT_ARGS) if (ARGS_PEND == ac && ARGS_PPHRASE == lac) m->flags |= MDOC_PPHRASE; - if ( ! phrase(m, line, la, buf)) + if ( ! phrase(m, regs, line, la, buf)) return(0); m->flags &= ~MDOC_PPHRASE; @@ -1101,7 +1103,7 @@ blk_full(MACRO_PROT_ARGS) continue; } - if ( ! mdoc_macro(m, ntok, line, la, pos, buf)) + if ( ! mdoc_macro(m, regs, ntok, line, la, pos, buf)) return(0); break; } @@ -1229,7 +1231,7 @@ blk_part_imp(MACRO_PROT_ARGS) continue; } - if ( ! mdoc_macro(m, ntok, line, la, pos, buf)) + if ( ! mdoc_macro(m, regs, ntok, line, la, pos, buf)) return(0); break; } @@ -1374,7 +1376,7 @@ blk_part_exp(MACRO_PROT_ARGS) continue; } - if ( ! mdoc_macro(m, ntok, line, la, pos, buf)) + if ( ! mdoc_macro(m, regs, ntok, line, la, pos, buf)) return(0); break; } @@ -1493,7 +1495,7 @@ in_line_argn(MACRO_PROT_ARGS) if ( ! flushed && ! rew_elem(m, tok)) return(0); flushed = 1; - if ( ! mdoc_macro(m, ntok, line, la, pos, buf)) + if ( ! mdoc_macro(m, regs, ntok, line, la, pos, buf)) return(0); j++; break; @@ -1599,7 +1601,7 @@ in_line_eoln(MACRO_PROT_ARGS) if ( ! rew_elem(m, tok)) return(0); - return(mdoc_macro(m, ntok, line, la, pos, buf)); + return(mdoc_macro(m, regs, ntok, line, la, pos, buf)); } /* Close out (no delimiters). */ @@ -1618,11 +1620,11 @@ ctx_synopsis(MACRO_PROT_ARGS) /* If we're not in the SYNOPSIS, go straight to in-line. */ if (SEC_SYNOPSIS != m->lastsec) - return(in_line(m, tok, line, ppos, pos, buf)); + return(in_line(m, regs, tok, line, ppos, pos, buf)); /* If we're a nested call, same place. */ if ( ! nl) - return(in_line(m, tok, line, ppos, pos, buf)); + return(in_line(m, regs, tok, line, ppos, pos, buf)); /* * XXX: this will open a block scope; however, if later we end @@ -1630,7 +1632,7 @@ ctx_synopsis(MACRO_PROT_ARGS) * the formatting. Be careful. */ - return(blk_part_imp(m, tok, line, ppos, pos, buf)); + return(blk_part_imp(m, regs, tok, line, ppos, pos, buf)); } @@ -1649,7 +1651,8 @@ obsolete(MACRO_PROT_ARGS) * macro is encountered. */ static int -phrase(struct mdoc *m, int line, int ppos, char *buf) +phrase(struct mdoc *m, const struct regset *regs, + int line, int ppos, char *buf) { int la, pos; enum margserr ac; @@ -1674,7 +1677,7 @@ phrase(struct mdoc *m, int line, int ppos, char *buf) continue; } - if ( ! mdoc_macro(m, ntok, line, la, &pos, buf)) + if ( ! mdoc_macro(m, regs, ntok, line, la, &pos, buf)) return(0); return(append_delims(m, line, &pos, buf)); } @@ -1719,7 +1722,7 @@ phrase_ta(MACRO_PROT_ARGS) continue; } - if ( ! mdoc_macro(m, ntok, line, la, pos, buf)) + if ( ! mdoc_macro(m, regs, ntok, line, la, pos, buf)) return(0); return(append_delims(m, line, pos, buf)); } |