Commit Graph

125 Commits

Author SHA1 Message Date
Andrew Borodin
fb51cb8241 Use TTY function names instead of #define's. 2009-08-12 21:23:12 +04:00
Andrew Borodin
f3730bdc41 Initial step to move TTY layer of MC to separate library. 2009-08-12 21:19:20 +04:00
Slava Zanko
44bb248ae5 Add support of csh (used on FreeBSD)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-27 13:49:49 +03:00
Sergei Trofimovich
f050f5e686 fixed compiler hints: -Wwrite-strings option helped a lot
Some crufty ugly APIs (slang stuff, putenv) now have explicit (char*) casts.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-07-17 12:00:03 +03:00
Sergei Trofimovich
ea40afeef5 fixed warning: stray ',' at the end of enum
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-07-17 12:00:02 +03:00
Patrick Winnertz
9f4b6d4b2f Remove one argument for format,in order to avoid a compiler warning
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-07-17 12:00:02 +03:00
Sergei Trofimovich
1b5ae972bb Merge commit 'origin/231_bg_shell_fish_support'
* commit 'origin/231_bg_shell_fish_support':
  Start on fish (Friendly Interactive SHell) support.
2009-06-19 14:27:18 +03:00
Claes Nästén
128160fef1 Start on fish (Friendly Interactive SHell) support.
This code seems to be working good enough to give commands with fish,
however the prompt display is somewhat broken but that happens with bash
as well.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-06-18 20:08:07 +03:00
Andrew Borodin
5f61e9aaa4 Fixed missed #include's after rebase to current master. 2009-06-18 21:06:25 +04:00
Enrico Weigelt, metux IT service
c7d04dd47a fixed several missing #include's 2009-06-18 21:02:29 +04:00
Slava Zanko
2ebdf91079 Merge branch 'm-utf-8'
* m-utf-8: (223 commits)
  Fix wildcard pattern in file select and file find dialogs
  Project builds with option --disable-charsets
  Deleted build-glib1.sh because glib1 don't work with utf-8
  fix building without --enable-charset
  Total replacement to mc_search stuff in all places
  Search engine: if found_len parameter NULL, then mc_search_run don't try to fill them
  src/view.c: Reworked search stuff to usage src/search
  refactoring: rename edit/editcmd_dialog.c:editcmd_dialog__get_search_types_list to
  Search engine: development of hex search complete
  Search engine: remove forgotten debug string and reindent file
  Search engine:
  configure.ac: if present glib-2.14 and higher, libpcre don't linked
  Search engine: now used regexp external engines:
  src/find.c: Fixed core dump if content search pattern no present
  edit/editcmd_dialogs.c: fixed state of search type between dialog window calls
  Find files: checkbox 'Regular expression' for content search now default unchecked
  Find files: changes for usage of new search engine:
  Fix copy of current/opposite path to command line: remove charset info from path
  src/Makefile.am: add some header files to Make-tracking
  Fixed editor menu reloading.
2009-05-07 13:01:01 +03:00
Slava Zanko
10b7bdb361 Project now build with:
make CFLAGS="-ansi -pedantic -Wall -Wextra -Werror"

WARNING! Builds wuthout samba.
2009-04-24 01:47:22 +03:00
Mikhail S. Pobolovets
758ab591d8 Simple doxygen description for files in src directory.
Mostly \file and \brief tag added.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-02-10 16:07:59 +02:00
Slava Zanko
e54f318cef Completely removed MHL stuff
Changed all source files relative to remove MHL

Some string-related functions moved into src/util.c

This stable fix.
2009-02-06 14:01:28 +02:00
Patrick Winnertz
589ffd0b10 Use g_snprintf instead of snprintf as we switch back to glib
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:49:00 +01:00
Patrick Winnertz
d84586ba82 Reverted the use of mhl_str_dup and use g_strdup instead.
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:40:32 +01:00
Patrick Winnertz
1c287d798d First bunch of mhl_mem_free removal patches
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:36:58 +01:00
Enrico Weigelt, metux IT service
8b38cf44da manully merged 227_replace_g_free 2009-02-02 22:34:05 +01:00
Enrico Weigelt, metux IT service
035fa47c06 manually merged 228_replace_g_strdup 2009-02-02 21:28:01 +01:00
Enrico Weigelt, metux IT service
e4a4f77ac2 replaced g_snprintf() by snprintf() 2009-02-01 20:03:28 +01:00
Enrico Weigelt, metux IT service
f921cc40cd replaced calls to g_strdup() by mhl_str_dup() 2009-01-30 20:10:40 +01:00
Enrico Weigelt, metux IT service
15d7d47c15 replaced g_free() by mhl_mem_free() 2009-01-30 19:28:35 +01:00
Slava Zanko
1efbe4a18a patches by Rostislav Beneš: mc-29-vfs
add support for filesystem, that use others encodings than mc (vfs). Now can be
encoding set only manually, but automatic detection is possible. Filename is
converted in mc_readdir and other function translate it back by vfs_translate
added menu etries encodnig in left and rigth menu (localization will be neede)
modified subshell.c to put subshell correct working directoy,
modified ext.c and execute.c to translate filename before running command
there could be one problem, vfs_translate_path does not use something like
path_magic function
2009-01-26 12:04:07 +02:00
Slava Zanko
75cf62902d patches by Rostislav Beneš: mc-28-fix
rest of fixes in files cmc.c, main.c (xterm title), panelize.c, subshell.c,
tree.c, tty.c, user.c, util.c, win.c

