diff options
author | cvs2svn <cvs2svn@FreeBSD.org> | 2000-04-18 02:42:13 +0000 |
---|---|---|
committer | cvs2svn <cvs2svn@FreeBSD.org> | 2000-04-18 02:42:13 +0000 |
commit | 250e7c04cd108375c2bc4e6657a3d660ecc4f10c (patch) | |
tree | ffc0692c3d95a48643d48abc64d13f425186d5c0 /contrib/binutils/libiberty/memchr.c | |
parent | bf5476a7568284207ef150fa66e60173e5fd7c2b (diff) |
Notes
Diffstat (limited to 'contrib/binutils/libiberty/memchr.c')
-rw-r--r-- | contrib/binutils/libiberty/memchr.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/contrib/binutils/libiberty/memchr.c b/contrib/binutils/libiberty/memchr.c deleted file mode 100644 index 93ef43d3f88d..000000000000 --- a/contrib/binutils/libiberty/memchr.c +++ /dev/null @@ -1,60 +0,0 @@ -/* -FUNCTION - <<memchr>>---find character in memory - -INDEX - memchr - -ANSI_SYNOPSIS - #include <string.h> - void *memchr(const void *<[src]>, int <[c]>, size_t <[length]>); - -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 - -*/ - -#include <ansidecl.h> -#ifdef __STDC__ -#include <stddef.h> -#else -#define size_t unsigned long -#endif - -PTR -memchr (src_void, c, length) - register CONST PTR src_void; - int c; - size_t length; -{ - CONST unsigned char *src = (CONST unsigned char *)src_void; - - while (--length >= 0) - { - if (*src == c) - return (PTR)src; - src++; - } - return NULL; -} |