aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/xref.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2000-11-02 19:03:59 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2000-11-02 19:03:59 +0000
commit9473c5226bfe4c2a3d0045028921a00a167e5c40 (patch)
tree79fd392a778483e0dba0d31c32d9d005dc4fdeeb /gcc/cp/xref.c
parent0304bbad379d530d08ca2aa11289875e71a44aa6 (diff)
downloadgcc-9473c5226bfe4c2a3d0045028921a00a167e5c40.zip
gcc-9473c5226bfe4c2a3d0045028921a00a167e5c40.tar.gz
gcc-9473c5226bfe4c2a3d0045028921a00a167e5c40.tar.bz2
* collect2.c (main, write_c_file_stat), gcc.c (translate_options,
process_command, main), gcov.c (open_files, output_data), tlink.c (frob_extension, scan_linker_output), toplev.c (file_name_nondirectory): Use strchr () and strrchr () instead of index () and rindex (). cp: * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c (build_overload_value), repo.c (open_repo_file), xref.c (open_xref_file): Use strchr () and strrchr () instead of index () and rindex (). f: * com.c (open_include_file, ffecom_open_include_): Use strchr () and strrchr () instead of index () and rindex (). From-SVN: r37206
Diffstat (limited to 'gcc/cp/xref.c')
-rw-r--r--gcc/cp/xref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/xref.c b/gcc/cp/xref.c
index 9a1fd97..cf99fcd 100644
--- a/gcc/cp/xref.c
+++ b/gcc/cp/xref.c
@@ -811,14 +811,14 @@ open_xref_file(file)
#ifdef XREF_FILE_NAME
XREF_FILE_NAME (xref_name, file);
#else
- s = rindex (file, '/');
+ s = strrchr (file, '/');
if (s == NULL)
sprintf (xref_name, ".%s.gxref", file);
else
{
++s;
strcpy (xref_name, file);
- t = rindex (xref_name, '/');
+ t = strrchr (xref_name, '/');
++t;
*t++ = '.';
strcpy (t, s);