now, basic mc's function should work well, editor and view are still broken.
2009-01-26 12:04:07 +02:00
Enrico Weigelt, metux IT service
f072bf6d5c merged 174_4.6_mandriva_pty_closeonexec 2009-01-24 20:24:14 +01:00
Enrico Weigelt, metux IT service
9f369abe25 added mandriva patch: subshell pty close-on-exec 2009-01-16 02:17:57 +01:00
Enrico Weigelt, metux IT service
154feb5160 2009-01-10 Enrico Weigelt, metux ITS <weigelt@metux.de>
* edit/editcmd.c:
    * src/achown.c src/background.c src/boxes.c src/chmod.c:
    * src/chown.c src/cmd.c src/command.c src/dir.c src/execute.c:
    * src/ext.c src/file.c src/filegui.c src/find.c src/help.c:
    * src/learn.c src/main.c src/panelize.c src/screen.c:
    * src/selcodepage.c src/subshell.c src/tree.c src/user.c:
    * src/utilunix.c src/view.c:
    * vfs/cpio.c vfs/direntry.c vfs/extfs.c vfs/fish.c vfs/ftpfs.c:
    * vfs/mcfs.c vfs/sfs.c vfs/smbfs.c vfs/tar.c vfs/undelfs.c:
    * vfs/utilvfs.c vfs/vfs.c:

    Changed message type codes on calls to message(), query_dialog(),
    close_error_pipe() from numeric IDs to symbols D_ERROR, D_NORMAL
2009-01-10 14:13:56 +01:00
Pavel Tsekov
7ad6feae42 * src/achown.c: Update copyright notice.
* src/chmod.c: Likewise.
* src/chown.c: Likewise.
* src/cmd.c: Likewise.
* src/color.c: Likewise.
* src/command.c: Likewise.
* src/cons.handler.c: Likewise.
* src/cons.saver.c: Likewise.
* src/dialog.c: Likewise.
* src/dir.c: Likewise.
* src/help.c: Likewise.
* src/info.c: Likewise.
* src/man2hlp.c: Likewise.
* src/menu.c: Likewise.
* src/mouse.c: Likewise.
* src/option.c: Likewise.
* src/profile.c: Likewise.
* src/screen.c: Likewise.
* src/setup.c: Likewise.
* src/subshell.c: Likewise.
* src/user.c: Likewise.
* src/win.c: Likewise.
* vfs/sfs.c: Likewise.
* vfs/tcputil.c: Likewise.
2007-09-26 10:22:25 +00:00
Pavel Tsekov
adb84ceba8 * src/subshell.c (write_all): Do not use void pointer arithmetic. 2007-09-11 13:38:26 +00:00
Pavel Tsekov
eca5afad0f * src/subshell.c (subshell_name_quote): Use the `printf' utility
instead of `echo' to quote the directory name.
2007-03-23 16:42:17 +00:00
Pavel Tsekov
64045fc8f0 * src/subshell.c (sigchld_handler) [__EMX__]: Remove unneeded code. 2007-03-08 17:53:56 +00:00
Pavel Tsekov
850542cebd * src/subshell.c (subshell_pty_slave): New global variable.
(init_subshell): Do not close the pseudo-terminal slave -
store it in `subshell_pty_slave' for later use.
(init_subshell_child): Do not open the pseudo-terminal slave
in the child. It is inherited from the parent now.
Use `subshell_pty_slave' as the file descriptor of the
opened pseudo-terminal slave.
Rearrange the code a bit.
(synchronize): Discard all data from the pseudo-terminal
slave input queue.
2007-03-01 11:07:04 +00:00
Leonard den Ottolander
0ac1df7d4f * src/subshell.c (subshell_name_quote): Bash < 2.05b (3-digit octals in
echo_e_cmd) no longer supported.
* NEWS: Comment reflecting above change.
2006-11-27 21:33:45 +00:00
Pavel Tsekov
19b2b16ca5 * src/subshell.c (resize_subshell): Do not try to resize the subshell tty
if the subshell is not running.
2006-05-08 14:38:36 +00:00
Pavel Tsekov
389df305eb * src/subshell.c (synchronize): Do not discard user input if the panels are
off.
2006-02-24 19:43:48 +00:00
Andrew V. Samoilov
ee404fbebe * subshell.c: restart write() calls interrupted by sigchld which lead
to some bytes being swallowed from the subshell's output.
2006-01-23 18:55:36 +00:00
Roland Illig
fed479813e Added const qualifier. 2005-09-05 02:04:23 +00:00
Andrew V. Samoilov
7a0f4c45ef * subshell.c (exit_subshell): Do not blindly perform cleanup. 2005-06-07 09:05:09 +00:00
Pavel Roskin
1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +00:00
Roland Illig
6407873f69 * cons.handler.c: Marked unused parameters.
* dir.c: Likewise.
	* find.c: Likewise.
	* help.c: Likewise.
	* layout.c: Likewise.
	* mountlist.c: Likewise.
	* popt.c: Likewise.
	* poptconfig.c: Likewise.
	* popthelp.c: Likewise.
	* regex.c: Likewise.
	* subshell.c: Likewise.
	* tree.c: Likewise.
	* util.c: Likewise.
	* utilunix.c: Likewise.
	* widget.c: Likewise.
	* wtools.c: Likewise.
