Re: utf8 patch for mc, slang 2 version

2006-06-29 Thread Michail Vidiassov
Dear All,

On Wed, 14 Jun 2006, Egmont Koblinger wrote:

 On Tue, Jun 13, 2006 at 07:14:41PM +0200, Tomasz K?oczko wrote:

 BTW: anyone is working on UFT-8 support for ncurses(w) backend ?

 I don't think so, and I don't think it is worth it. Maintaining two backends
 IMHO just causes headaches while it doesn't make mc better. I still can't
 see why developers do not decide which one to use and drop the other one.

 With Unicode support maintaining the two will be much harder since AFAIK
 slang works with UTF-8 while ncurses uses UCS-4. Hence a completely
 different patch would be required for the two cases.


Why not to follow the way used in non-UTF mc,
and use curses-like calls (translated to ncurses calls or emulated by 
slang calls in myslang.h)?

   I have made mc 4.6.1 with UTF patches compile and run when
   linked against ncrurses 5.4 by replacing
   SLsmg_write_nwchars by addnwstr.

Thus, it may be a good idea to use addnwstr as the wide character output 
routine, addnwstr being a ncurses call or a wrapper around SLsmg_write_nwchars
  (along the lines addch is implemented now).

Sincerely, Michail

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[patch] Fix test for getmntinfo on NetBSD 3.0

2006-06-29 Thread Hampa Hug
Hello

It would seem that the test in acinclude.m4 for a NetBSD 3.0 style
getmntinfo() is wrong. The attached patch fixes this.

From the NetBSD 3.0 man page for getmntinfo(3):

RETURN VALUES
 On successful completion, getmntinfo() returns a count of the number of
 elements in the array.  The pointer to the array is stored into mntbufp.

 If an error occurs, zero is returned and the external variable errno is
 set to indicate the error.  Although the pointer mntbufp will be unmodi-
 fied, any information previously returned by getmntinfo() will be lost.

Hampa

diff -ur mc-cvs/acinclude.m4 mc-dev/acinclude.m4
--- mc-cvs/acinclude.m4 2006-06-20 17:04:13.0 +0200
+++ mc-dev/acinclude.m4 2006-06-29 04:21:45.0 +0200
@@ -306,7 +306,7 @@
 main ()
 {
 struct statvfs *mntbufp;
-exit (getmntinfo (mntbufp, MNT_NOWAIT));
+exit (getmntinfo (mntbufp, MNT_NOWAIT) == 0);
 }],
mc_cv_sys_mounted_getmntinfo_statvfs=yes,
mc_cv_sys_mounted_getmntinfo_statvfs=no,

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel