Commit Graph

1411 Commits

Author SHA1 Message Date
Pavel Roskin
9860f07fc9 * util.h: Remove unused and dangerous flags for my_system():
EXECUTE_TEMPFILE, EXECUTE_SETUID and EXECUTE_WAIT.
* utilunix.c: Corresponding adjustments.
* ext.c: Don't use EXECUTE_TEMPFILE, it has no effect.
2002-08-19 23:41:21 +00:00
Pavel Roskin
d1e02fba0f * subshell.c (synchronize): Workaround for Cygwin (should not be
needed for the next version) - remove SIGCHLD blocking from
old_mask.
2002-08-19 22:28:00 +00:00
Pavel Roskin
047a7f906e * dlg.h: Remove all unused flags for create_dlg(). Adjust all
dependencies.
2002-08-19 06:22:32 +00:00
Pavel Roskin
342b4bbd0f * cmd.c (fishlink_cmd): Implement user interface for FiSH.
* main.c: Add it to the menu.
2002-08-19 06:06:09 +00:00
Pavel Roskin
e29d69423a * help.c (help_follow_link): Made static. 2002-08-19 05:00:58 +00:00
Pavel Roskin
11bd8d9c39 * subshell.c (synchronize): Discard all remaining data from
stdin to the subshell.
2002-08-19 02:06:01 +00:00
Pavel Roskin
105877896d * subshell.c (exit_subshell) [AIX_TCSH_CODE_BELOW_IS_IT_FIXED]:
Remove.  Nobody has fixed this code for years.
2002-08-19 01:54:34 +00:00
Pavel Roskin
6efa4a23f3 * main.h [USE_INTERNAL_EDIT]: Don't include declarations from
edit.h.
* setup.c [USE_INTERNAL_EDIT]: Include edit.h.
2002-08-19 01:43:40 +00:00
Pavel Roskin
96322324ea * boxes.h: Remove user_format.
* boxes.c: Make more variables static, remove all extern
declarations.
* setup.c: Remove some extern declarations.
2002-08-19 01:01:20 +00:00
Pavel Roskin
1e6c5b17ce * mountlist.h: Move some internals ...
* mountlist.c: ... here.
2002-08-19 00:07:08 +00:00
Pavel Roskin
0d89dec899 * main.c: Remove extremely unsafe and poorly designed support
for /tmp/mc.$PID.control file.
* util.c (my_putenv): Remove, it's unused now.
2002-08-18 22:31:49 +00:00
Pavel Roskin
b9421d6927 * panel.h (struct format_e): Make string_fn return const char *.
Adjust all dependencies.
* screen.c (string_file_mtime): Return empty string for "..".
(string_file_atime): Likewise.
(string_file_ctime): Likewise.
2002-08-18 22:01:51 +00:00
Pavel Roskin
05e708a791 * view.c (display): Use enum for boldflag values. Fix cursor
highlighting for the ASCII part of the hex editor.
2002-08-18 20:18:04 +00:00
Pavel Roskin
69f67049fa * layout.c (init_curses) [!HAVE_SLANG]: Add support for
stickchars - fill acs_map[] with ASCII approximations.
* main.c [!HAVE_SLANG]: Enable --stickchars (-a) for ncurses.
2002-08-18 16:34:29 +00:00
Pavel Roskin
d7f635e142 * setup.c: New variable global_profile_name to hold full name of
mc.lib.
(load_setup): Calculate global_profile_name.
(done_setup): Free global_profile_name.
(load_key_defs): Use global_profile_name.
* treestore.c (should_skip_directory): Likewise.
2002-08-17 01:11:21 +00:00
Pavel Roskin
0707cb5278 * man2hlp.c: Implement persistent fread and fwrite to make sure
that all output is read and written.
2002-08-16 16:48:27 +00:00
Andrew V. Samoilov
7b867c0d5c * user.c (expand_format): Cast the argument to functions
for character classification to unsigned int.
(execute_menu_command): Likewise.
2002-08-16 14:56:13 +00:00
Andrew V. Samoilov
fe2fdc4057 * help.c (show): Cast *paint_start to unsigned char to display
Cyryllic with ncurses.
[HAS_ACS_AS_PCCHARS] (acs2pc_table): Make const.
2002-08-16 09:07:20 +00:00
Andrew V. Samoilov
f289243ff2 * help.c (show): Cast *paint_start to unsigned char to display
Cyryllic with ncurses.
[HAS_ACS_AS_PCCHARS] (acs2pc_table): Make const.
2002-08-16 08:55:07 +00:00
Pavel Roskin
479ccc534f * treestore.c (tree_store_remove_entry): Don't use ts.check_name
and don't check it.
2002-08-16 00:05:29 +00:00
Pavel Roskin
cafbb72684 * treestore.c: Remove unused code, reformat.
* treestore.h: Remove unused declarations.
2002-08-15 23:31:23 +00:00
Pavel Roskin
8d173014e9 * fs.h (compute_namelen): New inline function to take care of
the d_namlen field if and only if it's needed.
2002-08-15 19:35:53 +00:00
Pavel Roskin
58da40fa6a * screen.c (string_file_name): Replace non-printable characters
with question marks.
2002-08-15 16:52:51 +00:00
Pavel Roskin
f0dbdeb72e * subshell.c (read_subshell_prompt): Remove argument "how", it's
never set to VISIBLY.  Adjust all dependencies.  Eliminate hack
with "clear_now" - it causes invalid memory access and hides the
real problem.
* util.c (strip_ctrl_codes): Fix possible invalid memory access
if the escape sequence ends unexpectedly.
2002-08-15 06:53:44 +00:00
Pavel Roskin
786c75b683 * dir.c (do_load_dir): Fix leaking of file descriptors - always
call mc_closedir() before return.
2002-08-15 02:02:49 +00:00
Pavel Roskin
66c5184faa Revert undocumented change in the declaration of decompress_extension(). 2002-08-15 01:45:06 +00:00
Pavel Roskin
6d2f235053 * main.c (do_execute) [!HAVE_SUBSHELL_SUPPORT]: Compile fix. 2002-08-15 01:36:09 +00:00
Andrew V. Samoilov
4c25b24536 * util.c (reverse_string): Speed up. 2002-08-14 16:33:50 +00:00
Pavel Roskin
7ea7ec49ab * view.c (display): Use only declared color pairs to fix hex
editor appearance with ncurses.  Eliminate some useless defines.
2002-08-14 07:41:01 +00:00
Pavel Roskin
d0b31c1c81 * key.c (delete_select_channel): Avoid using freed memory. 2002-08-10 04:37:13 +00:00
Pavel Roskin
c46d1f590b * ext.c (exec_extension): Eliminate unused argument.
(regex_command): Remove support for user actions.  Return int.
Adjust all dependencies.
2002-08-10 00:37:55 +00:00
Pavel Roskin
bb4451f170 * ext.c (exec_extension): Make static. Remove support for Drop,
Title and Icon actions.  Adjust all dependencies.
2002-08-10 00:14:01 +00:00
Pavel Roskin
b7cdfa9c93 * main.c (sigchld_handler_no_subshell) [linux]: SIGTSTP is
always defined on Linux.
* subshell.c (sigchld_handler): No need to use SIGTSTP
explicitly when we really care about SIGCONT.
2002-08-09 23:36:06 +00:00
Pavel Roskin
a1aabfff50 * ncurses.patch: Remove, it's obsolete.
* Makefile.am: Remove ncurses.patch.
2002-08-09 22:00:27 +00:00
Pavel Roskin
56368fe9f2 * lib/xnc.hlp: Move ...
* doc/xnc.hlp: ... here.
* doc/Makefile.am: Necessary adjustments.
* lib/Makefile.am: Likewise.
* src/Makefile.am: Likewise.
2002-08-09 21:55:20 +00:00
Pavel Roskin
e26cef8825 * subshell.c: Assume that SIGTSTP and SIGCONT are always
defined.  This is now checked in configure.  Otherwise
synchronize() would hang until subshell exits.
2002-08-04 06:59:34 +00:00
Pavel Roskin
e2a37d3809 * charsets.c: Unconditionally enable finalization code that was
only used with HAVE_MAD.
* color.c: Likewise.
* color.h: Likewise.
* key.c: Likewise.
* main.c: Likewise.
* slint.c: Likewise.
* subshell.c (exit_subshell): Free subshell_prompt.
2002-08-01 20:31:52 +00:00
Pavel Roskin
105cb58726 * mad.c: Remove.
* mad.h: Likewise.
* Makefile.am (SRCS): Remove mad.c and mad.h.
* cmd.c: Remove references to MAD.
* main.c: Likewise.
* dlg.c: Use inline, not INLINE.
* hotlist.c: Likewise.
* menu.c: Likewise.
* global.h: Don't include mad.h.
2002-08-01 19:40:43 +00:00
Andrew V. Samoilov
a583a32a73 * key.h (key_code_name_t): Typedef const. 2002-07-31 00:35:06 +00:00
Andrew V. Samoilov
8025b4bce4 * ext.c (regex_command): Don't check same condition twice.
(exec_extension): Comment out useless loop.
2002-07-31 00:28:07 +00:00
Andrew V. Samoilov
10044de5b9 * man2hlp.c (main): Don't use freed structure member. 2002-07-31 00:08:51 +00:00
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
Andrew V. Samoilov
53a7967f74 * view.c (save_edit_changes): Handle errors.
(do_view_init): Don't open and check file type
if _command is not null or _file is empty string.
2002-05-27 16:20:35 +00:00
Pavel Roskin
1dade2fbc4 * Makefile.am: doc/mc.1 is in top_builddir, not in top_srcdir. 2002-05-22 16:10:52 +00:00
Andrew V. Samoilov
a876d1a17d * view.c (do_view_init): Close fd if it is unused. 2002-05-15 14:44:54 +00:00
Andrew V. Samoilov
040cbd2e6b * Makefile.am (VFSLIB): Add ../vfs/samba/libsamba.a
if USE_WITH_SAMBA is true.
2002-05-14 12:39:04 +00:00
Pavel Roskin
2e8c3085e8 * hotlist.c (hotlist_button_callback): Don't process B_REMOVE
for VFS list - it would crash.
From Andrey Panov <pav@metib.ru>
2002-05-07 05:37:04 +00:00
Andrew V. Samoilov
5a255dd2ea * main.c [!WITH_MCFS] (PanelMenu): Eliminate mcfs related entry.
(RightMenu): Likewise.
* textconf.c (features): Likewise.
* cmd.c (netlink_cmd) [!WITH_MCFS]: Eliminate.
2002-04-19 07:21:09 +00:00
Pavel Roskin
c942254c57 * Makefile: mc.hlp should be in MAINTAINERCLEANFILES, not in
CLEANFILES, because "make clean" should not make the source
directory useless on systems without Perl.
2002-04-03 07:41:12 +00:00
Andrew V. Samoilov
6edfce4e7b * Makefile.am (CLEANFILES): Add mc.hlp. 2002-03-28 15:44:52 +00:00
Andrew V. Samoilov
3c239079b2 * eregex.h [!USE_INCLUDED_REGEX]: Include <regex.h>.
* regex.c: Compile only if USE_INCLUDED_REGEX is defined.
2002-03-26 14:13:10 +00:00
Andrew V. Samoilov
7f08501250 * src/Makefile.am: Move mc.hlp.ru processing ...
* doc/ru/Makefile.am: ... here.
2002-03-26 13:22:32 +00:00
Andrew V. Samoilov
8766ce3b02 * cmd.[ch] [USE_INTERNAL_EDIT] (edit_syntax_cmd:) New dialog
to edit Syntax Highlighting definitions file.
* main.c (CmdMenu) [USE_INTERNAL_EDIT]: Add 'Syntax file edit'
entry.
(process_args): Print mc's library directory to stdout.
2002-03-25 07:46:18 +00:00
Andrew V. Samoilov
ac26b4f20e * complete.c (insert_text): Fix buffer overflow. 2002-03-25 07:28:25 +00:00
Andrew V. Samoilov
0154dbfdc3 * man2hlp.c (handle_link): Strip .B and .I
* gindex.pl: Use fifth argument as man2hlp location.
2002-03-21 13:01:20 +00:00
Andrew V. Samoilov
20dd6b4e88 * man2hlp.c (handle_command): Handle backslash quoting
for .I and .B
2002-03-21 08:13:58 +00:00
Andrew V. Samoilov
830c9ae976 * man2hlp.c (handle_command): Handle '.\"TOPICS' comment.
Use it for translated 'Topics:' message.
* gindex.pl: Use first line of man2hlp output as
translated 'Topics:' message if fourth argument
is empty string.
* Makefile.am (mc.hlp.ru): Use empty string as gindex.pl's
fourth argument.
2002-03-20 14:03:55 +00:00
Andrew V. Samoilov
fae9735bb9 * textconf.c (version): Write to stdout.
* main.c (print_mc_usage): Add "stream" parameter to specify
file stream.
(process_args): Use print_mc_usage() with stdout as stream.
(handle_args): Use print_mc_usage() with stderr as stream.
(print_color_usage): Write to stdout.
2002-03-20 11:28:08 +00:00
Pavel Roskin
7ca687c8ed * eregex.h: Update from glibc-2.2.5.
* regex.c: Likewise.
* find.c: Use eregex.h, not regex.h.
* util.c: Likewise.
* view.c: Likewise.
From Alexander Varakin <avarakin00@hotmail.com>
2002-03-18 21:08:18 +00:00
Pavel Roskin
ebe22f53db * find.c (find_parameters): Invert condition when find is case
sensitive.
2002-03-18 20:04:13 +00:00
Pavel Roskin
5e7549d346 Add mc.hlp.?? 2002-03-12 16:26:53 +00:00
Andrew V. Samoilov
5f2ae160c0 * file.c (copy_file_file): Rollback one hunk to eliminate infinitive loop. 2002-03-06 07:37:14 +00:00
Andrew V. Samoilov
0e0fdc3aa6 * Makefile.am (mc.hlp.ru): Use mc.1 instead of mc.1.in.
(mc.hlp): Likewise.
2002-03-04 14:54:34 +00:00
Andrew V. Samoilov
4bfeff6aca * Makefile.am (mc.hlp.ru): Use mc.1 instead of mc.1.in.
(mc.hlp): Likewise.
2002-03-04 14:09:09 +00:00
Andrew V. Samoilov
8ce8833c37 * file.c (copy_file_file): Chmod destination only if
ctx->preserve is on.  Eliminate gotos.
2002-03-04 13:52:39 +00:00
Andrew V. Samoilov
51e1d26419 * Makefile.am (mc.hlp.ru): New rule to compile translated
help file.
(mclib_DATA): Add mc.hlp.ru.
2002-03-01 15:05:20 +00:00
Andrew V. Samoilov
e587297a62 * gindex.pl: Add optional 4th argument for translated
Content section name.
2002-03-01 14:08:03 +00:00
Andrew V. Samoilov
760d6a8115 * gindex.pl: Use [nodename] as user visible section name
only if next line is empty.  Elsewhere use this nonempty line.
2002-02-28 16:49:26 +00:00
Andrew V. Samoilov
10517bd1fc * mad.c: Make mem_areas dynamically growing.
(mad_init): Allocate memory for mem_areas.
(mad_alloc): Grow mem_areas if it is exhausted.
2002-02-28 15:36:00 +00:00
Andrew V. Samoilov
0f4a7d26f8 * filegui.c (file_mask_dialog): Enable 'follow Links'
and 'preserve Attributes' features in Move dialog.
(file_bps_show): Translate messages.
(file_eta_show): Likewise.
2002-02-28 15:18:10 +00:00
Andrew V. Samoilov
b5a0c42e21 (handle_command): Handle '.\"NODE' comment. Use it for
nodename in translated manual pages.
2002-02-28 14:38:38 +00:00
Andrew V. Samoilov
ad0767356f * man2hlp.c (main): Don't crash if called without argument(s).
Make `buffer' char pointer.
2002-02-28 14:12:34 +00:00
Andrew V. Samoilov
3de820819f * find.c (find_parameters): Compile content_pattern here.
Inform user about alformed regular expression.
(search_content): Use compiled regular expression.
(do_find): Eliminate `done'.  Call regfree for compiled
content_pattern.
2002-02-28 13:50:03 +00:00
Pavel Roskin
b9e4f7c338 * chown.c (chown_cmd): Use size_trunc_len() to show the file
size.  Eliminate c_fsize, which wasn't properly initialized.
2002-02-24 07:17:47 +00:00
Pavel Roskin
7346c6f93e * man2hlp.c (string_len): Don't exclude characters with codes
above 128 from the string length.
2002-02-22 05:54:00 +00:00
Andrew V. Samoilov
c13770201f * ext.c (exec_extension): Use "#! /bin/sh". 2002-02-21 14:37:51 +00:00
Pavel Roskin
8c9fc66db0 * background.c (background_attention): Cast pointer to long
instead of int because it's unsafe of 64-bit systems.
* main.c (init_xterm_support): Likewise.
2002-02-21 01:49:29 +00:00
Pavel Roskin
6c67d1918c * utilunix.c (canonicalize_pathname) [__QNX__]: Fix detection
of Qnet names.  Disable support of Qnet names under QNX Netrino.
Reported by Maurizio Rossi <MRossi@system-group.it>
2002-02-18 22:31:56 +00:00
Pavel Roskin
2b7cf88d85 * global.h: Include unix.h under "classical" QNX.
* subshell.c: Don't include unix.h.
* utilunix.c: Likewise.
2002-02-18 21:54:27 +00:00
Andrew V. Samoilov
455e64673e * main.c (update_one_panel_widget): Call ftpfs_flushdir(). 2002-02-07 19:24:44 +00:00
Pavel Roskin
5257da5f83 * key.c [USE_NCURSES] (get_key_code): Ignore KEY_RESIZE.
* layout.c [USE_NCURSES] (flag_winch): Don't call
low_level_change_screen_size() from signal handler.
From Thomas Dickey <dickey@herndon4.his.com>
2002-02-06 05:23:50 +00:00
Pavel Roskin
9a67ad6ebf * screen.c (format_file): Add a new parameter (size of the
output buffer) to prevent buffer overflow on very wide
terminals.
From Thomas Dickey <dickey@herndon4.his.com>
2002-02-06 05:14:16 +00:00
Andrew V. Samoilov
aa2832dff9 * util.c [!HAVE_TRUNCATE] (truncate): Close fd if my_ftruncate
fails.

