Commit Graph

45 Commits

Author SHA1 Message Date
Andrew Borodin f3730bdc41 Initial step to move TTY layer of MC to separate library. 2009-08-12 21:19:20 +04:00
Enrico Weigelt, metux IT service c7d04dd47a fixed several missing #include's 2009-06-18 21:02:29 +04:00
Mikhail S. Pobolovets 0a7899709b 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>
2009-02-10 16:18:55 +02:00
Slava Zanko e54f318cef Completely removed MHL stuff
Changed all source files relative to remove MHL

Some string-related functions moved into src/util.c

This stable fix.
2009-02-06 14:01:28 +02:00
Patrick Winnertz d84586ba82 Reverted the use of mhl_str_dup and use g_strdup instead.
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:40:32 +01:00
Patrick Winnertz 1c287d798d First bunch of mhl_mem_free removal patches
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:36:58 +01:00
Enrico Weigelt, metux IT service 8b38cf44da manully merged 227_replace_g_free 2009-02-02 22:34:05 +01:00
Enrico Weigelt, metux IT service f921cc40cd replaced calls to g_strdup() by mhl_str_dup() 2009-01-30 20:10:40 +01:00
Enrico Weigelt, metux IT service 15d7d47c15 replaced g_free() by mhl_mem_free() 2009-01-30 19:28:35 +01:00
Enrico Weigelt, metux IT service 183a66f7f5 changing return types of *read() and *write() functions to ssize_t 2009-01-13 19:00:25 +01:00
Roland Illig bb14c4e1da * vfs.h, vfs-impl.h, vfs.c, local.h, local.c, sfs.c: Removed
support for mmap() and munmap() from the VFS. It is unused and
	cannot be applied to remote file systems.
2005-07-05 21:01:57 +00:00
Roland Illig d7e7ec48dd * *.c: Declared unused variables with (void) to avoid the gcc
warnings.
	* extfs.c (extfs_get_path_mangle, extfs_get_path): Removed unused
	parameter.
	* ftpfs.c (ftpfs_netrc_bad_mode): Likewise.
	* vfs.c (mc_def_getlocalcopy): Likewise.
2005-02-22 18:35:22 +00:00
Roland Illig 54cccec688 * utilvfs.h: Removed unneeded #includes.
* *.c: Added the #includes that have been removed from utilvfs.h.
	* tcputil.c: Just removed the unneeded #include "utilvfs.h".
2005-02-19 16:36:38 +00:00
Andrew V. Samoilov c060826178 * direntry.c (vfs_s_free_entry): g_free handles NULL argument too,
no need for the comparison.
        * extfs.c (extfs_free_archive): Likewise.
            (extfs_open_archive): Likewise.
            (extfs_read_archive): Likewise.
            (extfs_remove_entry): Likewise.
            (extfs_free_entry): Likewise.
        * fish.c (fish_open_archive): Likewise.
            (fish_archive_same): Likewise.
        * ftpfs.c (ftpfs_split_url):  Likewise.
        * local.c       (local_closedir): Likewise.
        * mcserv.c (close_handle): Likewise.
        * smbfs.c (smbfs_free_bucket): Likewise.
        * tar.c (tar_read_header): Likewise.
        * undelfs.c (undelfs_shutdown): Likewise.
        * vfs.c (vfs_shut): Likewise.
2004-09-24 23:00:18 +00:00
Andrew V. Samoilov fc3bf048e9 * local.c (local_readlink): Make "size" size_t.
* direntry.c (vfs_s_readlink): Revert last changes. Make "size"
        size_t.
        * sfs.c (sfs_readlink): Reformat function.
        * smbfs.c (smbfs_readlink): Reformat function.
