Commit Graph

8469 Commits

Author SHA1 Message Date
Patrick Winnertz
2a9faab6e4 Fix compiler warning about different signedness of pointers in editcmd.c
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-07-17 12:00:01 +03:00
Patrick Winnertz
bada6849cd Remove unneeded vars in edit/edit.c to avoid compiler warnings
Signed-off-by: Patrick Winnertz <winnie@debian.org>

edit: cleanup: moved variable declaration to begin of block
edit: have_charset: added explicit variable declarations

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>

fix not initialized variable 'cw'
fix variables 'cw', 'utf_ch', make more safety algorithm.
2009-07-17 12:00:01 +03:00
Sergei Trofimovich
0bffb32dd1 Merge commit 'origin/1413_overly_quoted_fish_filenames'
* commit 'origin/1413_overly_quoted_fish_filenames':
  Ticket #1413 (overly quoted escaped pathnames)
2009-07-16 14:57:06 +03:00
Sergei Trofimovich
d54ea1e079 Ticket #1413 (overly quoted escaped pathnames)
> "ls -l \"/%s\" >/dev/null 2>/dev/null\n"
and longstanding one
    > "ls $LSOPT \"/%s\" 2>/dev/null | grep '[cbt]' | (\n"

Fixing again.

Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2009-07-16 09:40:34 +03:00
Ilia Maslakov
3596ceeb9f Ticket #1402 (mcedit replace regression)
fix: issue in 'while'
    remove 'Once' button as 'atavism'
    add 'from' field in confirm dialog

Fixed layout of place confirmation dialog in mcedit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-07-16 05:42:36 +00:00
Slava Zanko
ddad204341 Merge branch '1395_copy_to_fish_broken'
* 1395_copy_to_fish_broken:
  Fixed segfault with fish operations
  Ticket #1395 (Copying to fish is broken)
2009-07-15 13:59:45 +03:00
Slava Zanko
33c0d6f022 Fixed segfault with fish operations
Reason:
If some directory in fish is a read-only, then mc will crashed

Issue:
In fish_mkdir added additional check if directory was created.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-15 13:59:25 +03:00
Slava Zanko
9ee5f318ab Ticket #1395 (Copying to fish is broken)
No any files was copyed into fish.

Issue:
Files was try to create with O_EXCL flag. On fish it's fail
Now for fish flag O_EXCL will dropped.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-15 13:59:25 +03:00
Slava Zanko
f830dcc0a8 Merge commit 'origin/1397_master_broken'
* commit 'origin/1397_master_broken':
  Ticket #1397 (Broken build of project without --enable-charset option)
2009-07-14 13:55:25 +03:00
Ilia Maslakov
d92bbf59b6 Ticket #1403 (segfault mcedit after search)
fix: non redefined cp_source after autocorrect codeset
2009-07-13 19:09:50 +00:00
Ilia Maslakov
59ac0537e6 Ticket #1401 (extension for key sequence in mc.lib)
add needed seq in win.c
    changed algorithm lookup_key
2009-07-13 18:59:28 +00:00
Slava Zanko
a41156c007 Ticket #1397 (Broken build of project without --enable-charset option)
Fixed:
 * Call of str_convert_to_input() now in HAVE_CHARSET block
 * Fixed recoding of search string if charsets in use.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-13 12:53:15 +03:00
Slava Zanko
2d01dd04ae Merge branch '391_history_is_broken'
* 391_history_is_broken:
  Ticket #391 (history is broken).
2009-07-13 11:53:50 +03:00
Slava Zanko
cf363ad022 Ticket #391 (history is broken).
Reason:
glib ini-function works only with UTF-8 in files. Bug raised if system charset not UTF-8.

Issue:
 * recode to utf-8 before saving values of ini-params and
 * recode from utf-8 after reading values of ini-params

Also fixed:
 * if system codepage is not UTF-8, panelize named is always in utf-8 and seems as non-sense string.
 * Recode panelize command names into system codepage from utf-8
 * global variable utf8_display now initialized in any case (non-relative to ENABLE_CHARSET)

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-13 11:53:16 +03:00
Slava Zanko
944d1cf961 Merge branch '393_damn_slow_search_viewer'
* 393_damn_slow_search_viewer:
  Ticket #393 (slow search in viewer)
2009-07-09 09:45:41 +03:00
Slava Zanko
ce1d670972 Ticket #393 (slow search in viewer)
* Replace search prepare algorithm
    * Added function for update search status.
    * Added callback for update search status into external places
    * Added new message box 'Seeking to search result' at end of search process
    * Fixed search in file with different charset.
    * Fixed backward search in nroff'ed text
    * Added named enum for return values of callback functions for search
    * Fixed wrong search with 'pcre' search engine.
    * Fixed search in underlined text.
    * Fixed wrong offset of nroff'ed text where text is underlined.
    * Fixed calculating of next search position. Fixed double-search one text in nroff'ed area.
    * Last found text stay selected if no more found.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-09 09:44:44 +03:00
