summaryrefslogtreecommitdiff
path: root/navit/file.h
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-10-04 23:02:37 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-10-04 23:02:37 +0000
commit20bea4c689534c59eabc46ae809051ed04aa0bac (patch)
tree10f95b833480bfa07e851699b80f2be67e30e6cb /navit/file.h
parent7c7d35da9659b3f81aed66e4f9a21c45bb2d99a4 (diff)
downloadnavit-svn-20bea4c689534c59eabc46ae809051ed04aa0bac.tar.gz
Add:Core:Added possibility for binfile logging with dp point reduction
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2627 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/file.h')
-rw-r--r--navit/file.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/navit/file.h b/navit/file.h
index a8003263..67944bc8 100644
--- a/navit/file.h
+++ b/navit/file.h
@@ -33,6 +33,7 @@ struct file {
struct file *next;
unsigned char *begin;
unsigned char *end;
+ unsigned char *mmap_end;
long long size;
int name_id;
int fd;
@@ -48,18 +49,25 @@ struct file {
char *name;
FILE *stdfile;
int special;
+ int cache;
+};
+
+enum file_flags {
+ file_flag_nocache=1,
};
/* prototypes */
+enum file_flags;
struct file;
struct file_wordexp;
struct param_list;
-struct file *file_create(char *name);
+struct file *file_create(char *name, enum file_flags flags);
int file_is_dir(char *name);
long long file_size(struct file *file);
int file_mkdir(char *name, int pflag);
int file_mmap(struct file *file);
unsigned char *file_data_read(struct file *file, long long offset, int size);
+unsigned char *file_data_read_special(struct file *file, int size, int *size_ret);
unsigned char *file_data_read_all(struct file *file);
int file_data_write(struct file *file, long long offset, int size, unsigned char *data);
int file_get_contents(char *name, unsigned char **buffer, int *size);
@@ -71,7 +79,7 @@ void file_unmap(struct file *f);
void *file_opendir(char *dir);
char *file_readdir(void *hnd);
void file_closedir(void *hnd);
-struct file *file_create_caseinsensitive(char *name);
+struct file *file_create_caseinsensitive(char *name, enum file_flags flags);
void file_destroy(struct file *f);
struct file_wordexp *file_wordexp_new(const char *pattern);
int file_wordexp_get_count(struct file_wordexp *wexp);