* mdocml: Make "new sentence, new line" detection stricter: Also catch
@ 2017-06-07 20:31 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2017-06-07 20:31 UTC (permalink / raw)
To: source
Log Message:
-----------
Make "new sentence, new line" detection stricter:
Also catch cases where the new sentence starts with a one-letter word
and the input line is broken right after that word.
Suggested by Thomas Klausner <wiz @ NetBSD>.
It's merely a three-bit diff, changing one byte from 0x34 to 0x33,
so what can possibly go wrong...
Modified Files:
--------------
mdocml:
mdoc.c
Revision Data
-------------
Index: mdoc.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc.c,v
retrieving revision 1.264
retrieving revision 1.265
diff -Lmdoc.c -Lmdoc.c -u -p -r1.264 -r1.265
--- mdoc.c
+++ mdoc.c
@@ -278,7 +278,7 @@ mdoc_ptext(struct roff_man *mdoc, int li
for (c = buf + offs; c != NULL; c = strchr(c + 1, '.')) {
if (c - buf < offs + 2)
continue;
- if (end - c < 4)
+ if (end - c < 3)
break;
if (isalpha((unsigned char)c[-2]) &&
isalpha((unsigned char)c[-1]) &&
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-07 20:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-07 20:31 mdocml: Make "new sentence, new line" detection stricter: Also catch schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).