1
1

screen.c: Long user names is shown in the way, how file name truncates.

Этот коммит содержится в:
Timur Bakeyev 1999-01-14 10:25:37 +00:00
родитель e0faaa671f
Коммит 927ea8f052
2 изменённых файлов: 39 добавлений и 13 удалений

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

@ -1,3 +1,9 @@
Thu Jan 14 13:18:58 1999 Timur Bakeyev <mc@bat.ru>
* screen.c (string_file_[owner|group]): Workaround the fact, that some
systems have user and group names greater than 8 symbols. Now we trun-
cate them.
1999-01-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
* treestore.c (tree_store_load): Use g_return_val_if_fail(), not

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

@ -29,6 +29,9 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h> /* For chdir(), readlink() and getwd()/getcwd() */
#endif
#include "mc.h"
#include "mem.h"
#include "mad.h"
#include "global.h"
@ -52,7 +55,6 @@
#include "widget.h"
#include "../vfs/vfs.h"
#include "../vfs/extfs.h"
#include <glib.h>
#ifdef NEEDS_DRIVE_H
# include "drive.h"
@ -276,18 +278,6 @@ string_file_nlinks (file_entry *fe, int len)
return buffer;
}
char *
string_file_owner (file_entry *fe, int len)
{
return get_owner (fe->buf.st_uid);
}
char *
string_file_group (file_entry *fe, int len)
{
return get_group (fe->buf.st_gid);
}
char *
string_file_size (file_entry *fe, int len)
{
@ -335,12 +325,42 @@ string_file_ctime (file_entry *fe, int len)
#ifdef HAVE_GNOME
/* In GNOME, the CList truncates the names */
char *
string_file_owner (file_entry *fe, int len)
{
return get_owner (fe->buf.st_uid);
}
char *
string_file_group (file_entry *fe, int len)
{
return get_group (fe->buf.st_gid);
}
char *
string_file_name (file_entry *fe, int len)
{
return fe->fname;
}
#else
char *
string_file_owner (file_entry *fe, int len)
{
if (len)
return name_trunc (get_owner (fe->buf.st_uid), len);
else
return get_owner (fe->buf.st_uid);
}
char *
string_file_group (file_entry *fe, int len)
{
if (len)
return name_trunc (get_group (fe->buf.st_gid), len);
else
return get_group (fe->buf.st_gid);
}
char *
string_file_name (file_entry *fe, int len)
{