aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
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
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')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/dump.c2
-rw-r--r--gcc/cp/lex.c2
-rw-r--r--gcc/cp/method.c4
-rw-r--r--gcc/cp/repo.c2
-rw-r--r--gcc/cp/xref.c4
6 files changed, 14 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9846778..0b1a322 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * 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 ().
+
2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
* call.c (build_over_call): Call fold on the CALL_EXPR.
diff --git a/gcc/cp/dump.c b/gcc/cp/dump.c
index d528e1c..618a714 100644
--- a/gcc/cp/dump.c
+++ b/gcc/cp/dump.c
@@ -378,7 +378,7 @@ dequeue_and_dump (di)
/* And a source position. */
if (DECL_SOURCE_FILE (t))
{
- const char *filename = rindex (DECL_SOURCE_FILE (t), '/');
+ const char *filename = strrchr (DECL_SOURCE_FILE (t), '/');
if (!filename)
filename = DECL_SOURCE_FILE (t);
else
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index e5cdbf1..8d0f5e6 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -1022,7 +1022,7 @@ interface_strcmp (s)
return 0;
/* Don't get faked out by xxx.yyy.cc vs xxx.zzz.cc. */
- if (index (s1, '.') || index (t1, '.'))
+ if (strchr (s1, '.') || strchr (t1, '.'))
continue;
if (*s1 == '\0' || s1[-1] != '.' || t1[-1] != '.')
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index c389748..532e451 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -770,7 +770,7 @@ build_overload_value (type, value, flags)
else
{
REAL_VALUE_TO_DECIMAL (val, "%.20e", bufp);
- bufp = (char *) index (bufp, 'e');
+ bufp = (char *) strchr (bufp, 'e');
if (!bufp)
strcat (digit_buffer, "e0");
else
@@ -799,7 +799,7 @@ build_overload_value (type, value, flags)
}
}
#ifdef NO_DOT_IN_LABEL
- bufp = (char *) index (bufp, '.');
+ bufp = (char *) strchr (bufp, '.');
if (bufp)
*bufp = '_';
#endif
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c
index 32812ec..8feab83 100644
--- a/gcc/cp/repo.c
+++ b/gcc/cp/repo.c
@@ -301,7 +301,7 @@ open_repo_file (filename)
return;
p = file_name_nondirectory (s);
- p = rindex (p, '.');
+ p = strrchr (p, '.');
if (! p)
p = s + strlen (s);
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);