Fixed segfault in file find if MC complied with --disabled-charset.
Fixed wrong search results because of incorrect mc_search_run() argument.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
src/search/glob.c (mc_search__glob_translate_to_regex): added '^'
and '$' symbols to the begin and end of regex respectively to
properly handle shell-style wildcards.
src/cmd: new select/unselect engine.
(reverse_selection_cmd): invert selection for dirs as for files.
(select_unselect_cmd): new dialog. Added "Case sensitive" and "Files
only" checkboxes.
* File version.h will be created (or changed) automatically
* Fixed versions for rpm packages - all '-' changed to '.' in RPM_VERSION variable
* when version.h is changed (or deleted) ./configure script will be invoked
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
There is many places (esp. completion stuff),
whish does stuff like the following:
char * result
while ( (result = do_stuff (&state)) != NULL) {
...
}
Usually do_stuff () uses str_unescape() in function start
and str_escape() at the end. str_escape() hides NULL and
we get endless loop. And g_strdup("") is larger, than NULL :]
Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
Description by Sergei Trofimovich:
GNU ChangeLog? files are result of CVS stupidpity about changeset tracking.
Currently constantly updated ChangeLogs? diverge in different branches and cause collisions(!)
when 'git merge' (almost ANY SINGLE MERGE!).
Major changes can be described in NEWS file, minor changes can be autogenerated via 'git log'/'git shortlog'
and friends (if needed at all).
Also, changes 'normal' search engine - now it wrapper for 'regex' search engine
because old engine don't correct work: search by 'test' success on 'test' or 'TEST'
but fail on 'Test' or 'teSt'. New 'normal' engine work correctly.
(filename_completion_function): tilde_expand() returns a new allocated
string, fixed memleak. Formatting. Small optimization. Type accuracy.
Continue at the end of loop is useless, removed.
(username_completion_function): Type accuracy. Formatting. Small
optimization.
(command_completion_function): Type accuracy. Small optimization.
Fixed bug of previous commit: pointer to freed memory was used.
Disabled by default. This option is available in ini file only.
setup.h: declare mouse_close_dialog variable.
setup.h: read/write mouse_close_dialog variable from/to ini file.
dialog.c: use mouse_close_dialog variable to control the single left click
outside of dialog.
* 130_sysconfdir_mc:
scripts mc.sh, mc.csh, mc-wrapper.csh and mc-wrapper.sh now install into %{libexec}/mc directory
edit/syntax.c: fixed path to Syntax file
Move global config files from pkg_datadir to sysconfdir
Problem arose in freebsd-7.2 system. GCC has 'signed char' there
and thus code like this broke:
> char c = ...;
> if (isprint(c)) ..." // 'signed char' -> 'signed int'
('man isprint' explicitely says to pass 'unsigned char' there)
As we use multibyte chars everywhere - there is not many places to fix.
This patch fixes all 8bit collate functions.
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
configure.ac: Added check for minimal version of Glib2
Since Glib2-2.15 API of file-ini module was changed.
Old API:
void g_key_file_remove_key(...)
New API:
gboolean g_key_file_remove_key(...)
Therefore need to check version of Glib and fix return parameter from mc_config_del_param and mc_config_del_group for success build
Work with ini-file added in Glib2 since version 2.6, therefore in configure.ac added this check.
* 351_show_number_line:
fix hotkey menu entry "Toggle li&ne state" now highlighted "n"
add call CK_Toggle_Line_State to edit menu
show line number in left part of screen (hotkey alt-n)
* mc-4.6:
commandline: strip_escape: strip xterm OSC commands in $PS1
src/main.c (main): create MC home directory with 700 mode instead of 755 one.
src/main.c (main): create MC home directory (~/.mc) if absent.
add option editor_line_status to ini (src/setup.c)
add action CK_Toggle_Line_State (edt/editcmddef.h)
change "print_to_widget()" to show line state, if option_line_state = 1 show line num (edit/editdraw.c)
change "edit_draw_this_line()", (set line state: line num, etc)
add const LINE_STATE_WIDTH, add options: option_line_state, option_line_state_width (edit/edit.h)
add switch on/off show line number (edit/edit.c)
add CK_Toggle_Line_State to translation table command_names (bindings name is Toggle-Line-State).
add const LINE_STATE_COLOR for draw left area bar line state
add color pair "editlinestate" for set in ini
add help for keyword "editlinestate" on "mc --help-color" (src/main.c)
Correctly deal with prompts like (appear in debian/ubuntu):
PS1='\[\e]0;\u@\h: \w\a\]\u@\h:\w\$'
PS1='\[\e]0;\u@\h: \w\e\\\]\u@\h:\w\$'
Based on patch provided provided by Sergey Nizovtsev
https://bugs.launchpad.net/ubuntu/+source/mc/+bug/330633
Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
Here is quote from man(3) mmap:
SUSv3 specifies that mmap() should fail if length is 0. However, in kernels before 2.6.12, mmap()
succeeded in this case: no mapping was created and the call returned addr.
Since kernel 2.6.12, mmap() fails with the error EINVAL for this case.
Thanks to snizovtsev
_icase_search and icase_search stuff has been removed,
because it's not used for now (it is also buggy)
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>