~ubuntu-branches/ubuntu/hoary/binutils/hoary

« back to all changes in this revision

Viewing changes to libiberty/rindex.c

  • Committer: Bazaar Package Importer
  • Author(s): James Troup
  • Date: 2004-05-19 10:35:44 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040519103544-17h3o6e8pwndydrg
Tags: 2.14.90.0.7-8
debian/rules: don't use gcc-2.95 on m68k.  Thanks to Adam Conrad for
pointing this out.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Stub implementation of (obsolete) rindex(). */
 
2
 
 
3
/*
 
4
 
 
5
@deftypefn Supplemental char* rindex (const char *@var{s}, int @var{c})
 
6
 
 
7
Returns a pointer to the last occurrence of the character @var{c} in
 
8
the string @var{s}, or @code{NULL} if not found.  The use of @code{rindex} is
 
9
deprecated in new programs in favor of @code{strrchr}.
 
10
 
 
11
@end deftypefn
 
12
 
 
13
*/
 
14
 
 
15
extern char *strrchr ();
 
16
 
 
17
char *
 
18
rindex (s, c)
 
19
  char *s;
 
20
  int c;
 
21
{
 
22
  return strrchr (s, c);
 
23
}