* util.c [HAVE_CHARSET] (is_printable): Eliminate printable.
* setup.c [HAVE_CHARSET] (load_setup): Don't use
init_printable_table().

* charset.c (printable): Removed.
(init_printable_table): Removed.
2002-02-04 18:09:42 +00:00
Andrew V. Samoilov
ce7bae4dd7 * file.c (recursive_erase): Use mc_closedir() if mc_lstat()
fails.  Eliminate goto.
(erase_dir): Eliminate goto.
(erase_dir_iff_empty): Likewise.
2002-01-30 11:15:39 +00:00
Andrew V. Samoilov
4b84517072 * charsets.c (translate_character): Use ICONV_CONST. 2002-01-29 15:10:00 +00:00
Andrew V. Samoilov
3cb3d285df * dir.c (handle_dirent): Use MSG_ERROR. 2002-01-29 08:10:36 +00:00
Pavel Roskin
3ecaa166e8 * screen.c: Don't try to paint anything if width is 0 or less.
Reported by Pawel Sakowski <pawel@sakowski.eu.org>
2002-01-22 23:37:41 +00:00
Pavel Roskin
34fe9abd28 * screen.c: Make functions static whenever possible. Remove
unused functions.
* panel.h: Remove corresponding declarations.
2002-01-22 23:16:21 +00:00
Pavel Roskin
e5c6976b15 * util.c: Move replacements for permission bits ...
* fs.h: ... here.  Add more replacements.
* global.h: Include direct.h only with MSVC.
2002-01-22 01:23:18 +00:00
Pavel Roskin
93fd1572a5 * main.c: Include "drive.h", not <drive.h>, do it after panel.h.
Use _OS_NT as the condition for including drive.h.
* screen.c: Use _OS_NT as the condition for including drive.h.
2002-01-22 00:30:51 +00:00
Pavel Roskin
22b2813349 * global.h [_OS_NT]: Include io.h, direct.h and windows.h.
Don't redefine struct timeval.
2002-01-22 00:24:36 +00:00
Pavel Roskin
af3bb307d1 * fs.h [_MSC_VER]: Use dirent provided by glib. 2002-01-21 23:09:07 +00:00
Pavel Roskin
d99d279148 * global.h [!HAVE_SYS_TIME_H]: Provide a replacement for struct
timeval.
2002-01-21 22:46:22 +00:00
Pavel Roskin
d9c035d2c2 Fixed #elif. 2002-01-21 21:29:55 +00:00
Pavel Roskin
7b8b4394d5 * findme.c: Respect HAVE_UNISTD_H.
* popt.c: Likewise.
2002-01-21 21:04:44 +00:00
Pavel Roskin
a504067e6c * global.h: Fallback to sys/utime.h if utime.h is missing. 2002-01-21 20:57:31 +00:00
Pavel Roskin
3a9692b680 * global.h: Provide fallbacks for getuid(), getgid(), geteuid()
and getegid().
* fs.h: Fully trust HAVE_DIRENT_H.
* complete.c: Don't include dirent.h directly, fs.h takes care
of it.
* file.c: Likewise.
* filegui.c: Likewise.
* main.c: Likewise.
* treestore.c: Likewise.
2002-01-21 20:47:05 +00:00
Pavel Roskin
4df07d04be * global.h [!__GNUC__]: Define __attribute__ with one argument. 2002-01-21 19:57:48 +00:00
Pavel Roskin
3e8ada15be * screen.c (string_file_size): Translate "UP--DIR".
(string_file_size_brief): Translate "SUB-DIR" and "SYMLINK".
2002-01-20 20:14:15 +00:00
Pavel Roskin
c14f6363da * dir.c (add_dotdot_to_list): Don't use costly stat() - just put
realistic (i.e. bogus) data to the list.
2002-01-20 20:05:40 +00:00
Pavel Roskin
894ed9dcc6 * screen.c (string_file_size): Don't display size of ".." - it
may take too much time to calculate it on VFS.  Show "UP--DIR"
instead.
(string_file_size_brief): Remove ".." handling - it's now done
in string_file_size().  Show "SUB-DIR" for links to directories,
"SYMLINK" for other links.
2002-01-20 19:52:11 +00:00
Pavel Roskin
73ed832576 * cmd.c: Remove OS/2 specific code.
* file.c: Likewise.
* main.c: Likewise.
2002-01-17 07:23:50 +00:00
Pavel Roskin
030d1bf2ad * main.h: Remove dead declarations.
* setup.c: Remove defunct extension alignment support.
* util.c: Likewise.
* util.h: Likewise.
2002-01-17 07:17:54 +00:00
Pavel Roskin
03f801b0f2 * main.c: Remove unused toggle_* functions. 2002-01-17 06:56:22 +00:00
Pavel Roskin
ff7208e93b * dir.c: Show backups by default. 2002-01-17 05:42:00 +00:00
Andrew V. Samoilov
7d88c34470 * file.c (copy_dir_dir): Check the destination is a directory
if it exists. Reported by Thomas <metaf4@pseudonym.org>.
2002-01-15 08:01:29 +00:00
Andrew V. Samoilov
21c015b2f8 * util.c (string_perm) [S_IFDOOR]: Support Solaris doors.
screen.c (string_file_type) [S_IFDOOR]: Likewise.
2002-01-09 10:54:13 +00:00
Pavel Roskin
9e23676939 * hotlist.c (hotlist_callback): Recognize "delete" key. 2001-12-22 01:29:20 +00:00
Pavel Roskin
08cb611abf * myslang.h [!HAVE_SYSTEM_SLANG]: Include slang/slang-mc.h to
simplify includes.
[HAVE_SYSTEM_SLANG]: Use angle brackets for slang.h.
2001-12-21 22:15:24 +00:00
Pavel Roskin
1e15aecb9f * myslang.h [!HAVE_SYSTEM_SLANG]: Include slang-mc.h directly
to avoid relying on symlinks.
2001-12-21 20:17:22 +00:00
Pavel Roskin
5d27f706bd * utilunix.c (init_groups): Don't return prematurely if the
primary group cannot be found (it can happen on Cygwin).
2001-12-18 20:00:27 +00:00
Pavel Roskin
340f689384 * dir.c (do_reload_dir): Hash-table added.
From Bjrn Eriksson <mdeans@algonet.se>
2001-12-11 00:30:12 +00:00
Pavel Roskin
b8eecba1d9 Comment fix. From Bjrn Eriksson <mdeans@algonet.se> 2001-12-07 02:47:04 +00:00
Pavel Roskin
27d176979b s/crush/crash/ and other minor things. 2001-12-03 23:38:11 +00:00
Pavel Roskin
111c11418a * dir.c (do_reload_dir): Optimize the logic - count the marks
and only match new entries against old entries if at least one
mark has not been transferred.
From Bjrn Eriksson <mdeans@algonet.se>
2001-12-03 21:39:41 +00:00
Pavel Roskin
acbe83ef9c * main.c (midnight_callback): Implement "auto menus". 2001-11-29 21:03:16 +00:00
Pavel Roskin
905b9ac8f8 * layout.c: Make more variables static. 2001-11-29 20:30:50 +00:00
Pavel Roskin
d816549ab9 * cons.saver.c: Define LINUX_CONS_SAVER_C so that some parts
of cons.saver.h can be omitted.
* cons.saver.h: Declare nothing but constants if
LINUX_CONS_SAVER_C is defined.
2001-11-29 20:28:48 +00:00
Pavel Roskin
fa89635b51 Fully eliminate all references to HAVE_X and HAVE_GNOME. 2001-11-14 23:20:37 +00:00
Pavel Roskin
d62c8ee427 * dir.c (do_sort): Correctly handle the case when there is no
".." entry (i.e. panelized mode).
2001-11-14 20:32:47 +00:00
Pavel Roskin
e50abb3f80 * view.c (do_view_init): Make sure _file is not
an empty string before mc_stat and mc_open.
Memory leak fixed.
2001-11-14 20:15:36 +00:00
Pavel Roskin
79dd5b30cb * panelize.c (do_external_panelize): Re-sort the panel according
to the current settings.
2001-11-14 20:06:08 +00:00
Pavel Roskin
86213a2be0 * find.c (do_find): Re-sort the panel according to the current
settings when doing panelizing.
2001-11-14 19:59:31 +00:00
Pavel Roskin
47f87cba24 * dir.c (sort_type_to_name): Remove, it's unused in the text
edition.
(sort_name_to_type): Likewise.
* dir.h: Adjust to match.
2001-11-14 18:57:24 +00:00
Pavel Roskin
358abbe0df * mouse.c: Add default cases to fix warnings with gcc-2.96. 2001-11-14 18:27:45 +00:00
Pavel Roskin
b03032c29b * main.c: Remove support for subshell debugging. Firstly, it
was broken.  Secondly, every developer should be able to add
this code when needed.  Finally, there is no need to expose the
option to the user and translate it into 30 languages.
* subshell.h: Remove debug_subshell.
* subshell.c: Likewise.
2001-11-12 22:09:40 +00:00
Andrew V. Samoilov
5f152d9ef0 * mad.h: Enable glib support.
* mad.[ch] (mad_get_current_dir): New function to use instead
of g_get_current_dir.
(mad_tempnam): Add file and line parameters.
(mad_alloc0): Make file parameter const.
(mad_realloc): Likewise.
(mad_strdup): Likewise.
(mad_strndup): Likewise.
(mad_free): Likewise.
(mad_finalize): Likewise.
2001-11-12 07:32:55 +00:00
Andrew V. Samoilov
3964ef8d3c * cmd.c (guess_message_value): Make val static const array.
(smblink_cmd) [!WITH_SAMBA]: Eliminated.
2001-11-08 07:25:16 +00:00
Andrew V. Samoilov
16d1473204 * slint.c (slang_reset_softkeys): Make display static const
array.  Use sizeof (display) - 1 instead of strlen display.
(color_terminals): Make static const array.
(key_table): Make const.

