Commit Graph

7691 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT service
1d8ef0b089 fixed #240 2009-02-04 01:08:29 +01:00
Enrico Weigelt, metux IT service
8e2f229c38 Merge commit 'origin/219_keycodes' into mc-4.6 2009-02-04 00:43:43 +01:00
Enrico Weigelt, metux IT service
03ec5ef574 backported #199 branch 2009-02-04 00:29:28 +01:00
Enrico Weigelt, metux IT service
dd6f2d7362 added patch by angel_il on #219 2009-02-03 19:10:58 +01:00
Enrico Weigelt, metux IT service
48a85a7b97 manually merged 232_fix_init_chown_advanced 2009-02-01 22:37:57 +01:00
Enrico Weigelt, metux IT service
c76c6e5ffc Merge commit 'origin/230_fix_name_trunc' into mc-4.6 2009-02-01 22:05:17 +01:00
Sergei Trofimovich
6b6d4a222d cleanup: moved int to size_t
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-02-01 22:44:44 +02:00
Sergei Trofimovich
80a6897271 cleanup: mhl_str_dir_plus_file(): int -> size_t (suggested by Andrew Borodin)
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-02-01 22:01:49 +02:00
Enrico Weigelt, metux IT service
6f9ef0b7be fixed unitialized var in init_chown_advanced() - patch from andrew_b 2009-02-01 20:32:11 +01:00
Sergei Trofimovich
c697fb3753 build fix: added missing declaration of mhl_dir_plus_file (reported by andrew_b)
./configure --enable-samba && make
../vfs/libvfs-mc.a(smbfs.o): In function `smbfs_get_path':
/home/andrew/work.c/mc/mc.master/vfs/smbfs.c:1214: undefined reference to `mhl_str_dir_plus_file'
collect2: ld returned 1 exit status

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-02-01 21:30:21 +02:00
Enrico Weigelt, metux IT service
6c016bc781 fixed name_trunc() on NULL or empty strings - patch from andrew_b 2009-02-01 20:26:27 +01:00
Sergei Trofimovich
5ee6f43796 build fix: added missing declaration of mhl_dir_plus_file
./configure --enable-charset && make
    charsets.c: In function 'load_codepages_list':
    charsets.c:51: warning: implicit declaration of function 'mhl_str_dir_plus_file'
    charsets.c:51: warning: assignment makes pointer from integer without a cast

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-02-01 20:46:18 +02:00
Patrick Winnertz
786b1a8ee9 Fix typo in NEWS to prepare for 4.6.2
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-01 17:05:34 +01:00
Patrick Winnertz
f25ecd8bdf Updated NEWS file to reflect everything which will be fixed within the 4.6.2 release.
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-01 13:45:30 +01:00
Sergei Trofimovich
7a51b50d5c mhl: mhl_shell_unescape_buf(): fixed memory array OOB.
Function misbehaves whe input string ends with backslash.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-02-01 14:01:12 +02:00
Sergei Trofimovich
ad1abaebfb completion: fixed complete already escaped secuences.
<winnie> ls -lQ /tmp/test
-rw-r--r-- 1 winnie winnie 0 30. Jan 13:05 "a"
-rw-r--r-- 1 winnie winnie 0 30. Jan 13:04 " test\"hallo"
-rw-r--r-- 1 winnie winnie 0 30. Jan 13:04 " test$hallo"
<winnie> and then cat /tmp/test/\ and ESC-tab in subshell...

