Re: mcslang2
On Tue, 27 Sep 2005, Leonard den Ottolander wrote: All the discussion about slang2 and the utf-8 patch has inspired me to create an internal version of slang-2.0.4 to mc. This patch might still be somewhat rough around the edges, but it builds after a configure --with-screen=mcslang2. Please review. Well, this patch acutally doesn't apply very well. Excuse me, that I do not share your inspiration . 1) patching file configure.ac.000 This shouldn't be in the patch 2) The next patch would delete the file slang2/ChangeLog, which does not exist! Assume -R? [n] n 3) can't find file to patch at input line 3483 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |diff -pruN mc/slang2/Makefile.am mc.slang2/slang2/Makefile.am |--- mc/slang2/Makefile.am 2005-09-26 22:14:05.0 +0200 |+++ mc.slang2/slang2/Makefile.am 2005-09-27 00:16:07.0 +0200 -- 4) can't find file to patch at input line 3527 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |diff -pruN mc/slang2/README mc.slang2/slang2/README |--- mc/slang2/README 2004-11-01 07:30:43.0 +0100 |+++ mc.slang2/slang2/README2005-09-26 23:37:38.0 +0200 -- ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: mcslang2
This is plain wrong: diff -pruN mc/acinclude.m4 mc.slang2/acinclude.m4 --- mc/acinclude.m4 2005-07-20 14:45:13.0 +0200 +++ mc.slang2/acinclude.m4 2005-09-26 22:31:34.0 +0200 @@ -674,7 +674,11 @@ AC_DEFUN([MC_SLANG_PRIVATE], [ AC_CACHE_CHECK([if S-Lang exports private functions], [mc_cv_slang_private], [ ac_save_LIBS=$LIBS + #if SLANG_VERSION 2 LIBS=$LIBS -lslang + #else + LIBS=$LIBS -lslang2 + #endif AC_TRY_LINK([ #ifdef HAVE_SLANG_SLANG_H #include slang/slang.h @@ -711,7 +715,11 @@ dnl AC_DEFUN([MC_SLANG_TERMCAP], [ AC_CACHE_CHECK([if S-Lang uses termcap], [mc_cv_slang_termcap], [ ac_save_LIBS=$LIBS + #if SLANG_VERSION 2 LIBS=$LIBS -lslang + #else + LIBS=$LIBS -lslang2 + #endif AC_TRY_LINK([ #ifdef HAVE_SLANG_SLANG_H #include slang/slang.h You are not writing C code here - this is shell scripting. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: mcslang2
Hi Pavel, On Tue, 2005-09-27 at 15:13 +0300, Pavel Tsekov wrote: This is plain wrong: diff -pruN mc/acinclude.m4 mc.slang2/acinclude.m4 + #if SLANG_VERSION 2 You are not writing C code here - this is shell scripting. A similar construct is used on line 684 in the original file. With the correct patch applied this builds fine. Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: mcslang2
On Tue, 2005-09-27 at 15:13 +0300, Pavel Tsekov wrote: This is plain wrong: diff -pruN mc/acinclude.m4 mc.slang2/acinclude.m4 + #if SLANG_VERSION 2 You are not writing C code here - this is shell scripting. A similar construct is used on line 684 in the original file. With the correct patch applied this builds fine. Bootstrap the code and see the generated configure file. Similiar construct is used but in different context. I told you many times - you are too fast, too eager. -- 5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail +++ GMX - die erste Adresse für Mail, Message, More +++ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: mcslang2
Hi Pavel, On Tue, 2005-09-27 at 20:39 +0200, Pavel Tsekov wrote: Bootstrap the code and see the generated configure file. Similiar construct is used but in different context. I told you many times - you are too fast, too eager. I didn't say this patch was perfect yet. Looking for some feedback to improve it. Sorry for not posting the correct patch immediately. configure, make distcheck and a consequent build after configure --with-screen=mcslang2 is fine (assuming the correct patch is applied, which still awaits moderator approval, but you got it already). Please explain to me why the first use of #if SLANG_VERSION is invalid, but the second isn't. And what am I supposed to see in the configure script that needs correction? AC_DEFUN([MC_SLANG_PRIVATE], [ AC_CACHE_CHECK([if S-Lang exports private functions], [mc_cv_slang_private], [ ac_save_LIBS=$LIBS #if SLANG_VERSION 2 LIBS=$LIBS -lslang #else LIBS=$LIBS -lslang2 #endif AC_TRY_LINK([ #ifdef HAVE_SLANG_SLANG_H #include slang/slang.h #else #include slang.h #endif #if SLANG_VERSION = 1 extern unsigned int SLsys_getkey (void); #else extern unsigned int _SLsys_getkey (void); #endif Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Segmentation fault while copying symlink
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 when I choose the option (stable symlinks), but without this option the fault doesn't occur. My MC version follows: GNU Midnight Commander 4.6.1-pre3 Virtual File System: tarfs, extfs, cpiofs, ftpfs, fish, smbfs With builtin Editor Using included S-Lang library with terminfo database With subshell support as default With support for background operations With mouse support on xterm and Linux console With support for X11 events With internationalization support With multiple codepages support This is the standard debian package: 4.6.0-4.6.1-pre3-3 . Please CC me as I am not subscribed to your mailing list. Regards, -- Hashem Masoud ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: mcslang2
Leonard den Ottolander wrote: Hi Pavel, On Tue, 2005-09-27 at 20:39 +0200, Pavel Tsekov wrote: Bootstrap the code and see the generated configure file. Similiar construct is used but in different context. I told you many times - you are too fast, too eager. I didn't say this patch was perfect yet. Looking for some feedback to improve it. Sorry for not posting the correct patch immediately. configure, make distcheck and a consequent build after configure --with-screen=mcslang2 is fine (assuming the correct patch is applied, which still awaits moderator approval, but you got it already). Please explain to me why the first use of #if SLANG_VERSION is invalid, but the second isn't. And what am I supposed to see in the configure script that needs correction? AC_DEFUN([MC_SLANG_PRIVATE], [ AC_CACHE_CHECK([if S-Lang exports private functions], [mc_cv_slang_private], [ ac_save_LIBS=$LIBS #if SLANG_VERSION 2 LIBS=$LIBS -lslang #else LIBS=$LIBS -lslang2 #endif As Pavel already said, you are writing shell programs here. So the #if, #else and #endif are actually comments. Your linker will most likely have -lslang -lslang2 somewhere in its command line. Roland ___ 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: mcslang2
On Tue, 2005-09-27 at 20:39 +0200, Pavel Tsekov wrote: Bootstrap the code and see the generated configure file. Similiar construct is used but in different context. I told you many times - you are too fast, too eager. I didn't say this patch was perfect yet. Looking for some feedback to improve it. Sorry for not posting the correct patch immediately. And you got it. I actually started reviewing your patch. I never comment code without looking at it - if you read the list you should know that by now. I saw too many problems and decided to report them on the list instead of going further. The fact that you fail to understand what I am speaking about ... that I cannot explain. AC_DEFUN([MC_SLANG_PRIVATE], [ AC_CACHE_CHECK([if S-Lang exports private functions], [mc_cv_slang_private], [ ac_save_LIBS=$LIBS #if SLANG_VERSION 2 LIBS=$LIBS -lslang #else LIBS=$LIBS -lslang2 #endif Up to here you have shell code. AC_TRY_LINK([ #ifdef HAVE_SLANG_SLANG_H #include slang/slang.h #else #include slang.h #endif #if SLANG_VERSION = 1 extern unsigned int SLsys_getkey (void); #else extern unsigned int _SLsys_getkey (void); #endif Here you have the macro AC_TRY_LINK and a simple C program passed to it as an argument. The C program is written to a file and configure tries to build it and this way it decideds whether the symbol SLsys_getkey() is available. It is obvious that you are missing basic knowledge on configure magic. You did some copy/paste and you expect that it will just work ? -- Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko! Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: mcslang2
Hi Roland, On Tue, 2005-09-27 at 21:12 +0200, Roland Illig wrote: As Pavel already said, you are writing shell programs here. So the #if, #else and #endif are actually comments. Your linker will most likely have -lslang -lslang2 somewhere in its command line. I now see the private refers to the private slang functions in the *system* slang, which we only assume to be of version 1. So unless we will create the possibility to link against an external slang2 we do not need to fix that pseudo code :) . Just drop these two hunks as they have nothing to do with the internal versions of slang. Any more comments/improvements? Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: mcslang2
Hi Pavel, On Tue, 2005-09-27 at 21:47 +0200, Pavel Tsekov wrote: It is obvious that you are missing basic knowledge on configure magic. Right :-) . Thank you for helping me out there. You did some copy/paste and you expect that it will just work ? Well, when building --with-screen=mcslang2 didn't brought the problem to light, plus posting some pseudo code here would probably draw some useful comments so I can fix the parts that are incorrect. Anything more that needs fixing? By the way, the slang2 parts are unpatched wrt the change log entries in the slang directory. Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: new VFS directory listing parser
Hi Roland, On Tue, 2005-09-27 at 01:27 +0200, Roland Illig wrote: The current directory listing parser (for ftpfs and extfs) has problems with file names starting with white-space or a four-digit sequence. The latter is caused by the fact that different types of time format are accepted: Mon DD , Mon DD hh:mm, Mon DD hh:mm and Mon DD hh:mm . This makes it so the code doesn't know if it parsed the full date after having parsed the first 3 fields. How did you avoid this pitfall? There is nothing in the ls output that makes it obvious whether we've reached the last part of the date. If you've just dropped the assumption there are more than 3 fields and only accept Mon DD and Mon DD hh:mm as valid formats the existing code can quite easily be patched instead of doing a whole rewrite. See utilvfs.h around line 635 (This is a special case for ctime). Add a var got_time and stop parsing the date after either got_time or got_year. Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Proposal for simplification
Hello! I believe one thing that makes mc so hard to maintain is the amount of various compile time options. While it may be cool to have support for e.g. ncurses or for a 5 years old version of gettext, changes do break code, and the more options we try to support, the more likely is the breakage. In particular, writing correct configuration scripts is hard and not rewarding, i.e. no matter how much time you invest, things will break for someone a few months later. I believe mc is an established project that can dictate some dependencies to those who want to compile it. Since all the dependencies are free software, it's only matter of getting and installing them. I suggest that we do following: 1) Support only S-Lang 2 and only as an external library. Those who need mc will get S-Lang. I know, this is pretty harsh, but the next release is probably months away, and S-Lang 2 will be ubiquitous by then. 2) Drop support for non-VFS builds. When we have reports that VFS was ported to Win32, there is no point to keep it optional. VFS could also provide an intermediate layer for the local filesystem - that's something we cannot do when VFS is optional. 3) Support only versions of gettext that have ngettext(), i.e. drop gettext 0.10.x. -- Regards, Pavel Roskin ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: mcslang2
Hi, On Tue, 2005-09-27 at 21:56 +0200, Leonard den Ottolander wrote: I now see the private refers to the private slang functions in the *system* slang, Hm. I guess the above is not correct. It refers to the private functions in any version. Do we need -lslang2 when linking against slang2? Or will -lslang do? I.e. do we need to fix this pseudo code or can we just drop it? How can we establish the slang version there? Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Proposal for simplification
Hi Pavel, On Tue, 2005-09-27 at 16:42 -0400, Pavel Roskin wrote: 1) Support only S-Lang 2 and only as an external library. Those who need mc will get S-Lang. I know, this is pretty harsh, but the next release is probably months away, and S-Lang 2 will be ubiquitous by then. Pretty harsh indeed. I don't believe slang2 will be widespread within a few months. (If I did I wouldn't put the effort in getting an internal version ;) .) 2) Drop support for non-VFS builds. When we have reports that VFS was ported to Win32, there is no point to keep it optional. VFS could also provide an intermediate layer for the local filesystem - that's something we cannot do when VFS is optional. I've nothing against this, although I wonder how much effort it will save to disable this option. Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: mcslang2
On Tue, 27 Sep 2005, Leonard den Ottolander wrote: All the discussion about slang2 and the utf-8 patch has inspired me to create an internal version of slang-2.0.4 to mc. This patch might still be somewhat rough around the edges, but it builds after a configure --with-screen=mcslang2. Please review. just wondering, but why do you intend to keep two internal versions of slang? As slang2 is backwards compatible with slang1 (except for a few details that don't affect mc) it seems simpler to just upgrade the contents of the slang directory? And, no, -lslang2 doesn't make sense. It's just -lslang for both slang1 and slang2. Bart ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Proposal for simplification
Pavel Roskin wrote: 3) Support only versions of gettext that have ngettext(), i.e. drop gettext 0.10.x. There had been the suggestion that we don't use internal gettext at all. This would simplify at least the ./autogen.sh and the configure script. It would also reduce the size of the tarball by about 80k. Roland ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: mcslang2
Pavel Tsekov wrote: [...] I told you many times - you are too fast, too eager. This is not the right tone for feedback. Leonard hasn't yet committed his change. If he had, this tone would be appropriate. Please choose your words to sound a little more polite. Roland ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: mcslang2
Hi Bart, On Wed, 2005-09-28 at 09:13 +1200, Bart Oldeman wrote: just wondering, but why do you intend to keep two internal versions of slang? As slang2 is backwards compatible with slang1 (except for a few details that don't affect mc) it seems simpler to just upgrade the contents of the slang directory? I was just being cautious. We could include the second tree and test it while people who like to take a more conservative approach can stick with the first. Once everything works as expected we can always drop the first tree. (I noticed the prompt getting invisible on a panel toggle with mcslang2. Not sure if this is caused by the usage of slang2 or the fact that I ran mc from the build directory.) And, no, -lslang2 doesn't make sense. It's just -lslang for both slang1 and slang2. Right. Thanks :-) . That solves the discussed issue. The discussed hunks can thus be dropped. Any other breakage in my patch? Leonard. -- mount -t life -o ro /dev/dna /genetic/research ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel