* Increase number of reading butes by one for better analyzation of compression type.
* Add recognize lzma archive by extention.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
...or not-so-large but nevertheless
contain more than one function call,
or contain loops, or contain if's and at least one
function call, or contain largish objects on stack.
In my experience, in those cases the code size
growth is big enough to not inline stuff.
I guess some of the really big functions
are defined inline because they have, or had in the past,
just one callsite.
But for a few years gcc already does it automatically,
no need to do it by hand and risk code size explosion
when later during code evolution another callsite
is created. This optimization by hand is simply
no longer needed.
Anyway, here is the code size difference:
text data bss dec hex filename
572337 17944 177820 768101 bb865 mc.t5/.obj/src/mc
567697 17944 177820 763461 ba645 mc.t6/.obj/src/mc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
UseCase:
* rename any patch file into patch_file.lzma_tar.patch.gz for example
* try to enter into renamed file (press Enter key on a file in panel)
* You'll see error message 'sh: lzma: command not found'
Fix issue:
* Add -b key into call of 'file' utility (to avoid filename in output)
* better parse 'file -b' output
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Fixed missed includes.
Fised widget_set_size() declaration.
Moved default widget callback (default_proc()) from dialog.[ch] to widget.[ch].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* place every operation into a if clause, so that every failure of the
operations is reported.
* Place chown/chmod into if conditions to check if the commands where
successfull or not on fish.
* Added one more argument to the #CHOWN line
Signed-off-by: Patrick Winnertz <winnie@debian.org>
Fixed bashism in 'mcu7zip_rm' and 'mcu7zip_rmdir' functions.
* Use 'printf' instread of 'echo -e'
* stderor redirected to /dev/null
Thanks to narcan.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
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.
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>
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>
Description by Sergei Trofimovich:
GNU ChangeLog? files are result of CVS stupidpity about changeset tracking.
Currently constantly updated ChangeLogs? diverge in different branches and cause collisions(!)
when 'git merge' (almost ANY SINGLE MERGE!).
Major changes can be described in NEWS file, minor changes can be autogenerated via 'git log'/'git shortlog'
and friends (if needed at all).
* m-utf-8: (223 commits)
Fix wildcard pattern in file select and file find dialogs
Project builds with option --disable-charsets
Deleted build-glib1.sh because glib1 don't work with utf-8
fix building without --enable-charset
Total replacement to mc_search stuff in all places
Search engine: if found_len parameter NULL, then mc_search_run don't try to fill them
src/view.c: Reworked search stuff to usage src/search
refactoring: rename edit/editcmd_dialog.c:editcmd_dialog__get_search_types_list to
Search engine: development of hex search complete
Search engine: remove forgotten debug string and reindent file
Search engine:
configure.ac: if present glib-2.14 and higher, libpcre don't linked
Search engine: now used regexp external engines:
src/find.c: Fixed core dump if content search pattern no present
edit/editcmd_dialogs.c: fixed state of search type between dialog window calls
Find files: checkbox 'Regular expression' for content search now default unchecked
Find files: changes for usage of new search engine:
Fix copy of current/opposite path to command line: remove charset info from path
src/Makefile.am: add some header files to Make-tracking
Fixed editor menu reloading.
As we pass correctly(hopefully) escaped file names - all calls
(except forgotten chgrp) were converted to accept unquoted strings.
This patch fixes chgrp.
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.