aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/repo.c
diff options
context:
space:
mode:
authorKlaus Kaempf <kkaempf@progis.de>1998-07-12 01:53:48 +0000
committerJason Merrill <jason@yorick.cygnus.com>1998-07-12 01:53:48 +0000
commit7321a693e68442a063dad841174df7fe7c746088 (patch)
tree5a9540fc5605625ace82f6554694026f64f1a905 /gcc/cp/repo.c
parent2542ef48f99446fc9f06d80a2fb775084c674336 (diff)
* repo.c (get_base_filename): Use file_name_nondirectory ().
(open_repo_file): Ditto. * cp-tree.h (file_name_nondirectory): Add prototype. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@21069 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/repo.c')
-rw-r--r--gcc/cp/repo.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c
index a1ac79ccef9..742250dc632 100644
--- a/gcc/cp/repo.c
+++ b/gcc/cp/repo.c
@@ -259,11 +259,7 @@ get_base_filename (filename)
return NULL;
}
- p = rindex (filename, '/');
- if (p)
- return p+1;
- else
- return filename;
+ return file_name_nondirectory (filename);
}
static void
@@ -276,9 +272,7 @@ open_repo_file (filename)
if (s == NULL)
return;
- p = rindex (s, '/');
- if (! p)
- p = s;
+ p = file_name_nondirectory (s);
p = rindex (p, '.');
if (! p)
p = s + strlen (s);