(dealloc_color_pairs) [HAVE_MAD]: New function.  Release
memory allocated in try_alloc_color_pair.
(slang_shutdown) [HAVE_MAD]: Call dealloc_color_pairs.
(try_alloc_color_pair): Move struct c outside function.
2001-11-07 13:35:57 +00:00
Andrew V. Samoilov
35db7bf645 * dlg.c (add_widget): Check for what is not NULL
before everything else.
2001-11-07 12:15:11 +00:00
Andrew V. Samoilov
1cd0a043a7 * charsets.c (load_codepages_list): Use glib memory allocation
functions.
(free_codepages_list) [HAVE_MAD]: New function to release
memory allocated in load_codepages_list.
* charsets.h: Declare free_codepages_list.

* main.c [HAVE_CHARSET]: Include charsets.h.
(main) [HAVE_MAD && HAVE_CHARSET]: Call free_codepages_list.
(program_name): Commented out.
2001-10-29 13:40:00 +00:00
Pavel Roskin
3b32c84134 Add .deps 2001-10-29 06:27:31 +00:00
Andrew V. Samoilov
66600cad98 * TODO: Typo fixed 2001-10-26 11:32:41 +00:00
Andrew V. Samoilov
58f1577542 * key.c (push_char): Fix buffer length calculation.
By drk@sgi.com.
http://bugzilla.gnome.org/show_bug.cgi?id=60932

