=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mdoc.c,v retrieving revision 1.47 retrieving revision 1.48 diff -c -r1.47 -r1.48 *** src/usr.bin/mandoc/mdoc.c 2010/05/14 14:47:44 1.47 --- src/usr.bin/mandoc/mdoc.c 2010/05/14 19:52:43 1.48 *************** *** 1,4 **** ! /* $Id: mdoc.c,v 1.47 2010/05/14 14:47:44 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: mdoc.c,v 1.48 2010/05/14 19:52:43 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * *************** *** 120,126 **** /* LINTED */ "Dx", "%Q", "br", "sp", /* LINTED */ ! "%U", "eos" }; const char *const __mdoc_argnames[MDOC_ARG_MAX] = { --- 120,126 ---- /* LINTED */ "Dx", "%Q", "br", "sp", /* LINTED */ ! "%U" }; const char *const __mdoc_argnames[MDOC_ARG_MAX] = { *************** *** 688,707 **** } /* Allocate the whole word. */ if ( ! mdoc_word_alloc(m, line, 0, buf)) return(0); /* ! * Mark the end of a sentence. Only works when you respect ! * Jason's rule: "new sentence, new line". */ - if ('.' == buf[i-1] || '!' == buf[i-1] || '?' == buf[i-1]) { - m->next = MDOC_NEXT_SIBLING; - if ( ! mdoc_elem_alloc(m, line, i, MDOC_eos, NULL)) - return(0); - } ! m->next = MDOC_NEXT_SIBLING; return(1); } --- 688,708 ---- } /* Allocate the whole word. */ + if ( ! mdoc_word_alloc(m, line, 0, buf)) return(0); /* ! * End-of-sentence check. If the last character is an unescaped ! * EOS character, then flag the node as being the end of a ! * sentence. The front-end will know how to interpret this. */ ! assert(i); ! ! if (mandoc_eos(buf, (size_t)i)) ! m->last->flags |= MDOC_EOS; ! return(1); } *************** *** 727,734 **** enum mdoct tok; int i, j, sv; char mac[5]; - struct mdoc_node *n; - char *t; /* Empty lines are ignored. */ --- 728,733 ---- *************** *** 798,826 **** */ if ( ! mdoc_macro(m, tok, ln, sv, &i, buf)) goto err; - - /* - * Mark the end of a sentence, but be careful not to insert - * markers into reference blocks and after ellipses in - * function definitions. - */ - n = m->last; - if (n->child) - n = n->child; - while (n->next) - n = n->next; - if (MDOC_TEXT == n->type && - MDOC_Fn != n->parent->tok && - MDOC_Rs != m->last->parent->tok) { - t = n->string; - while (t[0] && t[1]) - t++; - if ('.' == *t || '!' == *t || '?' == *t) { - if ( ! mdoc_elem_alloc(m, ln, i, MDOC_eos, NULL)) - return(0); - m->next = MDOC_NEXT_SIBLING; - } - } return(1); --- 797,802 ----