openbsd-ports/x11/kde/base3/patches/patch-kioslave_man_man2html_cpp

35 lines
1.1 KiB
Plaintext
Raw Normal View History

$OpenBSD: patch-kioslave_man_man2html_cpp,v 1.10 2005/03/29 21:18:35 espie Exp $
--- kioslave/man/man2html.cpp.orig Wed Feb 23 12:26:40 2005
+++ kioslave/man/man2html.cpp Wed Mar 23 11:50:59 2005
@@ -1918,6 +1918,7 @@ static const char *section_list[] = {
2002-04-16 08:20:04 -04:00
"3L", "Lightweight Processes Library",
"3M", "Mathematical Library",
"3N", "Network Functions",
+ "3p", "Perl Functions",
"3R", "RPC Services Library",
"3S", "Standard I/O Functions",
"3V", "C Library Functions",
@@ -4019,16 +4020,17 @@ static char *scan_troff_mandoc(char *c,
end++;
}
- if (end > c + 2
+ if (end >= c + 2
&& ispunct(*(end - 1))
&& isspace(*(end - 2)) && *(end - 2) != '\n') {
/* Don't format lonely punctuation E.g. in "xyz ," format
* the xyz and then append the comma removing the space.
*/
- *(end - 2) = '\n';
- ret = scan_troff(c, san, result);
- *(end - 2) = *(end - 1);
- *(end - 1) = ' ';
+ *(end - 2) = 0;
+ (void)scan_troff(c, 0, result);
+ ret = end-2;
+ *(end-2)=*(end-1);
+ *(end-1)=' ';
}
else {
ret = scan_troff(c, san, result);