From 78dbff7cf909ce370d16c2b4c185ec01e419fe4c Mon Sep 17 00:00:00 2001 From: jsm28 Date: Thu, 2 Nov 2000 19:03:59 +0000 Subject: * 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 --- gcc/gcov.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gcc/gcov.c') diff --git a/gcc/gcov.c b/gcc/gcov.c index d10108dd411..a1c57e52441 100644 --- a/gcc/gcov.c +++ b/gcc/gcov.c @@ -376,7 +376,7 @@ open_files () strcat (bbg_file_name, "/"); } - cptr = rindex (input_file_name, '/'); + cptr = strrchr (input_file_name, '/'); if (cptr) { strcat (da_file_name, cptr + 1); @@ -397,19 +397,19 @@ open_files () strcpy (bbg_file_name, input_file_name); } - cptr = rindex (bb_file_name, '.'); + cptr = strrchr (bb_file_name, '.'); if (cptr) strcpy (cptr, ".bb"); else strcat (bb_file_name, ".bb"); - cptr = rindex (da_file_name, '.'); + cptr = strrchr (da_file_name, '.'); if (cptr) strcpy (cptr, ".da"); else strcat (da_file_name, ".da"); - cptr = rindex (bbg_file_name, '.'); + cptr = strrchr (bbg_file_name, '.'); if (cptr) strcpy (cptr, ".bbg"); else @@ -1249,7 +1249,7 @@ output_data () } count = strlen (source_file_name); - cptr = rindex (s_ptr->name, '/'); + cptr = strrchr (s_ptr->name, '/'); if (cptr) cptr = cptr + 1; else @@ -1258,7 +1258,7 @@ output_data () { gcov_file_name = xmalloc (count + 7 + strlen (input_file_name)); - cptr = rindex (input_file_name, '/'); + cptr = strrchr (input_file_name, '/'); if (cptr) strcpy (gcov_file_name, cptr + 1); else @@ -1266,7 +1266,7 @@ output_data () strcat (gcov_file_name, "."); - cptr = rindex (source_file_name, '/'); + cptr = strrchr (source_file_name, '/'); if (cptr) strcat (gcov_file_name, cptr + 1); else @@ -1275,7 +1275,7 @@ output_data () else { gcov_file_name = xmalloc (count + 6); - cptr = rindex (source_file_name, '/'); + cptr = strrchr (source_file_name, '/'); if (cptr) strcpy (gcov_file_name, cptr + 1); else -- cgit v1.2.1