mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
Mon Dec 21 22:26:34 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
* mountlist.c: Define xBSD on FreeBSD. * doc/mc.sgml, mc.1.in: Deleted obsolete information about tar_gz_memlimit. Partially rewrote the section about the Virtual FS.. configuration dialog. * main.c (parse_an_arg): New function, popt callback. Option parsing in gmc was broken. The gnome*_init_with_popt_table free the option tables and gmc tried to use the option tables later. * main.c (handle_args): In the Gnome edition don't parse the options a second time. * boxes.c (configure_vfs), setup.c: Deleted obsolete options. tar.gz files are now always unzipped to a temporary file on disk. * gnome/layout: Deleted obsolete widgets from the Virtual FS configuration dialog. * vfs/tar.c: Deleted global variable tar_gzipped_memlimit. Mon Dec 21 14:28:55 1998 Norbert Warmuth <nwarmuth@privat.circular.de> * filenot.c (my_mkdir_rec): Someone broke this function completely by deleting a line. Funny things happen if you use an already freed pointer. Improved error handling: try to make directories recursivly until mkdir succeeds or fails with errno != ENOENT. Now you will get the correct error message when you don't have permission to create a directory. * mountlist.c: Deleted function prototypes for strdup and strstr, they might conflict with definitions in the system header files.
This commit is contained in:
parent
913f34276e
commit
7f3a7ac4d7
@ -1,3 +1,9 @@
|
||||
Mon Dec 21 22:26:34 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
|
||||
|
||||
* doc/mc.sgml, mc.1.in: Deleted obsolete information about
|
||||
tar_gz_memlimit. Partially rewrote the section about the
|
||||
Virtual FS.. configuration dialog.
|
||||
|
||||
1998-12-17 Christopher Blizzard <blizzard@appliedtheory.com>
|
||||
|
||||
* autogen.sh (srcdir): Honor $ACLOCAL_FLAGS when running aclocal.
|
||||
|
98
doc/mc.1.in
98
doc/mc.1.in
@ -1675,44 +1675,64 @@ Virtual File System
|
||||
.\"Virtual File System"
|
||||
information cache.
|
||||
.PP
|
||||
The Midnight Commander keeps in memory the information related to some
|
||||
of the virtual file systems to speed up the access to the files in the
|
||||
file system. Since the information that must be kept may be large
|
||||
(for example, compressed tar files may be kept in RAM for faster
|
||||
access), you may want to tune the parameters of the cached information
|
||||
to decrease your memory usage or to maximize the speed of access to
|
||||
frequently used file systems.
|
||||
The Midnight Commander keeps in memory the information
|
||||
related to some of the virtual file systems to speed up
|
||||
the access to the files in the file system (for example,
|
||||
directory listings fetched from ftp servers).
|
||||
.PP
|
||||
The Tar file system is quite clever about how it handles tar files: it
|
||||
just loads the directory entries and when it needs to use the
|
||||
information contained in the tar file, it goes and grab it.
|
||||
Moreover in order to access the contents of compressed files
|
||||
(for eaxample, compressed tar files) the Midnight Commander
|
||||
has to create a temporary uncompressed file on your disk.
|
||||
.PP
|
||||
In the wild, tar files are usually kept compressed (plain tar files
|
||||
are species in extinction), and because of the nature of those files
|
||||
(the directory entries for the tar files is not there waiting for us
|
||||
to be loaded), the tar file system has two choices: load the complete,
|
||||
uncompressed tar file into memory or uncompress the file in the disk
|
||||
in a temporary location and then access the uncompressed file as a
|
||||
regular tar file.
|
||||
Since both the information in memory and the temporary files on
|
||||
disk take up resources, you may want to tune the parameters of
|
||||
the cached information to decrease your resource usage or to maximize
|
||||
the speed of access to frequently used file systems.
|
||||
.PP
|
||||
In this dialog box you tell the Midnight Commander which sizes for
|
||||
compressed tar files you will tolerate to load into your precious
|
||||
memory. The default setting is set to one megabyte, this means that
|
||||
compressed tar files whose size is at most one megabyte will be loaded
|
||||
into core, otherwise a temporary uncompressed tar file will be created
|
||||
to access the contents (all of this is transparent to the user).
|
||||
The Tar file system is quite clever about how it handles
|
||||
tar files: it just loads the directory entries and when it
|
||||
needs to use the information contained in the tar file, it
|
||||
goes and grab it.
|
||||
.PP
|
||||
The program will let you add a suffix to specify the units of the
|
||||
number you typed in, use 'k' for kilobyte and 'm' for megabyte. Our
|
||||
routine does not accept floating point numbers, so you can't use
|
||||
".5 m" to specify 512 kilobytes, you will have to use "512 k" instead.
|
||||
In the wild, tar files are usually kept compressed (plain
|
||||
tar files are species in extinction), and because of the
|
||||
nature of those files (the directory entries for the tar
|
||||
files is not there waiting for us to be loaded), the tar
|
||||
file system has to uncompress the file
|
||||
on the disk in a temporary location and then access the
|
||||
uncompressed file as a regular tar file.
|
||||
.PP
|
||||
Now, since we all love to browse files and tar files all over the
|
||||
disk, it's common that you will leave a tar file and the re-enter it
|
||||
later. Since uncompression is slow, the Midnight Commander will cache
|
||||
the information in memory for a limited amount of time, after you hit
|
||||
the timeout, all of the memory resources associated with the file
|
||||
system will be freed. The default timeout is set to one minute.
|
||||
Now, since we all love to browse files and tar files all
|
||||
over the disk, it's common that you will leave a tar file
|
||||
and the re-enter it later. Since uncompression is slow,
|
||||
the Midnight Commander will cache the information in
|
||||
memory for a limited amount of time, after you hit the
|
||||
timeout, all of the resources associated with the
|
||||
file system will be freed. The default timeout is set to
|
||||
one minute.
|
||||
.PP
|
||||
The
|
||||
.\"LINK2"
|
||||
FTP File System
|
||||
.\"FTP File System"
|
||||
keeps the directory listing it fetches from a ftp server
|
||||
in a cache. The cache
|
||||
expire time is configurable with the
|
||||
.I ftpfs directory cache timeout
|
||||
option.
|
||||
A low value for this
|
||||
option may slow down every operation on the ftp file System
|
||||
because every operation is accompanied by a query of the
|
||||
ftp server.
|
||||
.PP
|
||||
Moreover you can define a proxy host for doing ftp transfers
|
||||
and configure the Midnight Commander to always use the proxy host.
|
||||
See
|
||||
the section on
|
||||
.\"LINK2"
|
||||
FTP File System
|
||||
.\"FTP File System"
|
||||
for more information.
|
||||
.PP
|
||||
.SH " Layout"
|
||||
The layout dialog gives you a possibility to change the general layout
|
||||
@ -2498,9 +2518,13 @@ Virtual File System
|
||||
.\"Virtual FS"
|
||||
dialog box.
|
||||
.PP
|
||||
Another option is to set the
|
||||
.I ftpfs_always_use_proxy
|
||||
parameter in the initialization file. This will configure the program
|
||||
Another option to set is the
|
||||
.I Always use ftp proxy
|
||||
option in the
|
||||
.\"LINK2"
|
||||
Virtual File System
|
||||
.\"Virtual FS"
|
||||
dialog box. This will configure the program
|
||||
to always use the proxy host. If this variable is set, the program
|
||||
will do two things: consult the @prefix@/lib/mc.no_proxy file for
|
||||
lines containing host names that are local (if the host name starts
|
||||
@ -2510,7 +2534,7 @@ hostnames without dots in their names are directly accessible.
|
||||
If you are using the ftpfs code with a filtering packet router that
|
||||
does not allow you to use the regular mode of opening files, you may
|
||||
want to force the program to use the passive-open mode. To use this,
|
||||
set the ftpfs_use_passive_connections option.
|
||||
set the ftpfs_use_passive_connections option in the initialization file.
|
||||
.PP
|
||||
The Midnight Commander keeps the directory listing in a cache. The cache
|
||||
expire time is configurable in the
|
||||
|
61
doc/mc.sgml
61
doc/mc.sgml
@ -387,7 +387,7 @@ that are otherwise interpreted by the Midnight Commander
|
||||
<tag/M-p, M-n/ Use these keys to browse through the command
|
||||
history. M-p takes you to the last entry, M-n takes you to
|
||||
the next one.
|
||||
<tag/M-h> Displays the history for the current input line.
|
||||
<tag/M-h/ Displays the history for the current input line.
|
||||
</descrip>
|
||||
|
||||
<sect1>General Movement Keys<label id="General Movement Keys">
|
||||
@ -1375,11 +1375,16 @@ This option gives you control over the settings of the
|
||||
|
||||
The Midnight Commander keeps in memory the information
|
||||
related to some of the virtual file systems to speed up
|
||||
the access to the files in the file system. Since the
|
||||
information that must be kept may be large (for example,
|
||||
compressed tar files may be kept in RAM for faster
|
||||
access), you may want to tune the parameters of the cached
|
||||
information to decrease your memory usage or to maximize
|
||||
the access to the files in the file system (for example,
|
||||
directory listings fetched from ftp servers).
|
||||
|
||||
Moreover in order to access the contents of compressed files
|
||||
(for eaxample, compressed tar files) the Midnight Commander
|
||||
has to create a temporary uncompressed file on your disk.
|
||||
|
||||
Since both the information in memory and the temporary files on
|
||||
disk take up resources, you may want to tune the parameters of
|
||||
the cached information to decrease your resource usage or to maximize
|
||||
the speed of access to frequently used file systems.
|
||||
|
||||
The Tar file system is quite clever about how it handles
|
||||
@ -1391,35 +1396,33 @@ In the wild, tar files are usually kept compressed (plain
|
||||
tar files are species in extinction), and because of the
|
||||
nature of those files (the directory entries for the tar
|
||||
files is not there waiting for us to be loaded), the tar
|
||||
file system has two choices: load the complete,
|
||||
uncompressed tar file into memory or uncompress the file
|
||||
in the disk in a temporary location and then access the
|
||||
file system has to uncompress the file
|
||||
on the disk in a temporary location and then access the
|
||||
uncompressed file as a regular tar file.
|
||||
|
||||
In this dialog box you tell the Midnight Commander which
|
||||
sizes for compressed tar files you will tolerate to load
|
||||
into your precious memory. The default setting is set to
|
||||
one megabyte, this means that compressed tar files whose
|
||||
size is at most one megabyte will be loaded into core,
|
||||
otherwise a temporary uncompressed tar file will be
|
||||
created to access the contents (all of this is transparent
|
||||
to the user).
|
||||
|
||||
The program will let you add a suffix to specify the units
|
||||
of the number you typed in, use 'k' for kilobyte and 'm'
|
||||
for megabyte. Our routine does not accept floating point
|
||||
numbers, so you can't use ".5 m" to specify 512 kilobytes,
|
||||
you will have to use "512 k" instead.
|
||||
|
||||
Now, since we all love to browse files and tar files all
|
||||
over the disk, it's common that you will leave a tar file
|
||||
and the re-enter it later. Since uncompression is slow,
|
||||
the Midnight Commander will cache the information in
|
||||
memory for a limited amount of time, after you hit the
|
||||
timeout, all of the memory resources associated with the
|
||||
timeout, all of the resources associated with the
|
||||
file system will be freed. The default timeout is set to
|
||||
one minute.
|
||||
|
||||
The <lnk name ="FTP File System" id="FTP File System">
|
||||
keeps the directory listing it fetches from a ftp server
|
||||
in a cache. The cache
|
||||
expire time is configurable with the option
|
||||
<em/ftpfs directory cache timeout/. A low value for this
|
||||
option may slow down every operation on the ftp file System
|
||||
because every operation is accompanied by a query of the
|
||||
ftp server.
|
||||
|
||||
Moreover you can define a proxy host for doing ftp transfers
|
||||
and configure the Midnight Commander to always use the proxy host. See
|
||||
the section on <lnk name ="FTP File System" id="FTP File System">
|
||||
for more information.
|
||||
|
||||
<sect2>Layout<label id="Layout">
|
||||
|
||||
<p>
|
||||
@ -2127,8 +2130,9 @@ Midnight Commander use a proxy host for doing the ftp transfer. You
|
||||
can define the proxy host in the <lnk name="Virtual FS" id="Virtual FS">
|
||||
Virtual File System dialog box.
|
||||
|
||||
Another option is to set the <em/ftpfs_always_use_proxy/
|
||||
parameter in the initialization file. This will configure the program
|
||||
Another option to set is the <em/Always use ftp proxy/
|
||||
option in the <lnk name="Virtual FS" id="Virtual FS">
|
||||
dialog box. This will configure the program
|
||||
to always use the proxy host. If this variable is set, the program
|
||||
will do two things: consult the <tt>@prefix@/lib/mc.no_proxy</tt> file for
|
||||
lines containing host names that are local (if the host name starts
|
||||
@ -2138,7 +2142,7 @@ hostnames without dots in their names are directly accessible.
|
||||
If you are using the ftpfs code with a filtering packet router that
|
||||
does not allow you to use the regular mode of opening files, you may
|
||||
want to force the program to use the passive-open mode. To use this,
|
||||
set the <em/ftpfs_use_passive_connections/ option.
|
||||
set the <em/ftpfs_use_passive_connections/ option in the initialization file.
|
||||
|
||||
The Midnight Commander keeps the directory listing in a cache. The cache
|
||||
expire time is configurable in the <lnk name="Virtual FS" id="Virtual FS">
|
||||
@ -2238,6 +2242,7 @@ Examples:
|
||||
|
||||
<sect1>Undelete File System<label id="Undelete File System">
|
||||
|
||||
<p>
|
||||
On Linux systems, if you asked configure to use the ext2fs undelete
|
||||
facilities, you will have the undelete file system available.
|
||||
Recovery of deleted files is only available on ext2 file systems. The
|
||||
|
@ -1,3 +1,8 @@
|
||||
Mon Dec 21 22:33:07 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
|
||||
|
||||
* layout: Deleted obsolete widgets from the Virtual FS configuration
|
||||
dialog.
|
||||
|
||||
1998-12-17 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* gscreen.c (panel_icon_list_select_icon): Show the popup menu on
|
||||
|
52
gnome/layout
52
gnome/layout
@ -516,57 +516,45 @@ geometry=2,1,1,1
|
||||
flags=
|
||||
|
||||
[quick_vfs-Widget-label-pass]
|
||||
geometry=1,4,1,1
|
||||
flags=
|
||||
geometry=1,2,1,1
|
||||
flags=w
|
||||
|
||||
[quick_vfs-Widget-button-ok]
|
||||
geometry=5,1,1,1
|
||||
flags=ew
|
||||
|
||||
[quick_vfs-Widget-input-limit]
|
||||
geometry=2,3,1,1
|
||||
flags=s
|
||||
|
||||
[quick_vfs-Widget-input-ftp-proxy]
|
||||
geometry=2,6,1,1
|
||||
flags=
|
||||
|
||||
[quick_vfs-Widget-label-tar]
|
||||
geometry=1,2,1,1
|
||||
flags=w
|
||||
|
||||
[quick_vfs-Widget-label-cache]
|
||||
geometry=1,5,1,1
|
||||
flags=w
|
||||
|
||||
[quick_vfs-Widget-input-timeout]
|
||||
geometry=2,5,1,1
|
||||
flags=
|
||||
|
||||
[quick_vfs-Widget-check-ftp-proxy]
|
||||
geometry=1,6,1,1
|
||||
flags=
|
||||
|
||||
[quick_vfs-Widget-input-passwd]
|
||||
geometry=2,4,1,1
|
||||
flags=
|
||||
|
||||
[quick_vfs-Widget-label-cache]
|
||||
geometry=1,3,1,1
|
||||
flags=w
|
||||
|
||||
[quick_vfs-Widget-input-timeout]
|
||||
geometry=2,3,1,1
|
||||
flags=
|
||||
|
||||
[quick_vfs-Widget-check-ftp-proxy]
|
||||
geometry=1,4,1,1
|
||||
flags=w
|
||||
|
||||
[quick_vfs-Widget-input-passwd]
|
||||
geometry=2,2,1,1
|
||||
flags=
|
||||
|
||||
[quick_vfs-Widget-label-sec]
|
||||
geometry=3,5,1,1
|
||||
geometry=3,3,1,1
|
||||
flags=
|
||||
|
||||
[quick_vfs-Widget-button-cancel]
|
||||
geometry=5,2,1,1
|
||||
flags=
|
||||
flags=ew
|
||||
|
||||
[quick_vfs-Widget-label-sec2]
|
||||
geometry=3,1,1,1
|
||||
flags=
|
||||
|
||||
[quick_vfs-Widget-radio]
|
||||
geometry=1,3,1,1
|
||||
flags=e
|
||||
|
||||
[sort-Widget-case-check]
|
||||
geometry=3,2,1,1
|
||||
flags=w
|
||||
|
@ -1,3 +1,28 @@
|
||||
Mon Dec 21 22:39:35 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
|
||||
* mountlist.c: Define xBSD on FreeBSD.
|
||||
|
||||
* main.c (parse_an_arg): New function, popt callback. Option
|
||||
parsing in gmc was broken. The gnome*_init_with_popt_table free
|
||||
the option tables and gmc tried to use the option tables later.
|
||||
|
||||
* main.c (handle_args): In the Gnome edition don't parse the
|
||||
options a second time.
|
||||
|
||||
* boxes.c (configure_vfs), setup.c: Deleted obsolete options.
|
||||
tar.gz files are now always unzipped to a temporary file on disk.
|
||||
|
||||
Mon Dec 21 14:28:55 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
|
||||
|
||||
* filenot.c (my_mkdir_rec): Someone broke this completely by deleting
|
||||
a line. Funny things happen if you use an already freed pointer.
|
||||
Improved error handling: try to make directories recursivly until
|
||||
mkdir succeeds or fails with errno != ENOENT. Now you will get the
|
||||
correct error message when you don't have permission to create a
|
||||
directory.
|
||||
|
||||
* mountlist.c: Deleted function prototypes for strdup and strstr,
|
||||
they might conflict with definitions in the system header files.
|
||||
|
||||
Wed Dec 16 14:41:15 1998 Paul Sheer <psheer@obsidian.co.za>
|
||||
|
||||
* gtkedit.c, editwidget.c: gnome selection now works with the
|
||||
|
66
src/boxes.c
66
src/boxes.c
@ -612,15 +612,14 @@ tree (char *current_dir)
|
||||
#ifdef USE_VFS
|
||||
|
||||
#if defined(USE_NETCODE)
|
||||
#define VFSY 15
|
||||
#define VFSY 12
|
||||
#else
|
||||
#define VFSY 11
|
||||
#define VFSY 8
|
||||
#endif
|
||||
|
||||
#define VFSX 56
|
||||
|
||||
extern int vfs_timeout;
|
||||
extern int tar_gzipped_memlimit;
|
||||
extern int ftpfs_always_use_proxy;
|
||||
|
||||
#if defined(USE_NETCODE)
|
||||
@ -629,9 +628,7 @@ extern char *ftpfs_proxy_host;
|
||||
extern int use_netrc;
|
||||
#endif
|
||||
|
||||
int vfs_use_limit = 1;
|
||||
static char *ret_timeout;
|
||||
static char *ret_limit;
|
||||
|
||||
#if defined(USE_NETCODE)
|
||||
static char *ret_passwd;
|
||||
@ -646,36 +643,27 @@ static int ret_use_netrc;
|
||||
'U', 0, 0, &ret_use_netrc, 0, XV_WLAY_BELOWCLOSE, "" },
|
||||
#endif
|
||||
|
||||
char *confvfs_str [] =
|
||||
{ N_("Always to memory"), N_("If size less than:") };
|
||||
|
||||
static QuickWidget confvfs_widgets [] = {
|
||||
{ quick_button, 30, VFSX, VFSY - 3, VFSY, N_("&Cancel"),
|
||||
0, B_CANCEL, 0, 0, XV_WLAY_RIGHTOF, "button-cancel" },
|
||||
{ quick_button, 12, VFSX, VFSY - 3, VFSY, N_("&Ok"),
|
||||
0, B_ENTER, 0, 0, XV_WLAY_CENTERROW, "button-ok" },
|
||||
#if defined(USE_NETCODE)
|
||||
{ quick_input, 30, VFSX, 10, VFSY, "", 22, 0, 0, &ret_ftp_proxy,
|
||||
{ quick_input, 30, VFSX, 7, VFSY, "", 22, 0, 0, &ret_ftp_proxy,
|
||||
XV_WLAY_RIGHTDOWN, "input-ftp-proxy" },
|
||||
{ quick_checkbox, 4, VFSX, 10, VFSY, N_("&Always use ftp proxy"), 0, 0,
|
||||
{ quick_checkbox, 4, VFSX, 7, VFSY, N_("&Always use ftp proxy"), 0, 0,
|
||||
&ftpfs_always_use_proxy, 0, XV_WLAY_RIGHTDOWN, "check-ftp-proxy" },
|
||||
{ quick_label, 46, VFSX, 9, VFSY, N_("sec"),
|
||||
{ quick_label, 46, VFSX, 6, VFSY, N_("sec"),
|
||||
0, 0, 0, 0, XV_WLAY_RIGHTOF, "label-sec" },
|
||||
{ quick_input, 35, VFSX, 9, VFSY, "", 10, 0, 0, &ret_directory_timeout,
|
||||
{ quick_input, 35, VFSX, 6, VFSY, "", 10, 0, 0, &ret_directory_timeout,
|
||||
XV_WLAY_RIGHTDOWN, "input-timeout" },
|
||||
{ quick_label, 4, VFSX, 9, VFSY, N_("ftpfs directory cache timeout:"),
|
||||
{ quick_label, 4, VFSX, 6, VFSY, N_("ftpfs directory cache timeout:"),
|
||||
0, 0, 0, 0, XV_WLAY_NEXTROW, "label-cache"},
|
||||
{ quick_input, 28, VFSX, 8, VFSY, "", 24, 0, 0, &ret_passwd,
|
||||
{ quick_input, 28, VFSX, 5, VFSY, "", 24, 0, 0, &ret_passwd,
|
||||
XV_WLAY_RIGHTDOWN, "input-passwd" },
|
||||
{ quick_label, 4, VFSX, 8, VFSY, N_("ftp anonymous password:"),
|
||||
{ quick_label, 4, VFSX, 5, VFSY, N_("ftp anonymous password:"),
|
||||
0, 0, 0, 0, XV_WLAY_NEXTROW, "label-pass"},
|
||||
#endif
|
||||
{ quick_input, 26, VFSX, 6, VFSY, "", 10, 0, 0, &ret_limit,
|
||||
XV_WLAY_RIGHTDOWN, "input-limit" },
|
||||
{ quick_radio, 4, VFSX, 5, VFSY, "", 2, 0,
|
||||
&vfs_use_limit, confvfs_str, XV_WLAY_BELOWCLOSE, "radio" },
|
||||
{ quick_label, 4, VFSX, 4, VFSY, N_("Gzipped tar archive extract:"),
|
||||
0, 0, 0, 0, XV_WLAY_NEXTROW, "label-tar" },
|
||||
{ quick_label, 46, VFSX, 3, VFSY, "sec",
|
||||
0, 0, 0, 0, XV_WLAY_RIGHTOF, "label-sec2" },
|
||||
{ quick_input, 35, VFSX, 3, VFSY, "", 10, 0, 0, &ret_timeout,
|
||||
@ -697,28 +685,13 @@ static QuickDialog confvfs_dlg =
|
||||
void
|
||||
configure_vfs (void)
|
||||
{
|
||||
char buffer1 [15], buffer2 [15];
|
||||
char buffer2[15];
|
||||
#if defined(USE_NETCODE)
|
||||
char buffer3[15];
|
||||
#endif
|
||||
|
||||
if (tar_gzipped_memlimit > -1) {
|
||||
if (tar_gzipped_memlimit == 0)
|
||||
strcpy (buffer1, "0 B");
|
||||
else if ((tar_gzipped_memlimit % (1024*1024)) == 0) /* I.e. in M */
|
||||
sprintf (buffer1, "%i MB", (int)(((unsigned)tar_gzipped_memlimit) >> 20));
|
||||
else if ((tar_gzipped_memlimit % 1024) == 0) /* I.e. in K */
|
||||
sprintf (buffer1, "%i KB", (int)(((unsigned)tar_gzipped_memlimit) >> 10));
|
||||
else if ((tar_gzipped_memlimit % 1000) == 0)
|
||||
sprintf (buffer1, "%i kB", (int)(tar_gzipped_memlimit / 1000));
|
||||
else
|
||||
sprintf (buffer1, "%i B", (int)tar_gzipped_memlimit);
|
||||
confvfs_widgets [2 + VFS_WIDGETBASE].text = buffer1;
|
||||
} else
|
||||
confvfs_widgets [2 + VFS_WIDGETBASE].text = "5 MB";
|
||||
sprintf (buffer2, "%i", vfs_timeout);
|
||||
confvfs_widgets [6 + VFS_WIDGETBASE].text = buffer2;
|
||||
confvfs_widgets [3 + VFS_WIDGETBASE].value = vfs_use_limit;
|
||||
confvfs_widgets [3 + VFS_WIDGETBASE].text = buffer2;
|
||||
#if defined(USE_NETCODE)
|
||||
ret_use_netrc = use_netrc;
|
||||
sprintf(buffer3, "%i", ftpfs_directory_timeout);
|
||||
@ -734,23 +707,6 @@ configure_vfs (void)
|
||||
free (ret_timeout);
|
||||
if (vfs_timeout < 0 || vfs_timeout > 10000)
|
||||
vfs_timeout = 10;
|
||||
if (!vfs_use_limit)
|
||||
tar_gzipped_memlimit = -1;
|
||||
else {
|
||||
tar_gzipped_memlimit = atoi (ret_limit);
|
||||
if (tar_gzipped_memlimit < 0)
|
||||
tar_gzipped_memlimit = -1;
|
||||
else {
|
||||
for (p = ret_limit; *p == ' ' || (*p >= '0' && *p <= '9'); p++);
|
||||
switch (*p) {
|
||||
case 'm':
|
||||
case 'M': tar_gzipped_memlimit <<= 20; break;
|
||||
case 'K': tar_gzipped_memlimit <<= 10; break;
|
||||
case 'k': tar_gzipped_memlimit *= 1000; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
free (ret_limit);
|
||||
#if defined(USE_NETCODE)
|
||||
free(ftpfs_anonymous_passwd);
|
||||
ftpfs_anonymous_passwd = ret_passwd;
|
||||
|
@ -33,17 +33,20 @@ my_mkdir_rec (char *s, mode_t mode)
|
||||
|
||||
if (!mc_mkdir (s, mode))
|
||||
return 0;
|
||||
else if (errno != ENOENT)
|
||||
return -1;
|
||||
|
||||
/* FIXME: should check instead if s is at the root of that filesystem */
|
||||
if (!vfs_file_is_local (s))
|
||||
return -1;
|
||||
|
||||
if (!strcmp (s, PATH_SEP_STR))
|
||||
return ENOTDIR;
|
||||
if (!strcmp (s, PATH_SEP_STR)) {
|
||||
errno = ENOTDIR;
|
||||
return -1;
|
||||
}
|
||||
|
||||
p = concat_dir_and_file (s, "..");
|
||||
|
||||
|
||||
q = vfs_canon (p);
|
||||
free (p);
|
||||
|
||||
if (!(result = my_mkdir_rec (q, mode)))
|
||||
|
19
src/main.c
19
src/main.c
@ -2595,11 +2595,25 @@ process_args (int c, char *option_arg)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_GNOME
|
||||
static void parse_an_arg (poptContext state,
|
||||
enum poptCallbackReason reason,
|
||||
const struct poptOption *opt,
|
||||
const char *arg, void *data)
|
||||
{
|
||||
process_args (opt->shortName, arg);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
char *cmdline_geometry = NULL;
|
||||
int nowindows = 0;
|
||||
char **directory_list = NULL;
|
||||
|
||||
static struct poptOption argument_table [] = {
|
||||
#ifdef HAVE_GNOME
|
||||
{ NULL, '\0', POPT_ARG_CALLBACK, parse_an_arg, 0},
|
||||
#endif
|
||||
#ifdef WITH_BACKGROUND
|
||||
{ "background", 'B', POPT_ARG_NONE, &background_wait, 0 },
|
||||
#endif
|
||||
@ -2683,7 +2697,8 @@ handle_args (int argc, char *argv [])
|
||||
SLtt_Try_Termcap = 1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef HAVE_GNOME
|
||||
while ((c = poptGetNextOpt (ctx)) > 0){
|
||||
option_arg = poptGetOptArg (ctx);
|
||||
|
||||
@ -2697,7 +2712,7 @@ handle_args (int argc, char *argv [])
|
||||
poptStrerror (c));
|
||||
finish_program = 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
probably_finish_program ();
|
||||
|
||||
/*
|
||||
|
108
src/mc.hlp
108
src/mc.hlp
@ -1497,12 +1497,19 @@ This option gives you control over the settings of the
|
||||
|
||||
The Midnight Commander keeps in memory the information
|
||||
related to some of the virtual file systems to speed up
|
||||
the access to the files in the file system. Since the
|
||||
information that must be kept may be large (for example,
|
||||
compressed tar files may be kept in RAM for faster
|
||||
access), you may want to tune the parameters of the cached
|
||||
information to decrease your memory usage or to maximize
|
||||
the speed of access to frequently used file systems.
|
||||
the access to the files in the file system (for example,
|
||||
directory listings fetched from ftp servers).
|
||||
|
||||
Moreover in order to access the contents of compressed
|
||||
files (for eaxample, compressed tar files) the Midnight
|
||||
Commander has to create a temporary uncompressed file on
|
||||
your disk.
|
||||
|
||||
Since both the information in memory and the temporary
|
||||
files on disk take up resources, you may want to tune the
|
||||
parameters of the cached information to decrease your
|
||||
resource usage or to maximize the speed of access to
|
||||
frequently used file systems.
|
||||
|
||||
The Tar file system is quite clever about how it handles
|
||||
tar files: it just loads the directory entries and when it
|
||||
@ -1513,34 +1520,30 @@ In the wild, tar files are usually kept compressed (plain
|
||||
tar files are species in extinction), and because of the
|
||||
nature of those files (the directory entries for the tar
|
||||
files is not there waiting for us to be loaded), the tar
|
||||
file system has two choices: load the complete,
|
||||
uncompressed tar file into memory or uncompress the file
|
||||
in the disk in a temporary location and then access the
|
||||
uncompressed file as a regular tar file.
|
||||
|
||||
In this dialog box you tell the Midnight Commander which
|
||||
sizes for compressed tar files you will tolerate to load
|
||||
into your precious memory. The default setting is set to
|
||||
one megabyte, this means that compressed tar files whose
|
||||
size is at most one megabyte will be loaded into core,
|
||||
otherwise a temporary uncompressed tar file will be
|
||||
created to access the contents (all of this is transparent
|
||||
to the user).
|
||||
|
||||
The program will let you add a suffix to specify the units
|
||||
of the number you typed in, use 'k' for kilobyte and 'm'
|
||||
for megabyte. Our routine does not accept floating point
|
||||
numbers, so you can't use ".5 m" to specify 512 kilobytes,
|
||||
you will have to use "512 k" instead.
|
||||
file system has to uncompress the file on the disk in a
|
||||
temporary location and then access the uncompressed file
|
||||
as a regular tar file.
|
||||
|
||||
Now, since we all love to browse files and tar files all
|
||||
over the disk, it's common that you will leave a tar file
|
||||
and the re-enter it later. Since uncompression is slow,
|
||||
the Midnight Commander will cache the information in
|
||||
memory for a limited amount of time, after you hit the
|
||||
timeout, all of the memory resources associated with the
|
||||
file system will be freed. The default timeout is set to
|
||||
one minute.
|
||||
timeout, all of the resources associated with the file
|
||||
system will be freed. The default timeout is set to one
|
||||
minute.
|
||||
|
||||
The FTP File SystemFTP File System keeps the directory listing it
|
||||
fetches from a ftp server in a cache. The cache expire
|
||||
time is configurable with the ftpfs directory cache
|
||||
timeout option. A low value for this option may slow down
|
||||
every operation on the ftp file System because every
|
||||
operation is accompanied by a query of the ftp server.
|
||||
|
||||
Moreover you can define a proxy host for doing ftp
|
||||
transfers and configure the Midnight Commander to always
|
||||
use the proxy host. See the section on FTP File SystemFTP File System
|
||||
for more information.
|
||||
|
||||
[Layout]
|
||||
Layout
|
||||
@ -2233,21 +2236,22 @@ the double slash) to make the Midnight Commander use a
|
||||
proxy host for doing the ftp transfer. You can define the
|
||||
proxy host in the Virtual File SystemVirtual FS dialog box.
|
||||
|
||||
Another option is to set the ftpfs_always_use_proxy
|
||||
parameter in the initialization file. This will configure
|
||||
the program to always use the proxy host. If this variable
|
||||
is set, the program will do two things: consult the
|
||||
@prefix@/lib/mc.no_proxy file for lines containing host
|
||||
names that are local (if the host name starts with a dot,
|
||||
it is assumed to be a domain) and to assume that any
|
||||
hostnames without dots in their names are directly
|
||||
accessible.
|
||||
Another option to set is the Always use ftp proxy option
|
||||
in the Virtual File SystemVirtual FS dialog box. This will
|
||||
configure the program to always use the proxy host. If
|
||||
this variable is set, the program will do two things:
|
||||
consult the @prefix@/lib/mc.no_proxy file for lines
|
||||
containing host names that are local (if the host name
|
||||
starts with a dot, it is assumed to be a domain) and to
|
||||
assume that any hostnames without dots in their names are
|
||||
directly accessible.
|
||||
|
||||
If you are using the ftpfs code with a filtering packet
|
||||
router that does not allow you to use the regular mode of
|
||||
opening files, you may want to force the program to use
|
||||
the passive-open mode. To use this, set the
|
||||
ftpfs_use_passive_connections option.
|
||||
ftpfs_use_passive_connections option in the initialization
|
||||
file.
|
||||
|
||||
The Midnight Commander keeps the directory listing in a
|
||||
cache. The cache expire time is configurable in the
|
||||
@ -2453,7 +2457,11 @@ on Special Settings).Special Settings
|
||||
The possible colors are: black, gray, red, brightred,
|
||||
green, brightgreen, brown, yellow, blue, brightblue,
|
||||
magenta, brightmagenta, cyan, brightcyan, lightgray and
|
||||
white.
|
||||
white. And there is a special keyword for transparent
|
||||
background. It is 'default'. The 'default' can only be
|
||||
used for background color. Example:
|
||||
[Colors]
|
||||
base_color=normal=white,default:marked=magenta,default
|
||||
|
||||
[Special Settings]
|
||||
Special Settings
|
||||
@ -2705,21 +2713,21 @@ AUTHORS
|
||||
|
||||
Miguel de Icaza (miguel@roxanne.nuclecu.unam.mx), Janne
|
||||
Kukonlehto (jtklehto@paju.oulu.fi), Radek Doulik
|
||||
(rodo@earn.cvut.cz), Fred Leeflang (fredl@nebula.ow.org),
|
||||
Dugan Porter (dugan@b011.eunet.es), Jakub Jelinek
|
||||
(rodo@ucw.cz), Fred Leeflang (fredl@nebula.ow.org), Dugan
|
||||
Porter (dugan@b011.eunet.es), Jakub Jelinek
|
||||
(jj@sunsite.mff.cuni.cz), Ching Hui
|
||||
(mr854307@cs.nthu.edu.tw), Andrej Borsenkow
|
||||
(borsenkow.msk@sni.de), Norbert Warmuth
|
||||
(nwarmuth@privat.circular.de), Mauricio Plaza
|
||||
(mok@roxanne.nuclecu.unam.mx) and Paul Sheer
|
||||
(psheer@icon.co.za) are the developers of this package;
|
||||
Alessandro Rubini (rubini@ipvvis.unipv.it) has been
|
||||
especially helpful debugging and enhancing the program's
|
||||
mouse support, John Davis (davis@space.mit.edu) also made
|
||||
his S-Lang library available to us under the GPL and
|
||||
answered my questions about it, and the following people
|
||||
have contributed code and many bug fixes (in alphabetical
|
||||
order):
|
||||
(mok@roxanne.nuclecu.unam.mx), Paul Sheer
|
||||
(psheer@icon.co.za) and Pavel Machek (pavel@ucw.cz) are
|
||||
the developers of this package; Alessandro Rubini
|
||||
(rubini@ipvvis.unipv.it) has been especially helpful
|
||||
debugging and enhancing the program's mouse support, John
|
||||
Davis (davis@space.mit.edu) also made his S-Lang library
|
||||
available to us under the GPL and answered my questions
|
||||
about it, and the following people have contributed code
|
||||
and many bug fixes (in alphabetical order):
|
||||
|
||||
Adam Tla/lka (atlka@sunrise.pg.gda.pl), alex@bcs.zp.ua
|
||||
(Alex I. Tkachenko), Antonio Palama, DOS port
|
||||
|
@ -98,11 +98,10 @@ void free (void *ptr);
|
||||
# define xBSD
|
||||
#endif
|
||||
|
||||
#if defined(SCO_FLAVOR) && defined(__GNUC__)
|
||||
extern char* strdup(const char*);
|
||||
#ifdef __FreeBSD__
|
||||
# define xBSD
|
||||
#endif
|
||||
|
||||
char *strstr (const char *haystack, const char *needle);
|
||||
/* void error (void); FIXME -- needed? */
|
||||
|
||||
#ifdef DOLPHIN
|
||||
|
@ -218,9 +218,7 @@ static struct {
|
||||
{ "tree_navigation_flag", &tree_navigation_flag },
|
||||
#endif
|
||||
#ifdef USE_VFS
|
||||
{ "tar_gzipped_memlimit", &tar_gzipped_memlimit },
|
||||
{ "vfs_timeout", &vfs_timeout },
|
||||
{ "vfs_use_targz_memlimit", &vfs_use_limit },
|
||||
#ifdef USE_NETCODE
|
||||
{ "ftpfs_directory_timeout", &ftpfs_directory_timeout },
|
||||
{ "use_netrc", &use_netrc },
|
||||
|
@ -1,3 +1,7 @@
|
||||
Mon Dec 21 22:55:48 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
|
||||
|
||||
* tar.c: Deleted global variable tar_gzipped_memlimit.
|
||||
|
||||
Wed Dec 16 06:36:42 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
|
||||
|
||||
* vfs.c (vfs_strip_suffix_from_filename): New function which strips
|
||||
|
Loading…
Reference in New Issue
Block a user