Commit Graph

7723 Commits

Author SHA1 Message Date
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
Slava Zanko
67751bc144 Temporarry commit. Fixed completion in browse by directoryes.
Not fixed completion by commands (fail if command in $PATH contain space)
2009-01-26 19:35:40 +01:00
Slava Zanko
e4630afebe Fixed some memory leaks.
Added DOXYGEN-like description to new functions.
2009-01-26 19:35:40 +01:00
Patrick Winnertz
25125440a4 Add $ and ` for escaping and reorder it according to the ascii values 2009-01-26 19:35:40 +01:00
Patrick Winnertz
2bce868a9b Rewrite it to use g_string_append_c instead of some homebrew stuff 2009-01-26 19:35:40 +01:00
Patrick Winnertz
4c18892d94 Fix escaping functions to also escape the leading whitespace 2009-01-26 19:35:40 +01:00
Patrick Winnertz
b0e39cc68d Original patch as attached on the bugreport 2009-01-26 19:35:40 +01:00
Patrick Winnertz
d731741110 Add $ and ` for escaping and reorder it according to the ascii values 2009-01-26 19:35:40 +01:00
Patrick Winnertz
01089a4380 Rewrite it to use g_string_append_c instead of some homebrew stuff 2009-01-26 19:35:40 +01:00
Patrick Winnertz
e7a0892fd1 Fix escaping functions to also escape the leading whitespace 2009-01-26 19:35:40 +01:00
Patrick Winnertz
5041bd41f6 Original patch as attached on the bugreport 2009-01-26 19:35:40 +01:00
Patrick Winnertz
d79dfa1324 Some minor fixes to the german locale 2009-01-26 19:11:29 +01:00
Patrick Winnertz
17c0e75e62 Unfuzzied one more german string 2009-01-26 17:54:21 +01:00
Patrick Winnertz
a740f8ed7b Some more fuzzy translations reviewed 2009-01-26 17:54:21 +01:00
Patrick Winnertz
6753c71e23 Reedited de.po with poedit.. Added some more translations and restructured the rest 2009-01-26 17:54:20 +01:00
Patrick Winnertz
0d35576a6d Add changelog entry about this change, as everything we do should be documented there 2009-01-26 17:54:20 +01:00
Patrick Winnertz
984d97fdf5 Add some minor fixes concerning spelling issues 2009-01-26 17:53:38 +01:00
Enrico Weigelt, metux IT service
fae850368d ... 2009-01-26 17:53:38 +01:00
Enrico Weigelt, metux IT service
4118f13d89 po/de.po: some minor changes 2009-01-26 17:53:38 +01:00