summaryrefslogtreecommitdiffstats
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-05-14 13:31:20 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-05-14 13:31:20 +0000
commit57a976d8a1a1daf04cc62344657b64c304d523bc (patch)
tree26b8b0855a4db62ed0ae04435452a78bffa8e18e /mdoc_macro.c
parenta833976284885670ea154f3f0327d83d71f658c2 (diff)
downloadmandoc-57a976d8a1a1daf04cc62344657b64c304d523bc.tar.gz
Removed remaining "1 == ppos" invocations.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index fe794bbc..438c39a0 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -888,7 +888,7 @@ in_line(MACRO_PROT_ARGS)
static int
blk_full(MACRO_PROT_ARGS)
{
- int la;
+ int la, nl;
struct mdoc_arg *arg;
struct mdoc_node *head; /* save of head macro */
struct mdoc_node *body; /* save of body macro */
@@ -900,6 +900,8 @@ blk_full(MACRO_PROT_ARGS)
enum margverr av;
char *p;
+ nl = MDOC_NEWLINE & m->flags;
+
/* Close out prior implicit scope. */
if ( ! (MDOC_EXPLICIT & mdoc_macros[tok].flags)) {
@@ -1033,7 +1035,7 @@ blk_full(MACRO_PROT_ARGS)
head = m->last;
}
- if (1 == ppos && ! append_delims(m, line, pos, buf))
+ if (nl && ! append_delims(m, line, pos, buf))
return(0);
/* If we've already opened our body, exit now. */
@@ -1073,7 +1075,7 @@ blk_full(MACRO_PROT_ARGS)
static int
blk_part_imp(MACRO_PROT_ARGS)
{
- int la;
+ int la, nl;
enum mdoct ntok;
enum margserr ac;
char *p;
@@ -1081,6 +1083,8 @@ blk_part_imp(MACRO_PROT_ARGS)
struct mdoc_node *body; /* saved body context */
struct mdoc_node *n;
+ nl = MDOC_NEWLINE & m->flags;
+
/*
* A macro that spans to the end of the line. This is generally
* (but not necessarily) called as the first macro. The block
@@ -1156,6 +1160,8 @@ blk_part_imp(MACRO_PROT_ARGS)
* been closed by another macro (like `Oc' closing `Op'). This
* is ugly behaviour nodding its head to OpenBSD's overwhelming
* crufty use of `Op' breakage.
+ *
+ * FIXME - this should be ifdef'd OpenBSD?
*/
for (n = m->last; n; n = n->parent)
if (body == n)
@@ -1169,7 +1175,7 @@ blk_part_imp(MACRO_PROT_ARGS)
/* Standard appending of delimiters. */
- if (1 == ppos && ! append_delims(m, line, pos, buf))
+ if (nl && ! append_delims(m, line, pos, buf))
return(0);
/* Rewind scope, if applicable. */