Rename type file_entry to the file_entry_t.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2013-09-09 23:29:21 +03:00 committed by Andrew Borodin
parent ba0808aae4
commit 8a28d3bac4
11 changed files with 114 additions and 113 deletions

View File

@ -25,7 +25,7 @@ typedef struct mc_fhl_struct
mc_fhl_t *mc_fhl_new (gboolean);
void mc_fhl_free (mc_fhl_t **);
int mc_fhl_get_color (mc_fhl_t *, file_entry *);
int mc_fhl_get_color (mc_fhl_t *, file_entry_t *);
gboolean mc_fhl_read_ini_file (mc_fhl_t *, const gchar *);
gboolean mc_fhl_parse_ini_file (mc_fhl_t *);

View File

@ -47,7 +47,7 @@
/*inline functions */
inline static gboolean
mc_fhl_is_file (file_entry * fe)
mc_fhl_is_file (file_entry_t * fe)
{
#if S_ISREG == 0
(void) fe;
@ -56,13 +56,13 @@ mc_fhl_is_file (file_entry * fe)
}
inline static gboolean
mc_fhl_is_file_exec (file_entry * fe)
mc_fhl_is_file_exec (file_entry_t * fe)
{
return is_exe (fe->st.st_mode);
}
inline static gboolean
mc_fhl_is_dir (file_entry * fe)
mc_fhl_is_dir (file_entry_t * fe)
{
#if S_ISDIR == 0
(void) fe;
@ -71,7 +71,7 @@ mc_fhl_is_dir (file_entry * fe)
}
inline static gboolean
mc_fhl_is_link (file_entry * fe)
mc_fhl_is_link (file_entry_t * fe)
{
#if S_ISLNK == 0
(void) fe;
@ -80,25 +80,25 @@ mc_fhl_is_link (file_entry * fe)
}
inline static gboolean
mc_fhl_is_hlink (file_entry * fe)
mc_fhl_is_hlink (file_entry_t * fe)
{
return (fe->st.st_nlink > 1);
}
inline static gboolean
mc_fhl_is_link_to_dir (file_entry * fe)
mc_fhl_is_link_to_dir (file_entry_t * fe)
{
return mc_fhl_is_link (fe) && (fe->f.link_to_dir);
}
inline static gboolean
mc_fhl_is_stale_link (file_entry * fe)
mc_fhl_is_stale_link (file_entry_t * fe)
{
return mc_fhl_is_link (fe) ? fe->f.stale_link : !mc_fhl_is_file (fe);
}
inline static gboolean
mc_fhl_is_device_char (file_entry * fe)
mc_fhl_is_device_char (file_entry_t * fe)
{
#if S_ISCHR == 0
(void) fe;
@ -107,7 +107,7 @@ mc_fhl_is_device_char (file_entry * fe)
}
inline static gboolean
mc_fhl_is_device_block (file_entry * fe)
mc_fhl_is_device_block (file_entry_t * fe)
{
#if S_ISBLK == 0
(void) fe;
@ -116,7 +116,7 @@ mc_fhl_is_device_block (file_entry * fe)
}
inline static gboolean
mc_fhl_is_special_socket (file_entry * fe)
mc_fhl_is_special_socket (file_entry_t * fe)
{
#if S_ISSOCK == 0
(void) fe;
@ -125,7 +125,7 @@ mc_fhl_is_special_socket (file_entry * fe)
}
inline static gboolean
mc_fhl_is_special_fifo (file_entry * fe)
mc_fhl_is_special_fifo (file_entry_t * fe)
{
#if S_ISFIFO == 0
(void) fe;
@ -134,7 +134,7 @@ mc_fhl_is_special_fifo (file_entry * fe)
}
inline static gboolean
mc_fhl_is_special_door (file_entry * fe)
mc_fhl_is_special_door (file_entry_t * fe)
{
#if S_ISDOOR == 0
(void) fe;
@ -145,7 +145,7 @@ mc_fhl_is_special_door (file_entry * fe)
inline static gboolean
mc_fhl_is_special (file_entry * fe)
mc_fhl_is_special (file_entry_t * fe)
{
return
(mc_fhl_is_special_socket (fe) || mc_fhl_is_special_fifo (fe)
@ -156,7 +156,7 @@ mc_fhl_is_special (file_entry * fe)
/* --------------------------------------------------------------------------------------------- */
static int
mc_fhl_get_color_filetype (mc_fhl_filter_t * mc_filter, mc_fhl_t * fhl, file_entry * fe)
mc_fhl_get_color_filetype (mc_fhl_filter_t * mc_filter, mc_fhl_t * fhl, file_entry_t * fe)
{
gboolean my_color = FALSE;
(void) fhl;
@ -231,7 +231,7 @@ mc_fhl_get_color_filetype (mc_fhl_filter_t * mc_filter, mc_fhl_t * fhl, file_ent
/* --------------------------------------------------------------------------------------------- */
static int
mc_fhl_get_color_regexp (mc_fhl_filter_t * mc_filter, mc_fhl_t * fhl, file_entry * fe)
mc_fhl_get_color_regexp (mc_fhl_filter_t * mc_filter, mc_fhl_t * fhl, file_entry_t * fe)
{
(void) fhl;
if (mc_filter->search_condition == NULL)
@ -250,7 +250,7 @@ mc_fhl_get_color_regexp (mc_fhl_filter_t * mc_filter, mc_fhl_t * fhl, file_entry
/* --------------------------------------------------------------------------------------------- */
int
mc_fhl_get_color (mc_fhl_t * fhl, file_entry * fe)
mc_fhl_get_color (mc_fhl_t * fhl, file_entry_t * fe)
{
guint i;
mc_fhl_filter_t *mc_filter;

View File

@ -69,7 +69,7 @@ typedef struct
unsigned int stale_link:1; /* If this is a symlink and points to Charon's land */
unsigned int dir_size_computed:1; /* Size of directory was computed with dirsizes_cmd */
} f;
} file_entry;
} file_entry_t;
/*** global variables defined in .c file *********************************************************/

View File

@ -358,7 +358,7 @@ compare_dir (WPanel * panel, WPanel * other, enum CompareMode mode)
/* Handle all files in the panel */
for (i = 0; i < panel->dir.len; i++)
{
file_entry *source = &panel->dir.list[i];
file_entry_t *source = &panel->dir.list[i];
/* Default: unmarked */
file_mark (panel, i, 0);
@ -379,7 +379,7 @@ compare_dir (WPanel * panel, WPanel * other, enum CompareMode mode)
else
{
/* Found */
file_entry *target = &other->dir.list[j];
file_entry_t *target = &other->dir.list[j];
if (mode != compare_size_only)
{
@ -1056,7 +1056,7 @@ void
select_invert_cmd (void)
{
int i;
file_entry *file;
file_entry_t *file;
for (i = 0; i < current_panel->dir.len; i++)
{
@ -1604,7 +1604,7 @@ void
smart_dirsize_cmd (void)
{
WPanel *panel = current_panel;
file_entry *entry;
file_entry_t *entry;
entry = &(panel->dir.list[panel->selected]);
if ((S_ISDIR (entry->st.st_mode) && DIR_IS_DOTDOT (entry->fname)) || panel->dirs_marked)
@ -1619,7 +1619,7 @@ void
single_dirsize_cmd (void)
{
WPanel *panel = current_panel;
file_entry *entry;
file_entry_t *entry;
entry = &(panel->dir.list[panel->selected]);
if (S_ISDIR (entry->st.st_mode) && !DIR_IS_DOTDOT (entry->fname))

View File

@ -130,7 +130,7 @@ clean_sort_keys (dir_list * list, int start, int count)
for (i = 0; i < count; i++)
{
file_entry *fentry;
file_entry_t *fentry;
fentry = &list->list[i + start];
str_release_key (fentry->sort_key, case_sensitive);
@ -231,7 +231,7 @@ alloc_dir_copy (int size)
for (i = 0; i < dir_copy.len; i++)
{
file_entry *fentry;
file_entry_t *fentry;
fentry = &(dir_copy.list)[i];
g_free (fentry->fname);
@ -239,7 +239,7 @@ alloc_dir_copy (int size)
g_free (dir_copy.list);
}
dir_copy.list = g_new0 (file_entry, size);
dir_copy.list = g_new0 (file_entry_t, size);
dir_copy.size = size;
dir_copy.len = 0;
}
@ -278,9 +278,9 @@ dir_list_grow (dir_list * list, int delta)
if (size != list->size)
{
file_entry *fe;
file_entry_t *fe;
fe = g_try_renew (file_entry, list->list, size);
fe = g_try_renew (file_entry_t, list->list, size);
if (fe == NULL)
return FALSE;
@ -310,7 +310,7 @@ gboolean
dir_list_append (dir_list * list, const char *fname, const struct stat * st,
gboolean link_to_dir, gboolean stale_link)
{
file_entry *fentry;
file_entry_t *fentry;
/* Need to grow the *list? */
if (list->len == list->size && !dir_list_grow (list, DIR_LIST_RESIZE_STEP))
@ -335,7 +335,7 @@ dir_list_append (dir_list * list, const char *fname, const struct stat * st,
/* --------------------------------------------------------------------------------------------- */
int
unsorted (file_entry * a, file_entry * b)
unsorted (file_entry_t * a, file_entry_t * b)
{
(void) a;
(void) b;
@ -345,7 +345,7 @@ unsorted (file_entry * a, file_entry * b)
/* --------------------------------------------------------------------------------------------- */
int
sort_name (file_entry * a, file_entry * b)
sort_name (file_entry_t * a, file_entry_t * b)
{
int ad = MY_ISDIR (a);
int bd = MY_ISDIR (b);
@ -366,7 +366,7 @@ sort_name (file_entry * a, file_entry * b)
/* --------------------------------------------------------------------------------------------- */
int
sort_vers (file_entry * a, file_entry * b)
sort_vers (file_entry_t * a, file_entry_t * b)
{
int ad = MY_ISDIR (a);
int bd = MY_ISDIR (b);
@ -384,7 +384,7 @@ sort_vers (file_entry * a, file_entry * b)
/* --------------------------------------------------------------------------------------------- */
int
sort_ext (file_entry * a, file_entry * b)
sort_ext (file_entry_t * a, file_entry_t * b)
{
int r;
int ad = MY_ISDIR (a);
@ -410,7 +410,7 @@ sort_ext (file_entry * a, file_entry * b)
/* --------------------------------------------------------------------------------------------- */
int
sort_time (file_entry * a, file_entry * b)
sort_time (file_entry_t * a, file_entry_t * b)
{
int ad = MY_ISDIR (a);
int bd = MY_ISDIR (b);
@ -430,7 +430,7 @@ sort_time (file_entry * a, file_entry * b)
/* --------------------------------------------------------------------------------------------- */
int
sort_ctime (file_entry * a, file_entry * b)
sort_ctime (file_entry_t * a, file_entry_t * b)
{
int ad = MY_ISDIR (a);
int bd = MY_ISDIR (b);
@ -450,7 +450,7 @@ sort_ctime (file_entry * a, file_entry * b)
/* --------------------------------------------------------------------------------------------- */
int
sort_atime (file_entry * a, file_entry * b)
sort_atime (file_entry_t * a, file_entry_t * b)
{
int ad = MY_ISDIR (a);
int bd = MY_ISDIR (b);
@ -470,7 +470,7 @@ sort_atime (file_entry * a, file_entry * b)
/* --------------------------------------------------------------------------------------------- */
int
sort_inode (file_entry * a, file_entry * b)
sort_inode (file_entry_t * a, file_entry_t * b)
{
int ad = MY_ISDIR (a);
int bd = MY_ISDIR (b);
@ -484,7 +484,7 @@ sort_inode (file_entry * a, file_entry * b)
/* --------------------------------------------------------------------------------------------- */
int
sort_size (file_entry * a, file_entry * b)
sort_size (file_entry_t * a, file_entry_t * b)
{
int ad = MY_ISDIR (a);
int bd = MY_ISDIR (b);
@ -505,7 +505,7 @@ sort_size (file_entry * a, file_entry * b)
void
dir_list_sort (dir_list * list, GCompareFunc sort, const dir_sort_options_t * sort_op)
{
file_entry *fentry;
file_entry_t *fentry;
int dot_dot_found = 0;
if (list->len < 2)
@ -520,7 +520,7 @@ dir_list_sort (dir_list * list, GCompareFunc sort, const dir_sort_options_t * so
reverse = sort_op->reverse ? -1 : 1;
case_sensitive = sort_op->case_sensitive ? 1 : 0;
exec_first = sort_op->exec_first;
qsort (&(list->list)[dot_dot_found], list->len - dot_dot_found, sizeof (file_entry), sort);
qsort (&(list->list)[dot_dot_found], list->len - dot_dot_found, sizeof (file_entry_t), sort);
clean_sort_keys (list, dot_dot_found, list->len - dot_dot_found);
}
@ -534,7 +534,7 @@ dir_list_clean (dir_list * list)
for (i = 0; i < list->len; i++)
{
file_entry *fentry;
file_entry_t *fentry;
fentry = &list->list[i];
g_free (fentry->fname);
@ -552,7 +552,7 @@ dir_list_clean (dir_list * list)
gboolean
dir_list_init (dir_list * list)
{
file_entry *fentry;
file_entry_t *fentry;
/* Need to grow the *list? */
if (list->size == 0 && !dir_list_grow (list, DIR_LIST_RESIZE_STEP))
@ -562,7 +562,7 @@ dir_list_init (dir_list * list)
}
fentry = &list->list[0];
memset (fentry, 0, sizeof (file_entry));
memset (fentry, 0, sizeof (file_entry_t));
fentry->fnamelen = 2;
fentry->fname = g_strndup ("..", fentry->fnamelen);
fentry->f.link_to_dir = 0;
@ -629,7 +629,7 @@ dir_list_load (dir_list * list, const vfs_path_t * vpath, GCompareFunc sort,
struct dirent *dp;
int link_to_dir, stale_link;
struct stat st;
file_entry *fentry;
file_entry_t *fentry;
/* ".." (if any) must be the first entry in the list */
if (!dir_list_init (list))
@ -680,7 +680,7 @@ dir_list_load (dir_list * list, const vfs_path_t * vpath, GCompareFunc sort,
/* --------------------------------------------------------------------------------------------- */
gboolean
if_link_is_exe (const vfs_path_t * full_name_vpath, const file_entry * file)
if_link_is_exe (const vfs_path_t * full_name_vpath, const file_entry_t * file)
{
struct stat b;
@ -719,7 +719,7 @@ dir_list_reload (dir_list * list, const vfs_path_t * vpath, GCompareFunc sort,
alloc_dir_copy (list->len);
for (marked_cnt = i = 0; i < list->len; i++)
{
file_entry *fentry, *dfentry;
file_entry_t *fentry, *dfentry;
fentry = &list->list[i];
dfentry = &dir_copy.list[i];
@ -754,7 +754,7 @@ dir_list_reload (dir_list * list, const vfs_path_t * vpath, GCompareFunc sort,
if (dir_get_dotdot_stat (vpath, &st))
{
file_entry *fentry;
file_entry_t *fentry;
fentry = &list->list[0];
fentry->st = st;
@ -763,7 +763,7 @@ dir_list_reload (dir_list * list, const vfs_path_t * vpath, GCompareFunc sort,
while ((dp = mc_readdir (dirp)) != NULL)
{
file_entry *fentry;
file_entry_t *fentry;
if (!handle_dirent (dp, fltr, &st, &link_to_dir, &stale_link))
continue;

View File

@ -25,7 +25,7 @@
*/
typedef struct
{
file_entry *list; /**< list of file_entry_t objects */
file_entry_t *list; /**< list of file_entry_t objects */
int size; /**< number of allocated elements in list (capacity) */
int len; /**< number of used elements in list */
} dir_list;
@ -58,22 +58,22 @@ void dir_list_clean (dir_list * list);
gboolean handle_path (const char *path, struct stat *buf1, int *link_to_dir, int *stale_link);
/* Sorting functions */
int unsorted (file_entry * a, file_entry * b);
int sort_name (file_entry * a, file_entry * b);
int sort_vers (file_entry * a, file_entry * b);
int sort_ext (file_entry * a, file_entry * b);
int sort_time (file_entry * a, file_entry * b);
int sort_atime (file_entry * a, file_entry * b);
int sort_ctime (file_entry * a, file_entry * b);
int sort_size (file_entry * a, file_entry * b);
int sort_inode (file_entry * a, file_entry * b);
int unsorted (file_entry_t * a, file_entry_t * b);
int sort_name (file_entry_t * a, file_entry_t * b);
int sort_vers (file_entry_t * a, file_entry_t * b);
int sort_ext (file_entry_t * a, file_entry_t * b);
int sort_time (file_entry_t * a, file_entry_t * b);
int sort_atime (file_entry_t * a, file_entry_t * b);
int sort_ctime (file_entry_t * a, file_entry_t * b);
int sort_size (file_entry_t * a, file_entry_t * b);
int sort_inode (file_entry_t * a, file_entry_t * b);
gboolean if_link_is_exe (const vfs_path_t * full_name, const file_entry * file);
gboolean if_link_is_exe (const vfs_path_t * full_name, const file_entry_t * file);
/*** inline functions ****************************************************************************/
static inline gboolean
link_isdir (const file_entry * file)
link_isdir (const file_entry_t * file)
{
return (gboolean) file->f.link_to_dir;
}

View File

@ -89,24 +89,24 @@ hook_t *select_file_hook = NULL;
panelized_panel_t panelized_panel = { {NULL, 0, -1}, NULL };
/* *INDENT-ON* */
static const char *string_file_name (file_entry *, int);
static const char *string_file_size (file_entry *, int);
static const char *string_file_size_brief (file_entry *, int);
static const char *string_file_type (file_entry *, int);
static const char *string_file_mtime (file_entry *, int);
static const char *string_file_atime (file_entry *, int);
static const char *string_file_ctime (file_entry *, int);
static const char *string_file_permission (file_entry *, int);
static const char *string_file_perm_octal (file_entry *, int);
static const char *string_file_nlinks (file_entry *, int);
static const char *string_inode (file_entry *, int);
static const char *string_file_nuid (file_entry *, int);
static const char *string_file_ngid (file_entry *, int);
static const char *string_file_owner (file_entry *, int);
static const char *string_file_group (file_entry *, int);
static const char *string_marked (file_entry *, int);
static const char *string_space (file_entry *, int);
static const char *string_dot (file_entry *, int);
static const char *string_file_name (file_entry_t *, int);
static const char *string_file_size (file_entry_t *, int);
static const char *string_file_size_brief (file_entry_t *, int);
static const char *string_file_type (file_entry_t *, int);
static const char *string_file_mtime (file_entry_t *, int);
static const char *string_file_atime (file_entry_t *, int);
static const char *string_file_ctime (file_entry_t *, int);
static const char *string_file_permission (file_entry_t *, int);
static const char *string_file_perm_octal (file_entry_t *, int);
static const char *string_file_nlinks (file_entry_t *, int);
static const char *string_inode (file_entry_t *, int);
static const char *string_file_nuid (file_entry_t *, int);
static const char *string_file_ngid (file_entry_t *, int);
static const char *string_file_owner (file_entry_t *, int);
static const char *string_file_group (file_entry_t *, int);
static const char *string_marked (file_entry_t *, int);
static const char *string_space (file_entry_t *, int);
static const char *string_dot (file_entry_t *, int);
/* *INDENT-OFF* */
panel_field_t panel_fields[] = {
@ -345,7 +345,7 @@ typedef struct format_e
int field_len;
align_crt_t just_mode;
int expand;
const char *(*string_fn) (file_entry *, int len);
const char *(*string_fn) (file_entry_t *, int len);
char *title;
const char *id;
} format_e;
@ -406,7 +406,7 @@ delete_format (format_e * format)
/** This code relies on the default justification!!! */
static void
add_permission_string (const char *dest, int width, file_entry * fe, int attr, int color,
add_permission_string (const char *dest, int width, file_entry_t * fe, int attr, int color,
int is_octal)
{
int i, r, l;
@ -448,7 +448,7 @@ add_permission_string (const char *dest, int width, file_entry * fe, int attr, i
/** String representations of various file attributes name */
static const char *
string_file_name (file_entry * fe, int len)
string_file_name (file_entry_t * fe, int len)
{
static char buffer[MC_MAXPATHLEN * MB_LEN_MAX + 1];
@ -496,7 +496,7 @@ format_device_number (char *buf, size_t bufsize, dev_t dev)
/** size */
static const char *
string_file_size (file_entry * fe, int len)
string_file_size (file_entry_t * fe, int len)
{
static char buffer[BUF_TINY];
@ -519,7 +519,7 @@ string_file_size (file_entry * fe, int len)
/** bsize */
static const char *
string_file_size_brief (file_entry * fe, int len)
string_file_size_brief (file_entry_t * fe, int len)
{
if (S_ISLNK (fe->st.st_mode) && !fe->f.link_to_dir)
{
@ -538,7 +538,7 @@ string_file_size_brief (file_entry * fe, int len)
/** This functions return a string representation of a file entry type */
static const char *
string_file_type (file_entry * fe, int len)
string_file_type (file_entry_t * fe, int len)
{
static char buffer[2];
@ -580,7 +580,7 @@ string_file_type (file_entry * fe, int len)
/** mtime */
static const char *
string_file_mtime (file_entry * fe, int len)
string_file_mtime (file_entry_t * fe, int len)
{
(void) len;
return file_date (fe->st.st_mtime);
@ -590,7 +590,7 @@ string_file_mtime (file_entry * fe, int len)
/** atime */
static const char *
string_file_atime (file_entry * fe, int len)
string_file_atime (file_entry_t * fe, int len)
{
(void) len;
return file_date (fe->st.st_atime);
@ -600,7 +600,7 @@ string_file_atime (file_entry * fe, int len)
/** ctime */
static const char *
string_file_ctime (file_entry * fe, int len)
string_file_ctime (file_entry_t * fe, int len)
{
(void) len;
return file_date (fe->st.st_ctime);
@ -610,7 +610,7 @@ string_file_ctime (file_entry * fe, int len)
/** perm */
static const char *
string_file_permission (file_entry * fe, int len)
string_file_permission (file_entry_t * fe, int len)
{
(void) len;
return string_perm (fe->st.st_mode);
@ -620,7 +620,7 @@ string_file_permission (file_entry * fe, int len)
/** mode */
static const char *
string_file_perm_octal (file_entry * fe, int len)
string_file_perm_octal (file_entry_t * fe, int len)
{
static char buffer[10];
@ -633,7 +633,7 @@ string_file_perm_octal (file_entry * fe, int len)
/** nlink */
static const char *
string_file_nlinks (file_entry * fe, int len)
string_file_nlinks (file_entry_t * fe, int len)
{
static char buffer[BUF_TINY];
@ -646,7 +646,7 @@ string_file_nlinks (file_entry * fe, int len)
/** inode */
static const char *
string_inode (file_entry * fe, int len)
string_inode (file_entry_t * fe, int len)
{
static char buffer[10];
@ -659,7 +659,7 @@ string_inode (file_entry * fe, int len)
/** nuid */
static const char *
string_file_nuid (file_entry * fe, int len)
string_file_nuid (file_entry_t * fe, int len)
{
static char buffer[10];
@ -672,7 +672,7 @@ string_file_nuid (file_entry * fe, int len)
/** ngid */
static const char *
string_file_ngid (file_entry * fe, int len)
string_file_ngid (file_entry_t * fe, int len)
{
static char buffer[10];
@ -685,7 +685,7 @@ string_file_ngid (file_entry * fe, int len)
/** owner */
static const char *
string_file_owner (file_entry * fe, int len)
string_file_owner (file_entry_t * fe, int len)
{
(void) len;
return get_owner (fe->st.st_uid);
@ -695,7 +695,7 @@ string_file_owner (file_entry * fe, int len)
/** group */
static const char *
string_file_group (file_entry * fe, int len)
string_file_group (file_entry_t * fe, int len)
{
(void) len;
return get_group (fe->st.st_gid);
@ -705,7 +705,7 @@ string_file_group (file_entry * fe, int len)
/** mark */
static const char *
string_marked (file_entry * fe, int len)
string_marked (file_entry_t * fe, int len)
{
(void) len;
return fe->f.marked ? "*" : " ";
@ -715,7 +715,7 @@ string_marked (file_entry * fe, int len)
/** space */
static const char *
string_space (file_entry * fe, int len)
string_space (file_entry_t * fe, int len)
{
(void) fe;
(void) len;
@ -726,7 +726,7 @@ string_space (file_entry * fe, int len)
/** dot */
static const char *
string_dot (file_entry * fe, int len)
string_dot (file_entry_t * fe, int len)
{
(void) fe;
(void) len;
@ -736,7 +736,7 @@ string_dot (file_entry * fe, int len)
/* --------------------------------------------------------------------------------------------- */
static int
file_compute_color (int attr, file_entry * fe)
file_compute_color (int attr, file_entry_t * fe)
{
switch (attr)
{
@ -767,7 +767,7 @@ format_file (char *dest, int limit, WPanel * panel, int file_index, int width, i
int color, length, empty_line;
const char *txt;
format_e *format, *home;
file_entry *fe;
file_entry_t *fe;
filename_scroll_flag_t res = FILENAME_NOSCROLL;
(void) dest;
@ -2554,7 +2554,7 @@ stop_search (WPanel * panel)
/** Return 1 if the Enter key has been processed, 0 otherwise */
static int
do_enter_on_file_entry (file_entry * fe)
do_enter_on_file_entry_t (file_entry_t * fe)
{
vfs_path_t *full_name_vpath;
gboolean ok;
@ -2631,7 +2631,7 @@ do_enter_on_file_entry (file_entry * fe)
static int
do_enter (WPanel * panel)
{
return do_enter_on_file_entry (selection (panel));
return do_enter_on_file_entry_t (selection (panel));
}
/* --------------------------------------------------------------------------------------------- */
@ -2639,7 +2639,7 @@ do_enter (WPanel * panel)
static void
chdir_other_panel (WPanel * panel)
{
const file_entry *entry = &panel->dir.list[panel->selected];
const file_entry_t *entry = &panel->dir.list[panel->selected];
vfs_path_t *new_dir_vpath;
char *sel_entry = NULL;
@ -3063,8 +3063,8 @@ _do_panel_cd (WPanel * panel, const vfs_path_t * new_dir_vpath, enum cd_enum cd_
/* Reload current panel */
panel_clean_dir (panel);
dir_list_load (&panel->dir, panel->cwd_vpath, panel->sort_field->sort_routine, &panel->sort_info,
panel->filter);
dir_list_load (&panel->dir, panel->cwd_vpath, panel->sort_field->sort_routine,
&panel->sort_info, panel->filter);
try_to_select (panel, get_parent_dir_name (panel->cwd_vpath, olddir_vpath));
load_hint (0);
@ -3653,7 +3653,8 @@ panel_event (Gpm_Event * event, void *data)
{
if (is_active)
{
if (panels_options.mouse_move_pages && (panel->top_file + ITEMS (panel) < panel->dir.len))
if (panels_options.mouse_move_pages
&& (panel->top_file + ITEMS (panel) < panel->dir.len))
next_page (panel);
else /* We are in last page */
move_down (panel);
@ -4070,7 +4071,7 @@ panel_new_with_dir (const char *panel_name, const vfs_path_t * vpath)
/* directories history will be get later */
panel->dir.size = DIR_LIST_MIN_SIZE;
panel->dir.list = g_new (file_entry, panel->dir.size);
panel->dir.list = g_new (file_entry_t, panel->dir.size);
panel->dir.len = 0;
panel->active = 0;
panel->filter = 0;
@ -4138,8 +4139,8 @@ panel_new_with_dir (const char *panel_name, const vfs_path_t * vpath)
}
/* Load the default format */
dir_list_load (&panel->dir, panel->cwd_vpath, panel->sort_field->sort_routine, &panel->sort_info,
panel->filter);
dir_list_load (&panel->dir, panel->cwd_vpath, panel->sort_field->sort_routine,
&panel->sort_info, panel->filter);
/* Restore old right path */
if (curdir != NULL)

View File

@ -69,7 +69,7 @@ typedef struct panel_field_struct
const char *title_hotkey;
gboolean is_user_choice;
gboolean use_in_user_format;
const char *(*string_fn) (file_entry *, int);
const char *(*string_fn) (file_entry_t *, int);
GCompareFunc sort_routine; /* used by mouse_sort_col() */
} panel_field_t;

View File

@ -1494,7 +1494,7 @@ resolve_symlink_without_ls_options (struct vfs_class *me, struct vfs_s_super *su
for (depth = 0; depth < 100; depth++)
{ /* depth protects against recursive symbolic links */
canonicalize_pathname (tmp);
fe = _get_file_entry (bucket, tmp, 0, 0);
fe = _get_file_entry_t (bucket, tmp, 0, 0);
if (fe)
{
if (S_ISLNK (fe->s.st_mode) && fe->l_stat == 0)

View File

@ -312,7 +312,7 @@ mcview_load_next_prev_init (mcview_t * view)
/* search current file in the list */
for (i = 0; i != view->dir->len; i++)
{
const file_entry *fe = &view->dir->list[i];
const file_entry_t *fe = &view->dir->list[i];
if (fname_len == fe->fnamelen && strncmp (fname, fe->fname, fname_len) == 0)
break;

View File

@ -52,7 +52,7 @@ setup (void)
current_panel = g_new0 (struct WPanel, 1);
current_panel->cwd_vpath = vfs_path_from_str ("/home");
current_panel->dir.size = DIR_LIST_MIN_SIZE;
current_panel->dir.list = g_new0 (file_entry, current_panel->dir.size);
current_panel->dir.list = g_new0 (file_entry_t, current_panel->dir.size);
current_panel->dir.len = 0;
}