summaryrefslogtreecommitdiff
path: root/libiberty/memchr.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2001-09-26 18:45:50 +0000
committerDJ Delorie <dj@delorie.com>2001-09-26 18:45:50 +0000
commitbd7ce1bbb2ea47e045e6dd755cf16f05a2555309 (patch)
tree9fcc8e3e643152ed109636c5420b217c9d116002 /libiberty/memchr.c
parent3d6b05970e5c5b951cf734883641e64090a3c370 (diff)
downloadgdb-bd7ce1bbb2ea47e045e6dd755cf16f05a2555309.tar.gz
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 89aa98f1d94..f053be71dc5 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
*/