summaryrefslogtreecommitdiffstats
path: root/src/dir.h
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-05-01 18:01:46 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2008-05-01 18:01:46 +0200
commit7dfe3287092af860d5f3db74e9b8d37a75f5b71c (patch)
treeda8847033e89366746304d645df32b99f89b6621 /src/dir.h
parent9d87952b714a304502e39edc5a7ce12e5ef01abd (diff)
When listing local directories, directories first, files next, both sorted by name (. and .. always first)
Allow navigation using numerical keys Fix for DOS version
Diffstat (limited to 'src/dir.h')
-rw-r--r--src/dir.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dir.h b/src/dir.h
index 9627a5b..08d77be 100644
--- a/src/dir.h
+++ b/src/dir.h
@@ -24,6 +24,7 @@
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
+#include "list.h"
#define DIR_NAME_LEN 1024
#define FLAG_LIST_DELETED 1
#define FLAG_LIST_MASK12 2
@@ -50,6 +51,7 @@ struct dir_data
#define FILE_STATUS_DELETED 1
+/* TODO: add status to file_info and migrate file_data to file_info */
struct file_data
{
file_data_t *prev;
@@ -59,6 +61,12 @@ struct file_data
unsigned int status;
};
+struct file_info {
+ struct td_list_head list;
+ char name[4096];
+ struct stat stat;
+};
+
int dir_aff_log(const disk_t *disk_car, const partition_t *partition, const dir_data_t *dir_data, const file_data_t*dir_list);
void delete_list_file(file_data_t *file_list);
int dir_partition_aff(disk_t *disk_car, const partition_t *partition, dir_data_t *dir_data, const unsigned long int inode, char **current_cmd);
@@ -109,4 +117,5 @@ int set_date(const char *pathname, time_t actime, time_t modtime);
#define LINUX_S_ISFIFO(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFIFO)
#define LINUX_S_ISSOCK(m) (((m) & LINUX_S_IFMT) == LINUX_S_IFSOCK)
+int filesort(const struct td_list_head *a, const struct td_list_head *b);
#endif