diff options
| author | Ben Cheng <bccheng@google.com> | 2014-03-26 11:03:35 -0700 |
|---|---|---|
| committer | Ben Cheng <bccheng@google.com> | 2014-03-26 11:03:35 -0700 |
| commit | 09797ba54abf3683ea66eedddf6afbe7653f9cb9 (patch) | |
| tree | 8030b2ed79c7463c89d6da294782e9d503c84f50 /binutils-2.24/libiberty/index.c | |
| parent | 5a2caf34e4995860baf405552163df288000b7bf (diff) | |
| download | toolchain_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.c | 21 |
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); +} |
