Ticket #2075: apply "Compute totals" option to Move operation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Merge branch '2075_move_compute_total'

* 2075_move_compute_total:
  Ticket #2075: apply "Compute totals" option to Move operation.
Ticket #3066: refactoring of dir_list class and related code.

Initial commit: use GCompareFunc instead of sortfn.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Move sort_field member out from panel_sort_info_t structure.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Rename panel_sort_info_t to dir_sort_options_t

...and use it in routines of load and sort directory.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(dir_list_grow): new public API of dir_list.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(handle_path): don't check list size here.

(handle_dirent): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Add dir_list::len member to keep number of items in list.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(clean_dir): try minimize memory usage.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(dir_list_append): add new dir_list API and use it.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Rename macros related to dir_list::size.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Rename functions:

set_zero_dir -> dir_list_init
clean_dir -> dir_list_clean
do_sort -> dir_list_sort
do_load_dir -> dir_list_load
do_reload_dir -> dir_list_reload
get_dotdot_dir_stat -> dir_get_dotdot_stat

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Concretize an usage of file_entry type.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Rename type file_entry to the file_entry_t.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Merge branch '3066_dir_list'

* 3066_dir_list:
  Rename type file_entry to the file_entry_t.
  Concretize an usage of file_entry type.
  Rename functions:
  Rename macros related to dir_list::size.
  (dir_list_append): add new dir_list API and use it.
  (clean_dir): try minimize memory usage.
  Add dir_list::len member to keep number of items in list.
  (handle_path): don't check list size here.
  (dir_list_grow): new public API of dir_list.
  Rename panel_sort_info_t to dir_sort_options_t
  Move sort_field member out from panel_sort_info_t structure.
  Ticket #3066: refactoring of dir_list class and related code.
Ticket 3069: fix of case-sensitive search

...if file encoding and locale are different.

Example: locale is KOI8-R, file encoding is UTF-8. Note: those encodings
are not same.

File content is following (in Russian):

йцукен
Йцукен

The difference is in first line char only: Й (lowercase letter) and й
(uppercase letter).  The search of Ê gives the result Й independently of
case sensitivity. й isn't found.
If switch "All charsets" on, nothing is found.

The main idea of fix is modification of search API to allow set of search
pattern charset and use if within search engine.
Old API:
mc_search_new (pattern, pattern_len);
New API:
mc_search_new (pattern, pattern_len, pattern_charset);

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Search: better support of --disable-charset

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Refactoring: use define DEFAULT_CHARSET for "ASCII" charset.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Merge branch '3069_case_sens_search_fix'

* 3069_case_sens_search_fix:
  Refactoring: use define DEFAULT_CHARSET for "ASCII" charset.
  Search: better support of --disable-charset
  Ticket 3069: fix of case-sensitive search
Ticket #3070: changes to files in nested .zip archives are lost.

How to reproduce:

Changes to the text file inside nested .zip file are lost.

echo "hello, world" >hello.txt
zip message.zip hello.txt
zip wrapper.zip message.zip
rm -v hello.txt message.zip

Using mc enter to wrapper.zip/message.zip and edit (F4) "hello.txt",
save, then exit mc.

unzip wrapper.zip
unzip message.zip

Result: changes were not saved to "hello.txt".
Expected result: changes are saved.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>