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>
Modified descriptions.
src/strutil.c (_str_convert): return value of estr_t type instead of int.
Check coder first. Removed redundant code.
(str_convert): simplified. Changed returned type to estr_t.
(str_nconvet): likewise.
(str_vfs_convert_to): likewise.
(str_vfs_convert_from): likewise. Used symbolic names instead of hardcoded values.
(str_translate_char): likewise.
src/strutil8bit.c (str_8bit_vfs_convert_to): likewise. Made function static.
src/strutilascii.c (str_ascii_vfs_convert_to): likewise.
src/strutilutf8.c: (str_utf8_vfs_convert_to): Used symbolic names
instead of hardcoded values.
src/charsets.c (convert_from_utf_to_current): likewise.
(convert_from_utf_to_current_c): likewise.
(convert_from_8bit_to_utf_c): likewise.
(convert_from_8bit_to_utf_c2): likewise.
src/view.c (view_get_char): likewise.
vfs/vfs.c (_vfs_translate_path): Changed returned type to estr_t.
Used symbolic names instead of hardcoded values.
(vfs_translate_path): likewise.
charset.c: cp_display and cp_source variables are made global not static and...
charset.h: ...defined here as extern.
search.h: added required #include's.
search.c: fixed cp_display and cp_source variables declaration.
* added multicharset search feature
* added template for HEX and GLOB searches (for viewer and for search files dialog)
* implemented normal search with/without characters cases
WARNING! UNSTABLE! Code not checked for work! I'm just wrote and compiled.