summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-01-07 15:57:14 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-01-07 15:57:14 +0000
commitf0046239049623a3d7e442ee672ae6bb28674e76 (patch)
tree4d2b487d3736651c727137ee9c81e5d977636c0b /mdoc.c
parenta7a1dadb16951c8d91f80da5763dd5c3cb973ffa (diff)
downloadmandoc-f0046239049623a3d7e442ee672ae6bb28674e76.tar.gz
Added line numbering.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mdoc.c b/mdoc.c
index 02a967c5..1ac6d6f3 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -312,7 +312,7 @@ mdoc_parseln(struct mdoc *mdoc, int line, char *buf)
while (buf[i] && isspace(buf[i]))
i++;
- if ( ! mdoc_macro(mdoc, c, 1, &i, buf)) {
+ if ( ! mdoc_macro(mdoc, c, line, 1, &i, buf)) {
mdoc->flags |= MDOC_HALT;
return(0);
}
@@ -358,7 +358,8 @@ mdoc_warn(struct mdoc *mdoc, int tok, int pos, enum mdoc_warn type)
int
-mdoc_macro(struct mdoc *mdoc, int tok, int ppos, int *pos, char *buf)
+mdoc_macro(struct mdoc *mdoc, int tok,
+ int line, int ppos, int *pos, char *buf)
{
if ( ! (MDOC_PROLOGUE & mdoc_macros[tok].flags) &&
@@ -375,7 +376,7 @@ mdoc_macro(struct mdoc *mdoc, int tok, int ppos, int *pos, char *buf)
return(0);
}
- return((*mdoc_macros[tok].fp)(mdoc, tok, ppos, pos, buf));
+ return((*mdoc_macros[tok].fp)(mdoc, tok, line, ppos, pos, buf));
}