2005-02-08 22:33:52 +00:00
Roland Illig
fc85bdba7e * *.c: Reordered header inclusion. 2005-02-08 09:04:03 +00:00
Andrew V. Samoilov
50a2118525 * subshell.c (subshell_name_quote): Eliminate sprintf(d, "%c", ...).
(do_subshell_chdir): Eliminate strlcpy() and optimize.
2005-01-14 10:00:29 +00:00
Andrew V. Samoilov
d332606fd5 * subshell.c (do_subshell_chdir): Use mc_realpath() to fix tcsh's
problem with symlink.
        * utilunix.c: Add function mc_realpath(). Is the BSD version of
        realpath(3).
        * util.h: Add mc_realpath() declaration.
2005-01-13 19:37:46 +00:00
Andrew V. Samoilov
3fff2ff3c9 * subshell.c (init_subshell_child): Does not g_strdup() constant string
in putenv() calls.
2004-12-08 13:07:53 +00:00
Andrew V. Samoilov
cee8133838 * subshell.c (do_subshell_chdir): Filter out a possible password from
warning dialog.

        * command.c (do_cd_command): Likewise.

        * screen.c (panel_callback): Likewise.

        * util.c (path_trunc): Add function. path_trunc() is the same as
        name_trunc(), but it deletes possible password from path for security
        reasons.

        * util.h: Add functions path_trunc().

        * filegui.c (file_progress_show_target): Filter out a possible password
        from dialog.
        (file_progress_show_deleting): Likewise.
        (file_mask_dialog): Likewise.

        * file.c (move_file_file): Likewise.
        (move_dir_dir): Likewise.
        (file_error): Likewise.
        (files_error): Likewise.
        (real_query_recursive): Likewise.

        * hotlist.c (add2hotlist): Typo fix.
2004-11-03 19:43:17 +00:00
Roland Illig
8b1e87523a * boxes.c (display_unit): Added const qualifier.
* file.c (check_hardlinks): Likewise.
	* find.c (find_do_view_edit): Likewise. (find_file): Likewise.
	* global.h (home_dir): Likewise.
	* main.c (get_parent_dir_name): Likewise. (init_xterm_support):
	Likewise. (OS_Setup): Likewise.
	* menu.c (create_menu): Likewise.
	* mountlist.c (xatoi): Likewise. (read_filesystem_list): Likewise.
	* poptconfig.c (poptReadDefaultConfig): Likewise.
	* popthelp.c (showHelpIntro): Likewise.
	* rxvt.c (look_for_rxvt_extensions): Likewise.
	* slint.c (has_colors): Likewise.
	* subshell.c (check_sid): Likewise.
	* user.c (check_format_var): Likewise.
	* widget.c (radio_callback): Likewise.
2004-09-25 13:46:23 +00:00
Roland Illig
e0f5d6e37f * cons.handler.c (handle_console_linux): Replaced NULL with
(char *) NULL in call to execl.
	* subshell.c (init_subshell_child): Likewise.
	* utilunix.c (my_system): Likewise.

	From patches from the OpenBSD ports collection.
2004-09-24 14:02:39 +00:00
Andrew V. Samoilov
2253379eb8 * subshell.c (exit_subshell): Prevent unwanted reuse of freed
pty_buffer.
        * complete.c (variable_completion_function): strncpy()->memcpy()
        changes are because we know there is no '\0' among the first
        length bytes.
        (insert_text): Likewise.
        (command_completion_function): Avoid memory leaks.
        (filename_completion_function): g_free handles NULL argument too,
        no need for the comparison.
        (try_complete): Likewise.
        (command_completion_function): Likewise.
        (free_completions): Likewise.
        * widget.c (gauge_callback): Fix for 64-bit arches (%*s len must
        be int, %3d takes int.
        (copy_region): g_free handles NULL argument too, no need for
        the comparison.
        (kill_line): Likewise.
        * find.c (do_search): Likewise.
        (init_find_vars): Likewise.
        (do_find): Likewise.
2004-09-03 22:00:27 +00:00
Roland Illig
7bff9337c0 * Code cleanup: Added const qualifier for variables and
function declarations where possible. Additionally wrapped
	the calls to putenv() by g_strdup().
2004-08-29 23:59:17 +00:00
Roland Illig
bfb2047463 Removed unnecessary type cast. 2004-08-16 16:22:14 +00:00