summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/libiberty/memchr.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2009-01-19 17:25:17 +0000
committerobrien <obrien@FreeBSD.org>2009-01-19 17:25:17 +0000
commit2b02dfaa48ad11ff3ee427ee1db57fb6017a8a5e (patch)
treeaf590d7b357b1c28ab81f0cde1b0ea76a098fb7e /contrib/binutils/libiberty/memchr.c
parentcd5f96a9efbe194cb6e0506e727cb6d287247d69 (diff)
downloadFreeBSD-src-2b02dfaa48ad11ff3ee427ee1db57fb6017a8a5e.zip
FreeBSD-src-2b02dfaa48ad11ff3ee427ee1db57fb6017a8a5e.tar.gz
Rename vendor/binutils/*/contrib to vendor/binutils/*/x
Binutils has a "contrib" subdirectory - thus flattening cannot happen without renaming the upper level contrib directory in a first pass. Also, don't record this move and remove any keyword expansion.
Diffstat (limited to 'contrib/binutils/libiberty/memchr.c')
-rw-r--r--contrib/binutils/libiberty/memchr.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/contrib/binutils/libiberty/memchr.c b/contrib/binutils/libiberty/memchr.c
deleted file mode 100644
index 3948125..0000000
--- a/contrib/binutils/libiberty/memchr.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-
-@deftypefn Supplemental void* memchr (const void *@var{s}, int @var{c}, size_t @var{n})
-
-This function searches memory starting at @code{*@var{s}} 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{s}}, a pointer
-to the character is returned. If @var{c} is not found, then @code{NULL} is
-returned.
-
-@end deftypefn
-
-*/
-
-#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
-#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;
-}
OpenPOWER on IntegriCloud