summaryrefslogtreecommitdiff
path: root/expand.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-10-15 07:00:58 +0000
committerPaul Smith <psmith@gnu.org>1999-10-15 07:00:58 +0000
commit3e26bde6dbc9a8a46d5a1a694e6810e689cbd25a (patch)
tree20d000099ba9c0723a3c4d8925adba97aee4f2dc /expand.c
parentc71200d0229f75fe99d508dd3aea013ceba4d32e (diff)
downloadgunmake-3e26bde6dbc9a8a46d5a1a694e6810e689cbd25a.tar.gz
* Fix PR/1394.
* Apply changes from Paul Eggert. * Many other cleanups (index/rindex --> strchr/strrchr, etc.)
Diffstat (limited to 'expand.c')
-rw-r--r--expand.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/expand.c b/expand.c
index aebbe3f..edf6c9c 100644
--- a/expand.c
+++ b/expand.c
@@ -189,7 +189,7 @@ variable_expand_string (line, string, length)
variable output buffer, and skip them. Uninteresting chars end
at the next $ or the end of the input. */
- p1 = index (p, '$');
+ p1 = strchr (p, '$');
o = variable_buffer_output (o, p, p1 != 0 ? p1 - p : strlen (p) + 1);
@@ -229,7 +229,7 @@ variable_expand_string (line, string, length)
/* Is there a variable reference inside the parens or braces?
If so, expand it before expanding the entire reference. */
- end = index (beg, closeparen);
+ end = strchr (beg, closeparen);
if (end == 0)
/* Unterminated variable reference. */
fatal (reading_file, _("unterminated variable reference"));
@@ -253,7 +253,7 @@ variable_expand_string (line, string, length)
{
beg = expand_argument (beg, p); /* Expand the name. */
free_beg = 1; /* Remember to free BEG when finished. */
- end = index (beg, '\0');
+ end = strchr (beg, '\0');
}
}
else
@@ -273,7 +273,7 @@ variable_expand_string (line, string, length)
char *subst_beg, *subst_end, *replace_beg, *replace_end;
subst_beg = colon + 1;
- subst_end = index (subst_beg, '=');
+ subst_end = strchr (subst_beg, '=');
if (subst_end == 0)
/* There is no = in sight. Punt on the substitution
reference and treat this as a variable name containing