From acd63d7374e3c700e88cdecb118f080b42dbde7c Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Tue, 17 Aug 2004 09:17:43 +0000 Subject: [PATCH] Moved the declaration of the init_*fs functions into specialized headers (*fs.h or vfs-impl.h). --- vfs/ftpfs.h | 1 + vfs/local.h | 7 ++++++- vfs/mcfs.h | 1 + vfs/smbfs.h | 9 ++++----- vfs/vfs-impl.h | 7 +++++++ vfs/vfs.c | 4 ++++ vfs/vfs.h | 11 ----------- 7 files changed, 23 insertions(+), 17 deletions(-) diff --git a/vfs/ftpfs.h b/vfs/ftpfs.h index 22454f92b..714994e2f 100644 --- a/vfs/ftpfs.h +++ b/vfs/ftpfs.h @@ -14,6 +14,7 @@ extern int ftpfs_use_unix_list_options; extern int ftpfs_first_cd_then_ls; void ftpfs_init_passwd (void); +void init_ftpfs (void); #define OPT_FLUSH 1 #define OPT_IGNORE_ERROR 2 diff --git a/vfs/local.h b/vfs/local.h index 77980f7d2..a2a47a27d 100644 --- a/vfs/local.h +++ b/vfs/local.h @@ -3,13 +3,18 @@ #include "vfs-impl.h" +extern void init_localfs (void); + +/* these functions are used by other filesystems, so they are + * published here. */ extern int local_close (void *data); extern int local_read (void *data, char *buffer, int count); extern int local_fstat (void *data, struct stat *buf); extern int local_errno (struct vfs_class *me); extern int local_lseek (void *data, off_t offset, int whence); #ifdef HAVE_MMAP -extern caddr_t local_mmap (struct vfs_class *me, caddr_t addr, size_t len, int prot, int flags, void *data, off_t offset); +extern caddr_t local_mmap (struct vfs_class *me, caddr_t addr, size_t len, + int prot, int flags, void *data, off_t offset); extern int local_munmap (struct vfs_class *me, caddr_t addr, size_t len, void *data); #endif diff --git a/vfs/mcfs.h b/vfs/mcfs.h index f90bd7b00..917da4b85 100644 --- a/vfs/mcfs.h +++ b/vfs/mcfs.h @@ -50,6 +50,7 @@ enum { MC_PASS }; +extern void init_mcfs (void); extern void tcp_invalidate_socket (int); #endif /* __MCFS_H */ diff --git a/vfs/smbfs.h b/vfs/smbfs.h index 885cef660..5a69f09e7 100644 --- a/vfs/smbfs.h +++ b/vfs/smbfs.h @@ -1,9 +1,8 @@ -/* smbfs.h */ - -#if !defined(__SMBFS_H) -#define __SMBFS_H +#ifndef MC_VFS_SMBFS_H +#define MC_VFS_SMBFS_H +void init_smbfs (void); extern void smbfs_set_debug (int arg); extern void smbfs_set_debugf (const char *filename); -#endif /* __SMBFS_H*/ +#endif /* MC_VFS_SMBFS_H */ diff --git a/vfs/vfs-impl.h b/vfs/vfs-impl.h index 2fc3892a3..26b98808a 100644 --- a/vfs/vfs-impl.h +++ b/vfs/vfs-impl.h @@ -120,4 +120,11 @@ char *vfs_translate_url (const char *); extern int use_netrc; #endif +void init_cpiofs (void); +void init_extfs (void); +void init_fish (void); +void init_sfs (void); +void init_tarfs (void); +void init_undelfs (void); + #endif diff --git a/vfs/vfs.c b/vfs/vfs.c index e372529ac..8a2f5c4c0 100644 --- a/vfs/vfs.c +++ b/vfs/vfs.c @@ -44,6 +44,10 @@ #ifdef USE_NETCODE # include "tcputil.h" #endif +#include "ftpfs.h" +#include "mcfs.h" +#include "smbfs.h" +#include "local.h" /* They keep track of the current directory */ static struct vfs_class *current_vfs; diff --git a/vfs/vfs.h b/vfs/vfs.h index cc28627a1..841b46308 100644 --- a/vfs/vfs.h +++ b/vfs/vfs.h @@ -5,17 +5,6 @@ #include #endif -void init_cpiofs (void); -void init_extfs (void); -void init_fish (void); -void init_ftpfs (void); -void init_localfs (void); -void init_mcfs (void); -void init_sfs (void); -void init_smbfs (void); -void init_tarfs (void); -void init_undelfs (void); - void vfs_init (void); void vfs_shut (void);