diff --git a/vfs/cpio.c b/vfs/cpio.c index 26f81a42d..14e7ed1eb 100644 --- a/vfs/cpio.c +++ b/vfs/cpio.c @@ -18,6 +18,12 @@ License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +/** \file + * \brief Source: Virtual File System: GNU Tar file system. + * \author Jan Hudec + * \date 2000 + */ + #include #include diff --git a/vfs/direntry.c b/vfs/direntry.c index c2fff869c..c93d9b90a 100644 --- a/vfs/direntry.c +++ b/vfs/direntry.c @@ -1,28 +1,33 @@ -/* Directory cache support -- so that you do not have copy of this in - * each and every filesystem. + +/** \file + * \brief Source: directory cache support * - * Written at 1998 by Pavel Machek , distribute under LGPL. + * So that you do not have copy of this in each and every filesystem. * - * Very loosely based on tar.c from midnight and archives.[ch] from - * avfs by Miklos Szeredi (mszeredi@inf.bme.hu) + * Very loosely based on tar.c from midnight and archives.[ch] from + * avfs by Miklos Szeredi (mszeredi@inf.bme.hu) * - * Unfortunately, I was unable to keep all filesystems - * uniform. tar-like filesystems use tree structure where each - * directory has pointers to its subdirectories. We can do this - * because we have full information about our archive. + * Unfortunately, I was unable to keep all filesystems + * uniform. tar-like filesystems use tree structure where each + * directory has pointers to its subdirectories. We can do this + * because we have full information about our archive. * - * At ftp-like filesystems, situation is a little bit different. When - * you cd /usr/src/linux/drivers/char, you do _not_ want /usr, - * /usr/src, /usr/src/linux and /usr/src/linux/drivers to be - * listed. That means that we do not have complete information, and if - * /usr is symlink to /4, we will not know. Also we have to time out - * entries and things would get messy with tree-like approach. So we - * do different trick: root directory is completely special and - * completely fake, it contains entries such as 'usr', 'usr/src', ..., - * and we'll try to use custom find_entry function. + * At ftp-like filesystems, situation is a little bit different. When + * you cd /usr/src/linux/drivers/char, you do _not_ want /usr, + * /usr/src, /usr/src/linux and /usr/src/linux/drivers to be + * listed. That means that we do not have complete information, and if + * /usr is symlink to /4, we will not know. Also we have to time out + * entries and things would get messy with tree-like approach. So we + * do different trick: root directory is completely special and + * completely fake, it contains entries such as 'usr', 'usr/src', ..., + * and we'll try to use custom find_entry function. * - * Paths here do _not_ begin with '/', so root directory of - * archive/site is simply "". Beware. */ + * \author Pavel Machek , distribute under LGPL. + * \date 1998 + * + * \warning Paths here do _not_ begin with '/', so root directory of + * archive/site is simply "". + */ #include diff --git a/vfs/extfs.c b/vfs/extfs.c index e4a36d568..b3650360b 100644 --- a/vfs/extfs.c +++ b/vfs/extfs.c @@ -20,6 +20,15 @@ License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +/** + * \file + * \brief Source: Virtual File System: External file system + * \author Jakub Jelinek + * \author Pavel Machek + * \author Andrew T. Veliath + * \date 1995, 1998, 1999 + */ + /* Namespace: init_extfs */ #include diff --git a/vfs/fish.c b/vfs/fish.c index e4a6b9d13..510d6028c 100644 --- a/vfs/fish.c +++ b/vfs/fish.c @@ -23,12 +23,20 @@ License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* +/** + * \file + * \brief Source: Virtual File System: FISH implementation for transfering files over + * shell connections + * \author Pavel Machek + * \author Michal Svec + * \date 1998, 2000 + * + * Derived from ftpfs.c * Read README.fish for protocol specification. * * Syntax of path is: /#sh:user@host[:Cr]/path - * where C means you want compressed connection, - * and r means you want to use rsh + * where C means you want compressed connection, + * and r means you want to use rsh * * Namespace: fish_vfs_ops exported. */ diff --git a/vfs/fish.h b/vfs/fish.h index 3876d8552..bae43ca04 100644 --- a/vfs/fish.h +++ b/vfs/fish.h @@ -1,3 +1,11 @@ + +/** + * \file + * \brief Header: Virtual File System: FISH implementation for transfering files over + * shell connections + */ + + #ifndef MC_VFS_FISH_H #define MC_VFS_FISH_H diff --git a/vfs/ftpfs.c b/vfs/ftpfs.c index 7737e93e2..eb65f4750 100644 --- a/vfs/ftpfs.c +++ b/vfs/ftpfs.c @@ -21,14 +21,23 @@ You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* FTPfs TODO: +/** + * \file + * \brief Source: Virtual File System: FTP file system + * \author Ching Hui + * \author Jakub Jelinek + * \author Miguel de Icaza + * \author Norbert Warmuth + * \author Pavel Machek + * \date 1995, 1997, 1998 + * + * \todo - make it more robust - all the connects etc. should handle EADDRINUSE and ERETRY (have I spelled these names correctly?) - make the user able to flush a connection - all the caches will get empty etc., (tarfs as well), we should give there a user selectable timeout - and assign a key sequence. + and assign a key sequence. - use hash table instead of linklist to cache ftpfs directory. What to do with this? @@ -53,7 +62,7 @@ What to do with this? */ -/* Namespace pollution: horrible */ +/* \todo Fix: Namespace pollution: horrible */ #include #include /* POSIX-required by sys/socket.h and netdb.h */ diff --git a/vfs/ftpfs.h b/vfs/ftpfs.h index 640a41c86..b2003db00 100644 --- a/vfs/ftpfs.h +++ b/vfs/ftpfs.h @@ -1,3 +1,9 @@ + +/** + * \file + * \brief Header: Virtual File System: FTP file system + */ + #ifndef MC_VFS_FTPFS_H #define MC_VFS_FTPFS_H diff --git a/vfs/gc.c b/vfs/gc.c index a0376d8fe..45af3fcb5 100644 --- a/vfs/gc.c +++ b/vfs/gc.c @@ -20,6 +20,17 @@ License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +/** + * \file + * \brief Source: Virtual File System: garbage collection code + * \author Miguel de Icaza + * \author Jakub Jelinek + * \author Pavel Machek + * \author Pavel Roskin + * \date 1995, 1998, 2003 + */ + + #include #include diff --git a/vfs/gc.h b/vfs/gc.h index e1ef7235b..f4f994664 100644 --- a/vfs/gc.h +++ b/vfs/gc.h @@ -1,3 +1,9 @@ + +/** + * \file + * \brief Header: Virtual File System: garbage collection code + */ + #ifndef MC_VFS_GC_H #define MC_VFS_GC_H diff --git a/vfs/local.c b/vfs/local.c index 4c56f6bca..26731ac12 100644 --- a/vfs/local.c +++ b/vfs/local.c @@ -1,3 +1,9 @@ + +/** + * \file + * \brief Source: local FS + */ + #include #include #include @@ -13,11 +19,12 @@ #include "vfs.h" #include "local.h" -/* Note: Some of this functions are not static. This has rather good +/** + * Note: Some of this functions are not static. This has rather good * reason: exactly same functions would have to appear in sfs.c. This * saves both computer's memory and my work. - * */ - + */ + static struct vfs_class vfs_local_ops; static void * diff --git a/vfs/local.h b/vfs/local.h index 03d5ce29a..176279b8b 100644 --- a/vfs/local.h +++ b/vfs/local.h @@ -1,3 +1,9 @@ + +/** + * \file + * \brief Header: local FS + */ + #ifndef MC_VFS_LOCAL_H #define MC_VFS_LOCAL_H diff --git a/vfs/mcfs.c b/vfs/mcfs.c index 9f5ace24d..42511666e 100644 --- a/vfs/mcfs.c +++ b/vfs/mcfs.c @@ -21,7 +21,15 @@ License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Namespace: exports mcfs_vfs_ops, tcp_invalidate_socket */ +/** + * \file + * \brief Source: Midnight Commander file system + * \author Miguel de Icaza + * \author Andrej Borsenkow + * \author Norbert Warmuth + * + * Namespace: exports mcfs_vfs_ops, tcp_invalidate_socket + */ #include diff --git a/vfs/mcfs.h b/vfs/mcfs.h index 6a4a557e3..6b864d6ed 100644 --- a/vfs/mcfs.h +++ b/vfs/mcfs.h @@ -1,3 +1,9 @@ + +/** + * \file + * \brief Header: Midnight Commander file system + */ + #ifndef MC_VFS_MCFS_H #define MC_VFS_MCFS_H diff --git a/vfs/mcfsutil.c b/vfs/mcfsutil.c index dd753f7cb..64416fddf 100644 --- a/vfs/mcfsutil.c +++ b/vfs/mcfsutil.c @@ -16,6 +16,13 @@ License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +/** + * \file + * \brief Source: Low-level protocol for MCFS + * \author Miguel de Icaza + * \date 1995, 1996 + */ + #include #ifdef WITH_MCFS diff --git a/vfs/mcfsutil.h b/vfs/mcfsutil.h index dc0ece656..9e1d89902 100644 --- a/vfs/mcfsutil.h +++ b/vfs/mcfsutil.h @@ -1,12 +1,17 @@ + +/** + * \file + * \brief Header: Low-level protocol for MCFS + * + * \todo FIXME: This protocol uses 32-bit integers for the communication. + * It is a problem on systems with large file support, which is now + * default. This means that lseek is broken unless --disable-largefile + * is used. 64-bit systems are probably broken even more. + */ + #ifndef MC_VFS_MCFSUTIL_H #define MC_VFS_MCFSUTIL_H -/* - * FIXME: This protocol uses 32-bit integers for the communication. - * It is a problem on systems with large file support, which is now - * default. This means that lseek is broken unless --disable-largefile - * is used. 64-bit systems are probably broken even more. - */ enum { RPC_END, /* End of RPC commands */ diff --git a/vfs/mcserv.c b/vfs/mcserv.c index d79c6f355..25b00464a 100644 --- a/vfs/mcserv.c +++ b/vfs/mcserv.c @@ -20,15 +20,19 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +*/ - TODO: - opendir instead of keeping its table of file handles could return - the pointer and expect the client to send a proper value back each - time :-) - - We should use syslog to register login/logout. - - */ +/** + * \file + * \brief Source: server for the Midnight Commander Virtual File System + * \author Miguel de Icaza + * \author Andrej Borsenkow + * \date 1995, 1996, 1997 + * + * \todo opendir instead of keeping its table of file handles could return + * the pointer and expect the client to send a proper value back each + * time :-) We should use syslog to register login/logout. + */ /* {{{ Includes and global variables */ diff --git a/vfs/sfs.c b/vfs/sfs.c index 077048211..9d94efcc7 100644 --- a/vfs/sfs.c +++ b/vfs/sfs.c @@ -17,15 +17,21 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +/** + * \file + * \brief Source: Single File fileSystem * * This defines whole class of filesystems which contain single file * inside. It is somehow similar to extfs, except that extfs makes - * whole virtual trees and we do only single virtual files. + * whole virtual trees and we do only single virtual files. * * If you want to gunzip something, you should open it with #ugz * suffix, DON'T try to gunzip it yourself. * - * Namespace: exports vfs_sfs_ops */ + * Namespace: exports vfs_sfs_ops + */ #include #include diff --git a/vfs/smbfs.c b/vfs/smbfs.c index 2f15ebf1f..814db8158 100644 --- a/vfs/smbfs.c +++ b/vfs/smbfs.c @@ -20,7 +20,16 @@ License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Namespace: exports init_smbfs, smbfs_set_debug(), smbfs_set_debugf() */ +/** + * \file + * \brief Source: Virtual File System: smb file system + * \author Wayne Roberts + * \author Andrew V. Samoilov + * \date 1997, 2002, 2003 + * + * Namespace: exports init_smbfs, smbfs_set_debug(), smbfs_set_debugf() + */ + #include #include diff --git a/vfs/smbfs.h b/vfs/smbfs.h index 3d63f79a3..07483e981 100644 --- a/vfs/smbfs.h +++ b/vfs/smbfs.h @@ -1,3 +1,9 @@ + +/** + * \file + * \brief Header: Virtual File System: smb file system + */ + #ifndef MC_VFS_SMBFS_H #define MC_VFS_SMBFS_H diff --git a/vfs/tar.c b/vfs/tar.c index 5a65d55f0..3e1c3a45b 100644 --- a/vfs/tar.c +++ b/vfs/tar.c @@ -19,7 +19,15 @@ License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Namespace: init_tarfs */ +/** + * \file + * \brief Source: Virtual File System: GNU Tar file system + * \author Jakub Jelinek + * \author Pavel Machek + * \date 1995, 1998 + * + * Namespace: init_tarfs + */ #include #include diff --git a/vfs/tcputil.c b/vfs/tcputil.c index 34c6263ba..08d62d46d 100644 --- a/vfs/tcputil.c +++ b/vfs/tcputil.c @@ -17,6 +17,11 @@ License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +/** + * \file + * \brief Source: Virtual File System: Network utilities + */ + #include #include #include diff --git a/vfs/tcputil.h b/vfs/tcputil.h index 51c19c85c..31afc0ffa 100644 --- a/vfs/tcputil.h +++ b/vfs/tcputil.h @@ -1,3 +1,9 @@ + +/** + * \file + * \brief Header: Virtual File System: Network utilities + */ + #ifndef MC_VFS_TCPUTIL_H #define MC_VFS_TCPUTIL_H diff --git a/vfs/undelfs.c b/vfs/undelfs.c index 010e7d563..a9e686a3f 100644 --- a/vfs/undelfs.c +++ b/vfs/undelfs.c @@ -26,12 +26,16 @@ License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Assumptions: +/** + * \file + * \brief Source: UnDel File System + * + * Assumptions: * * 1. We don't handle directories (thus undelfs_get_path is easy to write). * 2. Files are on the local file system (we do not support vfs files * because we would have to provide an io_manager for the ext2fs tools, - * and I don't think it would be too useful to undelete files + * and I don't think it would be too useful to undelete files */ #include diff --git a/vfs/utilvfs.c b/vfs/utilvfs.c index b2c45a1ee..82e6d2ff1 100644 --- a/vfs/utilvfs.c +++ b/vfs/utilvfs.c @@ -18,6 +18,13 @@ License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +/** + * \file + * \brief Source: Utilities for VFS modules + * \author Miguel de Icaza + * \date 1995, 1996 + */ + #include #include diff --git a/vfs/utilvfs.h b/vfs/utilvfs.h index d0255036e..5747ee32a 100644 --- a/vfs/utilvfs.h +++ b/vfs/utilvfs.h @@ -1,3 +1,11 @@ + +/** + * \file + * \brief Header: Utilities for VFS modules + * \author Miguel de Icaza + * \date 1995, 1996 + */ + #ifndef MC_VFS_UTILVFS_H #define MC_VFS_UTILVFS_H diff --git a/vfs/vfs-impl.h b/vfs/vfs-impl.h index 1039abc54..484191d7c 100644 --- a/vfs/vfs-impl.h +++ b/vfs/vfs-impl.h @@ -1,3 +1,9 @@ + +/** + * \file + * \brief Header: VFS implemntation (?) + */ + #ifndef MC_VFS_IMPL_H #define MC_VFS_IMPL_H diff --git a/vfs/vfs.c b/vfs/vfs.c index 8ea71f77d..61daf3e1d 100644 --- a/vfs/vfs.c +++ b/vfs/vfs.c @@ -20,12 +20,20 @@ License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -/* Warning: funtions like extfs_lstat() have right to destroy any +/** + * \file + * \brief Source: Virtual File System switch code + * \author Miguel de Icaza + * \author Jakub Jelinek + * \author Pavel Machek + * \date 1995, 1998 + * \warning funtions like extfs_lstat() have right to destroy any * strings you pass to them. This is acutally ok as you g_strdup what - * you are passing to them, anyway; still, beware. */ - -/* Namespace: exports *many* functions with vfs_ prefix; exports - parse_ls_lga and friends which do not have that prefix. */ + * you are passing to them, anyway; still, beware. + * + * Namespace: exports *many* functions with vfs_ prefix; exports + * parse_ls_lga and friends which do not have that prefix. + */ #include @@ -54,7 +62,7 @@ #include "smbfs.h" #include "local.h" -/* They keep track of the current directory */ +/** They keep track of the current directory */ static struct vfs_class *current_vfs; static char *current_dir; @@ -69,7 +77,7 @@ static GSList *vfs_openfiles; static struct vfs_class *localfs_class; -/* Create new VFS handle and put it to the list */ +/** Create new VFS handle and put it to the list */ static int vfs_new_handle (struct vfs_class *vclass, void *fsinfo) { @@ -84,7 +92,7 @@ vfs_new_handle (struct vfs_class *vclass, void *fsinfo) return h->handle; } -/* Function to match handle, passed to g_slist_find_custom() */ +/** Function to match handle, passed to g_slist_find_custom() */ static gint vfs_cmp_handle (gconstpointer a, gconstpointer b) { @@ -93,7 +101,7 @@ vfs_cmp_handle (gconstpointer a, gconstpointer b) return ((struct vfs_openfile *) a)->handle != (long) b; } -/* Find VFS class by file handle */ +/** Find VFS class by file handle */ static inline struct vfs_class * vfs_op (int handle) { @@ -110,7 +118,7 @@ vfs_op (int handle) return h->vclass; } -/* Find private file data by file handle */ +/** Find private file data by file handle */ static inline void * vfs_info (int handle) { @@ -127,7 +135,7 @@ vfs_info (int handle) return h->fsinfo; } -/* Free open file data for given file handle */ +/** Free open file data for given file handle */ static inline void vfs_free_handle (int handle) { @@ -153,7 +161,7 @@ vfs_register_class (struct vfs_class *vfs) return 1; } -/* Return VFS class for the given prefix */ +/** Return VFS class for the given prefix */ static struct vfs_class * vfs_prefix_to_class (char *prefix) { @@ -173,9 +181,10 @@ vfs_prefix_to_class (char *prefix) return NULL; } -/* Strip known vfs suffixes from a filename (possible improvement: strip - suffix from last path component). - Returns a malloced string which has to be freed. */ +/** Strip known vfs suffixes from a filename (possible improvement: strip + * suffix from last path component). + * \return a malloced string which has to be freed. + */ char * vfs_strip_suffix_from_filename (const char *filename) { @@ -218,7 +227,7 @@ path_magic (const char *path) return 1; } -/* +/** * Splits path '/p1#op/inpath' into inpath,op; returns which vfs it is. * What is left in path is p1. You still want to g_free(path), you DON'T * want to free neither *inpath nor *op @@ -562,7 +571,7 @@ int mc_fstat (int handle, struct stat *buf) { return result; } -/* +/** * Return current directory. If it's local, reread the current directory * from the OS. You must g_strdup() whatever this function returns. */ @@ -603,9 +612,9 @@ vfs_setup_wd (void) current_vfs = vfs_get_class (current_dir); } -/* - * Return current directory. If it's local, reread the current directory - * from the OS. Put directory to the provided buffer. +/** + * Return current directory. If it's local, reread the current directory + * from the OS. Put directory to the provided buffer. */ char * mc_get_current_wd (char *buffer, int size) @@ -616,7 +625,7 @@ mc_get_current_wd (char *buffer, int size) return buffer; } -/* +/** * Return current directory without any OS calls. */ char * @@ -640,7 +649,7 @@ off_t mc_lseek (int fd, off_t offset, int whence) return result; } -/* +/** * remove //, /./ and /../ */ @@ -674,7 +683,7 @@ vfs_canon (const char *path) } } -/* +/** * VFS chdir. * Return 0 on success, -1 on failure. */ diff --git a/vfs/vfs.h b/vfs/vfs.h index d79c706f4..e90c298df 100644 --- a/vfs/vfs.h +++ b/vfs/vfs.h @@ -1,3 +1,9 @@ + +/** + * \file + * \brief Header: Virtual File System switch code + */ + #ifndef MC_VFS_VFS_H #define MC_VFS_VFS_H diff --git a/vfs/xdirentry.h b/vfs/xdirentry.h index c58a2f95c..c8da1c9a8 100644 --- a/vfs/xdirentry.h +++ b/vfs/xdirentry.h @@ -1,3 +1,10 @@ + +/** + * \file + * \brief Header: Virtual File System directory structure + */ + + #ifndef MC_VFS_XDIRENTRY_H #define MC_VFS_XDIRENTRY_H