Commit Graph

5913 Commits

Author SHA1 Message Date
Pavel Roskin
4bc92accff * editcmd.c (edit_mail_dialog): Trivial clean-up. 2003-11-03 18:59:50 +00:00
Pavel Roskin
fce80af570 * widget.[ch] (listbox_search_text): Constify "text" argument.
(listbox_add_item): Ditto.

* find.c (add_to_list): Make inline.
(stop_idle): Ditto.
(status_update): Ditto.
(get_list_info): Ditto.

(push_directory): Constify "dir" argument and use
concat_dir_and_file() instead of g_strdup().

(find_add_match): Constify "dir" and "file" arguments.
(insert_file): Ditto. Don't append trailing PATH_SEP, it's done
in push_directory().

(search_content): Constify "directory" and "filename" arguments.
(do_search): Make "directory" char * instead of char[].
2003-10-30 16:43:22 +00:00
Pavel Roskin
f613c51eb5 * HACKING: New file - technical documentation for VFS.
* Makefile.am: Distribute it.
2003-10-30 06:00:41 +00:00
Pavel Roskin
24dd87b714 * vfs.c (vfs_rmstamp): Rescan the tree after the parents have
been removed.  Otherwise using old data causes data corruption
in some combinations (e.g. extfs inside tatfs).
2003-10-30 05:58:06 +00:00
Pavel Roskin
6f9f431ae6 Initial version of technical documentation for VFS. 2003-10-30 05:52:35 +00:00
Pavel Roskin
cb2aaf4c16 * extfs.c: Remove current_dir field, its role was purely
decorative.  Rename names starting with underscore.
2003-10-29 23:16:31 +00:00
Pavel Roskin
f2550b08ee * extfs.h: Merge ...
* extfs.c: ... here.
* Makefile.am: Remove extfs.h.
2003-10-29 23:05:27 +00:00
Pavel Roskin
c6d7467b7b * acinclude.m4 (MC_UNDELFS_CHECKS): Don't use internal Autoconf variables. 2003-10-29 22:17:41 +00:00
Pavel Roskin
8d5dc47ad7 * configure.in: Rewrite check for mmap() to avoid using internal
variables of Autoconf.  Rename the rest of ac_cv_* to mc_cv_*.
2003-10-29 19:23:16 +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
cea13079c3 * ftpfs.c: Use HAVE_STRUCT_LINGER_L_LINGER instead of
HAVE_STRUCT_LINGER.
2003-10-29 17:23:35 +00:00
Pavel Roskin
b733f1fa6e * acinclude.m4 (AC_STRUCT_LINGER): Remove, use AC_CHECK_MEMBERS
instead.
2003-10-29 17:18:15 +00:00
Pavel Roskin
8bc40b44f0 Fix includes not to rely on $(top_srcdir) being in the include path. 2003-10-29 08:54:22 +00:00
Pavel Roskin
e7663c1086 Document --disable-background and --disable-netcode. 2003-10-29 08:34:53 +00:00
Pavel Roskin
05b1a3f2c1 Add enable_netcode=no to the last "rarely used" configuration. 2003-10-29 08:18:15 +00:00
Pavel Roskin
afbc365860 * configure.in: Define SLANG_POSIX_SIGNALS if all 4 required
functions are present.  Remove references to extraconf.h.
* extraconf.h: Eliminate.
* Makefile.am: Remove extraconf.h.
2003-10-29 08:15:32 +00:00
Pavel Roskin
036d1d4602 * fsusage.c: Merge ...
* mountlist.c: ... here.  These files are closely related.  Move
some defines from extraconf.h here.
* fsusage.h: Remove.
* Makefile.am: Remove fsusage.c and fsusage.h.
2003-10-29 08:12:44 +00:00
Pavel Roskin
6b4f397f5b * Makefile.am: Compile utilvfs.c even without USE_VFS_NET.
* utilvfs.c (vfs_split_url): Only compile with USE_NETCODE
defined.
2003-10-29 07:19:25 +00:00
Pavel Roskin
5f35b799bb No need to undefine USE_NETCODE. 2003-10-29 06:58:14 +00:00
Pavel Roskin
3315f35e31 * configure.in: Move ext2fs undelete support ...
* acinclude.m4 (MC_WITH_VFS): ... here.
* extraconf.h: Remove VFS logic, it's enforced in configure now.
2003-10-29 06:55:41 +00:00
Pavel Roskin
fc7dc2ba67 * acinclude.m4 (MC_WITH_VFS): Use AC_SEARCH_LIBS when possible.
Allow disabling network code by --disable-netcode.
2003-10-29 06:41:41 +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
af86cebacd * configure.in: Don't check if "file" can use stdin - it's
unused now.
2003-10-29 01:25:42 +00:00
Pavel Roskin
87206cfeb5 * ext.c (regex_check_type): Use mc_getlocalcopy() instead of
piping first 8k to "file".  If the user selected the file, we
are likely to need the whole file.  Besides, mc_getlocalcopy()
on ftpfs and fish shares file cache with other VFS operations.
(get_file_type_pipe): Remove.
(mc_doublepopen): Likewise.
(mc_doublepclose): Likewise.
2003-10-29 01:15:16 +00:00
Pavel Roskin
edce41facd * utilvfs.c (vfs_mkstemps): New function - create temporary file
with the name resembling the original, but safe for scripts.
* direntry.c (vfs_s_open): Use it.
(vfs_s_retrieve_file): Likewise.
* extfs.c (extfs_open): Likewise.
* sfs.c (sfs_redirect): Likewise.
2003-10-29 00:50:36 +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
bb184c9c8b Typo in the last commit. 2003-10-28 08:47:04 +00:00
Pavel Roskin
67cd859ea3 * direntry.c (vfs_s_init_class): Use our getlocalcopy for remote
filesystems that cache files, not for archives.
(vfs_s_getlocalcopy): Corresponding changes.
2003-10-28 08:20:30 +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
520f6ddb6c * vfs.c (mc_def_getlocalcopy): Use O_LINEAR when retrieving the
remote file.  This avoids an extra temporary file.
2003-10-27 21:55:06 +00:00
Pavel Roskin
ffddff51ea * utilunix.c: Move mc_doublepopen() and mc_doublepclose() ...
* ext.c: ... where they are used.
2003-10-27 21:51:48 +00:00
Pavel Roskin
4ee3f26133 * cpio.c (cpio_ungetlocalcopy): Remove.
* tar.c (tar_ungetlocalcopy): Likewise.
* vfs.c (mc_def_ungetlocalcopy): Add support for read-only
filesystems.
2003-10-27 21:01:00 +00:00
Pavel Roskin
0e71b37f2a Don't include background.h if it's not needed.
If needed, add explanation.
2003-10-27 17:36:19 +00:00
Pavel Roskin
e829a85981 * slint.c (mc_refresh): Revert last change - it breaks screen
restoring on rxvt.
2003-10-27 17:34:57 +00:00
Pavel Roskin
1ddf30732b * tree.c (tree_rmdir_cmd): Don't change to the root directory -
it's not needed now.
2003-10-27 17:21:13 +00:00
Pavel Roskin
2bf7ae1b6c * win.c (check_movement_keys): Add support for Ctrl-PgDown,
Ctrl-PgUp, Ctrl-Home and Ctrl-End.
2003-10-27 05:59:03 +00:00
Pavel Roskin
bc455d5840 * direntry.c (vfs_s_find_inode): Only allow search from root.
Change second argument to superblock to prevent abuse.
2003-10-27 03:09:40 +00:00
Pavel Roskin
ad670bade6 * direntry.c (vfs_s_find_entry_tree): Eliminate buffer of fixed
size.  Don't prepare path for vfs_s_resolve_symlink().
(vfs_s_resolve_symlink): Remove unused argument "path".
2003-10-27 02:54:59 +00:00
Pavel Roskin
cc09ee51f1 Typo fixes. 2003-10-27 01:55:50 +00:00
Pavel Roskin
511321bcfd * direntry.c (vfs_s_add_dots): Remove. Fix all callers.
(vfs_s_free_inode): Remove support for "." and ".." entries.
* ftpfs.c (dir_load): Likewise.
Support for "." and ".." entries was a hack that could make the
cache non-traversible from inodes to the root and cause infinite
loop in vfs_s_fullpath().
Reported by Frédéric L. W. Meunier <lists1@pervalidus.net>
2003-10-27 01:26:18 +00:00
Pavel Roskin
290426d17a * terms.c: Merge ...
* win.c: ... here.
* Makefile.am: Remove terms.c.
2003-10-26 07:02:13 +00:00
Pavel Roskin
11afe8263e Add:
Add --disable-background option to disable background support.
Background support now uses pipes instead of UNIX sockets.
2003-10-26 06:50:00 +00:00
Pavel Roskin
24384e9a89 * panel.h: Fix duplication between cpanel and current_panel in
favor of current_panel.  Ditto opanel and other_panel.
2003-10-26 06:45:59 +00:00
Pavel Roskin
bb13ad8db4 * main.c (get_current_panel): Remove.
(get_other_panel): Move ...
* layout.c: ... here.
2003-10-26 06:32:42 +00:00
Pavel Roskin
dca92d4941 Trivial cleanup. 2003-10-26 06:16:54 +00:00
Pavel Roskin
5b876f358d * info.h: Don't expose WInfo internals. 2003-10-26 05:54:55 +00:00
Pavel Roskin
26e444a11c * background.c (tell_parent): Eliminate.
(background_attention): Use error code instead.
* file.c (panel_operate): Exit with code 0, not 1.
2003-10-26 05:42:29 +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