Re: Find file dialog in mc-4.6.0-pre3
Hello, Thanks, for tracking this down! I guess I was the one responsible for this bug being introduced. On Sun, 26 Jan 2003, Arpi wrote: Hi, I've scanned a TODO list and found the item - Make find dialog more responsive - inside After 4.6.1 on 4.6.x branch section. But I think the responsiveness of the dialog is unacceptable for the 4.6.0 release. I missed the moment when it became so bad, (may be 1-3 I agree. So i went and hunted down the bug :) It's a nice 100l one, said in MPlayer terminology... In src/key.c, the is_idle() function is broken. It's called by the dialog loop (used by Find File too) to decide if call the callback fv (search for files) or handle the key/mouse events. The original code ends this way: timeout.tv_sec = 0; timeout.tv_usec = 0; select (maxfdp, select_set, 0, 0, timeout); return !FD_ISSET (0, select_set); which is, according to 'man select' broken at 2 points: int select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); n is the highest-numbered descriptor in any of the three sets, plus 1. ^^ so it should be: select (maxfdp+1, select_set, 0, 0, timeout); this may work on some select() implementations, i've heard that some ignores the first parameter and calculates it from the fd sets. but it's better fixed. and: FD_ISSET(int fd, fd_set *set); FD_ISSET tests to see if a descriptor is part of the set; this is useful after select returns. so it should be: return !FD_ISSET (input_fd, select_set); (the original code works only if input_fd==0) after changing these, find is responsive again! btw, NOTE: i didn't handled the gpm events, they need extra code, so the current is_idle() should be changed deep. I've just summarized the idea about the bug. If you want, i can prepare a commitable patch. A'rpi / Astral ESP-team -- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: rpm --nosignature
Hello, Arpi Fixed in CVS: 2002-12-29 Andrew V. Samoilov [EMAIL PROTECTED] * extfs/rpm: Use --nosignature only if rpm supports this. but in mc.ext it's still there: # RPM packages (SuSE uses *.spm for source packages) regex/\.(rpm|spm)$ Open=%cd %p#rpm View=%view{ascii} rpm -qivlp --nosignature --scripts %f Can somebody with RH 8.x distro test attached patch. I don't know is that rpm option order sensitive. -- Regards, Andrew V. Samoilov --- mc.ext.in Mon Jan 27 15:20:47 2003 +++ mc.ext.in Mon Jan 27 15:14:27 2003 @@ -487,7 +489,7 @@ # RPM packages (SuSE uses *.spm for source packages) regex/\.(rpm|spm)$ Open=%cd %p#rpm + View=%view{ascii} if rpm --nosignature --version /dev/null 21; then +RPM=rpm --nosignature ; else RPM=rpm fi ; $RPM -qivlp --scripts %f - View=%view{ascii} rpm -qivlp --nosignature --scripts %f # deb regex/\.deb$
facl ExtFS addon
Hello! I wrote an extfs script that allow to edit ACL and ExtAttrs on filesystems that support it. Currently it was tested on UFS of FreeBSD 5.0-RELEASE and Solaris 2.8 i86pc. As soon as possible I'll try to test it on Linux as well. Installation instructions and simple usage advices included. The URL is: http://www.valabs.spb.ru/files/facl-latest.tar.bz2 Attached is version 1.0.1, 1.0.2 is comming... -- With best regards, Valentin A. Alekseev E-mail: [EMAIL PROTECTED] Web: http://www.valabs.spb.ru/ facl-1.0.1.tar.bz2 Description: Binary data
mc compilation bug
mc-4.6.0-pre3 HP-UX 11.00 without X QPK 58.5 (sep. 2002) glib-1.2.10 config.log.bz2 Description: BZip2 compressed data config.status.bz2 Description: BZip2 compressed data configure.log.bz2 Description: BZip2 compressed data make.log.bz2 Description: BZip2 compressed data
Re: HP-UX and AIX buiild problems and patches
Hello! Alexander Varakin wrote: Hi, I tried to build mc-4.6.0-pre3 on HP-UX and AIX and ran into some problems, which I fixed, patches are attached. I was using native c compilers on both (xlc_r from Visual Age 5.0 on AIX, and aCC 3.31 on HP-UX) , which are more picky than gcc, so some fixes were required to make them happy. Well, I commited changed version of your HP patch to CVS. BTW, can you send me compiler output for src/util.c. I want to know, are there warnings or errors. -- Regards, Andrew V. Samoilov Index: mc/edit/ChangeLog diff -u mc/edit/ChangeLog:1.147 mc/edit/ChangeLog:1.148 --- mc/edit/ChangeLog:1.147 Wed Dec 25 17:53:07 2002 +++ mc/edit/ChangeLog Mon Jan 27 10:46:40 2003 @@ -1,3 +1,8 @@ +2003-01-27 Andrew V. Samoilov [EMAIL PROTECTED] + + * edit-widget.h (struct macro): Move definition ... + * edit.h: ... here to fix compilation on HP-UX. + 2002-12-25 Pavel Roskin [EMAIL PROTECTED] * editkeys.c: Move key maps to the file scope. Put common keys Index: mc/edit/edit.h diff -u mc/edit/edit.h:1.60 mc/edit/edit.h:1.61 --- mc/edit/edit.h:1.60 Wed Dec 25 17:53:07 2002 +++ mc/edit/edit.h Mon Jan 27 10:46:40 2003 @@ -102,10 +102,15 @@ #define MARK_2 7 #define KEY_PRESS 14 -/*Tabs spaces: (sofar only HALF_TAB_SIZE is used: */ +/* Tabs spaces: (sofar only HALF_TAB_SIZE is used: */ #define TAB_SIZE option_tab_spacing #define HALF_TAB_SIZE ((int) option_tab_spacing / 2) +struct macro { +short command; +short ch; +}; + struct selection { unsigned char * text; int len; @@ -221,7 +226,6 @@ void edit_right_word_move (WEdit * edit, int s); void edit_get_selection (WEdit * edit); -struct macro; int edit_save_macro_cmd (WEdit * edit, struct macro macro[], int n); int edit_load_macro_cmd (WEdit * edit, struct macro macro[], int *n, int k); void edit_delete_macro_cmd (WEdit * edit); Index: mc/edit/edit-widget.h diff -u mc/edit/edit-widget.h:1.13 mc/edit/edit-widget.h:1.14 --- mc/edit/edit-widget.h:1.13 Mon Dec 16 00:21:42 2002 +++ mc/edit/edit-widget.h Mon Jan 27 10:46:40 2003 @@ -7,11 +7,6 @@ #define MAX_MACRO_LENGTH 1024 #define N_LINE_CACHES 32 -struct macro { -short command; -short ch; -}; - #define BOOK_MARK_COLOR ((25 8) | 5) #define BOOK_MARK_FOUND_COLOR ((26 8) | 4)
Re: HP-UX and AIX buiild problems and patches
Alexander Varakin wrote: Hi Andrew, I don't have access to AIX box right now, but I am sure that the build problems in util.c are not warnings. The AIX xlc_r compiler is very strict, so it produced errors there. Attached hunk of your AIX patch is not clear for me: -- Regards, Andrew V. Samoilov *** mc-4.6.0-pre3/src/util.cWed Jan 22 01:12:16 2003 --- mc-4.6.0-pre3.org/src/util.cFri Jan 24 10:28:17 2003 *** *** 47,53 #include charsets.h #endif ! static const char app_text [] = Midnight-Commander; int easy_patterns = 1; static inline int --- 47,54 #include charsets.h #endif ! ! const char app_text [] = Midnight-Commander; int easy_patterns = 1; static inline int
Re: HP-UX and AIX buiild problems and patches
The problem here is that app_text was declared as extern const char app_text []; in header file, and then it was defined in c file as static const char app_text [] = which is not consistent, so the compiler complained about this. Alex From: Andrew V. Samoilov [EMAIL PROTECTED] To: Alexander Varakin [EMAIL PROTECTED] CC: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: HP-UX and AIX buiild problems and patches Date: Mon, 27 Jan 2003 19:17:23 +0200 Alexander Varakin wrote: Hi Andrew, I don't have access to AIX box right now, but I am sure that the build problems in util.c are not warnings. The AIX xlc_r compiler is very strict, so it produced errors there. Attached hunk of your AIX patch is not clear for me: -- Regards, Andrew V. Samoilov *** mc-4.6.0-pre3/src/util.c Wed Jan 22 01:12:16 2003 --- mc-4.6.0-pre3.org/src/util.c Fri Jan 24 10:28:17 2003 *** *** 47,53 #include charsets.h #endif ! static const char app_text [] = Midnight-Commander; int easy_patterns = 1; static inline int --- 47,54 #include charsets.h #endif ! ! const char app_text [] = Midnight-Commander; int easy_patterns = 1; static inline int _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: HP-UX and AIX buiild problems and patches
Alexander Varakin ÐÉÛÅÔ: The problem here is that app_text was declared as extern const char app_text []; in header file, and then it was defined in c file as static const char app_text [] = which is not consistent, so the compiler complained about this. Alex From: Andrew V. Samoilov [EMAIL PROTECTED] To: Alexander Varakin [EMAIL PROTECTED] CC: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: HP-UX and AIX buiild problems and patches Date: Mon, 27 Jan 2003 19:17:23 +0200 Alexander Varakin wrote: Hi Andrew, I don't have access to AIX box right now, but I am sure that the build problems in util.c are not warnings. The AIX xlc_r compiler is very strict, so it produced errors there. Attached hunk of your AIX patch is not clear for me: -- Regards, Andrew V. Samoilov *** mc-4.6.0-pre3/src/util.cWed Jan 22 01:12:16 2003 --- mc-4.6.0-pre3.org/src/util.cFri Jan 24 10:28:17 2003 *** *** 47,53 #include charsets.h #endif ! static const char app_text [] = Midnight-Commander; int easy_patterns = 1; static inline int --- 47,54 #include charsets.h #endif ! ! const char app_text [] = Midnight-Commander; int easy_patterns = 1; static inline int I removed app_text declaration from util.h. Thanks for report. MC compilation must be smoothly now on AIX and possible some other systems. -- Regards, Andrew V. Samoilov Index: mc/src/ChangeLog diff -u mc/src/ChangeLog:1.1108 mc/src/ChangeLog:1.1109 --- mc/src/ChangeLog:1.1108 Mon Jan 27 12:16:11 2003 +++ mc/src/ChangeLogMon Jan 27 12:51:53 2003 @@ -1,3 +1,9 @@ +2003-01-27 Andrew V. Samoilov [EMAIL PROTECTED] + + * mountlist.c (read_filesystem_list) [MOUNTED_GETMNTENT1]: + Check for MOUNTED is defined to fix compilation on AIX. + Reported by Alexander Varakin [EMAIL PROTECTED]. + 2003-01-27 Pavel Roskin [EMAIL PROTECTED] * main.c (update_xterm_title_path): Use is_printable(). Index: mc/src/mountlist.c diff -u mc/src/mountlist.c:1.14 mc/src/mountlist.c:1.15 --- mc/src/mountlist.c:1.14 Tue Sep 24 18:19:32 2002 +++ mc/src/mountlist.c Mon Jan 27 12:51:53 2003 @@ -201,13 +201,13 @@ mlist = mtail = me; #ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ +#ifdef MOUNTED { struct mntent *mnt; - char *table = MOUNTED; FILE *fp; char *devopt; - fp = setmntent (table, r); + fp = setmntent (MOUNTED, r); if (fp == NULL) return NULL; @@ -238,6 +238,7 @@ if (endmntent (fp) == 0) return NULL; } +#endif /* MOUNTED */ #endif /* MOUNTED_GETMNTENT1 */ #ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */
static linking with glib
Hi, Is it possible to link with glib statically, so there will be no need to carry glib libraries? Thanks, Alex _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: rpm --nosignature
Hi, Hello! Can somebody with RH 8.x distro test attached patch. I don't know is that rpm option order sensitive. It's working fine. Thank you! hmm. then teh same trick (if ... then) could be used for dpkg-less systems, to fallback to ar+tar if no dpkg installed: +# for dpkg-less systems: +# Open=%cd %p#uar +# View=%view{ascii} ar p %f control.tar.gz | tar xzO control ./control 2/dev/null ; echo ; echo Filelist: ; ar p %f data.tar.gz | tar tzv A'rpi / Astral ESP-team -- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu However, many people beg for its inclusion in Debian. Why? - Gabucino Because having new software in Debian is good. - Josselin Mouette Because having good software in Debian is new. - Gabucino ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: static linking with glib
How? From: Pavel Roskin [EMAIL PROTECTED] To: Alexander Varakin [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: static linking with glib Date: Mon, 27 Jan 2003 16:06:56 -0500 (EST) Hello! Is it possible to link with glib statically, so there will be no need to carry glib libraries? Yes. -- Regards, Pavel Roskin ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: .syntax file syntax changed since 4.5.4x?
Hello! Imho this thing should be cleaned up for 4.6.0, either remove numbers or color names or at least fix the manpage to explain what are them, instead of having examples using numbers and description using color names. Don't get me wrong, I'm not against fixing all you have mentioned (in this mail and others) - but we REALLY HAVE to release 4.6.0 as fast as we can - many people (like you before) still believe that 4.55 is the last official release, that the whole gmc-thing is still there and that mc is unmaintained and sucks. I agree with you, but this documentation problem is my fault. I overlooked this when I was changing the documentation about syntax highlighting. It won't take much time to fix. So we should have stable 4.6.0, and then merge your patches from amc (some of them are quite useful) or fix color handling. Pavel, now that you resolved the Italian .po problem, are there any problems that could slow down the 4.6.0 release? The problem was with Slovenian .po, not Italian. If you mean the growing help files, it was fixed before 4.6.0-pre3. I asked GNOME translators to update the translations and I wrote that the deadline is January 31. I'm waiting for major bugreports until then, so that we don't have anything like the AltGr bug in 4.6.0. I also want to do more testing on 64-bit systems (thanks for the pointer, by the way). So far I only tested Debian systems on Alpha and Itanium. I also want to do some testing on HP-UX and FreeBSD/Alpha. I'll be primarily interested in compile problems and warnings that indicate real problems. It looks like that I'll be busy next weekend, so the real release date will be most likely Monday, February 3. Please be assured that I do what I can to make the next release stable and reliable. I'm not resting - I have a lot of things to do, not all of which are related to mc, unfortunately. There is no specific problem that would prevent the release. I'm quite confident that we are one week from the 4.6.0 release. -- Regards, Pavel Roskin ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: .syntax file syntax changed since 4.5.4x?
Hi, I agree with you, but this documentation problem is my fault. I overlooked this when I was changing the documentation about syntax highlighting. It won't take much time to fix. I also meant fixing documentation. It looks like that I'll be busy next weekend, so the real release date will be most likely Monday, February 3. Great! Please be assured that I do what I can to make the next release stable and reliable. I'm not resting - I have a lot of things to do, not all of which are related to mc, unfortunately. There is no specific problem that would prevent the release. I'm quite confident that we are one week from the 4.6.0 release. Please fix the src/key.c::is_idle() select()-related bug, it's very annoying especially when running long file searches. A'rpi / Astral ESP-team -- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu However, many people beg for its inclusion in Debian. Why? - Gabucino Because having new software in Debian is good. - Josselin Mouette Because having good software in Debian is new. - Gabucino ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: static linking with glib
On Mon, 27 Jan 2003, Alexander Varakin wrote: How? Good question :-) Different methods I can think of: 1) Don't compile shared library if you don't have glib installed. 2) Make a directory, put a link to libglib.a there and add the directory to LDFLAGS: mkdir staticlibs ln -s /usr/lib/libglib.a staticlibs/ make LDFLAGS=-L`pwd`/staticlibs rm -rf staticlibs 3) Instruct the linker to pick the static library: make GLIB_LIBS='-Wl,-Bstatic -lglib -Wl,-Bdynamic' The same applies to all other libraries. -- Regards, Pavel Roskin ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re[2]: .syntax file syntax changed since 4.5.4x?
On Mon, 27 Jan 2003 16:37:32 -0500 (EST) Pavel Roskin [EMAIL PROTECTED] wrote: Please be assured that I do what I can to make the next release stable and reliable. I'm not resting - I have a lot of things to do, not all of which are related to mc, unfortunately. There is no specific problem that would prevent the release. I'm quite confident that we are one week from the 4.6.0 release. I hope find file dialog responsiveness will be fixed? I cannot test whether it is fixed already, as Changelog in anon cvs is dated 2003-01-24. Regards, Nerijus ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: rpm --nosignature
Hello! Can somebody with RH 8.x distro test attached patch. I don't know is that rpm option order sensitive. It's working fine. Thank you! hmm. then the same trick (if ... then) could be used for dpkg-less systems, to fallback to ar+tar if no dpkg installed: Yes, except that rpm and rpm --nosignature accept the same parameters, while ar and dpkg accept very different parameters. Maybe if dpkg is missing, the dpkg script should behave exactly as the uar script. +# for dpkg-less systems: +# Open=%cd %p#uar +# View=%view{ascii} ar p %f control.tar.gz | tar xzO control ./control 2/dev/null ; echo ; echo Filelist: ; ar p %f data.tar.gz | tar tzv That's something different. Checking for programs in PATH from mc.ext is not implemented, but it's planned. -- Regards, Pavel Roskin ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Find file dialog in mc-4.6.0-pre3
Hi, Thank you. The code you found is completely broken. However, your changes don't seem to make any difference for me. Could you please send a strange. it solved the problem completely for me, and it seems for others too. Your patch makes the difference when looking for filenames without searching file contents. Searching contents is still not responsive. It makes difference for bot, at least here, but... src/find.c::do_search() tries match on 32 files before it returns, so if scanning 32 files took more than 0.1-1 seconds then it's slow response. the worst case when you search inside a single very big file, it's no way to fix without big changes of teh find.c code. (being able to suspend search inside a file, save the position and then later (next call) continue from that point.) anyway that '32 files in a grpup' approach is quite lame, it would be better to measure time, and update panel/rot.dash and return at every 0.25 seconds or so. Or at least call is_idle() from inside do_search() after each file and return immediately (break the 32 counter) if zero. Applied. Thank you! thanks. By the way, it was my error. I cannot believe I wrote all that. I also wondered when realized those bugs :) A'rpi / Astral ESP-team -- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu However, many people beg for its inclusion in Debian. Why? - Gabucino Because having new software in Debian is good. - Josselin Mouette Because having good software in Debian is new. - Gabucino ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Find file dialog in mc-4.6.0-pre3
Hi, anyway that '32 files in a grpup' approach is quite lame, it would be better to measure time, and update panel/rot.dash and return at every 0.25 seconds or so. Or at least call is_idle() from inside do_search() after each file and return immediately (break the 32 counter) if zero. Maybe this is_idle() checking could be added to the regexp matching code of find.c, so it chould stop matching file immediately when key/mouse event received. Drawback is that matching will be restarted from pos 0 after processed the event :( But it's still better than waiting forever for the search to end... Imho 99% of events is 'cancel' so it should be ok as a hotfix for now. Btw i have some more ideas for the find code, if you don't mind i'll start hacking it. At first, I want that binary file matches show hex file position instead of line number, which is useless. And F3 start viewer in hex mode, at the position of the match. Currently it never shows the match for binary files... anyway the new find-contents code is very nice, compared to the old egrep-hack. A'rpi / Astral ESP-team -- Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu However, many people beg for its inclusion in Debian. Why? - Gabucino Because having new software in Debian is good. - Josselin Mouette Because having good software in Debian is new. - Gabucino ___ Mc-devel mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/mc-devel