mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-05 11:04:42 +03:00
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:
parent
6a209bdb59
commit
0a7899709b
@ -18,6 +18,12 @@
|
|||||||
License along with this program; if not, write to the Free Software
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
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 <config.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -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
|
* Very loosely based on tar.c from midnight and archives.[ch] from
|
||||||
* avfs by Miklos Szeredi (mszeredi@inf.bme.hu)
|
* avfs by Miklos Szeredi (mszeredi@inf.bme.hu)
|
||||||
@ -21,8 +22,12 @@
|
|||||||
* completely fake, it contains entries such as 'usr', 'usr/src', ...,
|
* completely fake, it contains entries such as 'usr', 'usr/src', ...,
|
||||||
* and we'll try to use custom find_entry function.
|
* and we'll try to use custom find_entry function.
|
||||||
*
|
*
|
||||||
* Paths here do _not_ begin with '/', so root directory of
|
* \author Pavel Machek <pavel@ucw.cz>, distribute under LGPL.
|
||||||
* archive/site is simply "". Beware. */
|
* \date 1998
|
||||||
|
*
|
||||||
|
* \warning Paths here do _not_ begin with '/', so root directory of
|
||||||
|
* archive/site is simply "".
|
||||||
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
@ -20,6 +20,15 @@
|
|||||||
License along with this program; if not, write to the Free Software
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
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 */
|
/* Namespace: init_extfs */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
10
vfs/fish.c
10
vfs/fish.c
@ -23,7 +23,15 @@
|
|||||||
License along with this program; if not, write to the Free Software
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
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.
|
* Read README.fish for protocol specification.
|
||||||
*
|
*
|
||||||
* Syntax of path is: /#sh:user@host[:Cr]/path
|
* Syntax of path is: /#sh:user@host[:Cr]/path
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Header: Virtual File System: FISH implementation for transfering files over
|
||||||
|
* shell connections
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef MC_VFS_FISH_H
|
#ifndef MC_VFS_FISH_H
|
||||||
#define MC_VFS_FISH_H
|
#define MC_VFS_FISH_H
|
||||||
|
|
||||||
|
15
vfs/ftpfs.c
15
vfs/ftpfs.c
@ -22,8 +22,17 @@
|
|||||||
License along with this program; if not, write to the Free Software
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
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
|
- make it more robust - all the connects etc. should handle EADDRINUSE and
|
||||||
ERETRY (have I spelled these names correctly?)
|
ERETRY (have I spelled these names correctly?)
|
||||||
- make the user able to flush a connection - all the caches will get empty
|
- 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 <config.h>
|
||||||
#include <sys/types.h> /* POSIX-required by sys/socket.h and netdb.h */
|
#include <sys/types.h> /* POSIX-required by sys/socket.h and netdb.h */
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Header: Virtual File System: FTP file system
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef MC_VFS_FTPFS_H
|
#ifndef MC_VFS_FTPFS_H
|
||||||
#define MC_VFS_FTPFS_H
|
#define MC_VFS_FTPFS_H
|
||||||
|
|
||||||
|
11
vfs/gc.c
11
vfs/gc.c
@ -20,6 +20,17 @@
|
|||||||
License along with this program; if not, write to the Free Software
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
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 <config.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
6
vfs/gc.h
6
vfs/gc.h
@ -1,3 +1,9 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Header: Virtual File System: garbage collection code
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef MC_VFS_GC_H
|
#ifndef MC_VFS_GC_H
|
||||||
#define MC_VFS_GC_H
|
#define MC_VFS_GC_H
|
||||||
|
|
||||||
|
11
vfs/local.c
11
vfs/local.c
@ -1,3 +1,9 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Source: local FS
|
||||||
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -13,10 +19,11 @@
|
|||||||
#include "vfs.h"
|
#include "vfs.h"
|
||||||
#include "local.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
|
* reason: exactly same functions would have to appear in sfs.c. This
|
||||||
* saves both computer's memory and my work. <pavel@ucw.cz>
|
* saves both computer's memory and my work. <pavel@ucw.cz>
|
||||||
* */
|
*/
|
||||||
|
|
||||||
static struct vfs_class vfs_local_ops;
|
static struct vfs_class vfs_local_ops;
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Header: local FS
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef MC_VFS_LOCAL_H
|
#ifndef MC_VFS_LOCAL_H
|
||||||
#define MC_VFS_LOCAL_H
|
#define MC_VFS_LOCAL_H
|
||||||
|
|
||||||
|
10
vfs/mcfs.c
10
vfs/mcfs.c
@ -21,7 +21,15 @@
|
|||||||
License along with this program; if not, write to the Free Software
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
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>
|
#include <config.h>
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Header: Midnight Commander file system
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef MC_VFS_MCFS_H
|
#ifndef MC_VFS_MCFS_H
|
||||||
#define MC_VFS_MCFS_H
|
#define MC_VFS_MCFS_H
|
||||||
|
|
||||||
|
@ -16,6 +16,13 @@
|
|||||||
License along with this program; if not, write to the Free Software
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
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>
|
#include <config.h>
|
||||||
|
|
||||||
#ifdef WITH_MCFS
|
#ifdef WITH_MCFS
|
||||||
|
@ -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
|
* It is a problem on systems with large file support, which is now
|
||||||
* default. This means that lseek is broken unless --disable-largefile
|
* default. This means that lseek is broken unless --disable-largefile
|
||||||
* is used. 64-bit systems are probably broken even more.
|
* is used. 64-bit systems are probably broken even more.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef MC_VFS_MCFSUTIL_H
|
||||||
|
#define MC_VFS_MCFSUTIL_H
|
||||||
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
RPC_END, /* End of RPC commands */
|
RPC_END, /* End of RPC commands */
|
||||||
RPC_INT, /* Next argument is integer */
|
RPC_INT, /* Next argument is integer */
|
||||||
|
18
vfs/mcserv.c
18
vfs/mcserv.c
@ -20,14 +20,18 @@
|
|||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
TODO:
|
/**
|
||||||
opendir instead of keeping its table of file handles could return
|
* \file
|
||||||
the pointer and expect the client to send a proper value back each
|
* \brief Source: server for the Midnight Commander Virtual File System
|
||||||
time :-)
|
* \author Miguel de Icaza
|
||||||
|
* \author Andrej Borsenkow
|
||||||
We should use syslog to register login/logout.
|
* \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 */
|
/* {{{ Includes and global variables */
|
||||||
|
@ -17,6 +17,11 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* 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
|
* This defines whole class of filesystems which contain single file
|
||||||
* inside. It is somehow similar to extfs, except that extfs makes
|
* 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
|
* If you want to gunzip something, you should open it with #ugz
|
||||||
* suffix, DON'T try to gunzip it yourself.
|
* suffix, DON'T try to gunzip it yourself.
|
||||||
*
|
*
|
||||||
* Namespace: exports vfs_sfs_ops */
|
* Namespace: exports vfs_sfs_ops
|
||||||
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
11
vfs/smbfs.c
11
vfs/smbfs.c
@ -20,7 +20,16 @@
|
|||||||
License along with this program; if not, write to the Free Software
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
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 <config.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Header: Virtual File System: smb file system
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef MC_VFS_SMBFS_H
|
#ifndef MC_VFS_SMBFS_H
|
||||||
#define MC_VFS_SMBFS_H
|
#define MC_VFS_SMBFS_H
|
||||||
|
|
||||||
|
10
vfs/tar.c
10
vfs/tar.c
@ -19,7 +19,15 @@
|
|||||||
License along with this program; if not, write to the Free Software
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
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 <config.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -17,6 +17,11 @@
|
|||||||
License along with this program; if not, write to the Free Software
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Source: Virtual File System: Network utilities
|
||||||
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Header: Virtual File System: Network utilities
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef MC_VFS_TCPUTIL_H
|
#ifndef MC_VFS_TCPUTIL_H
|
||||||
#define MC_VFS_TCPUTIL_H
|
#define MC_VFS_TCPUTIL_H
|
||||||
|
|
||||||
|
@ -26,7 +26,11 @@
|
|||||||
License along with this program; if not, write to the Free Software
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
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).
|
* 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
|
* 2. Files are on the local file system (we do not support vfs files
|
||||||
|
@ -18,6 +18,13 @@
|
|||||||
License along with this program; if not, write to the Free Software
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
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 <config.h>
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Header: Utilities for VFS modules
|
||||||
|
* \author Miguel de Icaza
|
||||||
|
* \date 1995, 1996
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef MC_VFS_UTILVFS_H
|
#ifndef MC_VFS_UTILVFS_H
|
||||||
#define MC_VFS_UTILVFS_H
|
#define MC_VFS_UTILVFS_H
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Header: VFS implemntation (?)
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef MC_VFS_IMPL_H
|
#ifndef MC_VFS_IMPL_H
|
||||||
#define MC_VFS_IMPL_H
|
#define MC_VFS_IMPL_H
|
||||||
|
|
||||||
|
51
vfs/vfs.c
51
vfs/vfs.c
@ -20,12 +20,20 @@
|
|||||||
License along with this program; if not, write to the Free Software
|
License along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
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
|
* strings you pass to them. This is acutally ok as you g_strdup what
|
||||||
* you are passing to them, anyway; still, beware. */
|
* you are passing to them, anyway; still, beware.
|
||||||
|
*
|
||||||
/* Namespace: exports *many* functions with vfs_ prefix; exports
|
* Namespace: exports *many* functions with vfs_ prefix; exports
|
||||||
parse_ls_lga and friends which do not have that prefix. */
|
* parse_ls_lga and friends which do not have that prefix.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -54,7 +62,7 @@
|
|||||||
#include "smbfs.h"
|
#include "smbfs.h"
|
||||||
#include "local.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 struct vfs_class *current_vfs;
|
||||||
static char *current_dir;
|
static char *current_dir;
|
||||||
|
|
||||||
@ -69,7 +77,7 @@ static GSList *vfs_openfiles;
|
|||||||
|
|
||||||
static struct vfs_class *localfs_class;
|
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
|
static int
|
||||||
vfs_new_handle (struct vfs_class *vclass, void *fsinfo)
|
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;
|
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
|
static gint
|
||||||
vfs_cmp_handle (gconstpointer a, gconstpointer b)
|
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;
|
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 *
|
static inline struct vfs_class *
|
||||||
vfs_op (int handle)
|
vfs_op (int handle)
|
||||||
{
|
{
|
||||||
@ -110,7 +118,7 @@ vfs_op (int handle)
|
|||||||
return h->vclass;
|
return h->vclass;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find private file data by file handle */
|
/** Find private file data by file handle */
|
||||||
static inline void *
|
static inline void *
|
||||||
vfs_info (int handle)
|
vfs_info (int handle)
|
||||||
{
|
{
|
||||||
@ -127,7 +135,7 @@ vfs_info (int handle)
|
|||||||
return h->fsinfo;
|
return h->fsinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Free open file data for given file handle */
|
/** Free open file data for given file handle */
|
||||||
static inline void
|
static inline void
|
||||||
vfs_free_handle (int handle)
|
vfs_free_handle (int handle)
|
||||||
{
|
{
|
||||||
@ -153,7 +161,7 @@ vfs_register_class (struct vfs_class *vfs)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return VFS class for the given prefix */
|
/** Return VFS class for the given prefix */
|
||||||
static struct vfs_class *
|
static struct vfs_class *
|
||||||
vfs_prefix_to_class (char *prefix)
|
vfs_prefix_to_class (char *prefix)
|
||||||
{
|
{
|
||||||
@ -173,9 +181,10 @@ vfs_prefix_to_class (char *prefix)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Strip known vfs suffixes from a filename (possible improvement: strip
|
/** Strip known vfs suffixes from a filename (possible improvement: strip
|
||||||
suffix from last path component).
|
* suffix from last path component).
|
||||||
Returns a malloced string which has to be freed. */
|
* \return a malloced string which has to be freed.
|
||||||
|
*/
|
||||||
char *
|
char *
|
||||||
vfs_strip_suffix_from_filename (const char *filename)
|
vfs_strip_suffix_from_filename (const char *filename)
|
||||||
{
|
{
|
||||||
@ -218,7 +227,7 @@ path_magic (const char *path)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Splits path '/p1#op/inpath' into inpath,op; returns which vfs it is.
|
* 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
|
* What is left in path is p1. You still want to g_free(path), you DON'T
|
||||||
* want to free neither *inpath nor *op
|
* want to free neither *inpath nor *op
|
||||||
@ -562,7 +571,7 @@ int mc_fstat (int handle, struct stat *buf) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Return current directory. If it's local, reread the current directory
|
* Return current directory. If it's local, reread the current directory
|
||||||
* from the OS. You must g_strdup() whatever this function returns.
|
* 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);
|
current_vfs = vfs_get_class (current_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Return current directory. If it's local, reread the current directory
|
* Return current directory. If it's local, reread the current directory
|
||||||
* from the OS. Put directory to the provided buffer.
|
* from the OS. Put directory to the provided buffer.
|
||||||
*/
|
*/
|
||||||
@ -616,7 +625,7 @@ mc_get_current_wd (char *buffer, int size)
|
|||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Return current directory without any OS calls.
|
* Return current directory without any OS calls.
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
@ -640,7 +649,7 @@ off_t mc_lseek (int fd, off_t offset, int whence)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* remove //, /./ and /../
|
* remove //, /./ and /../
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -674,7 +683,7 @@ vfs_canon (const char *path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* VFS chdir.
|
* VFS chdir.
|
||||||
* Return 0 on success, -1 on failure.
|
* Return 0 on success, -1 on failure.
|
||||||
*/
|
*/
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Header: Virtual File System switch code
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef MC_VFS_VFS_H
|
#ifndef MC_VFS_VFS_H
|
||||||
#define MC_VFS_VFS_H
|
#define MC_VFS_VFS_H
|
||||||
|
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* \file
|
||||||
|
* \brief Header: Virtual File System directory structure
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef MC_VFS_XDIRENTRY_H
|
#ifndef MC_VFS_XDIRENTRY_H
|
||||||
#define MC_VFS_XDIRENTRY_H
|
#define MC_VFS_XDIRENTRY_H
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user