aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-26 16:07:08 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-26 16:07:08 +0000
commit397916af9099ebb9b23d491efef58d48d4e88133 (patch)
treec9a9fd158343804cb5026b9604e097f6ad990ab5 /man.c
parent2bcccf0dba8f2c504e9c3597a11177aaca90023c (diff)
downloadmandoc-397916af9099ebb9b23d491efef58d48d4e88133.tar.gz
mandoc-397916af9099ebb9b23d491efef58d48d4e88133.tar.zst
mandoc-397916af9099ebb9b23d491efef58d48d4e88133.zip
Mechanical diff allowing the const struct regset to propogate through
libman and libmdoc.
Diffstat (limited to 'man.c')
-rw-r--r--man.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/man.c b/man.c
index 02b5bd2f..3c1dbdad 100644
--- a/man.c
+++ b/man.c
@@ -1,4 +1,4 @@
-/* $Id: man.c,v 1.77 2010/06/26 15:36:37 kristaps Exp $ */
+/* $Id: man.c,v 1.78 2010/06/26 16:07:08 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -54,7 +54,9 @@ static void man_node_free(struct man_node *);
static void man_node_unlink(struct man *,
struct man_node *);
static int man_ptext(struct man *, int, char *, int);
-static int man_pmacro(struct man *, int, char *, int);
+static int man_pmacro(struct man *,
+ const struct regset *regs,
+ int, char *, int);
static void man_free1(struct man *);
static void man_alloc1(struct man *);
static int macrowarn(struct man *, int, const char *, int);
@@ -133,7 +135,7 @@ man_parseln(struct man *m, const struct regset *regs,
return(0);
return(('.' == buf[offs] || '\'' == buf[offs]) ?
- man_pmacro(m, ln, buf, offs) :
+ man_pmacro(m, regs, ln, buf, offs) :
man_ptext(m, ln, buf, offs));
}
@@ -449,7 +451,8 @@ macrowarn(struct man *m, int ln, const char *buf, int offs)
int
-man_pmacro(struct man *m, int ln, char *buf, int offs)
+man_pmacro(struct man *m, const struct regset *regs,
+ int ln, char *buf, int offs)
{
int i, j, ppos;
enum mant tok;
@@ -574,7 +577,7 @@ man_pmacro(struct man *m, int ln, char *buf, int offs)
/* Call to handler... */
assert(man_macros[tok].fp);
- if ( ! (*man_macros[tok].fp)(m, tok, ln, ppos, &i, buf))
+ if ( ! (*man_macros[tok].fp)(m, regs, tok, ln, ppos, &i, buf))
goto err;
out: