2010-01-13 Tristan Gingold <gingold@adacore.com>

* ar.c (main): Use lbasename.
	(normalize): Ditto.
	* objdump.c (update_source_path): Ditto.
This commit is contained in:
Tristan Gingold
2010-01-13 11:15:52 +00:00
parent 16c06870bc
commit fd3a68167e
3 changed files with 9 additions and 48 deletions

View File

@ -1156,21 +1156,7 @@ update_source_path (const char *filename)
return NULL;
/* Get the name of the file. */
fname = strrchr (filename, '/');
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
{
/* We could have a mixed forward/back slash case. */
char *backslash = strrchr (filename, '\\');
if (fname == NULL || (backslash != NULL && backslash > fname))
fname = backslash;
if (fname == NULL && filename[0] != '\0' && filename[1] == ':')
fname = filename + 1;
}
#endif
if (fname == NULL)
fname = filename;
else
++fname;
fname = lbasename (filename);
/* If file exists under a new path, we need to add it to the list
so that show_line knows about it. */