Re: Release out experimental release mc-5.0
Hi Slava, On Wed, Mar 31, 2010 at 11:56:42PM +0300, Slava Zanko wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, Release out experimental release 5.0 Download page: http://www.midnight-commander.org/downloads Whats new: http://www.midnight-commander.org/wiki#EXPERIMENTALrelease5.0 Download test, please. I'm sure we need to backport some essential features of the new mc-5.0 to older branches. Or alternatively obsolete the 4.* branch completely by mc-5.0! It is so awesome :) Thanks! Jindrich - -- WBR, dev-team. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEQEARECAAYFAkuztwUACgkQb3oGR6aVLprtyQCdGqFPK7qZQB1Shhq41tmi4ati 7n0AkPXDoMlpOfUvWaarTmb3HLOeIw== =rYHB -END PGP SIGNATURE- ___ Mc mailing list http://mail.gnome.org/mailman/listinfo/mc -- Jindrich Novy jn...@redhat.com http://people.redhat.com/jnovy/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[PATCH] subshell prompt printing fix
Hi, I've been stumbling around this problem for a long time so I finally decided to fix it. Bug 1: 1. Have a mc running where you have two different directories in each panel. 2. Tab, so that you are in the other panel. 3. Ctrl-O to go to subshell. 4. You see two different prompts printed next to each other. Bug 2: 1. Have a mc running where you have two different directories in each panel. 2. Tab, so that you are in the other panel. 3. Tab, so that you are back. 4. Ctrl-O to go to subshell. 5. You see two same prompts printed next to each other - no prompt printing is desired in this case. The attached patch fixes both these bugs. The first one completely. The second one is worked around in the way that the new prompt is printed on the new line so that the subshell doesn't get messed up. The question is whether to use Slang calls to reprint the subshell prompt so that the new line isn't needed to be printed since the old prompt can be overwritten. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED] http://people.redhat.com/jnovy/ --- mc-2007-06-04-22/src/main.c.prompt 2007-06-12 15:23:25.0 +0200 +++ mc-2007-06-04-22/src/main.c 2007-06-12 15:45:08.0 +0200 @@ -453,9 +453,16 @@ do_possible_cd (const char *new_dir) void do_update_prompt (void) { +static char *old_subshell_prompt = NULL; + if (update_prompt) { - printf (%s, subshell_prompt); - fflush (stdout); + if (old_subshell_prompt == NULL + || strcmp (old_subshell_prompt, subshell_prompt)) { + g_free (old_subshell_prompt); + old_subshell_prompt = g_strdup (subshell_prompt); + printf (\r\n%s, subshell_prompt); + fflush (stdout); + } update_prompt = 0; } } ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: mc and utf8
Hi Egmont, Rostislav, mc-devel, On Wed, 2007-04-11 at 18:22 +0200, Egmont Koblinger wrote: Hi, I'm very glad to hear that there's going to be some work on it! My work leader is author of the original utf-8 patch for mc. Oh my God... Who is he? (Just for curiosity.) There were lots of names: Jakub Jelinek, Vladimir Nadvornik, Jindrich Novy - AFAIK they're all involved in the current UTF-8 patches. Yes of course, Rostislav came to me with a great interest in UTF8ization of mc and wanted me to supervise his bachelor's thesis in this field and I'm very happy because of that. I have never claimed I'm the only original author of the UTF-8 patch. The misunderstanding most likely came from our discussion about downstream patches in the Red Hat mc branch, where we have more of UTF-8 related patches, some of them written by me in addition to the main UTF-8 patch where many people were involved. Thanks for good pointers for Rostislav and I'm also joining wishing good luck in his upcoming work! Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: yet another utf8 patch: fix completion
Hi Egmont, On Tue, 2007-01-02 at 18:14 +0100, Egmont Koblinger wrote: Hi, Especially to the maintainers of the UTF-8 patches: I've created another patch, this time to fix Alt+Tab (or Escape then TAB) completion when the command line or filename or whatever you type already contains some accented characters. The problem is caused by the UI widget telling the cursor position in characters, while the functions in complete.c expect them to refer to bytes. This new patch can be found at the usual places: https://svn.uhulinux.hu/packages/2.0/mc/patches/ https://svn.uhulinux.hu/packages/dev/mc/patches/ and is called 00-84-utf8-complete.patch. As usual, unfortunately, length and width are not clearly distinguished, so it's unlikely to work correctly with double-width characters. To be applied on the top of the previous utf8 patches in numerical order (though it doesn't depend on all of them). Just a question related to 00-84-utf8-complete.patch. Why do you replace if (SLsmg_Is_Unicode) with if (1) in the implementation of mbstrnlen() ? Will it work when mc is compiled with UTF-8 patches and ran with non-UTF-8 locale? Thanks, Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] mc crashes when temporary directory cannot be created
Hi Pavel, On Sat, 2006-12-30 at 20:51 +0200, Pavel Tsekov wrote: There is an even simpler cure. In mc_tmpdir() when executing the fallback code pass an absolute path to mc_mkstemps(). This will prevent the loop. However I am not yet conviced that this is the best solution. I am still investigating. I am attaching a patch which passes an absolute path to mc_mkstemps() when invoked from mc_tmpdir(). What do you think about this fix ? I may add a comment why it is necessary to call mc_mkstemps() with an absolute path. By the way I think we should add a check whether the environment variable TMPDIR contains an absolute path. Anyway, I'll leave this for another patch. Thanks for the patch. Do you plan to convert the relative paths to absolute ones when detected? Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] mc crashes when temporary directory cannot be created
Hi Pavel, On Tue, 2007-01-02 at 16:28 +0200, Pavel Tsekov wrote: On Tue, 2 Jan 2007, Jindrich Novy wrote: On Sat, 2006-12-30 at 20:51 +0200, Pavel Tsekov wrote: There is an even simpler cure. In mc_tmpdir() when executing the fallback code pass an absolute path to mc_mkstemps(). This will prevent the loop. However I am not yet conviced that this is the best solution. I am still investigating. I am attaching a patch which passes an absolute path to mc_mkstemps() when invoked from mc_tmpdir(). What do you think about this fix ? I may add a comment why it is necessary to call mc_mkstemps() with an absolute path. By the way I think we should add a check whether the environment variable TMPDIR contains an absolute path. Anyway, I'll leave this for another patch. Thanks for the patch. Do you plan to convert the relative paths to absolute ones when detected? I think TMPDIR should be ignored in this case. What's your opinion ? So some hardcoded value such as /tmp will then be assumed in case of relative path in TMPDIR? Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] mc crashes when temporary directory cannot be created
Hi Pavel, On Tue, 2007-01-02 at 16:48 +0200, Pavel Tsekov wrote: On Tue, 2 Jan 2007, Jindrich Novy wrote: On Tue, 2007-01-02 at 16:28 +0200, Pavel Tsekov wrote: On Tue, 2 Jan 2007, Jindrich Novy wrote: On Sat, 2006-12-30 at 20:51 +0200, Pavel Tsekov wrote: There is an even simpler cure. In mc_tmpdir() when executing the fallback code pass an absolute path to mc_mkstemps(). This will prevent the loop. However I am not yet conviced that this is the best solution. I am still investigating. I am attaching a patch which passes an absolute path to mc_mkstemps() when invoked from mc_tmpdir(). What do you think about this fix ? I may add a comment why it is necessary to call mc_mkstemps() with an absolute path. By the way I think we should add a check whether the environment variable TMPDIR contains an absolute path. Anyway, I'll leave this for another patch. Thanks for the patch. Do you plan to convert the relative paths to absolute ones when detected? I think TMPDIR should be ignored in this case. What's your opinion ? So some hardcoded value such as /tmp will then be assumed in case of relative path in TMPDIR? Yep. It already is: sys_tmp = getenv (TMPDIR); if (!sys_tmp) { sys_tmp = TMPDIR_DEFAULT; } It sounds good for me then ;-) Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] mc crashes when temporary directory cannot be created
Hi Leonard, On Wed, 2006-11-29 at 20:59 +0100, Leonard den Ottolander wrote: Hello Jindrich, On Tue, 2006-11-28 at 13:21 +0100, Jindrich Novy wrote: IMO only removal of the fallback will prevent the infinite loop in any case as it shouldn't call mc_mkstemps() at all. That cure seems worse than the disease. Isn't the real problem the fact that mc_mkstemps() blindly concats tmpdir to the prefix instead of testing if mc_tmpdir() succeeded? Why not abort mc_mkstemps() if mc_tmpdir() returns /dev/null/? I'm not quite sure I got the point. We may want to prevent infinite loops caused by the subsequent function calls, such design is dangerous by design. The fallback will never work without adding hacks to mc_mktemps()/mc_tmpdir() to check for special arguments what doesn't look too nice to me. Considering that insufficient space in TMPDIR is very rare, I would vote for removing the dangerous fallback completely what is done in the previous patch. mc works fine after that even without the fallback. What about the attached (untested) patch? $ TMPDIR=/dev/null mc Cannot create temporary directory /dev/null/mc-jnovy: Not a directory (20) Cannot create temporary directory /dev/null/mc-jnovy: Not a directory (20) snip Cannot create temporary directory /dev/null/mc-jnovy: Not a directory (20) Cannot create temporary directory /dev/null/mc-jnovy: Not a directory (20) Segmentation fault By the way, could you please add the -p option to your diffs? Sure. Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] mc crashes when temporary directory cannot be created
Hi Pavel, On Mon, 2006-11-27 at 17:37 +0200, Pavel Tsekov wrote: Hello Jindrich, On Mon, 27 Nov 2006, Jindrich Novy wrote: there is a breakage in util.c and utilunix.c related to temporary files creation. The problem is that if a directory for temporary files cannot be created mc ends up in infinite loop caused by: tmpbase = concat_dir_and_file (mc_tmpdir (), prefix); in mc_mkstemps() which then calls mc_tmpdir() back infinitely and ends up in a stack underflow. The attached patch fixes it as it disables the creation of the temporary files when the temp. directory couldn't be created. Ok. But... what happens if any of the following error conditions occur ? if (lstat (buffer, st) == 0) { /* Sanity check for existing directory */ if (!S_ISDIR (st.st_mode)) error = _(%s is not a directory\n); else if (st.st_uid != getuid ()) error = _(Directory %s is not owned by you\n); else if (((st.st_mode 0777) != 0700) (chmod (buffer, 0700) != 0)) error = _(Cannot set correct permissions for directory %s\n); } else { Wouldn't it cause the same loop as when mkdir() fails ? Good point, I missed that. IMO only removal of the fallback will prevent the infinite loop in any case as it shouldn't call mc_mkstemps() at all. I'm sending patch for it. Thoughts? Jindrich --- mc-2006-11-14-16/src/utilunix.c.tmpcrash 2005-07-27 17:03:25.0 +0200 +++ mc-2006-11-14-16/src/utilunix.c 2006-11-28 13:12:36.0 +0100 @@ -283,34 +283,11 @@ if (!error) { tmpdir = buffer; } else { - int test_fd; - char *test_fn; - int fallback_ok = 0; - if (*error) fprintf (stderr, error, buffer); - /* Test if sys_tmp is suitable for temporary files */ - tmpdir = sys_tmp; - test_fd = mc_mkstemps (test_fn, mctest, NULL); - if (test_fd != -1) { - close (test_fd); - test_fd = open (test_fn, O_RDONLY); - if (test_fd != -1) { - close (test_fd); - unlink (test_fn); - fallback_ok = 1; - } - } - - if (fallback_ok) { - fprintf (stderr, _(Temporary files will be created in %s\n), - sys_tmp); - error = NULL; - } else { - fprintf (stderr, _(Temporary files will not be created\n)); - tmpdir = /dev/null/; - } + fprintf (stderr, _(Temporary files will not be created\n)); + tmpdir = /dev/null/; fprintf (stderr, %s\n, _(Press any key to continue...)); getc (stdin); ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[PATCH] mc crashes when temporary directory cannot be created
Hi all, there is a breakage in util.c and utilunix.c related to temporary files creation. The problem is that if a directory for temporary files cannot be created mc ends up in infinite loop caused by: tmpbase = concat_dir_and_file (mc_tmpdir (), prefix); in mc_mkstemps() which then calls mc_tmpdir() back infinitely and ends up in a stack underflow. The attached patch fixes it as it disables the creation of the temporary files when the temp. directory couldn't be created. Cheers, Jindrich --- mc-2006-11-14-16/src/utilunix.c.tmpcrash 2005-07-27 17:03:25.0 +0200 +++ mc-2006-11-14-16/src/utilunix.c 2006-11-27 10:32:54.0 +0100 @@ -274,9 +274,12 @@ /* Need to create directory */ if (mkdir (buffer, S_IRWXU) != 0) { fprintf (stderr, - _(Cannot create temporary directory %s: %s\n), - buffer, unix_error_string (errno)); - error = ; + _(Cannot create temporary directory %s: %s\n%s%s\n), + buffer, unix_error_string (errno), + _(Temporary files will not be created\n), + _(Press any key to continue...)); + getc (stdin); + return /dev/null/; } } ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[PATCH] FISH DoS when copying file with '`' in name to remote FS
Hi all, there's a problem when copying file named like file` to remote filesystem via FISH. It simply won't do anything because of error in BASH script which is generated in vfs/fish.c caused by the filename. Attached patch should fix it. References: http://bugzilla.redhat.com/214255 Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc/vfs/fish.c.fishfix 2006-11-08 19:23:12.0 +0100 +++ mc/vfs/fish.c 2006-11-08 19:21:49.0 +0100 @@ -532,40 +532,42 @@ n = fish_command (me, super, WAIT_REPLY, #STOR %lu /%s\n echo '### 001'\n + file=/%s\n res=`exec 31\n (\n head -c %lu -q - || echo DD 3\n ) 2/dev/null | (\n - cat /%s\n + cat \$file\\n cat /dev/null\n )`; [ \$res\ = DD ] {\n - /%s\n + \$file\\n rest=%lu\n while [ $rest -gt 0 ]\n do\n cnt=`expr \\( $rest + 255 \\) / 256`\n - n=`dd bs=256 count=$cnt | tee -a /%s | wc -c`\n + n=`dd bs=256 count=$cnt | tee -a \$file\ | wc -c`\n rest=`expr $rest - $n`\n done\n }; echo '### 200'\n, (unsigned long) s.st_size, name, - (unsigned long) s.st_size, quoted_name, - quoted_name, (unsigned long) s.st_size, quoted_name); + quoted_name, (unsigned long) s.st_size, + (unsigned long) s.st_size); else n = fish_command (me, super, WAIT_REPLY, #STOR %lu /%s\n echo '### 001'\n {\n + file=/%s\n rest=%lu\n while [ $rest -gt 0 ]\n do\n cnt=`expr \\( $rest + 255 \\) / 256`\n - n=`dd bs=256 count=$cnt | tee -a /%s | wc -c`\n + n=`dd bs=256 count=$cnt | tee -a \$file\ | wc -c`\n rest=`expr $rest - $n`\n done\n }; echo '### 200'\n, (unsigned long) s.st_size, name, - (unsigned long) s.st_size, quoted_name); + quoted_name, (unsigned long) s.st_size); g_free (quoted_name); if (n != PRELIM) { ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] RPM vfs ignores conflicts
Hi Leonard, On Tue, 2006-10-31 at 20:44 +0100, Leonard den Ottolander wrote: Hi Jindrich, On Tue, 2006-10-31 at 16:07 +0100, Jindrich Novy wrote: the current RPM vfs allows to see RPM package requires/provides and obsoletes but lacks an implementation of conflicts. The attached patch adds INFO/CONFLICTS to the RPM vfs so that conflicts are no more hidden. While you're at it, could you provide a similar patch for rpms please? sure :) here we go with the patched trpm vfs as well. rpms fortunately doesn't need any changes. Cheers, Jindrich --- mc/vfs/extfs/rpm.rpmconf 2006-08-01 23:03:18.0 +0200 +++ mc/vfs/extfs/rpm 2006-10-31 12:54:41.0 +0100 @@ -122,12 +122,15 @@ echo $FILEPREF 0 $DATE INFO/OBSOLETES $RPM -qp --qf [%{PROVIDES}\n] $f | grep (none) /dev/null || echo $FILEPREF 0 $DATE INFO/PROVIDES +$RPM -qp --qf [%{CONFLICTS}\n] $f | grep (none) /dev/null || + echo $FILEPREF 0 $DATE INFO/CONFLICTS test `$RPM -qp --qf \%{CHANGELOGTEXT}\ \$f\` = (none) || echo $FILEPREF 0 $DATE INFO/CHANGELOG else echo $FILEPREF 0 $DATE INFO/REQUIRENAME echo $FILEPREF 0 $DATE INFO/OBSOLETES echo $FILEPREF 0 $DATE INFO/PROVIDES + echo $FILEPREF 0 $DATE INFO/CONFLICTS echo $FILEPREF 0 $DATE INFO/CHANGELOG fi @@ -171,6 +174,7 @@ INFO/CHANGELOG) $RPM -qp --qf [* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]\n $f $3; exit 0;; INFO/SIZE) $RPM -qp --qf %{SIZE} bytes\n $f $3; exit 0;; INFO/OBSOLETES) $RPM -qp --qf [%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n] $f $3; exit 0;; + INFO/CONFLICTS) $RPM -qp --qf [%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n] $f $3; exit 0;; CONTENTS.cpio) $RPM2CPIO $1 $3; exit 0;; *) ;; --- mc/vfs/extfs/trpm.rpmconf 2006-08-01 23:03:18.0 +0200 +++ mc/vfs/extfs/trpm 2006-11-01 09:45:42.0 +0100 @@ -112,12 +112,15 @@ echo $FILEPREF 0 $DATE INFO/OBSOLETES $RPM -q --qf [%{PROVIDES}\n] -- $1 | grep (none) /dev/null || echo $FILEPREF 0 $DATE INFO/PROVIDES +$RPM -q --qf [%{CONFLICTS}\n] -- $1 | grep (none) /dev/null || + echo $FILEPREF 0 $DATE INFO/CONFLICTS test `$RPM -q --qf \%{CHANGELOGTEXT}\ -- $1` = (none) || echo $FILEPREF 0 $DATE INFO/CHANGELOG else echo $FILEPREF 0 $DATE INFO/REQUIRENAME echo $FILEPREF 0 $DATE INFO/OBSOLETES echo $FILEPREF 0 $DATE INFO/PROVIDES + echo $FILEPREF 0 $DATE INFO/CONFLICTS echo $FILEPREF 0 $DATE INFO/CHANGELOG fi @@ -148,6 +151,7 @@ INFO/REQUIRENAME) $RPM -q --qf [%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n] -- $1 $3; exit 0;; INFO/OBSOLETES) $RPM -q --qf [%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n] -- $1 $3; exit 0;; INFO/PROVIDES) $RPM -q --qf [%{PROVIDES}\n] -- $1 $3; exit 0;; + INFO/CONFLICTS) $RPM -q --qf [%{CONFLICTS}\n] -- $1 $3; exit 0;; INFO/SCRIPTS/PREIN) $RPM -q --qf %{RPMTAG_PREIN}\n -- $1 $3; exit 0;; INFO/SCRIPTS/POSTIN) $RPM -q --qf %{RPMTAG_POSTIN}\n -- $1 $3; exit 0;; INFO/SCRIPTS/PREUN) $RPM -q --qf %{RPMTAG_PREUN}\n -- $1 $3; exit 0;; ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[PATCH] RPM vfs ignores conflicts
Hi all, the current RPM vfs allows to see RPM package requires/provides and obsoletes but lacks an implementation of conflicts. The attached patch adds INFO/CONFLICTS to the RPM vfs so that conflicts are no more hidden. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc/vfs/extfs/rpm.rpmconf 2006-08-01 23:03:18.0 +0200 +++ mc/vfs/extfs/rpm 2006-10-31 12:54:41.0 +0100 @@ -122,12 +122,15 @@ echo $FILEPREF 0 $DATE INFO/OBSOLETES $RPM -qp --qf [%{PROVIDES}\n] $f | grep (none) /dev/null || echo $FILEPREF 0 $DATE INFO/PROVIDES +$RPM -qp --qf [%{CONFLICTS}\n] $f | grep (none) /dev/null || + echo $FILEPREF 0 $DATE INFO/CONFLICTS test `$RPM -qp --qf \%{CHANGELOGTEXT}\ \$f\` = (none) || echo $FILEPREF 0 $DATE INFO/CHANGELOG else echo $FILEPREF 0 $DATE INFO/REQUIRENAME echo $FILEPREF 0 $DATE INFO/OBSOLETES echo $FILEPREF 0 $DATE INFO/PROVIDES + echo $FILEPREF 0 $DATE INFO/CONFLICTS echo $FILEPREF 0 $DATE INFO/CHANGELOG fi @@ -171,6 +174,7 @@ INFO/CHANGELOG) $RPM -qp --qf [* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]\n $f $3; exit 0;; INFO/SIZE) $RPM -qp --qf %{SIZE} bytes\n $f $3; exit 0;; INFO/OBSOLETES) $RPM -qp --qf [%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n] $f $3; exit 0;; + INFO/CONFLICTS) $RPM -qp --qf [%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n] $f $3; exit 0;; CONTENTS.cpio) $RPM2CPIO $1 $3; exit 0;; *) ;; ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: incorrect hex number in editor
On Tue, 2006-09-05 at 13:33 +0300, Nerijus Baliunas wrote: But it should either show correct hex codes or correct UTF-8 letters, which it does not. BTW, I am not using UTF-8 locale. This is quite important since I assume that you use UTF-8 locale which is default in Fedora. In that case I understand I was unable to reproduce your problem. Which locale do you use? Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: incorrect hex number in editor [patch]
On Tue, 2006-09-05 at 13:47 +0200, Egmont Koblinger wrote: Here you are. Apply it after the big utf8 patch. Ah, I see I came a bit late :) Thanks for the patch Egmont. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: incorrect hex number in editor
Hi Nerijus, this doesn't happen in the rawhide mc-4.6.1-25.fc6 which contains the mc-2006-08-12-18.tar.gz snapshot. I'll sync both the versions and release FC5 update to fix it. Jindrich On Fri, 2006-09-01 at 02:17 +0300, Nerijus Baliunas wrote: Hello, attached file is 0xC3 0xBC 0xC5 0xAB (you can check with any hex editor or mc viewer in hex mode), but editor shows it (in the last column of the first line) as 0x106 0xBC 0xC5 0xAB. Latest mc from FC5 (2006-06-30-18). Regards, Nerijus ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[PATCH] assembler.syntax doesn't highlight AMD64 registers
Hi, I noticed that assembler.syntax doesn't highlight AMD64 registers while editing some assembly files. Patch is attached. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc/syntax/assembler.syntax.jn 2005-09-06 22:36:24.0 +0200 +++ mc/syntax/assembler.syntax 2006-08-23 13:24:56.0 +0200 @@ -248,6 +248,58 @@ keyword whole TR0 magenta keyword whole TR1 magenta +# Generic AMD64 registers set +keyword whole rax brightmagenta +keyword whole rbx brightmagenta +keyword whole rcx brightmagenta +keyword whole rdx brightmagenta +keyword whole rsi brightmagenta +keyword whole rdi brightmagenta +keyword whole rbp brightmagenta +keyword whole rsp brightmagenta +keyword whole r8 brightmagenta +keyword whole r9 brightmagenta +keyword whole r10 brightmagenta +keyword whole r11 brightmagenta +keyword whole r12 brightmagenta +keyword whole r13 brightmagenta +keyword whole r14 brightmagenta +keyword whole r15 brightmagenta + +keyword whole %rax brightmagenta +keyword whole %rbx brightmagenta +keyword whole %rcx brightmagenta +keyword whole %rdx brightmagenta +keyword whole %rsi brightmagenta +keyword whole %rdi brightmagenta +keyword whole %rbp brightmagenta +keyword whole %rsp brightmagenta +keyword whole %r8 brightmagenta +keyword whole %r9 brightmagenta +keyword whole %r10 brightmagenta +keyword whole %r11 brightmagenta +keyword whole %r12 brightmagenta +keyword whole %r13 brightmagenta +keyword whole %r14 brightmagenta +keyword whole %r15 brightmagenta + +keyword whole RAX brightmagenta +keyword whole RBX brightmagenta +keyword whole RCX brightmagenta +keyword whole RDX brightmagenta +keyword whole RSI brightmagenta +keyword whole RDI brightmagenta +keyword whole RBP brightmagenta +keyword whole RSP brightmagenta +keyword whole R8 brightmagenta +keyword whole R9 brightmagenta +keyword whole R10 brightmagenta +keyword whole R11 brightmagenta +keyword whole R12 brightmagenta +keyword whole R13 brightmagenta +keyword whole R14 brightmagenta +keyword whole R15 brightmagenta + # FPU registers set keyword whole st0 brightcyan keyword whole st1 brightcyan ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [RFE] right-side scrollbar for mcedit
Hi mc-devel, looking more into widget.c I see that listbox_drawscroll(WListbox *l) is used for drawing scrollbars. I see it's rather single purpose function expecting that only listboxes should have scrollbars. Would you object to add a function like this: void vscrollbar (Widget widget, int height, int width, int tpad, int bpad, int selected, int count, gboolean color); to allow scrollbars to be added to a general widget? It could replace listbox_drawscroll() completely. To let listbox_draw() to use such function is an one-line fix. Jindrich On Mon, 2006-07-17 at 13:09 +0200, Jindrich Novy wrote: Hi mc-devel, I want to ask you for your opinion about one feature I would like to see in mcedit. I miss a vertical scrollbar on the right side of the mcedit to let me guess in which part of the file I actually am. It's not like we don't have this information at all as we can see the position precisely from the bar on top, but a vertical scrollbar is something visual that would help me to guess the position from the first look. The meaning of the numbers in the bar on top isn't too much intuitive, but still helpful to guess what line I'm at precisely as well as when I'm interested in file contents of the current position. I considered even the horizontal scrollbar on bottom to let me guess the starting position of the edited lines if the edited lines are too long to fit the screen, but a vertical scrollbar on the right side would suffice considering it wastes only one character from the mcedit window. Maybe that's a good feature for mcview as well. If you like this feature, I volunteer to implement a patch for that. (or, better to say, I'm actually working on it :-] ) Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: obsolete RPM tags highlighting
Hi Leonard, On Sat, 2006-07-15 at 13:11 +0200, Leonard den Ottolander wrote: And why should we allow the decapitalization of the a in BuildArch but not the B? Because buildArch or buildPreReq in spec looks just wrong? ;-) Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: obsolete RPM tags highlighting
Hi Andy, On Thu, 2006-07-13 at 17:22 +0300, Andy Shevchenko wrote: Jindrich Novy пишет: My $0.02 to specfile highliting. The mc shipped with FC4 doesn't handle correctly the case-insensivity tags. For example, BuildArch and Buildarch are highliting differently, but rpm recognize both. I guess the mainstream also has this issue. Here's the patch to fix it. Thanks for pointing this out. Jindrich --- mc/syntax/spec.syntax.case 2006-07-13 13:59:28.0 +0200 +++ mc/syntax/spec.syntax 2006-07-13 17:02:41.0 +0200 @@ -2,19 +2,19 @@ keyword whole Auto\{Pp\}rov: green keyword whole Auto\{Rr\}eq\{Pp\}rov: green keyword whole Auto\{Rr\}eq: green -keyword whole BuildArch: green -keyword whole BuildPre\{Rr\}eq: green +keyword whole Build\{Aa\}rch: green +keyword whole Build\{Pp\}re\{Rr\}eq: green keyword whole Build\{Rr\}oot: green -keyword whole BuildRequires: green +keyword whole Build\{Rr\}equires: green keyword whole Conflicts: green keyword whole Copyright: white keyword whole Description: green keyword whole Distribution: green keyword whole Doc\{Dd\}ir: green keyword whole Epoch: green -keyword whole ExcludeArch: green -keyword whole ExclusiveArch: green -keyword whole ExclusiveOS: green +keyword whole Exclude\{Aa\}rch: green +keyword whole Exclusive\{Aa\}rch: green +keyword whole Exclusive\{Oo\}\{Ss\}: green keyword whole Group: green keyword whole Group(\[abcdefghijklmnopqrstuvwxyz\]): green keyword whole Group(\[abcdefghijklmnopqrstuvwxyz\]_\[ABCDEFGHIJKLMNOPQRSTUVWXYZ\]): green @@ -38,8 +38,7 @@ keyword whole Summary(\[abcdefghijklmnopqrstuvwxyz\]_\[ABCDEFGHIJKLMNOPQRSTUVWXYZ\].\[ABCDEFGHIJKLMNOPQRSTUVWXYZ-1234567890\]): green keyword whole Vendor: green keyword whole Version: green -keyword whole URL: green -keyword whole Url: green +keyword whole U\{Rr\}\{Ll\}: green keyword whole linestart %build red keyword whole linestart %changelog red ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: obsolete RPM tags highlighting
Hi, On Fri, 2006-07-14 at 15:33 +0200, Leonard den Ottolander wrote: Hi, On Fri, 2006-07-14 at 09:24 +0200, Jindrich Novy wrote: On Thu, 2006-07-13 at 17:22 +0300, Andy Shevchenko wrote: Jindrich Novy пишет: My $0.02 to specfile highliting. The mc shipped with FC4 doesn't handle correctly the case-insensivity tags. For example, BuildArch and Buildarch are highliting differently, but rpm recognize both. Here's the patch to fix it. Thanks for pointing this out. Andy's examples were just that: Examples. A complete patch should allow any mixing of case for any spec keyword. For _example_: \{Gg\}\{Rr\}\{Oo\}\{Uu\}\{Pp\} Just fixing and committing a few arbitrary examples does not makes much sense imo. This is a joke, isn't it? Just imagine a nice spec like this: SuMmArY: Programs for backing up and restoring ext2/ext3 filesystems nAMe: dump veRSioN: 0.4b41 I really think that the highlighting rules for spec should be limited to some set of commonly used tags. At least the first capital letter should be mandatory upper-case and some case sensitivity fix-ups should be made for tags composed from multiple words as Andy pointed out. Otherwise specs written using mcedit would be a big mess IMO. Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: obsolete RPM tags highlighting
On Thu, 2006-07-13 at 14:08 +0200, Jindrich Novy wrote: Hi mc-devel, attaching a simple patch that highlights obsolete RPM tags with white color so that it helps the spec file editor to be better aware of the fact they are obsolete for several years and shouldn't be used. The patch was in the reversed order, attaching the correct one... Jindrich --- mc/syntax/spec.syntax.obsolete 2006-06-21 17:22:55.0 +0200 +++ mc/syntax/spec.syntax 2006-07-13 13:59:28.0 +0200 @@ -7,7 +7,7 @@ keyword whole Build\{Rr\}oot: green keyword whole BuildRequires: green keyword whole Conflicts: green -keyword whole Copyright: green +keyword whole Copyright: white keyword whole Description: green keyword whole Distribution: green keyword whole Doc\{Dd\}ir: green @@ -30,6 +30,7 @@ keyword whole Release: green keyword whole Requires: green keyword whole Root: green +keyword whole Serial: white keyword whole Source\[0123456789\]: green keyword whole Summary: green keyword whole Summary(\[abcdefghijklmnopqrstuvwxyz\]): green ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: obsolete RPM tags highlighting
Hi Andy, On Thu, 2006-07-13 at 17:22 +0300, Andy Shevchenko wrote: Jindrich Novy пишет: My $0.02 to specfile highliting. The mc shipped with FC4 doesn't handle correctly the case-insensivity tags. For example, BuildArch and Buildarch are highliting differently, but rpm recognize both. I guess the mainstream also has this issue. Yes, I noticed that and it also needs to be fixed. I'm going to write a patch for it as well. Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: obsolete RPM tags highlighting
Hi Pavel, On Thu, 2006-07-13 at 17:33 +0300, Pavel Tsekov wrote: On Thu, 13 Jul 2006, Jindrich Novy wrote: attaching a simple patch that highlights obsolete RPM tags with white color so that it helps the spec file editor to be better aware of the fact they are obsolete for several years and shouldn't be used. The patch was in the reversed order, attaching the correct one... Commited. Thanks. P.S. what happend to your patch which changed the location of the configuration files to /etc ? Would you mind modifying it as suggested ? Ah, almost forgot about that one. I need to reread the thread again so that I can modify the patch. Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[PATCH] segfault fix while formatting paragraph (alt-p)
Hi, there's a segfault while formatting a paragraph with alt-p. The next_word_start() in wordproc.c misses the upper boundary check. The attached patch fixes it. References/Reproducer: http://bugzilla.redhat.com/194562 Jindrich --- mc/edit/wordproc.c.jn 2005-05-27 05:35:12.0 +0200 +++ mc/edit/wordproc.c 2006-06-16 14:19:38.0 +0200 @@ -198,10 +198,10 @@ } static int -next_word_start (unsigned char *t, int q) +next_word_start (unsigned char *t, int q, int size) { int i; -for (i = q;; i++) { +for (i = q; i size; i++) { switch (t[i]) { case '\n': return -1; @@ -220,11 +220,11 @@ /* find the start of a word */ static int -word_start (unsigned char *t, int q) +word_start (unsigned char *t, int q, int size) { int i = q; if (t[q] == ' ' || t[q] == '\t') - return next_word_start (t, q); + return next_word_start (t, q, size); for (;;) { int c; if (!i) @@ -253,9 +253,9 @@ break; if (t[q] == '\n') break; - p = word_start (t, q); + p = word_start (t, q, size); if (p == -1) - q = next_word_start (t, q); /* Return the end of the word if the beginning + q = next_word_start (t, q, size); /* Return the end of the word if the beginning of the word is at the beginning of a line (i.e. a very long word) */ else ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
better [PATCH] segfault fix while formatting paragraph (alt-p)
Hi, after some refinement I'm sending a better patch that rewrites next_word_start() and fixes the segfault. Jindrich --- mc/edit/wordproc.c.jn 2005-05-27 05:35:12.0 +0200 +++ mc/edit/wordproc.c 2006-06-16 18:48:42.0 +0200 @@ -198,33 +198,25 @@ } static int -next_word_start (unsigned char *t, int q) +next_word_start (unsigned char *t, int q, int size) { int i; -for (i = q;; i++) { - switch (t[i]) { - case '\n': +for (i = q; isize; i++) { + if ( t[i] == '\n') return -1; - case '\t': - case ' ': - for (;; i++) { - if (t[i] == '\n') - return -1; - if (t[i] != ' ' t[i] != '\t') - return i; - } - break; - } + if ( t[i] != ' ' t[i] != '\t') + return i; } +return -1; } /* find the start of a word */ static int -word_start (unsigned char *t, int q) +word_start (unsigned char *t, int q, int size) { int i = q; if (t[q] == ' ' || t[q] == '\t') - return next_word_start (t, q); + return next_word_start (t, q, size); for (;;) { int c; if (!i) @@ -253,9 +245,9 @@ break; if (t[q] == '\n') break; - p = word_start (t, q); + p = word_start (t, q, size); if (p == -1) - q = next_word_start (t, q); /* Return the end of the word if the beginning + q = next_word_start (t, q, size); /* Return the end of the word if the beginning of the word is at the beginning of a line (i.e. a very long word) */ else ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: utf8 patch for mc, slang 2 version
Hi Leonard, On Sun, 2006-06-11 at 13:08 +0200, Leonard den Ottolander wrote: On Thu, 2006-06-08 at 20:13 +0200, Egmont Koblinger wrote: I've just upgraded to slang-2 in our distro and also updated the UTF-8 patches to mc-4.6.1 (based on SUSE's version). It was easier than I thought it would be. I was glad to see that you had applied plenty of my patches in SUSE (those named 00-*). Please take a look at here again: https://svn.uhulinux.hu/packages/dev/mc/patches/ 00-74, 00-78 patches were helpful for me as well, thanks Egmont. They are now applied in devel FC. Please take notice. It would probably be good if Vladimir and you could keep your UTF-8 patch sets in sync. It just seems wasted effort to do this in two places independently. Some inter-distro communication is not going to hurt. Maybe these patches should be centrally maintained in a contribs tree. The problem is that Vladimir and me use different versions of mc. My approach is to be more in sync with upstream so that there's a more recent CVS snapshot in Fedora for now because of a very rare release period of mc. This helps me to do only minimal changes when I want to send a patch to upstream. SuSE uses the stable mc-4.6.1, AFAIK. +1 for storing useful patches in contrib. It would be quite hard to keep them in sync with devel mc though. Cheers, Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: utf8 patch for mc, slang 2 version
Hi, On Wed, 2006-06-07 at 12:18 +0200, Vladimir Nadvornik wrote: On Saturday 12 November 2005 20:59, Leonard den Ottolander wrote: Hi Bart, list, On Tue, 2005-09-20 at 08:14 +1200, Bart Oldeman wrote: Basically you'd need to apply Fedora's patch, and then (sorry no proper patch here but it's not a big deal) Attached you'll find a proper patch. I've moved the hunk from global.h to myslang.h (and dropped the inclusion of slang.h as it is redundant). Jindrich, please merge this patch with the UTF8 patch. You might even consider to build the next mc for FC --with-screen=mcslang, as I see the FC development tree does not yet feature slang-2. slang-2.0.5 is used since FC5 so only FC4 now uses the old slang-1.4.9. Hi all, In non-UTF-8 mode slang2 behaves a bit different than the patched slang1. As a result, mc does work with 8bit encodings, like 8859-2 or KOI8. The attached patch fixes the SLsmg_write_nwchars() function to be fully compatible with the slang1 version and uses it consistently instead of SLsmg_write_char(). It should be applied on top of all the previous patches. Thanks for the patch. The last hunk didn't apply as there's no view_add_character used in editdraw.c. Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [RFE][PATCH] Display free space on device in panels
Hi Pavel, On Tue, 2006-05-30 at 14:56 +0300, Pavel Tsekov wrote: On Mon, 29 May 2006, Jindrich Novy wrote: On Fri, 2006-05-19 at 14:29 -0400, Pavel Roskin wrote: Can we avoid any highlighting? I think Far Manager does it right: http://red-bean.com/proski/mc/far.png Attaching the patch without highlighting. The main changes are that I moved the show_free_space() into main.c since screen.c lacks a header file and a call is needed from cmd.c to minimize frequency of gathering filesys info. The free space widget isn't displayed at all when browsing a non-local fs. Filesystem statistics are updated immediately when mc requests a reread (ctrl-r is pressed). Please review, some further mistakes are possible. Now, after I reviewed the patch for a second time I am pretty convinced that the free space info should be displayed in the mini status area and not on its upper frame i.e. as it is in FAR manager (what Pavel Rosking suggested). Yes, otherwise it would be too little space for cwd, especially for 80x25 terminals. MC tries to optimize the screen drawing by updating only certain parts of the screen (the directory contents, the mini status) when not otherwise necessary. Simply put MC doesn't update the whole screen when you go down one file in the panel, when you change a directory, etc. With the current patch you actually break that optimization by inserting a call to mini_info_separator() in show_dir() which is called each time you move through the file list for example. Ok, the only speed related optimization I see is to not to draw the free space widget every time the show_free_space() is called, but only in case when old_cwd and panel_cwd differs. The trick to force redraw when user presses ctrl-r by setting old_cwd to NULL will work then anyway. Your patch may be modified to so that it will work properly i.e. it wont break the optimization but it becomes ugly (codewise). It may be modified to be not so ugly by sacrificing the optimization a bit i.e. put a call to mini_info_separator () in panel_update_contents(). It also can be made to fit into the current scheme by making the free space info part of the mini status area. Did you do some profiling that it slows mc down significantly? I haven't seen a noticable delay, especially after show_free_space() doesn't draw the widget each time it's called. Now, there are some other small issues with the patch as-is: --- mc-4.6.1a/src/main.c.showfree 2006-05-29 12:41:36.0 +0200 +++ mc-4.6.1a/src/main.c 2006-05-29 13:04:50.0 +0200 @@ -402,6 +409,8 @@ int reload_other = !(force_update UP_ONLY_CURRENT); WPanel *panel; +show_free_space(current_panel); + update_one_panel (get_current_index (), force_update, current_file); if (reload_other) update_one_panel (get_other_index (), force_update, UP_KEEPSEL); This part is not necessary. And it will draw the free_space_info() even if there is no mini status (though you won't see it). show_free_space() checks whether free_space != 0 otherwise it won't draw anything. @@ -467,6 +476,37 @@ } } +void +show_free_space(WPanel *panel) +{ +struct stat st; This is not necessary as well as the code which fills it. Yes, I'll remove it. Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [RFE][PATCH] Display free space on device in panels
On Tue, 2006-05-30 at 11:36 +0300, Pavel Tsekov wrote: Please, do not send patches generated against UTF8-ized version of MC. Ah, done that again. Attaching the cleanly applicable variant then. Jindrich -- Jindrich Novy [EMAIL PROTECTED] --- mc/src/screen.c.orig 2006-02-08 11:10:37.0 +0100 +++ mc/src/screen.c 2006-05-30 13:09:46.0 +0200 @@ -47,7 +47,7 @@ #include widget.h #include menu.h /* menubar_visible */ #define WANT_WIDGETS -#include main.h /* the_menubar */ +#include main.h /* the_menubar, show_free_space() */ #include unixcompat.h #define ELEMENTS(arr) ( sizeof(arr) / sizeof((arr)[0]) ) @@ -761,6 +761,7 @@ hline ((slow_terminal ? '-' : ACS_HLINE) | NORMAL_COLOR, panel-widget.cols - 2); #endif/* !HAVE_SLANG */ +show_free_space (panel); } static void @@ -802,6 +803,8 @@ widget_move (panel-widget, 0, panel-widget.cols - 3); addstr (v); +mini_info_separator (panel); + if (panel-active) standend (); } --- mc/src/main.c.orig 2006-05-30 13:09:46.0 +0200 +++ mc/src/main.c 2006-05-30 13:09:46.0 +0200 @@ -60,6 +60,7 @@ #include listmode.h #include execute.h #include ext.h /* For flush_extension_file() */ +#include mountlist.h /* my_statfs */ /* Listbox for the command history feature */ #include widget.h @@ -230,6 +231,12 @@ /* We need to paint it after CONSOLE_RESTORE, see: load_prompt */ int update_prompt = 0; +/* Old current working directory for displaying free space */ +char *old_cwd = NULL; + +/* Used to figure out how many free space we have */ +struct my_statfs myfs_stats; + /* The home directory */ const char *home_dir = NULL; @@ -395,6 +402,8 @@ int reload_other = !(force_update UP_ONLY_CURRENT); WPanel *panel; +show_free_space(current_panel); + update_one_panel (get_current_index (), force_update, current_file); if (reload_other) update_one_panel (get_other_index (), force_update, UP_KEEPSEL); @@ -460,6 +469,37 @@ } } +void +show_free_space(WPanel *panel) +{ +struct stat st; + +/* Don't try to stat non-local fs */ +if (!vfs_file_is_local(panel-cwd) || !free_space) + return; + +if (old_cwd == NULL || strcmp(old_cwd, panel-cwd) != 0) { + init_my_statfs(); + g_free(old_cwd); + old_cwd = g_strdup(panel-cwd); + my_statfs (myfs_stats, panel-cwd); +} + +st = panel-dir.list [panel-selected].st; + +if (myfs_stats.avail 0 || myfs_stats.total 0) { + char buffer1 [6], buffer2[6], *tmp; + size_trunc_len (buffer1, 5, myfs_stats.avail, 1); + size_trunc_len (buffer2, 5, myfs_stats.total, 1); + tmp = g_strdup_printf (_(%s (%d%%) of %s), buffer1, myfs_stats.total 0 ? + (int)(100 * (double)myfs_stats.avail / myfs_stats.total) : 0, + buffer2); + widget_move (panel-widget, panel-widget.lines-3, panel-widget.cols-2-strlen(tmp)); + addstr (tmp); + g_free (tmp); +} +} + static int quit_cmd_internal (int quiet) { --- mc/src/setup.c.orig 2006-02-23 16:32:18.0 +0100 +++ mc/src/setup.c 2006-05-30 13:30:43.0 +0200 @@ -134,6 +134,7 @@ { show_mini_info, show_mini_info }, { permission_mode, permission_mode }, { filetype_mode, filetype_mode }, +{ free_space, free_space }, { 0, 0 } }; --- mc/src/main.h.orig 2006-02-03 18:07:39.0 +0100 +++ mc/src/main.h 2006-05-30 13:09:46.0 +0200 @@ -55,6 +55,7 @@ extern int show_all_if_ambiguous; extern int slow_terminal; extern int update_prompt; /* To comunicate with subshell */ +extern char *old_cwd; extern int safe_delete; extern int confirm_delete; extern int confirm_directory_hotlist_delete; @@ -100,6 +101,7 @@ int load_prompt (int, void *); void save_cwds_stat (void); void quiet_quit_cmd (void); /* For cmd.c and command.c */ +void show_free_space(WPanel *panel); void touch_bar (void); void update_xterm_title_path (void); --- mc/src/layout.c.orig 2006-02-28 17:15:21.0 +0100 +++ mc/src/layout.c 2006-05-30 13:10:03.0 +0200 @@ -99,6 +99,9 @@ /* Set to show current working dir in xterm window title */ int xterm_title = 1; +/* Set to show free space on device assigned to current directory */ +int free_space = 1; + /* The starting line for the output of the subprogram */ int output_start_y = 0; @@ -128,6 +131,7 @@ static int _keybar_visible; static int _message_visible; static int _xterm_title; +static int _free_space; static int _permission_mode; static int _filetype_mode; @@ -158,6 +162,7 @@ int*variable; WCheck *widget; } check_options [] = { +{ N_(show free spAce), free_space, 0 }, { N_(Xterm window title), xterm_title, 0 }, { N_(hIntbar visible), message_visible, 0 }, { N_(Keybar visible
Re: [RFE][PATCH] Display free space on device in panels
Hi Pavel and Pavel, On Fri, 2006-05-19 at 14:29 -0400, Pavel Roskin wrote: Can we avoid any highlighting? I think Far Manager does it right: http://red-bean.com/proski/mc/far.png Attaching the patch without highlighting. The main changes are that I moved the show_free_space() into main.c since screen.c lacks a header file and a call is needed from cmd.c to minimize frequency of gathering filesys info. The free space widget isn't displayed at all when browsing a non-local fs. Filesystem statistics are updated immediately when mc requests a reread (ctrl-r is pressed). Please review, some further mistakes are possible. Cheers, Jindrich --- mc-4.6.1a/src/setup.c.showfree 2006-02-23 16:32:18.0 +0100 +++ mc-4.6.1a/src/setup.c 2006-05-29 09:42:29.0 +0200 @@ -134,6 +134,7 @@ { show_mini_info, show_mini_info }, { permission_mode, permission_mode }, { filetype_mode, filetype_mode }, +{ free_space, free_space }, { 0, 0 } }; --- mc-4.6.1a/src/main.c.showfree 2006-05-29 12:41:36.0 +0200 +++ mc-4.6.1a/src/main.c 2006-05-29 13:04:50.0 +0200 @@ -61,6 +61,7 @@ #include listmode.h #include execute.h #include ext.h /* For flush_extension_file() */ +#include mountlist.h /* my_statfs */ /* Listbox for the command history feature */ #include widget.h @@ -231,6 +232,12 @@ /* We need to paint it after CONSOLE_RESTORE, see: load_prompt */ int update_prompt = 0; +/* Old current working directory for displaying free space */ +char *old_cwd = NULL; + +/* Used to figure out how many free space we have */ +struct my_statfs myfs_stats; + /* The home directory */ const char *home_dir = NULL; @@ -402,6 +409,8 @@ int reload_other = !(force_update UP_ONLY_CURRENT); WPanel *panel; +show_free_space(current_panel); + update_one_panel (get_current_index (), force_update, current_file); if (reload_other) update_one_panel (get_other_index (), force_update, UP_KEEPSEL); @@ -467,6 +476,37 @@ } } +void +show_free_space(WPanel *panel) +{ +struct stat st; + +/* Don't try to stat non-local fs */ +if (!vfs_file_is_local(panel-cwd) || !free_space) + return; + +if (old_cwd == NULL || strcmp(old_cwd, panel-cwd) != 0) { + init_my_statfs(); + g_free(old_cwd); + old_cwd = g_strdup(panel-cwd); + my_statfs (myfs_stats, panel-cwd); +} + +st = panel-dir.list [panel-selected].st; + +if (myfs_stats.avail 0 || myfs_stats.total 0) { + char buffer1 [6], buffer2[6], *tmp; + size_trunc_len (buffer1, 5, myfs_stats.avail, 1); + size_trunc_len (buffer2, 5, myfs_stats.total, 1); + tmp = g_strdup_printf (_(%s (%d%%) of %s), buffer1, myfs_stats.total 0 ? + (int)(100 * (double)myfs_stats.avail / myfs_stats.total) : 0, + buffer2); + widget_move (panel-widget, panel-widget.lines-3, panel-widget.cols-2-strlen(tmp)); + addstr (tmp); + g_free (tmp); +} +} + static int quit_cmd_internal (int quiet) { --- mc-4.6.1a/src/main.h.showfree 2006-05-29 09:42:29.0 +0200 +++ mc-4.6.1a/src/main.h 2006-05-29 10:30:37.0 +0200 @@ -55,6 +55,7 @@ extern int show_all_if_ambiguous; extern int slow_terminal; extern int update_prompt; /* To comunicate with subshell */ +extern char *old_cwd; extern int safe_delete; extern int confirm_delete; extern int confirm_directory_hotlist_delete; @@ -102,6 +103,7 @@ int load_prompt (int, void *); void save_cwds_stat (void); void quiet_quit_cmd (void); /* For cmd.c and command.c */ +void show_free_space(WPanel *panel); void touch_bar (void); void update_xterm_title_path (void); --- mc-4.6.1a/src/screen.c.showfree 2006-05-29 09:42:29.0 +0200 +++ mc-4.6.1a/src/screen.c 2006-05-29 10:14:55.0 +0200 @@ -47,7 +47,7 @@ #include widget.h #include menu.h /* menubar_visible */ #define WANT_WIDGETS -#include main.h /* the_menubar */ +#include main.h /* the_menubar, show_free_space() */ #include unixcompat.h #define ELEMENTS(arr) ( sizeof(arr) / sizeof((arr)[0]) ) @@ -866,6 +866,7 @@ hline ((slow_terminal ? '-' : ACS_HLINE) | NORMAL_COLOR, panel-widget.cols - 2); #endif/* !HAVE_SLANG */ +show_free_space (panel); } static void @@ -929,6 +930,8 @@ widget_move (panel-widget, 0, panel-widget.cols - 3); addstr (v); +mini_info_separator (panel); + if (panel-active) standend (); } --- mc-4.6.1a/src/layout.c.showfree 2006-05-29 09:42:28.0 +0200 +++ mc-4.6.1a/src/layout.c 2006-05-29 09:42:29.0 +0200 @@ -99,6 +99,9 @@ /* Set to show current working dir in xterm window title */ int xterm_title = 1; +/* Set to show free space on device assigned to current directory */ +int free_space = 1; + /* The starting line for the output of the subprogram */ int
Re: [RFE][PATCH] Display free space on device in panels
Hi Leonard, On Thu, 2006-05-18 at 23:42 +0200, Leonard den Ottolander wrote: On Thu, 2006-05-18 at 16:36 +0300, Pavel Tsekov wrote: Btw if anyone on this list wants to share his thoughts on this patch - now is the time. Personally I don't like the highlighting of the free space indicator. I find it rather distracting. It suffices that the top of the panel is highlighted, no need to highlight that info for the active panel. IMO the conditional attrset (REVERSE_COLOR) etc should be removed. I noticed your reply related to the free space widget highlighting also on bugzilla. I my opinion it makes the look-and-feel of mc more consistent when the free space widget is highlighted. The reasons are: 1) Everything what is written directly to the panel frame is highlighted (current working directory, directory history widget). 2) You are sure that you are looking at the correct free space in the panel you are working in. When it wouldn't be highlighted, you need to look up at the panel title to be sure whether it's active since the the highlighted widgets are on top of the panel. This may save you one eye movement ;) It seems that we need a feedback from someone else whether to highlight or not. If more users are unhappy with the highlighting, I have no problem with removing it. The current version of the patch is applied in FC5 if you want to see how it looks like (highlighted version). Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED] ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [RFE][PATCH] Display free space on device in panels
Hi Pavel, On Fri, 2006-05-19 at 16:07 +0300, Pavel Tsekov wrote: 2) You are sure that you are looking at the correct free space in the panel you are working in. When it wouldn't be highlighted, you need to look up at the panel title to be sure whether it's active since the the highlighted widgets are on top of the panel. This may save you one eye movement ;) How about moving the free space indicator to same line on which the panel title is displayed ? How is it implemented in other file managers ? I was originally inspired by the old czech m602 file manager: http://oldgame.legalne.net/big/images/Manazer-M602.00.120.jpg A bit more talky design was used in the DOS Navigator: http://www.dev0.de/pix/dn151lfnbeta3.png You can see the free space widget is on top in m602. I decided to put it down for mc to have more space for the directory name since the bottom frame of the panel is unused. It could be moved upwards though if more people like it. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED] ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [RFE][PATCH] Display free space on device in panels
Hi Pavel, On Thu, 2006-05-18 at 12:11 +0300, Pavel Tsekov wrote: Hello Jindrich, On Wed, 1 Feb 2006, Jindrich Novy wrote: On Mon, 2006-01-02 at 14:41 +0100, Jindrich Novy wrote: thanks for your comments, attaching the patch better matching the mc coding style. I modified the patch so that it can be switched on/off in the Options/Layout dialog to display free space on device. I red the patch more carefully and I have several questions: 1) --- mc-4.6.1a/src/screen.c.showfree 2006-01-31 21:59:12.0 +0100 +++ mc-4.6.1a/src/screen.c2006-01-31 21:59:12.0 +0100 @@ -49,6 +49,7 @@ +static void +show_free_space(WPanel *panel) +{ +struct stat st; + +/* Don't try to stat non-local fs */ +if (!vfs_file_is_local(panel-cwd)) + return; + +if (old_cwd == NULL || strcmp(old_cwd, panel-cwd) == 0) { ^^^ Is this made on purpose ? Maybe you meant '!=' ? Thanks for the review. There should be != of course as we need to update old_cwd whenever it differs from panel-cwd. 2) Do you think that retrieving the free space information once per directory read would diminish the effect of this patch. Currently my_statfs () is called each time the screen changes i.e. move up, move down, etc - this seems a bit too much ... Yes, the patch can still be improved. I posted it here just to discuss the feature and whether upstream likes it. It's still not a commit candidate yet. Pavel The Prick Tsekov LOL, feel free to be Mr. Prick here ;) Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [RFE][PATCH] Display free space on device in panels
Hi Pavel, On Thu, 2006-05-18 at 16:36 +0300, Pavel Tsekov wrote: On Thu, 18 May 2006, Jindrich Novy wrote: Yes, the patch can still be improved. I posted it here just to discuss the feature and whether upstream likes it. It's still not a commit candidate yet. Well, it seems that this is a much desired feature... I've seen people requesting it at several different places. Despite from the strcmp() issue do you plan to improve it one way or another anytime soon. I mean should I wait for an update or just commit it as is ? Ok, I'll send a better patch in a few days. So please wait with committing for a while. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED] ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[PATCH] Allow storing mc configuration in /etc/mc
Hi all, I wrote a patch allowing to store mc configuration to /etc/mc. It's tested within Fedora for a few months with no complaints. I moved these configuration files from /usr/share/mc to /etc/mc: extfs/extfs.ini extfs/sfs.ini syntax/Syntax cedit.menu edit.indent.rc edit.spell.rc mc.charsets mc.ext mc.lib mc.menu and let the rest in the /usr/share/mc location since they are not config files. The patch changes the default way how mc looks for config files in the way that it first searches /etc/mc and if not found, the fallback is to search /usr/share/mc. So it is fully consistent with the former mc behavior. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED] --- mc-4.6.1a/src/charsets.c.etcmc 2005-05-27 05:35:15.0 +0200 +++ mc-4.6.1a/src/charsets.c 2006-02-24 15:17:05.0 +0100 @@ -45,12 +45,17 @@ load_codepages_list (void) char *fname; char buf[256]; extern char *mc_home; +extern char *mc_home_alt; extern int display_codepage; char *default_codepage = NULL; fname = concat_dir_and_file (mc_home, CHARSETS_INDEX); if (!(f = fopen (fname, r))) { - fprintf (stderr, _(Warning: file %s not found\n), fname); +g_free (fname); +fname = concat_dir_and_file (mc_home_alt, CHARSETS_INDEX); +if (!(f = fopen (fname, r))) { + fprintf (stderr, _(Warning: file %s not found\n), fname); +} g_free (fname); return -1; } --- mc-4.6.1a/src/main.h.etcmc 2006-02-24 15:17:05.0 +0100 +++ mc-4.6.1a/src/main.h 2006-02-24 15:17:05.0 +0100 @@ -112,7 +112,7 @@ void print_vfs_message(const char *msg, extern const char *prompt; extern const char *edit_one_file; -extern char *mc_home; +extern char *mc_home, *mc_home_alt; char *get_mc_lib_dir (void); int maybe_cd (int move_up_dir); --- mc-4.6.1a/src/ext.c.etcmc 2005-07-31 22:29:35.0 +0200 +++ mc-4.6.1a/src/ext.c 2006-02-24 15:17:05.0 +0100 @@ -444,6 +444,10 @@ regex_command (const char *filename, con g_free (extension_file); check_stock_mc_ext: extension_file = concat_dir_and_file (mc_home, MC_LIB_EXT); + if (!exist_file (extension_file)) { + g_free (extension_file); + extension_file = concat_dir_and_file (mc_home_alt, MC_LIB_EXT); + } mc_user_ext = 0; } data = load_file (extension_file); --- mc-4.6.1a/src/setup.c.etcmc 2006-01-29 21:26:05.0 +0100 +++ mc-4.6.1a/src/setup.c 2006-02-24 15:17:05.0 +0100 @@ -481,8 +481,15 @@ setup_init (void) if (exist_file (inifile)){ g_free (profile); profile = inifile; - } else + } else { g_free (inifile); + inifile = concat_dir_and_file (mc_home_alt, mc.ini); + if (exist_file (inifile)) { + g_free (profile); + profile = inifile; + } else + g_free (inifile); + } } profile_name = profile; @@ -501,6 +508,11 @@ load_setup (void) /* mc.lib is common for all users, but has priority lower than ~/.mc/ini. FIXME: it's only used for keys and treestore now */ global_profile_name = concat_dir_and_file (mc_home, mc.lib); + +if (!exist_file(global_profile_name)) { + g_free (global_profile_name); + global_profile_name = concat_dir_and_file (mc_home_alt, mc.lib); +} /* Load integer boolean options */ for (i = 0; int_options[i].opt_name; i++) --- mc-4.6.1a/src/Makefile.am.etcmc 2006-02-04 12:13:30.0 +0100 +++ mc-4.6.1a/src/Makefile.am 2006-02-24 15:17:05.0 +0100 @@ -8,9 +8,11 @@ bin_PROGRAMS = mc mcmfmt if CONS_SAVER pkglibexec_PROGRAMS = cons.saver AM_CPPFLAGS = -DDATADIR=\$(pkgdatadir)/\ -DLOCALEDIR=\$(localedir)\ \ - -DSAVERDIR=\$(pkglibexecdir)\ + -DSAVERDIR=\$(pkglibexecdir)\ \ + -DSYSCONFDIR=\$(sysconfdir)/@PACKAGE@/\ else -AM_CPPFLAGS = -DDATADIR=\$(pkgdatadir)/\ -DLOCALEDIR=\$(localedir)\ +AM_CPPFLAGS = -DDATADIR=\$(pkgdatadir)/\ -DLOCALEDIR=\$(localedir)\ \ + -DSYSCONFDIR=\$(sysconfdir)/@PACKAGE@/\ endif noinst_PROGRAMS = man2hlp --- mc-4.6.1a/src/util.c.etcmc 2006-02-24 15:17:05.0 +0100 +++ mc-4.6.1a/src/util.c 2006-02-24 15:17:05.0 +0100 @@ -40,7 +40,7 @@ #include tty.h #include global.h #include profile.h -#include main.h /* mc_home */ +#include main.h /* mc_home, mc_home_alt */ #include cmd.h /* guess_message_value */ #include mountlist.h #include win.h /* xterm_flag */ @@ -950,16 +950,25 @@ load_mc_home_file (const char *filename, if (!data) { g_free (hintfile); - /* Fall back to the two-letter language code */ - if (lang[0] lang[1]) - lang[2] = 0; + g_free (hintfile_base); + + hintfile_base = concat_dir_and_file (mc_home_alt, filename); + hintfile = g_strconcat (hintfile_base, ., lang, (char *) NULL); data = load_file (hintfile); - + if (!data) { - g_free (hintfile); - hintfile = hintfile_base; - data = load_file (hintfile_base); + /* Fall back to the two-letter language code */ + if (lang[0] lang[1]) + lang[2] = 0; + hintfile
Inconsistent behaviour of Options
Hi mc-devel, there are two types of dialogs in Options menu. The first type contains three buttons: Ok, Save, Cancel and the second only Ok and Cancel. There's a default action in the dialogs with only Ok and Cancel that Ok saves the configuration globally so that it's written to ini file just after finishing the dialog. If you try to configure with Options/Configuration... and Options/Layout... you see Ok, Save, Cancel. If you press either Ok or Save the settings are written to ini file so that the settings will be set again when new mc is launched and not only for the current session. The question is whether to fix the bug in the way that: 1. Ok sets the parameters only for the current session and won't touch the ini file. Save saves the configuration to ini file so that it's needed to add the Save button to the rest of the Options dialog entries to make it consistent. 2. Ok sets the parameters to ini file for all the dialogs, so that it's needed to remove Save button from the Layout and Configuration options to make it consistent. What's your opinion? Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Inconsistent behaviour of Options
Hello Pavel, On Thu, 2006-03-09 at 15:14 +0200, Pavel Tsekov wrote: The question is whether to fix the bug in the way that: 1. Ok sets the parameters only for the current session and won't touch the ini file. Save saves the configuration to ini file so that it's needed to add the Save button to the rest of the Options dialog entries to make it consistent. 2. Ok sets the parameters to ini file for all the dialogs, so that it's needed to remove Save button from the Layout and Configuration options to make it consistent. What's your opinion? I think solution number 2 is better. After all we have Options - Save setup so the Save buttons are somewhat redundant. There is also the auto_save_setup option which saves the ini file on exit. I also prefer this solution as the implementation of the Save button is kind of strange because the Save button is handled by B_EXIT action in init_layout() and layout_cmd() and is rather useless in general ;-) Jindrich ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [RFE][PATCH] Display free space on device in panels
Hello, On Mon, 2006-01-02 at 14:41 +0100, Jindrich Novy wrote: thanks for your comments, attaching the patch better matching the mc coding style. I modified the patch so that it can be switched on/off in the Options/Layout dialog to display free space on device. termshot(TM) is attached: ┌─~──v┐┌─~/CVS/mc/devel──v┐ │ Name │Size│ MTime││ Name │Size │ MTime│ │/.. │UP--│ ▲│/.. │UP--D│ ▲ │/.Azureus │4096│Dec 29 15: ●│/CVS │ 4096│Jan 25 13: ● │/.TeXmacs │4096│Oct 6 10: ▒│/i386 │ 4096│Feb 1 07: ▒ │/.Trash │4096│Jan 8 22: ▒│/mc-4.6.1a│ 4096│Feb 1 07: ▒ │/.aMule │4096│Nov 26 21: ▒│ .cvs~nore│ 18│Dec 6 13: ▒ │/.amaya │4096│Jan 10 14: ▒│ Makefile │ 175│Sep 9 20 ▒ │/.anjuta │4096│Dec 30 15: ▒│ mc-2~atch│ 501│Jan 31 12: ▒ │/.cam~erts│4096│Aug 20 21: ▒│ mc-4~.rpm│2950K│Jan 25 16: ▒ │/.cdd~lave│4096│Jan 1 01: ▒│ mc-4~.rpm│2951K│Feb 1 07: ▒ │/.comments│4096│Jan 15 21: ▒│ mc-4~.bz2│2862K│Nov 29 22: ▒ │/.ddd │4096│Jan 28 14: ▒│ mc-4~.new│2863K│Jan 29 19: ▒ ├2787M (12%) of 21G─▼├─2787M (12%) of 21G─▼ │/.. │UP--│drwxr-xr-x ││/.. │UP--D│drwxr-xr-x │ └───┘└┘ enigma:~/CVS/mc/devel$ [^] what shows how the free space on device is displayed. ChangeLog: 2006-02-01 Jindrich Novy [EMAIL PROTECTED] * screen.c: Add new function show_free_space() to display free space on device. Add calls so that show_free_space() is called when panels are drawn. * layout.c (struct check_options, b2left_cback, b2right_cback layout_callback, init_layout): Add configuration option to Options/Layout dialog. Regards, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1a/src/screen.c.showfree 2006-01-31 21:59:12.0 +0100 +++ mc-4.6.1a/src/screen.c 2006-01-31 21:59:12.0 +0100 @@ -49,6 +49,7 @@ #define WANT_WIDGETS #include main.h /* the_menubar */ #include unixcompat.h +#include mountlist.h /* my_statfs */ #define ELEMENTS(arr) ( sizeof(arr) / sizeof((arr)[0]) ) @@ -106,6 +107,12 @@ int filetype_mode = 1; /* The hook list for the select file function */ Hook *select_file_hook = 0; +/* Old current working directory for displaying free space */ +char *old_cwd = NULL; + +/* Used to figure out how many free space we have */ +struct my_statfs myfs_stats; + static cb_ret_t panel_callback (Widget *, widget_msg_t msg, int parm); static int panel_event (Gpm_Event *event, void *); static void paint_frame (WPanel *panel); @@ -851,6 +858,41 @@ paint_dir (WPanel *panel) standend (); } + +static void +show_free_space(WPanel *panel) +{ +struct stat st; + +/* Don't try to stat non-local fs */ +if (!vfs_file_is_local(panel-cwd)) + return; + +if (old_cwd == NULL || strcmp(old_cwd, panel-cwd) == 0) { + init_my_statfs(); + g_free(old_cwd); + old_cwd = g_strdup(panel-cwd); +} + +my_statfs (myfs_stats, panel-cwd); +st = panel-dir.list [panel-selected].st; + +if (myfs_stats.avail 0 || myfs_stats.total 0) { + char buffer1 [6], buffer2[6], *tmp; + size_trunc_len (buffer1, 5, myfs_stats.avail, 1); + size_trunc_len (buffer2, 5, myfs_stats.total, 1); + tmp = g_strdup_printf (_(%s (%d%%) of %s), buffer1, myfs_stats.total 0 ? + (int)(100 * (double)myfs_stats.avail / myfs_stats.total) : 0, + buffer2); + widget_move (panel-widget, panel-widget.lines-3, panel-widget.cols-2-strlen(tmp)); + if (panel-active) + attrset (REVERSE_COLOR); + addstr (tmp); + attrset (NORMAL_COLOR); + g_free (tmp); +} +} + static void mini_info_separator (WPanel *panel) { @@ -866,6 +908,7 @@ mini_info_separator (WPanel *panel) hline ((slow_terminal ? '-' : ACS_HLINE) | NORMAL_COLOR, panel-widget.cols - 2); #endif/* !HAVE_SLANG */ +if (free_space) show_free_space (panel); } static void @@ -929,6 +972,8 @@ show_dir (WPanel *panel) widget_move (panel-widget, 0, panel-widget.cols - 3); addstr (v); +mini_info_separator (panel); + if (panel-active) standend (); } --- mc-4.6.1a/src/layout.c.showfree 2006-01-31 21:59:12.0 +0100 +++ mc-4.6.1a/src/layout.c 2006-01-31 22:02:28.0 +0100 @@ -99,6 +99,9 @@ int message_visible = 1; /* Set to show current working dir in xterm window title */ int xterm_title = 1; +/* Set to show free space on device assigned to current directory */ +int free_space = 1; + /* The starting line for the output of the subprogram */ int output_start_y = 0; @@ -128,6 +131,7 @@ static int _command_prompt; static int _keybar_visible; static int _message_visible; static int _xterm_title; +static int _free_space; static int
current CVS mc isn't compilable
Hello mc-devel, the patch says it all. Regards, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1a/src/view.c.bracket 2006-01-31 15:39:30.0 +0100 +++ mc-4.6.1a/src/view.c 2006-02-01 14:52:39.0 +0100 @@ -1744,7 +1744,7 @@ view_display_hex (WView *view) const screen_dimen width = view-data_area.width; const int ngroups = view-bytes_per_line / 4; const screen_dimen text_start = - 8 + 13 * ngroups + ((width 80) ? 0 : (ngroups - 1 + 1); + 8 + 13 * ngroups + ((width 80) ? 0 : (ngroups - 1 + 1)); /* 8 characters are used for the file offset, and every hex group * takes 13 characters. On ``big'' screens, the groups are separated * by an extra vertical line, and there is an extra space before the ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[PATCH] Bad permission highlighting
Hello mc-devel, Andy Shevchenko reported a bug to me for bad permissions highlighting. I've written a patch for it and it's attached. It's not a big deal but it fixes the highlighting problem. For reference: http://bugzilla.redhat.com/177100 ChangeLog: 2006-01-06 Jindrich Novy [EMAIL PROTECTED] * screen.c (add_permission_string): Fix incorrectly shifted highlighting of permission string. Thanks, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1a/src/screen.c.perm 2006-01-06 13:09:18.0 +0100 +++ mc-4.6.1a/src/screen.c 2006-01-06 13:08:55.0 +0100 @@ -161,7 +161,7 @@ add_permission_string (char *dest, int w } for(i = 0; i width; i++){ - if (i = l i r){ + if (i l i = r){ if (attr == SELECTED || attr == MARKED_SELECTED) attrset (MARKED_SELECTED_COLOR); else ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [RFE][PATCH] Display free space on device in panels
Hello Roland, thanks for your comments, attaching the patch better matching the mc coding style. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1a/src/screen.c.showfree 2006-01-02 12:22:51.0 +0100 +++ mc-4.6.1a/src/screen.c 2006-01-02 13:44:05.0 +0100 @@ -49,6 +49,7 @@ #define WANT_WIDGETS #include main.h /* the_menubar */ #include unixcompat.h +#include mountlist.h /* my_statfs */ #define ELEMENTS(arr) ( sizeof(arr) / sizeof((arr)[0]) ) @@ -106,6 +107,12 @@ int filetype_mode = 1; /* The hook list for the select file function */ Hook *select_file_hook = 0; +/* Old current working directory for displaying free space */ +static char *old_cwd = NULL; + +/* Used to figure out how many free space we have */ +static struct my_statfs myfs_stats; + static cb_ret_t panel_callback (Widget *, widget_msg_t msg, int parm); static int panel_event (Gpm_Event *event, void *); static void paint_frame (WPanel *panel); @@ -851,6 +858,41 @@ paint_dir (WPanel *panel) standend (); } + +static void +show_free_space(WPanel *panel) +{ +struct stat st; + +/* Don't try to stat non-local fs */ +if (!vfs_file_is_local(panel-cwd)) + return; + +if (old_cwd == NULL || strcmp(old_cwd, panel-cwd) == 0) { + init_my_statfs(); + g_free(old_cwd); + old_cwd = g_strdup(panel-cwd); +} + +my_statfs (myfs_stats, panel-cwd); +st = panel-dir.list [panel-selected].st; + +if (myfs_stats.avail 0 || myfs_stats.total 0) { + char buffer1 [6], buffer2[6], *tmp; + size_trunc_len (buffer1, 5, myfs_stats.avail, 1); + size_trunc_len (buffer2, 5, myfs_stats.total, 1); + tmp = g_strdup_printf (_(%s (%d%%) of %s), buffer1, myfs_stats.total 0 ? + (int)(100 * (double)myfs_stats.avail / myfs_stats.total) : 0, + buffer2); + widget_move (panel-widget, panel-widget.lines-3, panel-widget.cols-2-strlen(tmp)); + if (panel-active) + attrset (REVERSE_COLOR); + addstr (tmp); + attrset (NORMAL_COLOR); + g_free (tmp); +} +} + static void mini_info_separator (WPanel *panel) { @@ -866,6 +908,7 @@ mini_info_separator (WPanel *panel) hline ((slow_terminal ? '-' : ACS_HLINE) | NORMAL_COLOR, panel-widget.cols - 2); #endif/* !HAVE_SLANG */ +show_free_space (panel); } static void @@ -929,6 +972,8 @@ show_dir (WPanel *panel) widget_move (panel-widget, 0, panel-widget.cols - 3); addstr (v); +mini_info_separator (panel); + if (panel-active) standend (); } ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Fearure request
Hello Sergei, On Wed, 2005-11-16 at 01:06 +0200, Sergei Trofimovich wrote: It would be great to see in the bottom of window free space of current directory. (df /path/to/dir) the following patch adds support for displaying an amount of free space figured by stat-ing the current directory. The free space is displayed like this: 3509M (16%) of 21G in the status separator line on each panel. I consider this feature helpful as well. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1a/src/screen.c.showfree 2005-12-27 10:45:05.0 +0100 +++ mc-4.6.1a/src/screen.c 2005-12-27 12:52:58.0 +0100 @@ -49,6 +49,7 @@ #define WANT_WIDGETS #include main.h /* the_menubar */ #include unixcompat.h +#include mountlist.h /* my_statfs */ #define ELEMENTS(arr) ( sizeof(arr) / sizeof((arr)[0]) ) @@ -851,6 +852,9 @@ paint_dir (WPanel *panel) standend (); } +static int initialized; +static struct my_statfs myfs_stats; + static void mini_info_separator (WPanel *panel) { @@ -866,6 +870,34 @@ mini_info_separator (WPanel *panel) hline ((slow_terminal ? '-' : ACS_HLINE) | NORMAL_COLOR, panel-widget.cols - 2); #endif/* !HAVE_SLANG */ + + +{ + struct stat st; + + if (!initialized) { + initialized = 1; + init_my_statfs(); + } + + my_statfs (myfs_stats, current_panel-cwd); + st = current_panel-dir.list [current_panel-selected].st; + +if (myfs_stats.avail 0 || myfs_stats.total 0) { + char buffer1 [6], buffer2[6], *tmp; + size_trunc_len (buffer1, 5, myfs_stats.avail, 1); + size_trunc_len (buffer2, 5, myfs_stats.total, 1); + tmp = g_strdup_printf (_(%s (%d%%) of %s), buffer1, myfs_stats.total ? + (int)(100 * (double)myfs_stats.avail / myfs_stats.total) : 0, + buffer2); + widget_move (panel-widget, panel-widget.lines-3, panel-widget.cols-2-strlen(tmp)); + if (panel-active) + attrset (REVERSE_COLOR); + addstr (tmp); + attrset (NORMAL_COLOR); + g_free (tmp); + } +} } static void @@ -929,6 +961,8 @@ show_dir (WPanel *panel) widget_move (panel-widget, 0, panel-widget.cols - 3); addstr (v); +mini_info_separator (panel); + if (panel-active) standend (); } ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[RFE][PATCH] Display free space on device in panels (was: Fearure request)
Hello Sergei, mc-devel, On Wed, 2005-12-28 at 15:33 +0100, Jindrich Novy wrote: the following patch adds support for displaying an amount of free space figured by stat-ing the current directory. The free space is displayed like this: 3509M (16%) of 21G in the status separator line on each panel. I consider this feature helpful as well. The previous patch contained a mistake that it only displayed free space calculated from incorrect panel and tried to stat even non-local filesystems. The attached patch does the same, but better. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1a/src/screen.c.showfree 2005-12-28 16:49:52.0 +0100 +++ mc-4.6.1a/src/screen.c 2005-12-28 17:14:45.0 +0100 @@ -49,6 +49,7 @@ #define WANT_WIDGETS #include main.h /* the_menubar */ #include unixcompat.h +#include mountlist.h /* my_statfs */ #define ELEMENTS(arr) ( sizeof(arr) / sizeof((arr)[0]) ) @@ -106,6 +107,12 @@ int filetype_mode = 1; /* The hook list for the select file function */ Hook *select_file_hook = 0; +/* Old current working directory for displaying free space */ +char *old_cwd = NULL; + +/* Used to figure out how many free space we have */ +struct my_statfs myfs_stats; + static cb_ret_t panel_callback (Widget *, widget_msg_t msg, int parm); static int panel_event (Gpm_Event *event, void *); static void paint_frame (WPanel *panel); @@ -851,6 +858,41 @@ paint_dir (WPanel *panel) standend (); } + +static void +show_free_space(WPanel *panel) +{ +struct stat st; + +/* Don't try to stat non-local fs */ +if (strlen(panel-cwd) = 2 panel-cwd[0] == '/' panel-cwd[1] == '#') + return; + +if (old_cwd == NULL || strcmp(old_cwd, panel-cwd)) { + init_my_statfs(); + if (old_cwd != NULL) g_free(old_cwd); + old_cwd = g_strdup(panel-cwd); +} + +my_statfs (myfs_stats, panel-cwd); +st = panel-dir.list [panel-selected].st; + +if (myfs_stats.avail 0 || myfs_stats.total 0) { + char buffer1 [6], buffer2[6], *tmp; + size_trunc_len (buffer1, 5, myfs_stats.avail, 1); + size_trunc_len (buffer2, 5, myfs_stats.total, 1); + tmp = g_strdup_printf (_(%s (%d%%) of %s), buffer1, myfs_stats.total ? + (int)(100 * (double)myfs_stats.avail / myfs_stats.total) : 0, + buffer2); + widget_move (panel-widget, panel-widget.lines-3, panel-widget.cols-2-strlen(tmp)); + if (panel-active) + attrset (REVERSE_COLOR); + addstr (tmp); + attrset (NORMAL_COLOR); + g_free (tmp); +} +} + static void mini_info_separator (WPanel *panel) { @@ -866,6 +908,7 @@ mini_info_separator (WPanel *panel) hline ((slow_terminal ? '-' : ACS_HLINE) | NORMAL_COLOR, panel-widget.cols - 2); #endif/* !HAVE_SLANG */ +show_free_space (panel); } static void @@ -929,6 +972,8 @@ show_dir (WPanel *panel) widget_move (panel-widget, 0, panel-widget.cols - 3); addstr (v); +mini_info_separator (panel); + if (panel-active) standend (); } ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[RFE] [PATCH] star vfs and xattr feature request
Hello mc-devel, Curtis Doty sent me a patch for star vfs support, where he says: --- Here's a patch that attempts to add star filesystem support. Which is fairly important IMHO now that Fedora is using selinux (or anything that uses extended attributes). Star also seems very forgiving; allowing the same view/extract command to work across native archives or those compressed with various programs. However, I couldn't get #utar to work so had to write the little #ustar script; which is dog slow. So I'm hearby requesting a new feature: can the #utar extfs be made to extract from starchives that contain selinux security descriptors? --- references: http://bugzilla.redhat.com/174918 http://www.nsa.gov/selinux/ Regards, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1a/lib/mc.ext.in.star 2005-12-03 19:27:17.0 -0800 +++ mc-4.6.1a/lib/mc.ext.in 2005-12-03 19:28:22.0 -0800 @@ -134,6 +134,11 @@ Open=%cd %p#utar View=%view{ascii} tar tvvf %f +# star - standard archive +regex/\.(star|STAR)(|\.(bz2|gz))$ + Open=%cd %p#ustar + View=%view{ascii} star tvf %f 2/dev/null + # lha type/^LHa\ .*archive Open=%cd %p#ulha --- mc-4.6.1a/vfs/extfs/extfs.ini.star 2005-07-20 12:03:54.0 -0700 +++ mc-4.6.1a/vfs/extfs/extfs.ini 2005-12-03 19:29:35.0 -0800 @@ -54,3 +54,6 @@ # ISO image iso9660 + +# standard archive +ustar +++ mc-4.6.1a/vfs/extfs/ustar 2005-12-03 18:51:00.0 -0800 @@ -0,0 +1,29 @@ +#!/bin/sh + +mcstarfs_list() { + star -tv -f=$1 2/dev/null |awk '{ + size = $1 + perms = substr($2,1,10) + split($3,own,/) + month = $4 ; day = $5 ; time = $6 ; year = $7 + filename = substr($0, index($0,$8) ) + printf %s 1 %s %s %i %s %2i %i %s %s\n, + perms, own[1], own[2], size, month, day, year, time, filename + }' +} + +mcstarfs_copyout() { + #star -no-statistics -f=$1 -x -to-stdout $2 $3 + # grumble mumble...can't have stderr because we need + # leading / and turning it off with -/ doesn't work + star -f=$1 -x -to-stdout $2 $3 2/dev/null +} + +cmd=$1 +shift +case $cmd in + list) mcstarfs_list $@ ;; + copyout) mcstarfs_copyout $@ ;; + *) exit 1 ;; +esac +exit 0 ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[PATCH] PHP syntax highlighting broken
Hello mc-devel, the php.syntax file is broken due to bad highlighting definition of LOG_LOCAL[0-7] symbols. To reproduce: F4 on any .php file. Results: Error in file /usr/share/mc//syntax/php.syntax on line 4367 and file is edited without any highlighting. Patch is attached. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1a/syntax/php.syntax.phpfix 2005-11-20 15:42:01.0 +0100 +++ mc-4.6.1a/syntax/php.syntax 2005-12-02 11:01:48.0 +0100 @@ -1,5 +1,8 @@ # PHP syntax file +# 2005-12-02 Jindrich Novy [EMAIL PROTECTED] +# * fix highlighting of LOG_LOCALn symbols to make the syntax file work + # 2005-11-20 Leonard den Ottolander leonard den ottolander nl # * regenerated from the docs at http://www.php.net @@ -4364,7 +4367,14 @@ keyword whole LOG_ERR white keyword whole LOG_INFO white keyword whole LOG_KERN white -keyword whole LOG_LOCAL0 ... LOG_LOCAL7 white +keyword whole LOG_LOCAL0 white +keyword whole LOG_LOCAL1 white +keyword whole LOG_LOCAL2 white +keyword whole LOG_LOCAL3 white +keyword whole LOG_LOCAL4 white +keyword whole LOG_LOCAL5 white +keyword whole LOG_LOCAL6 white +keyword whole LOG_LOCAL7 white keyword whole LOG_LPR white keyword whole LOG_MAIL white keyword whole LOG_NDELAY white ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] concat_dir_and_file() needs fixes
Hello Roland, On Fri, 2005-12-02 at 15:58 +0100, Roland Illig wrote: Jindrich Novy wrote: --- mc-4.6.1a/src/util.c.jn 2005-12-02 11:08:26.0 +0100 +++ mc-4.6.1a/src/util.c2005-12-02 13:11:19.0 +0100 @@ -1515,9 +1515,16 @@ /* If filename is NULL, then we just append PATH_SEP to the dir */ char * -concat_dir_and_file (const char *dir, const char *file) +concat_dir_and_file (const char *dir, const char *filename) { int i = strlen (dir); +const char *file = filename; + It's obvious that you used mcedit here. :) (Hint: trailing white-space.) Yes ;) +/* Return filename when dir is empty */ +if (!i) return g_strdup (filename); This looks almost good, except that i is not a boolean variable. You should use if (i == 0) instead. It's a question of style, !i and i==0 are equivalent, but feel free to change it. + +if (file != NULL *file == PATH_SEP) + file++; Maybe we should rather make sure that this function is never called with non-empty dir and file starting with a slash. Otherwise we might hide bugs. How often do you want to concatenate two absolute paths? The problem isn't to concatenate two absolute paths actually. The patch enhances the functionality of concat_dir_and_file() in the way that it will correctly add say dir=/home/jnovy and file=/.mc/bindings to /home/jnovy/.mc/bindings as the unfixed concat_dir_and_file checks only whether the dir ends with PATH_SEP and adds it even if file begins with PATH_SEP already - the result is /home/jnovy//.mc/bindings what's not too good. Fortunately the path works even if it's so ugly. I thought that it would be less PITA to make concat_dir_and_file less stupid than fixing the strings in edit.h: /* File names */ #define EDIT_DIR PATH_SEP_STR .mc PATH_SEP_STR cedit #define SYNTAX_FILEEDIT_DIR PATH_SEP_STR Syntax #define CLIP_FILE EDIT_DIR PATH_SEP_STR cooledit.clip #define MACRO_FILE EDIT_DIR PATH_SEP_STR cooledit.macros #define BLOCK_FILE EDIT_DIR PATH_SEP_STR cooledit.block #define TEMP_FILE EDIT_DIR PATH_SEP_STR cooledit.temp used for concatenation, all of them beginning with PATH_SEP. Please note that if you remove the leading PATH_SEP from these strings, you need to rewrite almost all calls to catstrs(), edit_save_block() and friends by at least adding the PATH_SEP_STR there. Regards, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: some problems with do_*_ca_mode()
Hello Andrey, On Thu, 2005-11-24 at 13:46 +0100, Leonard den Ottolander wrote: Hello Andrey, On Thu, 2005-11-24 at 18:56 +0700, Andrey V. Malyshev wrote: (*) By the way: in the slvideo.c file is defined another SLtt_init_video() function. It what cases this file is used instead of sldisply.c? I could not understand off-hand. Looks like MSDOS-version :) The slang directory you are referring to contains the internal version of slang that is used when mc is configured --with-screen=mcslang. It has been recently updated to version 2.0.5. Just to clarify it, the newer slang contains more implementations of SLtt_init_video() in slvideo.c for different build environments such as DJGPP, EMX, etc. The one we are interested in is the single one in sldisply.c so you can safely ignore slvideo.c ;) Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Fwd: some problems with do_*_ca_mode()
Hi Andrey, Leonard, On Fri, 2005-11-18 at 14:26 +0100, Leonard den Ottolander wrote: Hi Andrey, On Fri, 2005-11-18 at 11:03 +0700, Andrey V. Malyshev wrote: I can not test it under the real xterm console (with X), I have not one. I think it is nessessary before commiting, can everyone do it? Maybe somebody will beat me to it. Otherwise I'll do. Even though your explanation sounds senisible I'd like to hear some other peoples opinion though. I agree with Andrey here, that we should use ti and te sequences acquired from termcap database instead of hardcoded ones. The problem is that Andrey uses direct putp() calls. The putp() belongs to ncurses and it doesn't seem to work when slang support is enabled. I propose this way to write termcap sequences to the terminal what should work even with slang: #ifdef HAVE_SLANG SLtt_write_string (ti_cap); #else putp (ti_cap); #endif and similarly for the te_cap. The question is whether not to call SLtt_initialize () and friends in case of slang instead as slang takes care of setting proper ti/te sequences itself. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[PATCH] mini status bar unaligned
Hi mc-devel, the main panel in the default Full file list is unaligned with mini status bar, to reproduce: 1) go to Left/Listing mode... 2) enable Full file list (likely enabled by default) 3) enable user Mini status you see: Size and MTime field is unaligned with Size/Perm field in mini status bar what is just ugly. ChangeLog: 2005-11-23 Jindrich Novy [EMAIL PROTECTED] * view.c (struct formats): Align mini status with the main panel. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1a/src/screen.c.ministatus 2005-11-17 22:01:32.0 +0100 +++ mc-4.6.1a/src/screen.c 2005-11-17 22:02:31.0 +0100 @@ -471,7 +471,7 @@ static struct { { mtime, 12, 0, J_RIGHT, N_(MTime), 1, string_file_mtime, (sortfn *) sort_time }, { atime, 12, 0, J_RIGHT, N_(ATime), 1, string_file_atime, (sortfn *) sort_atime }, { ctime, 12, 0, J_RIGHT, N_(CTime), 1, string_file_ctime, (sortfn *) sort_ctime }, -{ perm, 10, 0, J_LEFT, N_(Permission),1,string_file_permission, NULL }, +{ perm, 12, 0, J_CENTER, N_(Permission),1,string_file_permission, NULL }, { mode, 6, 0, J_RIGHT, N_(Perm), 1, string_file_perm_octal, NULL }, { nlink, 2, 0, J_RIGHT, N_(Nl), 1, string_file_nlinks, (sortfn *) sort_links }, { inode, 5, 0, J_RIGHT, N_(Inode), 1, string_inode, (sortfn *) sort_inode }, ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] mini status bar unaligned
Hello Pavel, On Wed, 2005-11-23 at 15:35 -0500, Pavel Roskin wrote: If you want alignment, use perm:12 instead of perm in the mini-status line. Thanks for the workaround, the patch is not needed then if the width can be specified on the format line explicitely. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[PATCH] spec.syntax misses %check
Hello mc-devel, spec.syntax ignores the %check macro. The following patch adds highlighting of it in spec files. Thanks, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1a/syntax/spec.syntax.rpmsyntax 2004-12-28 14:23:34.0 +0100 +++ mc-4.6.1a/syntax/spec.syntax 2005-09-05 21:47:03.0 +0200 @@ -41,6 +41,7 @@ keyword whole Url: green keyword whole linestart %build red +keyword whole linestart %check red keyword whole linestart %clean red keyword whole linestart %changelog red keyword whole linestart %description red ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Depency on ld-linux.so.2(GLIBC_PRIVATE)
Hi Leonard, On Tue, 2005-11-15 at 21:53 +0100, Leonard den Ottolander wrote: Hi Pavel, list, On Tue, 2005-11-15 at 14:22 -0500, Pavel Roskin wrote: nm mc shows that the only symbol from GLIBC_PRIVATE is __libc_enable_secure. Search for __libc_enable_secure finds it in two places: intl/dcigettext.c - it's only used if that file is compiled as part of libc, which is not the case. slang/slcommon.c - this one uses __libc_enable_secure when glibc 2.x and newer is used. So, I guess it's upgrading S-Lang that introduced this problem. I've removed the dependency on __libc_enable_secure in slcommon.c. Please correct the ChangeLog entry: * slcommon.c (_pSLsecure_issetugid): Remove dependency on glibc private function __libc_enable_secure(). __libc_enable_secure is not a function, but int. The fix: http://savannah.gnu.org/cgi-bin/viewcvs/mc/mc/slang/slcommon.c.diff?r1=1.1r2=1.2 that is done is a bad hack that just confuses a reader of code, please consider removing references to __libc_enable_secure completely. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Czech translation needs fixups
On Wed, 2005-10-05 at 10:30 -0400, Pavel Roskin wrote: I think your translation of %s in %d file is incorrect. There are no bytes in the message. It's file that should be plural. When tested, I got 72 byty byte v 1 souborech, which doesn't look right. Yes, the string is definitely not right. It's for the first time I see the plural construct in the po file, as I'm not a translator actually ;) I assumed that: #, fuzzy, c-format msgid %s byte msgid_plural %s bytes msgstr[0] %s byt. msgstr[1] %s byt. msgstr[2] %s byt. is trying to reflect different translations for inflected languages such as Czech. We have three suffices for describing an amount: 1 - byte 2-4- byty (the last character is yacute;) 5-infinity - bytu (the last character is uring;) so because of the number of indices of msgstr[] I assumed that it's this case. Apparently it's not. The attached patch translated another missing strings and fixes ButtonBar string to fit to 6 characters. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc/po/cs.po.cstrans 2005-10-04 23:15:08.0 +0200 +++ mc/po/cs.po 2005-10-06 10:05:19.0 +0200 @@ -527,9 +527,8 @@ msgstr uèení Kláves... msgid Syntax Highlighting... msgstr zvýraznìní syntaXe -#, fuzzy msgid Save setup... -msgstr ulo¾it naStavení +msgstr ulo¾it naStavení... msgid File msgstr Soubor @@ -1963,13 +1962,13 @@ msgid Modified: %s msgstr Zmìnìn:%s #. TRANSLATORS: Status changed, like in the stat(2) man page -#, fuzzy, c-format +#, c-format msgid Status:%s -msgstr Vytvoøen: %s +msgstr Stav: %s #, c-format msgid Dev. type: major %lu, minor %lu -msgstr +msgstr Typ zaøízení: vìt¹í %lu, men¹í %lu #, c-format msgid Size: %s @@ -2604,7 +2603,7 @@ msgid Usage: msgstr Pou¾ití: msgid [dev] -msgstr +msgstr [dev] msgid UP--DIR msgstr VY©-ADR @@ -2717,6 +2716,9 @@ msgid running on this terminal.\n Subshell support will be disabled. msgstr +GNU Midnight Commander je ji¾\n +spu¹tìn na tomto terminálu.\n +Podpora subshellu bude zakázána. #, c-format msgid Cannot open named pipe %s\n @@ -2998,7 +3000,7 @@ msgid ButtonBar|Help msgstr TlaèítkováLi¹ta|Pomoc msgid ButtonBar|Quit -msgstr TlaèítkováLi¹ta|Ukonèit +msgstr TlaèítkováLi¹ta|Konec msgid ButtonBar|Ascii msgstr TlaèítkováLi¹ta|Ascii @@ -3022,10 +3024,10 @@ msgid ButtonBar|Save msgstr TlaèítkováLi¹ta|Ulo¾ msgid ButtonBar|UnWrap -msgstr TlaèítkováLi¹ta|Nezalamuj +msgstr TlaèítkováLi¹ta|Nezal. msgid ButtonBar|Wrap -msgstr TlaèítkováLi¹ta|Zalamuj +msgstr TlaèítkováLi¹ta|Zalam. msgid ButtonBar|RxSrch msgstr TlaèítkováLi¹ta|RxHled @@ -3040,13 +3042,13 @@ msgid ButtonBar|Raw msgstr TlaèítkováLi¹ta|Hrubì msgid ButtonBar|Parse -msgstr TlaèítkováLi¹ta|Analyzuj +msgstr TlaèítkováLi¹ta|Rozeb. msgid ButtonBar|Unform -msgstr TlaèítkováLi¹ta|Odformátuj +msgstr TlaèítkováLi¹ta|Odform. msgid ButtonBar|Format -msgstr TlaèítkováLi¹ta|Formátuj +msgstr TlaèítkováLi¹ta|Format msgid History msgstr Historie ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Czech translation needs fixups
Hello Pavel, On Thu, 2005-10-06 at 12:39 -0400, Pavel Roskin wrote: On Thu, 2005-10-06 at 10:09 +0200, Jindrich Novy wrote: On Wed, 2005-10-05 at 10:30 -0400, Pavel Roskin wrote: Your assumption is correct. However, be careful - the numbers in brackets are values returned by the formula in the beginning of the *.po file on the Plural-Forms: line. These are not example numbers (0 bytes, 1 byte, 2 bytes etc). Ok, thanks for the clarification! It would be great to improve gettext to show the lowest number to match the rule rather than some abstract rule number. We have three suffices for describing an amount: 1 - byte 2-4- byty (the last character is yacute;) I have fixed that. It was plain y in your patch. I was correct in the original patch, sorry. Only plain y without any accents is suitable here. 5-infinity - bytu (the last character is uring;) You may need to fix Plural-Forms: if that's true. There is a disagreement between what gettext 0.14.4 manual says about Czech language (which is what you say) and the rules used in cs.po included with gettext, which treat e.g. 22 like 2. I took the rules from gettext's cs.po. Yes, the Plural-Forms expression isn't correct for Czech inflection (the rule in the cs.po file looks more like a rule definition for ordinal numeral suffices) and the correct rule should be like this: Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n=2 n=4 ? 1 : 2);\n what returns the correct result even for 0 (result=2). This should match perfectly messages like You have %llu bytes free on your drive. The attached patch translated another missing strings and fixes ButtonBar string to fit to 6 characters. Applied. I actually forgot to commit the previous patch, so I had to apply your changes manually, but now they are in CVS. You didn't reply about %s in %d file. I did some research using Google and came with reasonable translations, but I'm not sure I got the v/ve thing correct. Your research is correct, the ve is used only in case of 2-4 files. I know my native language is a bit brutal and not very intuitive ;) Thanks, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Czech translation needs fixups
Hello Pavel, Egmont, On Thu, 2005-10-06 at 13:08 -0400, Pavel Roskin wrote: On Thu, 2005-10-06 at 11:03 +0200, Egmont Koblinger wrote: On Thu, Oct 06, 2005 at 10:09:26AM +0200, Jindrich Novy wrote: msgid ButtonBar|Quit msgstr Tla??tkov?Li?ta|Konec If I understand correctly how the Q_() function of glib works, the translated strings must not contain the prefix up to the | character, since glib's Q_() (perhaps due to performance issues) does not strip this prefix, except if gettext() returns the same pointer (i.e. the string has no translation available). You are right. I don't like the glib implementation. It totally ignores the fact that translators are not programmers, and that they will translate everything, no matter what you tell them. So I think it should be: msgid ButtonBar|Quit msgstr Konec but the best would be to test it with glib = 2.4. It's working fine with glib 2.6.6 because it doesn't include glib/gi18n.h when glib.h is included. If I include glib/gi18n.h, bad things do happen. I hope when glib/gi18n.h is included in glib.h, it will be mature enough to avoid such stupidities. So the preferred way is to omit everything before the pipe sign in the translated strings to keep compatibility with older glibs ? Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Czech translation needs fixups
Hi Pavel, On Tue, 2005-10-04 at 10:47 -0400, Pavel Roskin wrote: It would be great if you translate the new plural forms. The attached patch fixes some case problems in highlighted chracters and yet more keyboard shortcut conflicts found in dialogs what I haven't checked before. The plural forms are also translated. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc/po/cs.po.cstrans 2005-10-04 23:15:08.0 +0200 +++ mc/po/cs.po 2005-10-05 12:53:44.0 +0200 @@ -527,9 +527,8 @@ msgstr uèení Kláves... msgid Syntax Highlighting... msgstr zvýraznìní syntaXe -#, fuzzy msgid Save setup... -msgstr ulo¾it naStavení +msgstr ulo¾it naStavení... msgid File msgstr Soubor @@ -695,7 +694,7 @@ msgid Skip msgstr Pøeskoèit msgid Set all -msgstr Nastavit v¹e +msgstr Nastavit V¹e msgid owner msgstr vlastník @@ -761,7 +760,7 @@ msgid Full file list msgstr Plný seznam souborù msgid Brief file list -msgstr Zhu¹tìný seznam souborù +msgstr zHu¹tìný seznam souborù msgid Long file list msgstr Dlouhý seznam souborù @@ -872,7 +871,7 @@ msgid Stopped msgstr Zastaveno msgid Stop -msgstr Zastavit +msgstr zAstavit msgid Resume msgstr Pokraèovat @@ -935,10 +934,10 @@ msgid sticky bit msgstr bit 'sticky' msgid set group ID on execution -msgstr pøi spu¹tìní nastavit èíslo skupiny +msgstr nastavit GID pøi spu¹tìní msgid set user ID on execution -msgstr pøi spu¹tìní nastavit èíslo u¾ivatele +msgstr nastavit UID pøi spu¹tìní msgid Clear marked msgstr Smazat oznaèené @@ -980,10 +979,10 @@ msgid Chmod command msgstr Chmod msgid Set users -msgstr Nastav u¾ivatele +msgstr Nastav U¾ivatele msgid Set groups -msgstr Nastav skupiny +msgstr Nastav Skupiny msgid Name msgstr Jméno @@ -1763,7 +1762,7 @@ msgid Quit msgstr Konec msgid Panelize -msgstr Panelizace +msgstr PaneLizace msgid View - F3 msgstr Vidìt - F3 @@ -1963,24 +1962,24 @@ msgid Modified: %s msgstr Zmìnìn:%s #. TRANSLATORS: Status changed, like in the stat(2) man page -#, fuzzy, c-format +#, c-format msgid Status:%s -msgstr Vytvoøen: %s +msgstr Stav: %s #, c-format msgid Dev. type: major %lu, minor %lu -msgstr +msgstr Typ zaøízení: velké %lu, malé %lu #, c-format msgid Size: %s msgstr Velikost: %s -#, fuzzy, c-format +#, c-format msgid (%ld block) msgid_plural (%ld blocks) msgstr[0] (%ld blok) -msgstr[1] (%ld blok) -msgstr[2] (%ld blok) +msgstr[1] (%ld bloky) +msgstr[2] (%ld blokù) #, c-format msgid Owner: %s/%s @@ -2011,7 +2010,7 @@ msgid Xterm window title msgstr nadpis okna Xtermu msgid hIntbar visible -msgstr tipy viditelné +msgstr tipY viditelné msgid Keybar visible msgstr Klávesy viditelné @@ -2490,7 +2489,7 @@ msgid Use internal view msgstr pou¾ít interní prohlí¾Eè msgid use internal edIt -msgstr pou¾ít interní editor +msgstr pou¾ít interní eDitor msgid auto mEnus msgstr automatické Menu @@ -2651,18 +2650,18 @@ msgstr Vlastník msgid Group msgstr Skupina -#, fuzzy, c-format +#, c-format msgid %s byte msgid_plural %s bytes -msgstr[0] %s bytù -msgstr[1] %s bytù +msgstr[0] %s byte +msgstr[1] %s byty msgstr[2] %s bytù -#, fuzzy, c-format +#, c-format msgid %s in %d file msgid_plural %s in %d files -msgstr[0] %s bytù v %d souborech -msgstr[1] %s bytù v %d souborech +msgstr[0] %s byte v %d souborech +msgstr[1] %s byty v %d souborech msgstr[2] %s bytù v %d souborech msgid readlink failed ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Czech translation needs fixups
Hello Leonard, On Mon, 2005-10-03 at 23:05 +0200, Leonard den Ottolander wrote: Sorry, but this doesn't patch cleanly against HEAD. Please supply a clean patch. Ok, just decided to translate the Czech po completely. The attached patch contains the complete Czech translation with the fixed duplicated keyboard shortcuts. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc/po/cs.po.orig 2005-08-23 12:45:28.0 +0200 +++ mc/po/cs.po 2005-10-04 13:46:41.0 +0200 @@ -5,6 +5,7 @@ # Michal Svec [EMAIL PROTECTED] (Michal ©vec), 2000. # Stanislav Brabec [EMAIL PROTECTED], 2001, 2002. # Miloslav Trmac [EMAIL PROTECTED], 2003. +# Jindrich Novy [EMAIL PROTECTED], 2005. # msgid msgstr @@ -12,49 +13,41 @@ msgstr Report-Msgid-Bugs-To: \n POT-Creation-Date: 2005-08-23 10:06+0200\n PO-Revision-Date: 2003-01-22 18:29+0100\n -Last-Translator: Miloslav Trmac [EMAIL PROTECTED]\n +Last-Translator: Jindrich Novy [EMAIL PROTECTED]\n Language-Team: Czech [EMAIL PROTECTED]\n MIME-Version: 1.0\n Content-Type: text/plain; charset=ISO-8859-2\n Content-Transfer-Encoding: 8-bit\n -#, fuzzy msgid Choose syntax highlighting -msgstr zvýraznìní syntaXe +msgstr Vyber zvýraznìní syntaXe -#, fuzzy msgid Auto -msgstr O programu +msgstr Auto msgid Reload Current Syntax -msgstr +msgstr Nahraj aktuální syntax -#, fuzzy, c-format msgid Cannot open %s for reading -msgstr Nepodaøilo se otevøít rouru pro ètení: +msgstr Nepodaøilo se otevøít %s pro ètení: msgid Error msgstr Chyba -#, fuzzy, c-format msgid Error reading from pipe: %s -msgstr Chyba pøi ètení z roury: +msgstr Chyba pøi ètení z roury: %s -#, fuzzy, c-format msgid Cannot open pipe for reading: %s -msgstr Nepodaøilo se otevøít rouru pro ètení: +msgstr Nepodaøilo se otevøít rouru pro ètení: %s -#, fuzzy, c-format msgid Cannot get size/permissions for %s -msgstr Nelze zjistit délku/práva k souboru: +msgstr Nelze zjistit délku/práva k souboru %s -#, fuzzy, c-format msgid %s is not a regular file -msgstr Nelze prohlí¾et: není to normální soubor +msgstr %s není normální soubor -#, fuzzy, c-format msgid File %s is too large -msgstr Soubor je pøíli¹ velký: +msgstr Soubor %s je pøíli¹ velký msgid Macro recursion is too deep msgstr Rekurze maker je pøíli¹ hluboká @@ -98,7 +91,6 @@ msgstr Varování msgid A file already exists with this name. msgstr Soubor tohoto jména ji¾ existuje. -#, fuzzy msgid Overwrite msgstr Pøepsat @@ -148,7 +140,6 @@ msgstr Tento text byl zmìnìn, ale zmìny nebyly ulo¾eny. \n Pokraèováním se zmìny ztratí. -#, fuzzy msgid Continue msgstr Pokraèovat @@ -219,9 +210,8 @@ msgstr ©patný regulární výraz, nebo sc msgid Error in replacement format string. msgstr Chyba ve formátu nahrazovaného textu. -#, fuzzy msgid Replacement too long. -msgstr Zadejte náhradní text: +msgstr Náhradní text je pøíli¹ dlouhý. #, c-format msgid %ld replacements made. @@ -240,7 +230,6 @@ msgstr Konec msgid File was modified, Save with exit? msgstr Soubor byl zmìnìn, ulo¾it pøi odchodu? -#, fuzzy msgid Cancel quit msgstr Zru¹it odchod @@ -250,12 +239,11 @@ msgstr Ano msgid No msgstr Ne -#, fuzzy msgid Error -msgstr Chyba +msgstr Chyba msgid This function is not implemented. -msgstr +msgstr Tato funkce není implementována. msgid Copy to clipboard msgstr Zkopírovat do schránky @@ -303,19 +291,16 @@ msgid Sort returned non-zero: msgstr sort vrátil neskoèil dobøe: msgid Paste output of external command -msgstr +msgstr Vlo¾ výstup externího pøíkazu -#, fuzzy msgid Enter shell command(s): -msgstr Zadejte oznaèení príkazu: +msgstr Zadejte shellové pøíkaz(y): -#, fuzzy msgid External command -msgstr Jiný pøíkaz +msgstr Externí pøíkaz -#, fuzzy msgid Cannot execute command -msgstr Chyba pøi spou¹tìní príkazu sort +msgstr Nemohu spustit pøíkaz msgid Error creating script: msgstr Chyba pøi vytváøení skriptu: @@ -368,15 +353,18 @@ msgid User: %s\n Process ID: %d msgstr +Soubor \%s\ je ji¾ editován\n +U¾ivatel: %s\n +Èíslo procesu: %d msgid File locked -msgstr +msgstr Soubor zamèen msgid Grab lock -msgstr +msgstr Pøevzít zámek msgid Ignore lock -msgstr +msgstr Ignorovat zámek msgid About msgstr O programu @@ -436,13 +424,13 @@ msgid Toggle Mark F3 msgstr Pøehodit znaèky F3 msgid Mark ColumnsS-F3 -msgstr Znaèit sloupcovì S-F3 +msgstr zNaèit sloupcovì S-F3 msgid Toggle ins/overw Ins msgstr Vkládání/PøepisIns msgid Copy F5 -msgstr Kopírovat F5 +msgstr kOpírovat F5 msgid Move F6 msgstr pøEsunout F6 @@ -475,22 +463,22 @@ msgid Go to matching bracket M-b msgstr
[PATCH] backward searching off-by-one indexing error
Hello mc-devel, there's an error while backward searching in mcview. To reproduce: 1) echo -e foo\nbar\nbar\n /tmp/sample.tmp 2) mcedit /tmp/sample.tmp 3) regexp search by '/' - type bar 4) press 'n' for the next occurence 5) backward search '?' and press enter (bar is prefilled) Results: You see that the line on the top of the screen is shrunk (one character is missing). Reference: http://bugzilla.redhat.com/169823 Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc/src/view.c.searchfix 2005-09-01 22:49:17.0 +0200 +++ mc/src/view.c 2005-10-04 17:08:39.0 +0200 @@ -2396,7 +2396,7 @@ search (WView *view, char *text, if (view-direction == 1) t += forward_line_start; else - t = reverse_line_start ? reverse_line_start + 3 : 0; + t = reverse_line_start ? reverse_line_start + 2 : 0; view-search_start += t; if (t != beginning) { ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Czech translation needs fixups
Hello mc-devel! Radek Biba found a translation bug for the Czech locale in mc, that makes shortcut keys in mc and mcedit duplicated. The attached patch fixes the conflicts and adds unique shortcuts to menus. There's also inconsistent case of characters denoting keyboard shortcuts in menus what is fixed as well. for the reference see: http://bugzilla.redhat.com/169734 Jindrich ChangeLog: 2005-10-03 Jindrich Novy [EMAIL PROTECTED] * cs.po: Fixed conflicts in keyboard shortcuts in mc and mcedit menus. Also fixed case of some keyboard shortcuts. -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1/po/cs.po.cstrans 2005-07-23 18:53:26.0 +0200 +++ mc-4.6.1/po/cs.po 2005-10-02 17:32:24.0 +0200 @@ -5,6 +5,7 @@ # Michal Svec [EMAIL PROTECTED] (Michal ©vec), 2000. # Stanislav Brabec [EMAIL PROTECTED], 2001, 2002. # Miloslav Trmac [EMAIL PROTECTED], 2003. +# Jindrich Novy [EMAIL PROTECTED], 2005. # msgid msgstr @@ -566,7 +567,7 @@ msgstr Pøehodit znaèky F3 #: edit/editmenu.c:320 msgid Mark ColumnsS-F3 -msgstr Znaèit sloupcovì S-F3 +msgstr Znaèit sloupcovì S-F3 #: edit/editmenu.c:322 msgid Toggle ins/overw Ins @@ -618,7 +619,7 @@ msgstr jít na Párovou závorku M- #: edit/editmenu.c:350 edit/editmenu.c:374 msgid Insert literal... C-q -msgstr vlo¾it znak... C-q +msgstr vlo¾it Znak... C-q #: edit/editmenu.c:352 edit/editmenu.c:376 msgid Refresh screen C-l @@ -626,7 +627,7 @@ msgstr Obnovit obrazovkuC- #: edit/editmenu.c:354 edit/editmenu.c:378 msgid Start record macro C-r -msgstr zaèít zaznamenávat Makro C-r +msgstr zAèít zaznamenávat makro C-r #: edit/editmenu.c:355 edit/editmenu.c:379 msgid Finish record macro... C-r @@ -634,11 +635,11 @@ msgstr Ukonèit záznam makra... C- #: edit/editmenu.c:356 msgid Execute macro... C-a, KEY -msgstr Provést makro... C-a, KLÁV +msgstr provést Makro... C-a, KLÁV #: edit/editmenu.c:357 edit/editmenu.c:381 msgid Delete macro... -msgstr Smazat makro +msgstr smazaT makro #: edit/editmenu.c:359 edit/editmenu.c:383 msgid Insert date/time @@ -658,15 +659,15 @@ msgstr Setøídit M- #: edit/editmenu.c:364 edit/editmenu.c:388 msgid Paste output of... M-u -msgstr +msgstr vlo¾it Výstup... #: edit/editmenu.c:365 edit/editmenu.c:389 msgid External Formatter F19 -msgstr Externí formátovaè F19 +msgstr eXterní formátovaè F19 #: edit/editmenu.c:366 edit/editmenu.c:390 msgid Mail... -msgstr oDeslat... +msgstr odEslat... #: edit/editmenu.c:380 msgid Execute macro... C-x e, KEY @@ -2290,9 +2291,8 @@ msgid Add current msgstr pøidat Tento #: src/hotlist.c:126 -#, fuzzy msgid Refresh -msgstr Pozpátku +msgstr Obnovit #: src/hotlist.c:127 msgid Free VFSs now @@ -2673,7 +2673,7 @@ msgstr sí»ové spojeNí... #: src/main.c:810 src/main.c:834 msgid FTP link... -msgstr FTP spojení... +msgstr FTP spojení... #: src/main.c:811 src/main.c:835 msgid Shell link... @@ -2697,7 +2697,7 @@ msgstr proHlédnout F3 #: src/main.c:847 msgid View file... -msgstr prohléDnout soubor... +msgstr prohLédnout soubor... #: src/main.c:848 msgid Filtered view M-! @@ -4161,9 +4161,8 @@ msgid ftpfs: sending user password msgstr ftpfs: heslo pro anonymní ftp odesláno #: vfs/ftpfs.c:478 -#, fuzzy, c-format msgid FTP: Account required for user %s -msgstr FTP: Heslo je vy¾adováno pro +msgstr FTP: Heslo je vy¾adováno pro %s #: vfs/ftpfs.c:480 #, fuzzy ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Czech translation needs fixups
Hello mc-devel, On Mon, 2005-10-03 at 13:43 +0200, Jindrich Novy wrote: 2005-10-03 Jindrich Novy [EMAIL PROTECTED] * cs.po: Fixed conflicts in keyboard shortcuts in mc and mcedit menus. Also fixed case of some keyboard shortcuts. please use the following patch instead. Yet another conflicts of menu shortcut keys were found. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1/po/cs.po.cstrans 2005-07-23 18:53:26.0 +0200 +++ mc-4.6.1/po/cs.po 2005-10-03 15:41:37.0 +0200 @@ -5,6 +5,7 @@ # Michal Svec [EMAIL PROTECTED] (Michal ©vec), 2000. # Stanislav Brabec [EMAIL PROTECTED], 2001, 2002. # Miloslav Trmac [EMAIL PROTECTED], 2003. +# Jindrich Novy [EMAIL PROTECTED], 2005. # msgid msgstr @@ -566,7 +567,7 @@ msgstr Pøehodit znaèky F3 #: edit/editmenu.c:320 msgid Mark ColumnsS-F3 -msgstr Znaèit sloupcovì S-F3 +msgstr zNaèit sloupcovì S-F3 #: edit/editmenu.c:322 msgid Toggle ins/overw Ins @@ -574,7 +575,7 @@ msgstr Vkládání/PøepisIns #: edit/editmenu.c:324 msgid Copy F5 -msgstr Kopírovat F5 +msgstr kOpírovat F5 #: edit/editmenu.c:325 msgid Move F6 @@ -618,7 +619,7 @@ msgstr jít na Párovou závorku M- #: edit/editmenu.c:350 edit/editmenu.c:374 msgid Insert literal... C-q -msgstr vlo¾it znak... C-q +msgstr vlo¾it Znak... C-q #: edit/editmenu.c:352 edit/editmenu.c:376 msgid Refresh screen C-l @@ -626,7 +627,7 @@ msgstr Obnovit obrazovkuC- #: edit/editmenu.c:354 edit/editmenu.c:378 msgid Start record macro C-r -msgstr zaèít zaznamenávat Makro C-r +msgstr zAèít zaznamenávat makro C-r #: edit/editmenu.c:355 edit/editmenu.c:379 msgid Finish record macro... C-r @@ -634,11 +635,11 @@ msgstr Ukonèit záznam makra... C- #: edit/editmenu.c:356 msgid Execute macro... C-a, KEY -msgstr Provést makro... C-a, KLÁV +msgstr provést Makro... C-a, KLÁV #: edit/editmenu.c:357 edit/editmenu.c:381 msgid Delete macro... -msgstr Smazat makro +msgstr smazaT makro #: edit/editmenu.c:359 edit/editmenu.c:383 msgid Insert date/time @@ -658,15 +659,15 @@ msgstr Setøídit M- #: edit/editmenu.c:364 edit/editmenu.c:388 msgid Paste output of... M-u -msgstr +msgstr vlo¾it Výstup... #: edit/editmenu.c:365 edit/editmenu.c:389 msgid External Formatter F19 -msgstr Externí formátovaè F19 +msgstr eXterní formátovaè F19 #: edit/editmenu.c:366 edit/editmenu.c:390 msgid Mail... -msgstr oDeslat... +msgstr odEslat... #: edit/editmenu.c:380 msgid Execute macro... C-x e, KEY @@ -2290,9 +2291,8 @@ msgid Add current msgstr pøidat Tento #: src/hotlist.c:126 -#, fuzzy msgid Refresh -msgstr Pozpátku +msgstr Obnovit #: src/hotlist.c:127 msgid Free VFSs now @@ -2673,7 +2673,7 @@ msgstr sí»ové spojeNí... #: src/main.c:810 src/main.c:834 msgid FTP link... -msgstr FTP spojení... +msgstr FTP spojení... #: src/main.c:811 src/main.c:835 msgid Shell link... @@ -2693,11 +2693,11 @@ msgstr U¾ivatelské menuF2 #: src/main.c:846 msgid View F3 -msgstr proHlédnout F3 +msgstr prohLédnout F3 #: src/main.c:847 msgid View file... -msgstr prohléDnout soubor... +msgstr pRohlédnout soubor... #: src/main.c:848 msgid Filtered view M-! @@ -2705,7 +2705,7 @@ msgstr Filtrovaný pohled M-! #: src/main.c:849 msgid Edit F4 -msgstr editovAtF4 +msgstr eDitovatF4 #: src/main.c:850 msgid Copy F5 @@ -4161,9 +4161,8 @@ msgid ftpfs: sending user password msgstr ftpfs: heslo pro anonymní ftp odesláno #: vfs/ftpfs.c:478 -#, fuzzy, c-format msgid FTP: Account required for user %s -msgstr FTP: Heslo je vy¾adováno pro +msgstr FTP: Heslo je vy¾adováno pro %s #: vfs/ftpfs.c:480 #, fuzzy ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Segmentation fault while copying symlink
Hello Hashem, On Tue, 2005-09-27 at 19:16 +0300, wraithlike wrote: Dear developers, I have a segmentation fault everytime I want to copy symlinks from the directory /etc/rc2.d to my directory (while being root). This happens see the thread below named: [BUG] Segmentation fault when copy symlink with checked Stable Symlinks where you can finad a patch to fix it. Since it's already committed, you can use mc checked out from CVS to have it fixed. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [BUG] Segmentation fault when copy symlink with checked Stable Symlinks
Hi Leonard, On Sat, 2005-09-17 at 12:59 +0200, Leonard den Ottolander wrote: Hi, On Sat, 2005-09-17 at 12:48 +0200, Leonard den Ottolander wrote: Hi Jindrich, On Tue, 2005-09-13 at 13:07 +0200, Jindrich Novy wrote: - my_second = resolve_symlinks (second); - if (my_second == NULL) { - g_free (my_first); + if (my_second == NULL) return buf; - } Why do you drop the g_free of my_first here? It seems like the whole if (j) block is redundant. Right? Yeah, the whole if (j) part is pretty bogus and can be removed. Apparently there's no leakage of my_first because the if (my_second == NULL) in the if (j) condition never succeed as it's checked already before the loop. So we can remove it safely. Thanks for the review. The changelog entries and separate patches are comming up. 2005-09-17 Jindrich Novy [EMAIL PROTECTED] * util.c: Fixed segfault in diff_two_paths() when symlink is copied with Stable Symlinks checked. * file.c: Fixed off-by-one indexing error in make_symlink() causing generation of dangled symlinks. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1/src/util.c.jn 2005-05-27 16:19:18.0 +0200 +++ mc-4.6.1/src/util.c 2005-09-17 13:58:47.0 +0200 @@ -1140,22 +1140,20 @@ * as needed up in first and then goes down using second */ char *diff_two_paths (const char *first, const char *second) { -char *p, *q, *r, *s, *buf = 0; +char *p, *q, *r, *s, *buf = NULL; int i, j, prevlen = -1, currlen; char *my_first = NULL, *my_second = NULL; my_first = resolve_symlinks (first); if (my_first == NULL) return NULL; +my_second = resolve_symlinks (second); +if (my_second == NULL) { + g_free (my_first); + return NULL; +} for (j = 0; j 2; j++) { p = my_first; - if (j) { - my_second = resolve_symlinks (second); - if (my_second == NULL) { - g_free (my_first); - return buf; - } - } q = my_second; for (;;) { r = strchr (p, PATH_SEP); --- mc-4.6.1/src/file.c.jn 2005-05-27 16:19:18.0 +0200 +++ mc-4.6.1/src/file.c 2005-09-17 13:58:20.0 +0200 @@ -382,7 +382,7 @@ const char *r = strrchr (src_path, PATH_SEP); if (r) { - p = g_strndup (src_path, r - src_path); + p = g_strndup (src_path, r - src_path + 1); if (*dst_path == PATH_SEP) q = g_strdup (dst_path); else ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [BUG] Segmentation fault when copy symlink with checked Stable Symlinks
Hello Marcin, On Tue, 2005-09-13 at 01:05 +0200, Marcin Garski wrote: Hi, mc-4.6.1a-0.11.FC4 from Fedora Core 4 on x86_64. 1. Create mc directory 2. Change directory to mc 3. Create .eDonkey2000 directory 4. Create .overnet symlink pointing to .eDonkey2000 5. Copy .overnet symlink to /tmp BUT check Stable Symlinks in copy dialog. 6. Watch mc crash If you want more info, just write :) I cannot reproduce it either on i386 or x86_64 box. My mc doesn't crash even if I have Stable Symlinks checked or not. rpm -q mc mc-4.6.1a-0.11.FC4 Some special setup is needed? Do you see this only on your machine or have you reproduced it on some other machine as well? Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [BUG] Segmentation fault when copy symlink with checked Stable Symlinks
On Tue, 2005-09-13 at 10:44 +0300, Pavel Tsekov wrote: Hello, On Tue, 13 Sep 2005, Jindrich Novy wrote: 1. Create mc directory 2. Change directory to mc 3. Create .eDonkey2000 directory 4. Create .overnet symlink pointing to .eDonkey2000 5. Copy .overnet symlink to /tmp BUT check Stable Symlinks in copy dialog. 6. Watch mc crash If you want more info, just write :) I cannot reproduce it either on i386 or x86_64 box. My mc doesn't crash even if I have Stable Symlinks checked or not. rpm -q mc mc-4.6.1a-0.11.FC4 Some special setup is needed? Do you see this only on your machine or have you reproduced it on some other machine as well? Doesn't seem so - see below: My setup: FC3 + MC from latest cvs [EMAIL PROTECTED] mc]$ ls -la total 52 drwxrwxr-x 3 ptsekov ptsekov 4096 Sep 13 10:38 . drwxr-xrwt 16 ptsekov ptsekov 40960 Sep 13 10:38 .. drwxrwxr-x 2 ptsekov ptsekov 4096 Sep 13 10:36 .eDonkey2000 lrwxrwxrwx 1 ptsekov ptsekov12 Sep 13 10:38 .overnet - .eDonkey2000 Yes, it crashes only with relative symlinks. When the symlink is created from within mc, the symlink is absolute so mc won't crash. Now I see the segfault. Marcin, could you please file a bug in bugzilla.redhat.com? The patch is comming soon. Thanks, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [BUG] Segmentation fault when copy symlink with checked Stable Symlinks
On Tue, 2005-09-13 at 12:18 +0300, Pavel Tsekov wrote: Hello, On Tue, 13 Sep 2005, Jindrich Novy wrote: Marcin, could you please file a bug in bugzilla.redhat.com? The patch is comming soon. Why use RedHat's bugzilla ? What's the problem with the one at savannah - after all this bug is not RH specific. Because Marcin wrote he had problems with FC4 mc. Don't worry, I'd send the patch here first ;) Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [BUG] Segmentation fault when copy symlink with checked Stable Symlinks
Hello, On Tue, 2005-09-13 at 01:05 +0200, Marcin Garski wrote: Hi, mc-4.6.1a-0.11.FC4 from Fedora Core 4 on x86_64. 1. Create mc directory 2. Change directory to mc 3. Create .eDonkey2000 directory 4. Create .overnet symlink pointing to .eDonkey2000 5. Copy .overnet symlink to /tmp BUT check Stable Symlinks in copy dialog. 6. Watch mc crash If you want more info, just write :) The attached patch fixes two nasty bugs in file.c and util.c. The first one is the off-by-one error in path indexing what causes a generation of dangled symlinks. The second one is the culprit of the segfault you presented. It applies cleanly to 4.6.1 release. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1/src/util.c.jn 2005-05-27 16:19:18.0 +0200 +++ mc-4.6.1/src/util.c 2005-09-13 12:57:02.0 +0200 @@ -1140,21 +1140,23 @@ * as needed up in first and then goes down using second */ char *diff_two_paths (const char *first, const char *second) { -char *p, *q, *r, *s, *buf = 0; +char *p, *q, *r, *s, *buf = NULL; int i, j, prevlen = -1, currlen; char *my_first = NULL, *my_second = NULL; my_first = resolve_symlinks (first); if (my_first == NULL) return NULL; +my_second= resolve_symlinks (second); +if (my_second == NULL) { + g_free (my_first); + return NULL; +} for (j = 0; j 2; j++) { p = my_first; if (j) { - my_second = resolve_symlinks (second); - if (my_second == NULL) { - g_free (my_first); + if (my_second == NULL) return buf; - } } q = my_second; for (;;) { --- mc-4.6.1/src/file.c.jn 2005-05-27 16:19:18.0 +0200 +++ mc-4.6.1/src/file.c 2005-09-13 12:57:02.0 +0200 @@ -382,7 +382,7 @@ const char *r = strrchr (src_path, PATH_SEP); if (r) { - p = g_strndup (src_path, r - src_path); + p = g_strndup (src_path, r - src_path + 1); if (*dst_path == PATH_SEP) q = g_strdup (dst_path); else ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [patch] fix crash when cancelling the search dialog
Hi Jindrich, On Sat, 2005-08-27 at 10:56 +0200, Jindrich Makovicka wrote: @@ -2787,8 +2787,8 @@ view-last_search = do_normal_search; cleanup: -g_free (exp); -g_free (defval); +if (exp) g_free (exp); +if (defval) g_free (defval); } static void This hunk is not needed as g_free() handles case of freeing NULL pointer. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: MC and file highlighting
On Wed, 2005-08-17 at 17:49 +0400, X-Stranger wrote: Hi all! I think it will be much better, if MC will be able to hightlight files on panels depending of it's extensions. I wrote a small patch (see attached file), that realises this feature. What do you think about to include it in MC source code? Regards, X-Stranger P.S. Patch realises file highlighting feature and a dialog to setup file extensions lists and save it into MC's ini-file. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel This is a very nice feature! It's what I missed since I was using the old good DOS Navigator very long ago. The patch seems sane, the only bad thing I found was the duplicated comment at line 543 in the patch that should be removed and one C++ comment at line 219 that should be changed to C one. The other thing that hit my eyes was the Solaris hack at line 428. Is that really needed? I feel that strsep() is sufficient here and the sunos_get_token() call might be a source of problems in the future regarding the portability of mc what brings a neglectable benefit (if any). Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Midnight Commander problem
Hello Kurt, On Mon, 2005-08-15 at 09:10 -0400, Wagner, Kurt wrote: I use a telnet application from my Windows 2000 client to connect to the Linux hosts. Have you tried to use ssh connection instead of the telnet one? Do the same problems occur when you use PuTTY? http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: mc editor small changes III - unified diff
Hello Frantisek, On Thu, 2005-08-11 at 09:07 +0200, František Řezníček wrote: here are the changes (just unified diff) : Please send the patch as an attachment for the next time, it makes extraction of it less painful. # Should I use the latest nighbuild and incorporate the changes there or you can # do it? The best is probably to send here a ported patch to one of the latest releases as it's likely that the patch will be applied smoothly to HEAD. # Could I hope to have these minor changes in the official mc? I modified the patch a bit so that it looks bit better now. Please avoid shipping commented-out code within the patch. The question is whether highlighting of '' and '' is desirable in all cases. Highlighting of such characters doesn't make too much sense when editing C source files for instance. mc-devel, what's your opition on this? Yes/No? Attaching the updated patch - applies smoothly to 4.6.1. Best, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ (o_ _o) //\ The worst evil in the world is refusal to think. //\ V_/_ _\_V --- mc-4.6.1/src/color.h.bracket 2004-09-02 00:33:43.0 +0200 +++ mc-4.6.1/src/color.h 2005-08-13 11:02:16.0 +0200 @@ -83,6 +83,8 @@ #define ERROR_HOT_NORMAL IF_COLOR (37, 0) #define ERROR_HOT_FOCUSIF_COLOR (38, 0) +#define EDITOR_MARKEDBRACKET_COLOR IF_COLOR (39, A_REVERSE) + #ifdef HAVE_SLANG # define CTYPE const char * #else --- mc-4.6.1/src/color.c.bracket 2005-05-27 16:19:18.0 +0200 +++ mc-4.6.1/src/color.c 2005-08-13 11:02:16.0 +0200 @@ -100,6 +100,7 @@ /* error dialog colors start at 37 */ { errdhotnormal=, 0, 0 }, /* Error dialog normal/hot */ /* 37 */ { errdhotfocus=, 0, 0 }, /* Error dialog focused/hot */ +{ markedbracket=, 0, 0 }, /* marked/selected bracket */ }; struct color_table_s { @@ -162,7 +163,8 @@ editbold=yellow,blue: editmarked=black,cyan: errdhotnormal=yellow,red: -errdhotfocus=yellow,lightgray; +errdhotfocus=yellow,lightgray: +markedbracket=yellow,brightmagenta; #ifdef HAVE_SLANG # define color_value(i) color_table [i].name --- mc-4.6.1/edit/edit.c.bracket 2005-08-13 11:02:15.0 +0200 +++ mc-4.6.1/edit/edit.c 2005-08-13 11:02:16.0 +0200 @@ -2147,7 +2147,7 @@ /* this find the matching bracket in either direction, and sets edit-bracket */ static long edit_get_bracket (WEdit * edit, int in_screen, unsigned long furthest_bracket_search) { -const char * const b = {}{[][()(, *p; +const char * const b = {}{[][()(, *p; int i = 1, a, inc = -1, c, d, n = 0; unsigned long j = 0; long q; @@ -2163,7 +2163,7 @@ /* the matching bracket */ d = p[1]; /* going left or right? */ -if (strchr ({[(, c)) +if (strchr ({[(, c)) inc = 1; for (q = edit-curs1 + inc;; q += inc) { /* out of buffer? */ --- mc-4.6.1/edit/editdraw.c.bracket 2005-08-13 11:02:15.0 +0200 +++ mc-4.6.1/edit/editdraw.c 2005-08-13 11:07:19.0 +0200 @@ -38,6 +38,7 @@ #define MOD_BOLD (1 9) #define MOD_MARKED (1 10) #define MOD_CURSOR (1 11) +#define MOD_MARKEDBRACKET (1 12) #define FONT_OFFSET_X 0 #define FONT_OFFSET_Y 0 @@ -235,6 +236,8 @@ set_color (EDITOR_BOLD_COLOR); } else if (style MOD_MARKED) { set_color (EDITOR_MARKED_COLOR); + } else if (style MOD_MARKEDBRACKET) { + set_color (EDITOR_MARKEDBRACKET_COLOR); } else { lowlevel_set_color (color); } @@ -292,7 +295,7 @@ p-style |= MOD_MARKED; } if (q == edit-bracket) - p-style |= MOD_BOLD; + p-style |= MOD_MARKEDBRACKET; if (q = edit-found_start q edit-found_start + edit-found_len) p-style |= MOD_BOLD; ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Let's have a release!
On Wed, 2005-07-20 at 15:19 +0200, Leonard den Ottolander wrote: Hi Miguel, Pavel, The latest pre release hasn't brought many serious issues to light. Pavel Tsekov fixed an old double free condition and one or two other buglets. We seen hardly any translation updates except for Dutch (which I did). I think it is time to finally have a release of 4.6.1. I'm satisfied with having had an official pre release and a few weeks time for testing. Afaict all the other developers are anxious for a release as well. Let's have it! Leonard. Not very frequently I use ASCII art, but this is my big __ __ _ _/ / / / / / _ \/ ___/ / / /_/ / __(__ )_/ \__, /\___/(_) // Please don't linger with mc release any more. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ The worst evil in the world is refusal to think. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Support for multi-byte charsets
Hello Andy, Pasha, mc-devel, On Sun, 2005-06-19 at 17:04 +0300, Andy Shevchenko wrote: Pasha Zubkov wrote: Does anybody srart working on support for mb charsets? Or it's any way to work with mc in UTF-8 enabled systems? Please, consider megapatch from FC/RH mc src.rpm. As I know (may be mistake) Jindrich moves UTF-8 support. Big part was written by Vlsdimir Nadvornik (from SuSE, Chech). What about native support? I don't know and I query maintainers here abou that. Yes, the UTF-8 support is planned to be included in mc-4.7.0 as far as I'm having a look into the TODO list. Pasha, you can use benefits of the UTF-8 patch in the Fedora Core mc. Even if it lacks a general concept, the important thing for you is that it works pretty well and I'm happy to see only a few bugreports related to UTF-8 patch coming recently from FC users. I was busy with my Ph.D. studies so I added some of fixes to the UTF-8 patch and only a few new features, so Jakub and Vladimir did the main work on the UTF-8 patch. It needs to be rewritten completely to be included to the upstream mc. Since I defended my Ph.D. last week, I plan to do the reimplementation of it in order to be included upstream as I have some time to spare. The main change would be likely to introduce new utf8.c and utf8.h source files with definitions needed to avoid the #ifdef UTF-8 hacks in the patch we have now. But it needs a discussion with Roland, Leonard and other interested developers. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ The worst evil in the world is refusal to think. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Release procedure
Hello Leonard, mc-devel, On Mon, 2005-06-06 at 23:34 +0200, Leonard den Ottolander wrote: Hello Miguel, On Mon, 2005-06-06 at 22:58, Miguel de Icaza wrote: I have made a tarball of the current trunk release and fixing a few issues in make distcheck, the question that remains is: what version should we use? Please use MC_4_6_1_PRE for the release of 4.6.1. Then we can use HEAD for 4.6.2 and onwards. All we need for PRE is possibly the fixes that proski introduced for gcc-4 warnings and some translations. That should suffice for 4.6.1. I would say you can call that code very stable. I can confirm that all the signedness gcc4 warnings are now gone in the current CVS. The only warnings I found were not gcc4 related with trivial fix, but it would be nice to see it fixed in the next mc release. I discussed this with Roland so maybe it's fixed now already. Attaching the patch anyway. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ The worst evil in the world is refusal to think. --- mc-4.6.1a/src/widget.c.fixes 2005-06-06 15:08:52.202559824 +0200 +++ mc-4.6.1a/src/widget.c 2005-06-06 15:08:29.120068896 +0200 @@ -2363,7 +2363,7 @@ buttonbar_set_label_data (Dlg_head *h, i void buttonbar_set_label (Dlg_head *h, int idx, const char *text, void (*cback) (void)) { -buttonbar_set_label_data (h, idx, text, cback, 0); +buttonbar_set_label_data (h, idx, text, (buttonbarfn)cback, 0); } void --- mc-4.6.1a/src/command.c.fixes 2005-05-27 05:35:15.0 +0200 +++ mc-4.6.1a/src/command.c 2005-06-06 15:07:38.228805544 +0200 @@ -280,7 +280,7 @@ command_callback (Widget *w, widget_msg_ /* fall through */ default: - return input_callback (cmd, msg, parm); + return input_callback (w, msg, parm); } } ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[PATCH][Fwd: Re: Xterm window title enhancement to hostname:/path II.]
Hello mc-devel, I haven't noticed any objection against this patch and many people consider it helpful. Any chance to see it committed? Thanks, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ The worst evil in the world is refusal to think. ---BeginMessage--- Hello Pavel, here is the patch where both hostname and username are printed in the xterm window title. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ --- mc-4.6.1a/src/main.c.hostname 2005-03-23 13:59:31.198747928 +0100 +++ mc-4.6.1a/src/main.c 2005-03-23 16:00:49.13592 +0100 @@ -32,6 +32,7 @@ #include sys/types.h #include sys/stat.h #include unistd.h +#include pwd.h #include global.h #include tty.h @@ -1612,9 +1613,22 @@ void update_xterm_title_path (void) { unsigned char *p, *s; +char h[64]; +struct passwd *pw; if (xterm_flag xterm_title) { p = s = g_strdup (strip_home_and_password (current_panel-cwd)); + if ( !gethostname (h, 64) ) { + h[63] = '\0'; /* Be sure the hostname is NUL terminated */ + s = g_strdup_printf (%s:%s, h, s); + g_free (p); + p = s; + } + if ( (pw = getpwuid(getuid())) ) { + s = g_strdup_printf ([EMAIL PROTECTED], pw-pw_name, s); + g_free (p); + p = s; + } do { if (*s ' ') *s = '?'; ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel ---End Message--- ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] space on prompt bugfix
Hello Andy, Oswald, On Wed, 2005-05-25 at 18:13 +0200, Oswald Buddenhagen wrote: On Wed, May 25, 2005 at 06:31:15PM +0300, Andy Shevchenko wrote: - why do you not drop tabspaces? hmm, indeed, if i go into troubles to press ctrl-q tab, the same issue comes up. I'm attaching the new patch to ignore the tab occurences in the command prompt as well. Pressing Ctrl-q tab isn't a daily practise for a common mc user, but it makes the patch more complete anyway, thanks. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ The worst evil in the world is refusal to think. --- mc-4.6.1a/src/main.c.spaceprompt 2005-05-26 15:06:42.285109424 +0200 +++ mc-4.6.1a/src/main.c 2005-05-26 15:15:15.964018360 +0200 @@ -1490,9 +1491,15 @@ midnight_callback (struct Dlg_head *h, d if (parm == '\t') free_completions (cmdline); - if (parm == '\n' cmdline-buffer[0]) { - send_message ((Widget *) cmdline, WIDGET_KEY, parm); - return MSG_HANDLED; + if (parm == '\n') { + for (i = 0; cmdline-buffer[i] + (cmdline-buffer[i] == ' ' || cmdline-buffer[i] == '\t'); i++); + if (cmdline-buffer[i]) { + send_message ((Widget *) cmdline, WIDGET_KEY, parm); + return MSG_HANDLED; + } + stuff (cmdline, , 0); + cmdline-point = 0; } /* Ctrl-Enter and Alt-Enter */ @@ -1527,7 +1534,7 @@ midnight_callback (struct Dlg_head *h, d reverse_selection_cmd (); return MSG_HANDLED; } - } else if (!command_prompt || !strlen (cmdline-buffer)) { + } else if (!command_prompt || !cmdline-buffer[0]) { /* Special treatement '+', '-', '\', '*' only when this is * first char on input line */ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] space on prompt bugfix
On Wed, 2005-06-01 at 13:32 +0200, Oswald Buddenhagen wrote: On Wed, Jun 01, 2005 at 11:10:16AM +0200, Jindrich Novy wrote: I'm attaching the new patch given that the other patch was finally applied, an incremental patch would be more helpful. I haven't noticed any post confirming the commitment, so I assumed it's not committed yet. anyway, i think the change can be commited without further comment ... Agreed. -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ The worst evil in the world is refusal to think. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] space on prompt bugfix
Hello Oswald, Leonard, On Tue, 2005-05-24 at 07:52 +0200, Oswald Buddenhagen wrote: On Mon, May 23, 2005 at 11:12:21PM +0200, Leonard den Ottolander wrote: On Mon, 2005-05-23 at 22:56, Oswald Buddenhagen wrote: this paranoid checking policy doesn't get us anywhere but to the current state of stagnation. Bollocks. [how reviewing is good, etc.] i was talking about the testing aspect, in particular. it will be tested after commit (apart from that i expect the author to have tested most possible situations already) Yes, I tested the patch already. Note that the code is pretty straightforward so there shouldn't be any regressions or something bad introduced committing the patch. I have this patch applied since 21st Mar 2005 in Fedora rawhide and nobody complained since then. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ The worst evil in the world is refusal to think. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Addressing MC stagnation.
Hello mc-devel, Miguel, On Sun, 2005-05-22 at 17:46 -0400, Miguel de Icaza wrote: Hello, Thanks for raising this issue up, I think that we should proceed in various stages to address some of the problems that we have today in mc: * The website should move to a Wiki. I will have our sysadmins setup a Wiki for MC based on the success we have had with Hula, Mono and Beagle. The use of the Wiki means that users can effectively contribute to the well state of the project, documentation, tutorials and addressing problems that people face. Also using the forum feature and discussion is a good way of keeping archives easily accessible to everyone. * Release-often: MC has not been officially released for a long time. I propose that the current CVS gets released as MC 5.0 and if any issues are found with the release we release 5.0.1, 5.0.2 and so on to address these problems. Sounds good to me. What about releasing mc in a given time period to prevent a lingered release cycle? Releasing a new mc (with changing its middle release number for instance) two times per year, say 1st Jan and 1st June, would be good at least for the downstream maintainer's point of view. Furthermore awareness of incoming release motivates people contributing to mc development to send all important patches before the date if they want to see them committed in the next release. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ The worst evil in the world is refusal to think. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: byte vs. character approach [was: Terminology concerning strings]
On Thu, 2005-04-07 at 09:29 +0200, The One wrote: Hi, How can I chang mc languege (menu,etc.) yo another language? Try to export LANG=pl_PL environment variable or simply type: LANG=pl_PL mc at the command prompt. (LANG=pl_PL.UTF-8 if you use UTF8ized mc) This actually sets Polish language. You can use any other supported language replacing pl_PL with another if it's supported by mc. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[PATCH] Re: Issues to fix before 4.6.1?
Hello Oswald, On Tue, 2005-03-29 at 22:37 +0200, Oswald Buddenhagen wrote: On Tue, Mar 29, 2005 at 05:46:33PM +0200, Jindrich Novy wrote: On Tue, 2005-03-29 at 11:07 +0300, Andrew V. Samoilov wrote: There is a data loss possible if file is edited with external editor over VFS. I have similar experience even with mcedit without VFS - data loss when disk quota is exceeded, the edited file is truncated to zero size. I had these problems with mc-4.5.51 so I'm not sure if it's still a problem with recent mc. i've had this just yesterday ... good luck it was no important file. this happens with the quick save mode ... it must, given the way it works. not sure it can be fixed properly at all without just switching to another mode. oh, well, it could be fixed to not lose data, but the resulting file would be a bit inconsistent. Seems like mc still tests presence of a file on local filesystem in rather brutal way when quick-saving: if (!vfs_file_is_local (filename) || (fd = mc_open (filename, O_WRONLY | O_BINARY)) == -1) what actually truncates the filename to zero size. The proposed patch modifies the opening mode to O_RDONLY so that we shouldn't lose any data at this point. Furthermore I noticed ctype.h is #included redundantly twice in edit_cmd.c. This fixes the second patch. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ --- mc/edit/editcmd.c.dontrewrite 2005-03-17 22:18:23.0 +0100 +++ mc/edit/editcmd.c 2005-03-30 09:28:25.076282176 +0200 @@ -240,7 +240,7 @@ edit_save_file (WEdit *edit, const char } if (!vfs_file_is_local (filename) || - (fd = mc_open (filename, O_WRONLY | O_BINARY)) == -1) { + (fd = mc_open (filename, O_RDONLY | O_BINARY)) == -1) { /* * The file does not exists yet, so no safe save or * backup are necessary. --- mc/edit/editcmd.c.ctype 2005-03-17 22:18:23.0 +0100 +++ mc/edit/editcmd.c 2005-03-30 10:05:48.983156480 +0200 @@ -24,7 +24,6 @@ /* #define PIPE_BLOCKS_SO_READ_BYTE_BY_BYTE */ #include config.h -#include ctype.h #include stdio.h #include stdarg.h ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Fw: Re: Xterm window title enhancement to hostname:/path II.
Hello Pavel, On Wed, 2005-03-23 at 17:06 +0100, Pavel Vvra wrote: What do you think about restoring of original title when mc ends? I usually open xterm with some title, then I run ssh client and then I run commander. When I run mc, title of window is changed, but when I exit mc last used title is still displayed as permanent title. Unfortunately I cannot reproduce your case. I see the xterm title correctly restored after I quit mc even if I ssh somewhere and launch mc there. Did I miss something? (using the latest CVS mc) Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Issues to fix before 4.6.1?
Hello Andrew, Pavel, On Tue, 2005-03-29 at 11:07 +0300, Andrew V. Samoilov wrote: There is a data loss possible if file is edited with external editor over VFS. I have similar experience even with mcedit without VFS - data loss when disk quota is exceeded, the edited file is truncated to zero size. I had these problems with mc-4.5.51 so I'm not sure if it's still a problem with recent mc. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Xterm window title enhancement to hostname:/path II.
Hello Pavel, On Fri, 2005-03-18 at 16:55 +0100, Pavel Vvra wrote: Sorry - I've attached wrong file so now it has to be a bit better. Hi developers, I've found a feature in last version of mc. It is really nice to change xterm window title to current path. One can check Window List in its Window Manager and find the right window there. It is really nice. But it is not enough if one is logged on another machines via ssh. Then Window list can look like: mc - /etc mc - /etc mc - /etc mc - /usr/src Well, but what is the right window what I am looking for? I want to switch to configuration window of my firewall. I need a bit different list: mc - debi:/etc mc - Firewall:/etc mc - Planet:/etc mc - workstation:/usr/src I like the idea you presented, so I reimplemented the hostname addition to xterm window title so that it can be committed. Please avoid using C++ comments in patches for the next time. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ --- mc-4.6.1a/src/main.c.hostname 2005-03-23 13:53:59.624154928 +0100 +++ mc-4.6.1a/src/main.c 2005-03-23 13:55:15.531615240 +0100 @@ -1612,9 +1612,16 @@ void update_xterm_title_path (void) { unsigned char *p, *s; +char h[64]; if (xterm_flag xterm_title) { p = s = g_strdup (strip_home_and_password (current_panel-cwd)); + if ( !gethostname(h, 64) ) { + h[63] = '\0'; /* Be sure the hostname is NUL terminated */ + s = g_strdup_printf(%s:%s, h, s); + g_free(p); + p = s; + } do { if (*s ' ') *s = '?'; ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Xterm window title enhancement to hostname:/path II.
Hello Pavel, here is the patch where both hostname and username are printed in the xterm window title. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ --- mc-4.6.1a/src/main.c.hostname 2005-03-23 13:59:31.198747928 +0100 +++ mc-4.6.1a/src/main.c 2005-03-23 16:00:49.13592 +0100 @@ -32,6 +32,7 @@ #include sys/types.h #include sys/stat.h #include unistd.h +#include pwd.h #include global.h #include tty.h @@ -1612,9 +1613,22 @@ void update_xterm_title_path (void) { unsigned char *p, *s; +char h[64]; +struct passwd *pw; if (xterm_flag xterm_title) { p = s = g_strdup (strip_home_and_password (current_panel-cwd)); + if ( !gethostname (h, 64) ) { + h[63] = '\0'; /* Be sure the hostname is NUL terminated */ + s = g_strdup_printf (%s:%s, h, s); + g_free (p); + p = s; + } + if ( (pw = getpwuid(getuid())) ) { + s = g_strdup_printf ([EMAIL PROTECTED], pw-pw_name, s); + g_free (p); + p = s; + } do { if (*s ' ') *s = '?'; ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [PATCH] space on prompt bugfix
Hello Martin, On Mon, 2005-03-21 at 17:42 +0100, [EMAIL PROTECTED] wrote: Patch2: Doesn't let the user to type leading spaces if he didn't write a non- space letter already. Not a good idea, since I think if you prepend a space to any command, the command is not saved in bash history - a feature. Sometimes it may be thus desirable to be able to type leading space if you do not want to save the command in history - your patch would disallow this Ok, I forgot about this feature, thanks for noticing this. So maybe Patch1 would be the best solution for the issue. Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: When will mc-4.6.2 be released?
Hello Marcel, On Fri, 2005-02-11 at 14:25 +0100, Marcel Pol wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Leonard den Ottolander wrote: | The problem with Fedora using a 4.6.1a tarball is caused by the fact | that Jindrich Novy didn't read pchel's message that HEAD is now a post | 4.6.1 branch and he should have been updating to MC_4_6_1_PRE instead. A small problem that comes from that is that the utf8 patches are developed against head now. There are a few rejects when applying to current 4.6.1. Since I'm no C coder I'm not able to upgrade the Mandrake package to current 4.6.1, and I'd rather not touch head. The failed hunks apply to these files: edit/editcmd.c src/view.c Would it be possible for someone to look at this? I asked Jindrich Novy directly but didn't get an answer, and the 0.4 release of the src.rpm is still based on head. I sent you a reply in the same day that I received your email, but I got an immediate delivery failure, because there were pernament fatal errors delivering the message to mpol[at]mandrake.org - the address you sent me your request from and I had no clue to figure out what's your working email. I forwarded you my answer once again today to the gmx.net mailbox that you currently use. I did a few another fixes to the UTF8 pathes that haven't occur at rawhide yet. If you still need to sync the UTF8 patches with your version of mc including the latest fixes, please let me know. greetings, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[RFE][PATCH] Allow cd smb://, cd sh://, cd mc:// vfs requests
Hi, since we can access ftp filesystems either like cd /#ftp: or more intuitively like cd ftp:// it's not a bad idea IMNSHO to add such extensions also for other filesystems. The attached patch implements such an extension and it makes vfs_translate_url() more comprehensive in the way that the aliases are kept in a separate table. strip_password() is modified to take the change in account. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ ChangeLog: * vfs.c (vfs_translate_url): Add support for smb://, sh:// and mc:// filesystem requests. Introduced separate table for vfs aliases. * util.c (strip_password): Modifications to take the aliases into account while eliminating passwords. --- mc-4.6.1a-20050202/vfs/vfs.c.vfs-url 2004-11-16 17:16:08.0 +0100 +++ mc-4.6.1a-20050202/vfs/vfs.c 2005-02-07 13:03:06.660269240 +0100 @@ -981,15 +981,28 @@ vfs_fill_names (fill_names_f func) * Returns vfs path corresponding to given url. If passed string is * not recognized as url, g_strdup(url) is returned. */ + +static const struct { +const char *name; +size_t name_len; +const char *substitute; +} url_table[] = { {ftp://;, 6, /#ftp:}, + {mc://, 5, /#mc:}, + {smb://, 6, /#smb:}, + {sh://, 5, /#sh:}, + {a:, 2, /#a} +}; + char * vfs_translate_url (const char *url) { -if (strncmp (url, ftp://;, 6) == 0) - return g_strconcat (/#ftp:, url + 6, (char *) NULL); -else if (strncmp (url, a:, 2) == 0) - return g_strdup (/#a); -else - return g_strdup (url); +int i; + +for (i = 0; i sizeof (url_table)/sizeof (url_table[0]); i++) + if (!strncmp (url, url_table[i].name, url_table[i].name_len)) + return g_strconcat (url_table[i].substitute, url + url_table[i].name_len, (char*)NULL); + +return g_strdup (url); } int vfs_file_is_local (const char *filename) --- mc-4.6.1a-20050202/src/util.c.vfs-url 2004-12-02 21:08:06.0 +0100 +++ mc-4.6.1a-20050202/src/util.c 2005-02-07 13:19:53.830156144 +0100 @@ -432,10 +432,13 @@ strip_password (char *p, int has_prefix) const char *name; size_t len; } prefixes[] = { {/#ftp:, 6}, - {/#mc:, 5}, {ftp://;, 6}, + {/#mc:, 5}, + {mc://, 5}, {/#smb:, 6}, - {/#sh:, 5} + {smb://, 6}, + {/#sh:, 5}, + {sh://, 5} }; char *at, *inner_colon, *dir; size_t i; ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[PATCH] Bad error checking after iconv() call
Hello, there's bad return-value checking after iconv() call in translate_character() in charsets.c: count = iconv (cd, ibuf, ibuflen, obuf, obuflen); if (count = 0 ibuflen == 0) Please note that count is size_t, what is at the most machines unsigned int so the left side of the condition is always true independently on the count value. [(size_t)(-1) is returned in case iconv() fails] This may lead to some weird drawing errors. Attached patch fixes this problem and makes translate_character() nicer a bit. Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ ChangeLog: * charsets.c (get_codepage_index): Fixed bad error checking after iconv() call. --- mc-4.6.1a-20050202/src/charsets.c.iconv-error 2004-08-30 12:38:00.0 +0200 +++ mc-4.6.1a-20050202/src/charsets.c 2005-02-07 10:31:57.523987520 +0100 @@ -142,17 +142,16 @@ get_codepage_index (const char *id) static char translate_character (iconv_t cd, char c) { -char outbuf[4], *obuf; +char obuf[4]; size_t ibuflen, obuflen, count; ICONV_CONST char *ibuf = c; -obuf = outbuf; ibuflen = 1; -obuflen = 4; +obuflen = sizeof(obuf); -count = iconv (cd, ibuf, ibuflen, obuf, obuflen); -if (count = 0 ibuflen == 0) - return outbuf[0]; +count = iconv (cd, ibuf, ibuflen, (char **)obuf, obuflen); +if (count != (size_t)(-1) ibuflen == 0) + return obuf[0]; return UNKNCHAR; } ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [RFE][PATCH] Allow cd smb://, cd sh://, cd mc:// vfs requests
Hello Dmitry, On Mon, 2005-02-07 at 16:14 +0300, buc wrote: Jindrich Novy wrote: since we can access ftp filesystems either like cd /#ftp: or more intuitively like cd ftp:// it's not a bad idea IMNSHO to add such extensions also for other filesystems. The attached patch implements such an extension and it makes vfs_translate_url() more comprehensive in the way that the aliases are kept in a separate table. strip_password() is modified to take the change in account. As you have already touched this part of the code, think about one more feature: replace /#ftp-like prefixes to ftp://-like on command line substitution (%d, %D, M-Enter, etc.) In most cases such substitution is used to form an argument of a command, i.e. rmp -i %D/%F, or lynx -dump %D . Currently, only internal cd command can eat /#ftp: . An ideal variant is: internal cd can handel both mc and general form, command line substitution should mostly use general form. I have a patch (written some years ago) for ftp://; case... I only wanted to propose a more intuitive way to access various VFSes to the most of users and to let them use the functionality ASAP. Some further work to let them make their life with mc more comfortable is welcome so if you have any pending patches similar to this problem, no one will be angry if you send them here ;) Cheers, Jindrich -- Jindrich Novy [EMAIL PROTECTED], http://people.redhat.com/jnovy/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel