diff options
author | Pedro Alves <palves@redhat.com> | 2011-03-09 12:48:56 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-03-09 12:48:56 +0000 |
commit | 9f37bbcca8004e1ac5be674446c51b50b36dc94e (patch) | |
tree | 02a5d9a92d9719944c943c4f7160cc3a6d42fc5a /gdb/tui | |
parent | f8de3c55e995e88e61316d7025e4d83927497e18 (diff) | |
download | gdb-9f37bbcca8004e1ac5be674446c51b50b36dc94e.zip gdb-9f37bbcca8004e1ac5be674446c51b50b36dc94e.tar.gz gdb-9f37bbcca8004e1ac5be674446c51b50b36dc94e.tar.bz2 |
* cli/cli-cmds.c (shell_escape): Use lbasename.
* coffread.c (coff_start_symtab): Constify parameter.
(complete_symtab): Constify `name' parameter.
(coff_symtab_read): Constify `filestring' local.
(coff_getfilename): Constify return and `result' local.
Use lbasename.
* fbsd-nat.c (fbsd_make_corefile_notes): Use lbasename.
* linux-fork.c (info_checkpoints_command): Use lbasename.
* linux-nat.c (linux_nat_make_corefile_notes): Use lbasename.
* minsyms.c (lookup_minimal_symbol): Use lbasename.
* nto-tdep.c (nto_find_and_open_solib): Use lbasename.
* procfs.c (procfs_make_note_section): Use lbasename.
* tui/tui-io.c (printable_part): Constity return and parameter.
Use lbasename.
(print_filename): Constify parameters, and local `s'.
(tui_rl_display_match_list): Constify local `temp'.
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/tui-io.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index 5b110bd..e7b7370 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -324,20 +324,10 @@ tui_readline_output (int error, gdb_client_data data) final slash. Otherwise, we return what we were passed. Comes from readline/complete.c. */ -static char * -printable_part (char *pathname) +static const char * +printable_part (const char *pathname) { - char *temp; - - temp = rl_filename_completion_desired - ? strrchr (pathname, '/') : (char *)NULL; -#if defined (__MSDOS__) - if (rl_filename_completion_desired - && temp == 0 && isalpha (pathname[0]) - && pathname[1] == ':') - temp = pathname + 1; -#endif - return (temp ? ++temp : pathname); + return rl_filename_completion_desired ? lbasename (pathname) : pathname; } /* Output TO_PRINT to rl_outstream. If VISIBLE_STATS is defined and @@ -366,10 +356,10 @@ printable_part (char *pathname) } while (0) static int -print_filename (char *to_print, char *full_pathname) +print_filename (const char *to_print, const char *full_pathname) { int printed_len = 0; - char *s; + const char *s; for (s = to_print; *s; s++) { @@ -416,7 +406,7 @@ tui_rl_display_match_list (char **matches, int len, int max) int count, limit, printed_len; int i, j, k, l; - char *temp; + const char *temp; /* Screen dimension correspond to the TUI command window. */ int screenwidth = TUI_CMD_WIN->generic.width; |