Patrick Winnertz
944e137123 Merge branch '1391_segfault_on_empty_codepages'
* 1391_segfault_on_empty_codepages:
  Ticket #1391: fill codepages list if mc.charsets file cannot be read.
  Prevent mc from crashing when codepages is empty because of an bogus installation
2009-07-07 19:17:09 +02:00
Slava Zanko
6e9059e2f3 Merge branch '1396_with_search_engine'
* 1396_with_search_engine:
  Fixed bug in calculate version code when run under FreeBSD
  Ticket #1396 (need build option --with-search-engine for select regex engine)
2009-07-07 12:32:42 +03:00
Slava Zanko
514cdf8340 Fixed bug in calculate version code when run under FreeBSD
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-07 11:17:23 +03:00
Slava Zanko
1b03ffad49 Ticket #1396 (need build option --with-search-engine for select regex engine)
Added '--with-search-engine' into configure script.
Changed behavior of lib_pcre m4-module. Now used pkg-config

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-07 11:17:10 +03:00
Andrew Borodin
1b4bc8b91d Ticket #1391: fill codepages list if mc.charsets file cannot be read.
If mc.charsets file cannot be read, add default ASCII codepage
to codepages list.
Some code clean up.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-07-07 12:05:57 +04:00
Ilia Maslakov
348ab7303f Ticket #1384 (Whitespace highlighting should be optional)
Add Denis Vlasenko patch for draw options in dialog
    Add hotkey M-S-<minus> as swicher for show tabs and tws
2009-07-07 05:53:52 +00:00
Andrew Borodin
d090be917a Merge branch '1394_rpm_pack_wrappers'
* 1394_rpm_pack_wrappers:
  Ticket #1394: pack shell wrappers at /usr/libexec/mc/mc*sh to RPM.
2009-07-04 18:22:12 +04:00
Yury V. Zaytsev
8ccfa2fa3c Ticket #1394: pack shell wrappers at /usr/libexec/mc/mc*sh to RPM.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-07-04 18:09:28 +04:00
Andrew Borodin
ebf4c000e2 Merge branch '1393_copy_dir_dir_memleak'
* 1393_copy_dir_dir_memleak:
  Fixed memory leak in copy_dir_dir().
2009-07-03 13:16:11 +04:00
Andrew Borodin
80006e30e3 Fixed memory leak in copy_dir_dir().
Some optimization.
Little code clean up.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-07-03 10:29:57 +04:00
Patrick Winnertz
6cd8c978fe Prevent mc from crashing when codepages is empty because of an bogus installation
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-07-01 07:58:58 +02:00
Patrick Winnertz
1448fb99d6 Merge branch '346_fix_faq'
* 346_fix_faq:
  Fixed URI to list of build requrements
  Fixed also some outdated informations in doc/HACKING
  Removed some trailing whitespaces in FAQ
  Fixed also some outdated informations in doc/HACKING
  Ticket 346 (git master: FAQ is outdated)
2009-06-30 23:08:56 +02:00
Slava Zanko
345c31baed Fixed URI to list of build requrements
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-30 23:38:11 +03:00
Slava Zanko
388bcc3520 Fixed also some outdated informations in doc/HACKING
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-30 23:12:10 +03:00
Patrick Winnertz
01bd446bdf Removed some trailing whitespaces in FAQ
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-06-30 22:03:49 +02:00
Patrick Winnertz
d8965153a7 Fixed also some outdated informations in doc/HACKING
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-06-30 22:03:04 +02:00
Patrick Winnertz
1759c1124f Ticket 346 (git master: FAQ is outdated)
Fixed some outdated informations in the FAQ

 - about main site
 - about maillists
 - about configure options
 - glib version which is needed

Signed-off-by: Patrick Winnertz <winnie@debian.org>

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-30 22:25:59 +03:00
Ilia Maslakov
d205e724f0 Ticket #343 (automatically detect user's charset) reopened
fix: check if mc is run as viewer or editor mode.
fix: little memory leak
fix: dlg_erase now check input parameters
2009-06-30 18:19:05 +00:00
Mikhail S. Pobolovets
9e92f803cc FIX: Completion in editor doesn't work with subwords ended with '_'
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-06-29 14:14:25 +03:00
Andrew Borodin
bbbb4d6daf Ticket #1378: removed duplication of command line histroy.
Modified histroy_cmd() function: now it shows history of command
line widget, not yet another dialog window.
Modified menu entry.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-06-27 09:09:01 +04:00
Sergei Trofimovich
4ff5d7c0a9 Merge commit 'origin/1379_viewer_hangup'
* commit 'origin/1379_viewer_hangup':
  close_error_pipe: return value instead of garbage
  viewer: Ticket: Viewer(F3) hangups at '.patch' viewing
