1
1

* screen.c (string_file_name): Replace non-printable characters

with question marks.
Этот коммит содержится в:
Pavel Roskin 2002-08-15 16:52:51 +00:00
родитель f0dbdeb72e
Коммит 58da40fa6a
2 изменённых файлов: 22 добавлений и 1 удалений

Просмотреть файл

@ -1,5 +1,8 @@
2002-08-15 Pavel Roskin <proski@gnu.org>
* screen.c (string_file_name): Replace non-printable characters
with question marks.
* subshell.c (read_subshell_prompt): Remove argument "how", it's
never set to VISIBLY. Adjust all dependencies. Eliminate hack
with "clear_now" - it causes invalid memory access and hides the

Просмотреть файл

@ -146,7 +146,25 @@ add_permission_string (char *dest, int width, file_entry *fe, int attr, int colo
static char *
string_file_name (file_entry *fe, int len)
{
return fe->fname;
static char buffer [BUF_SMALL];
int i;
for (i = 0; i < sizeof(buffer); i++) {
char c;
c = fe->fname[i];
if (!c)
break;
if (!is_printable(c))
c = '?';
buffer[i] = c;
}
buffer[i] = 0;
return buffer;
}
/* size */