diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-02 19:03:59 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-02 19:03:59 +0000 |
commit | 78dbff7cf909ce370d16c2b4c185ec01e419fe4c (patch) | |
tree | 79fd392a778483e0dba0d31c32d9d005dc4fdeeb /gcc/collect2.c | |
parent | a3f30566986f897fcef17b98f722a0227de49492 (diff) | |
download | gcc-78dbff7cf909ce370d16c2b4c185ec01e419fe4c.tar.gz |
* 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 ().
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37206 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/collect2.c')
-rw-r--r-- | gcc/collect2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c index 4180e830bf7..139e6e83198 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -1172,7 +1172,7 @@ main (argc, argv) output_file = *ld1++ = *ld2++ = *++argv; else if (1 #ifdef SWITCHES_NEED_SPACES - && ! index (SWITCHES_NEED_SPACES, arg[1]) + && ! strchr (SWITCHES_NEED_SPACES, arg[1]) #endif ) @@ -1201,7 +1201,7 @@ main (argc, argv) break; } } - else if ((p = rindex (arg, '.')) != (char *) 0 + else if ((p = strrchr (arg, '.')) != (char *) 0 && (strcmp (p, ".o") == 0 || strcmp (p, ".a") == 0 || strcmp (p, ".so") == 0 || strcmp (p, ".lo") == 0)) { @@ -1829,7 +1829,7 @@ write_c_file_stat (stream, name) int frames = (frame_tables.number > 0); /* Figure out name of output_file, stripping off .so version. */ - p = rindex (output_file, '/'); + p = strrchr (output_file, '/'); if (p == 0) p = output_file; else @@ -1837,7 +1837,7 @@ write_c_file_stat (stream, name) q = p; while (q) { - q = index (q,'.'); + q = strchr (q,'.'); if (q == 0) { q = p + strlen (p); |