Commit Graph

111 Commits

Author SHA1 Message Date
Roland Illig
2390300034 * fish.c: Replaced the printf-like attribute with __printf__,
since GNU gettext defines a macro printf on some systems.
	* ftpfs.c: Likewise.
2006-02-03 14:45:44 +00:00
Leonard den Ottolander
a03c48ffa4 fish.c, xdirentry.h: Fix 2 GB file size limit for fish. 2006-01-27 22:16:45 +00:00
Pavel Tsekov
c8494f41bb * xdirentry.h (LS_LINEAR_PREOPEN): New macro definition.
* direntry.c (vfs_s_open): When opening a file in linear mode,
defer the actual open operation until the first read call.
(vfs_s_read): When reading in linear mode, open the file
on the first read operation.
(vfs_s_lseek): When in linear mode, make sure that seeking is
allowed only before the first read operation.
* ftpfs.c (ftpfs_ctl): Make the code aware of LS_LINEAR_PREOPEN.
* fish.c (fish_ctl): Likewise.
2006-01-25 14:04:27 +00:00
Leonard den Ottolander
0c2b46643d * fish.c (fish_dir_load, fish_linear_start): Get numerical gid/uids from ls to
avoid wrong parsing of user/group names containging white space.
2005-10-19 11:34:56 +00:00
Roland Illig
290b842c86 * utilvfs.h (vfs_parse_filetype, vfs_parse_fileperms,
vfs_parse_filemode): Rewrote the functions to parse Unix file
	modes.
	* utilvfs.c: Likewise.
	* fish.c: Using the new parsing functions.
2005-09-26 11:10:24 +00:00
Roland Illig
7e7b81b73e * direntry.c: Added const qualifiers to work around gcc
warnings.
	* extfs.c: Likewise.
	* fish.c: Likewise.
	* ftpfs.c: Likewise.
	* sfs.c: Likewise.
	* xdirentry.h: Likewise.
2005-09-05 00:52:56 +00:00
Roland Illig
5343037e83 * fish.c (fish_ctl): Commented out some unused code with
#if 0 ... #endif. This fixes a warning from SunPro.
2005-06-08 00:31:25 +00:00
Pavel Roskin
1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +00:00
Roland Illig
ebcd6129c6 * fish.c: Declared one more parameter as unused. 2005-02-22 18:38:58 +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
Roland Illig
9558c7178f * src/info.c (info_show_info): Enabled display of the device number,
for the case that the column in the directory listing is too
	short. This had been disabled since 1994, for no obvious reason
	and without any comment.
	* src/screen.c (format_device_number): Added. Converts a device number
	into a bounded string.
	* screen.c (string_file_size): Support for larger device numbers
	(and for non-Linux systems).
	* vfs/cpio.c (cpio_read_crc_head): Fixed device number handling for
	non-Linux systems.
	* vfs/fish.c (fish_dir_load): Likewise.
	* vfs/utilvfs.c (vfs_parse_ls_lga): Likewise.
