summaryrefslogtreecommitdiffstatshomepage
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
commit764912ffd1d25c58186eba0c2f70ff0de3d08a7b (patch)
treebca4c3661a4f3d86a317eeb6a08f1729b87002c2 /mdoc.c
parent9dd355694618bcd06487072ef69080b1afa3dead (diff)
downloadmandoc-764912ffd1d25c58186eba0c2f70ff0de3d08a7b.tar.gz
mandoc-764912ffd1d25c58186eba0c2f70ff0de3d08a7b.tar.zst
mandoc-764912ffd1d25c58186eba0c2f70ff0de3d08a7b.zip
Added line numbering.
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mdoc.c b/mdoc.c
index b97908ac..fc6d8afc 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc.c,v 1.20 2009/01/07 15:53:00 kristaps Exp $ */
+/* $Id: mdoc.c,v 1.21 2009/01/07 15:57:14 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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));
}