summaryrefslogtreecommitdiffstats
path: root/libiberty/memchr.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2001-09-26 18:45:50 +0000
committerDJ Delorie <dj@redhat.com>2001-09-26 18:45:50 +0000
commit39423523167c47f72822dbb9eb3ab4a0dfeafe68 (patch)
treeb437d1ed0d3cb7e6a0a67e5dd30ef19abbedb95e /libiberty/memchr.c
parent4e6667ac4f987fecbcf576513c70485a4718712e (diff)
downloadppe42-binutils-39423523167c47f72822dbb9eb3ab4a0dfeafe68.tar.gz
ppe42-binutils-39423523167c47f72822dbb9eb3ab4a0dfeafe68.zip
merge from gcc
Diffstat (limited to 'libiberty/memchr.c')
-rw-r--r--libiberty/memchr.c39
1 files changed, 9 insertions, 30 deletions
diff --git a/libiberty/memchr.c b/libiberty/memchr.c
index 89aa98f1d9..f053be71dc 100644
--- a/libiberty/memchr.c
+++ b/libiberty/memchr.c
@@ -1,37 +1,16 @@
/*
-FUNCTION
- <<memchr>>---find character in memory
-INDEX
- memchr
+@deftypefn Supplemental void* memchr (const void *@var{s}, int @var{c}, size_t @var{n})
-ANSI_SYNOPSIS
- #include <string.h>
- void *memchr(const void *<[src]>, int <[c]>, size_t <[length]>);
+This function searches memory starting at @code{*}@var{src} for the
+character @var{c}. The search only ends with the first occurrence of
+@var{c}, or after @var{length} characters; in particular, a null
+character does not terminate the search. If the character @var{c} is
+found within @var{length} characters of @code{*}@var{src}, a pointer
+to the character is returned. If @var{c} is not found, then NULL is
+returned.
-TRAD_SYNOPSIS
- #include <string.h>
- void *memchr(<[src]>, <[c]>, <[length]>)
- void *<[src]>;
- void *<[c]>;
- size_t <[length]>;
-
-DESCRIPTION
- This function searches memory starting at <<*<[src]>>> for the
- character <[c]>. The search only ends with the first
- occurrence of <[c]>, or after <[length]> characters; in
- particular, <<NULL>> does not terminate the search.
-
-RETURNS
- If the character <[c]> is found within <[length]> characters
- of <<*<[src]>>>, a pointer to the character is returned. If
- <[c]> is not found, then <<NULL>> is returned.
-
-PORTABILITY
-<<memchr>> requires no supporting OS subroutines.
-
-QUICKREF
- memchr ansi pure
+@end deftypefn
*/
OpenPOWER on IntegriCloud