files.
* util.c (is_gunzipable): Rename to ...
(get_compression_type): this. Don't check archive length, since
it's unreliable if there is padding at the end of the file.
Eliminate prehistoric Linux workaround. All callers adjusted.
* utilunix.c (close_error_pipe): Use "%s" in message () to
prevent possible crash.
(check_error_pipe): Likewise.
main.h.
(load_file): Use fopen and fstat to prevent race conditions.
(size_trunc): Make suffix const array.
(strip_password): Make prefixes const array.
(file_date): Make fmt auto variable.
since gcc-2.7.2.1 on SunOS doesn't understand __extension__ and
checking for "long long" is not worth the trouble.
Reported by David Martin <dmartina@excite.es>
mc_home, but try localized version of that file first.
* util.h: Declare load_mc_home_file().
* help.c (interactive_display): Use load_mc_home_file(). If the
first argument is NULL assume mc.hlp.
* dlg.c (dialog_handle_key): Use interactive_display() without
specifying the help file.
* tree.c (tree_copy): Likewise.
* cmd.c (help_cmd): Likewise.
(get_random_hint): Use load_mc_home_file().
* main.c [HAVE_CHARSET]: Don't use eight_bit_clean and
full_eight_bits. Use source_codepage and display_codepage to
deduce the terminal 8-bitness.
* main.h [HAVE_CHARSET]: Change to match main.c.
* setup.c [HAVE_CHARSET]: Implement saving and loading charset
settings.
* util.c (is_printable) [HAVE_CHARSET]: Use charset settings.
* view.c [HAVE_CHARSET]: Implement charset support.
From Walery Studennikov <hqsoftware@mail.ru>.
mc_mkstemps(). Don't free it if mc_mkstemps() fails - it's not
needed anymore.
* user.c (execute_menu_command): Likewise.
* util.c (mc_mkstemps): Return NULL in the filename in the case
of failure. Remove support for NULL as the first argument.
From Andrew V. Samoilov.
* src/user.c (execute_menu_command): Use mc_mkstemps().
* src/util.c (mc_mkstemps): New function - safely create and
open temporary file. Return the handle and the name.
* src/util.h: Declarations for init_tmpdir() and mc_mkstemps().
Define TMPDIR_DEFAULT and SCRIPT_SUFFIX.
* vfs/direntry.c (vfs_s_open): Use mc_mkstemps. Create and close
temporary file to reserve its name on the filesystem.
(vfs_s_retrieve_file): Use mc_mkstemps().
(g_tempnam): Remove.
* vfs/extfs.c (extfs_open): Use mc_mkstemps().
* vfs/sfs.c (redirect): Likewise.
* vfs/shared_ftp_fish.c (_get_file_entry): Likewise.
(retrieve_file): Likewise.
* vfs/vfs.c (mc_def_getlocalcopy): Likewise.
* vfs/xdirentry.h: Remove declaration of g_tempnam().
take Midnight Commander. Go to directory that contains some
files. Press <+><CR><+><+><CR><CR><+><+><CR> (<+> being the grey one).
IOW, the first invalid regexp and we are toast - old_pattern is freed and
not reset to NULL. Next call of regexp_match() and we've got a double-free.
What's really pissing off is that caller takes care to tell you that
regexp is invalid. In large red window. I.e. they had added error reporting
and had _never_ given it a try, not to mention giving code a review. Sigh...
* panel.h, util.[ch] (struct WPanel, size_trunc, size_trunc_sep): size
parameters and WPanel.total field became double, thus, total size
of selected files/directories is shown in the mini status correctly
when it exceeds 2 GB.
* 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.
this dialog doesn't look perfect but at least it doesn't break gmc.
1999-09-14 Norbert Warmuth <nwarmuth@privat.circular.de>
* gnome/layout: Added the new samba password dialog.
* src/widget.[ch] (input_new): added const qualifier
* src/util.c (wipe_password): Check for NULL.
1999-09-14 Norbert Warmuth <nwarmuth@privat.circular.de>
* vfs/smbfs.c (various places): Store filenames in memory with the unix
character set and convert it back to the dos character set when filenames
are passed back to the samba server. If samba is configured correctly
this will fix the problems with filenames which contain national characters.
(bucket_set_authinfo): Set domain, username and password which will
be used to log on and authenticate against the samba server and remember this
information on a host/share basis. If set use PASSWD to get the
password. If already authenticated against the host and share use this
information. If already authenticated against host and IPC$ use this
information. If neither of the former is true ask the user how to
log on.
(authinfo_get_authinfo_from_user): New function. Query the user for
domain, username and password to use for authentication.
(authinfo_free): New function. Free memory in authentication structure.
(authinfo_free_all): New function. Free the list used to remember
authentication information.
(authinfo_compare_host_and_share, authinfo_compare_host): New functions.
Helper functions used to search the authentication list.
(authinfo_add): New function. Add one authentication entry to the
authlist.
(authinfo_remove): New function. Remove one entry from the authlist.
(free_bucket): Free memory associated with one bucket.
(smbfs_get_free_bucket): Initialize the complete connection array
with 0. Free the memory allocated for a bucket and initialize the
bucket before reusing it.
(smbfs_open_link): use new functions to get authentication information
(get_stat_info, smbfs_stat): remove unused variables.
* gnome/gconf.h (PORT_STATIC_IN_STRING_FILE_XTIME): new port specific
feature. The Gnome edition first calls all string_file functions
and then uses the return values of these functions. Therefore additional
static buffers in string_file_[acm]time are needed.
* src/screen.c (string_file_[amc]time): These three functions use
file_date which returns a pointer to a static buffer. In the
Gnome edition this buffer has to be coppied to a static buffer
which isn't used in the other two functions (Fix Bug #1766).
* src/util.c, util.h: Moved some constants to util.h
* vfs/tar.c (read_header): Don't segfault when a symlink points to the
root directory.
1999-08-04 Norbert Warmuth <nwarmuth@privat.circular.de>
* src/widget.c (push_history): Add SMB Link to the list of input dialogs
where urls are input without vfs prefix.
Translate the titles of these input dialogs only once.
Removed Gnome specific code because the Gnome edition doesn't use
the input history any more.
* src/util.c (strip_password): Add /#smb: to the list of urls which might
be input with password.
* gnome/gdesktop-icon.h:
* gnome/gmc-chargrid.c: Replace gdk_font_load() with
gdk_fontset_load(), and change the default font names.
1999-06-01 Akira Higuchi <a-higuti@math.sci.hokudai.ac.jp>
* util.c (is_printable): in GNOME all characters are printable.
* src/util.c (strip_home_and_password): Don't split the path in the
middle of a directory, e.g. "/home/bofh" will not be translated to
"~h" (fixes the bug reported by Alex Fortuna <alex@rdc.ru>)
* gcmd.c: marked message for translation.
1999-04-06 David Martin <dmartina@usa.net>
* info.c (text out of box and locale layout).
* util.c: If gmc uses strftime() why mc doesn't?
* view.c: a) Tune status line so it does fit in a Quick View Panel
b) Let Hex View resize cleanly. I think it's fixed for panel
re-split and SIGWINCH signal in xterm. gmc still fails. There was
a tiny risk of division by zero when pressing F4 in a very small
box. True hard work... Must try and check it.
1999-04-06 David Martin <dmartina@usa.net>
* Updated es.po
* configure.in: Deleted duplicate VFS checks. GNOME_VFS_CHECKS
now contains all VFS checks.
* src/util.c (is_printable): Character 155 is non printable even when
full eight bit output is enabled (on the linux console 155 is
interpreted as "ESC [").
* vfs/vfs.h (vfs_translate_url): Fixed the macro which is used when
compiling without vfs.
* macros/gnome-vfs.m4: Add --with-vfs option. GNOME_VFS_LIBS still needs
to be fixed but that's not a problem because there's no libvfs, yet.
* panel.h, screen.c: Add an ability to center justify fields in
panel, in addition to left and right justificatin. Just for fun.
Try =name in user format.
* util.c (name_quote): Quote "~@^|;:". Hope, that's all :)
* es.po: Updated with David Martins translation.
Wed Mar 10 21:52:55 1999 David Martin <dmartina@usa.net>
* gtkedit/editcmd.c: Added missing translation tags.
* gtkedit/editoptions.c: Added missing translation tags. Translate
radio buttons on first use.
Wed Mar 10 22:21:19 1999 David Martin <dmartina@usa.net>
* util.c (my_putenv): char* was used to store the length of a string
* info.c (info_show_info): cast st_dev and st_ino when passing
to printw.
* 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 "/".
Wed Jan 27 03:17:44 1999 Timur Bakeyev <mc@bat.ru>
* Converted memory managment to Glib. Now we use g_new()/g_malloc()/
g_strdup()/g_free() routings. Also, copy_strings() replaced by
g_strconcat(), strcasecmp() -> g_strcasecmp(),and sprintf() by
g_snprintf().
* Some sequences of malloc()/sprintf() changed to g_strdup_printf().
* mad.[ch]: Modified, to work with new GLib's memory managment. Fixed
a missing #undef for tempnam, which caused dead loop. Add several new
functions to emulate GLib memory managment.
*main.c, mad.[ch]: Add a new switch "-M", which allows to redirect MAD
messages to the file.
* util.[ch], utilunix.c: Modified, deleted our variants of strcasecmp()
and strdup() - we have g_ equivalences. Remove get_full_name() - it is
similar to concat_dir_and_file(). Some other tricks with g_* functions.
* global.h: Modified, extended. Now it is main memory mangment include -
i.e. all inclusions of <stdlib.h>, <malloc.h>, <glib.h>, "fs.h", "mem.h",
"util.h" and "mad.h" done there. This elimanates problem with proper or-
der of #include's.
* All around the source - changed order of #include's, most of them gone
to global.h (see above), minor changes, like "0" -> NULL in string func-
tions.