From 0fcd5bc9cbffe8089b3aadb69fb73d8296b2b4c7 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 27 Apr 2007 17:11:22 +0000 Subject: [PATCH] "-1" should be "\-1" --- man2/mprotect.2 | 5 +++-- man3/mblen.3 | 4 ++-- man3/mbtowc.3 | 2 +- man3/memmem.3 | 2 +- man3/swab.3 | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/man2/mprotect.2 b/man2/mprotect.2 index 90f61d3133..dbf4c6d134 100644 --- a/man2/mprotect.2 +++ b/man2/mprotect.2 @@ -40,8 +40,9 @@ mprotect \- control allowable accesses to a region of memory The function .BR mprotect () specifies the desired protection for the memory page(s) containing -part or all of the interval [\fIaddr\fP,\fIaddr\fP+\fIlen\fP-1]. -If an access is disallowed by the protection given it, the program receives a +part or all of the interval [\fIaddr\fP,\fIaddr\fP+\fIlen\fP\-1]. +If an access is disallowed by the protection given it, +the program receives a .BR SIGSEGV . .PP .I prot diff --git a/man3/mblen.3 b/man3/mblen.3 index 66d5a4f4cf..b84e43725e 100644 --- a/man3/mblen.3 +++ b/man3/mblen.3 @@ -31,14 +31,14 @@ character, it returns the number of bytes that were consumed from \fIs\fP. If the multibyte character is the null wide character, it returns 0. .PP If the \fIn\fP bytes starting at \fIs\fP do not contain a complete multibyte -character, \fBmblen\fP() returns \fI-1\fP. +character, \fBmblen\fP() returns \fI\-1\fP. This can happen even if \fIn\fP >= \fIMB_CUR_MAX\fP, if the multibyte string contains redundant shift sequences. .PP If the multibyte string starting at \fIs\fP contains an invalid multibyte sequence before the next complete character, \fBmblen\fP() -also returns \fI-1\fP. +also returns \fI\-1\fP. .PP If \fIs\fP is a NULL pointer, the \fBmblen\fP() function .\" The Dinkumware doc and the Single Unix specification say this, but diff --git a/man3/mbtowc.3 b/man3/mbtowc.3 index 4480253e1c..2ef1b8a56c 100644 --- a/man3/mbtowc.3 +++ b/man3/mbtowc.3 @@ -35,7 +35,7 @@ of bytes that were consumed from \fIs\fP, otherwise it returns 0. .PP If the \fIn\fP bytes starting at \fIs\fP do not contain a complete multibyte character, or if they contain an invalid multibyte sequence, \fBmbtowc\fP() -returns \fI-1\fP. +returns \fI\-1\fP. This can happen even if \fIn\fP >= \fIMB_CUR_MAX\fP, if the multibyte string contains redundant shift sequences. .PP diff --git a/man3/memmem.3 b/man3/memmem.3 index 9d0df6e77f..6376083b3d 100644 --- a/man3/memmem.3 +++ b/man3/memmem.3 @@ -57,7 +57,7 @@ Since libc 5.0.9 is still widely used, this is a dangerous function to use. .br Both old and new libc's have the bug that if \fIneedle\fP is empty -\fIhaystack\fP-1 (instead of \fIhaystack\fP) is returned. +\fIhaystack\fP\-1 (instead of \fIhaystack\fP) is returned. And glibc 2.0 makes it worse, and returns a pointer to the last byte of `haystack'. This is fixed in glibc 2.1. .SH "SEE ALSO" diff --git a/man3/swab.3 b/man3/swab.3 index 1f2b297840..3258ee5593 100644 --- a/man3/swab.3 +++ b/man3/swab.3 @@ -44,7 +44,7 @@ This function is used to exchange data between machines that have different low/high byte ordering. .LP This function does nothing when \fIn\fP is negative. -When \fIn\fP is positive and odd, it handles \fIn\fP-1 bytes +When \fIn\fP is positive and odd, it handles \fIn\fP\-1 bytes as above, and does something unspecified with the last byte. (In other words, \fIn\fP should be even.) .SH "RETURN VALUE" -- 2.39.5