summaryrefslogtreecommitdiffstats
path: root/binutils-2.24/libiberty/index.c
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-03-26 11:03:35 -0700
committerBen Cheng <bccheng@google.com>2014-03-26 11:03:35 -0700
commit09797ba54abf3683ea66eedddf6afbe7653f9cb9 (patch)
tree8030b2ed79c7463c89d6da294782e9d503c84f50 /binutils-2.24/libiberty/index.c
parent5a2caf34e4995860baf405552163df288000b7bf (diff)
downloadtoolchain_binutils-09797ba54abf3683ea66eedddf6afbe7653f9cb9.zip
toolchain_binutils-09797ba54abf3683ea66eedddf6afbe7653f9cb9.tar.gz
toolchain_binutils-09797ba54abf3683ea66eedddf6afbe7653f9cb9.tar.bz2
Initial checkin of binutils 2.24.
Change-Id: I0dfcbae6608dded6c3586bf5f4ac27e9612e70a2
Diffstat (limited to 'binutils-2.24/libiberty/index.c')
-rw-r--r--binutils-2.24/libiberty/index.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/binutils-2.24/libiberty/index.c b/binutils-2.24/libiberty/index.c
new file mode 100644
index 0000000..acd0a45
--- /dev/null
+++ b/binutils-2.24/libiberty/index.c
@@ -0,0 +1,21 @@
+/* Stub implementation of (obsolete) index(). */
+
+/*
+
+@deftypefn Supplemental char* index (char *@var{s}, int @var{c})
+
+Returns a pointer to the first occurrence of the character @var{c} in
+the string @var{s}, or @code{NULL} if not found. The use of @code{index} is
+deprecated in new programs in favor of @code{strchr}.
+
+@end deftypefn
+
+*/
+
+extern char * strchr(const char *, int);
+
+char *
+index (const char *s, int c)
+{
+ return strchr (s, c);
+}