diff options
author | 2010-05-15 15:53:29 +0000 | |
---|---|---|
committer | 2010-05-15 15:53:29 +0000 | |
commit | 775df53997d9b3f81bcbb5c4a45e9320591800ae (patch) | |
tree | 89a11ebdf8094781b92588ac21f07ff2c9cd0a33 | |
parent | more end-of-sentence (EOS) handling: (diff) | |
download | wireguard-openbsd-775df53997d9b3f81bcbb5c4a45e9320591800ae.tar.xz wireguard-openbsd-775df53997d9b3f81bcbb5c4a45e9320591800ae.zip |
merge bsd.lv rev. 1.63:
remove "1 == ppos" conditions that remained after rev. 1.60
-rw-r--r-- | usr.bin/mandoc/mdoc_macro.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c index df5ee6cec90..20cefe5c7d2 100644 --- a/usr.bin/mandoc/mdoc_macro.c +++ b/usr.bin/mandoc/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.42 2010/05/15 15:37:53 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.43 2010/05/15 15:53:29 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -636,6 +636,7 @@ append_delims(struct mdoc *m, int line, int *pos, char *buf) assert(DELIM_NONE != mdoc_isdelim(p)); if ( ! mdoc_word_alloc(m, line, la, p)) return(0); + /* * If we encounter end-of-sentence symbols, then trigger * the double-space. @@ -897,7 +898,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 */ @@ -907,6 +908,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)) { @@ -1035,7 +1038,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. */ @@ -1072,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; @@ -1080,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 @@ -1187,7 +1192,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. */ |