]> git.saurik.com Git - apple/libc.git/blobdiff - string/FreeBSD/memchr.3.patch
Libc-763.11.tar.gz
[apple/libc.git] / string / FreeBSD / memchr.3.patch
index 01421277e5196a9fdcbda9ad21e849c28f6368ae..b0e91025c22c4c4ad9edde0ea0f6b0dc88d098b8 100644 (file)
@@ -1,10 +1,12 @@
---- _SB/Libc/string/FreeBSD/memchr.3   2003-05-20 15:23:54.000000000 -0700
-+++ _SB/Libc/string/FreeBSD/memchr.3.edit      2006-06-28 16:55:53.000000000 -0700
-@@ -47,7 +47,11 @@
+--- memchr.3.bsdnew    2009-11-30 13:52:21.000000000 -0800
++++ memchr.3   2009-11-30 14:18:10.000000000 -0800
+@@ -43,9 +43,11 @@
  .Sh SYNOPSIS
  .In string.h
  .Ft void *
 -.Fn memchr "const void *b" "int c" "size_t len"
+-.Ft void *
+-.Fn memrchr "const void *b" "int c" "size_t len"
 +.Fo memchr
 +.Fa "const void *s"
 +.Fa "int c"
  .Sh DESCRIPTION
  The
  .Fn memchr
-@@ -56,14 +60,14 @@
+@@ -54,28 +56,16 @@ locates the first occurrence of
  .Fa c
  (converted to an unsigned char)
  in string
 -.Fa b .
+-.Pp
+-The
+-.Fn memrchr
+-function behaves like
+-.Fn memchr ,
+-except that it locates the last occurrence of
+-.Fa c
+-in string
+-.Fa b .
 +.Fa s .
  .Sh RETURN VALUES
  The
  .Fn memchr
- function
- returns a pointer to the byte located,
+-and
+-.Fn memrchr
+-functions
+-return a pointer to the byte located,
++function
++returns a pointer to the byte located,
  or NULL if no such byte exists within
 -.Fa len
 +.Fa n
  bytes.
  .Sh SEE ALSO
+-.Xr memmem 3 ,
  .Xr strchr 3 ,
+ .Xr strcspn 3 ,
+ .Xr strpbrk 3 ,
+@@ -91,15 +81,3 @@ The
+ function
+ conforms to
+ .St -isoC .
+-.Pp
+-The
+-.Fn memrchr       
+-function is a GNU extension and conforms to no standard.
+-.Sh HISTORY
+-The
+-.Fn memrchr
+-function first appeared in GNU libc 2.1.91, this implementation
+-first appeared in
+-.Fx 6.4 ,
+-coming from
+-.Ox 4.3 .