* toplev.c (file_name_nondirectory): Remove.
* toplev.h: Similarly.
* dwarf2out.c (compute_section_prefix): Use lbasename instead
of file_name_nondirectory.
* cp/lex.c: Delete duplicate pending_lang_change.
* cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
Similarly.
* cp/repo.c (get_base_filename, open_repo_file): Similarly.
* cp/cp-tree.h: Remove file_name_nondirectory prototype.
From-SVN: r40369
+2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * toplev.c (file_name_nondirectory): Remove.
+ * toplev.h: Similarly.
+ * dwarf2out.c (compute_section_prefix): Use lbasename instead
+ of file_name_nondirectory.
+
Sat Mar 10 10:36:45 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* mips-tdump.c (read_seek): Call xmalloc, not malloc.
+2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * cp/lex.c: Delete duplicate pending_lang_change.
+
+2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
+ Similarly.
+ * cp/repo.c (get_base_filename, open_repo_file): Similarly.
+ * cp/cp-tree.h: Remove file_name_nondirectory prototype.
+
2001-03-09 Zack Weinberg <zackw@stanford.edu>
* Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
/* in input.c */
/* in lex.c */
-extern char *file_name_nondirectory PARAMS ((const char *));
extern tree make_pointer_declarator PARAMS ((tree, tree));
extern tree make_reference_declarator PARAMS ((tree, tree));
extern tree make_call_declarator PARAMS ((tree, tree, tree, tree));
#include "cpplib.h"
-/* Pending language change.
- Positive is push count, negative is pop count. */
-int pending_lang_change = 0;
-
extern int yychar; /* the lookahead symbol */
extern YYSTYPE yylval; /* the semantic value of the */
/* lookahead symbol */
if (fname == (tree)-1)
return;
else if (fname == 0)
- main_filename = file_name_nondirectory (input_filename);
+ main_filename = lbasename (input_filename);
else
main_filename = TREE_STRING_POINTER (fname);
main_filename = main_input_filename;
else
main_filename = input_filename;
- main_filename = file_name_nondirectory (main_filename);
+ main_filename = lbasename (main_filename);
}
else
{
return NULL;
}
- return file_name_nondirectory (filename);
+ return lbasename (filename);
}
static void
if (s == NULL)
return;
- p = file_name_nondirectory (s);
+ p = lbasename (s);
p = strrchr (p, '.');
if (! p)
p = s + strlen (s);
die_checksum (unit_die, &ctx);
md5_finish_ctx (&ctx, checksum);
- p = file_name_nondirectory (get_AT_string (unit_die, DW_AT_name));
+ p = lbasename (get_AT_string (unit_die, DW_AT_name));
name = (char *) alloca (strlen (p) + 64);
sprintf (name, "%s.", p);
}
}
-/* Given a file name X, return the nondirectory portion. */
-
-char *
-file_name_nondirectory (x)
- const char *x;
-{
- char *tmp = (char *) strrchr (x, '/');
- if (DIR_SEPARATOR != '/' && ! tmp)
- tmp = (char *) strrchr (x, DIR_SEPARATOR);
- if (tmp)
- return (char *) (tmp + 1);
- else
- return (char *) x;
-}
-
/* Output a quoted string. */
void
const int));
extern int count_error PARAMS ((int));
extern void strip_off_ending PARAMS ((char *, int));
-extern char *file_name_nondirectory PARAMS ((const char *));
extern void print_time PARAMS ((const char *, long));
extern void debug_start_source_file PARAMS ((const char *));
extern void debug_end_source_file PARAMS ((unsigned));