diff options
author | martijn <> | 2018-10-01 06:37:37 +0000 |
---|---|---|
committer | martijn <> | 2018-10-01 06:37:37 +0000 |
commit | a478d0a0a5b599e6c7df2af4128c98006f857b68 (patch) | |
tree | f2bcdd2ab9123a19374cfca26b5c2dd240033794 /src/lib/libc/string/strchr.3 | |
parent | d7320afd75964278f3f34b1191867cd0158a2e0f (diff) | |
download | openbsd-a478d0a0a5b599e6c7df2af4128c98006f857b68.tar.gz openbsd-a478d0a0a5b599e6c7df2af4128c98006f857b68.tar.bz2 openbsd-a478d0a0a5b599e6c7df2af4128c98006f857b68.zip |
As per POSIX, when str{,r}chr is comparing it should convert c to a char.
The C implementation of str{,r}chr are not linked to the build, because
assembly implementations are used, but change to code for easier reference.
At least the i386 and amd64 are checked and seem to do the correct thing.
Found thanks to the csh any/strchr change.
minor pointers and OK millert@
Diffstat (limited to 'src/lib/libc/string/strchr.3')
-rw-r--r-- | src/lib/libc/string/strchr.3 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libc/string/strchr.3 b/src/lib/libc/string/strchr.3 index 854438677a..07e7f29f5b 100644 --- a/src/lib/libc/string/strchr.3 +++ b/src/lib/libc/string/strchr.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: strchr.3,v 1.12 2015/11/24 09:14:35 daniel Exp $ | 1 | .\" $OpenBSD: strchr.3,v 1.13 2018/10/01 06:37:37 martijn Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
4 | .\" All rights reserved. | 4 | .\" All rights reserved. |
@@ -31,7 +31,7 @@ | |||
31 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 31 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
32 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
33 | .\" | 33 | .\" |
34 | .Dd $Mdocdate: November 24 2015 $ | 34 | .Dd $Mdocdate: October 1 2018 $ |
35 | .Dt STRCHR 3 | 35 | .Dt STRCHR 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -50,6 +50,7 @@ The | |||
50 | .Fn strchr | 50 | .Fn strchr |
51 | function locates the first occurrence of the character | 51 | function locates the first occurrence of the character |
52 | .Fa c | 52 | .Fa c |
53 | .Pq converted to a char | ||
53 | in the string | 54 | in the string |
54 | .Fa s . | 55 | .Fa s . |
55 | The terminating NUL character is considered part of the string. | 56 | The terminating NUL character is considered part of the string. |