diff options
author | 2011-07-17 12:13:37 +0000 | |
---|---|---|
committer | 2011-07-17 12:13:37 +0000 | |
commit | da302548a58ff17d53b0d3e89bf0739d9ce61f10 (patch) | |
tree | 77364437117ec027865319c7378ced8d19583d2b /roff.c | |
parent | 9419ab3574faf0af105fbd744975d2172be8a6b4 (diff) | |
download | mandoc-da302548a58ff17d53b0d3e89bf0739d9ce61f10.tar.gz mandoc-da302548a58ff17d53b0d3e89bf0739d9ce61f10.tar.zst mandoc-da302548a58ff17d53b0d3e89bf0739d9ce61f10.zip |
Add initial `define' support for eqn(7).
This works by iterating over a simple list. It's a slow, auditable
early implementation. Data is read (the reading function will be
reused) then parsed, then the line re-run if remaining stuff exists.
Note this function isn't the same as mandoc_getarg(), as eqn(7) uses a
different system for reading quoted strings.
This doesn't actually use the defines.
Diffstat (limited to 'roff.c')
-rw-r--r-- | roff.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.145 2011/07/12 21:32:43 kristaps Exp $ */ +/* $Id: roff.c,v 1.146 2011/07/17 12:13:37 kristaps Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -519,18 +519,18 @@ roff_parseln(struct roff *r, int ln, char **bufp, if (ROFF_CONT != e) return(e); if (r->eqn) - return(eqn_read(&r->eqn, ln, *bufp, pos)); + return(eqn_read(&r->eqn, ln, *bufp, pos, offs)); if (r->tbl) return(tbl_read(r->tbl, ln, *bufp, pos)); return(ROFF_CONT); } else if ( ! ctl) { if (r->eqn) - return(eqn_read(&r->eqn, ln, *bufp, pos)); + return(eqn_read(&r->eqn, ln, *bufp, pos, offs)); if (r->tbl) return(tbl_read(r->tbl, ln, *bufp, pos)); return(ROFF_CONT); } else if (r->eqn) - return(eqn_read(&r->eqn, ln, *bufp, ppos)); + return(eqn_read(&r->eqn, ln, *bufp, ppos, offs)); /* * If a scope is open, go to the child handler for that macro, |