2004-09-02 14:12:21 +00:00
Roland Illig b17b1ac213 Const-ified the rest of the vfs_class methods. 2004-08-16 22:15:28 +00:00
Roland Illig e0bf99d516 Made the path argument to vfs->{chmod,chown,utime} constant. 2004-08-16 21:36:39 +00:00
Roland Illig dc70d154db Made the buf argument to vfs->write constant. 2004-08-16 21:16:54 +00:00
Roland Illig 789e5e9bcb Made the path argument to vfs->[l]stat constant. Created a new memory leak, which will be fixed soon. 2004-08-16 20:26:42 +00:00
Roland Illig b472c18c79 Made the patch argument to vfs->which const. 2004-08-16 19:47:21 +00:00
Pavel Roskin 30c4bd1b6d * vfs.h: Constify chdir() and opendir() methods. Adjust all
dependencies.
* vfs.c (mc_chdir): Constify, eliminate protection against
broken implementations of chdir() method.
(mc_opendir): Constify.
2003-11-13 08:29:37 +00:00
Pavel Roskin 4eab382dba * gc.c: Make getid(), nothingisopen() and free() methods
optional.  Eliminate trivial implementations.
(vfs_getid): New function - safe wrapper around getid().  Use
it everywhere.
(vfs_ncs_getid): Remove dead code, inprove readability.
2003-11-08 23:53:00 +00:00
Pavel Roskin 77bcdc8127 * vfs.c (mc_ungetlocalcopy): Free local path here, not in class
implementations.
* vfs.h (struct vfs_s_class): Constify "local" argument for
ungetlocalcopy.  Adjust all implementations.
2003-10-28 21:52:06 +00:00
Pavel Roskin 7d16d65e35 * vfs.h: Constify some arguments for many functions.
* xdirentry.h: Likewise.  Adjust all dependencies.
2003-10-28 02:10:33 +00:00
Pavel Roskin 426c1836d5 * vfs.h: Remove all references to seekdir and telldir. Adjust
all dependencies.
2003-10-14 22:24:26 +00:00
Pavel Roskin 9a5c3dda9e Restore lost ifdef. 2003-10-12 20:01:48 +00:00
Pavel Roskin 2e524d3cad * local.c: Switch to self-registration.
* vfs.c: Cache localfs class for the use in vfs_get_class().
2003-10-12 19:57:27 +00:00
Pavel Roskin 00b57fd4bf * vfs.h: Remove typedef vfs, it's too ambiguous. Massive
changes to use struct vfs_class instead.
2003-10-12 00:24:00 +00:00
Pavel Roskin 1d6e00faf0 * vfs.h: Introduce new VFS flags instead of the old unused ones.
* vfs.c (vfs_file_class_flags): New function.
(vfs_file_is_ftp): Eliminate.
(vfs_file_is_smb): Likewise.
(vfs_file_is_local): Likewise.
(vfs_current_is_local): Use new VFSF_LOCAL flag.
2003-10-11 08:21:16 +00:00
Pavel Roskin 091023c37a * undelfs.c (undelfs_get_path): Constify first argument.
* vfs.h (struct vfs_class): Constify path.  Fix all dependencies.
2003-10-11 07:20:53 +00:00
Pavel Roskin 617bf6880a * vfs.c (vfs_flags): Eliminate, it's never assigned a non-zero
value.
* vfs.h: Eliminate unused VFS flags.
* local.c (vfs_nil_ops): Eliminate, it's unused now.
2003-10-10 23:49:44 +00:00
Pavel Roskin 966511399b Move fcntl.h inclusion to global.h. 2002-09-23 06:45:32 +00:00
Pavel Roskin 680f3f7ed2 * cpio.c: Include <config.h> before everything else.
* direntry.c: Likewise.
* fish.c: Likewise.
* ftpfs.c: Likewise.
* local.c: Likewise.
* tar.c: Likewise.
* utilvfs.h: Don't include <config.h> - it should be included
in all C files instead.
* xdirentry.h: Likewise.
2001-06-25 21:34:46 +00:00
Pavel Roskin d8ec86292f * local.c (local_telldir): Warn and abort if telldir() is not
available.
(local_seekdir): Warn and abort if seekdir() is not available.
2001-06-19 19:36:54 +00:00
Pavel Roskin 6fe51516de * cpio.c (vfs_cpiofs_ops): Use short name for the filesystem.
This avoids creating long filenames in dirent.c when the "name"
field is used.
* extfs.c (vfs_extfs_ops): Likewise.
* fish.c (vfs_fish_ops): Likewise.
* ftpfs.c (vfs_ftpfs_ops): Likewise.
* local.c (vfs_local_ops): Likewise.
(vfs_nil_ops): Likewise.
* mcfs.c (vfs_mcfs_ops): Likewise.
* sfs.c (vfs_sfs_ops): Likewise.
* tar.c (vfs_tarfs_ops): Likewise.
* undelfs.c (vfs_undelfs_ops): Likewise.
2001-06-11 21:58:58 +00:00
Pavel Machek a1225de8b3 Fix problems with stating / of ftp server + NO_LOCALHASH to prevent
podfuk deadlocs
2000-04-16 19:13:00 +00:00
Pavel Machek 1139602a9b Return value is needed for mc_[un]getlocalcopy. 1999-11-11 14:23:40 +00:00
Timur Bakeyev bf81009392 Actually commit all my changers. Fear :> 1999-01-20 22:01:11 +00:00
Miguel de Icaza 8fb1821455 Warning fixes + compile fixes -mig 1998-12-15 19:53:55 +00:00
Pavel Machek 176dc1f70d static's added, do_reget hack removed 1998-10-12 22:07:53 +00:00
Pavel Machek a92e6f3ea8 Changed license to LGPL, added passing of vfs * (acting as self), so
we can do OOP-like trics.
1998-09-27 19:27:58 +00:00
Pavel Machek a57c127f2d O_LINEAR option added, tar fixed to handle bzip/bzip2 files correctly. 1998-09-21 09:52:07 +00:00
Pavel Machek 3d0a91d4a8 Added vfs_uid for use by libvfs.so users (rpc.nfsd)
Added single file filesystem (sfs)
Added vfs_flags so library users can disable selected filesystems
Minor shuffling of functions so garbage collection works for library
1998-08-25 16:00:16 +00:00
Miguel de Icaza 7a7f7a3d85 Integration of Pavel Machek's vfs code split and vfs syntax change.
The VFS code can now be used by other applications (if you compile the
libvfs.a target and link against this).

Syntax has changes internally from the url-like syntax to a new syntax
that does not have ambiguities.  A default conversor for the new syntax
will be provided in the future, also dealing with the user ~/.mc/ext files
is currently in a non-optimal state.

Keep an eye on this mailing list.

Miguel.
1998-05-26 00:53:24 +00:00
Miguel de Icaza eb6b3842ab Initial revision 1998-02-27 04:54:42 +00:00