5 #define RESIZE_STEPS 128
17 unsigned int marked
:1; /* File marked in pane window */
18 unsigned int exists
:1; /* Use for rereading file */
19 unsigned int link_to_dir
:1; /* If this is a link, does it point to directory? */
20 unsigned int stalled_link
:1; /* If this is a symlink and points to Charon's land */
30 typedef int sortfn (const void *, const void *);
31 int do_load_dir (dir_list
*list
, sortfn
*sort
, int reverse
, int case_sensitive
, char *filter
);
32 void do_sort (dir_list
*list
, sortfn
*sort
, int top
, int reverse
, int case_sensitive
);
33 dir_list
*do_collect_stat (dir_list
*dir
, int top
);
34 int do_reload_dir (dir_list
*list
, sortfn
*sort
, int count
, int reverse
, int case_sensitive
, char *filter
);
35 void clean_dir (dir_list
*list
, int count
);
36 int set_zero_dir (dir_list
*list
);
38 #ifdef DIR_H_INCLUDE_HANDLE_DIRENT
39 int handle_dirent (dir_list
*list
, char *filter
, struct dirent
*dp
,
40 struct stat
*buf1
, int next_free
, int *link_to_dir
, int *stalled_link
);
41 int handle_path (dir_list
*list
, char *path
, struct stat
*buf1
, int next_free
,
42 int *link_to_dir
, int *stalled_link
);
45 /* Sorting functions */
46 int unsorted (const file_entry
*a
, const file_entry
*b
);
47 int sort_name (const file_entry
*a
, const file_entry
*b
);
48 int sort_ext (const file_entry
*a
, const file_entry
*b
);
49 int sort_time (const file_entry
*a
, const file_entry
*b
);
50 int sort_atime (const file_entry
*a
, const file_entry
*b
);
51 int sort_ctime (const file_entry
*a
, const file_entry
*b
);
52 int sort_size (const file_entry
*a
, const file_entry
*b
);
53 int sort_inode (const file_entry
*a
, const file_entry
*b
);
54 int sort_type (const file_entry
*a
, const file_entry
*b
);
55 int sort_links (const file_entry
*a
, const file_entry
*b
);
56 int sort_nuid (const file_entry
*a
, const file_entry
*b
);
57 int sort_ngid (const file_entry
*a
, const file_entry
*b
);
58 int sort_owner (const file_entry
*a
, const file_entry
*b
);
59 int sort_group (const file_entry
*a
, const file_entry
*b
);
61 /* SORT_TYPES is used to build the nice dialog box entries */
64 /* This is the number of sort types not available in that dialog box */
65 #define SORT_TYPES_EXTRA 6
67 /* The total, used by Tk version */
68 #define SORT_TYPES_TOTAL (SORT_TYPES + SORT_TYPES_EXTRA)
72 int (*sort_fn
)(const file_entry
*, const file_entry
*);
75 extern sort_orders_t sort_orders
[SORT_TYPES_TOTAL
];
77 int link_isdir (file_entry
*);
78 int if_link_is_exe (file_entry
*file
);
80 extern int show_backups
;
81 extern int show_dot_files
;
82 extern int show_backups
;
83 extern int mix_all_files
;
85 char *sort_type_to_name (sortfn
*);
86 sortfn
*sort_name_to_type (char *type
);