* screen.c (string_file_size_brief): Represent non-regular files
of unknown kind by '?'. (file_compute_color): Use for them the same color as for stale links.
Этот коммит содержится в:
родитель
5f63841598
Коммит
7532ed2827
@ -1,5 +1,10 @@
|
||||
2003-01-20 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* screen.c (string_file_size_brief): Represent non-regular files
|
||||
of unknown kind by '?'.
|
||||
(file_compute_color): Use for them the same color as for stale
|
||||
links.
|
||||
|
||||
* main.c: Change default value of full_eight_bits to 0 - it's
|
||||
reported to be broken on many terminals.
|
||||
|
||||
|
13
src/screen.c
13
src/screen.c
@ -258,8 +258,10 @@ string_file_type (file_entry *fe, int len)
|
||||
buffer[0] = '|';
|
||||
else if (is_exe (fe->buf.st_mode))
|
||||
buffer[0] = '*';
|
||||
else
|
||||
else if (S_ISREG (fe->buf.st_mode))
|
||||
buffer[0] = ' ';
|
||||
else
|
||||
buffer[0] = '?'; /* non-regular of unknown kind */
|
||||
buffer[1] = '\0';
|
||||
return buffer;
|
||||
}
|
||||
@ -498,10 +500,15 @@ file_compute_color (int attr, file_entry *fe)
|
||||
return (SPECIAL_COLOR);
|
||||
else if (is_exe (fe->buf.st_mode))
|
||||
return (EXECUTABLE_COLOR);
|
||||
else if (fe->fname && (!strcmp (fe->fname, "core") || !strcmp (extension(fe->fname), "core")))
|
||||
else if (fe->fname
|
||||
&& (!strcmp (fe->fname, "core")
|
||||
|| !strcmp (extension (fe->fname), "core")))
|
||||
return (CORE_COLOR);
|
||||
else if (S_ISREG (fe->buf.st_mode))
|
||||
return (NORMAL_COLOR);
|
||||
|
||||
return (NORMAL_COLOR); /* just for safeness */
|
||||
/* non-regular file of unknown kind */
|
||||
return (STALE_LINK_COLOR);
|
||||
}
|
||||
|
||||
/* Formats the file number file_index of panel in the buffer dest */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user