Commit Graph

2037 Commits

Author SHA1 Message Date
Andrew V. Samoilov
50dda0fcb3 * user.c (extract_line): Add a new parameter (size of the
output buffer) to prevent buffer overflow.
2004-03-07 06:24:14 +00:00
Andrew V. Samoilov
d1943ab8cf * achown.c (init_chown_advanced) [ENABLE_NLS]: i18n fix. 2004-03-07 06:21:16 +00:00
Pavel Roskin
d78f9b9bf0 * subshell.c: Partly revert previous patch to preserve translated strings. 2004-03-05 08:08:13 +00:00
Pavel Roskin
0899d3f580 Fix date of the last commit. 2004-03-05 08:05:18 +00:00
Pavel Roskin
3722e428c0 * subshell.c: Partly revert previous patch to preserve
translated strings.
2004-03-05 08:01:44 +00:00
Pavel Roskin
b46fe283f6 Fix use of uninitialized pty_name. 2004-02-10 00:16:17 +00:00
Pavel Roskin
7eb0ef8bd2 * subshell.c: Use "rn" at the end of all error messages.
Don't use perror().  Make error messages more exact.
2004-02-10 00:11:09 +00:00
Pavel Roskin
291f976b13 * utilunix.c (canonicalize_pathname): Add support for UNC paths. 2004-01-24 00:17:34 +00:00
Pavel Roskin
4ced5086ac * utilunix.c (canonicalize_pathname): Return void to make it
clear that the conversion is done in place.  Adjust all callers.
2004-01-23 23:53:37 +00:00
Pavel Roskin
c7c3073133 * filegui.c (init_replace): Don't show the "Reget" button when
moving files.  Reported by Arpad Biro <biro_arpad@yahoo.com>
2004-01-23 22:08:05 +00:00
Pavel Roskin
efff2a4d4e * fileopctx.h: Add "operation" filed to FileOpContext.
* fileopctx.c (file_op_context_new): Add "operation" argument.
* filegui.c (file_op_context_create_ui): Remove "operation"
argument, it's known already.  Adjust all callers.
2004-01-23 21:59:38 +00:00
Pavel Roskin
9fe5ee23c9 * user.c (execute_menu_command): Put /bin/sh in the beginning of
the script.
2004-01-23 17:33:36 +00:00
Pavel Roskin
1d6ab07a10 * screen.c (display_mini_info): Correctly fill the space after
"<readlink failed>".
2004-01-22 08:25:23 +00:00
Pavel Roskin
429f1a476e * glibcompat.h: Fix definition of g_try_realloc(). 2004-01-22 07:19:58 +00:00
Dmitry Alexeyev
6147cf303e * key.c (get_event): Treat all negative values of gpm_fd in the
same way.  Add one more check that gpm is alive.
2003-12-24 07:21:34 +00:00
Dmitry Alexeyev
1172440f67 Warning fix from Dmitry Alexeyev <dmi_a@qnx.org.ru> 2003-12-24 07:11:31 +00:00
Dmitry Alexeyev
95a681cd24 * layout.c (rotate_dash): Set color before printing the dash. 2003-12-24 06:43:26 +00:00
Pavel Roskin
b151ce4419 Constify rotating_dash. 2003-12-06 04:04:27 +00:00
Pavel Roskin
c1b37a392b Typo fix. 2003-12-06 04:03:07 +00:00
Pavel Roskin
125456c5d8 * command.c (examine_cd): Add tilde expansion. 2003-12-01 16:59:29 +00:00
Pavel Roskin
e30307ea4a * utilunix.c (tilde_expand): Correct last fix, simplify code.
Reported by David Sterba <dave@jikos.cz>
2003-11-28 15:23:19 +00:00
Pavel Roskin
ab4e930084 * execute.c (toggle_panels): Refresh panels after returning from
Ctrl-O.
2003-11-27 18:19:57 +00:00
Pavel Roskin
7c0f20bcb8 * src/TODO: Move ...
* TODO: ... here.
* doc/DEVEL: Move ...
* HACKING: ... here.  Adjust makefiles.
2003-11-27 18:06:56 +00:00
Pavel Roskin
1edc838fb9 TODO for version 4.6.1 completed. 2003-11-27 17:58:40 +00:00
Pavel Roskin
73968fe432 * cmd.c (view_file_cmd): Use input_expand_dialog(). 2003-11-27 17:52:55 +00:00
Pavel Roskin
2256237cd9 * wtools.c (quick_dialog_skip): Perform tilde expansion on input
widgets that use cd completion.
2003-11-27 09:55:15 +00:00
Pavel Roskin
42da92333f * utilunix.c (tilde_expand): Preserve tilde if the username
could not be found.  Don't ever return NULL.  Change callers not
to check for NULL.
2003-11-27 09:45:22 +00:00
Pavel Roskin
e55f09f530 * dialog.c (do_select_widget): New function that it the only one
calling dlg_focus() and dlg_unfocus().  Incorporate code from
other functions that did it.
(dlg_select_widget): Change return type to void.
2003-11-27 08:59:54 +00:00
Pavel Roskin
04b4194371 * dialog.h (dlg_widget_active): New function - check if the
widget is active.
* boxes.c (display_callback): Use it.
* layout.c (swap_panels): Likewise.
* screen.c (do_panel_event): Likewise.
2003-11-27 00:46:39 +00:00
Pavel Roskin
73241613c2 * dialog.c: Eliminate callback macro. 2003-11-27 00:34:00 +00:00
Pavel Roskin
bf4c26959c * dialog.c (dlg_replace_widget): Use dlg_select_widget().
(select_a_widget): Rename to select_other_widget(), factorize
most code from dlg_one_up() and dlg_one_down().
2003-11-27 00:17:43 +00:00
Pavel Roskin
0657d80ec7 Done: VFS crash. 2003-11-26 21:26:11 +00:00
Pavel Roskin
645eeb8118 * complete.c (check_is_cd): Simplify logic, use isspace(). 2003-11-24 21:22:00 +00:00
Pavel Roskin
baa4e26cdc * hotlist.c (add_new_group_input): Clean up.
* wtools.c (do_create_message): Eliminate g_strdup_printf().
(bg_message): Likewise.
2003-11-24 20:34:45 +00:00
Pavel Roskin
20b89d5436 * view.c (check_left_right_keys): Implement fast scrolling if
Ctrl is pressed.  Idea by Arpad Biro <biro_arpad@yahoo.com>
2003-11-21 06:27:14 +00:00
Pavel Roskin
d839fbc15a * execute.c (do_execute): Use get_key_code(), not getch() to
consume all characters from a single sequence.
Reported by Miven Dooligan <dooligan@intergate.ca>
2003-11-21 05:31:59 +00:00
Pavel Roskin
a128188ae1 Warning fixes for FreeBSD 5.1. 2003-11-21 03:17:18 +00:00
Pavel Roskin
99e6b0f929 * glibcompat.h: Provide replacement for g_slist_delete_link().
Reported by Pavel S. Shirshov <pavelsh@mail.ru>
2003-11-20 20:25:33 +00:00
Pavel Roskin
948cfd2606 * util.c (load_mc_home_file): Eliminate g_strdup_printf(). 2003-11-20 18:38:29 +00:00
Pavel Roskin
474fc58d94 * user.c (expand_format): Preserve "%" if followed by a
characted without special meaning.
2003-11-19 22:56:07 +00:00
Pavel Roskin
bf39c2c4ef * glibcompat.h: Define g_try_realloc as realloc for glib 1.2.x. 2003-11-14 20:48:13 +00:00
Pavel Roskin
4a9c0da0b0 * main.c (midnight_callback): Ctrl-Shift-Enter now copies full
path to the command line, like in Total Commander.
2003-11-14 20:43:11 +00:00
Pavel Roskin
29d16f22be Typo fixes. 2003-11-14 14:40:25 +00:00
Pavel Roskin
b57b6069b9 Fixed: VFS split. 2003-11-14 08:27:22 +00:00
Pavel Roskin
d739c12313 Shift most changes to "After 4.6.1". Add most urgent regressions. 2003-11-13 17:32:31 +00:00
Pavel Roskin
12d78ba8df * boxes.c: Include "../vfs/gc.h" if VFS is used.
* hotlist.c: Likewise.
* key.c: Likewise.
* main.c: Likewise.
* setup.c: Likewise.
2003-11-07 23:50:18 +00:00
Pavel Roskin
083d26f3c8 * view.c (free_file): Don't use check_error_pipe(), display
error messages in close_error_pipe().
* utilunix.c (check_error_pipe): Remove, it's unused.
2003-11-07 21:15:47 +00:00
Pavel Roskin
0a9c708bec Fixes for bad strings:
"In this cases"
  "~/.netrc file has not correct mode"
