Commit Graph

1396 Commits

Author SHA1 Message Date
Andrew Borodin
91a4598b54 Ticket #1755: code cleanup before 4.7.0-pre4 release.
Free some variables allocated at MC startup.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-30 14:41:03 +02:00
Slava Zanko
e7c6d59e63 Code cleanup for compile with new CFLAGS value.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-28 13:37:40 +02:00
Denys Vlasenko
710d88cf3c Ticket #1725: Do not abort on broken .cpio file
For some reason, mc aborts if .cpio magic as wrong.
This trivial patch makes mc handle it gracefully.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-22 10:43:13 +03:00
Ilia Maslakov
91be46a861 Ticket #1726 (AI_ADDRCONFIG fix)
fixed undeclared AI_ADDRCONFIG under uclibc <0.9.29

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-10-20 18:13:20 +00:00
Slava Zanko
f589410ced Ticket #1729: extfs: fail copying into arhive
Test case:
 * create any zip-archive (or take exists)
 * run mc
 * enter into archive
 * try to copy any files inside archive.

Fix issue: Try to open temporarry file twice: with O_CREATE flag; and without O_CREATE and with O_TRUNC flag
Also, created extfs_chown() function for avoid chown-related warnings.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-20 13:04:30 +03:00
Slava Zanko
91248f05bd Ticket #1712: VFS fix for mc.
Fix segfaults in various cases while browsing various VFSs.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-15 09:39:26 +03:00
Slava Zanko
3b05057818 Ticket #1607: undelfs check broken in configure.ac
Fix running onfigure with '--disable-vfs-undelfs' option.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-15 09:34:29 +03:00
Yuri Fil
c5fd4aef8e Ticket #1681: extfs for .cab
Added ability for work with Microsoft CAB archives.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-07 13:14:24 +03:00
Slava Zanko
dd94068a62 Ticket #1649: Prepare for prerelease mc-4.7.0-pre3 (code cleanup)
Try to compile with
{{{
make CFLAGS="-Wall -Werror -Wno-long-long -Wwrite-strings"
}}}

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-30 16:42:11 +03:00
Slava Zanko
ff6cd52e53 Ticket #44: More functionally u7z.
* automatically search of 7z or 7za utility
* fixed calculate of EXFNAME file name.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-24 14:14:46 +03:00
Slava Zanko
bd95f71a6b Some little bugfixies for xz and lzma archives:
* 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>
2009-09-16 02:05:06 +03:00
Denys Vlasenko
e064bd60df De-inline a few functions which are large
...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>
2009-08-31 07:12:59 +03:00
Daniel Borca
ad42905ecf Ticket #1477: incorrect detection of compressed patchfs
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>
2009-08-24 17:41:36 +03:00
Sergei Trofimovich
b933da347e vfs/fish.c: removed unused variable
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-08-24 09:31:26 +04:00
Andrew Borodin
179e516c2a VFS: moved vfs_translate_url() declaration to the public scope.
Fixed missed includes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-24 09:31:26 +04:00
Andrew Borodin
f2e6817363 Ticket #1414: small refactoring before major modifications.
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>
2009-08-17 15:54:39 +04:00
Jindrich Novy
b1b3be843c Ticket #121 (support IPv6).
Implemented support of IPv6 protocol in FTP connections.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-13 00:32:26 +03:00
Andrew Borodin
05b89b3bab VFS: removed unnedeed includes of tty/tty.h header.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-12 21:23:55 +04:00
Slava Zanko
ce54d07561 Fix include paths in some source files
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-12 21:23:13 +04:00
Andrew Borodin
fb51cb8241 Use TTY function names instead of #define's. 2009-08-12 21:23:12 +04:00
Andrew Borodin
f3730bdc41 Initial step to move TTY layer of MC to separate library. 2009-08-12 21:19:20 +04:00
Sergei Trofimovich
5f1ad860b7 Ticket #1527: heap corruption detected on large filenames
Fix bug, introduced in 27fbf91c28
commit. Really allocate 'dirent + NAME_MAX + 1', instead of
sizeof(void*) + NAME_MAX + 1.

Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2009-08-12 12:37:32 +03:00
Patrick Winnertz
c313396a45 Ticket #1501
* 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>
2009-08-10 07:10:42 +00:00
Stan. S. Krupoderov
96c0dc08d8 Ticket #1485: iso9660 extfs does not handle certain isos
extfs/iso9660.in: add suport UCS l1, and fix ageinst new isoinfo

    Original author: dborca

