diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-02 15:03:14 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-02 15:03:14 +0000 |
commit | 04c0fb6aedd8b530745e03f63c8b188e7d2c7466 (patch) | |
tree | e3a52de1d3ede9a6386351492d792dad43688a99 /mdoc_term.c | |
parent | 63ed1f431a924feaf23069c7881c2520fbc991ae (diff) | |
download | mandoc-04c0fb6aedd8b530745e03f63c8b188e7d2c7466.tar.gz |
Cached `An' arguments in struct mdoc_an. Note that this isn't a
pointer like the other data members, as there's no need to copy it around.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r-- | mdoc_term.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 6ab8bb9c..eae580af 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -57,7 +57,6 @@ static size_t a2width(const struct termp *, const char *); static size_t a2height(const struct termp *, const char *); static size_t a2offs(const struct termp *, const char *); -static int arg_hasattr(int, const struct mdoc_node *); static int arg_getattr(int, const struct mdoc_node *); static void print_bvspace(struct termp *, const struct mdoc_node *, @@ -528,18 +527,6 @@ a2offs(const struct termp *p, const char *v) /* - * Return 1 if an argument has a particular argument value or 0 if it - * does not. See arg_getattr(). - */ -static int -arg_hasattr(int arg, const struct mdoc_node *n) -{ - - return(-1 != arg_getattr(arg, n)); -} - - -/* * Get the index of an argument in a node's argument list or -1 if it * does not exist. */ @@ -1141,10 +1128,10 @@ termp_an_post(DECL_ARGS) return; } - if (arg_hasattr(MDOC_Split, n)) { + if (AUTH_split == n->data.An.auth) { p->flags &= ~TERMP_NOSPLIT; p->flags |= TERMP_SPLIT; - } else { + } else if (AUTH_nosplit == n->data.An.auth) { p->flags &= ~TERMP_SPLIT; p->flags |= TERMP_NOSPLIT; } |