Commit Graph

7824 Commits

Author SHA1 Message Date
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
9fd798845d Merge branch 'mc-4.6' 2009-02-01 13:47:22 +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
df4129517b Merge branch 'mc-4.6'
* mc-4.6: (38 commits)
  mhl: mhl_shell_unescape_buf(): fixed memory array OOB.
  completion: fixed complete already escaped secuences.
  completion: added changelog entry for solved #147
  completion: fixed completion of escaped commands in commandline
  Removed unused char*.
  mhl: added mhl_strmove() function (memmove semantics)
  completion: added escapes in command line on completion
  complete: cleanup: #define to enum INPUT_COMPLETION_FLAGS
  added a new parameter for completion flags to input_new
  fish: cleanup: unboxed quoted strings when generate shell commands
  introduced new type SHELL_ESCAPED_STR for more type safety
  added mhl/types.h which defines bool enum, escape.h now using this type
  Removed unused variable
  Changes for use MHL.
  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
  ...
2009-02-01 14:26:54 +02: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
Enrico Weigelt, metux IT service
f235b1976e replaced GString stuff by static buffers 2009-01-31 21:55:51 +01: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
a1b47185c9 manually merged 118_port_number_in_shell_link 2009-01-31 19:29:15 +01:00
Enrico Weigelt, metux IT service
a73bd631e5 added missing changelog entry 2009-01-31 19:13:48 +01:00
Enrico Weigelt, metux IT service
5f77615b35 Merge commit 'origin/mc-4.6' 2009-01-31 18:20:54 +01: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
b407c65b74 manually merged mc-4.6 2009-01-31 06:34:40 +01:00
Enrico Weigelt, metux IT service
f921cc40cd replaced calls to g_strdup() by mhl_str_dup() 2009-01-30 20:10:40 +01:00
Enrico Weigelt, metux IT service
15d7d47c15 replaced g_free() by mhl_mem_free() 2009-01-30 19:28:35 +01:00
Enrico Weigelt, metux IT service
d6a438dc17 added vhdl syntax 2009-01-30 18:28:26 +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
Mikhail S. Pobolovets
8bc0e27a54 Update for OpenOffice and StarOffice viewer.
odt2txt is now used.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-01-29 21:00:35 +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
6c64add7c1 Merge branch 'mc-4.6'
* mc-4.6:
  changelog: added entry for python syntax
  syntax: python: keywords update (patch by NNemec) fixes #216
2009-01-29 20:05:03 +02: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
d5565fb678 Merge branch 'mc-4.6'
* mc-4.6:
  AC_USE_SYSTEM_EXTENSIONS macro requires autoconf >= 2.60
  po/ru.po: In russian translation, there are some hotkey conficts in menu.
2009-01-29 14:42:51 +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
Mikhail S. Pobolovets
9ae2b8a518 ChangeLog: fix of forgotten changes
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-01-29 09:05:05 +02: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
9175c6babd Merge branch 'mc-4.6'
* mc-4.6:
  ChangeLog/NEWS: added entry for #181 ticket (copy to deleted dir)
2009-01-29 01:34:33 +02: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
Sergei Trofimovich
abc295cee2 Merge branch 'mc-4.6'
* mc-4.6:
  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)
2009-01-29 01:12:09 +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
cad6ffd2bb Merge branch 'mc-4.6' 2009-01-27 23:03:06 +01: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
e34e748666 Merge commit 'origin/mc-4.6' 2009-01-27 22:53:12 +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