Simple doxygen description for files in vfs (not subdirs) directory.

Mostly \file and \brief tag added.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
This commit is contained in:
Mikhail S. Pobolovets 2009-02-07 14:54:58 +02:00
parent 6a209bdb59
commit 0a7899709b
29 changed files with 272 additions and 74 deletions

View File

@ -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 <config.h>
#include <errno.h>

View File

@ -1,7 +1,8 @@
/* 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 <pavel@ucw.cz>, 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)
@ -21,8 +22,12 @@
* 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 <pavel@ucw.cz>, distribute under LGPL.
* \date 1998
*
* \warning Paths here do _not_ begin with '/', so root directory of
* archive/site is simply "".
*/
#include <config.h>

View File

@ -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 <config.h>

View File

@ -23,7 +23,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: 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

View File

@ -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

View File

@ -22,8 +22,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. */
/* 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
@ -53,7 +62,7 @@ What to do with this?
*/
/* Namespace pollution: horrible */
/* \todo Fix: Namespace pollution: horrible */
#include <config.h>
#include <sys/types.h> /* POSIX-required by sys/socket.h and netdb.h */

View File

@ -1,3 +1,9 @@
/**
* \file
* \brief Header: Virtual File System: FTP file system
*/
#ifndef MC_VFS_FTPFS_H
#define MC_VFS_FTPFS_H

View File

@ -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 <config.h>
#include <stdio.h>

View File

@ -1,3 +1,9 @@
/**
* \file
* \brief Header: Virtual File System: garbage collection code
*/
#ifndef MC_VFS_GC_H
#define MC_VFS_GC_H

View File

@ -1,3 +1,9 @@
/**
* \file
* \brief Source: local FS
*/
#include <config.h>
#include <errno.h>
#include <sys/types.h>
@ -13,10 +19,11 @@
#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. <pavel@ucw.cz>
* */
*/
static struct vfs_class vfs_local_ops;

View File

@ -1,3 +1,9 @@
/**
* \file
* \brief Header: local FS
*/
#ifndef MC_VFS_LOCAL_H
#define MC_VFS_LOCAL_H

View File

@ -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 <config.h>

View File

@ -1,3 +1,9 @@
/**
* \file
* \brief Header: Midnight Commander file system
*/
#ifndef MC_VFS_MCFS_H
#define MC_VFS_MCFS_H

View File

@ -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 <config.h>
#ifdef WITH_MCFS

View File

@ -1,13 +1,18 @@
#ifndef MC_VFS_MCFSUTIL_H
#define MC_VFS_MCFSUTIL_H
/*
* FIXME: This protocol uses 32-bit integers for the communication.
/**
* \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
enum {
RPC_END, /* End of RPC commands */
RPC_INT, /* Next argument is integer */

View File

@ -20,14 +20,18 @@
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 */

View File

@ -17,6 +17,11 @@
* 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
@ -25,7 +30,8 @@
* 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 <config.h>
#include <errno.h>

View File

@ -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 <wroberts1@home.com>
* \author Andrew V. Samoilov <sav@bcs.zp.ua>
* \date 1997, 2002, 2003
*
* Namespace: exports init_smbfs, smbfs_set_debug(), smbfs_set_debugf()
*/
#include <config.h>
#include <stdio.h>

View File

@ -1,3 +1,9 @@
/**
* \file
* \brief Header: Virtual File System: smb file system
*/
#ifndef MC_VFS_SMBFS_H
#define MC_VFS_SMBFS_H

View File

@ -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 <config.h>
#include <sys/types.h>

View File

@ -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 <config.h>
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,3 +1,9 @@
/**
* \file
* \brief Header: Virtual File System: Network utilities
*/
#ifndef MC_VFS_TCPUTIL_H
#define MC_VFS_TCPUTIL_H

View File

@ -26,7 +26,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. */
/* 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

View File

@ -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 <config.h>
#include <ctype.h>

View File

@ -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

View File

@ -1,3 +1,9 @@
/**
* \file
* \brief Header: VFS implemntation (?)
*/
#ifndef MC_VFS_IMPL_H
#define MC_VFS_IMPL_H

View File

@ -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 <config.h>
@ -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,7 +612,7 @@ 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.
*/
@ -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.
*/

View File

@ -1,3 +1,9 @@
/**
* \file
* \brief Header: Virtual File System switch code
*/
#ifndef MC_VFS_VFS_H
#define MC_VFS_VFS_H

View File

@ -1,3 +1,10 @@
/**
* \file
* \brief Header: Virtual File System directory structure
*/
#ifndef MC_VFS_XDIRENTRY_H
#define MC_VFS_XDIRENTRY_H