+2001-06-11 Andrew Cagney <ac131313@redhat.com>
+
+ * symtab.c (lookup_symtab_1): Replace basename with lbasename.
+ (lookup_partial_symtab, file_matches): Ditto.
+ (make_source_files_completion_list): Ditto.
+ (make_file_symbol_completion_list): Ditto. Make local char*
+ variable ``tail'' constant.
+ (make_source_files_completion_list): Ditto with ``base_name''.
+ * source.c (open_source_file): Use lbasename. Make ``p'' const
+ char *.
+
2001-06-13 Eli Zaretskii <eliz@is.elta.co.il>
* config/i386/xm-go32.h (SLASH_P, ROOTED_P, SLASH_CHAR)
open_source_file (struct symtab *s)
{
char *path = source_path;
- char *p;
+ const char *p;
int result;
char *fullname;
if (result < 0)
{
/* Didn't work. Try using just the basename. */
- p = basename (s->filename);
+ p = lbasename (s->filename);
if (p != s->filename)
result = openp (path, 0, p, OPEN_MODE, 0, &s->fullname);
}
if (lbasename (name) == name)
ALL_SYMTABS (objfile, s)
{
- if (FILENAME_CMP (basename (s->filename), name) == 0)
+ if (FILENAME_CMP (lbasename (s->filename), name) == 0)
return s;
}
if (lbasename (name) == name)
ALL_PSYMTABS (objfile, pst)
{
- if (FILENAME_CMP (basename (pst->filename), name) == 0)
+ if (FILENAME_CMP (lbasename (pst->filename), name) == 0)
return (pst);
}
{
for (i = 0; i < nfiles; i++)
{
- if (strcmp (files[i], basename (file)) == 0)
+ if (strcmp (files[i], lbasename (file)) == 0)
return 1;
}
}
{
/* Maybe they typed the file with leading directories, while the
symbol tables record only its basename. */
- char *tail = basename (srcfile);
+ const char *tail = lbasename (srcfile);
if (tail > srcfile)
s = lookup_symtab (tail);
int list_used = 0;
size_t text_len = strlen (text);
char **list = (char **) xmalloc (list_alloced * sizeof (char *));
- char *base_name;
+ const char *base_name;
list[0] = NULL;
debug info records leading directories, but not the other
way around. This is what subroutines of breakpoint
command do when they parse file names. */
- base_name = basename (s->filename);
+ base_name = lbasename (s->filename);
if (base_name != s->filename
&& !filename_seen (base_name, 1, &first)
#if HAVE_DOS_BASED_FILE_SYSTEM
}
else
{
- base_name = basename (ps->filename);
+ base_name = lbasename (ps->filename);
if (base_name != ps->filename
&& !filename_seen (base_name, 1, &first)
#if HAVE_DOS_BASED_FILE_SYSTEM