2005-01-27 23:32:13 +00:00
Andrew V. Samoilov
b20f6b2dea * fish.c (fish_linear_abort): Fix bug with FISH vfs. It freezes MC on
transfer abort.
2004-12-28 12:25:24 +00:00
Andrew V. Samoilov
e7b96a4600 * fish.c(fish_file_store): Fix typo fix 2004-11-29 20:15:22 +00:00
Andrew V. Samoilov
a2bcbdb52c * fish.c (fish_file_store): Check write() more carefully.
(PREFIX): Fix memory leak.
        (fish_##name): Likewise.
        (fish_chown): Likewise.
2004-11-29 12:45:42 +00:00
Andrew V. Samoilov
f8223e659b * fish.c (fish_open_archive_int): Fix missed "%s". 2004-10-28 11:24:43 +00:00
Andrew V. Samoilov
e65b13eb00 * ftpfs.c (ftpfs_linear_start): Likewise.
* fish.c (fish_linear_start): Likewise.
2004-10-06 21:20:17 +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
Roland Illig
4bc786735e * cpio.c: Replaced NULL with (char *) NULL. Likewise for 0, where
NULL was meant.
	* direntry.c: Likewise.
	* extfs.c: Likewise.
	* fish.c: Likewise.
	* ftpfs.c: Likewise.
	* mcfs.c: Likewise.
	* tar.c: Likewise.
	* undelfs.c: Likewise.
	* vfs.c: Likewise.
2004-09-24 15:08:21 +00:00
Andrew V. Samoilov
4d149bb08e * fish_file_store): Call get_interrupt instead of testing
whether got_interrupt is non-NULL (it always is).
2004-09-09 13:26:02 +00:00
Andrew V. Samoilov
71ffc327b5 * fish.c (fish_get_reply): Use g_strlcpy instead
sequence strncpy(), name[len] = '\0'
* vfs.c (mc_get_current_wd): Likewise.
2004-09-01 18:39:48 +00:00
Andrew V. Samoilov
562577c0d4 Use atoll()/atof() instead of atol() for st_size to show file sizes > 2G. 2004-08-30 18:36:58 +00:00
Roland Illig
c0a173bf7b Added more const-ness. 2004-08-17 11:14:51 +00:00
Roland Illig
5689ee5699 Added more const-ness to variables. 2004-08-17 10:26:44 +00:00
Roland Illig
34a8088483 Splittet the vfs.h header into a user's part (vfs.h) and an implementor's part (vfs-impl.h). 2004-08-16 23:18:42 +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
db3f21b702 Added a typedef for a function. Added more const-ness to the function arguments. 2004-08-16 16:34:11 +00:00
Pavel Roskin
fe12438ed6 * fish.c (fish_open_archive_int): Save some stack and place -C
flag before host.
2003-12-06 04:24:56 +00:00
Pavel Roskin
c83ab1c1b2 Trivial patches from Andrew V. Samoilov <andrew@email.zp.ua> 2003-12-06 04:05:35 +00:00
Pavel Roskin
6ffd35bf07 * gc.c: Eliminate all code for timestamping parent filesystems.
It's broken and undocumented.  Adjust all dependencies.
2003-11-26 21:10:42 +00:00
Pavel Roskin
4b5a2a0b62 * direntry.c (vfs_s_stamp_me): Generalize and move ...
* gc.c (vfs_stamp_create): ... here.  Use whenever possible.
2003-11-13 08:03:03 +00:00
Pavel Roskin
b33f2cbb47 * vfs.c: Split garbage collection code into ...
* gc.c: ... this.
* vfs.h: Corresponding code moved ...
* gc.h: ... here.
* Makefile.am: Adjustments for the above.
2003-11-07 23:43:55 +00:00
Pavel Roskin
0ba019a90b * configure.in: Use AC_CHECK_MEMBERS to check fields of struct
stat.  Adjust all dependencies.
2003-10-29 17:36:16 +00:00
Pavel Roskin
cd644b527c * fish.c (fish_fh_open): Use vfs_mkstemps() for write buffers as
well, since the file can be reopened for reading later.
* ftpfs.c (ftpfs_fh_open): Likewise.
2003-10-29 01:35:36 +00:00
Pavel Roskin
8e3a0c9d65 * direntry.c (vfs_s_init_class): Improve interface to allow more
code reuse.  Change all callers.
(vfs_s_getlocalcopy): New implementation.  Don't use
mc_def_getlocalcopy().  Use vfs_s_open() to create local copy.
(vfs_s_ungetlocalcopy): New function.
* xdirentry.h: Add new field "flags" to struct vfs_s_subclass.
* extfs.c (extfs_ungetlocalcopy): Don't use
mc_def_ungetlocalcopy() in the dead branch.
* vfs.c (mc_def_getlocalcopy): Make static.
(mc_def_ungetlocalcopy): Likewise.
2003-10-28 07:09:39 +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
5bc20fd294 * *.c: Rename functions that don't have an a prefix indicating
what file they are defined in.  This simplifies debugging.
2003-10-28 00:57:02 +00:00
Pavel Roskin
211ce16fac * wtools.c: Merge mc_message() and message() into one background
safe function message().  Fix all callers.
2003-10-26 04:47:20 +00:00
Pavel Roskin
50045218ab Remove unneeded includes in ../src 2003-10-25 21:34:57 +00:00
Pavel Roskin
2d33b5047e * background.c: Replace all message stubs with a new function
mc_message().  Protect against strlen(MSG_ERROR).  Adjust all
dependencies.
2003-10-25 19:54:24 +00:00
Pavel Roskin
7c4fc715da * direntry.c (vfs_s_setctl): Implement VFS_SETCTL_FLUSH.
* ftpfs.c: Remove ftpfs_flushdir.  Use MEDATA->flush.
* fish.c: Use MEDATA->flush.
2003-10-16 18:51:41 +00:00
Pavel Roskin
63740624ea * xdirentry.h: Rename vfs_s_data to vfs_s_subclass.
* cpio.c: Initialize only non-zero fields in vfs_s_subclass.
* fish.c: Likewise.
* ftpfs.c: Likewise.
* tar.c: Likewise.
2003-10-16 16:40:11 +00:00
Pavel Roskin
52844a3092 * vfs.h: Rename commands for mc_ctl() and mc_setctl() to make it
clear which function they are used with.
* vfs.c (mc_ctl): Change last argument to (void*).
(mc_set): Likewise.
Adjust all dependencies.
2003-10-16 16:12:19 +00:00
Pavel Roskin
fc7267906f * xdirentry.h: Move system includes to the files that need them. 2003-10-16 08:47:33 +00:00
Pavel Roskin
a6754ce841 * xdirentry.h: Cleanup unused or write-only fields. Adjust all
dependencies.
2003-10-16 05:47:23 +00:00
Pavel Roskin
6cf97f4069 * xdirentry.h: Remove all typedefs, there is no need to hide the
fact that structures are structures.  Fix all dependencies.
2003-10-12 01:00:44 +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
413f8cbabd * fish.c: Convert to calling vfs_register_class().
* fish.h: Eliminate.  Adjust all dependencies.
* direntry.c (vfs_s_init_class): Add missing vfs_s_setctl().
2003-10-10 23:38:03 +00:00