1
1

1220 Коммитов

Автор SHA1 Сообщение Дата
Pavel Roskin
80561f39a7 * man2hlp.c (main): Use only stream I/O. Fix checks for error
conditions.  Reformat the whole file.
2002-07-30 22:57:01 +00:00
Pavel Roskin
7e2fd7960e * man2hlp.c: Avoid the need to use gindex.pl.
From Andrew V. Samoilov <sav@bcs.zp.ua>
* Makefile.am: Use man2hlp directly.
(EXTRA_DIST): Remove gindex.pl.
* gindex.pl: Remove.
2002-07-30 22:20:26 +00:00
Pavel Roskin
b698076e0e * ext.c (regex_command): Additional check to prevent reading
unallocated memory when matching "shell/".  Found by Valgrind.
2002-07-30 05:39:48 +00:00
Pavel Roskin
bda707e46b * setup.c: Eliminate all PORT* macros.
* screen.c: Likewise.
2002-07-30 00:12:53 +00:00
Pavel Roskin
2935c85c85 * subshell.c (feed_subshell): Reading 0 bytes in a channel with
FD_ISSET being set is a sign of something being wrong - exit
immediately.  Observed when mc is run under su in xterm and
xterm is closed while the subshell is running.
Reported by Vlad Harchev <hvv@hippo.ru>
2002-07-30 00:03:26 +00:00
Pavel Roskin
777c46ee2a * color.h: Replace PORT_COLOR macro with BEST_COLOR, which uses
MY_COLOR_PAIR.
2002-07-29 23:37:22 +00:00
Pavel Roskin
6c7e1a46c8 * util.c: Remove unused functions.
* utilunix.c: Likewise.
* util.h: Update to match.
2002-07-29 23:12:31 +00:00
Pavel Roskin
0d360dca23 Remove irrelevant comment. 2002-07-29 22:14:16 +00:00
Pavel Roskin
b8f676ec41 * cons.saver.c: Use SEEK_SET instead of 0 in lseek().
* view.c: Likewise.
2002-07-29 21:18:51 +00:00
Pavel Roskin
17ceeead44 * main.c (do_execute): Add newline after "Press any key to
continue".
2002-07-29 19:30:41 +00:00
Pavel Roskin
7bab33656b * cons.saver.c: Eliminate some global variables. Further
cleanup.  Make sure that console_fd is always closed.
2002-07-29 05:59:07 +00:00
Pavel Roskin
edebd94750 * cons.saver.c: Remove support for Linux kernels before 2.0.
Massive cleanup.
(send_contents): Remove incorrect optimization - restore even
empty lines because they may be touched by the viewer.
From Denis Vlasenko <vda_unique@iname.com>
2002-07-28 08:52:27 +00:00
Pavel Roskin
18c160fefa * utilunix.c (canonicalize_pathname): Don't extend empty path
to "." - it can corrupt memory.
2002-07-26 21:51:16 +00:00
Pavel Roskin
1c1493cbe5 * cmd.c (copymove_cmd_with_default): Remove, it's unused.
(copy_cmd_local): New function, copy within panel.
(ren_cmd_local): New function, rename within panel.
* cmd.h: Adjust to match.
* screen.c (panel_keymap): Associate F15 with copy_cmd_local and
F16 with ren_cmd_local.
2002-07-26 19:30:13 +00:00
Pavel Roskin
0389cbf16c * view.c (display): Don't highlight characters as bold if the
character before the backspace was different.
From Roland Illig <roland.illig@gmx.de>
2002-07-26 17:17:41 +00:00
Andrew V. Samoilov
b5cfea00e1 * wtools.c (message): Fix possible buffer overflow. 2002-07-25 18:07:42 +00:00
Andrew V. Samoilov
8c9c34918b util.[ch] (app_text): Make const and adjust declaration. 2002-07-25 13:48:00 +00:00
Andrew V. Samoilov
eb7d542f24 * profile.c: Make AppName parameter const char * everywhere.
* profile.h: Adjust declarations.
2002-07-25 13:44:06 +00:00
Andrew V. Samoilov
e94799f762 * slint.c [HAVE_MAD] (dealloc_color_pairs): Move ...
* color.c [HAVE_MAD]: ... here and make accessible from
other files to fix compilation.
* color.h [HAVE_MAD]: Declare dealloc_color_pairs.
2002-07-25 13:04:19 +00:00
Pavel Roskin
8f4ca50c58 * screen.c (panel_callback): Revert last change, it has bad side
effects on the subshell.
2002-07-20 08:32:53 +00:00
Pavel Roskin
6bdeafba4d * dlg.c: Eliminate all useless x_* functions.
* dlg.h: Likewise.
* panel.h: Likewise.
* textconf.h: Likewise.
* view.c: Likewise.
* view.h: Likewise.
* widget.c: Likewise.
* main.c: Remove panel_update_marks(). Move try_to_select() ...
* screen.c: ... here.  Eliminate x_* functions.
* main.h: Remove panel_update_marks().
2002-07-19 22:16:24 +00:00
Pavel Roskin
f61bfaf8f5 * screen.c (panel_callback): Only change directory on
WIDGET_FOCUS if current_panel changes.
2002-07-19 20:22:07 +00:00
Pavel Roskin
17671c4de9 * main.c (handle_args): Don't call mc_get_current_wd(). 2002-07-19 19:08:26 +00:00
Pavel Roskin
ead99974fb * main.c (directory_history_list): Report error if cannot change
directory.
2002-07-19 05:03:44 +00:00
Pavel Roskin
bb34f88152 * main.c (do_execute): Don't ask to press any key when the shell
is running a command - the user has already pressed Ctrl-O.
2002-07-16 06:00:54 +00:00
Pavel Roskin
a2e8277428 * slint.c: Eliminate hardcoded color terminals. Most users no
longer need this hack, and those who do have color_terminals
option in the config file.
2002-07-15 06:01:29 +00:00
Pavel Roskin
82e481b78d * color.c [USE_NCURSES]: Eliminate division by COLOR, it's 0 in
black and white mode.
2002-07-14 22:18:12 +00:00
Pavel Roskin
b0dfc1b672 * slint.c: Move functions for allocating color pairs ...
* color.c: ... here.  Implement ncurses equivalents.  Rename
init_pair() to mc_init_pair() and keep tack of max_index with
ncurses.  Adjust all dependencies.
2002-07-14 21:41:12 +00:00
Pavel Roskin
6ffc6bde22 * mem.h: Clean up obsolete definitions, incorporate into ...
* global.h: ... this.
* Makefile.am: Remove mem.h.
2002-07-14 19:34:17 +00:00
Pavel Roskin
a2f136fdc3 s/ommited/omitted/ 2002-07-14 06:36:07 +00:00
Pavel Roskin
0ce1cd7354 * Makefile.am (AM_CPPFLAGS): Remove REGEX_MALLOC, it's now in
configure.in.
2002-07-13 19:11:03 +00:00
Pavel Roskin
4f4e0c2d2e * tty.h: Use standard autoconf defines to determine which
ncurses header to include.  Eliminate RENAMED_NCURSES.
2002-07-13 05:13:07 +00:00
Pavel Roskin
129df509f9 * utilunix.c: Cast argument for GUINT_TO_POINTER to int to fix
warnings on Cygwin.
2002-07-10 23:27:36 +00:00
Pavel Roskin
073e17a8d0 * subshell.c: ioctl() doesn't set errno - don't use perror() to
report failures.  Use fprintf() instead, ignore errors from
TIOCSWINSZ.
(resize_tty): New function - code common for resize_subshell()
and init_subshell_child().
2002-07-10 22:49:08 +00:00
Pavel Roskin
200356c074 * global.h: Include vfs.h.
* boxes.c (configure_vfs): Ask whether .netrc should be used.
From Thomas Zajic <zlatko@gmx.at>
2002-07-10 21:20:49 +00:00
Pavel Roskin
74288460f5 * file.c (do_transform_source): Cast the argument to functions
for character classification to unsigned int.
* main.c (handle_args): Likewise.
* util.c (size_trunc_sep): Likewise.
(skip_numbers): Likewise.
2002-07-03 19:47:40 +00:00
Pavel Roskin
0c0a5ae270 * subshell.c (sigchld_handler): Remove subshell_pty from the
channel list if the subshell has died.
2002-07-03 16:35:42 +00:00
Pavel Roskin
a83d080370 * mad.[ch] [__GNUC__] (mad_strconcat): Use macro varargs.
(mad_strdup_printf): Likewise.
(mad_strdup_vprintf): Likewise.
* main.c [HAVE_MAD] (main): Release this_dir and other_dir.
2002-07-03 15:58:54 +00:00
Pavel Roskin
bbbb6eb183 * main.c (stop_dialogs): New function to stop all dialogs.
(quit_cmd_internal): Use stop_dialogs() instead of stopping
midnight_dlg only.  This fixes exit from the shell invoked from
the internal viewer or editor.
2002-07-03 06:19:40 +00:00
Pavel Roskin
90ae932bf6 * cmd.c (view_other_cmd): Shut down extra select channels before
switching to the shell.  Restore them afterwards, but not if
quit was requested.  Skip more code on quit.
2002-07-03 05:56:49 +00:00
Pavel Roskin
2752379086 * util.c: Eliminate get_small_endian_long() and CHECK macro. 2002-07-02 21:25:49 +00:00
Pavel Roskin
3860ff7b34 * util.h: Rename compression types, add a type for uncompressed
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.
2002-07-02 21:09:25 +00:00
Andrew V. Samoilov
9e174e05f6 * utilunix.c (close_error_pipe): Use "%s" in message () to
prevent possible crash.
(check_error_pipe): Likewise.
2002-07-01 19:08:44 +00:00
Pavel Roskin
29633b4eb5 * screen.c (do_enter_on_file_entry): Process associations before
trying to execute the file.
2002-06-27 21:25:03 +00:00
Pavel Roskin
96632fcff1 * dir.c (handle_dirent): Don't process ".." entries.
(handle_path): Likewise.
From Andrew V. Samoilov <kai@cmail.ru>
2002-06-20 21:10:06 +00:00
Pavel Roskin
5ac5f41332 * slint.c (has_colors): Don't reset SLtt_Use_Ansi_Colors to 0 if
force_colors is not set.  This fixes color on unknown terminals.
2002-06-13 12:40:50 +00:00
Andrew V. Samoilov
5f2c890ba7 * user.c (expand_format): Fix '%b' proccessing.
Handle '%k' as documented.
2002-06-13 11:22:04 +00:00
Andrew V. Samoilov
f2ea65904e * main.c [HAVE_MAD && !_OS_NT] (main): G_free mc_home. 2002-05-30 13:35:09 +00:00
Andrew V. Samoilov
d073133873 * mad.c (mad_tempnam): Commented out to make linker happy. 2002-05-30 13:27:43 +00:00
Andrew V. Samoilov
320b3cedae * view.c (regexp_search): Don't call save_edit_changes
if there are no changes.
(save_edit_changes): Use messages from ../po/mc.pot.
2002-05-30 13:12:56 +00:00