* extfs/trpm: Fix quoting issues.
[midnight-commander.git] / src / vfsdummy.h
blobc572f81deb31532c1107f3d07034c69b692826b4
1 /* Replacement for vfs.h if VFS support is disabled */
3 #ifndef __VFSDUMMY_H
4 #define __VFSDYMMY_H
6 /* Flags of VFS classes */
7 #define VFSF_LOCAL 1 /* Class is local (not virtual) filesystem */
8 #define VFSF_NOLINKS 2 /* Hard links not supported */
10 #define O_LINEAR 0
12 #define mc_close close
13 #define mc_read read
14 #define mc_write write
15 #define mc_lseek lseek
16 #define mc_opendir opendir
17 #define mc_readdir readdir
18 #define mc_closedir closedir
20 #define mc_stat stat
21 #define mc_mknod mknod
22 #define mc_link link
23 #define mc_mkdir mkdir
24 #define mc_rmdir rmdir
25 #define mc_fstat fstat
26 #define mc_lstat lstat
28 #define mc_readlink readlink
29 #define mc_symlink symlink
30 #define mc_rename rename
32 #define mc_open open
33 #define mc_utime utime
34 #define mc_chmod chmod
35 #define mc_chown chown
36 #define mc_chdir chdir
37 #define mc_unlink unlink
39 #define mc_mmap mmap
40 #define mc_munmap munmap
42 static inline int
43 return_zero (void)
45 return 0;
48 #define mc_ctl(a,b,c) return_zero()
49 #define mc_setctl(a,b,c) return_zero()
51 #define mc_get_current_wd(x,size) get_current_wd (x, size)
52 #define mc_getlocalcopy(x) NULL
53 #define mc_ungetlocalcopy(x,y,z) do { } while (0)
55 #define vfs_init() do { } while (0)
56 #define vfs_shut() do { } while (0)
58 #define vfs_current_is_local() 1
59 #define vfs_file_is_local(x) 1
60 #define vfs_strip_suffix_from_filename(x) g_strdup(x)
62 #define vfs_file_class_flags(x) (VFSF_LOCAL)
63 #define vfs_get_class(x) (struct vfs_class *)(NULL)
65 #define vfs_translate_url(s) g_strdup(s)
66 #define vfs_release_path(x)
67 #define vfs_add_current_stamps() do { } while (0)
68 #define vfs_timeout_handler() do { } while (0)
69 #define vfs_timeouts() 0
71 static inline char *
72 vfs_canon (const char *path)
74 char *p = g_strdup (path);
75 canonicalize_pathname(p);
76 return p;
79 #endif /* !__VFSDUMMY_H */