diff options
Diffstat (limited to 'libiberty/memchr.c')
-rw-r--r-- | libiberty/memchr.c | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/libiberty/memchr.c b/libiberty/memchr.c index 89aa98f..f053be7 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 */ |