From: Klaus Kaempf Date: Sun, 12 Jul 1998 01:53:48 +0000 (+0000) Subject: repo.c (get_base_filename): Use file_name_nondirectory (). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=46c045017763050f3dade95993aa2100554fdae7;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 310376ddb2c..d24b105b9aa 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +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 * friend.c (do_friend): Pull the identifier out of declarator. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 735dc8a1470..761265c107e 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -2574,6 +2574,7 @@ extern tree build_vec_delete PROTO((tree, tree, tree, tree, int)); /* in input.c */ /* in lex.c */ +extern char *file_name_nondirectory PROTO((char *)); extern tree make_pointer_declarator PROTO((tree, tree)); extern tree make_reference_declarator PROTO((tree, tree)); extern tree make_call_declarator PROTO((tree, tree, tree, tree)); 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);