Reported by Arpad Biro <biro_arpad@yahoo.com>
2003-11-05 00:33:34 +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
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
8bc40b44f0 Fix includes not to rely on $(top_srcdir) being in the include path. 2003-10-29 08:54:22 +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
5f35b799bb No need to undefine USE_NETCODE. 2003-10-29 06:58:14 +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
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
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
290426d17a * terms.c: Merge ...
* win.c: ... here.
* Makefile.am: Remove terms.c.
2003-10-26 07:02:13 +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
Pavel Roskin
f9e5058942 Include global.h, not i18n.h. 2003-10-26 04:15:17 +00:00
Pavel Roskin
82688029da * i18n.h: Include into global.h.
* Makefile.am: Remove i18n.h.
2003-10-26 04:11:12 +00:00
Pavel Roskin
d35cffb9d9 Clean up includes. 2003-10-26 04:03:07 +00:00
Pavel Roskin
06f9c3d0c1 Add:
Safe and restore file position in the viewer.
2003-10-26 01:34:47 +00:00
Pavel Roskin
a08f91eb63 * background.c: Clean up includes.
(do_background): Set current_dlg to NULL for the child process.
* dialog.h (do_complete_refresh): Don't use we_are_background.
* file.h: Remove dependency on background.h.
* background.h: Define we_are_background.  Move mc_message() ...
* wtools.h: ... here.
* key.h: Don't define we_are_background.
* slint.c (mc_refresh): Use current_dialog instead of
we_are_background to fix compilation without WITH_BACKGROUND.
2003-10-26 00:58:14 +00:00
Pavel Roskin
ec7f14f929 * background.c (do_background): Use pipe() instead of less
portable socketpair().  Close comm[0] in the child.
2003-10-25 22:15:52 +00:00
Pavel Roskin
d999b186f1 * wtools.c (mc_message): Fix argument expansion. 2003-10-25 22:13:01 +00:00
Pavel Roskin
00d12acfb3 * background.c: Leave only code used when WITH_BACKGROUND is
defined. The rest goes ...
* wtools.c: ... here.
2003-10-25 21:54:55 +00:00
Pavel Roskin
67e8519191 * background.c: Remove mymsg. 2003-10-25 21:15:54 +00:00
Pavel Roskin
f75d4598eb * util.c (msglen): Constify first argument.
* wtools.c (query_dialog): Constify string argments.
(create_message): New function, forked from message().
(message): Return void.  Allocate memory dynamically.
* wtools.h: Eliminate D_INSERT.  Adjust all users.
2003-10-25 21:12:05 +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
16123e0850 * hotlist.c (remove_from_hotlist): Fix improper check of the
return value - group could be deleted after pressing ESC.
2003-10-25 18:35:18 +00:00
Pavel Roskin
636d457a87 * background.c (background_attention): Unregister task before
calling message() to avoid recursion.
(message_3s): Fix the number of arguments.
2003-10-25 07:19:31 +00:00
Pavel Roskin
6da33f9c8c * command.c (enter): Don't change current_dlg to NULL. It
breaks repainting of the panels.  Simplify logic.
2003-10-25 04:55:51 +00:00
Pavel Roskin
8c10c20881 * key.c (init_key_x11): Warning fix for gcc 3.3.2. 2003-10-25 04:19:10 +00:00
Pavel Roskin
3c39e9cb55 * fs.h (compute_namelen): Fix warning about unused argument.
* man2hlp.c (handle_tp_ip): Likewise.
2003-10-25 03:44:13 +00:00
Pavel Roskin
3820d62ef4 Fixed syntax reression. 2003-10-25 00:43:15 +00:00
Pavel Roskin
26328c7af6 * dialog.c (dlg_key_event): Simplify logic, return void. 2003-10-25 00:22:13 +00:00
Pavel Roskin
db8db1268c * dialog.c: Remove duplication between two chains of dialogs.
* dialog.h (struct Dlg_head): Add "fullscreen" field, remove
"refresh_pushed", rename "previous_dialog" to "parent".
2003-10-24 23:57:18 +00:00
Pavel Roskin
52d81f57d7 * tree.h: Fix unneeded dependency on dialog.h.
* layout.h: Likewise.
2003-10-24 23:27:54 +00:00
Pavel Roskin
98950838b4 * dlg.h: Merge with ...
* dialog.h: ... this.  Adjust all dependencies.
* dlg.c: Merge with ...
* dialog.c: ... this.
* Makefile.am (SRCS): Remove dlg.h and dlg.c.
2003-10-24 23:20:30 +00:00
Pavel Roskin
0ee63c1450 * dlg.h: Declare idle_hook here. 2003-10-24 22:51:32 +00:00
Pavel Roskin
732da2fcd9 * dialog.c: Eliminate typedef Refresh, unneeded includes. 2003-10-24 22:31:56 +00:00
Pavel Roskin
a8a7443e91 * complete.h: Move CompletionFunction definition ...
* complete.c: ... here.
2003-10-24 22:11:57 +00:00
Pavel Roskin
714f3ee8a7 * color.c (dealloc_color_pairs): Rename to ...
(done_colors): ... this.
* layout.c (done_screen): Call done_colors() here ...
* slint.c (slang_shutdown): ... but not here, as it's not S-Lang
specific.
2003-10-24 20:55:23 +00:00
Pavel Roskin
b6d7cae6d2 * cmd.c: Remove source routing code.
* main.c: Likewise.
2003-10-24 20:10:01 +00:00
Pavel Roskin
7a5015a5d1 * screen.c (user_file_menu_cmd): Move ...
* cmd.c: ... here.
* cmd.h: Remove unused declarations.
2003-10-24 18:57:43 +00:00
Pavel Roskin
9c72f81a21 * chmod.c (stat_file): Eliminate. Use mc_stat().
* chmod.h: Remove unneded code.
* chown.h: Likewise.
* main.c: Include achown.h.
2003-10-24 18:38:02 +00:00
Pavel Roskin
82a7b75a7b * fileopctx.h: Define struct FileOpContext.
* background.h: Avoid conditional declarations.
2003-10-24 18:28:32 +00:00
Pavel Roskin
5995204d0e * dir.h: Eliminate DIR_H_INCLUDE_HANDLE_DIRENT. Adjust all
callers.  Remove unused code.
* dlg.h: Remove unused code.
* panel.h: Likewise.
2003-10-24 17:55:35 +00:00
Pavel Roskin
7b7d64ce1f * dir.c (if_link_is_exe): Check mc_stat() return value.
Make full_name and file_entry const.
(link_isdir): Make file_entry const.
* dir.h: Adjust declarations.
2003-10-24 13:48:12 +00:00
Pavel Roskin
52045633b3 * view.c (view_handle_editkey): Fix prototype.
(toggle_hex_mode): Don't mess with parent's flags - it can
permanently disable Tab switch between panels.
(view): Use DLG_WANT_TAB for full screen only, unconditionally.
2003-10-24 06:06:10 +00:00
Pavel Roskin
849ef55ae7 * tree.h: Don't include treestore.h. Fix sources to include
treestore.h when needed.
* treestore.h: Eliminate useless typedefs.
2003-10-23 23:57:59 +00:00
Pavel Roskin
f6214df52b * treestore.c (tree_store_start_check_cwd): Eliminate.
(tree_store_start_check): Make globally visible.
* dir.c (do_load_dir): Use path supplied as argument.  Call
tree_store_start_check() after the directory is opened.
(do_reload_dir): Likewise.
2003-10-23 23:37:52 +00:00
Pavel Roskin
55b48c7d74 * dir.c (do_reload_dir): Fix memory leaks. 2003-10-23 22:55:48 +00:00
Pavel Roskin
2fc70a9dd8 * win.c (check_movement_keys): Remove "additional" argument,
it's always 1.
2003-10-23 22:53:32 +00:00
Pavel Roskin
0e1a39cfd0 * view.c: (put_editkey): Rename to ...
(view_handle_editkey): ... this.  Move here some logic from ...
(view_handle_key): ... here.
2003-10-23 22:20:15 +00:00
Pavel Roskin
fec2f41c48 * view.c: Eliminate struct block_ptr_t and enum ViewSide.
Rename ascii mode to text mode.
2003-10-23 21:23:33 +00:00
Pavel Roskin
a5c11d267f * view.c (WView): Remove unused fields localcopy and file_dirty.
Make boolean fields 1 bit wide.
2003-10-23 20:31:28 +00:00
Pavel Roskin
f0b4e66d1a view.c (toggle_hexedit_mode): New function, split from ...
(toggle_wrap_mode): ... this.
(view_labels): Fix overuse of the :? operator.  Don't allow
editing files in quick view - it's easy to lose changes.
2003-10-23 19:53:22 +00:00
Pavel Roskin
1bde2dcbda * main.c (process_args): Use cast to avoid warning. 2003-10-23 19:05:52 +00:00
Pavel Roskin
44eef72b3e * view.c (view_callback): Don't close the current dialog when
the viewer is framed.
2003-10-23 18:26:24 +00:00
Pavel Roskin
5a827286d1 Typo fixes. 2003-10-23 16:33:23 +00:00
Pavel Roskin
7e639b7c95 Typo fix, from Andrew V. Samoilov 2003-10-21 13:32:33 +00:00
Pavel Roskin
6bb01bfe85 * main.c (update_one_panel_widget): Use VFS_SETCTL_FLUSH for the
current directory.  This fixes Ctrl-R on fish.
* vfsdummy.h: Remove unused functions.
2003-10-16 18:57:15 +00:00
Pavel Roskin
0636e2ed73 * main.c (process_args): Use VFS_SETCTL_LOGFILE for ftpfs. 2003-10-16 17:13:35 +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
bf5a5c4e04 * glibcompat.h: Define g_try_malloc as malloc for glib 1.2.x. 2003-10-15 07:05:24 +00:00
Pavel Roskin
5cb7bf73fd * view.c (load_view_file): Use g_try_malloc() because the
failure to allcate memory is acceptable here.
Reported by Pavel S. Shirshov <pavelsh@mail.ru>
2003-10-15 04:10:36 +00:00
Pavel Roskin
39d5093acb * tree.c: Remove dead code.
* treestore.c (tree_store_add_entry): Make static.
(tree_store_start_check): Likewise.
2003-10-14 22:48:44 +00:00
Pavel Roskin
4b5acf720e Fix name of Bjrn Eriksson. 2003-10-14 22:02:38 +00:00
Pavel Roskin
0837ed2b49 * cmd.c: Cleanup of unneeded global functions and data.
* color.c: Likewise.
* dir.c: Likewise.
* file.c: Likewise.
* filegui.c: Likewise.
* hotlist.c: Likewise.
* layout.c: Likewise.
* main.c: Likewise.
* panelize.c: Likewise.
* wtools.c: Likewise.
2003-10-14 21:58:56 +00:00
Pavel Roskin
0c75cd31a5 * screen.c (do_enter_on_file_entry): Remove annoying message "no
action taken".  Simplify logic.  Confirmation affects VFS too.
2003-10-13 00:50:11 +00:00
Pavel Roskin
f219b81311 * vfsdummy.h: New file to replace vfs.h if VFS is disabled.
* Makefile.am: Add vfsdummy.h.
* global.h [!USE_VFS]: Include vfsdummy.h.  Fix files that
include vfs.h directly.
2003-10-11 08:54:31 +00:00
Pavel Roskin
c09d542b9e * file.c (check_hardlinks): Use vfs_file_class_flags(). 2003-10-11 08:23:00 +00:00
Pavel Roskin
ceaf7af0e0 * main.c (_do_panel_cd): Use vfs_release_path(). 2003-10-11 06:44:54 +00:00
Pavel Roskin
9d1f2aae71 * vfs.c (vfs_type): Rename to vfs_get_class(). Fix prototype to
avoid using internal vfs type.  Adjust all dependencies.
(vfs_rosplit): Rename to _vfs_get_class().
2003-10-11 06:25:29 +00:00
Pavel Roskin
f1288c7338 * file.c: Use struct vfs_class, not type vfs, which should be
internal to VFS code.
2003-10-11 06:05:51 +00:00
Pavel Roskin
0a3cfe30c3 * background.h: Eliminate background_wait variable. Adjust all
dependencies.
2003-10-08 05:16:58 +00:00
Pavel Roskin
f3bbd7bc5e * main.c (argument_table): Reorder options into logical groups. 2003-10-08 05:06:37 +00:00
Pavel Roskin
403f5068d5 * dlg.c (dlg_broadcast_msg): Use widget_msg_t type.
(dlg_broadcast_msg_to): Likewise.
2003-10-07 22:59:01 +00:00
Pavel Roskin
af43d757e3 Add two regressions. Typo fixes. 2003-09-30 16:50:42 +00:00
Pavel Roskin
36eda299f3 Make save_panel_types() static. 2003-09-29 18:05:38 +00:00
Pavel Roskin
e65f371486 * main.c (copy_other_pathname): Trailing slash in not always
inserted when it should be.
2003-09-29 16:38:03 +00:00
Pavel Roskin
3ba2ed6891 * find.c (do_search): Use strncpy() instead if unsafe strcpy().
Check mc_(l)stat() return values.
2003-09-29 15:58:08 +00:00
Pavel Roskin
9ad0e19d57 * key.c (xterm_key_defines): More sequences for gnome-terminal. 2003-09-24 07:06:08 +00:00
Pavel Roskin
aec581084e Add even more sequences (for gnome-terminal this time). 2003-09-24 03:32:23 +00:00
Pavel Roskin
6683f6eae9 Also add Shift-Ins. 2003-09-23 07:01:57 +00:00
Pavel Roskin
a7032726f5 * key.c (xterm_key_defines): Add more sequences. 2003-09-23 06:58:34 +00:00
Pavel Roskin
740630d22e Done: chdir to '~' doesn't work. 2003-09-23 05:23:03 +00:00
Pavel Roskin
8729c81ddc * find.c (find_file): Don't call file_mark(), it would use
uninitialized data.
* main.c (panel_clean_dir): Make panel dirty.
2003-09-22 22:05:27 +00:00
Pavel Roskin
4520b25b36 * glibcompat.c: New file for compatibility with older versions
of glib.
* glibcompat.h: Likewise.
* Makefile.am: Add the new files SOURCES.
* global.h: Include glibcompat.h.
2003-09-22 20:21:48 +00:00
Pavel Roskin
4014009077 * menu.c (menu_scan_hotkey): Use g_strlcpy() to avoid undefined
behavior when using strcpy() on overlapping strings.
* profile.c (GetSetProfile): Likewise.
* widget.c (button_scan_hotkey): Likewise.
Found by Valgrind.
2003-09-22 19:40:07 +00:00
Pavel Roskin
c53fa9e36d * dlg.c (dlg_replace_widget): Clean rewrite. It was broken
after eliminating Widget_Item.
2003-09-13 08:08:21 +00:00
Pavel Roskin
6eda31f362 * menu.h: Return to keeping dialog id instead of a widget
pointer for previous widget.  The widget can be replaced in the
meantime.
* dlg.c (dlg_select_by_id): New function, essentially a cleaner
implementation of dlg_select_nth_widget().
2003-09-13 07:43:20 +00:00
Pavel Roskin
9941a0bb6a * dlg.h: Remove "first" field for dialogs and DLG_HAS_MENUBAR.
* dlg.c (dlg_mouse_event): Remove menubar hack.
* screen.c (do_panel_event): Redirect mouse events on the upper
frame to the menubar if it's invisible.
(panel_event): Don't repaint the panel after redirected events.
2003-09-13 05:23:53 +00:00
Pavel Roskin
312972109a * screen.c (panel_event): Make sure that the panel is repainted
after the event is processed.
2003-09-13 00:22:59 +00:00
Pavel Roskin
a48fa9fa8d * hotlist.c (l_call): Fix incorrect calls to hotlist_callback(). 2003-09-13 00:12:37 +00:00
Pavel Roskin
c0b34498dd * dlg.h: Merge Widget_Item into Widget. Massive adjustment. 2003-09-12 23:38:42 +00:00
Pavel Roskin
d9292b5524 * main.c (setup_panels_and_run_mc): Use straight widget order in
midnight_dlg.  Select initial panel by dlg_select_widget().
2003-09-12 23:07:09 +00:00
Pavel Roskin
824a5256c1 * menu.h (WMenu): Save pointer to the previous widget, not its
number.  Adjust all dependencies.
* menu.c (menubar_finish): Restore focus on the saved widget.
* dlg.c (dlg_item_number): Remove, it's unused now.
(dlg_select_nth_widget): Likewise.
2003-09-12 22:45:51 +00:00
Pavel Roskin
5373948a01 * help.c (interactive_display): User straight widget order. 2003-09-12 22:16:32 +00:00
Pavel Roskin
bad1582e06 * complete.c (complete_engine): Don't need DLG_REVERSE.
* widget.c (show_hist): Likewise.
* view.c (view): User straight widget order.
2003-09-12 22:08:09 +00:00
Pavel Roskin
e14f56d71b * dlg.h: Replace DLG_BACKWARD to DLG_REVERSE with a better
defined meaning.  Make it default to populate dialogs from the
top.  Change all calls to create_dlg().
2003-09-12 21:22:01 +00:00
Pavel Roskin
997a8ddd8b * dlg.c: DLG_BACKWARD now affects how the dialog is populated by
widgets, not the runtime behavior.
(init_dlg): Don't change current widget.  This allows using
dlg_select_widget() before the dialog is run.
* dlg.h: Remove initfocus field.
* wtools.c (query_dialog): Use dlg_select_widget(), not
initfocus to set the initial widget.
2003-09-12 08:28:21 +00:00
Pavel Roskin
7c143915b4 * widget.c (input_callback): Don't handle Enter.
Requested by Ali Akcaagac <aliakc@web.de>
2003-09-12 07:50:08 +00:00
Pavel Roskin
9653eb538f * chmod.c (chmod_callback): Fix uninitialized variable. 2003-09-12 07:42:16 +00:00
Pavel Roskin
60dda91b9f * main.c (midnight_callback): Don't redraw dirty panels if the
menubar is active.
2003-09-12 03:14:44 +00:00
Pavel Roskin
0464c5e94d * dlg.c (add_widget): New, safer implementation. Don't rely on
the position of the first widget.  Disable insertion into
running dialogs - it's unused and cannot be tested.
2003-09-12 02:25:41 +00:00
Pavel Roskin
ab761c64a6 * boxes.c (symlink_dialog): Add "OK" and "Cancel" buttons.
Don't translate strings, it's done in quick_dialog().
Reported by Ali Akcaagac <aliakc@web.de>
2003-09-11 22:27:38 +00:00
Pavel Roskin
4d797a9f72 * dlg.h: Remove "last" field from Dlg_head, it's unneeded in a
circularly linked list.
2003-09-11 00:13:36 +00:00
Pavel Roskin
9ddc1c9cbc * screen.c (paint_dir): Don't make panel clean here.
(panel_update_contents): Do it here.
(panel_callback): Repaint the panel on focus.
(select_item): Don't paint anything here.
2003-09-11 00:01:16 +00:00
Pavel Roskin
c847c91d61 * dlg.h (send_message): Use cb_ret_t and widget_msg_t. 2003-09-10 23:58:37 +00:00
Pavel Roskin
738044481c * main.c (menu_cmd): If the current panel is inactive, use the
opposite side to start menu.
2003-09-10 23:37:27 +00:00
Pavel Roskin
e355e25b56 * dlg.h: Use cb_ret_t and widget_msg_t in widget callbacks.
Massive adjustment for the above.
2003-09-10 22:48:54 +00:00
Pavel Roskin
683c686159 * chmod.c (chmod_toggle_select): Get id as argument. 2003-09-10 21:35:34 +00:00
Pavel Roskin
0c794a4e95 Fix unsafe defines. 2003-09-10 21:33:12 +00:00
Pavel Roskin
24737eb1c1 * dlg.h: Remove restroy callback. Widgets should use
WIDGET_DESTROY.  Adjust all dependencies.
2003-09-10 18:21:40 +00:00
Pavel Roskin
e51f170ad9 * dlg.c: Don't supply ID of the current widget with any
callbacks.  It's mostly useless and can be found by the
callback.
* layout.c: Likewise.
* widget.c: Likewise.
* chmod.c (chmod_callback): Adjust for the above.
2003-09-10 16:16:34 +00:00
Pavel Roskin
f462c5a77d * layout.c (layout_change): Make static.
* screen.c (paint_panel): Likewise.
* cmd.c (dirsizes_cmd): Use dirty flag.
* tree.c (chdir_sel): Don't call paint_panel().
2003-09-10 06:15:53 +00:00
Pavel Roskin
33078ab195 * find.c: Remove useless calls to paint_panel().
* panelize.c: Likewise.
2003-09-10 05:38:38 +00:00
Pavel Roskin
109b933235 * screen.c (use_display_format): Set dirty flag. Remove calls
to paint_panel() where they become unneeded.
2003-09-10 05:26:04 +00:00
Pavel Roskin
9f461b6697 * screen.c (file_mark): Set dirty flag if the mark changes.
* cmd.c: Remove calls to paint_panel() due to file marks.
2003-09-10 05:12:45 +00:00
Pavel Roskin
bab1cfdc49 * screen.c (update_dirty_panels): New function - update panels
with the dirty flag.
(panel_update_contents): Make static, don't call directly.
* main.c: Don't call panel_update_contents(), use dirty flag.
(midnight_callback): Call update_dirty_panels().
2003-09-10 04:42:13 +00:00
Pavel Roskin
649f1c538e * find.c (find_parameters): Make "filename" entry focused on
startup - it's used more often than "start at".
2003-09-10 00:29:09 +00:00
Pavel Roskin
b965674fd7 * widget.c (button_callback): Don't let the default button steal
Enter from the current button.
2003-09-10 00:14:36 +00:00
Pavel Roskin
17e517ebbb Typo fixes. 2003-09-09 23:16:01 +00:00
Pavel Roskin
44e3da4bfb * widget.c (button_callback): Treat Enter as hotkey for the
default button.
* wtools.c (quick_callback): Remove, it's unneded now.
2003-09-09 23:12:06 +00:00
Pavel Roskin
001578a96f * wtools.c (quick_callback): Restore old obscure functionality -
DLG_KEY should not return MSG_HANDLED to allow the button
callback to override the dialog return value.
2003-09-09 20:48:38 +00:00
Pavel Roskin
7f99259757 * key.c (xterm_key_defines): Add keypad keys.
Reported by Vyacheslav Filyayev <vfilyayev@d2.khai.edu>
2003-09-09 16:30:14 +00:00
Pavel Roskin
3058921b75 * view.c (view_init): Constify "_command" argument.
(view): Likewise.
(do_view_init): Likewise.
(init_growing_view): Constify "name" and "filename" args.
* view.h: Fix declarations and comment.
2003-09-09 04:54:59 +00:00
Pavel Roskin
35931b119e * user.c (execute_menu_command: Fix rare segmentation violation
if last line in menu file contain space(s) only and no trailing
newline.
2003-09-09 04:52:15 +00:00
Pavel Roskin
25e8950d39 * listmode.c: Use groupboxes. 2003-09-07 23:06:27 +00:00
Pavel Roskin
16a2b83754 * layout.c (init_layout): Use groupboxes. 2003-09-07 22:54:36 +00:00
Pavel Roskin
cd3673936c Remove groupbox titles from the file scope. 2003-09-07 22:53:41 +00:00
Pavel Roskin
af893babbd * widget.c: Implement new widget - groupbox.
* option.c: Use it.
2003-09-07 22:42:22 +00:00
Pavel Roskin
86c2a91184 * layout.c: Fix remaining callback calls.
* widget.c: Likewise.
2003-09-07 21:30:36 +00:00
Pavel Roskin
13a02ef978 * dlg.h: Use new types for dialog callbacks.
(dlg_cb_fn): Swap msg and parm arguments for consistency with
widget callbacks.  Adjust all dependencies.
2003-09-07 21:24:01 +00:00
Pavel Roskin
1ec8dad250 * dlg.h: Remove WIDGET_USER. Define new types dlg_msg_t,
widget_msg_t and cb_ret_t.
2003-09-07 19:28:44 +00:00
Pavel Roskin
1e0850ab07 * dlg.c (find_widget_type): Take pointer to void to avoid casts
everywhere.  Adjust all callers.
2003-09-07 07:16:12 +00:00
Pavel Roskin
39968fa7af * main.c (midnight_callback): Fix for the last commit - repaint
the panel if the search mode is unset.
2003-09-07 06:15:44 +00:00
Pavel Roskin
9a7b4212c6 * dlg.h: Remove DLG_PRE_EVENT, it's unused now. 2003-09-07 06:03:51 +00:00
Pavel Roskin
485bbcef9b * main.c (make_panels_dirty): Remove, it's unneded now.
(midnight_callback): Don't call make_panels_dirty().  Mark
current panel dirty if the search mode is unset.  No need to set
attibutes before calling show_console_contents().
2003-09-07 05:58:55 +00:00
Pavel Roskin
2a60f651e3 * dlg.h: Convert send_idle_msg field to a publicly visible flag
DLG_WANT_IDLE.
* main.c (midnight_callback): Move auto_menu handling to the
handler for DLG_IDLE.
(do_nc): Request idle events.
2003-09-07 05:39:51 +00:00
Pavel Roskin
80f4f3f55d * dlg.c: Fix a bug when DLG_HOTKEY_HANDLED would not be
delivered if the current widget already has focus.
2003-09-07 02:46:06 +00:00
Pavel Roskin
6349237830 * user.c (execute_menu_command): Implement %view macro. 2003-09-04 17:02:21 +00:00
Pavel Roskin
9190dcbfa8 * wtools.c (create_listbox_window): Don't repaint the dialog
before it's run.
2003-09-03 05:19:08 +00:00
Pavel Roskin
058e91c2f5 * learn.c: Don't track button hotkeys.
(learn_check_key): Consume all alphanumeric keys, regardless of
button hotkeys.
2003-09-03 04:37:35 +00:00
Pavel Roskin
f0eeffd583 Trivial simplification from Andrew V. Samoilov <sav@bcs.zp.ua> 2003-09-02 22:38:15 +00:00
Pavel Roskin
ac1fd1d878 Remove unused variable stdout_fd. 2003-09-02 22:36:58 +00:00
Pavel Roskin
198e0035e4 * listmode.c: Create all buttons in one place. Remove unneeded
low-level drawing.
(listmode_edit): Return NULL on cancel.
* main.c (listmode_cmd): Actually use the result of
listmode_edit().
2003-09-01 09:03:30 +00:00
Pavel Roskin
3632b705de * listmode.c: Use callbacks for Add and Remove buttons. Don't
run dialog in the loop, it doesn't work this way.
2003-09-01 08:18:54 +00:00
Pavel Roskin
c757bbeda1 * widget.h: Define type bcback for button callbacks. 2003-09-01 08:16:08 +00:00
Pavel Roskin
f8e00e7b6a * widget.c (listbox_new): Remove "action" argument. Listboxes
without callbacks default to closing the dialog.  Adjust all
users.  This fixes double click on completion listbox.
* widget.h: Use uppercase names for the return values of the
listbox callback.
2003-09-01 07:31:56 +00:00
Pavel Roskin
ab427784c8 * hotlist.c (update_path_name): Avoid using global variable.
(l_call): Likewise.
2003-09-01 07:00:09 +00:00
Pavel Roskin
bd4a76ebb3 * widget.h: Eliminate listbox_cback. Call listbox callback
whenever it's defined.  Adjust all users.
2003-09-01 05:58:38 +00:00
Pavel Roskin
58545e65c2 * widget.h: Use exact type in the listbox callback. Adjust all
legitimate users, remove all unused callbacks.
2003-09-01 05:43:20 +00:00
Pavel Roskin
339bd16e5e * boxes.c: Fix GUI code for some non-default configurations.
* listmode.c: Likewise.
2003-09-01 05:10:49 +00:00
Pavel Roskin
2b9b18150e * widget.h (button_new): Remove unused extra argument. Adjust
all dependencies.
2003-09-01 02:07:02 +00:00
Pavel Roskin
c27ebffa28 * option.c (check_options): Remove tk field.
* widget.c: Comment fix to get rid of references to Tk.
* wtools.c (real_input_dialog_help): Rename tk_name to histname.
Remove names from non-input widgets.
2003-09-01 01:34:17 +00:00
Pavel Roskin
fab6e8a493 * widget.h: Completely get rid of tkname. Rename it to histname
for the input widget.  Adjust all dependencies.
2003-09-01 00:18:37 +00:00
Pavel Roskin
10f65ac83d * dlg.h (struct Widget): Remove tkname field.
(init_widget): Remove tkname argument.
* widget.h (listbox_new): Likewise.
Adjust all dependencies.
2003-08-31 23:29:49 +00:00
Pavel Roskin
8b3b8147d7 * cmd.c (edit_symlink_cmd): Fix possible off-by-one after
readlink().
* file.c (make_symlink): Likewise.
* main.c (copy_readlink): Likewise.
* screen.c (display_mini_info): Likewise.
(chdir_to_readlink): Likewise.
* util.c (resolve_symlinks): Likewise.
2003-08-29 22:45:04 +00:00
Pavel Roskin
65b52a3c89 Add:
Alt-O should optionally show the current directory and move cursor down
(as in older versions).  Old functionality on files (go to "..") is not
needed.
2003-08-18 04:58:23 +00:00
Pavel Roskin
3f4d7934b3 * cmd.c (delete_cmd_local): New function. Remove file under the
cursor, regardless of marks.
* screen.c (panel_keymap): Bind it to F18.
2003-08-18 04:45:54 +00:00
Pavel Roskin
df6365e737 * file.c (panel_operate_generate_prompt): Remove source
calculation, it doesn't belong here.
(panel_operate): Change arguments: drop ask_user and thedefault,
introduce force_single.  force_single changes default to the
current file and ignores selection.  Adjust all dependencies.
2003-08-18 04:35:28 +00:00
Pavel Roskin
4dd13a09ba * dir.h (file_entry): Rename "buf" to "st". Adjust all
dependencies.
2003-08-18 00:47:43 +00:00
Pavel Roskin
ef2c07b7c8 * main.c: Rename PanelMenu to LeftMenu. Don't assume that
LeftMenu and RightMenu are identical.
From Pavel Tsekov <ptsekov@gmx.net>
2003-08-01 20:00:28 +00:00
Pavel Roskin
90b7cbf2ea Done:
Changing directory while in the editor shouldn't affect the path where
the editor saves its files.
2003-07-31 16:38:39 +00:00
Pavel Roskin
6867850154 Add:
Make the internal editor reentrant.  Add "edit menu file" to the editor
menu.
2003-07-31 16:27:44 +00:00
Pavel Roskin
c7456a4e5d Images on VFS - better description. 2003-07-28 18:34:35 +00:00
Pavel Roskin
a1ce20517c * main.c: Make more variables static. 2003-07-28 16:11:44 +00:00
Pavel Roskin
d388773779 * key.c (xterm_key_defines): Add more sequences for xterm-179 by
Thomas E. Dickey.
2003-07-23 05:44:25 +00:00
Pavel Roskin
c72a1ea44c Get rid of all references to NATIVE_WIN32. 2003-07-23 03:22:32 +00:00
Pavel Roskin
17a04526cf * subshell.c (pty_open_master) [HAVE_GRANTPT]: Prefer
posix_openpt() over GNU-specific getpt().  Needed for FreeBSD
5.x.  Original patch by Max Khon <fjoe@FreeBSD.org>
2003-07-21 23:33:34 +00:00
Pavel Roskin
0ec650da9a * screen.c (panel_key): Redisplay ministatus if the searching
was turned off.  Reported by gotar@poczta.onet.pl
2003-07-21 04:56:56 +00:00
Pavel Roskin
4229e4fb3d Fix description of the last commit. 2003-07-10 16:47:18 +00:00
Pavel Roskin
0564dc68ea Fixed:
Locks for compressed files are not removed.
2003-07-09 00:21:46 +00:00
Pavel Roskin
0ba153274d Update for fixed issues. 2003-07-08 22:48:07 +00:00
Pavel Roskin
40d911f728 * ext.c (regex_check_type): Handle case when there are no tabs
or spaces after the colon.
2003-07-08 22:24:46 +00:00
Pavel Roskin
452de6619d * ext.c (regex_check_type): Set content_shift to skip the
filename.
2003-07-02 16:42:36 +00:00
Pavel Roskin
43bbd6d299 * hotlist.c: Add buttons "Refresh" and "Free VFSs now" to Active
VFS dialog.
(hotlist_button_callback): Handle the buttons.
* main.c: Remove the 'Free VFS now' menu item.
2003-06-29 23:44:39 +00:00
Pavel Roskin
7e3f8b9d87 * ext.c (regex_check_type): Fix previous change. 2003-06-25 17:42:38 +00:00
Pavel Roskin
e31a950387 * ext.c (regex_check_type): Strip tab(s) after "filename:" in
file output.
2003-06-25 06:32:46 +00:00
Pavel Roskin
6f5bb55e2b * execute.c (do_execute): Make static. Print end of line after
"Press any key to continue" and user's keystroke, but before
restoring the panels.  Eliminate last_paused variable.  Don't
print fake prompt if there is no command.
2003-06-22 10:15:04 +00:00
Pavel Roskin
c36bf430bf * text.c: Eliminate. Move colors to color.c and clr_scr() to
layout.c.
* main.c (restore_console): Eliminate, use handle_console().
* Makefile.am: Remove text.c.
2003-06-22 09:32:52 +00:00
Pavel Roskin
e4f7714ab1 * execute.c: New file with all functions for execution and
toggling panels not specific to subshell.
* execute.h: Corresponding header.
* Makefile.am: Adjust for the above.
2003-06-22 09:17:46 +00:00
Pavel Roskin
a568db4228 * main.c (execute): Eliminate. Fix all dependencies.
(shell_execute): Constify string argument.
2003-06-22 08:12:13 +00:00
Pavel Roskin
5b2bd08768 * configure.in: Remove test for SCO UNIX. Remove all references
to SCO_FLAVOR everywhere.  SCO flavor is rather unsavory now.
2003-06-18 04:47:17 +00:00
Pavel Roskin
944d5c430b * key.c (mc_bindings): Remove. Esc-">" and Esc-"<" are not
always the same as Home and End, at least in mcedit.
(get_key_code): Never ignore Escape outside known sequences.
* screen.c (panel_keymap): Add Esc-">" and Esc-"<".
* tree.c (tree_keymap): Likewise.
* widget.c (input_map): Likewise.
(listbox_key): Likewise.
(check_movement_keys): Likewise.
Reported by Miguel de Icaza <miguel@ximian.com>
2003-06-14 05:19:19 +00:00
Pavel Roskin
bd8919e567 * key.c (correct_key_code): Treat Shift-Backspace as Backspace. 2003-06-09 05:59:00 +00:00
Pavel Roskin
f55e75b70a * util.h: Add new match_type - match_regex.
* ext.c: Use it everywhere.
(regex_command): Don't change easy_patterns - it affects the
panel filters.
Reported by Andrew V. Samoilov <sav@bcs.zp.ua>
2003-06-07 00:37:28 +00:00
Pavel Roskin
bd9c9343eb * view.c (get_byte): Fix off-by-one error. Found by Valgrind. 2003-06-06 23:54:20 +00:00
Pavel Roskin
1fc1bdd0a4 * command.c (command_new): Fix memory leak.
* subshell.c (exit_subshell): Free pty_buffer.
2003-06-06 15:52:13 +00:00
Pavel Roskin
61ac4d5ca1 * dir.c (do_load_dir): Add new argument "path" to avoid the need
to request the current directory.
(do_reload_dir): Likewise.  Adjust all callers.
2003-06-06 00:52:35 +00:00
Pavel Roskin
99e1805194 * screen.c (panel_destroy): Rewind history to the beginning
before freeing it.
* widget.c (input_destroy): Likewise.
* util.c (list_append_unique): Free data when removing duplicate
list entries.
2003-06-05 23:51:15 +00:00
Pavel Roskin
c96b0af3b2 Typo. 2003-06-03 18:55:09 +00:00
Pavel Roskin
d032c68db1 Typos. 2003-06-02 19:26:55 +00:00
Pavel Roskin
341ad1d804 Fix typos and "britainisms". 2003-06-02 18:13:42 +00:00
Pavel Roskin
c09c4f0ffc key.c (init_key): Fix crash if TERM is unset. 2003-05-30 19:56:43 +00:00
Pavel Roskin
5c39926570 * ext.c (regex_check_type): Recognize and skip "/dev/stdin:"
that can apprear in the output of new versions of file.
2003-05-29 04:38:17 +00:00
Pavel Roskin
d3f2f521dc * util.c (unix_error_string): Convert error string from UTF-8 is
glib 2 is used.
2003-05-29 04:33:38 +00:00
Pavel Roskin
70b4cd6ff1 * text.c (default_edition_colors): Change the default for
dhotfocus to be blue on cyan for consistency with dhotnormal.
2003-05-29 04:28:10 +00:00
Pavel Roskin
521dd6bf47 Typo fix. 2003-05-28 23:10:30 +00:00
Pavel Roskin
1866c37dbf * info.c (info_show_info): Cast myfs_stats.avail to double to
fix integer overflow that can cause a negative precent number.
2003-05-27 07:22:04 +00:00
Pavel Roskin
12f4a6665a * main.c (directory_history_add): Don't change the directory
passed as the argument, work on a copy.
2003-05-05 15:30:43 +00:00
Pavel Roskin
6b13fc9926 Add:
Add an argument to regexp_match() to force POSIX regex instead of
changing easy_patterns in ext.c.
2003-04-16 17:49:10 +00:00
Pavel Roskin
0900e8faee * find.c (get_line_at): Strip trailing newline to fix $
matching.
2003-04-16 15:26:29 +00:00
Pavel Roskin
18a078cf5c Add:
Cannot spell check unsaved files in the editor.
2003-03-28 02:45:32 +00:00
Andrew V. Samoilov
904e4022a4 * file.c (copy_file_file): Fix data corruption if mc_write()
does not write n_read bytes at once.
(move_file_file): Eliminate retry_src_lstat label.
2003-03-26 09:59:37 +00:00
Andrew V. Samoilov
6851c22f74 * view.c (get_line_at): Set prev properly for reverse search.
Don't remove final character in the last line without newline.
(search): During regexp search: handle properly '^'
in forward search and '$' in reverse search.
Based on the patch from Adam Byrtek <alpha@debian.org>.
2003-03-24 18:52:02 +00:00
Andrew V. Samoilov
8384e94b0b * cons.handler.c (set_attr) [__FreeBSD__]: Fix compilation.
Reported by Dmitry Alexeyev <dmi_a@qnx.org.ru>.
2003-03-22 17:27:21 +00:00
Pavel Roskin
915136719d * command.c (enter): Check subshell state early and return if
inactive before clearing the command line.
* main.c (force_subshell_execution): Remove magic, unusable,
undocumented command line option "-r".
2003-03-22 05:28:08 +00:00
Pavel Roskin
022fce89cb * subshell.c: Remove dead code (SYNC_PTY_SIDES).
(init_subshell_child): Remove dead code (initfile for TCSH).
(init_subshell): Use ZSH_VERSION environment variable to detect
ZSH.  Use -g option to zsh to hide entries beginning with space
from history.  Add space before ZSH precmd to hide it.
2003-03-22 05:15:46 +00:00
Pavel Roskin
b58ca336d5 Make dynamic loading more urgent, remove libX11 (done already). 2003-03-21 21:26:51 +00:00
Andrew V. Samoilov
9d9dd380fb * view.c (get_line_at): Return unreversed line for backward
search to restore backward regexp search feature.
(icase_search_p): Fix for the above.
Reported by Adam Byrtek <alpha@debian.org>
2003-03-21 16:01:50 +00:00
Pavel Roskin
222058978d Removed entry about navigating VFS by Enter. 2003-03-20 19:57:30 +00:00
Andrew V. Samoilov
387dbac31c * view.c (icase_search_p): Add backward search support.
(search): Likewise.
(block_search): Likewise.
(normal_search): Add "Backwards" button.
(get_line_at): Handle view->direction properly and return
reversed string if backward search required.
2003-03-19 13:39:48 +00:00
Pavel Roskin
038f29a9fd Add:
- Check if the archive was changed for extfs, tar and cpio.  Free the data
associated with the old archive.
- Use Del to remove items from history.
2003-03-16 21:10:31 +00:00
Pavel Roskin
5aa3a8410a Done:
canonicalize_pathname() doesn't strip leading "./"
2003-03-14 16:53:10 +00:00
Pavel Roskin
f6b4657dcb * key.c (xterm_key_defines): Add more sequences for xterm, rxvt
and konsole.
2003-03-14 16:52:33 +00:00
Andrew V. Samoilov
0fbccef3cc * key.c: Use fputs() instead of fprintf().
(func_XOpenDisplay) [HAVE_GMODULE]: Move to init_key_x11().
(get_modifier) [__QNXNTO__]: Use g_snprintf() instead of unsafe sprintf().
2003-03-11 12:23:08 +00:00
Pavel Roskin
867704615b * key.c (correct_key_code): Convert unrecognized 0177, Ctrl-h
and Ctrl-d into Delete and Backspace.  Remove all references to
those keys in other files.
2003-03-10 20:27:54 +00:00
Pavel Roskin
44aac01193 * key.c (get_modifier) [__QNXNTO__]: Remove incorrect check for
the existance of libph.so.1.
2003-03-10 14:38:12 +00:00
Pavel Roskin
1de4ce4890 * key.c (get_modifier): Add support for QNX Photon pterm. 2003-03-10 08:47:37 +00:00
Pavel Roskin
cf432c1d8a * utilunix.c (canonicalize_pathname): Clean rewrite from
scratch.  The old implementation had memory problems with "/.."
and didn't actually strip the leading "./" from path.  Remove
support for obsolete Qnet paths.
2003-03-10 06:52:57 +00:00
Pavel Roskin
61317cb730 Add:
Use KDGKBENT ioctl on Linux console to find the mapping.
2003-03-07 20:47:56 +00:00
Pavel Roskin
2915491aa0 Call check_sid() only if possible. 2003-03-05 20:23:50 +00:00
Pavel Roskin
861deaf09d * subshell.c (init_subshell_child): Set environment variable
MC_SID to the session number of the subshell.
(check_sid): Check that we are not running mc already in the
same session.
* main.c (main): Don't run do_nc() if shutdown was requested.
2003-03-05 20:18:11 +00:00
Andrew V. Samoilov
8e810942f8 * cons.handler.c (set_attr) [__FreeBSD__]: Eliminate cmd array. 2003-03-05 19:38:50 +00:00
Andrew V. Samoilov
e45c155b58 * cons.handler.c (set_attr) [__FreeBSD__]: Eliminate cmd array. 2003-03-05 19:33:10 +00:00
Pavel Roskin
818b4956ea * cons.handler.c (console_init) [__FreeBSD__]: Fix the amount of
allocated memory.
(console_save) [__FreeBSD__]: Doen't exit on error, just return.
2003-03-05 17:52:58 +00:00
Pavel Roskin
7092f9e1e2 * cons.handler.c (show_console_contents_freebsd): Rewrite
to use screen library (S-Lang or ncurses).  Direct output is
unreliable when the screen library is active.
2003-03-05 09:29:31 +00:00
Pavel Roskin
b9081640b0 * profile.c (load): Fix reading keys immediately after comments. 2003-03-03 07:59:11 +00:00
Pavel Roskin
ff82223a35 Remove references to the archaic "linux" preprocessor definition.
Only __linux__ should be used.
2003-02-27 05:09:35 +00:00
Pavel Roskin
6b986e7547 Don't include main.h - it's not needed. 2003-02-27 05:01:40 +00:00
Pavel Roskin
e65f20852b * cons.handler.c: Put checks for rxvt extensions in one place.
Simplify FreeBSD code.
2003-02-27 04:57:58 +00:00
Pavel Roskin
c799424167 Fix for the previous patch to avoid freeing bogus pointers. 2003-02-26 19:25:13 +00:00
Pavel Roskin
a8a0f0c17a * cons.handler.c: Add implementation for FreeBSD 4.x and 5.x. 2003-02-26 19:14:52 +00:00
Pavel Roskin
c6311c4ca5 * view.c (load_view_file): Make sure view->s.st_size is not
truncated when passed to g_malloc().
Reported by Philipp Thomas <pthomas@suse.de>
2003-02-26 18:06:27 +00:00
Pavel Roskin
f5d76afe37 * key.c (get_modifier): Add support for QNX Neutrino console. 2003-02-23 05:36:49 +00:00
Pavel Roskin
66b2b1381c * key.c (init_key_x11): Don't try to use X11 if DISPLAY is not
set in the environment.
2003-02-23 05:23:04 +00:00
Pavel Roskin
92da7e9dc0 * key.c: Add support for dynamic loading of libX11. 2003-02-23 05:05:49 +00:00
Pavel Roskin
0f70a1c7ea * utilunix.c (destroy_groups): Revert last change, it doesn't
work with glib-1.2.x.
2003-02-21 16:32:32 +00:00
Pavel Roskin
31ba6af202 Add:
Ctrl-q Ctrl-m in input dialog should enter \r, not a newline.
Interpret C literals in regular expressions entered by the user, e.g. \r
and \0x0D.
2003-02-20 21:07:24 +00:00
Andrew V. Samoilov
1a3f1416a8 * option.c (init_configure): Use OTHER_OPTIONS consistently.
By Mike Smithson <dooligan@intergate.ca>.
2003-02-19 10:50:24 +00:00
Pavel Roskin
30aeb24388 * util.c (list_append_unique): Free removed links.
* utilunix.c (destroy_groups): Use g_tree_foreach() instead of
obsolete g_tree_traverse().
2003-02-19 00:42:04 +00:00
Pavel Roskin
cb1438913a * util.c (list_append_unique): Traverse the list backwards.
Otherwise the list was lost when the current link was removed.
2003-02-18 23:21:54 +00:00
Pavel Roskin
a2ef2fe88b * widget.c (history_get): Set the history to the last item.
Reported by Adam Byrtek <alpha@debian.org>
2003-02-18 21:43:46 +00:00
Pavel Roskin
fc0b31c73f More entries. Better descriptions. 2003-02-18 08:22:46 +00:00
Pavel Roskin
9cf0d2c60f * main.c (do_panel_cd): Record directory history for the panel
that changes the directory, not for the current panel.
2003-02-18 06:43:04 +00:00
Pavel Roskin
35895e3c10 Done:
Remove duplicate history entries.
2003-02-18 06:30:27 +00:00
Pavel Roskin
bd19828876 * widget.c (history_get): Use list_append_unique() for backward
compatibility.
2003-02-18 06:29:43 +00:00
Pavel Roskin
f95d276250 * main.c (directory_history_list): Allow history command even
with just one entry - it's more intuitive.
2003-02-18 06:19:11 +00:00