unescape/escape sequences in command completion (it also solves
completiont of weirdweird escapy commands like ./<escapy-cmd><complete>, like:
$ ls -lQ
-rwxr-xr-x 1 slyfox slyfox 2037 Jan 15 21:18 "  'asd&&\"->build-glib1.sh"

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-02-01 13:28:31 +02:00
Sergei Trofimovich
ff4de3d66f Merge branch 'mc-4.6' into 147_escaping
* mc-4.6:
  replaced buggy concat_dir_and_file() by mhl_str_dir_plus_file()
  fixed out-of-tree-builds
  Updated the NEWS file for 4.6.2 and added the bugnumbers behind the items in the list.
  Update for OpenOffice and StarOffice viewer.
  changelog: added entry for python syntax
  syntax: python: keywords update (patch by NNemec) fixes #216
  AC_USE_SYSTEM_EXTENSIONS macro requires autoconf >= 2.60
  po/ru.po: In russian translation, there are some hotkey conficts in menu.
  ChangeLog/NEWS: added entry for #181 ticket (copy to deleted dir)
  Now a trailing slash will only be added in copy & move dialogs if the path itselfs
  copy/move dialog: add trailing '/' to default destination path (fix #181)
  fixed comments to /* ... */
  Not only comment it out but removing it
  Removed unneeded var to make build process a bit cleaner
  Add code snipplet by il.smind which should fix issues with putty and

Conflicts:
	ChangeLog
	mhl/string.h
	src/command.c
	src/complete.c
	src/file.c
	src/util.c
2009-01-31 22:18:19 +02:00
Sergei Trofimovich
6c84e0c6dd completion: added changelog entry for solved #147
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-01-31 22:03:04 +02:00
Sergei Trofimovich
60d8c1d615 completion: fixed completion of escaped commands in commandline
Changes:
 * added new flag: INPUT_COMPLETE_SHELL_ESC - forces
   filename completion return escaped names
 * cleaned up src/complete.c: removed global variables in
   favour of completion flags. Code changed respectively.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-01-31 21:46:32 +02:00
Enrico Weigelt, metux IT service
54d6ec88dc replaced buggy concat_dir_and_file() by mhl_str_dir_plus_file() 2009-01-31 16:51:58 +01:00
Enrico Weigelt, metux IT service
e3a3890a3a fixed out-of-tree-builds 2009-01-30 16:46:44 +01:00
Patrick Winnertz
a5e61d285e Removed unused char*.
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-01-30 12:59:23 +01:00
Sergei Trofimovich
e48cb7c89f mhl: added mhl_strmove() function (memmove semantics)
valgrind detected an error in completion path:
==2962== Source and destination overlap in strcpy(0x459F068, 0x459F06A)
==2962==    at 0x4026056: strcpy (mc_replace_strmem.c:268)
==2962==    by 0x808F70B: canonicalize_pathname (string3.h:106)
==2962==    by 0x805ECBA: filename_completion_function (complete.c:125)
==2962==    by 0x805FB35: command_completion_function (complete.c:448)
==2962==    by 0x805EA34: completion_matches (complete.c:552)
==2962==    by 0x8060454: complete (complete.c:735)
==2962==    by 0x809AAC4: handle_char (widget.c:1545)
==2962==    by 0x807867E: midnight_callback (dialog.h:201)
==2962==    by 0x8061B27: dlg_process_event (dialog.c:664)
==2962==    by 0x8061ECE: run_dlg (dialog.c:786)
==2962==    by 0x807996C: main (main.c:1674)

Snippet of man strcpy:
DESCRIPTION
       The  strcpy()  function copies the string pointed to by src, including the terminating
       null byte ('\0'), to the buffer pointed to by dest.  ___The strings may not overlap___,
       and the destination string dest must be  large enough to receive the copy.
We used strcpy to move data chunk in memory: "./foo" -> "foo", etc.

This patch introduces mhl_strmove and fixed canonicalize_pathname.

Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2009-01-30 09:31:28 +02:00
Patrick Winnertz
f664b98714 Updated the NEWS file for 4.6.2 and added the bugnumbers behind the items in the list.
If you would like to see the corresponding ticket please have a look on:
  http://www.midnight-commander.org/ticket/$ticketnumber

Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-01-29 22:49:04 +01:00
Sergei Trofimovich
17772239ff completion: added escapes in command line on completion
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-01-29 23:38:59 +02:00
Mikhail S. Pobolovets
19716b790a Update for OpenOffice and StarOffice viewer.
odt2txt is now used.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-01-29 22:18:12 +02:00
Sergei Trofimovich
455f2dbd66 complete: cleanup: #define to enum INPUT_COMPLETION_FLAGS
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-01-29 21:13:30 +02:00
Enrico Weigelt, metux IT service
7639b364af added a new parameter for completion flags to input_new 2009-01-29 19:17:43 +01:00
Sergei Trofimovich
a59ccc1016 changelog: added entry for python syntax
Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2009-01-29 20:02:09 +02:00
Sergei Trofimovich
3b23faa5d1 syntax: python: keywords update (patch by NNemec) fixes #216
NNemec> updated list of keywords in python.syntax from ancient to 2.6

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-01-29 20:01:34 +02:00
Slava Zanko
6a26036bac Merge branch '133_ac_prereq' into mc-4.6
* 133_ac_prereq:
  AC_USE_SYSTEM_EXTENSIONS macro requires autoconf >= 2.60
2009-01-29 14:38:56 +02:00
Slava Zanko
987a1890bb AC_USE_SYSTEM_EXTENSIONS macro requires autoconf >= 2.60
Thanks to andrey_b for issue.
2009-01-29 11:12:29 +02:00
Patrick Winnertz
e624bd18cb Merge branch 'mc-4.6' of ssh://midnight-commander.org:2222/git/mc into mc-4.6 2009-01-29 10:01:36 +01:00
Patrick Winnertz
360be65d2b po/ru.po: In russian translation, there are some hotkey conficts in menu.
This is a cherry-pick of 1150007bff from master.
It's unclear for me why Milestone 4.6.2 was set but this change wasn't merged into mc-4.6.

Conflicts:

	po/ChangeLog
2009-01-29 07:34:27 +01:00
Sergei Trofimovich
1da3919eb1 ChangeLog/NEWS: added entry for #181 ticket (copy to deleted dir)
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-01-29 01:34:17 +02:00
Patrick Winnertz
66c9fde141 Now a trailing slash will only be added in copy & move dialogs if the path itselfs
doesn't already have a trailing slash.

Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-01-28 23:54:04 +01:00
Sergei Trofimovich
689164a6bc copy/move dialog: add trailing '/' to default destination path (fix #181)
Problem:
  When user tried to copy/move file (F5/F6) - he could run into trouble if
  destination directory is removed (it can be removed by user from another mc session).
  Operation is performed and(!) file is renamed.
  So when when user issues 'cp /tmp/a.file /tmp/b' - he gets not expected /tmp/b/a.file,
  but /tmp.b !

Solution:
  Add trailing space for destination directory for non-local copy/move(F5/F6) operations.
  So operation, given above will take form: 'cp /tmp/a.file /tmp/b/' disambiguating b
  meaning.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-01-28 23:31:39 +02:00
Sergei Trofimovich
c825c379c4 fish: cleanup: unboxed quoted strings when generate shell commands
Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2009-01-28 10:29:18 +02:00
Patrick Winnertz
bef72946fd Merge branch 'mc-4.6' of ssh://midnight-commander.org:2222/git/mc into mc-4.6 2009-01-27 22:55:40 +01:00
Patrick Winnertz
77d2839de5 Merge branch '203_keypad_putty' into mc-4.6 2009-01-27 22:55:16 +01:00
Enrico Weigelt, metux IT service
90763ba82f introduced new type SHELL_ESCAPED_STR for more type safety 2009-01-27 22:27:06 +01:00
Enrico Weigelt, metux IT service
2f6f6af425 fixed comments to /* ... */ 2009-01-27 22:04:12 +01:00
Enrico Weigelt, metux IT service
6674647676 added mhl/types.h which defines bool enum, escape.h now using this type 2009-01-27 21:53:41 +01:00
Patrick Winnertz
8b593e8398 Removed unused variable 2009-01-27 21:33:04 +01:00
Slava Zanko
38537ddd04 Changes for use MHL.
mhl/escape.h:
    add new function mhl_shell_is_char_escaped()

src/command.c; src/complete.c; src/file.c; src/util.c:
    Changes for use MHL-functions.

src/util.h:
    remove old escape-related declarations of functions
2009-01-27 10:20:35 +02:00
Slava Zanko
dbbd127e44 Merge branch '147_escaping' of ssh://www.midnight-commander.org:2222/git/mc into 147_escaping
* '147_escaping' of ssh://www.midnight-commander.org:2222/git/mc: (38 commits)
  Fixed bug with renamig/copying files with backshashes in names
  Remove some testing stuff
  Temporarry commit. Fixed completion in browse by directoryes.
  Fixed some memory leaks.
  Add $ and ` for escaping and reorder it according to the ascii values
  Rewrite it to use g_string_append_c instead of some homebrew stuff
  Fix escaping functions to also escape the leading whitespace
  Original patch as attached on the bugreport
  Add $ and ` for escaping and reorder it according to the ascii values
  Rewrite it to use g_string_append_c instead of some homebrew stuff
  Fix escaping functions to also escape the leading whitespace
  Original patch as attached on the bugreport
  Some minor fixes to the german locale
  Unfuzzied one more german string
  Some more fuzzy translations reviewed
  Reedited de.po with poedit.. Added some more translations and restructured the rest
  Add changelog entry about this change, as everything we do should be documented there
  Add some minor fixes concerning spelling issues
  ...
  po/de.po: some minor changes
  ...
2009-01-27 10:15:09 +02:00
Patrick Winnertz
3dd8716646 Not only comment it out but removing it 2009-01-26 21:51:40 +01:00
Patrick Winnertz
89d3cbddd2 Removed unneeded var to make build process a bit cleaner 2009-01-26 21:29:25 +01:00
Slava Zanko
e58df8d75d Fixed bug with renamig/copying files with backshashes in names
* src/util.c: implementation of new function is_escaped_string
* src/util.h: declaration of new function is_escaped_string
* src/file.c: fix o bug :)
2009-01-26 19:35:41 +01:00
Slava Zanko
de672de740 Remove some testing stuff 2009-01-26 19:35:41 +01:00