to terminal charset.
src/strutil.h: added conv_gerror_message member to str_class structure.
Added str_conv_gerror_message function declaration.
src/strutil.c (str_conv_gerror_message): new function to convert GError
message to terminal charset.
src/strutil8bit.c (str_8bit_conv_gerror_message): new function to convert GError
message to terminal charset for 8-bit locales.
src/strutilascii.c (str_ascii_conv_gerror_message): new function to convert GError
message to terminal charset for 7-bit locales.
src/strutilutf8.c (str_utf8_conv_gerror_message): new function to convert GError
message to terminal charset for utf-8 locales.
replace dialog:
* removed 'replace order' field
* removed 'scanf' and 'regex' chackboxes
* added selectbox element for choise type of search
* confirm replace and 'replace all' now radiobuttons
search dialog:
* removed 'replace order' field
* removed 'scanf' and 'regex' chackboxes
* added selectbox element for choise type of search
(button_callback): use draw_hotkey function to draw button text.
(radio_callback): use draw_hotkey function to draw radiobutton text.
(check_callback): use draw_hotkey function to draw checkbutton text.
* 'm-utf-8' of ssh://www.midnight-commander.org:2222/git/mc:
Fixed coredump in editor after help call.
src/menu.c (create_menu): don't translate menu entry text if ENABLE_NLS isn't defined.
src/strutil.h: created align_crt_t type for string alignment on terminal.
fix: uninitialized variable "p" in str_8bit_fit_to_term
Changed type of related function arguments.
src/strutil.c (str_fit_to_term): changed type of 3rd argument
from int to align_crt_t.
src/strutil8bit.c (str_8bit_fit_to_term): likewise.
src/strutilascii.c (str_ascii_fit_to_term): likewise.
src/strutilutf8.c (str_utf8_fit_to_term): likewise.
src/screen.c: changed type of alignment variables and structure fields
* Fix init of global variables cp_source and cp_display
* add property (mc_search_t*) search to WEdit srtucture
* start of reorganize edit/editcmd.c for new search engine
valgrind log when run viewer
==9981== Conditional jump or move depends on uninitialised value(s)
==9981== at 0x45891B: view_map_offset_and_column (view.c:584)
==9981== by 0x458D5B: view_column_to_offset (view.c:917)
==9981== by 0x458DD8: view_set_first_showed (view.c:1443)
==9981== by 0x45B79F: view_new (view.c:4136)
==9981== by 0x45B911: mc_internal_viewer (view.c:3969)
==9981== by 0x423D85: view_file_at_line (cmd.c:132)
==9981== by 0x423E78: do_view_cmd (cmd.c:217)
==9981== by 0x45CDE7: buttonbar_call (widget.c:2425)
==9981== by 0x45D754: buttonbar_callback (widget.c:2456)
==9981== by 0x427D42: dlg_process_event (dialog.c:618)
==9981== by 0x428035: run_dlg (dialog.c:789)
==9981== by 0x43E708: main (main.c:1688)
==9981== Uninitialised value was created by a stack allocation
==9981== at 0x4586F0: view_map_offset_and_column (view.c:593)
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
Comment snippet:
We can't just allocate struct dirent as (see man dirent.h)
struct dirent has VERY nonnaive semantics of allocating
d_name in it. Moreover, linux's glibc-2.9 allocates dirents _less_,
than 'sizeof (struct dirent)' making full bitwise (sizeof dirent) copy
heap corrupter. So, allocate longliving dirent with at least
(NAME_MAX + 1) for d_name in it.
Strictly saying resulting dirent is unusable as we don't adjust internal
structures, holding dirent size. But we don't use it in libc infrastructure.
TODO: to make simpler homemade dirent-alike structure.
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>