aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_argv.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-07-01 22:56:17 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-07-01 22:56:17 +0000
commitf813f185be40796eacad83ea709b1ba0374a67c1 (patch)
tree1e588554fee5273076627d525b9303ba919d21e4 /mdoc_argv.c
parente552a5cef0219ea63fb9521677e1a8a05ad35727 (diff)
downloadmandoc-f813f185be40796eacad83ea709b1ba0374a67c1.tar.gz
mandoc-f813f185be40796eacad83ea709b1ba0374a67c1.tar.zst
mandoc-f813f185be40796eacad83ea709b1ba0374a67c1.zip
Make struct_bl and struct_bd into pointers. This removes the need to do
copying on internals after modification. Even more importantly, if an ENDBODY token is provided, it would have been impossible for post-change copying of the data to take place in the BLOCK. This allows it to happen by dint of pointers. Also did some bikeshedding in mdoc_term.c: checking against enum type and explicitly casting to the "post" function to void. This is for my own readability.
Diffstat (limited to 'mdoc_argv.c')
-rw-r--r--mdoc_argv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mdoc_argv.c b/mdoc_argv.c
index 700d558a..379f458d 100644
--- a/mdoc_argv.c
+++ b/mdoc_argv.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_argv.c,v 1.54 2010/06/19 20:46:28 kristaps Exp $ */
+/* $Id: mdoc_argv.c,v 1.55 2010/07/01 22:56:17 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -359,7 +359,8 @@ mdoc_args(struct mdoc *m, int line, int *pos,
if (MDOC_Bl == n->tok)
break;
- if (n && LIST_column == n->data.Bl.type) {
+ assert(n->data.Bl);
+ if (n && LIST_column == n->data.Bl->type) {
fl |= ARGS_TABSEP;
fl &= ~ARGS_DELIM;
}