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.