* direntry.c (vfs_s_find_entry_tree): segfault fixed when root is NULL
(vfs_s_new_inode, vfs_s_new_entry): g_new replaced by g_new0
* ftpfs.c (dir_load): ent->name is free()d for "." and ".."
(ftpfs_directory_timeout): default value changed to 900
(netrc_next): "const char * const keywords" go to rodata and is shared
* ftpfs.c (netrc_next): "const char * keywords" is pretty nice.
* ftpfs.c (dir_load): At last, found place, that broke handling
directories with spaces in name. Problem was in prepending "/"
to "." for current directory. Which was, obviously, wrong. Hacked
to make just "LIST -la ." instead.
* vfs.c: Changed to BUF_* constants in some places.
* utilfs.c (vfs_split_url): don't assign *pass if pass is NULL
* fish.c (archive_open, archive_same): memory allocated by
vfs_split_url () must be released after use, don't strdup()
values allocated by vfs_split_url () and NULL passed to
vfs_split_url () when password value is unused
* ftpfs.c (archive_open, archive_same): ditto plus same for
ftpfs_get_proxy_host_and_port ()
* ftpfs.c (netrc_next): Turned strange "const char * const keywords"
into more alike "const char const * keywords". Still, think, it's
too strict.
* smbfs.c: Add #define BOOL_DEFINED before inclusion of samba headers.
Libncurses(or slang?) defines BOOL and that can cause problems. (In fact,
I can't find references to that const, but sure, I hade reason to do that:)
* util-alone.h: Declare load_anon_passwd() to avoid warnings.
* vfs.c (mc_def_getlocalcopy): free() replaced by g_free() to prevent
crushes with mad, thanks to Timur I. Bakeyev <timur@bat.ru>
* fish.c (linear_start): name wasn't freed after usage
* cpio.c (cpio_ungetlocalcopy): return type changed to int,
function return 0 now
* direntry.c (vfs_s_close, vfs_s_resolve_symlink): memory, allocated
by vfs_s_fullpath () is freed after use
* ftpfs.c (linear_start): ditto;
Patch by Andrew V. Samoilov <sav@bcs.zp.ua>
* vfs.[ch] (vfs_canon, mc_open, vfs_file_is_local,
mc_(un)?getlocalcopy): added const qualifier
(mc_def_getlocalcopy): tempnam() returns malloc()ed buffer,
so, free() it, not g_free();
(vfs_canon): prepend filename by cwd when tilde '~' cannot be expanded;
* vfs/ftpfs.c: Definition of PORT changed in the middle of ftpfs.c
with unexpected side effects (only when HSC_PROXY was
defined). Introduce HSC_PROXY_PORT and FTP_COMMAND_PORT and use
where appropriate.
(dir_load): Do not hard code the directory cache timeout to 10
seconds. Instead use the setting from Options/Virtual VFS ...
* vfs/fish.c (file_store): honour changed semantics for return value
(on error -1 is expected).
* vfs/ftpfs.c (file_store): dito
* gtkedit/editcmd.c (edit_replace_prompt): fix incorrect
initialization of array of structure (gcc version 2.96 20000131
chokes on it).
* lib/mc.hint: C-y and not C-u can be used to insert text in input
lines (e. g. text which has been deleted with M-d).
* configure.in: Fix the extfs-configure-fragment-in-final-output bug
* src/main.c (parse_control_file): add missing right parentheses
* src/boxes.c: fix incorrect initialization of array of structure (gcc
version 2.96 20000131 chokes on it).
* ftpfs.c: basically replaced ftpfs with new one. Unlike the
previous one, this uses new direntry.c layer, so shared_ftp_fish.c
can be killed.
This is new code, so beware.
* ftpfs.c (insert_dots): Use g_new here.
* shared_ftpfs_fish.c: Style fixes and small fixes
1999-09-22 Bjorn Eriksson <mdeans@algonet.se>
* extfs/uzip.in: Better handling of zip-archives that contain files
which contain spaces.
* src/user.c (check_patterns): char* is used instead of char [] in sizeof
* src/util.c (string_perm): prefix named pipes by 'p' and not by `s'
1999-09-19 David Martin <dmartina@usa.net>
* gtkedit/editcmd.c (edit_print_string): Use unsigned char so that
8 bit chars from strftime get displayed when inserting date.
* lib/mc.ext.in: Add entries for bzip2 compressed pages as used in
Mandrake 6.0. The generic entry for bzip2 moved to the end of the
file to avoid interferences. In this one I changed the extension check
to a type check (as used for gzip) which might give problems in some
systems.
* configure.in: Use -Tlatin1 to format man pages when available and
"view" 8 bit chars.
1999-09-19 Norbert Warmuth <nwarmuth@privat.circular.de>
* gtkedit/edit.h: Include files reordered in order to make it compile with
--with-debug
* gtkedit/editcmd.c (menu_save_mode_cmd): calculate dialog width
dependent on lenght of translated strings to display.
* src/mad.c, mad.h, util.c, util.h: Move mad-functions from util.[ch]
to mad.[ch]
* src/option.c: Include files reordered in order to make it compile with
--with-debug
* src/mad.c (mad_init): New function. Initialize debug FILE pointer to
stderr (moved to a function because not on every system stderr is
a constant).
(mad_set_debug): added const qualifier
* src/main.c (main): call mad_init
* po/*.po: s/defination/definition/
* gnome/Makefile.in ($(MAGICDEV_GENERATED)): Make it compile with $buildir
!= $srcdir.
* vfs/ftpfs.c (ftpfs_set_debug), vfs.h: added const qualifier.
* vfs/mcserv.c: removed definition of mad_strconcat which is also
in mad.c.
* ftpfs.c (translate_path): Remove static buffer from here.
Return a strdupped string now.
(send_ftp_command): Release translate_path result here.
(open_data_connection): Release translate_path result here.
(ftpfs_chdir_internal): Reease it here too.
* lib/mc.sh: create temporary files in ~/.mc/tmp in order to avoid
symlink attacks (mcfn_install and the man page still needs to be
updated).
* src/main.c (print_mc_usage): Print the bug reporting address.
(main): Put prompt in a new line at termination.
* vfs/shared_ftp_fish.c (get_line): Fixed off by one error ('\0' might
have been written one slot past the supplied character array).
* vfs/ftpfs.c (resolve_symlink_without_ls_options): Don't dump core on
strange symlinks (ls -la doesn't reveal where the symlink points to
and ls -lLa doesn't resolve the symlink either)
Added protection against recursive symbolic links.
* src/user.c (user_menu_cmd): Allow national characters as hotkeys.
Don't dump core when the menu file contains only empty lines
* src/view.c (search, block_search): Use the correct column for the
percent display while searching.
Fri Jun 18 11:49:05 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/ftpfs.c (resolve_symlink_with_ls_options): Some ftp servers don't
make a difference between "LIST -la" and "LIST -lLa". If we find such
a server don't use -lLa when resolving symbolic links.
* vfs/ftpfs.c (retrieve_dir): If we don't get any valid directory entry
(i.e. not even "." and "..") check whether the directory is empty
or not existend (instead of failing with "ftpfs: failed").
are almost complete (i.e. to handle all nitty gritty cases), but they
seem to be working OK right now. SM should be much more stable now.
Please tell me if you find any weird behavior - Federico
1999-03-30 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gdesktop-icon.c (desktop_icon_realize): Remove the
WM_CLIENT_LEADER property from icon windows so that window
managers will not store SM information for them.
* gnome-open-dialog.c: Added missing #includes.
* gdesktop-init.c (desktop_init_at): Removed an unused variable.
* gdesktop.h: Added some missing prototypes.
* gmain.h: Added some missing prototypes.
* Makefile.in: Added gsession.[ch] to the list of sources.
* gmain.c (create_panels): Consider whether we have a CORBA server
and session management.
* gdesktop.c: #include "gdesktop-init.h"
* gdesktop.c: Added a missing cast to GNOME_DIALOG.
* gmain.c (create_panels): Removed the run_desktop global
variable.
* glayout.c (create_container): Set the wmclass of the panel to
include its unique ID.
* gsession.[ch]: New file with the functions that deal with
session management.
* glayout.c (gnome_exit): Use session_set_restart().
* gcorba.c (corba_init): Now returns an int with an error value.
(corba_init_server): Initialize the server properly.
Fixed all the object implementation code.
(corba_create_window): New function used to create a window with
the CORBA server.
* gmain.c (gnome_check_super_user): Now the check for running as
root is done here. There should be no GUI code in src/.
1999-03-30 Federico Mena Quintero <federico@nuclecu.unam.mx>
* dlg.c (dlg_run_done): Do not call the callback of a NULL current
widget.
* setup.h: Added missing prototype for setup_init().
* filegui.c (check_progress_buttons): Added a missing return
value.
* dlg.c (remove_widget): Added a missing return value.
* main.c: Removed the global directory_list variable.
Removed the main_corba_register_server() function.
* main.h: Removed the global run_desktop variable.
* panel.h: Now the panel structure has a unique numerical ID used
for session management.
* screen.c (panel_new): Maintain a unique ID for each panel.
* main.c (maybe_display_linksdir): Handle display of the desktop
init dir here.
(main): Call gnome_check_super_user().
(init_corba_with_args): Call corba_init_server().
* main.c (init_corba_with_args): Do CORBA initialization here. Also
removed the global force_activation option.
1999-03-30 Federico Mena Quintero <federico@nuclecu.unam.mx>
* vfs.c (vfs_add_current_stamps): Only do stamping of the panels
if they exist.
* mcserv.c: #include <sys/wait.h>
(get_client): Put `#ifdef __EMX__' around an otherwise-unused
variable.
* utilvfs.c (vfs_split_url): Fix NULL <-> 0 confusion when
comparing characters.
* ftpfs.c (retrieve_dir): Removed unused variable dot_dot_found.
* extfs.c (extfs_init): Assign `key' to c, not `&key'.
Basically, I had to setup an ssh tunnel to be able to use CVS. After
5 hours trying to get the damn thing to cvs update it was clear to me
why the .es people do not like to use the gnome cvs.
We really need a tunnel for .es hackers (as they have excellent connectivity
to the rest of Europe, they are just routed trough a 2 byte link to the US).
1999-03-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* treestore.c (process_special_dirs): Free memory here.
Fix test: Skip only "." and "..", before it could skip "?.".
1999-03-22 David Martin <dmartina@mailexcite.com>
* wtools.c (real_input_dialog_help): Do a strncmp with the lenght
of th same translated "Password:" string.
1999-03-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* glayout.c (create_new_menu_from): closedir after running.
1999-03-20 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gnome-file-property-dialog.c (apply_metadata_change): Fix the
test for setting the icon. It was being done incorrectly and thus
it was never possible to change the icon.
* glayout.c (gnome_launch_mime_editor): Add mime-type-edit command
to the menu: this launches mime-type-capplet
1999-03-22 David Martin <dmartina@mailexcite.com>
* ftpfs.c: Internationalize the messages that are displayed as
hints.
1999-03-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* extfs.c (extfs_init): Fix the code here: If the key is empty or
only contains a new line, C would be pointing into an invalid location.
* src/util.c (strip_password): Extented to find the url in the first
parameter. The second parameter tells whether it should search the
url (indicated by known prefixes) in the first parameter or whether
the first parameter is a url without a prefix ("ftp://", "/#ftp:",
"/#mc:").
* src/main.c (directory_history_add): Strip the password (if any) from
the freshly added value.
* src/widget.c (push_history): ditto. There's a ugly special casing
necessary for the network and ftp link dialogs (urls are entered
with out prefix).
* src/widget.c (history_put): Restrict read and write access to the
history file to the owner (Just in case I forgot to strip passwords
somewhere).
Mon Feb 1 19:32:12 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/ftpfs.c (insert_dots): renamed from insert_dot. We have to
insert ".." as well or directories from ftp servers which don't
list "." and ".." are displayed with an additional "/".
Sun Jan 31 20:04:13 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/vfs.c (vfs_strip_suffix_from_filename): Whoever replaces every
occurance of 0 with NULL should stop this stupidy. And replacing '\0'
with NULL is plain wrong!!. Reverted this replacement.
* vfs/ftpfs.c (load_no_proxy_list): ditto
Fri Jan 29 22:55:56 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* slang/slang.h: renamed to slang-mc.h
* slang/Makefile.in: delete slang.h on "make clean"
* configure.in: link slang/slang-mc.h to slang/slang.h when the
included slang is used. Problem was that MC's slang.h was used
when we compiled with an already installed SLang and the systems
header file were included with <slang/slang.h>.
Unfortunatly I can't use AC_LINK_FILES to make the links because
if we needn't make any links AC_LINK_FILES makes a link from
srcdir to top_builddir (builddir != srcdir).
Temporary add $LGPM to $LIBS when checking for the resizeterm
and keyok functions (ncurses might be linked against GPM).
Substitude PACKAGE (intl/Makefile makes use of it)
Sun Jan 31 19:42:47 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* gnome/Makefile.in (install_mx): make it work with srcdir != builddir
(gmc.gnorba is located in $srcdir)
* src/hotlist.c (add_new_entry_input, add_new_group_input): Make the
quick_widget arrays static and various changes needed because they
are now static. add_widgets_i18n recalculates button positions
which get lost when the quick_widget arrays are non static.
* src/screen.c (to_buffer): nul terminate string when using strncpy
* src/setup.c: Save and restore new option ftpfs_first_cd_then_ls.
Sun Jan 31 19:57:24 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/ftpfs.c (insert_dot): New function. Insert a "." into the linked
list. Stat'ing the root directory of a ftpfs fails if the dot is
missing.
(retrieve_dir): insert "." into the linked list if the ftp server
haven't send it.
Sun Jan 31 19:50:24 1999 Norbert Warmuth <nwarmuth@privat.circular.de>
* The following changes make ftpfs work with a remote AmiTCP
server are the result of somehow longish EMail debugging session. I
don't know any public server of this kind but I was told the
combination Unix/Amiga boxes are often used in intranets.
* vfs/ftpfs.c (translate_path): New function. Translate a Unix path,
i.e. MC's internal path representation (e.g. /somedir/somefile) to
a path valid for the remote server. Every path transfered to the
remote server has to be mangled by this function right prior to
sending it. Currently only Amiga ftp servers are handled in a
special manner.
* vfs/ftpfs.c (various places): use translate_path
* vfs/ftpfs.c (login_server): Assume we have to mangle pathnames if
the greatings string from the server contains the word Amiga. If
this assumption is wrong I have to find another way to turn on
path translation.
* vfs/ftpfs.c (ftpfs_get_current_directory): Prepend a leading slash
if it is missing. MC needs it as seperator between hostname and
path in its internal url representation.
Wed Jan 27 03:09:48 1999 Timur I. Bakeyev <mc@bat.ru>
* All around the source: Changed copy_strings() to g_strconcat(). Modi-
fy last parameter in concat_dir_and_file() to "" - to prevent stack from
disbalancing.
- SFS-based file systems now work on GNOME edition, I was
not waiting for child process to finish decompressing.
- VFS code cleanup. I am going to eventually get rid of all
the macro-mania that has creeped into the vfs layer.
Miguel
exaggerated because I only saw two complaints). I added the old method
to resolve symlinks and made it the default. When someone complains about
4.5.2 we can change defaults at will ;-).
Mon Nov 23 21:19:43 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/ftpfs.c (resolve_symlink_with_ls_options): that's resolve_symlinks
we used up to release 4.1.35. It uses LIST -lLa to get symlink stats.
(resolve_symlink_without_ls_options): that's resolve_symlinks
we used in release 4.1.36 and 4.5.[01]. It gets symlink stats from the
directory cache fetching directories if necessary. We got some
complaints about slower ftpfs in the above releases. Now this methode
is no longer the default methode to resolve symbolic links. It is still
needed for ftp servers which don't understand the LIST -lLa command.
(resolve_symlink): Dispatch between the two methods to
resolve symlinks.
Documentation update.
1998-10-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* fish.c (command): Replace vnsprintf with g_strdup_vprintf. This
is both safe and more correct, as there is no limit on the
pathname.
* ftpfs.c (command): Same as above.
* util-alone.c (print_vfs_message): Same as above.
1998-10-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* layout.c (print_vfs_message): Use g_snprintf instead of
vnsprintf.
* configure.in (subshell): Don't define inline to be empty
when compiling with non-gcc compiler. AC_C_INLINE (invoked in
AM_GETTEXT_GNU) already defines inline if necessary.
Thu Oct 22 20:41:16 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
* panelize.c (do_external_panelize): Not zeroing some fields
in cpanel led sometimes to segfaults.
Thu Oct 22 20:30:28 1998 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/ftpfs.c (resolve_symlink, retrieve_dir): Don't timeout and
free dcache while resolving symlinks (i.e. don't free some
pointers which are in use by resolve_symlink).
MC now depends on glib (currently only the assertions are used).
VFS structure declaration fixes.
Uses the new icon list (it is dog slow, need to fix this tonight at home).
* setup.c: save and restore new global variable/option
ftp_use_unix_list_options
Tue Sep 15 20:31:32 1998 Norbert Warmuth <k3190@fh-sw.de>
* ftpfs.c (ftp_use_unix_list_options): New global variable/option.
If true we try to use 'LIST -la <path>'. When it fails we use the
two commands 'CWD <path>' and 'LIST' instead.
(resolve_symlink): rewritten. Don't get a second directory listing
with `LIST -lLa'. Instead use the cache to get the file stat of
symbolic links. If the directory the symlink points to isn't
already in the cache the directory listing will be fetched and
stored in the directory cache (without resolving symlinks
recursively).
The new method to resolve symlinks is faster if symlinks
the same directory or the directory the symlink points to
is already in the cache.
This function was small and nice until I discovered that it was
broken for symlinks to symlinks. Now it looks ugly and perhaps I
will revert it to use "LIST -lLa" again. With a fast connection it
doesn't matter which methode we use but with a slow connection I
wouldn't hesitate to burn more cpu cycles on the client side.
(retrieve_dir): Added parameter to tell whether to resolve
symlinks (don't resolve symlinks in directory listings retrieved
while resolving symlinks).
When we don't get a directory listing with 'LIST -la <path>' then
try to get it with `CWD <path>; LIST'.
Tue Sep 15 20:27:29 1998 Norbert Warmuth <k3190@fh-sw.de
* ftpfs.c (login_server): s/ftpfs_get_host/my_get_host/
(retrieve_file_start2): Don't create target file O_EXCL, in
copy_file_file we check existance of the target file and know
that we want to truncate it (this change was already done a
while back but it was reverted with the vfs-split).
Tue Sep 15 20:15:42 1998 Norbert Warmuth <k3190@fh-sw.de>
* ftpfs.h (struct connection): added boolean which indicates that
the ftp server doesn't unterstand Unix ls options
* ftpfs.h (struct dir): added enum to store symlink status of the
in memory directory cache (directory has no symbolic links;
symbolic links but not yet resolved; symbolic links which are resolved)
Tue Sep 15 20:02:08 1998 Norbert Warmuth <k3190@fh-sw.de>
* shared_ftp_fish.c, fish.c: updated references to retrieve_dir to
honour the additional boolean parameter