(define_sequence): Likewise.
(key_define_t): Add const declaration.
2001-10-26 10:21:25 +00:00
Pavel Roskin
f0490b2a06 * main.h: Declare view_one_file and edit_one_file. 2001-10-23 01:39:25 +00:00
Andrew V. Samoilov
dd2ef8b4fb * dialog.h: Include global.h.
(message): Specify __attribute__.
2001-10-22 15:37:27 +00:00
Pavel Roskin
3cdc394c36 * main.h (print_vfs_message): Specify __attribute__. 2001-10-20 07:01:08 +00:00
Pavel Roskin
6eef7a34e7 * global.h: Define __attribute__ to an empty string for non-gcc
compilers so that it's safe to use.
2001-10-20 03:38:41 +00:00
Pavel Roskin
2503eb0342 * view.c (view_hook): Warning fix. 2001-10-18 08:42:20 +00:00
Pavel Roskin
1773a0fee0 * view.c (init_growing_view): Revert last change, it was wrong.
(view_hook): Don't check that the file is regular - it's now
done in do_view_init().  This fixes update problem in quick view
when moving cursor from a regular file to a directory.
2001-10-18 08:39:41 +00:00
Pavel Roskin
37e595b6ba * view.c (do_view_init): Only accept regular files. Use stat(),
not fstat() because open() would hang on pipes.  Avoid opening
the file twice.
(init_growing_view): Take file descriptor, not the filename.
(load_view_file): Likewise.
2001-10-18 06:23:02 +00:00
Pavel Roskin
3ab6f77fee * boxes.c (tree): Rename to tree_box() to avoid confusion.
Adjust all callers and headers.
* main.c (tree_box): Rename to tree_box_cmd().
2001-10-01 06:51:15 +00:00
Pavel Roskin
ea27edf4d5 * tree.c (set_navig_label): Get argument "tree".
(set_navig_label): Likewise.  Adjust all callers.  Don't cast
function tree() to (Widget *) - it's wrong and dangerous.
2001-10-01 06:42:37 +00:00
Pavel Roskin
8e085b98fd * widget.h: Use type "buttonbarfn" more consistently.
* widget.c: Likewise.
2001-10-01 06:31:40 +00:00
Pavel Roskin
958f3f49dd * setup.c [!USE_VFS]: Warning fix.
* hotlist.c [!USE_VFS]: Likewise.
2001-10-01 06:08:56 +00:00
Pavel Roskin
87177d15db * tree.c (tree_navigation_flag): Should not be static. 2001-10-01 05:11:45 +00:00
Pavel Roskin
04392aad1d * screen.c (panel_format_modified): Use more portable cast. 2001-10-01 04:31:49 +00:00
Pavel Roskin
da462709f0 * fileopctx.h: Define new type mc_stat_fn.
* filegui.c (file_mask_dialog): Cast mc_stat and mc_lstat to
mc_stat_fn to prevent warnings without VFS support.
* fileopctx.c (file_op_context_new): Likewise.
2001-10-01 04:20:23 +00:00
Pavel Roskin
2168f2fc50 * find.c: Include rx.h or regex.h
(get_line_at): New function.  Returns malloc()ed null-terminated
line from file file_fd.  Input is buffered in buf_size long
buffer.
(search_content): Don't use external egrep.
Use get_line_at and regexp.
2001-09-23 04:06:35 +00:00
Pavel Roskin
5e3bb68e26 * cmd.c: Change all "long" variables to "off_t" whenever they
are used to store file sizes.
* file.c: Likewise.
* file.h: Likewise.
* fileopctx.h: Likewise.
* tree.c: Likewise.
* filegui.c: Likewise.
(show_bar): Take "double" arguments.  Normalize arguments of
gauge_set_value() before converting them to "int".
2001-09-21 05:04:38 +00:00
Pavel Roskin
34947b1819 * mouse.h: Major cleanup and interface change. init_mouse()
should only be called once, disable_mouse() and enable_mouse()
should be used later.  Distinguish between disabled and
undetected mouse.  Remove debugging stuff.  Adjust all users.
* mouse.c: Implementation of the above.
* key.c: Don't use gpm_flag - check mouse_enabled instead.
2001-09-17 04:43:58 +00:00
Pavel Roskin
9b00e32f64 * view.c: Cleanup of preprocessor directives.
* view.h: Likewise.
* widget.c: Likewise.
* widget.h: Likewise.
2001-09-16 01:22:12 +00:00
Pavel Roskin
f2e38b2c3a * textconf.h: Get rid of all PORT_HAS_*. Adjust all users.
Continued eliminating GNOME code.
2001-09-16 01:10:09 +00:00
Pavel Roskin
0a4aa53f65 * cmd.c: Clean up unused GNOME code and some ifdef's.
* dlg.c: Likewise.
* dlg.h: Likewise.
* ext.c: Likewise.
* setup.c: Likewise.
2001-09-16 00:53:43 +00:00
Pavel Roskin
7fe30fff07 * cmd.c (guess_message_value): Remove the argument. Adjust all
callers.
2001-09-16 00:18:39 +00:00
Pavel Roskin
e94ec737ad * textconf.c (features): Remove "edition", minor fixes.
(version): Don't report the current locale - it's meaningless,
especially if ENABLE_NLS is not defined.
2001-09-16 00:07:59 +00:00
Pavel Roskin
7e69c250a5 * textconf.h: Remove status_using_ncurses - it's useless now.
Adjust all users.  Call do_exit_ca_mode() and do_enter_ca_mode()
even with ncurses.
2001-09-15 23:44:43 +00:00
Pavel Roskin
aa50585937 * main.c (init_xterm_support): Don't enable xterm_flag just
because of "kmous" in terminfo.  Setiing this flag means much
more than just mouse support.  Recognize terminals beginning
with "rxvt" and set xterm_flag for them.
2001-09-15 22:59:34 +00:00
Pavel Roskin
e65a82ed06 * cmd.c (view_other_cmd): Don't check use_mouse_p before calling
init_mouse() and shut_mouse(), since those functions decide
themselves what to do.
* layout.c (done_screen): Likewise.
* main.c (setup_mc): Likewise.
* text.c (edition_post_exec): Likewise.
(edition_pre_exec): Likewise.
2001-09-15 21:34:42 +00:00
Pavel Roskin
b54b1e491c * user.h: Fix location of the home editor menu.
Reported by David Martin <dmartina@excite.es>
2001-09-15 18:56:58 +00:00
Pavel Roskin
3051dba20b * mouse.h: Export xmouse_seq.
* mouse.c (init_mouse): Use xmouse_seq instead of hardcoded
xterm mouse sequence.
* main.c (setup_post): Join with setup_mc().
(init_xterm_support): New function.  Check mouse capability.
(OS_Setup): Remove parts that are now in init_xterm_support().
2001-09-15 16:54:40 +00:00
Pavel Roskin
7efdf3527d * key.c (get_event): Recognize KEY_MOUSE, not just MCKEY_MOUSE.
* mouse.c: Don't use or emulate keyok(), since MC understands
KEY_MOUSE now.
2001-09-15 01:18:11 +00:00
Pavel Roskin
a100142753 * cmd.c (check_for_default): Make accessible from other files.
* cmd.h: Declare check_for_default().
2001-09-11 21:38:59 +00:00
Pavel Roskin
13e92aca94 * layout.c: Use HAVE_TERMIOS_H and HAVE_SYS_IOCTL_H more
consistently.
* mouse.c: Likewise.
* subshell.c: Likewise.
* win.c: Likewise.
* util.c: Remove unused includes.
2001-09-11 02:18:02 +00:00
Pavel Roskin
0883a31c10 * Makefile.am (mc_LDADD): Don't use LSLANG and LGPM, since they
are now included into MCLIBS.
2001-09-10 22:00:25 +00:00
Pavel Roskin
c69f80cc61 * Makefile.am (mc_LDADD): Use INTLLIBS provided by gettext
instead of LINTL.
2001-09-10 20:08:28 +00:00
Pavel Roskin
192d6c1853 * hotlist.c (load_hotlist): If cannot open hotlist, don't assume
that it needs to be migrated and don't warn the user.
2001-09-09 05:46:44 +00:00
Pavel Roskin
e136f3b7b3 * Makefile.am: Fix definitions of CONFDIR and LOCALEDIR. 2001-09-09 01:50:00 +00:00
Pavel Roskin
a16f742216 * subshell.c: Move definitions of WEXITSTATUS and WIFEXITED
below all includes so that they can be defined elsewhere.
2001-09-08 05:36:23 +00:00
Pavel Roskin
b52bd06f04 * myslang.h: Specify arguments to function-like macros or remove
them if they are unused.
2001-09-08 04:37:19 +00:00
Pavel Roskin
92565a30ba * main.c: Remove old debugging code. Remove external function
declarations.
(menu_bar_event): Remove, it's unused.
* main.h: Declare get_mc_lib_dir() and force_ugly_line_drawing.
* layout.c: Remove all external declarations.
2001-09-08 04:06:03 +00:00
Pavel Roskin
bd5f3b08ae * main.c (main): Call save_stop_handler() - it was ifdef'd out
by error.
2001-09-07 22:37:46 +00:00
Pavel Roskin
482e115e3b * main.c: Remove all GNOME code. 2001-09-07 21:15:04 +00:00
Pavel Roskin
89dc0964cb * cmd.c: No need to define "MIDNIGHT" before including vfs.h. 2001-09-07 20:15:14 +00:00
Pavel Roskin
4895273a57 * user.h: Remove all dirty tricks with "MIDNIGHT" - they are not
needed anymore.
2001-09-07 19:54:15 +00:00
Pavel Roskin
c11389facb * global.h: Include io.h, pwd.h, grp.h and utime.h. Adjust all
sources not to include them and to include global.h at the right
place.
2001-09-07 17:52:19 +00:00
Pavel Roskin
dbe20dc6c8 * global.h: Include all time-related system includes, since
it's non-trivial (order, conflicts) and is better handled in one
place.
2001-09-07 16:46:31 +00:00
Pavel Roskin
013466a02e * fsusage.c: Include sys/param.h before sys/mount.h - it's
required on some systems.
* mountlist.c: Likewise.
From Timur Bakeyev <mc@bat.ru>
2001-09-07 02:40:45 +00:00
Pavel Roskin
5e9bd8980e * Makefile.am: Don't use substituted values directly. Define
CHARSET_SRC unconditionally.  Join SRCS and HDRS.
2001-09-04 06:09:05 +00:00
Pavel Roskin
e840cff0dc * widget.c (label_new): Don't calculate dimensions of multiline
labels, since they cannot be changed and msglen() is already
used when the dialog is created.
2001-09-03 15:17:27 +00:00
Pavel Roskin
ed2306822f * Makefile.in: Converted to ...
* Makefile.am: ... this.
2001-09-03 07:03:46 +00:00
Pavel Roskin
44e9896171 * slint.c: Make more data and function static.
* key.h: Remove declarations that are now static.
* myslang.h: Likewise.
2001-09-03 05:55:22 +00:00
Pavel Roskin
a8ef641beb * x.h: Remove. Adjust all users. Make sure that global.h is
included instead.  Don't include sys/param.h unconditionally -
rely on global.h taking care of it.
* Makefile.in: Remove x.h.
2001-09-03 05:07:40 +00:00
Pavel Roskin
83c37cfd0f * color.c: Remove unused code.
* color.h: Likewise.
2001-09-03 04:32:16 +00:00
Pavel Roskin
ff7a2a0ceb * key.c: Remove support for BUGGY_CURSES. 2001-09-03 03:12:22 +00:00
Pavel Roskin
f3a84ebc1a * tty.h: Remove support for old curses and GNOME.
* global.h: Likewise.
2001-09-03 03:07:46 +00:00
Pavel Roskin
fc6efa62f9 * widget.c (label_new): Set initial width of the widget based on
the initial text.
2001-09-03 01:15:07 +00:00
Pavel Roskin
2ee372d4a8 * view.c (hex_search): Don't use sscanf() to search for quoted
strings - use strchr instead.
2001-09-02 20:34:44 +00:00
Pavel Roskin
6f8323907f Trimmed using last chtrim. Ensure exactly 2 spaces before e-mail. 2001-09-01 20:12:16 +00:00
Timur Bakeyev
043e782496 2001-08-31 23:14:21 Timur Bakeyev <mc@bat.ru>
* utilunix.c: init_groups(), destroy_groups(), get_user_permissions()
	rewritten to use GTree structure and functions. Add new static helper
	functions mc_gid_compare() and mc_gid_destroy().

	* util.h: Removed deprecated structure user_in_groups.

	* screen.c: Fixed typo in format report error string.

