Re: Big patch for mcview
Pavel Tsekov wrote: Droping a short note that you've done the commit wouldn't hurt so much, would it ? Sorry, I forgot it. :( Committed. Roland ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [patch] Synchronization of the panels
On Fri, 8 Apr 2005, Pavel Tsekov wrote: > > Suggestions are welcome. > > Ok - several points: 8) Another thing that might be of interest. You can check if the directory you are monitoring resides on a vfs and if this is the case you have to disable monitoring for that directory. You can use the following method for example: int flags = vfs_file_class_flags (path); if (flags & VFSF_LOCAL) { ... } else { disable dnotify } ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [patch] Synchronization of the panels
Hello, On Sat, 2 Apr 2005, Siver Andrey wrote: > I've rewriten my previous patch (main.c.diff, sync.inc): > 1) Now synchronization is doing by time (SYNC_DELAY keeps inverval in > seconds; 2 secs by default); > 2) The synchronization is loosing for some DLG_ signals for efficiency; > 3) Add some errors checks. > > It looks a little more stable and faster. > > But there is some MC behaviour that I could not understand or explain > now. After some numbers of the update calls (3-5 and more), "enter" key > does not work any longer for any directory of the panel opposited to the > updating: error occurs: "cannot change directory". 'magic_path' function > does not detect any problem though. I do not know whether it due to my > patch, or due to MC or system property. > Also it looks like my patch behaviour depends on type of terminal... > Please test it. > > For those who possesses configure magic I also prepared patches for > main.h and configure.ac (I also registered "enable-synchro" option; it The configure patch is pretty simplistic - much more have to be done. I'll try to help with that. > will be useful until patch become stable); you may use sync4.h and > sync4.c also. Unfortunately I'm not such a person now :). Please, do not send two different sets of files for the same thing i.e. sync4.* and sync.inc. You should switch to sync4.c and sync4.h. > Suggestions are welcome. Ok - several points: 1) Have you tested your patch with `auto_menu' set to 1 ? From what I see by reading your patch you're forcing the code to send DLG_IDLE here: if (msg != DLG_IDLE && msg != DLG_INIT) { sync_need_panels_redraw = 0; set_idle_proc (h, 1); } This could be pretty nasty with the current processing code for DLG_INIT in `midnight_callback ()'. You can change the default value by editing the value of `auto_menu' in ~/.mc/ini to 1. 2) Your code will call multiple times `sync_setup_panels()' from within the DLG_IDLE handler in `midnight_callback()'. On systems which do not support dnotify it could be useful to have a flag which will indicate that dnotify is not present so `sync_setup_panels()' should do nothing after the first unsuccesful call i.e. if the following call fcntl(sync_fd[panel_id], F_NOTIFY, DN_MODIFY | DN_CREATE | DN_DELETE | DN_RENAME | DN_MULTISHOT ); fails and `errno' is set to EINVAL you can set a flag and do not call `sync_setup_panels ()' anymore for obvious reasons. Same for `loose_sync ()'. 3) You are doing a quite obscure error handling through the `sync_err' pointer. Also why do you set the different bits in in `sync_err' if you never check them ? 4) There seems to be no cleanup function which closes the open directory filedescriptors. Well you close them before opening them in `_setup_sync'. But a general cleanup should be available to be called on MC's termination or something like that. 5) Please, declare everything that you are going to use outside of the sync4 module in sync4.h . Also your changes to main.h should be actually put in sync4.h. Every function or variable that is used in sync4.c should be made static. 6) Avoid writing code like this if (!(sync_errs[0]||sync_errs[1])) add_hook(&idle_hook,update_hook,&sync_update_flag); /* hook for synchronization */ It should be written like this /* hook for synchronization */ if (!(sync_errs[0]||sync_errs[1])) add_hook(&idle_hook,update_hook,&sync_update_flag); You should try to arrange your code as the rest of MC's code. 6) You should include config.h at the beginning of sync4.c like this: #ifdef HAVE_CONFIG_H #include "config.h" #endif I think this is enough for now. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: keyboard bindings in mcedit (fwd)
Hello, Please, post to the list and not to my personal e-mail address - I do read the list as many others. -- Forwarded message -- Date: Fri, 8 Apr 2005 13:33:48 +0400 From: Vitja Makarov To: Pavel Tsekov Subject: Re: keyboard bindings in mcedit I've fixed some bugs... Have anyone tried it? ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: * utilvfs.c (is_localized_month): segfault fix
Hello, On Fri, 8 Apr 2005, Andrew V. Samoilov wrote: > Hello, > > > +while ((i < 3) && *month && !isdigit (*month) && !iscntrl (*month) > > + && !ispunct (*month)) { > > > > > > What about changing the above to: > > > > while ((i < 3) && *month && isalpha (*month)) > > There is comment some lines above: > > * isalpha() is locale specific, so it cannot be used if current > * locale is "C" and ftp server use Cyrillic. Well, iscntrl() and ispunct() are locale specific too. This comment doesn't really say much - it only indicates that many MC developers use Cyrillic. Anyway I see your point and the patch is good as is. On the other hand this code (is_localized_month) is not good enough to match all - what if the server uses chinese ? Maybe we should alter this code (its not urgent of course) to correctly handle international characters as per ftp://ftp.rfc-editor.org/in-notes/rfc2640.txt. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: * utilvfs.c (is_localized_month): segfault fix
Hello, > +while ((i < 3) && *month && !isdigit (*month) && !iscntrl (*month) > + && !ispunct (*month)) { > > > What about changing the above to: > > while ((i < 3) && *month && isalpha (*month)) There is comment some lines above: * isalpha() is locale specific, so it cannot be used if current * locale is "C" and ftp server use Cyrillic. -- Regards, Andrew V. Samoilov GET INTERNET ACCESS FROM BCS! http://www.bcs.zp.ua Join BCS today! For your FREE webmail, visit: http://email.zp.ua/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: keyboard bindings in mcedit
Hello, On Fri, 8 Apr 2005, Vitja Makarov wrote: > Hi, all! > > This patch implements user-defined keyboard bindings for mcedit. Bindings > are stored in ~/.mc/cooledit/cooledit.bindings file, attached file contains > patch against current cvs tree & configuration sample. What's the difference between this patch and the one that you've submitted on April 7. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
keyboard bindings in mcedit
Hi, all! This patch implements user-defined keyboard bindings for mcedit. Bindings are stored in ~/.mc/cooledit/cooledit.bindings file, attached file contains patch against current cvs tree & configuration sample. keybindings-0.1.tar.gz Description: GNU Zip compressed data ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: Big patch for mcview
Hello, On Wed, 6 Apr 2005, Roland Illig wrote: > Roland Illig wrote: > > Hi all, > > > > I must have had too much time, as I have partly rewritten mcview. The > > patch is quite large and changes many things. However, I have tested it > > with all available types of data sources (see the code for explanation), > > and it seems to work. > > Here is my second try for the viewer. As noted by Jindrich, I > accidentally removed an assignment to view->view_active. This has been > re-added. > > The current patch has been working fine for me for the last few weeks. > I'd like to commit it now, so that I can continue working on the > remaining issues to mcview. Droping a short note that you've done the commit wouldn't hurt so much, would it ? ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: * utilvfs.c (is_localized_month): segfault fix
Hello, On Thu, 7 Apr 2005, Andrew V. Samoilov wrote: +while ((i < 3) && *month && !isdigit (*month) && !iscntrl (*month) + && !ispunct (*month)) { What about changing the above to: while ((i < 3) && *month && isalpha (*month)) ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel