summaryrefslogtreecommitdiffstatshomepage
path: root/roff.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-07-17 12:13:37 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-07-17 12:13:37 +0000
commitda302548a58ff17d53b0d3e89bf0739d9ce61f10 (patch)
tree77364437117ec027865319c7378ced8d19583d2b /roff.c
parent9419ab3574faf0af105fbd744975d2172be8a6b4 (diff)
downloadmandoc-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/roff.c b/roff.c
index b6fa4682..f2b2a743 100644
--- a/roff.c
+++ b/roff.c
@@ -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,