Signed-off-by: Stan. S. Krupoderov <pashelper@gmail.com>
2009-08-09 16:27:27 +04:00
Slava Zanko
c78c4a555a Ticket #1467 (Portability: fix bashism in vfs/extfs/u7z)
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>
2009-08-05 16:37:36 +03:00
Ilia Maslakov
07c87f2b27 Ticket #366
fix by mike.dld for tarfs dont shows duplicate folders in some tar-files
2009-08-03 21:20:52 +00:00
Ilia Maslakov
3b1070fb3d Ticket #1453 (crash mc on create new file in external editor (S-F4))
fix: crash mc when path is null on create new file in external editor
2009-08-03 15:37:55 +00:00
Patrick Winnertz
bada6849cd Remove unneeded vars in edit/edit.c to avoid compiler warnings
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.
2009-07-17 12:00:01 +03:00
Sergei Trofimovich
d54ea1e079 Ticket #1413 (overly quoted escaped pathnames)
> "ls -l \"/%s\" >/dev/null 2>/dev/null\n"
and longstanding one
    > "ls $LSOPT \"/%s\" 2>/dev/null | grep '[cbt]' | (\n"

Fixing again.

Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2009-07-16 09:40:34 +03:00
Slava Zanko
33c0d6f022 Fixed segfault with fish operations
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>
2009-07-15 13:59:25 +03:00
Slava Zanko
9ee5f318ab Ticket #1395 (Copying to fish is broken)
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>
2009-07-15 13:59:25 +03:00
Andrew Borodin
68354273a3 Fixed includes.
Added missed includes. Fixed includes after rebase.

Signed-off-by: Andrew Borodin <borodin@borodin.zarya>
2009-06-19 14:36:36 +04:00
Andrew Borodin
9ef324f7bb edit/edit.h: added function prototypes.
edit/editcmd.c: removed include of eregex.h
vfs/vfs-impl.h: removed commented include of <stddef.h>.
2009-06-18 21:08:24 +04:00
Andrew Borodin
26852546b7 vfs/gc.c src/widget.c: removed unneeded #include's.
vfs/vfs-impl.h src/background.h src/charsets.c
src/esc.h src/file.h src/execute.c src/vfsdummy.h: fixed missed #include's.
src/cons.saver.c: include <config.h> unconditionally.
src/complete.c:: fixed #include's.
src/win.h src/win.c: removed unneeded #include's;
check_movement_keys(): fixed type of returned value.
2009-06-18 21:07:10 +04:00
Andrew Borodin
5f61e9aaa4 Fixed missed #include's after rebase to current master. 2009-06-18 21:06:25 +04:00
Enrico Weigelt, metux IT service
b09a107190 further include file fixups 2009-06-18 21:02:29 +04:00
Enrico Weigelt, metux IT service
c7d04dd47a fixed several missing #include's 2009-06-18 21:02:29 +04:00
Slava Zanko
f018970577 Renamed functions shell_escape (to strutils_shell_escape) and shell_unescape (to strutils_shell_unescape)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-12 10:32:00 +03:00
Slava Zanko
5f810602e0 Moved 'escape' and 'unescape' strings functions from src/util.[ch] into src/strescape.[ch]
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-12 10:31:59 +03:00
Slava Zanko
f0182a6969 Fix compile mcserv helper
Changes logic in m4 files for more sense of configure options.
Renamed --with-mcfs ro --enable-mcserver
2009-05-27 21:50:02 +03:00
Slava Zanko
abcd23406d remove ChangeLog files from mc tree
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).
2009-05-27 14:53:23 +03:00
Slava Zanko
1a899905bd Fix usage of shell_[un]escape functions.
These functions returns newly allocated string, but calling don't freeze correctly allocated memory.
2009-05-27 11:20:48 +03:00
Slava Zanko
0c17219b2a Move global config files from pkg_datadir to sysconfdir
* Also fixed 'make dist' command
 * changed contrib/dist/redhat/mc.spec.in for builds with new dir
2009-05-21 01:01:10 +03:00
Andrew Zabolotny
c6b42a7369 This patch makes VFS a bit faster by replacing GSList with GPtrArray
and using a clever trick to avoid doing list/array searches on every
VFS lookup.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-05-20 21:12:38 +03:00
Ilia Maslakov
b29e81556f Rewritten by David Sterba <dave jikos.cz> patchfs.
add xz compress support to David's version.
2009-05-14 13:38:10 +00:00
xgizzmo
24ca27fe30 Added XZ compression support. Signed-off-by: xgizzmo <xgizzmo@slackbuilds.org>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-05-13 11:35:22 +03:00
Slava Zanko
121ff2965c Merge branch '345_mcfs_build_failure'
* 345_mcfs_build_failure:
  Fixed mcfs build failure (after reorganize M4-autoconf stuff)
2009-05-12 16:27:55 +03:00
Slava Zanko
428ea1b406 Change name of automake constant 'USE_MCFS' to 'ENABLE_VFS_MCFS' 2009-05-11 13:42:49 +03:00
Slava Zanko
ae46a004e9 Fixed mcfs build failure (after reorganize M4-autoconf stuff)
Defined variable WITH_MCFS renamed to ENABLE_VFS_MCFS for more sence
2009-05-11 10:28:57 +03:00
Slava Zanko
2ebdf91079 Merge branch 'm-utf-8'
* 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.
2009-05-07 13:01:01 +03:00