mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
Rename type file_entry to the file_entry_t.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
ba0808aae4
commit
8a28d3bac4
@ -25,7 +25,7 @@ typedef struct mc_fhl_struct
|
|||||||
mc_fhl_t *mc_fhl_new (gboolean);
|
mc_fhl_t *mc_fhl_new (gboolean);
|
||||||
void mc_fhl_free (mc_fhl_t **);
|
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_read_ini_file (mc_fhl_t *, const gchar *);
|
||||||
gboolean mc_fhl_parse_ini_file (mc_fhl_t *);
|
gboolean mc_fhl_parse_ini_file (mc_fhl_t *);
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
/*inline functions */
|
/*inline functions */
|
||||||
inline static gboolean
|
inline static gboolean
|
||||||
mc_fhl_is_file (file_entry * fe)
|
mc_fhl_is_file (file_entry_t * fe)
|
||||||
{
|
{
|
||||||
#if S_ISREG == 0
|
#if S_ISREG == 0
|
||||||
(void) fe;
|
(void) fe;
|
||||||
@ -56,13 +56,13 @@ mc_fhl_is_file (file_entry * fe)
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline static gboolean
|
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);
|
return is_exe (fe->st.st_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static gboolean
|
inline static gboolean
|
||||||
mc_fhl_is_dir (file_entry * fe)
|
mc_fhl_is_dir (file_entry_t * fe)
|
||||||
{
|
{
|
||||||
#if S_ISDIR == 0
|
#if S_ISDIR == 0
|
||||||
(void) fe;
|
(void) fe;
|
||||||
@ -71,7 +71,7 @@ mc_fhl_is_dir (file_entry * fe)
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline static gboolean
|
inline static gboolean
|
||||||
mc_fhl_is_link (file_entry * fe)
|
mc_fhl_is_link (file_entry_t * fe)
|
||||||
{
|
{
|
||||||
#if S_ISLNK == 0
|
#if S_ISLNK == 0
|
||||||
(void) fe;
|
(void) fe;
|
||||||
@ -80,25 +80,25 @@ mc_fhl_is_link (file_entry * fe)
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline static gboolean
|
inline static gboolean
|
||||||
mc_fhl_is_hlink (file_entry * fe)
|
mc_fhl_is_hlink (file_entry_t * fe)
|
||||||
{
|
{
|
||||||
return (fe->st.st_nlink > 1);
|
return (fe->st.st_nlink > 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static gboolean
|
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);
|
return mc_fhl_is_link (fe) && (fe->f.link_to_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static gboolean
|
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);
|
return mc_fhl_is_link (fe) ? fe->f.stale_link : !mc_fhl_is_file (fe);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static gboolean
|
inline static gboolean
|
||||||
mc_fhl_is_device_char (file_entry * fe)
|
mc_fhl_is_device_char (file_entry_t * fe)
|
||||||
{
|
{
|
||||||
#if S_ISCHR == 0
|
#if S_ISCHR == 0
|
||||||
(void) fe;
|
(void) fe;
|
||||||
@ -107,7 +107,7 @@ mc_fhl_is_device_char (file_entry * fe)
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline static gboolean
|
inline static gboolean
|
||||||
mc_fhl_is_device_block (file_entry * fe)
|
mc_fhl_is_device_block (file_entry_t * fe)
|
||||||
{
|
{
|
||||||
#if S_ISBLK == 0
|
#if S_ISBLK == 0
|
||||||
(void) fe;
|
(void) fe;
|
||||||
@ -116,7 +116,7 @@ mc_fhl_is_device_block (file_entry * fe)
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline static gboolean
|
inline static gboolean
|
||||||
mc_fhl_is_special_socket (file_entry * fe)
|
mc_fhl_is_special_socket (file_entry_t * fe)
|
||||||
{
|
{
|
||||||
#if S_ISSOCK == 0
|
#if S_ISSOCK == 0
|
||||||
(void) fe;
|
(void) fe;
|
||||||
@ -125,7 +125,7 @@ mc_fhl_is_special_socket (file_entry * fe)
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline static gboolean
|
inline static gboolean
|
||||||
mc_fhl_is_special_fifo (file_entry * fe)
|
mc_fhl_is_special_fifo (file_entry_t * fe)
|
||||||
{
|
{
|
||||||
#if S_ISFIFO == 0
|
#if S_ISFIFO == 0
|
||||||
(void) fe;
|
(void) fe;
|
||||||
@ -134,7 +134,7 @@ mc_fhl_is_special_fifo (file_entry * fe)
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline static gboolean
|
inline static gboolean
|
||||||
mc_fhl_is_special_door (file_entry * fe)
|
mc_fhl_is_special_door (file_entry_t * fe)
|
||||||
{
|
{
|
||||||
#if S_ISDOOR == 0
|
#if S_ISDOOR == 0
|
||||||
(void) fe;
|
(void) fe;
|
||||||
@ -145,7 +145,7 @@ mc_fhl_is_special_door (file_entry * fe)
|
|||||||
|
|
||||||
|
|
||||||
inline static gboolean
|
inline static gboolean
|
||||||
mc_fhl_is_special (file_entry * fe)
|
mc_fhl_is_special (file_entry_t * fe)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
(mc_fhl_is_special_socket (fe) || mc_fhl_is_special_fifo (fe)
|
(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
|
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;
|
gboolean my_color = FALSE;
|
||||||
(void) fhl;
|
(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
|
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;
|
(void) fhl;
|
||||||
if (mc_filter->search_condition == NULL)
|
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
|
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;
|
guint i;
|
||||||
mc_fhl_filter_t *mc_filter;
|
mc_fhl_filter_t *mc_filter;
|
||||||
|
@ -69,7 +69,7 @@ typedef struct
|
|||||||
unsigned int stale_link:1; /* If this is a symlink and points to Charon's land */
|
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 */
|
unsigned int dir_size_computed:1; /* Size of directory was computed with dirsizes_cmd */
|
||||||
} f;
|
} f;
|
||||||
} file_entry;
|
} file_entry_t;
|
||||||
|
|
||||||
/*** global variables defined in .c file *********************************************************/
|
/*** global variables defined in .c file *********************************************************/
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ compare_dir (WPanel * panel, WPanel * other, enum CompareMode mode)
|
|||||||
/* Handle all files in the panel */
|
/* Handle all files in the panel */
|
||||||
for (i = 0; i < panel->dir.len; i++)
|
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 */
|
/* Default: unmarked */
|
||||||
file_mark (panel, i, 0);
|
file_mark (panel, i, 0);
|
||||||
@ -379,7 +379,7 @@ compare_dir (WPanel * panel, WPanel * other, enum CompareMode mode)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Found */
|
/* Found */
|
||||||
file_entry *target = &other->dir.list[j];
|
file_entry_t *target = &other->dir.list[j];
|
||||||
|
|
||||||
if (mode != compare_size_only)
|
if (mode != compare_size_only)
|
||||||
{
|
{
|
||||||
@ -1056,7 +1056,7 @@ void
|
|||||||
select_invert_cmd (void)
|
select_invert_cmd (void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
file_entry *file;
|
file_entry_t *file;
|
||||||
|
|
||||||
for (i = 0; i < current_panel->dir.len; i++)
|
for (i = 0; i < current_panel->dir.len; i++)
|
||||||
{
|
{
|
||||||
@ -1604,7 +1604,7 @@ void
|
|||||||
smart_dirsize_cmd (void)
|
smart_dirsize_cmd (void)
|
||||||
{
|
{
|
||||||
WPanel *panel = current_panel;
|
WPanel *panel = current_panel;
|
||||||
file_entry *entry;
|
file_entry_t *entry;
|
||||||
|
|
||||||
entry = &(panel->dir.list[panel->selected]);
|
entry = &(panel->dir.list[panel->selected]);
|
||||||
if ((S_ISDIR (entry->st.st_mode) && DIR_IS_DOTDOT (entry->fname)) || panel->dirs_marked)
|
if ((S_ISDIR (entry->st.st_mode) && DIR_IS_DOTDOT (entry->fname)) || panel->dirs_marked)
|
||||||
@ -1619,7 +1619,7 @@ void
|
|||||||
single_dirsize_cmd (void)
|
single_dirsize_cmd (void)
|
||||||
{
|
{
|
||||||
WPanel *panel = current_panel;
|
WPanel *panel = current_panel;
|
||||||
file_entry *entry;
|
file_entry_t *entry;
|
||||||
|
|
||||||
entry = &(panel->dir.list[panel->selected]);
|
entry = &(panel->dir.list[panel->selected]);
|
||||||
if (S_ISDIR (entry->st.st_mode) && !DIR_IS_DOTDOT (entry->fname))
|
if (S_ISDIR (entry->st.st_mode) && !DIR_IS_DOTDOT (entry->fname))
|
||||||
|
@ -130,7 +130,7 @@ clean_sort_keys (dir_list * list, int start, int count)
|
|||||||
|
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
file_entry *fentry;
|
file_entry_t *fentry;
|
||||||
|
|
||||||
fentry = &list->list[i + start];
|
fentry = &list->list[i + start];
|
||||||
str_release_key (fentry->sort_key, case_sensitive);
|
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++)
|
for (i = 0; i < dir_copy.len; i++)
|
||||||
{
|
{
|
||||||
file_entry *fentry;
|
file_entry_t *fentry;
|
||||||
|
|
||||||
fentry = &(dir_copy.list)[i];
|
fentry = &(dir_copy.list)[i];
|
||||||
g_free (fentry->fname);
|
g_free (fentry->fname);
|
||||||
@ -239,7 +239,7 @@ alloc_dir_copy (int size)
|
|||||||
g_free (dir_copy.list);
|
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.size = size;
|
||||||
dir_copy.len = 0;
|
dir_copy.len = 0;
|
||||||
}
|
}
|
||||||
@ -278,9 +278,9 @@ dir_list_grow (dir_list * list, int delta)
|
|||||||
|
|
||||||
if (size != list->size)
|
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)
|
if (fe == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@ -310,7 +310,7 @@ gboolean
|
|||||||
dir_list_append (dir_list * list, const char *fname, const struct stat * st,
|
dir_list_append (dir_list * list, const char *fname, const struct stat * st,
|
||||||
gboolean link_to_dir, gboolean stale_link)
|
gboolean link_to_dir, gboolean stale_link)
|
||||||
{
|
{
|
||||||
file_entry *fentry;
|
file_entry_t *fentry;
|
||||||
|
|
||||||
/* Need to grow the *list? */
|
/* Need to grow the *list? */
|
||||||
if (list->len == list->size && !dir_list_grow (list, DIR_LIST_RESIZE_STEP))
|
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
|
int
|
||||||
unsorted (file_entry * a, file_entry * b)
|
unsorted (file_entry_t * a, file_entry_t * b)
|
||||||
{
|
{
|
||||||
(void) a;
|
(void) a;
|
||||||
(void) b;
|
(void) b;
|
||||||
@ -345,7 +345,7 @@ unsorted (file_entry * a, file_entry * b)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int
|
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 ad = MY_ISDIR (a);
|
||||||
int bd = MY_ISDIR (b);
|
int bd = MY_ISDIR (b);
|
||||||
@ -366,7 +366,7 @@ sort_name (file_entry * a, file_entry * b)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int
|
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 ad = MY_ISDIR (a);
|
||||||
int bd = MY_ISDIR (b);
|
int bd = MY_ISDIR (b);
|
||||||
@ -384,7 +384,7 @@ sort_vers (file_entry * a, file_entry * b)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int
|
int
|
||||||
sort_ext (file_entry * a, file_entry * b)
|
sort_ext (file_entry_t * a, file_entry_t * b)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
int ad = MY_ISDIR (a);
|
int ad = MY_ISDIR (a);
|
||||||
@ -410,7 +410,7 @@ sort_ext (file_entry * a, file_entry * b)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int
|
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 ad = MY_ISDIR (a);
|
||||||
int bd = MY_ISDIR (b);
|
int bd = MY_ISDIR (b);
|
||||||
@ -430,7 +430,7 @@ sort_time (file_entry * a, file_entry * b)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int
|
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 ad = MY_ISDIR (a);
|
||||||
int bd = MY_ISDIR (b);
|
int bd = MY_ISDIR (b);
|
||||||
@ -450,7 +450,7 @@ sort_ctime (file_entry * a, file_entry * b)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int
|
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 ad = MY_ISDIR (a);
|
||||||
int bd = MY_ISDIR (b);
|
int bd = MY_ISDIR (b);
|
||||||
@ -470,7 +470,7 @@ sort_atime (file_entry * a, file_entry * b)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int
|
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 ad = MY_ISDIR (a);
|
||||||
int bd = MY_ISDIR (b);
|
int bd = MY_ISDIR (b);
|
||||||
@ -484,7 +484,7 @@ sort_inode (file_entry * a, file_entry * b)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
int
|
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 ad = MY_ISDIR (a);
|
||||||
int bd = MY_ISDIR (b);
|
int bd = MY_ISDIR (b);
|
||||||
@ -505,7 +505,7 @@ sort_size (file_entry * a, file_entry * b)
|
|||||||
void
|
void
|
||||||
dir_list_sort (dir_list * list, GCompareFunc sort, const dir_sort_options_t * sort_op)
|
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;
|
int dot_dot_found = 0;
|
||||||
|
|
||||||
if (list->len < 2)
|
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;
|
reverse = sort_op->reverse ? -1 : 1;
|
||||||
case_sensitive = sort_op->case_sensitive ? 1 : 0;
|
case_sensitive = sort_op->case_sensitive ? 1 : 0;
|
||||||
exec_first = sort_op->exec_first;
|
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);
|
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++)
|
for (i = 0; i < list->len; i++)
|
||||||
{
|
{
|
||||||
file_entry *fentry;
|
file_entry_t *fentry;
|
||||||
|
|
||||||
fentry = &list->list[i];
|
fentry = &list->list[i];
|
||||||
g_free (fentry->fname);
|
g_free (fentry->fname);
|
||||||
@ -552,7 +552,7 @@ dir_list_clean (dir_list * list)
|
|||||||
gboolean
|
gboolean
|
||||||
dir_list_init (dir_list * list)
|
dir_list_init (dir_list * list)
|
||||||
{
|
{
|
||||||
file_entry *fentry;
|
file_entry_t *fentry;
|
||||||
|
|
||||||
/* Need to grow the *list? */
|
/* Need to grow the *list? */
|
||||||
if (list->size == 0 && !dir_list_grow (list, DIR_LIST_RESIZE_STEP))
|
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];
|
fentry = &list->list[0];
|
||||||
memset (fentry, 0, sizeof (file_entry));
|
memset (fentry, 0, sizeof (file_entry_t));
|
||||||
fentry->fnamelen = 2;
|
fentry->fnamelen = 2;
|
||||||
fentry->fname = g_strndup ("..", fentry->fnamelen);
|
fentry->fname = g_strndup ("..", fentry->fnamelen);
|
||||||
fentry->f.link_to_dir = 0;
|
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;
|
struct dirent *dp;
|
||||||
int link_to_dir, stale_link;
|
int link_to_dir, stale_link;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
file_entry *fentry;
|
file_entry_t *fentry;
|
||||||
|
|
||||||
/* ".." (if any) must be the first entry in the list */
|
/* ".." (if any) must be the first entry in the list */
|
||||||
if (!dir_list_init (list))
|
if (!dir_list_init (list))
|
||||||
@ -680,7 +680,7 @@ dir_list_load (dir_list * list, const vfs_path_t * vpath, GCompareFunc sort,
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
gboolean
|
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;
|
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);
|
alloc_dir_copy (list->len);
|
||||||
for (marked_cnt = i = 0; i < list->len; i++)
|
for (marked_cnt = i = 0; i < list->len; i++)
|
||||||
{
|
{
|
||||||
file_entry *fentry, *dfentry;
|
file_entry_t *fentry, *dfentry;
|
||||||
|
|
||||||
fentry = &list->list[i];
|
fentry = &list->list[i];
|
||||||
dfentry = &dir_copy.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))
|
if (dir_get_dotdot_stat (vpath, &st))
|
||||||
{
|
{
|
||||||
file_entry *fentry;
|
file_entry_t *fentry;
|
||||||
|
|
||||||
fentry = &list->list[0];
|
fentry = &list->list[0];
|
||||||
fentry->st = st;
|
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)
|
while ((dp = mc_readdir (dirp)) != NULL)
|
||||||
{
|
{
|
||||||
file_entry *fentry;
|
file_entry_t *fentry;
|
||||||
if (!handle_dirent (dp, fltr, &st, &link_to_dir, &stale_link))
|
if (!handle_dirent (dp, fltr, &st, &link_to_dir, &stale_link))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
*/
|
*/
|
||||||
typedef struct
|
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 size; /**< number of allocated elements in list (capacity) */
|
||||||
int len; /**< number of used elements in list */
|
int len; /**< number of used elements in list */
|
||||||
} dir_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);
|
gboolean handle_path (const char *path, struct stat *buf1, int *link_to_dir, int *stale_link);
|
||||||
|
|
||||||
/* Sorting functions */
|
/* Sorting functions */
|
||||||
int unsorted (file_entry * a, file_entry * b);
|
int unsorted (file_entry_t * a, file_entry_t * b);
|
||||||
int sort_name (file_entry * a, file_entry * b);
|
int sort_name (file_entry_t * a, file_entry_t * b);
|
||||||
int sort_vers (file_entry * a, file_entry * b);
|
int sort_vers (file_entry_t * a, file_entry_t * b);
|
||||||
int sort_ext (file_entry * a, file_entry * b);
|
int sort_ext (file_entry_t * a, file_entry_t * b);
|
||||||
int sort_time (file_entry * a, file_entry * b);
|
int sort_time (file_entry_t * a, file_entry_t * b);
|
||||||
int sort_atime (file_entry * a, file_entry * b);
|
int sort_atime (file_entry_t * a, file_entry_t * b);
|
||||||
int sort_ctime (file_entry * a, file_entry * b);
|
int sort_ctime (file_entry_t * a, file_entry_t * b);
|
||||||
int sort_size (file_entry * a, file_entry * b);
|
int sort_size (file_entry_t * a, file_entry_t * b);
|
||||||
int sort_inode (file_entry * a, file_entry * 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 ****************************************************************************/
|
/*** inline functions ****************************************************************************/
|
||||||
|
|
||||||
static inline gboolean
|
static inline gboolean
|
||||||
link_isdir (const file_entry * file)
|
link_isdir (const file_entry_t * file)
|
||||||
{
|
{
|
||||||
return (gboolean) file->f.link_to_dir;
|
return (gboolean) file->f.link_to_dir;
|
||||||
}
|
}
|
||||||
|
@ -89,24 +89,24 @@ hook_t *select_file_hook = NULL;
|
|||||||
panelized_panel_t panelized_panel = { {NULL, 0, -1}, NULL };
|
panelized_panel_t panelized_panel = { {NULL, 0, -1}, NULL };
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
static const char *string_file_name (file_entry *, int);
|
static const char *string_file_name (file_entry_t *, int);
|
||||||
static const char *string_file_size (file_entry *, int);
|
static const char *string_file_size (file_entry_t *, int);
|
||||||
static const char *string_file_size_brief (file_entry *, int);
|
static const char *string_file_size_brief (file_entry_t *, int);
|
||||||
static const char *string_file_type (file_entry *, int);
|
static const char *string_file_type (file_entry_t *, int);
|
||||||
static const char *string_file_mtime (file_entry *, int);
|
static const char *string_file_mtime (file_entry_t *, int);
|
||||||
static const char *string_file_atime (file_entry *, int);
|
static const char *string_file_atime (file_entry_t *, int);
|
||||||
static const char *string_file_ctime (file_entry *, int);
|
static const char *string_file_ctime (file_entry_t *, int);
|
||||||
static const char *string_file_permission (file_entry *, int);
|
static const char *string_file_permission (file_entry_t *, int);
|
||||||
static const char *string_file_perm_octal (file_entry *, int);
|
static const char *string_file_perm_octal (file_entry_t *, int);
|
||||||
static const char *string_file_nlinks (file_entry *, int);
|
static const char *string_file_nlinks (file_entry_t *, int);
|
||||||
static const char *string_inode (file_entry *, int);
|
static const char *string_inode (file_entry_t *, int);
|
||||||
static const char *string_file_nuid (file_entry *, int);
|
static const char *string_file_nuid (file_entry_t *, int);
|
||||||
static const char *string_file_ngid (file_entry *, int);
|
static const char *string_file_ngid (file_entry_t *, int);
|
||||||
static const char *string_file_owner (file_entry *, int);
|
static const char *string_file_owner (file_entry_t *, int);
|
||||||
static const char *string_file_group (file_entry *, int);
|
static const char *string_file_group (file_entry_t *, int);
|
||||||
static const char *string_marked (file_entry *, int);
|
static const char *string_marked (file_entry_t *, int);
|
||||||
static const char *string_space (file_entry *, int);
|
static const char *string_space (file_entry_t *, int);
|
||||||
static const char *string_dot (file_entry *, int);
|
static const char *string_dot (file_entry_t *, int);
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
panel_field_t panel_fields[] = {
|
panel_field_t panel_fields[] = {
|
||||||
@ -345,7 +345,7 @@ typedef struct format_e
|
|||||||
int field_len;
|
int field_len;
|
||||||
align_crt_t just_mode;
|
align_crt_t just_mode;
|
||||||
int expand;
|
int expand;
|
||||||
const char *(*string_fn) (file_entry *, int len);
|
const char *(*string_fn) (file_entry_t *, int len);
|
||||||
char *title;
|
char *title;
|
||||||
const char *id;
|
const char *id;
|
||||||
} format_e;
|
} format_e;
|
||||||
@ -406,7 +406,7 @@ delete_format (format_e * format)
|
|||||||
/** This code relies on the default justification!!! */
|
/** This code relies on the default justification!!! */
|
||||||
|
|
||||||
static void
|
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 is_octal)
|
||||||
{
|
{
|
||||||
int i, r, l;
|
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 */
|
/** String representations of various file attributes name */
|
||||||
|
|
||||||
static const char *
|
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];
|
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 */
|
/** size */
|
||||||
|
|
||||||
static const char *
|
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];
|
static char buffer[BUF_TINY];
|
||||||
|
|
||||||
@ -519,7 +519,7 @@ string_file_size (file_entry * fe, int len)
|
|||||||
/** bsize */
|
/** bsize */
|
||||||
|
|
||||||
static const char *
|
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)
|
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 */
|
/** This functions return a string representation of a file entry type */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
string_file_type (file_entry * fe, int len)
|
string_file_type (file_entry_t * fe, int len)
|
||||||
{
|
{
|
||||||
static char buffer[2];
|
static char buffer[2];
|
||||||
|
|
||||||
@ -580,7 +580,7 @@ string_file_type (file_entry * fe, int len)
|
|||||||
/** mtime */
|
/** mtime */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
string_file_mtime (file_entry * fe, int len)
|
string_file_mtime (file_entry_t * fe, int len)
|
||||||
{
|
{
|
||||||
(void) len;
|
(void) len;
|
||||||
return file_date (fe->st.st_mtime);
|
return file_date (fe->st.st_mtime);
|
||||||
@ -590,7 +590,7 @@ string_file_mtime (file_entry * fe, int len)
|
|||||||
/** atime */
|
/** atime */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
string_file_atime (file_entry * fe, int len)
|
string_file_atime (file_entry_t * fe, int len)
|
||||||
{
|
{
|
||||||
(void) len;
|
(void) len;
|
||||||
return file_date (fe->st.st_atime);
|
return file_date (fe->st.st_atime);
|
||||||
@ -600,7 +600,7 @@ string_file_atime (file_entry * fe, int len)
|
|||||||
/** ctime */
|
/** ctime */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
string_file_ctime (file_entry * fe, int len)
|
string_file_ctime (file_entry_t * fe, int len)
|
||||||
{
|
{
|
||||||
(void) len;
|
(void) len;
|
||||||
return file_date (fe->st.st_ctime);
|
return file_date (fe->st.st_ctime);
|
||||||
@ -610,7 +610,7 @@ string_file_ctime (file_entry * fe, int len)
|
|||||||
/** perm */
|
/** perm */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
string_file_permission (file_entry * fe, int len)
|
string_file_permission (file_entry_t * fe, int len)
|
||||||
{
|
{
|
||||||
(void) len;
|
(void) len;
|
||||||
return string_perm (fe->st.st_mode);
|
return string_perm (fe->st.st_mode);
|
||||||
@ -620,7 +620,7 @@ string_file_permission (file_entry * fe, int len)
|
|||||||
/** mode */
|
/** mode */
|
||||||
|
|
||||||
static const char *
|
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];
|
static char buffer[10];
|
||||||
|
|
||||||
@ -633,7 +633,7 @@ string_file_perm_octal (file_entry * fe, int len)
|
|||||||
/** nlink */
|
/** nlink */
|
||||||
|
|
||||||
static const char *
|
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];
|
static char buffer[BUF_TINY];
|
||||||
|
|
||||||
@ -646,7 +646,7 @@ string_file_nlinks (file_entry * fe, int len)
|
|||||||
/** inode */
|
/** inode */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
string_inode (file_entry * fe, int len)
|
string_inode (file_entry_t * fe, int len)
|
||||||
{
|
{
|
||||||
static char buffer[10];
|
static char buffer[10];
|
||||||
|
|
||||||
@ -659,7 +659,7 @@ string_inode (file_entry * fe, int len)
|
|||||||
/** nuid */
|
/** nuid */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
string_file_nuid (file_entry * fe, int len)
|
string_file_nuid (file_entry_t * fe, int len)
|
||||||
{
|
{
|
||||||
static char buffer[10];
|
static char buffer[10];
|
||||||
|
|
||||||
@ -672,7 +672,7 @@ string_file_nuid (file_entry * fe, int len)
|
|||||||
/** ngid */
|
/** ngid */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
string_file_ngid (file_entry * fe, int len)
|
string_file_ngid (file_entry_t * fe, int len)
|
||||||
{
|
{
|
||||||
static char buffer[10];
|
static char buffer[10];
|
||||||
|
|
||||||
@ -685,7 +685,7 @@ string_file_ngid (file_entry * fe, int len)
|
|||||||
/** owner */
|
/** owner */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
string_file_owner (file_entry * fe, int len)
|
string_file_owner (file_entry_t * fe, int len)
|
||||||
{
|
{
|
||||||
(void) len;
|
(void) len;
|
||||||
return get_owner (fe->st.st_uid);
|
return get_owner (fe->st.st_uid);
|
||||||
@ -695,7 +695,7 @@ string_file_owner (file_entry * fe, int len)
|
|||||||
/** group */
|
/** group */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
string_file_group (file_entry * fe, int len)
|
string_file_group (file_entry_t * fe, int len)
|
||||||
{
|
{
|
||||||
(void) len;
|
(void) len;
|
||||||
return get_group (fe->st.st_gid);
|
return get_group (fe->st.st_gid);
|
||||||
@ -705,7 +705,7 @@ string_file_group (file_entry * fe, int len)
|
|||||||
/** mark */
|
/** mark */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
string_marked (file_entry * fe, int len)
|
string_marked (file_entry_t * fe, int len)
|
||||||
{
|
{
|
||||||
(void) len;
|
(void) len;
|
||||||
return fe->f.marked ? "*" : " ";
|
return fe->f.marked ? "*" : " ";
|
||||||
@ -715,7 +715,7 @@ string_marked (file_entry * fe, int len)
|
|||||||
/** space */
|
/** space */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
string_space (file_entry * fe, int len)
|
string_space (file_entry_t * fe, int len)
|
||||||
{
|
{
|
||||||
(void) fe;
|
(void) fe;
|
||||||
(void) len;
|
(void) len;
|
||||||
@ -726,7 +726,7 @@ string_space (file_entry * fe, int len)
|
|||||||
/** dot */
|
/** dot */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
string_dot (file_entry * fe, int len)
|
string_dot (file_entry_t * fe, int len)
|
||||||
{
|
{
|
||||||
(void) fe;
|
(void) fe;
|
||||||
(void) len;
|
(void) len;
|
||||||
@ -736,7 +736,7 @@ string_dot (file_entry * fe, int len)
|
|||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
file_compute_color (int attr, file_entry * fe)
|
file_compute_color (int attr, file_entry_t * fe)
|
||||||
{
|
{
|
||||||
switch (attr)
|
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;
|
int color, length, empty_line;
|
||||||
const char *txt;
|
const char *txt;
|
||||||
format_e *format, *home;
|
format_e *format, *home;
|
||||||
file_entry *fe;
|
file_entry_t *fe;
|
||||||
filename_scroll_flag_t res = FILENAME_NOSCROLL;
|
filename_scroll_flag_t res = FILENAME_NOSCROLL;
|
||||||
|
|
||||||
(void) dest;
|
(void) dest;
|
||||||
@ -2554,7 +2554,7 @@ stop_search (WPanel * panel)
|
|||||||
/** Return 1 if the Enter key has been processed, 0 otherwise */
|
/** Return 1 if the Enter key has been processed, 0 otherwise */
|
||||||
|
|
||||||
static int
|
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;
|
vfs_path_t *full_name_vpath;
|
||||||
gboolean ok;
|
gboolean ok;
|
||||||
@ -2631,7 +2631,7 @@ do_enter_on_file_entry (file_entry * fe)
|
|||||||
static int
|
static int
|
||||||
do_enter (WPanel * panel)
|
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
|
static void
|
||||||
chdir_other_panel (WPanel * panel)
|
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;
|
vfs_path_t *new_dir_vpath;
|
||||||
char *sel_entry = NULL;
|
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 */
|
/* Reload current panel */
|
||||||
panel_clean_dir (panel);
|
panel_clean_dir (panel);
|
||||||
|
|
||||||
dir_list_load (&panel->dir, panel->cwd_vpath, panel->sort_field->sort_routine, &panel->sort_info,
|
dir_list_load (&panel->dir, panel->cwd_vpath, panel->sort_field->sort_routine,
|
||||||
panel->filter);
|
&panel->sort_info, panel->filter);
|
||||||
try_to_select (panel, get_parent_dir_name (panel->cwd_vpath, olddir_vpath));
|
try_to_select (panel, get_parent_dir_name (panel->cwd_vpath, olddir_vpath));
|
||||||
|
|
||||||
load_hint (0);
|
load_hint (0);
|
||||||
@ -3653,7 +3653,8 @@ panel_event (Gpm_Event * event, void *data)
|
|||||||
{
|
{
|
||||||
if (is_active)
|
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);
|
next_page (panel);
|
||||||
else /* We are in last page */
|
else /* We are in last page */
|
||||||
move_down (panel);
|
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 */
|
/* directories history will be get later */
|
||||||
|
|
||||||
panel->dir.size = DIR_LIST_MIN_SIZE;
|
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->dir.len = 0;
|
||||||
panel->active = 0;
|
panel->active = 0;
|
||||||
panel->filter = 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 */
|
/* Load the default format */
|
||||||
dir_list_load (&panel->dir, panel->cwd_vpath, panel->sort_field->sort_routine, &panel->sort_info,
|
dir_list_load (&panel->dir, panel->cwd_vpath, panel->sort_field->sort_routine,
|
||||||
panel->filter);
|
&panel->sort_info, panel->filter);
|
||||||
|
|
||||||
/* Restore old right path */
|
/* Restore old right path */
|
||||||
if (curdir != NULL)
|
if (curdir != NULL)
|
||||||
|
@ -69,7 +69,7 @@ typedef struct panel_field_struct
|
|||||||
const char *title_hotkey;
|
const char *title_hotkey;
|
||||||
gboolean is_user_choice;
|
gboolean is_user_choice;
|
||||||
gboolean use_in_user_format;
|
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() */
|
GCompareFunc sort_routine; /* used by mouse_sort_col() */
|
||||||
} panel_field_t;
|
} panel_field_t;
|
||||||
|
|
||||||
|
@ -1494,7 +1494,7 @@ resolve_symlink_without_ls_options (struct vfs_class *me, struct vfs_s_super *su
|
|||||||
for (depth = 0; depth < 100; depth++)
|
for (depth = 0; depth < 100; depth++)
|
||||||
{ /* depth protects against recursive symbolic links */
|
{ /* depth protects against recursive symbolic links */
|
||||||
canonicalize_pathname (tmp);
|
canonicalize_pathname (tmp);
|
||||||
fe = _get_file_entry (bucket, tmp, 0, 0);
|
fe = _get_file_entry_t (bucket, tmp, 0, 0);
|
||||||
if (fe)
|
if (fe)
|
||||||
{
|
{
|
||||||
if (S_ISLNK (fe->s.st_mode) && fe->l_stat == 0)
|
if (S_ISLNK (fe->s.st_mode) && fe->l_stat == 0)
|
||||||
|
@ -312,7 +312,7 @@ mcview_load_next_prev_init (mcview_t * view)
|
|||||||
/* search current file in the list */
|
/* search current file in the list */
|
||||||
for (i = 0; i != view->dir->len; i++)
|
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)
|
if (fname_len == fe->fnamelen && strncmp (fname, fe->fname, fname_len) == 0)
|
||||||
break;
|
break;
|
||||||
|
@ -52,7 +52,7 @@ setup (void)
|
|||||||
current_panel = g_new0 (struct WPanel, 1);
|
current_panel = g_new0 (struct WPanel, 1);
|
||||||
current_panel->cwd_vpath = vfs_path_from_str ("/home");
|
current_panel->cwd_vpath = vfs_path_from_str ("/home");
|
||||||
current_panel->dir.size = DIR_LIST_MIN_SIZE;
|
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;
|
current_panel->dir.len = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user