aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.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/gcc.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/gcc.c')
-rw-r--r--gcc/gcc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 22bf907..bd8d70a 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -946,7 +946,7 @@ translate_options (argcp, argvp)
/* If this mapping requires extra text at end of name,
accept that as "argument". */
- else if (index (arginfo, '*') != 0)
+ else if (strchr (arginfo, '*') != 0)
arg = argv[i] + optlen;
/* Otherwise, extra text at end means mismatch.
@@ -955,14 +955,14 @@ translate_options (argcp, argvp)
continue;
}
- else if (index (arginfo, '*') != 0)
+ else if (strchr (arginfo, '*') != 0)
{
error ("Incomplete `%s' option", option_map[j].name);
break;
}
/* Handle arguments. */
- if (index (arginfo, 'a') != 0)
+ if (strchr (arginfo, 'a') != 0)
{
if (arg == 0)
{
@@ -976,9 +976,9 @@ translate_options (argcp, argvp)
arg = argv[++i];
}
}
- else if (index (arginfo, '*') != 0)
+ else if (strchr (arginfo, '*') != 0)
;
- else if (index (arginfo, 'o') == 0)
+ else if (strchr (arginfo, 'o') == 0)
{
if (arg != 0)
error ("Extraneous argument to `%s' option",
@@ -987,7 +987,7 @@ translate_options (argcp, argvp)
}
/* Store the translation as one argv elt or as two. */
- if (arg != 0 && index (arginfo, 'j') != 0)
+ if (arg != 0 && strchr (arginfo, 'j') != 0)
newv[newindex++] = concat (option_map[j].equivalent, arg,
NULL_PTR);
else if (arg != 0)
@@ -3646,7 +3646,7 @@ process_command (argc, argv)
/* Null-terminate the vector. */
switches[n_switches].args[j] = 0;
}
- else if (index (switches_need_spaces, c))
+ else if (strchr (switches_need_spaces, c))
{
/* On some systems, ld cannot handle some options without
a space. So split the option from its argument. */
@@ -5288,7 +5288,7 @@ main (argc, argv)
first_time = FALSE;
obstack_grow (&collect_obstack, "'-", 2);
q = switches[i].part1;
- while ((p = index (q, '\'')))
+ while ((p = strchr (q, '\'')))
{
obstack_grow (&collect_obstack, q, p - q);
obstack_grow (&collect_obstack, "'\\''", 4);
@@ -5301,7 +5301,7 @@ main (argc, argv)
{
obstack_grow (&collect_obstack, " '", 2);
q = *args;
- while ((p = index (q, '\'')))
+ while ((p = strchr (q, '\'')))
{
obstack_grow (&collect_obstack, q, p - q);
obstack_grow (&collect_obstack, "'\\''", 4);