2001-08-31 23:14:21  Timur Bakeyev <mc@bat.ru>

	* utilunix.c: get_user_rights() renamed into get_user_permissions().
	delete_groups() renamed into destroy_groups().
	* util.h: Likewise.
	* screen.c: Likewise.
	* main.c: Likewise.
2001-09-01 13:47:34 +00:00
Pavel Roskin
f2547b3cbd * cmd.c (dirsizes_cmd): Don't cast st_size to long - use off_t
instead, since off_t can be longer.
Reported by Radovan Bukoci <rado@autoparts.sk>
2001-09-01 07:51:14 +00:00
Pavel Roskin
28ed7f82c0 * info.c (info_show_info): Use size_trunc_len() instead of
print_bytesize().  Don't assume English word ordering.  Add
singular message when single block.
* win.c (print_bytesize): Remove.
(sprint_bytesize): Remove.
* win.h: Remove print_bytesize() and sprint_bytesize().
2001-08-30 16:58:40 +00:00
Pavel Roskin
1ef25591d2 * util.c (size_trunc_len): Add units parameter. Change all
callers.
2001-08-30 16:41:08 +00:00
Pavel Roskin
242a26c03b * util.c (size_trunc_len): Print size values with some (little)
sense for tiny and even wee lengths (i.e. squeezed X terminals).
2001-08-30 16:19:45 +00:00
Pavel Roskin
54b219ebb6 * info.c (info_show_info): Move comment line just before
translatable message so it's shown in .po files to alert
translators.  The message (translated) is used to set the start
column (so the available width) for some "truncatable" strings.
2001-08-30 15:14:39 +00:00
Pavel Roskin
596869e68a * key.c (learn_key): Turn off keypad to disable intepreting keys
by ncurses.
Reported by Frederic L. W. Meunier <fredlwm@pervalidus.net>
2001-08-27 21:24:29 +00:00
Pavel Roskin
511a88a5bf * xcurses.c: Remove.
* Makefile.in: Remove all references to xcurses.c.
2001-08-26 08:56:29 +00:00
Pavel Roskin
4bbb7fd935 * user.h: Include "../edit/edit-widget.h", not
"../gtkedit/edit-widget.h".
2001-08-24 18:24:46 +00:00
Pavel Roskin
9466c031d8 * subshell.c: Use standard Autoconf symbols to determine whether
to include <stropts.h> and <grp.h>.
2001-08-24 04:51:11 +00:00
Pavel Roskin
7dbf6695ff * subshell.c (feed_subshell): Don't wait forever after the first
select() call if fail_on_error is true.  This alleviates hang
with zsh on QNX Neutrino.
2001-08-24 02:17:15 +00:00
Pavel Roskin
bca1e47369 * view.h: Declare view_dlg.
* main.h: Declare edit_dlg.
* layout.c (change_screen_size): Remove external declarations
inside the function.
2001-08-21 06:32:41 +00:00
Pavel Roskin
19437f2557 * view.c (load_view_file) [!HAVE_MMAP]: Warning fix. 2001-08-20 07:46:04 +00:00
Pavel Roskin
d56dd815b1 * main.c (mc_maybe_editor_or_viewer) [!USE_INTERNAL_EDIT]:
Reenable to make "mc -v" possible.
(do_nc): Call mc_maybe_editor_or_viewer() even if the editor
is not compiled in.
(argument_table) [!USE_INTERNAL_EDIT]: Disable "-e".
2001-08-20 05:39:21 +00:00
Pavel Roskin
cbd8053c3d * view.c (view_handle_key) [HAVE_CHARSET]: Remove unneeded
statements.
2001-08-19 17:41:38 +00:00
Pavel Roskin
1daee3ab8f * screen.c [HAVE_X]: Disable unused code. 2001-08-19 17:33:26 +00:00
Pavel Roskin
05adbccda8 * fs.h: Correctly include <sys/param.h>.
* x.h: Include "global.h".  Move all contents ...
* global.h: Here.
2001-08-19 16:23:24 +00:00
Pavel Roskin
680d7fd55c * regex.c (regex_compile): Warning fix for ambiguous else. 2001-08-19 16:18:40 +00:00
Pavel Roskin
fdc234060f * key.c (xmouse_get_event): Filter out GPM_UP events that don't
follow a GPM_DOWN event.  Filter out events with unknown button
numbers, such as mouse wheel events.
(get_event): Return EV_NONE if xmouse_get_event() decided to
ignore the event.
2001-08-18 19:27:31 +00:00
Pavel Roskin
5215df9192 * main.c (init_sigchld): Disable subshell if SIGCHLD handler
cannot be installed.
2001-08-18 15:18:56 +00:00
Pavel Roskin
ced66d3c9b * x.h: Instead of undefining MIX and MAX after <gnome.h> make
sure that <sys/param.h> is included before <gnome.h>.
2001-08-18 07:35:11 +00:00
Pavel Roskin
4cac4d66ba * key.c (mc_bindings) [linux]: Remove old hack - recognizing
"e[2~" on all terminals.
2001-08-17 04:41:31 +00:00
Pavel Roskin
849fecec4c * charsets.c (load_codepages_list): Print a warning if
mc.charset cannot be opened.
* setup.c (load_setup) [HAVE_CHARSET]: Remove all popup messages
because it's to early to use them - ncurses would crash.
2001-08-16 21:01:12 +00:00
Pavel Roskin
b5e64692df * util.c (strip_ctrl_codes): Rewrite using pointers. Fix
stripping sequences beginning with "e[".  Check is_printable().
2001-08-16 03:52:51 +00:00
Pavel Roskin
ac504b9ba1 * man2hlp.c: Remove HTML support. Remove old link support.
Warning fixes.
(print_string): Handle backslashes in verbatim mode too.
2001-08-16 01:36:41 +00:00
Pavel Roskin
99c80d28d9 * main.c (setup_pre) [HAVE_CHARSET]: Fix compilation with
ncurses.
2001-08-15 22:45:20 +00:00
Pavel Roskin
246ee1445c * textconf.c (features): Fix interpretation of
HAVE_SYSTEM_SLANG.
From David Martin <dmartina@excite.es>
2001-08-15 22:20:17 +00:00
Pavel Roskin
403dfdc24b * key.h (define_sequence): Change declaration to return int.
* key.c (define_sequence): Return 1 on success, 0 on error.
* learn.c (learn_button): Don't accept sequence if
define_sequence() has failed.
2001-08-14 04:48:26 +00:00
Pavel Roskin
689c3fb9ac Replace "Can't" with "Cannot" everywhere. 2001-08-14 00:55:34 +00:00
Pavel Roskin
686041bbe2 * learn.c (learn_save): Fix memory leak. 2001-08-12 18:20:33 +00:00
Pavel Roskin
596d916e5b * dir.c (string_sortcomp) [HAVE_STRCOLL]: Make static. 2001-08-12 16:36:55 +00:00
Pavel Roskin
76926ea622 * cmd.c (guess_message_value): Typo - replace "LC_MESSAGE" with
"LC_MESSAGES".
2001-08-12 08:36:26 +00:00
Pavel Roskin
af4e2abdab * dir.c (string_sortcomp) [HAVE_STRCOLL]: Always use strcmp()
for case sensitive sort.  For case insensitive sort use
strcoll() if it's case insensitive for ASCII and g_strcasecmp()
otherwise.
2001-08-12 08:20:31 +00:00
Pavel Roskin
b3fbb01112 * achown.c (chown_advanced_cmd): Remove dead code.
* chown.c (chown_cmd): Likewise.
* chmod.c (chmod_cmd): Likewise.
2001-08-12 03:33:23 +00:00
Pavel Roskin
0177db2941 * charsets.c (load_codepages_list): Use concat_dir_and_file(). 2001-08-12 03:27:27 +00:00
Pavel Roskin
50a2391d2b * mad.h: Disable glib support - it doesn't work properly. 2001-08-11 05:13:10 +00:00
Pavel Roskin
2da73069b9 * view.c: Warning fixes. Include "cmd.h". Rename help_cmd()
to view_help_cmd().
(view_handle_key) [HAVE_X]: Disable '!' and Ctrl-O.
2001-08-07 16:53:55 +00:00
Pavel Roskin
5c428dc7a3 * main.c (do_execute): Don't show prompt if the command is empty
and the subshell is not running.
* view.c (view_handle_key): Add support for Ctrl-O in the viewer.
Suggested by Walery Studennikov <despair@sama.ru>
2001-08-07 16:32:22 +00:00
Pavel Roskin
d05bfe1f01 * boxes.c (display_init): Associate correct help topic.
(sort_box): Likewise.
(set_panel_filter): Likewise.
* option.c (init_configure): Likewise.
* menu.c (menubar_handle_key): Show help dependent on the active
menu.
2001-08-06 22:22:04 +00:00
Andrew V. Samoilov
12a291afdd ;) 2001-08-06 15:35:22 +00:00
Andrew V. Samoilov
7b568914ec * view.c (block_search): Return the position where the block was
found as declared in comment.
(hex_search): Don't increase pos, block_search returns now right
position.
2001-08-06 15:33:38 +00:00
Andrew V. Samoilov
22861f9737 * mad.c (mad_strdup): Return NULL if NULL is passed. 2001-08-06 15:32:34 +00:00
Andrew V. Samoilov
cd34ee8d1f * mad.[ch] (mad_check): Declare file parameter const.
(mad_alloc): Likewise. Don't truncate it.
(mad_abort): Declare message and file parameters const.
2001-08-03 10:33:54 +00:00
Pavel Roskin
b201fe6077 * file.c: Warning fix. Include global.h before other local
includes.
* filegui.c: Likewise.
(fmd_init_i18n) [!ENABLE_NLS]: Completely disable.
* i18n.h [!ENABLE_NLS]: Warning fix.
* learn.c (init_learn): Move do_refresh() call immediately
before cleate_dlg().  Warning fix.
2001-08-03 04:47:52 +00:00
Pavel Roskin
27d0af32c6 * Makefile.in: "install" now depends on "all".
Reported by Walery Studennikov <despair@sama.ru>
2001-07-31 15:24:15 +00:00
Andrew V. Samoilov
4e15f75f32 * complete.c (command_completion_function): Don't stop $PATH
processing on empty entry. Interpret it as current directory.
2001-07-31 15:21:28 +00:00
Andrew V. Samoilov
d83a8e7b5e * find.c (find_parameters): Fix hotkeys duplication. 2001-07-31 12:18:07 +00:00
Andrew V. Samoilov
d9fb8565c0 * menu.c (create_menu): Don't localize name, it is always done. 2001-07-31 11:15:46 +00:00
Andrew V. Samoilov
8611daeb0c * widget.[ch] (label_new): Make text parameter const. 2001-07-31 11:04:21 +00:00
Andrew V. Samoilov
78dbe61c6a * util.c [!HAVE_X] (is_printable): Don't duplicate declarations from
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.
2001-07-31 10:38:15 +00:00
Andrew V. Samoilov
24385045ce * color.c (color_table): Make constant array. 2001-07-31 10:32:50 +00:00
Pavel Roskin
2a6be49822 * charsets.c: Warning fixes.
* charsets.h: Likewise.
* selcodepage.c: Likewise.
* selcodepage.h: Likewise.
2001-07-31 05:54:39 +00:00
Pavel Roskin
1ae4e4e1cb * Makefile.in: Move most logic around gindex.pl into gindex.pl.
Don't use maintainer-only rules since mc.hlp won't be removed
now if perl is missing or gindex.pl fails.
* gindex.pl: Run man2hlp internally.  Use files given as
arguments instead of stdin and stdout.
2001-07-31 05:25:30 +00:00
Pavel Roskin
a6f868a6cf * mad.c: Don't use g_calloc - it's missing in glib 1.2.x.
* mad.h: Likewise.  Use mad_alloc0() to emulate calloc().
2001-07-30 20:43:20 +00:00
Pavel Roskin
506634318f * view.h: Simplify, respect WANT_WIDGETS setting. 2001-07-30 15:43:42 +00:00
Pavel Roskin
813cf40ac4 * view.c (view_ok_to_quit): Make global - it's needed for GMC.
* view.h: Declare view_ok_to_quit().
2001-07-29 02:08:40 +00:00
Pavel Roskin
70fa991882 * util.c [!USE_VFS] (get_current_wd): Resurrect, this time using
g_get_current_dir().
2001-07-27 21:20:43 +00:00
Pavel Roskin
97af90af3c * background.h: Remove WITH_BACKGROUND, it's now in extraconf.h.
* background.c: Use WITH_BACKGROUND instead of USE_NETCODE.
2001-07-27 20:36:22 +00:00
Pavel Roskin
b4be52ba78 * util.c (mc_mkstemps): Don't prepend $TMPDIR if prefix contains
path separator.
2001-07-27 19:27:09 +00:00
Pavel Roskin
f0beaa4ed7 * cmd.c (do_link): Append filename to the default symlink
target.  Don't add path separator if there is no listing on
the other panel.  Avoid using fixed size buffers.
From Max Schedriviy <max@tavrida.net>
2001-07-26 15:47:19 +00:00
Pavel Roskin
11fd4abc0e * main.c [HAVE_X]: Disable eight_bit_clean and full_eight_bits.
* util.c (is_printable) [HAVE_X]: Simplify.
2001-07-26 05:01:26 +00:00
Pavel Roskin
b900848aaa * cmd.c (do_link): Simplify. Don't silently exit if the source
file is not regular - let user see the error if any.
2001-07-25 22:42:23 +00:00
Pavel Roskin
93f54c5c1b * achown.c (ch_perm): Make constant array.
(chown_info_update): Use set_perm_by_flags(), not set_perm().
(set_perm): Remove.
2001-07-24 16:16:13 +00:00
Pavel Roskin
159b4aa1ef * achown.c: Make all global variables static. Fix help.
* complete.c: Likewise.
* chmod.c: Make all global variables static.
* chown.c: Likewise.
* chmod.h: Remove all variables.
2001-07-24 15:04:21 +00:00
Pavel Roskin
fd895e3759 * user.c: Eliminate static variable s_editwidget. Pass
edit_widget as argument.  All callers changed.
(expand_format): Fix expansion of %n and %b for the editor.
* util.c: Remove dead code.
2001-07-23 22:50:54 +00:00
Pavel Roskin
725f2ac2ec * setup.c (load_keys_from_section): Give terminal-specific
settings preference over settings from [terminal:general].
2001-07-23 19:14:40 +00:00
Pavel Roskin
a7937891ea * setup.c (load_keys_from_section): Give ~/.mc/ini preference
over mc.lib.
2001-07-22 06:00:30 +00:00
Pavel Roskin
506273750e * dlg.c: Remove dependency on definitions in gconf.h. 2001-07-20 16:47:46 +00:00
Pavel Roskin
d866874b24 * widget.c (input_callback) [HAVE_X]: Disable Ctrl-q - it
doesn't work.
2001-07-20 16:34:05 +00:00
Pavel Roskin
2dd2dc2182 * file.c (panel_get_file): Use g_assert_not_reached().
* key.c (xgetch_second): Make static.
2001-07-20 16:19:28 +00:00
Pavel Roskin
b25f5be791 * Make.common.in: Move all defines ...
* gnome/Makefile.in: ... here ...
* src/Makefile.in: ... and here.
2001-07-20 15:22:50 +00:00
Pavel Roskin
71620c6a9e * user.c (check_format_view): Match "unform" instead of
"unformated" because some users may spell this word correctly.
2001-07-19 21:25:40 +00:00
Pavel Roskin
c19dfa9175 * util.c (get_current_wd): Remove. It's obsoleted by
g_get_current_dir() from glib.
2001-07-18 03:49:08 +00:00
Pavel Roskin
ce150c8aa9 * ext.c (exec_extension): Add the `rm' command to the end of
temporary scripts so that they erase themselves.
2001-07-18 03:06:57 +00:00
Pavel Roskin
4349ae1c4e * util.c (mc_mkstemps): Always use "unsigned long" for enthropy,
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>
2001-07-17 18:38:46 +00:00
Pavel Roskin
f952acf1f8 * utilunix.c (mc_doublepopen): Use _exit() instead of exit()
and don't close any unrelated file descriptors.  Explicitly
close inhandle.
2001-07-16 23:34:56 +00:00
Pavel Roskin
57fde54f99 * mad.h: Include stdio.h to prevent redefining mad_tempnam().
* main.c [HAVE_X && HAVE_MAD]: Don't call done_key().
2001-07-16 04:06:35 +00:00
Pavel Roskin
5ae49e62d1 * dlg.h: Remove declarations of non-existent functions.
[HAVE_X]: Disable color constants - they shouldn't be used.
2001-07-16 00:58:53 +00:00
Pavel Roskin
75be0dd7e1 Use short path in the last entry. 2001-07-15 07:24:58 +00:00
Pavel Roskin
a66a15319d * src/boxes.c [WITH_SMBFS] (vfs_smb_get_authinfo): Copied from
vfs/smbfs.c, function authinfo_get_authinfo_from_user().
2001-07-15 07:04:53 +00:00
Pavel Roskin
aa9ac05960 * cmd.c [HAVE_X]: Disable source routing dialog and panel
comparison.
* main.c (ctl_x_map): Simplify preprocessor directives.
2001-07-15 04:14:39 +00:00
Pavel Roskin
069eaca778 * screen.c (panel_keymap) [HAVE_X]: Disable Alt-H - it's not
implemented properly for GNOME.
* main.c (directory_history_list) [HAVE_X]: Disable.
2001-07-15 03:50:23 +00:00
Pavel Roskin
af1dc9fd62 * panelize.c [HAVE_X]: Disable unused code. 2001-07-14 22:41:24 +00:00
Pavel Roskin
9f014513ab * main.c [HAVE_X]: Disable Ctrl-X sequences. 2001-07-14 22:13:46 +00:00
Pavel Roskin
e280cb5c8b * find.c: Remove code unused in the text edition. 2001-07-14 21:44:39 +00:00
Pavel Roskin
6883eb1dd0 * main.c [HAVE_X]: Eliminate setup_post() and partly done_mc(). 2001-07-14 06:25:45 +00:00
Pavel Roskin
5fd1f032f3 * utilunix.c (uid_cache): Make static.
(gid_cache): Likewise.
(init_uid_gid_cache): Remove.
* main.c (setup_post): Don't call init_uid_gid_cache().
2001-07-14 06:13:29 +00:00
Pavel Roskin
9e7e7037f8 * main.c (default_map) [HAVE_X]: Disable Alt-T.
* cmd.c [HAVE_X]: Eliminate set_basic_panel_listing_to() and
toggle_listing_cmd().
2001-07-14 05:37:27 +00:00
Pavel Roskin
d1b3fc6002 * utilunix.c (canonicalize_pathname): Don't handle PATH_SEP
after backslash	in a special way.
2001-07-13 21:21:41 +00:00
Pavel Roskin
f0d3781bfb * subshell.c (init_subshell): Run "set echo_style=both" at
startup to ensure that echo in tcsh understands octal numbers.
Reported by Francis Kwok <francis.kwok@alcatel.com>
2001-07-13 00:24:50 +00:00
Pavel Roskin
dbb9234674 * Makefile.in (OURLIBS): Merge with ...
(LIBS): ... this. Add @LIBICONV@.
Reported by Libor Motyka <l_motycka@ortex.cz>
2001-07-12 15:02:06 +00:00
Pavel Roskin
269737723a * subshell.c (subshell_name_quote): New function. Quote all
characters as octals, use command substitution.
(do_subshell_chdir): Use subshell_name_quote(). Don't change
terminal settings when the quoted path is sent to the shell -
it's now safe.
2001-07-12 14:18:39 +00:00
Andrew V. Samoilov
2d7255d8cf * main.c: Eliminate iconify_on_exec.
[!HAVE_GNOME]: Eliminate nowindows, nodesktop, twopanel,
display_linksdir and cmdline_geometry.
(sigchld_handler_no_subshell): Comment fixes.
(midnight_callback): Likewise.
(print_mc_usage): Use fputs, not fprintf.
(print_color_usage): Likewise.
(argument_table): Assign 'r' with force_subshell_execution and 'U'
with use_subshell.
(process_args): Don't deal with 'r', 'U' and 'X' options.
(setup_mc) [HAVE_GNOME]: Eliminate more code.

setup.c (options):  Eliminate iconify_on_exec.
2001-07-11 22:58:32 +00:00
Andrew V. Samoilov
26280ca462 ;) 2001-07-11 22:57:31 +00:00
Pavel Roskin
3b83dc732f * view.c (hex_search): Release buffer after use. 2001-07-10 17:42:25 +00:00
Pavel Roskin
ea68ebdeb5 * view.c (hex_search): Reimplement parser using sscanf. Add
support for decimal and octal numbers. Add error reporting.
Allocate buffer dynamically.
2001-07-09 23:19:23 +00:00
Pavel Roskin
62ef1f47bd * hotlist.c: Add comments to avoid confusion between
done_hotlist() and hotlist_done().
(hotlist_done): Set l_hotlist to NULL.
(add2hotlist): Load hotlist if it's neither loaded nor loading.
This fixes Ctrl-x h. Fix compiler warning.
2001-07-09 06:43:45 +00:00
Pavel Roskin
48b3cb4154 * hotlist.c: Make more variables and functions static. 2001-07-09 05:54:58 +00:00
Pavel Roskin
3f25e54361 * ext.c (exec_extension) [HAVE_X]: Free file_name. Add comment
explaining why it cannot be unlinked there.
2001-07-08 21:34:55 +00:00
Pavel Roskin
4f992c2fd3 Typo in the last commit. 2001-07-06 23:07:22 +00:00
Pavel Roskin
7a177fd8d5 * view.c (exec_extension): Unlink temporary file earlier if it's
not going to be used.
[OLD_CODE]: Remove.
2001-07-06 23:06:45 +00:00
Pavel Roskin
a08a62bef3 * Makefile.in: Use additional quotes to preserve @prefix@ when
Makefile is generated.
2001-07-06 21:05:24 +00:00
Pavel Roskin
e09c2cba92 * Makefile.in: Don't use SEDCMD2, use sed. 2001-07-06 20:45:30 +00:00
Pavel Roskin
91a799e3c0 * cons.saver.c: New variable console_minor. Eliminate variables
len and vcs_name.
(check_file): Set console_minor to the minor device number of
the console. Disallow /dev/tty0.
(detect_console): Don't parse tty_name, instead make sure that
it corresponds to console_minor. Check console first. Fallback
to /dev/vcc/a* if /dev/vcsa* cannot be opened.
(save_console): Use console_minor.
(restore_console): Likewise.
2001-07-06 19:24:27 +00:00
Pavel Roskin
a44f9422d2 * cons.saver.c (check_file): Eliminate using text messages to
indicate errors. Improve debug messages.
(detect_console): Likewise.
(main): Adjust call to detect_console.
2001-07-06 17:49:27 +00:00
Pavel Roskin
91f2348983 * main.c (sigchld_handler_no_subshell): Don't restart cons.saver
if it died.
* subshell.c (sigchld_handler): Likewise.
2001-07-06 17:29:20 +00:00
Pavel Roskin
1cd140d5dc * main.c (midnight_callback): Don't handle any events except
Ctrl-x combinations on DLG_KEY event if the menu is active.
2001-07-05 23:27:01 +00:00
Pavel Roskin
6c17a59440 * main.c (load_prompt): Don't change prompt if midnight_dlg is
not the current dialog.
2001-07-05 22:35:16 +00:00
Pavel Roskin
a5281c3ee4 * util.c (size_trunc_len): New function - print file size to
a buffer of limited length.
* util.h: Declare size_trunc_len().
* screen.c (string_file_size): Use size_trunc_len().
2001-06-28 04:17:28 +00:00
Pavel Roskin
4f10e883fd * xslint.c: Remove.
* Makefile.in (SRCS): Remove xslint.c.
2001-06-26 15:03:30 +00:00
Pavel Roskin
c83fdc336c * key.c (ctrl_pressed): Don't limit functionality to Linux.
* screen.c (prev_page_key): Don't require console_flag to be set
to use ctrl_pressed(), only require that HAVE_X is undefined.
(next_page_key): Likewise.
* widget.c (key_left): Don't limit functionality to Linux.
(key_right): Likewise.
2001-06-26 03:20:22 +00:00
Pavel Roskin
29adaeacbf * main.h: Use "ifdef HAVE_GNOME", not "if HAVE_GNOME". Fix the
order of conditionals and put comments on endifs.
2001-06-25 21:36:38 +00:00
Andrew V. Samoilov
5cccebee91 * complete.c (filename_completion_function): Clean it up.
(command_completion_function): Make words, bash_reserved and
bash_builtins const, use concat_dir_and_file.
(fetch_hosts): Fix typo, style fixes.
2001-06-25 13:59:04 +00:00
Andrew V. Samoilov
b817d61e79 ;) 2001-06-25 12:06:23 +00:00
Andrew V. Samoilov
e92976c937 * view.c [HAVE_CHARSET]: Include selcodepage.h.
(view_new): Use g_new0.
(ruler): Make static.
2001-06-25 11:24:49 +00:00
Pavel Roskin
0e334b67e8 * mem.h: Undefine bcopy(), bcmp() and bzero() before redefining
them.
2001-06-23 16:02:05 +00:00
Pavel Roskin
975726afd0 * ext.c (exec_extension) [HAVE_X]: Disable console handling. 2001-06-23 00:09:13 +00:00
Pavel Roskin
5c56eb0c5a * cons.handler.c: Reorganize includes. Fix warnings on BSD.
* rxvt.c (rxvt_extensions): Make static.
* main.c (sigchld_handler_no_subshell) [!__linux__]: Don't try
to restart cons.saver.
* subshell.c (sigchld_handler) [!__linux__]: Likewise.
2001-06-22 23:29:18 +00:00
Pavel Roskin
2ba50c0365 * fsusage.c: Use HAVE_INFOMOUNT.
* mountlist.c: Likewise. Fix condition when mount_list is
declared.
(fstype_to_string): Rename mount_list to mlist to avoid
confusion with the file-scoped static variable.
2001-06-22 16:53:34 +00:00
Pavel Roskin
6ba78b2f80 s/HAVE_PARAM_H/HAVE_SYS_PARAM_H/ 2001-06-22 15:56:59 +00:00
Pavel Roskin
c27d9c8cc5 * cmd.c [HAVE_X]: Disable more code. Reorder includes. 2001-06-22 15:40:12 +00:00
Pavel Roskin
b3339f9281 * main.c: Remove MenuBarEmpty. From Andrew V. Samoilov. 2001-06-20 17:15:41 +00:00
Pavel Roskin
1636c8ef6b * wtools.c [HAVE_X]: Disable quick dialog routines. 2001-06-20 17:12:47 +00:00
Pavel Roskin
6ccb2a0131 * setup.c (save_setup) [HAVE_X]: Don't save the [Dirs] section.
(load_setup) [HAVE_X]: Don't load the [Dirs] section.
* main.c [HAVE_X]: Disable other_dir and boot_current_is_left.
Adjust all users.
2001-06-20 15:08:18 +00:00
Pavel Roskin
8040aeec39 * background.h: Correct condition when WITH_BACKGROUND is
defined.
* fsusage.c: Rearrange the includes. Define HAVE_QNX_MOUNT
for old QNX and use it instead of __QNX__.
* mountlist.c: Likewise.
* keyxdef.c: Define HAVE_QNX_KEYS for old QNX and use it instead
of __QNX__.
2001-06-19 19:57:58 +00:00
Pavel Roskin
e470f1d208 * main.c [HAVE_X]: Disable change_panel(),
copy_current_readlink() and copy_other_readlink().
Don't do anything with cmdline and command_prompt.
* screen.c [HAVE_X]: Disable panel_event(), chdir_other_panel()
and chdir_to_readlink(). Adjust all callers.
(panel_key) [HAVE_X]: Don't use command_prompt - always
start search on alphanumeric keys.
* setup.c [HAVE_X]: Disable save_layout(), load_layout(), struct
layout. Adjust all dependencies.
2001-06-19 00:43:56 +00:00
Pavel Roskin
521a886013 * utilunix.c (init_my_statfs): Move this ...
* util.c (my_statfs): ... and this ...
* mountlist.c: ... here.
* util.h: Move mountlist-related declarations ...
* mountlist.h: ... here.
* info.c: Include mountlist.h.
2001-06-18 22:24:04 +00:00
Pavel Roskin
4bd227b376 Fix typo. Fix formatting in several places. 2001-06-18 15:16:54 +00:00
Pavel Roskin
05f1de349d * hotlist.c (init_movelist): Don't assume English word ordering
in the title.
2001-06-17 04:33:33 +00:00
Andrew V. Samoilov
44dd616cce * wtools.c (message): Possible buffer overflow fixed.
(query_callback) [HAVE_X]: Disable more code.
(listbox_refresh) [!HAVE_X]: Became a macro.
* hotlist.c (init_i18n_stuff): Mark cancel_but for translation.

* tree.c (tree_copy, tree_move): Possible memory leaking fixed.
(tree_keymap): Constified.
2001-06-16 07:46:42 +00:00
Andrew V. Samoilov
abc861e48f * tree.c (tree_copy, tree_move): Possible memory leaking fixed.
(tree_keymap): Constified.
2001-06-16 07:40:03 +00:00
Andrew V. Samoilov
c45f39a7e4 * wtools.c (message): Possibly buffer overflow fixed.
(query_callback) [HAVE_X]: Disable more code.
(listbox_refresh) [!HAVE_X]: Became a macro.
2001-06-16 06:17:28 +00:00
Andrew V. Samoilov
df436f8163 * hotlist.c (init_i18n_stuff): Mark cancel_but for translation. 2001-06-16 06:11:28 +00:00
Pavel Roskin
b4669a6baa * panelize.c: Define DIR_H_INCLUDE_HANDLE_DIRENT earlier, since
the GNOME edition includes dir.h from other headers.
2001-06-16 00:09:00 +00:00
Pavel Roskin
7205d0210c * background.c: Include "x.h".
* panelize.c: Likewise.
* treestore.c: Likewise.
* user.c: Likewise.
* util.c: Likewise.
* command.c: Reorder includes. Include "x.h".
* complete.c: Likewise.
* find.c: Likewise.
* user.h: Declare user_menu_cmd() inconditionally.
* i18n.h [GAVE_GNOME]: Remove code that is now in x.h.
2001-06-15 23:37:59 +00:00
Pavel Roskin
0bf95fdacc * tty.h [HAVE_X]: Define beep() to gdk_beep(). 2001-06-15 07:04:50 +00:00
Pavel Roskin
a06415a371 * xtty.h: Remove, move contents ...
* tty.h: ... here.
[HAVE_X]: Define attrset(), mc_refresh(), enable_interrupt_key()
and disable_interrupt_key(). Don't declare mc_refresh().
* view.c: Use braces around widget_move() since it's empty in
the GNOME edition.
* xslint.c: Eliminate attrset() and mc_refresh().
* Makefile.in: Remove xtty.h.
2001-06-15 00:24:14 +00:00
Pavel Roskin
8c1534e4e6 * cons.handler.c (handle_console): Remove useless default.
* ext.c (regex_command): Initialize include_target_len.
* find.c [HAVE_GNOME]: Eliminate untyped declarations.
* fsusage.c: Remove untyped declaration of statfs().
[_AIX && _I386]: Rename statfs to aix_statfs and move
it before get_fs_usage(). Define statfs to aix_statfs.
2001-06-14 23:28:54 +00:00
Pavel Roskin
bec643d103 * achown.c: Eliminate untyped declarations.
* boxes.c: Likewise.
* cons.saver.c: Likewise.
* hotlist.c: Likewise.
* panelize.c: Likewise.
* rxvt.c: Likewise.
* main.c: Likewise. Make undeclared functions static.
* treestore.c: Make undeclared functions static.
* view.c: Likewise.
* widget.c: Likewise.
2001-06-14 22:33:00 +00:00
Pavel Roskin
c2c3918eb3 * main.h: Fix prototype of exec_shell.
* tree.c: Make all functions static when possible.
* tree.h: Changes for the above.
2001-06-14 21:21:25 +00:00
Pavel Roskin
b504500f49 * text.c [HAVE_X]: Remove useless #error.
* cons.saver.c: Indent #error to hide it from old compilers.
2001-06-14 15:59:52 +00:00
Pavel Roskin
ff84fd632e * screen.c (display_mini_info): Avoid nested i18n calls.
(parse_panel_size): Warning fix.
* user.c [HAVE_X]: Warning fix.
(check_format_var): Avoid nested i18n calls. Improve messages.
2001-06-13 22:12:04 +00:00
Pavel Roskin
c2f8f8d935 * screen.c (user_file_menu_cmd) [HAVE_X]: Disable.
(panel_callback) [HAVE_X]: Don't define labels, they are unused.
* user.c [HAVE_X]: Disable all user meny code.
2001-06-13 16:51:15 +00:00
Pavel Roskin
869afff53c * color.c (color_table): Make static. Only use in text edition.
* xtty.h: Remove unused definitions.
2001-06-13 07:19:48 +00:00
Pavel Roskin
c603d50193 * slint.c (slang_init): Check screen dimensions and exit if they
are abnormal. This may happen due to a S-Lang bug when the TERM
is set to a value not listed in termcap or terminfo.
2001-06-13 06:53:08 +00:00
Pavel Roskin
212444523c * boxes.c [HAVE_CHARSET]: Localize more strings. Lay out the
encoding dialog using the translated title length. Remove
useless preprocessor directives.
From David Martin <dmartina@excite.es>
2001-06-12 18:55:48 +00:00
Andrew V. Samoilov
3f801e3e37 * selcodepage.c (do_select_codepage): Fix compilation. 2001-06-11 12:11:06 +00:00
Andrew V. Samoilov
17791c512b * dlg.[ch] (x_set_dialog_title): title constified.
(create_dlg): Use g_new0 instead of g_new.
2001-06-11 11:25:25 +00:00
Pavel Roskin
89efd201ca Give credit to Andrew V. Samoilov for the last patch. 2001-06-09 07:24:50 +00:00
Pavel Roskin
58d8979490 * util.c (load_mc_home_file): New function. Load file from
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().
2001-06-09 07:13:46 +00:00
Andrew V. Samoilov
46e9007ea3 * charsets.h: Define CHARSETS_INDEX without leading LIBDIR.
* charsets.c (translate_character): Warning fix.
(init_translation_table): Don't deal with printable.
This one is initialized by init_printable_table ().
(load_codepages_list): Use CHARSETS_INDEX.

* selcodepage.c (do_select_codepage): Messages marked for i18n.
* setup.c (load_setup): Eliminate errbuf. Fix error message.
2001-06-07 22:36:45 +00:00
Pavel Roskin
e7f81bb092 * setup.c (load_setup): Call init_printable_table() and
init_translation_table() regardless of other failures.
2001-06-07 20:47:36 +00:00
Pavel Roskin
d3b2663c2e * charsets.c (get_codepage_index): Warning fix.
(init_printable_table): New function.
* charsets.h: Declare init_printable_table().
* setup.c (load_setup): Uncomment init_printable_table().
2001-06-07 20:04:03 +00:00
Pavel Roskin
c4c5f40a87 * cons.saver.c: Make all functions except main() static.
* mfmt.c (omain): Remove, it's unused.
2001-06-07 19:28:03 +00:00
Pavel Roskin
4d15e658d7 * main.c (done_mc) [HAVE_X]: Don't use xterm_flag.
(midnight_callback) [HAVE_X]: Don't handle any keys except
Ctrl-x sequences.
Remove useless preprocessor conditionals.
* win.c [HAVE_X]: Disable unused functions.
2001-06-06 21:41:44 +00:00
Pavel Roskin
bcfea1e371 * file.c: Add comments after every endif.
[HAVE_GNOME] [!WITH_BACKGROUND]: Fix compilation.
2001-06-06 16:32:31 +00:00
Andrew V. Samoilov
d1ebd015ce * boxes.c (sel_charset_button): Eliminate C++ comment.
(new_display_codepage): Made static.
(display_bits_box): Use "%s" for plain string in message.
2001-06-06 13:46:24 +00:00
Andrew V. Samoilov
71ad50aeca * main.c [HAVE_CHARSET]: Remove source_codepage and display_codepage.
They are declared in selcodepage.c.
* setup.c [USE_VFS]: Remove declarations for variables which are
declared in vfs/ftpfs.c.
(load_setup) [HAVE_CHARSET]: init_printable_table commented
out to enable compilation. Error strings tagged for translation.
(init_setup): Optimized.
2001-06-06 11:52:32 +00:00
Pavel Roskin
cd1fd56223 * boxes.c [HAVE_CHARSET]: New charset selection dialog.
* 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>.
2001-06-05 22:49:15 +00:00
Pavel Roskin
d34b0fde60 * selcodepage.c (do_select_codepage): New function.
* selcodepage.h: Declare it.
From Walery Studennikov <hqsoftware@mail.ru>.
2001-06-05 22:28:11 +00:00
Pavel Roskin
0e46f60810 * mfmt.c (omain): Warning fix. 2001-06-05 22:21:42 +00:00
Pavel Roskin
72db8e927d * key.c [HAVE_TEXTMODE_X11_SUPPORT]: Rename `display' to
`x11_display' and `w' to `x11_window'. Make them static.
(init_textmode_x11_support): Include into init_key().
(done_textmode_x11_support): Include into done_key().
(k_dispose): Make static.
(s_dispose): Likewise.
* key.h: Remove init_textmode_x11_support() and
done_textmode_x11_support().
* main.c: Don't call init_textmode_x11_support() and
done_textmode_x11_support().
2001-06-05 22:08:31 +00:00