2009-06-26 19:05:28 +03:00
Sergei Trofimovich
c07b5efe45 close_error_pipe: return value instead of garbage
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-06-26 13:39:47 +03:00
Sergei Trofimovich
e65b0f1986 viewer: Ticket: Viewer(F3) hangups at '.patch' viewing
As stderr closes before process shutdown we get hangup trying to
read last data from stderr. Try to read at least something before closing
stderr.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-06-26 13:29:05 +03:00
Andrew Borodin
b72e83193a Merge branch '394_history_file'
* 394_history_file:
  History: don't drop valid keys after 1st invalid one.
  REBASE: Need to join to previous commit
  Fixed return value of mc_config_new() function
  Ticket #394: handle the empty ~/.mc/history file correctly.
2009-06-26 10:17:20 +04:00
Andrew Borodin
66a15c9163 History: don't drop valid keys after 1st invalid one.
Old behavior: while reading some history from ~/.mc/history file,
the all keys after 1st invalid key are ignored.

New behavior: ignored invlaid keys only. All valid keys are
get.

Signed-off-by: Andrew Borodin <borodin@borodin.zarya>
2009-06-26 10:16:50 +04:00
Slava Zanko
372d3c6cd3 REBASE: Need to join to previous commit 2009-06-26 10:16:50 +04:00
Slava Zanko
709150fe77 Fixed return value of mc_config_new() function
Also *len parameter always setting up in mc_config_get_keys() and mc_config_get_groups() functions.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-26 10:16:50 +04:00
Andrew Borodin
5a67008194 Ticket #394: handle the empty ~/.mc/history file correctly.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-06-26 10:16:50 +04:00
Andrew Borodin
d5f1442438 Ticket 1375: new design of 'Find File' dialog.
* src/find.c:
  + New design of 'Find File' dialog.
  + íodification of search results dialog: listbox
    which contains search results is not scrolled now.
    New behavior avoids dialog blinking :) and allows the walk
    through the list during search.
    Added counter of found items.
  + Check regexp before search.
  + For glib >= 2.14.0, use GQueue for directory queue.
  + Fixed memory leak.
  + Some optimization.
  + More type accuracy.
  + Formatting. Fixed typo. Clean up.

* src/widget.c:
  (listbox_select_by_number): don't operate with non-existing list.

* src/search/*:
  + (mc_search_prepare): new function that allows check if regexp
    is valid before search (Slava Zanko).
  + Removed redundant chek for g_free ().
    Use g_free() instead of free().

Signed-off-by: Andrew Borodin <borodin@borodin.zarya>
2009-06-25 10:56:16 +04:00
Ilia Maslakov
9283c14213 Ticket #1376 (TAGS parser crashes)
fix: incorrect parse invalid input parameters in etags_set_definition_hash
2009-06-24 14:26:37 +00:00
Slava Zanko
105c56fb4d Merge branch 'master' of ssh://www.midnight-commander.org:2222/git/mc
* 'master' of ssh://www.midnight-commander.org:2222/git/mc:
  viewer: Ticket: #410 certain binary treated-as-roff files cause viewer hangup
2009-06-24 12:23:36 +03:00
Slava Zanko
78f01a3a9a Merge branch '72_preserve_attributes'
* 72_preserve_attributes:
  Copy files/dirs: If 'Preserve attributes' checkbox is unchecked, then permissions of files and dirs will be set relative to current umask
  Added recognizing of filesystem type and automatically toggle 'on' or 'off' checkbox 'Preserve attributes' in file copy/move dialog
  Fix chmod complaints when "preserve attributes" unchecked
2009-06-24 12:21:26 +03:00
Slava Zanko
f37120e8fc Copy files/dirs: If 'Preserve attributes' checkbox is unchecked, then permissions of files and dirs will be set relative to current umask
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-23 11:23:19 +03:00
Sergei Trofimovich
40438bfd0f viewer: Ticket: #410 certain binary treated-as-roff files cause viewer hangup
Hangup state:
viewer executes program an checks whether it emits data from stdout
or stderr and receives them via UNIX pipes. Viewer reads stdout
synchronously (fread). Inferior program tries to write large chunk
to stderr when viewer is blocked on stdout read. We get a deadlock:

* viewer is blocked reading from empty nonclosed stdout
* inferior app is blocked by full stderr pipe

To prevent this we close stderr right after first read byte from stdout.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-06-22 21:16:10 +03:00