summaryrefslogtreecommitdiff
path: root/variable.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 /variable.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 'variable.c')
-rw-r--r--variable.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/variable.c b/variable.c
index 4eebb37..47e9da8 100644
--- a/variable.c
+++ b/variable.c
@@ -878,8 +878,8 @@ try_variable_definition (flocp, line, origin)
char *fake_env[2];
size_t pathlen = 0;
- shellbase = rindex (value, '/');
- bslash = rindex (value, '\\');
+ shellbase = strrchr (value, '/');
+ bslash = strrchr (value, '\\');
if (!shellbase || bslash > shellbase)
shellbase = bslash;
if (!shellbase && value[1] == ':')
@@ -987,7 +987,7 @@ print_variable (v, prefix)
fputs (prefix, stdout);
/* Is this a `define'? */
- if (v->recursive && index (v->value, '\n') != 0)
+ if (v->recursive && strchr (v->value, '\n') != 0)
printf ("define %s\n%s\nendef\n", v->name, v->value);
else
{