From 2153b3c5cda23bcdd6b76e43103a8984c41cba0d Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT service" Date: Tue, 29 Dec 2009 06:00:18 +0100 Subject: [PATCH] VFS: added non-vfs version of vfs_get_encoding() --- vfs/vfs.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/vfs/vfs.h b/vfs/vfs.h index a49a8477f..a33679608 100644 --- a/vfs/vfs.h +++ b/vfs/vfs.h @@ -24,6 +24,10 @@ int mc_utime (const char *path, struct utimbuf *times); int mc_readlink (const char *path, char *buf, int bufsiz); int mc_ungetlocalcopy (const char *pathname, const char *local, int has_changed); +/* return encoding after last #enc: or NULL, if part does not contain #enc: + * return static buffer */ +const char *vfs_get_encoding (const char *path); + #else /* USE_VFS */ #define vfs_init() do { } while (0) @@ -36,6 +40,12 @@ int mc_ungetlocalcopy (const char *pathname, const char *local, int has_changed) #define mc_readlink readlink #define mc_ungetlocalcopy(x,y,z) do { } while (0) +static inline const char *vfs_get_encoding (const char *path) +{ + (void) path; + return NULL; +} + #endif /* USE_VFS */ char *vfs_strip_suffix_from_filename (const char *filename); @@ -48,9 +58,6 @@ char *vfs_get_current_dir (void); char *vfs_translate_path (const char *path); /* return new string */ char *vfs_translate_path_n (const char *path); -/* return encoding after last #enc: or NULL, if part does not contain #enc: - * return static buffer */ -const char *vfs_get_encoding (const char *path); /* canonize and translate path, return new string */ char *vfs_canon_and_translate (const char *path);