Commit 46c04501 by Klaus Kaempf Committed by Jason Merrill

repo.c (get_base_filename): Use file_name_nondirectory ().

 	* repo.c (get_base_filename): Use file_name_nondirectory ().
 	(open_repo_file): Ditto.
	* cp-tree.h (file_name_nondirectory): Add prototype.

From-SVN: r21069
parent 2b9dc906
1998-07-12 Klaus Kaempf (kkaempf@progis.de)
* repo.c (get_base_filename): Use file_name_nondirectory ().
(open_repo_file): Ditto.
* cp-tree.h (file_name_nondirectory): Add prototype.
1998-07-12 Jason Merrill <jason@yorick.cygnus.com> 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
* friend.c (do_friend): Pull the identifier out of declarator. * friend.c (do_friend): Pull the identifier out of declarator.
......
...@@ -2574,6 +2574,7 @@ extern tree build_vec_delete PROTO((tree, tree, tree, tree, int)); ...@@ -2574,6 +2574,7 @@ extern tree build_vec_delete PROTO((tree, tree, tree, tree, int));
/* in input.c */ /* in input.c */
/* in lex.c */ /* in lex.c */
extern char *file_name_nondirectory PROTO((char *));
extern tree make_pointer_declarator PROTO((tree, tree)); extern tree make_pointer_declarator PROTO((tree, tree));
extern tree make_reference_declarator PROTO((tree, tree)); extern tree make_reference_declarator PROTO((tree, tree));
extern tree make_call_declarator PROTO((tree, tree, tree, tree)); extern tree make_call_declarator PROTO((tree, tree, tree, tree));
......
...@@ -259,11 +259,7 @@ get_base_filename (filename) ...@@ -259,11 +259,7 @@ get_base_filename (filename)
return NULL; return NULL;
} }
p = rindex (filename, '/'); return file_name_nondirectory (filename);
if (p)
return p+1;
else
return filename;
} }
static void static void
...@@ -276,9 +272,7 @@ open_repo_file (filename) ...@@ -276,9 +272,7 @@ open_repo_file (filename)
if (s == NULL) if (s == NULL)
return; return;
p = rindex (s, '/'); p = file_name_nondirectory (s);
if (! p)
p = s;
p = rindex (p, '.'); p = rindex (p, '.');
if (! p) if (! p)
p = s + strlen (s); p = s + strlen (s);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment