From INVALID.NOREPLY at gnu.org Tue Dec 2 20:39:59 2008 From: INVALID.NOREPLY at gnu.org (Zdenek Sojka) Date: Tue, 02 Dec 2008 20:39:59 +0000 Subject: [bug #24986] crash at startup because of using uninitialized variable Message-ID: <20081202-203958.sv71178.1972@savannah.gnu.org> URL: Summary: crash at startup because of using uninitialized variable Project: GNU Midnight Commander Submitted by: zsojka Submitted on: Tue 02 Dec 2008 08:39:58 PM GMT Category: None Severity: 3 - Normal Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Release: 4.6.2-pre1 Operating System: GNU/Linux _______________________________________________________ Details: Hello, mc crashes at startup (SIGSEGV) on my system after uninitialized variable is passed to tgetstr() in tty.c : 230. Initializing that variable to NULL fixes the problem for me. I will provide any further info if needed. Attached - patch and showcase (forcing non-NULL value to crash) (diffs against currect CVS) _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Tue 02 Dec 2008 08:39:58 PM GMT Name: startup_crash_fix.diff Size: 218B By: zsojka ------------------------------------------------------- Date: Tue 02 Dec 2008 08:39:58 PM GMT Name: force_invalid_value_to_crash.diff Size: 270B By: zsojka _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From slavazanko at gmail.com Tue Dec 2 21:54:09 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Tue, 02 Dec 2008 23:54:09 +0200 Subject: [bug #24986] crash at startup because of using uninitialized variable In-Reply-To: <20081202-203958.sv71178.1972@savannah.gnu.org> References: <20081202-203958.sv71178.1972@savannah.gnu.org> Message-ID: <4935AE81.3040206@gmail.com> Zdenek Sojka wrote: > mc crashes at startup (SIGSEGV) on my system after uninitialized variable is > passed to tgetstr() in tty.c : 230. > Initializing that variable to NULL fixes the problem for me. > > I will provide any further info if needed. > > Attached - patch and showcase (forcing non-NULL value to crash) > (diffs against currect CVS) http://mc.redhat-club.org/trac/changeset/170 Fixed. Thanks. WBR, Slavaz From INVALID.NOREPLY at gnu.org Tue Dec 2 22:34:06 2008 From: INVALID.NOREPLY at gnu.org (Roland Illig) Date: Tue, 02 Dec 2008 22:34:06 +0000 Subject: [bug #24986] crash at startup because of using uninitialized variable In-Reply-To: <20081202-203958.sv71178.1972@savannah.gnu.org> References: <20081202-203958.sv71178.1972@savannah.gnu.org> Message-ID: <20081202-233406.sv20990.38134@savannah.gnu.org> Update of bug #24986 (project mc): Severity: 3 - Normal => 4 - Important Open/Closed: Open => Accepted for 4.6.x _______________________________________________________ Reply to this item at: _______________________________________________ Nachricht geschickt von/durch Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Thu Dec 4 12:41:37 2008 From: INVALID.NOREPLY at gnu.org (volk) Date: Thu, 04 Dec 2008 12:41:37 +0000 Subject: [bug #21461] Rename norwegian locale/translation In-Reply-To: <20080131-141514.sv63239.86924@savannah.gnu.org> References: <20071029-104549.sv63239.6755@savannah.gnu.org> <20071029-123643.sv1871.51365@savannah.gnu.org> <20071029-154513.sv36205.53801@savannah.gnu.org> <20071030-001323.sv1871.2084@savannah.gnu.org> <20071030-105511.sv36205.25595@savannah.gnu.org> <20080131-141514.sv63239.86924@savannah.gnu.org> Message-ID: <20081204-124136.sv71204.95602@savannah.gnu.org> Follow-up Comment #6, bug #21461 (project mc): download free video http://freeanalpornmovies.pornlivenews.com _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Thu Dec 4 12:41:47 2008 From: INVALID.NOREPLY at gnu.org (volk) Date: Thu, 04 Dec 2008 12:41:47 +0000 Subject: [bug #19436] read (subshell_pty...): No such file or directory (2) on mc compiled with subshel In-Reply-To: <20081124-114626.sv70927.93162@savannah.gnu.org> References: <20070328-120738.sv58080.19234@savannah.gnu.org> <20070329-045007.sv36205.39621@savannah.gnu.org> <20070421-122447.sv36205.39889@savannah.gnu.org> <20081119-113132.sv70934.98921@savannah.gnu.org> <20081124-114626.sv70927.93162@savannah.gnu.org> Message-ID: <20081204-124147.sv71204.28542@savannah.gnu.org> Follow-up Comment #5, bug #19436 (project mc): http://freeanalpornmovies.pornlivenews.com _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Fri Dec 5 11:22:15 2008 From: INVALID.NOREPLY at gnu.org (aeda) Date: Fri, 05 Dec 2008 11:22:15 +0000 Subject: [bug #19721] Aborting a FISH file transfer still causes the FISH layer to consume the whole file In-Reply-To: <20081126-160842.sv70931.40005@savannah.gnu.org> References: <20070427-114045.sv36205.32834@savannah.gnu.org> <20070427-142017.sv41304.77917@savannah.gnu.org> <20070427-163847.sv36205.49379@savannah.gnu.org> <20070502-162029.sv36205.46307@savannah.gnu.org> <20070507-160626.sv36205.38172@savannah.gnu.org> <20070507-181832.sv41304.56007@savannah.gnu.org> <20081119-100741.sv70931.92167@savannah.gnu.org> <20081126-110051.sv71049.25440@savannah.gnu.org> <20081126-160842.sv70931.40005@savannah.gnu.org> Message-ID: <20081205-112214.sv71230.64844@savannah.gnu.org> Follow-up Comment #9, bug #19721 (project mc): http://freelesbianporn.pornlivenews.com/ free lesbian porn http://freelesbianporn.pornlivenews.com/articles/628050/lesbian-orgasm-using-a-vibrator lesbians with vibrators _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Fri Dec 5 11:48:51 2008 From: INVALID.NOREPLY at gnu.org (aeda) Date: Fri, 05 Dec 2008 11:48:51 +0000 Subject: [bug #18977] Case insensetive search in mc doesn't work In-Reply-To: <20080502-124805.sv63438.68438@savannah.gnu.org> References: <20070206-214647.sv20252.23973@savannah.gnu.org> <20070208-114520.sv36205.17217@savannah.gnu.org> <20070220-220559.sv36205.41400@savannah.gnu.org> <20080502-124805.sv63438.68438@savannah.gnu.org> Message-ID: <20081205-114850.sv71230.57934@savannah.gnu.org> Follow-up Comment #4, bug #18977 (project mc): http://freelesbianporn.pornlivenews.com free lesbian movies _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Fri Dec 5 12:55:30 2008 From: INVALID.NOREPLY at gnu.org (aeda) Date: Fri, 05 Dec 2008 12:55:30 +0000 Subject: [bug #21030] "preserve Attributes" unchecked, but chmod errors still there In-Reply-To: <20081126-141920.sv71018.94976@savannah.gnu.org> References: <20070911-093808.sv57722.11718@savannah.gnu.org> <20070913-123531.sv36205.2364@savannah.gnu.org> <20070913-154930.sv36205.94070@savannah.gnu.org> <20070913-143434.sv57722.43298@savannah.gnu.org> <20070917-220346.sv36205.73955@savannah.gnu.org> <20070917-220402.sv36205.63423@savannah.gnu.org> <20081126-141920.sv71018.94976@savannah.gnu.org> Message-ID: <20081205-125529.sv71230.38500@savannah.gnu.org> Follow-up Comment #6, bug #21030 (project mc): http://freelesbiansvideos.pornlivenews.com/ free lesbian videos http://freelesbiansvideos.pornlivenews.com/articles/616965/college-lesbians-fucks-ans-licks-clitors college lesbian girls http://freelesbiansvideos.pornlivenews.com/articles/616963/lesbian-girls-with-vibrators girls vith vibrators _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Sun Dec 7 18:44:05 2008 From: INVALID.NOREPLY at gnu.org (aeda) Date: Sun, 07 Dec 2008 18:44:05 +0000 Subject: [bug #22300] Hang on directory change when not run as root In-Reply-To: <20081127-121600.sv71073.94024@savannah.gnu.org> References: <20080213-025719.sv65499.64611@savannah.gnu.org> <20080309-125737.sv36205.18208@savannah.gnu.org> <20080425-165859.sv65499.50134@savannah.gnu.org> <20080426-152107.sv65499.90777@savannah.gnu.org> <20081127-121600.sv71073.94024@savannah.gnu.org> Message-ID: <20081207-184404.sv71230.22098@savannah.gnu.org> Follow-up Comment #5, bug #22300 (project mc): http://sexinpublicplaces.pornlivenews.com/ Sex in public places http://sexinpublicplaces.pornlivenews.com/articles/631674/free-outdoor-sex-galleries outdoor sex galleries http://sexinpublicplaces.pornlivenews.com/articles/631613/public-masturbating-video Public masturbating video _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From roland.illig at gmx.de Tue Dec 9 12:44:33 2008 From: roland.illig at gmx.de (Roland Illig) Date: Tue, 09 Dec 2008 13:44:33 +0100 Subject: [patch] Invoking mcedit with filename:lineno Message-ID: <493E6831.4060500@gmx.de> Hi, many programs output warnings and errors in the format filename:lineno[:]. The attached patch allows users to just copy and paste these locations and invoke mcedit with them. For example: $ mcedit main.c:2000 The patch maintains the usual behavior as much as possible. That is, the new format is only used when the file "main.c:2000" doesn't exist, but "main.c" exists. Opinions? Roland -------------- next part -------------- A non-text attachment was scrubbed... Name: mcedit-file-lineno.patch Type: text/x-patch Size: 2726 bytes Desc: not available URL: From plex2007 at gmail.com Thu Dec 11 01:11:10 2008 From: plex2007 at gmail.com (Johnny Bravo) Date: Thu, 11 Dec 2008 02:11:10 +0100 Subject: MC problem with f3 i f4 keys Message-ID: <226d9de50812101711w3756d38dj2f94dc59b310073d@mail.gmail.com> Im use Gentoo linux. After i update glibc to 2.9_p20081201 version. In my mc f3 i f4 stop working. That a little disturbe. I use kde. help me pls mc -V GNU Midnight Commander 4.6.1 Wirtualny System Plik?w: tarfs, extfs, cpiofs, ftpfs, fish, smbfs, undelfs Z wbudowanym edytorem U?ywanie biblioteki S-Lang zainstalowanej w systemie z baz? danych terminfo Z domy?ln? obs?ug? podpow?oki Z mo?liwo?ci? wykonywania zada? w tle Z obs?ug? myszy w oknie xterma i na konsoli linuksowej Z obs?ug? zdarze? X11 Z obs?ug? wielu j?zyk?w Z obs?ug? wielu stron kodowych -------------- next part -------------- An HTML attachment was scrubbed... URL: From i92guboj at terra.es Thu Dec 11 15:00:28 2008 From: i92guboj at terra.es (=?iso-8859-1?Q?Jes=FAs_Guerrero?=) Date: Thu, 11 Dec 2008 16:00:28 +0100 (CET) Subject: MC problem with f3 i f4 keys In-Reply-To: <226d9de50812101711w3756d38dj2f94dc59b310073d@mail.gmail.com> References: <226d9de50812101711w3756d38dj2f94dc59b310073d@mail.gmail.com> Message-ID: On Thu, December 11, 2008 02:11, Johnny Bravo wrote: > Im use Gentoo linux. After i update glibc to 2.9_p20081201 > version. In my mc f3 i f4 stop working. That a little disturbe. > I use kde. I use Gentoo as well and updated glibc right today as well. But I can't reproduce your problem. I advise you to try mc using another terminal emulator and if that doesn't work, try another window manager that you can compile in five minutes (flux or whatever suits you). MC seems to continue working ok, maybe it's your wm or your terminal emulator which broke and/or is intercepting those keys. Just a thought. Cheers. -- Jes?s Guerrero From INVALID.NOREPLY at gnu.org Mon Dec 15 09:25:05 2008 From: INVALID.NOREPLY at gnu.org (ghjgfjhgkjk) Date: Mon, 15 Dec 2008 09:25:05 +0000 Subject: [bug #20182] enter vfs with cmdline buffer In-Reply-To: <20081126-105206.sv71049.189@savannah.gnu.org> References: <20070616-073643.sv58618.54805@savannah.gnu.org> <20070823-175810.sv36205.81566@savannah.gnu.org> <20070823-160117.sv58618.22731@savannah.gnu.org> <20070824-173408.sv36205.7039@savannah.gnu.org> <20071006-090319.sv58618.72936@savannah.gnu.org> <20081126-105206.sv71049.189@savannah.gnu.org> Message-ID: <20081215-092505.sv71380.20292@savannah.gnu.org> Follow-up Comment #6, bug #20182 (project mc): http://myfirsttimeorgasm.pornlivenews.com/ My first time orgasm _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Mon Dec 15 09:26:15 2008 From: INVALID.NOREPLY at gnu.org (ghjgfjhgkjk) Date: Mon, 15 Dec 2008 09:26:15 +0000 Subject: [bug #17269] localized headers in .mc/history In-Reply-To: <20081127-122421.sv71073.8678@savannah.gnu.org> References: <20060802-124815.sv20032.51671@savannah.gnu.org> <20060802-151832.sv26390.62487@savannah.gnu.org> <20060802-140908.sv20032.46143@savannah.gnu.org> <20060913-122823.sv36205.28497@savannah.gnu.org> <20060913-100025.sv20032.51449@savannah.gnu.org> <20060913-153817.sv36205.51800@savannah.gnu.org> <20060913-165515.sv36205.54525@savannah.gnu.org> <20060919-112444.sv36205.57809@savannah.gnu.org> <20081119-100155.sv70931.30639@savannah.gnu.org> <20081127-122421.sv71073.8678@savannah.gnu.org> Message-ID: <20081215-092614.sv71380.74753@savannah.gnu.org> Follow-up Comment #10, bug #17269 (project mc): http://myfirsttimeorgasm.pornlivenews.com/ My first time orgasm _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From nerijus at users.sourceforge.net Tue Dec 16 00:52:06 2008 From: nerijus at users.sourceforge.net (Nerijus Baliunas) Date: Tue, 16 Dec 2008 02:52:06 +0200 Subject: Getting ready for a release In-Reply-To: References: <20070904085742.152880@gmx.net> Message-ID: Just FYI - http://mc.redhat-club.org. Another fork, and it is included in tigro repo for Fedora. They recently released version 4.6.3. On Wed, 20 Aug 2008 00:06:34 +0300 Nerijus Baliunas wrote: > Hello, > > are there any plans for a new release? > > On Tue, 04 Sep 2007 10:57:42 +0200 Pavel Tsekov wrote: > > > Hello, > > > > As it has been discussed on the mailing list a new release of MC is long > > overdue. So... I plan to release a new version of MC by mid October. This gives us about a month (till the end of September) for final testing, bug reporting, fixing, updating translations and other related tasks - the last two are to be used by translators to update the MC translation. I hope that everyone interested will participate in this process so that we can finally release a new version. > > > > There are three full weeks by the end of September which can be used to release at most 3 pre-releases and give each a week of testing and polishing (depending on the user feedback). I am going to wait till the end of this week for your suggestions on how to use the remaining three weeks and make a plan according to them, then I'll publish the first pre-release on Monday. This reminds me that we have another problem to solve - > > how are we going to number the new release ? Please, share your thoughts on that too. From INVALID.NOREPLY at gnu.org Tue Dec 16 16:23:12 2008 From: INVALID.NOREPLY at gnu.org (fdsfsdf) Date: Tue, 16 Dec 2008 16:23:12 +0000 Subject: [bug #19721] Aborting a FISH file transfer still causes the FISH layer to consume the whole file In-Reply-To: <20081209-094506.sv71286.62807@savannah.gnu.org> References: <20070427-114045.sv36205.32834@savannah.gnu.org> <20070427-142017.sv41304.77917@savannah.gnu.org> <20070427-163847.sv36205.49379@savannah.gnu.org> <20070502-162029.sv36205.46307@savannah.gnu.org> <20070507-160626.sv36205.38172@savannah.gnu.org> <20070507-181832.sv41304.56007@savannah.gnu.org> <20081119-100741.sv70931.92167@savannah.gnu.org> <20081126-110051.sv71049.25440@savannah.gnu.org> <20081126-160842.sv70931.40005@savannah.gnu.org> <20081205-112214.sv71230.64844@savannah.gnu.org> <20081209-094506.sv71286.62807@savannah.gnu.org> Message-ID: <20081216-162311.sv71407.8025@savannah.gnu.org> Follow-up Comment #11, bug #19721 (project mc): http://freeblowjobvideos.pornlivenews.com/ free blowjob videos http://freeblowjobvideos.pornlivenews.com/articles/652975/sloppy-office-blowjob office blowjob _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Tue Dec 16 16:23:58 2008 From: INVALID.NOREPLY at gnu.org (fdsfsdf) Date: Tue, 16 Dec 2008 16:23:58 +0000 Subject: [bug #20182] enter vfs with cmdline buffer In-Reply-To: <20081215-092505.sv71380.20292@savannah.gnu.org> References: <20070616-073643.sv58618.54805@savannah.gnu.org> <20070823-175810.sv36205.81566@savannah.gnu.org> <20070823-160117.sv58618.22731@savannah.gnu.org> <20070824-173408.sv36205.7039@savannah.gnu.org> <20071006-090319.sv58618.72936@savannah.gnu.org> <20081126-105206.sv71049.189@savannah.gnu.org> <20081215-092505.sv71380.20292@savannah.gnu.org> Message-ID: <20081216-162358.sv71407.27812@savannah.gnu.org> Follow-up Comment #7, bug #20182 (project mc): http://freeblowjobvideos.pornlivenews.com/articles/652975/sloppy-office-blowjob office blowjob http://freeblowjobvideos.pornlivenews.com/articles/652973/homemade-blowjob-facial-video Homemade blowjob facial video _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Wed Dec 17 07:14:47 2008 From: INVALID.NOREPLY at gnu.org (fdsfsdf) Date: Wed, 17 Dec 2008 07:14:47 +0000 Subject: [bug #17269] localized headers in .mc/history In-Reply-To: <20081215-092614.sv71380.74753@savannah.gnu.org> References: <20060802-124815.sv20032.51671@savannah.gnu.org> <20060802-151832.sv26390.62487@savannah.gnu.org> <20060802-140908.sv20032.46143@savannah.gnu.org> <20060913-122823.sv36205.28497@savannah.gnu.org> <20060913-100025.sv20032.51449@savannah.gnu.org> <20060913-153817.sv36205.51800@savannah.gnu.org> <20060913-165515.sv36205.54525@savannah.gnu.org> <20060919-112444.sv36205.57809@savannah.gnu.org> <20081119-100155.sv70931.30639@savannah.gnu.org> <20081127-122421.sv71073.8678@savannah.gnu.org> <20081215-092614.sv71380.74753@savannah.gnu.org> Message-ID: <20081217-071446.sv71407.90717@savannah.gnu.org> Follow-up Comment #11, bug #17269 (project mc): http://hardcorefuckingmovies.pornlivenews.com/ _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Wed Dec 17 07:15:56 2008 From: INVALID.NOREPLY at gnu.org (fdsfsdf) Date: Wed, 17 Dec 2008 07:15:56 +0000 Subject: [bug #20182] enter vfs with cmdline buffer In-Reply-To: <20081216-162358.sv71407.27812@savannah.gnu.org> References: <20070616-073643.sv58618.54805@savannah.gnu.org> <20070823-175810.sv36205.81566@savannah.gnu.org> <20070823-160117.sv58618.22731@savannah.gnu.org> <20070824-173408.sv36205.7039@savannah.gnu.org> <20071006-090319.sv58618.72936@savannah.gnu.org> <20081126-105206.sv71049.189@savannah.gnu.org> <20081215-092505.sv71380.20292@savannah.gnu.org> <20081216-162358.sv71407.27812@savannah.gnu.org> Message-ID: <20081217-071556.sv71407.48909@savannah.gnu.org> Follow-up Comment #8, bug #20182 (project mc): http://hardcorefuckingmovies.pornlivenews.com/articles/651952/blonde-female-in-hard-anal-sex-movie Blonde female in hard anal sex movie http://hardcorefuckingmovies.pornlivenews.com/articles/651950/hardcore-group-fucking-videos Hardcore group fucking videos http://hardcorefuckingmovies.pornlivenews.com/articles/651947/hardcore-pussy-fucking-with-sex-machine Hardcore pussy fucking with sex machine _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Wed Dec 17 07:16:35 2008 From: INVALID.NOREPLY at gnu.org (fdsfsdf) Date: Wed, 17 Dec 2008 07:16:35 +0000 Subject: [bug #19436] read (subshell_pty...): No such file or directory (2) on mc compiled with subshel In-Reply-To: <20081204-124147.sv71204.28542@savannah.gnu.org> References: <20070328-120738.sv58080.19234@savannah.gnu.org> <20070329-045007.sv36205.39621@savannah.gnu.org> <20070421-122447.sv36205.39889@savannah.gnu.org> <20081119-113132.sv70934.98921@savannah.gnu.org> <20081124-114626.sv70927.93162@savannah.gnu.org> <20081204-124147.sv71204.28542@savannah.gnu.org> Message-ID: <20081217-071635.sv71407.6742@savannah.gnu.org> Follow-up Comment #6, bug #19436 (project mc): http://hardcorefuckingmovies.pornlivenews.com _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Wed Dec 17 07:48:00 2008 From: INVALID.NOREPLY at gnu.org (fdsfsdf) Date: Wed, 17 Dec 2008 07:48:00 +0000 Subject: [bug #19721] Aborting a FISH file transfer still causes the FISH layer to consume the whole file In-Reply-To: <20081216-162311.sv71407.8025@savannah.gnu.org> References: <20070427-114045.sv36205.32834@savannah.gnu.org> <20070427-142017.sv41304.77917@savannah.gnu.org> <20070427-163847.sv36205.49379@savannah.gnu.org> <20070502-162029.sv36205.46307@savannah.gnu.org> <20070507-160626.sv36205.38172@savannah.gnu.org> <20070507-181832.sv41304.56007@savannah.gnu.org> <20081119-100741.sv70931.92167@savannah.gnu.org> <20081126-110051.sv71049.25440@savannah.gnu.org> <20081126-160842.sv70931.40005@savannah.gnu.org> <20081205-112214.sv71230.64844@savannah.gnu.org> <20081209-094506.sv71286.62807@savannah.gnu.org> <20081216-162311.sv71407.8025@savannah.gnu.org> Message-ID: <20081217-074800.sv71407.32017@savannah.gnu.org> Follow-up Comment #12, bug #19721 (project mc): http://fuckingmachines.pornlivenews.com/ Sex with fucking machines http://fuckingmachines.pornlivenews.com/articles/651981/blonde-female-getting-fucked-by-sex-machine female getting fucked by sex machine http://fuckingmachines.pornlivenews.com/articles/651979/girl-anal-fucking-with-machine Girl anal fucking with machine _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From proski at gnu.org Wed Dec 17 16:39:54 2008 From: proski at gnu.org (Pavel Roskin) Date: Wed, 17 Dec 2008 11:39:54 -0500 Subject: Removing myself from the project Message-ID: <1229531994.30951.4.camel@dv> Hello! Most messages posted to the mailing lists are spam. Most comments added to the bug tracker are spam. I simply don't have to deal with it every day. Neither do I have time to deal with site administrators to fix the spam problem upstream. Therefore, I'm removing myself from the list of mailing list moderators and from the list of project members on Savannah. -- Regards, Pavel Roskin From mpol at gmx.net Wed Dec 17 18:24:29 2008 From: mpol at gmx.net (Marcel Pol) Date: Wed, 17 Dec 2008 19:24:29 +0100 Subject: What's happening at MC's headquarters Message-ID: <20081217192429.408a11db@ringworld> Hello, I'm wondering what the state of MC is and where it's going. There were plans of a new release, but apparently it's not really happening yet. Also, I don't see many developers around anymore. I'm wondering how many active developers there are currently. I though Pavel Tsekov was the current project leader, but his last mail on the mailinglist is from March 2008, which is more then half a year ago. I would really like to see MC florish again, I love the software, and couldn't live without it. I am a happy user, and also quite happy with the rather nasty bugs that have been fixed in the last couple of years, and the new features and improvements that there have been. I have no doubt that if this project doesn't carry on, that people on a different place will pick it up, like the people at Redhat currently seem to be doing. They are posting their work in MC's bug-database, where it can be picked up it seems. I'm just wondering what exactly is going on, and what the state of affairs is. Are there any plans to move this project forward? Regards, -- Marcel Pol From winnie at debian.org Wed Dec 17 19:07:46 2008 From: winnie at debian.org (Patrick Winnertz) Date: Wed, 17 Dec 2008 20:07:46 +0100 Subject: Removing myself from the project In-Reply-To: <1229531994.30951.4.camel@dv> References: <1229531994.30951.4.camel@dv> Message-ID: <200812172007.58186.winnie@debian.org> Hey Pavel, Could you please be so kind and add me to the list of people who are allowed to commit into the cvs? I would like to work further on mc and integrate patches from the mc clone into mc. It would be very sad if mc will die out. Greetings Winnie -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From janek_listy at wp.pl Wed Dec 17 20:08:38 2008 From: janek_listy at wp.pl (Janek Kozicki) Date: Wed, 17 Dec 2008 21:08:38 +0100 Subject: Removing myself from the project In-Reply-To: <200812172007.58186.winnie@debian.org> References: <1229531994.30951.4.camel@dv> <200812172007.58186.winnie@debian.org> Message-ID: <20081217210838.535cca7f@absurd> Patrick Winnertz said: (by the date of Wed, 17 Dec 2008 20:07:46 +0100) > Hey Pavel, > > Could you please be so kind and add me to the list of people who are allowed > to commit into the cvs? I would like to work further on mc and integrate > patches from the mc clone into mc. It would be very sad if mc will die out. wow! I'm very happy that there is an active contributor coming in! Would you be so kind to consider my feature request? http://mail.gnome.org/archives/mc-devel/2008-November/msg00003.html until your message I was seriously worried that mc is dead already. -- Janek Kozicki | From proski at gnu.org Wed Dec 17 20:35:29 2008 From: proski at gnu.org (Pavel Roskin) Date: Wed, 17 Dec 2008 15:35:29 -0500 Subject: Removing myself from the project In-Reply-To: <200812172007.58186.winnie@debian.org> References: <1229531994.30951.4.camel@dv> <200812172007.58186.winnie@debian.org> Message-ID: <1229546129.7562.3.camel@dv> On Wed, 2008-12-17 at 20:07 +0100, Patrick Winnertz wrote: > Hey Pavel, > > Could you please be so kind and add me to the list of people who are allowed > to commit into the cvs? I would like to work further on mc and integrate > patches from the mc clone into mc. It would be very sad if mc will die out. I don't have such permission. The usual approach is that somebody wishing to contribute code posts patches to the mailing list. Other developers review the patches and commit them. Once the contributor posts many consistently good patches, he or she is granted commit access by the project administrator. -- Regards, Pavel Roskin From slavazanko at gmail.com Wed Dec 17 20:37:52 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Wed, 17 Dec 2008 22:37:52 +0200 Subject: What's happening at MC's headquarters In-Reply-To: <20081217192429.408a11db@ringworld> References: <20081217192429.408a11db@ringworld> Message-ID: <49496320.8030503@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Marcel Pol wrote: > I'm wondering what the state of MC is and where it's going. There were > plans of a new release, but apparently it's not really happening yet. > Also, I don't see many developers around anymore. I'm wondering how > many active developers there are currently. I though Pavel Tsekov was > the current project leader, but his last mail on the mailinglist is > from March 2008, which is more then half a year ago. > > I would really like to see MC florish again, I love the software, and > couldn't live without it. I am a happy user, and also quite happy with > the rather nasty bugs that have been fixed in the last couple of years, > and the new features and improvements that there have been. > I have no doubt that if this project doesn't carry on, that people on a > different place will pick it up, like the people at Redhat currently > seem to be doing. They are posting their work in MC's bug-database, > where it can be picked up it seems. > I'm just wondering what exactly is going on, and what the state of > affairs is. Are there any plans to move this project forward? Hi, Marcel. I'm don't know the reasons why developers can't further develop the Midnight Commander project too. :( But may be this project is more interesting to you: http://mc.redhat-club.org/trac Some in resource by link in Russian, sorry. But your messages in English (suggestions, comments, bugreports, etc) always are welcome. We (a new developers team) are now prepare mail to this maillist for transfer to us the name of "Midnight Commander" (mc) and the main branches of develop. WBR, Slavaz. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAklJYv4ACgkQb3oGR6aVLpqhqgCfZJPy58hXVux6lp680Hv/Nb6h h1EAnjFkpu2r1O4RRBMGn6JFzR9l1nfs =1gvt -----END PGP SIGNATURE----- From slavazanko at gmail.com Thu Dec 18 00:23:07 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Thu, 18 Dec 2008 02:23:07 +0200 Subject: Further Midnight Commander development Message-ID: <494997EB.3080006@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, dear developers! It is no secret that the recent console manager Midnight Commander stopped in its development. We do not know the reasons why this is happening, but we badly want to see its further development. In fact, the Midnight Commander is developing further, but distributions in the form of patches, for each distribution its own set of patches. In fact, there are many versions of modern MS for each distribution. Our team was formed recently, we have only just begun working on Midnight Commander, we have yet to be established, the relationship within the team have formed. But we are striving to become a team, which will be beneficial to all fans MC (a lot of them). Already, we have created assembly, which could satisfy both users of Debian/Ubuntu, FreeBSD and Gentoo, and users of Red Hat Linux distributions, Open Suse, MandRiva etc. You may have to apologize already issued release mc-4.6.3 (actually, we do not have the right to publish under that name). It is better to ask forgiveness than permission.. :) We are a young team, we ask that you permit the continued development of Midnight Commander it was under this name. Also, please refer to us the files CVS repository for the preservation of history and development of the names of all people, ever participated in the development mc. We understand that this may be shocking request, but nevertheless, we hope to receive any response - if the answer is we simply will Forque, which we hope will develop further. We want to see MC very comfortable and pleasant, not as it is now. Best regards, Alex Custov Andrew Savchenko Denis Frolov Dmitry Korzhevin Pavel Vasil'ev Slava Zanko http://mc.redhat-club.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAklJl+EACgkQb3oGR6aVLprYawCfUzxri0au8tfvG+PLnpbiFLFQ MBkAn0nzw6HkE1LF3wESFa3BOZIrwH2Z =D+6B -----END PGP SIGNATURE----- From janek_listy at wp.pl Thu Dec 18 06:39:30 2008 From: janek_listy at wp.pl (Janek Kozicki) Date: Thu, 18 Dec 2008 07:39:30 +0100 Subject: Further Midnight Commander development In-Reply-To: <494997EB.3080006@gmail.com> References: <494997EB.3080006@gmail.com> Message-ID: <20081218073930.022cb371@absurd> Slava Zanko said: (by the date of Thu, 18 Dec 2008 02:23:07 +0200) > Alex Custov > Andrew Savchenko > Denis Frolov > Dmitry Korzhevin > Pavel Vasil'ev > Slava Zanko Isn't Patrick Winnertz part of your newly formed development team? I guess that he wants to be! He just asked for write access to CVS. -- Janek Kozicki | From winnie at debian.org Thu Dec 18 07:26:17 2008 From: winnie at debian.org (Patrick Winnertz) Date: Thu, 18 Dec 2008 08:26:17 +0100 Subject: Further Midnight Commander development In-Reply-To: <20081218073930.022cb371@absurd> References: <494997EB.3080006@gmail.com> <20081218073930.022cb371@absurd> Message-ID: <200812180826.26025.winnie@debian.org> Am Thursday 18 December 2008 07:39:30 schrieben Sie: > Slava Zanko said: (by the date of Thu, 18 Dec 2008 02:23:07 +0200) > > > Alex Custov > > Andrew Savchenko > > Denis Frolov > > Dmitry Korzhevin > > Pavel Vasil'ev > > Slava Zanko > > Isn't Patrick Winnertz part of your newly formed development team? > I guess that he wants to be! He just asked for write access to CVS. No, I'm the maintainer of mc inside debian and using it very heavily. I wrote some smaller patches for mc which I posted to the list several months ago. After no reaction I worked for my own. If nobody has any objections I would like to work together with this new team on the development of mc. Greetings Winnie -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From INVALID.NOREPLY at gnu.org Thu Dec 18 10:48:08 2008 From: INVALID.NOREPLY at gnu.org (Sorin Sbarnea) Date: Thu, 18 Dec 2008 10:48:08 +0000 Subject: [bug #24038] slow starting of mc In-Reply-To: <20081007-135430.sv46405.86377@savannah.gnu.org> References: <20080811-152155.sv69162.59807@savannah.gnu.org> <20080812-120718.sv41304.67246@savannah.gnu.org> <20080812-112658.sv69162.33155@savannah.gnu.org> <20080812-124353.sv69162.30518@savannah.gnu.org> <20080812-142809.sv69162.70000@savannah.gnu.org> <20080903-072933.sv69519.12072@savannah.gnu.org> <20081007-135430.sv46405.86377@savannah.gnu.org> Message-ID: <20081218-124807.sv46405.65395@savannah.gnu.org> Follow-up Comment #7, bug #24038 (project mc): I can (re)confirm this problem on RHEL also. The DNS is well configured. There is no delay running "netstat -a" I wasn't able to locate any other program with simmilar behaviour on these machines. Possible hint: some partitions are mounted using NIS. If you are searching on google after "midnight commander slow start" you'll see that a lot of people are encountering this issue. _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Thu Dec 18 10:58:49 2008 From: INVALID.NOREPLY at gnu.org (Sorin Sbarnea) Date: Thu, 18 Dec 2008 10:58:49 +0000 Subject: [bug #24038] slow starting of mc In-Reply-To: <20081218-124807.sv46405.65395@savannah.gnu.org> References: <20080811-152155.sv69162.59807@savannah.gnu.org> <20080812-120718.sv41304.67246@savannah.gnu.org> <20080812-112658.sv69162.33155@savannah.gnu.org> <20080812-124353.sv69162.30518@savannah.gnu.org> <20080812-142809.sv69162.70000@savannah.gnu.org> <20080903-072933.sv69519.12072@savannah.gnu.org> <20081007-135430.sv46405.86377@savannah.gnu.org> <20081218-124807.sv46405.65395@savannah.gnu.org> Message-ID: <20081218-125849.sv46405.89541@savannah.gnu.org> Follow-up Comment #8, bug #24038 (project mc): I would like to add that I have the same problem with version 4.6.1-pre1a and that "options no_tld_query" in resolv.conf does not work (tested even after system restart) _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Thu Dec 18 11:17:11 2008 From: INVALID.NOREPLY at gnu.org (Sorin Sbarnea) Date: Thu, 18 Dec 2008 11:17:11 +0000 Subject: [bug #24038] slow starting of mc In-Reply-To: <20081218-125849.sv46405.89541@savannah.gnu.org> References: <20080811-152155.sv69162.59807@savannah.gnu.org> <20080812-120718.sv41304.67246@savannah.gnu.org> <20080812-112658.sv69162.33155@savannah.gnu.org> <20080812-124353.sv69162.30518@savannah.gnu.org> <20080812-142809.sv69162.70000@savannah.gnu.org> <20080903-072933.sv69519.12072@savannah.gnu.org> <20081007-135430.sv46405.86377@savannah.gnu.org> <20081218-124807.sv46405.65395@savannah.gnu.org> <20081218-125849.sv46405.89541@savannah.gnu.org> Message-ID: <20081218-131710.sv46405.45158@savannah.gnu.org> Follow-up Comment #9, bug #24038 (project mc): If this helps: I have some NFS mounted drives but none of them if in one of the mc panes. _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From ciampix at libero.it Thu Dec 18 11:26:27 2008 From: ciampix at libero.it (Marco Ciampa) Date: Thu, 18 Dec 2008 12:26:27 +0100 Subject: Further Midnight Commander development In-Reply-To: <200812180826.26025.winnie@debian.org> References: <494997EB.3080006@gmail.com> <20081218073930.022cb371@absurd> <200812180826.26025.winnie@debian.org> Message-ID: <20081218112627.GA3480@ciampix.net> On Thu, Dec 18, 2008 at 08:26:17AM +0100, Patrick Winnertz wrote: > Am Thursday 18 December 2008 07:39:30 schrieben Sie: > > Slava Zanko said: (by the date of Thu, 18 Dec 2008 02:23:07 +0200) > > > > > Alex Custov > > > Andrew Savchenko > > > Denis Frolov > > > Dmitry Korzhevin > > > Pavel Vasil'ev > > > Slava Zanko > > > > Isn't Patrick Winnertz part of your newly formed development team? > > I guess that he wants to be! He just asked for write access to CVS. > No, I'm the maintainer of mc inside debian and using it very heavily. I wrote > some smaller patches for mc which I posted to the list several months ago. > After no reaction I worked for my own. > If nobody has any objections I would like to work together with this new team > on the development of mc. > > Greetings > Winnie I'm the mc italian translator and I have (and would like to mantain) write permission on mc savannah cvs repository. I'll be glad to continue to update the translation directly in the hope to be able to contribute in the future with some more effective work (starting from the i18n code). bye -- Marco Ciampa +--------------------+ | Linux User #78271 | | FSFE fellow #364 | +--------------------+ From winnie at debian.org Thu Dec 18 12:08:13 2008 From: winnie at debian.org (Patrick Winnertz) Date: Thu, 18 Dec 2008 13:08:13 +0100 Subject: Further Midnight Commander development In-Reply-To: <20081218112627.GA3480@ciampix.net> References: <494997EB.3080006@gmail.com> <200812180826.26025.winnie@debian.org> <20081218112627.GA3480@ciampix.net> Message-ID: <200812181308.20663.winnie@debian.org> Well, As I see there are plenty of people who would like to work further on mc, it would be very sad if these people will work on different versions, as this is ineffective, and tend to end in even more dead projects. My suggestion would be to have at first a look who wants to help to develop mc further and then where to do this. Personally I would like to make a viewable break to the development which was done until now, this mean: a new repository (not longer the CVS (as CVS is ancient in my eyes and svn or git is much better). So: At first the people who would like to work on mc should send a: "I would like to do something". After we know who want's to work on mc we have to decide where to work on it: Either on savannah, or on the new/forked mc project. No matter where we will work further on it I'll help :) Greetings Winnie -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From slavazanko at gmail.com Thu Dec 18 12:50:59 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Thu, 18 Dec 2008 14:50:59 +0200 Subject: Further Midnight Commander development In-Reply-To: <200812181308.20663.winnie@debian.org> References: <494997EB.3080006@gmail.com> <200812180826.26025.winnie@debian.org> <20081218112627.GA3480@ciampix.net> <200812181308.20663.winnie@debian.org> Message-ID: <494A4733.6030801@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Patrick Winnertz wrote: > Well, > > As I see there are plenty of people who would like to work further on mc, it > would be very sad if these people will work on different versions, as this is > ineffective, and tend to end in even more dead projects. Yes, this may be a trouble. We have already realized it and in the future will try to communicate in English. > My suggestion would be to have at first a look who wants to help to develop mc > further and then where to do this. > Personally I would like to make a viewable break to the development which was > done until now, this mean: a new repository (not longer the CVS (as CVS is > ancient in my eyes and svn or git is much better). In now, we use svn (what we well known), but I like the distributed VCS's more. If there an easy migration way from svn to git then this opportunity will be considered. And with the wishes of the people who are interested in further development of the project - a decision would not been taken only of a developers team. > So: At first the people who would like to work on mc should send a: "I would > like to do something". Yes, we like. We would like further improvement and development of Midnight Commander. WBR, Slavaz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFJSkcub3oGR6aVLpoRAgsNAJ0a5VjMnUErK53fxBcXGUiy6H9w4gCfb2fI 2xecvDgmguii94gbjCul5qs= =UwkU -----END PGP SIGNATURE----- From roland.illig at gmx.de Thu Dec 18 12:54:54 2008 From: roland.illig at gmx.de (Roland Illig) Date: Thu, 18 Dec 2008 13:54:54 +0100 Subject: Further Midnight Commander development In-Reply-To: <200812181308.20663.winnie@debian.org> References: <494997EB.3080006@gmail.com> <200812180826.26025.winnie@debian.org> <20081218112627.GA3480@ciampix.net> <200812181308.20663.winnie@debian.org> Message-ID: <494A481E.7010503@gmx.de> Patrick Winnertz schrieb: > So: At first the people who would like to work on mc should send a: "I would > like to do something". I'd like to. If there is some more action in mc development (like in 2005, when it was great fun), I'm definitely willing to invest some time into it. Maybe we even get all the different UTF-8 patches incorporated into mc. If that's possible without #ifdef's in each and every file, I'd like to work on it. Roland From miguel at ximian.com Fri Dec 19 02:09:24 2008 From: miguel at ximian.com (Miguel de Icaza) Date: Thu, 18 Dec 2008 21:09:24 -0500 Subject: Further Midnight Commander development In-Reply-To: <200812181308.20663.winnie@debian.org> References: <494997EB.3080006@gmail.com> <200812180826.26025.winnie@debian.org> <20081218112627.GA3480@ciampix.net> <200812181308.20663.winnie@debian.org> Message-ID: <1229652564.7055.203.camel@erandi.site> Hello, > My suggestion would be to have at first a look who wants to help to develop mc > further and then where to do this. Agreed, this initial post is light on the details as to what the changes are, ChangeLog entries and the documentation. The site is in Russian which does not help very much in terms of getting our international crowd to talk to everyone else * What the patches are (with ChangeLog entries) * What the changes are (with documentation) I would personally like to see mc move to git, there are nice hosting services like github, it is easy to fork and it is easy to review patches from third parties. Miguel. From proski at gnu.org Fri Dec 19 04:28:56 2008 From: proski at gnu.org (Pavel Roskin) Date: Thu, 18 Dec 2008 23:28:56 -0500 Subject: Further Midnight Commander development In-Reply-To: <1229652564.7055.203.camel@erandi.site> References: <494997EB.3080006@gmail.com> <200812180826.26025.winnie@debian.org> <20081218112627.GA3480@ciampix.net> <200812181308.20663.winnie@debian.org> <1229652564.7055.203.camel@erandi.site> Message-ID: <20081218232856.xwh4ugg5e88g0wow-cebfxv@webmail.spamcop.net> Hello, Miguel! Quoting Miguel de Icaza : > I would personally like to see mc move to git, there are nice hosting > services like github, it is easy to fork and it is easy to review > patches from third parties. I'm maintaining a git mirror of the mc repository: http://repo.or.cz/w/mc.git It's updated automatically. It can be just cloned for further development. I took care to provide full names of all committers ever committing anything to the mc repository. -- Regards, Pavel Roskin From INVALID.NOREPLY at gnu.org Fri Dec 19 09:36:46 2008 From: INVALID.NOREPLY at gnu.org (Roland Illig) Date: Fri, 19 Dec 2008 09:36:46 +0000 Subject: [bug #15257] mc viewer enters a probably infinite cycle on some files with 8-bit characters In-Reply-To: <20060223-225059.sv46275.90234@savannah.gnu.org> References: <20051221-121432.sv46275.53923@savannah.gnu.org> <20060128-000552.sv20990.15391@savannah.gnu.org> <20060215-194810.sv36205.14924@savannah.gnu.org> <20060218-151506.sv26390.6223@savannah.gnu.org> <20060219-170948.sv46275.68360@savannah.gnu.org> <20060222-164622.sv26390.78273@savannah.gnu.org> <20060223-225059.sv46275.90234@savannah.gnu.org> Message-ID: <20081219-103645.sv20990.88212@savannah.gnu.org> Update of bug #15257 (project mc): Status: Need Info => Fixed Open/Closed: Open => Closed _______________________________________________________ Reply to this item at: _______________________________________________ Nachricht geschickt von/durch Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Fri Dec 19 10:46:32 2008 From: INVALID.NOREPLY at gnu.org (Roland Illig) Date: Fri, 19 Dec 2008 10:46:32 +0000 Subject: [bug #23826] Segmentation fault when opening/browsing file In-Reply-To: <20080712-135233.sv68639.26830@savannah.gnu.org> References: <20080712-135233.sv68639.26830@savannah.gnu.org> Message-ID: <20081219-114631.sv20990.59782@savannah.gnu.org> Update of bug #23826 (project mc): Status: None => Invalid Open/Closed: Open => Closed _______________________________________________________ Follow-up Comment #1: I cannot reproduce the bug with the current mc from CVS HEAD, nor with the "upstream" git archive that Debian uses. But when I apply the Debian patch, it crashes. You can tell the Debian people that it crashes because of: #0 0x00007fa499e76f90 in strchr () from /lib/libc.so.6 #1 0x000000000045d51f in my_type_of (c=1048064) at edit.c:1821 #2 0x0000000000460372 in edit_execute_cmd (edit=0x22997c0, command=, char_for_insertion=) at edit.c:1869 #3 0x00000000004619fa in edit_execute_key_command (edit=0x22997c0, command=9, char_for_insertion=4294967295) at edit.c:2293 my_type_of(c) is called with c == 1046064 (a strange value). This is not zero (for which a check exists) but later used as an "unsigned char" in strchr(), where it is interpreted as zero. Because of that, the function my_type_of tries to read behind the option_chars_move_whole_word string, which leads to the segmentation fault. Please, if you use Debian, don't complain to the upstream authors. Complain to the Debian people. _______________________________________________________ Reply to this item at: _______________________________________________ Nachricht geschickt von/durch Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Fri Dec 19 11:04:28 2008 From: INVALID.NOREPLY at gnu.org (Roland Illig) Date: Fri, 19 Dec 2008 11:04:28 +0000 Subject: [bug #24505] loading X11 library is broken In-Reply-To: <20081009-141619.sv20990.83741@savannah.gnu.org> References: <20081009-095508.sv47056.47902@savannah.gnu.org> <20081009-141619.sv20990.83741@savannah.gnu.org> Message-ID: <20081219-120427.sv20990.84989@savannah.gnu.org> Update of bug #24505 (project mc): Status: Confirmed => Need Info _______________________________________________________ Follow-up Comment #2: Which version of mc are you using? The current version uses GModule for loading shared libraries, which should do the Right Thing automatically. At least I cannot find anything in the GModule documentation to explicitly load libX11.so.6. _______________________________________________________ Reply to this item at: _______________________________________________ Nachricht geschickt von/durch Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Fri Dec 19 11:37:53 2008 From: INVALID.NOREPLY at gnu.org (Roland Illig) Date: Fri, 19 Dec 2008 11:37:53 +0000 Subject: [bug #24505] loading X11 library is broken In-Reply-To: <20081219-120427.sv20990.84989@savannah.gnu.org> References: <20081009-095508.sv47056.47902@savannah.gnu.org> <20081009-141619.sv20990.83741@savannah.gnu.org> <20081219-120427.sv20990.84989@savannah.gnu.org> Message-ID: <20081219-123753.sv20990.58338@savannah.gnu.org> Update of bug #24505 (project mc): Status: Need Info => Fixed Open/Closed: Open => Closed _______________________________________________________ Follow-up Comment #3: Fixed in the current CVS version. If there is no libX11.so symlink, mc tries libX11.so.6 explicitly. _______________________________________________________ Reply to this item at: _______________________________________________ Nachricht geschickt von/durch Savannah http://savannah.gnu.org/ From winnie at debian.org Mon Dec 22 09:34:53 2008 From: winnie at debian.org (Patrick Winnertz) Date: Mon, 22 Dec 2008 10:34:53 +0100 Subject: Further Midnight Commander development In-Reply-To: <20081218232856.xwh4ugg5e88g0wow-cebfxv@webmail.spamcop.net> References: <494997EB.3080006@gmail.com> <1229652564.7055.203.camel@erandi.site> <20081218232856.xwh4ugg5e88g0wow-cebfxv@webmail.spamcop.net> Message-ID: <200812221035.02571.winnie@debian.org> Am Friday 19 December 2008 05:28:56 schrieben Sie: > Hello, Miguel! > > Quoting Miguel de Icaza : > > I would personally like to see mc move to git, there are nice hosting > > services like github, it is easy to fork and it is easy to review > > patches from third parties. > > I'm maintaining a git mirror of the mc repository: > http://repo.or.cz/w/mc.git > > It's updated automatically. It can be just cloned for further > development. I took care to provide full names of all committers ever > committing anything to the mc repository. Yes.. this would be great. Would it be possible to migrate your patches against mc into a new build up git repro which is cloned from this mirror? If yes: Is your host also captable of hosting git repros? If not I would setup a trac with git backend on my private server until we find a better solution where to host the repro. Greetings Winnie -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From slavazanko at gmail.com Mon Dec 22 11:22:09 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Mon, 22 Dec 2008 13:22:09 +0200 Subject: Further Midnight Commander development In-Reply-To: <200812221035.02571.winnie@debian.org> References: <494997EB.3080006@gmail.com> <1229652564.7055.203.camel@erandi.site> <20081218232856.xwh4ugg5e88g0wow-cebfxv@webmail.spamcop.net> <200812221035.02571.winnie@debian.org> Message-ID: <494F7861.1020605@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Patrick Winnertz wrote: >> It's updated automatically. It can be just cloned for further >> development. I took care to provide full names of all committers ever >> committing anything to the mc repository. > Yes.. this would be great. > Would it be possible to migrate your patches against mc into a new build up > git repro which is cloned from this mirror? If yes: Is your host also captable > of hosting git repros? > Many patches(Fedora, debian) applied in one revision at start of project, sorry. Many own patches is relative to previous patches. Is it possible to migrate? Gm... Nothing is impossible :) But this will require much effort and time. > If not I would setup a trac with git backend on my private server until we find > a better solution where to host the repro. May be this good solution. BTW, Many people do not know English, but use mc. I would like to consider a system that allows such people to participate in the improvement project. For example, to establish national sub-projects (bugtrackers), of which bugreports translated and transferred to the main (English) project by administrators of sub-projects. Administrators do not transfer all bugreports - duplicates, invalid bugreports, "wontfix" and etc. remain in the sub-project. The main bugreport-system remains clean (developers work inly with main bugtracking system). Repository source for all subprojects one, so the fixing of bugs will be seen in all sub-project. Administrators of subprojects will see comments on the revision and would close corresponding bugreports. Or/and will see status of own English bugreport and then change status of relative bugreport in sub-project. The scheme of multinational sub-projects are very difficult, but allowed very large numbers of people to participate in the development, testing and improvement project. WBR, Slavaz. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFJT3hab3oGR6aVLpoRAiN5AJ94Ykn05cpgOLWQCgmAe7T1kFgJYwCfWVWv Ds1Ig+mne9qJsiSQtEIKFto= =V2ES -----END PGP SIGNATURE----- From winnie at debian.org Mon Dec 22 12:46:10 2008 From: winnie at debian.org (Patrick Winnertz) Date: Mon, 22 Dec 2008 13:46:10 +0100 Subject: Further Midnight Commander development In-Reply-To: <494F7861.1020605@gmail.com> References: <494997EB.3080006@gmail.com> <200812221035.02571.winnie@debian.org> <494F7861.1020605@gmail.com> Message-ID: <200812221346.19954.winnie@debian.org> > Many patches(Fedora, debian) applied in one revision at start of > project, sorry. Many own patches is relative to previous patches. > > Is it possible to migrate? Gm... Nothing is impossible :) But this will > require much effort and time. Well,, this should be quite easy. Have a look on the git-svn tool. You should be able to create a git checkout from your svn stuff.. After this it's very easy to pick each commit and apply it on the new git repro. This is maybe a effort of ~2-3 hours. > BTW, Many people do not know English, but use mc. I would like to > consider a system that allows such people to participate in the > improvement project. Well.. as long as the development is in english and in one repository (with maybe several branches to test things). This is a good idea. If this means to also have several repros this is in my eyes a very bad idea. > > For example, to establish national sub-projects (bugtrackers), of which > bugreports translated and transferred to the main (English) project by > administrators of sub-projects. Administrators do not transfer all > bugreports - duplicates, invalid bugreports, "wontfix" and etc. remain > in the sub-project. The main bugreport-system remains clean (developers > work inly with main bugtracking system). > Repository source for all subprojects one, so the fixing of bugs will be > seen in all sub-project. Administrators of subprojects will see comments > on the revision and would close corresponding bugreports. Or/and will > see status of own English bugreport and then change status of relative > bugreport in sub-project. > > The scheme of multinational sub-projects are very difficult, but allowed > very large numbers of people to participate in the development, testing > and improvement project. Yes. I would suggest to start with one repro for the development with a main bugtracker (which is in english) and then have your bugtracker for the russian things. Is this okay for you? If yes I'll set up a trac on my private server until I find a better solution. If this repro is ready I'll ping you and we can start to migrate you patches into the git repro. Is this okay for you (and the rest of the team?) Greetings Winnie > > WBR, Slavaz. -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From slavazanko at gmail.com Mon Dec 22 14:03:13 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Mon, 22 Dec 2008 16:03:13 +0200 Subject: Further Midnight Commander development In-Reply-To: <200812221346.19954.winnie@debian.org> References: <494997EB.3080006@gmail.com> <200812221035.02571.winnie@debian.org> <494F7861.1020605@gmail.com> <200812221346.19954.winnie@debian.org> Message-ID: <494F9E21.4070802@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Patrick Winnertz wrote: > Well,, this should be quite easy. > Have a look on the git-svn tool. You should be able to create a git checkout > from your svn stuff.. After this it's very easy to pick each commit and apply > it on the new git repro. This is maybe a effort of ~2-3 hours. Good. But some revisions needed to re-watch. >> BTW, Many people do not know English, but use mc. I would like to >> consider a system that allows such people to participate in the >> improvement project. > Well.. as long as the development is in english and in one repository (with > maybe several branches to test things). This is a good idea. If this means to > also have several repros this is in my eyes a very bad idea. No-no, repro one for all. Several branches is like for me: /branches/x.x.x - only to bug fixing of /tags/x.x.x; /sandbox - to test things, new ideas, etc. More order in mind, IMHO :) >> The scheme of multinational sub-projects are very difficult, but allowed >> very large numbers of people to participate in the development, testing >> and improvement project. > Yes. > I would suggest to start with one repro for the development with a main > bugtracker (which is in english) and then have your bugtracker for the russian > things. As I known, trac required only local repro. This mean, you will create second trac and *.ini, *.db files from our trac will transferred. > Is this okay for you? For me - absolutely yes. For a team I started vote: http://mc.redhat-club.org/cms/forum/viewthread.php?thread_id=96&pid=399#post_399 You can see through translate.google.com:) > If yes I'll set up a trac on my private server until I find a better solution. > If this repro is ready I'll ping you and we can start to migrate you patches > into the git repro. Is this okay for you (and the rest of the team?) Just wait for results of vote, please. As I said, personally for me answer "yes" :) WBR, Slavaz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFJT54bb3oGR6aVLpoRAho/AJ9+Z7DeKekDbOdobMageVuuOlwH2gCeI3ic C1YuLN+nSPCxBYQ5drEno+g= =cidx -----END PGP SIGNATURE----- From slavazanko at gmail.com Mon Dec 22 20:02:21 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Mon, 22 Dec 2008 22:02:21 +0200 Subject: Further Midnight Commander development In-Reply-To: <200812221346.19954.winnie@debian.org> References: <494997EB.3080006@gmail.com> <200812221035.02571.winnie@debian.org> <494F7861.1020605@gmail.com> <200812221346.19954.winnie@debian.org> Message-ID: <494FF24D.9040707@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Patrick Winnertz wrote: > If yes I'll set up a trac on my private server until I find a better solution. > If this repro is ready I'll ping you and we can start to migrate you patches > into the git repro. Is this okay for you (and the rest of the team?) Team vote 100% "yes" We are ready to work with you. WRB, Slavaz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAklP8kQACgkQb3oGR6aVLprmXwCeJc1NfQR47aUsAsn5oaLVgy27 vlAAmQFZrQd6NmZ35qi+Zh43p97tgviC =M/1G -----END PGP SIGNATURE----- From winnie at debian.org Tue Dec 23 10:24:51 2008 From: winnie at debian.org (Patrick Winnertz) Date: Tue, 23 Dec 2008 11:24:51 +0100 Subject: Further Midnight Commander development In-Reply-To: <494FF24D.9040707@gmail.com> References: <494997EB.3080006@gmail.com> <200812221346.19954.winnie@debian.org> <494FF24D.9040707@gmail.com> Message-ID: <200812231124.52385.winnie@debian.org> Am Monday 22 December 2008 21:02:21 schrieben Sie: > Patrick Winnertz wrote: > > If yes I'll set up a trac on my private server until I find a better > > solution. If this repro is ready I'll ping you and we can start to > > migrate you patches into the git repro. Is this okay for you (and the > > rest of the team?) > > Team vote 100% "yes" > We are ready to work with you. Cool. So please: All people who wants to have write access to the repro should send mail (preffered signed) to me (winnie at debian.org) and I'll create a new ssh account for committing into the git repro. Furthermore I would need the usernames for trac.. I'll create random passwords and send them then to you indiviually so that you can change them after that. After this I'll/We'll could start to migrate the stuff from the mc.redhat- club.org team into this repro. Greetings Winnie -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From vda.linux at googlemail.com Tue Dec 23 12:06:34 2008 From: vda.linux at googlemail.com (Denys Vlasenko) Date: Tue, 23 Dec 2008 13:06:34 +0100 Subject: Further Midnight Commander development In-Reply-To: <200812231124.52385.winnie@debian.org> References: <494997EB.3080006@gmail.com> <200812221346.19954.winnie@debian.org> <494FF24D.9040707@gmail.com> <200812231124.52385.winnie@debian.org> Message-ID: <1158166a0812230406v5e882db9n6edeaa8b6f77209f@mail.gmail.com> 2008/12/23 Patrick Winnertz : > Am Monday 22 December 2008 21:02:21 schrieben Sie: >> Patrick Winnertz wrote: >> > If yes I'll set up a trac on my private server until I find a better >> > solution. If this repro is ready I'll ping you and we can start to >> > migrate you patches into the git repro. Is this okay for you (and the >> > rest of the team?) >> >> Team vote 100% "yes" >> We are ready to work with you. > Cool. > > So please: > > All people who wants to have write access to the repro should send mail > (preffered signed) to me (winnie at debian.org) and I'll create a new ssh account > for committing into the git repro. > > Furthermore I would need the usernames for trac.. I'll create random > passwords and send them then to you indiviually so that you can change them > after that. > > After this I'll/We'll could start to migrate the stuff from the mc.redhat- > club.org team into this repro. I would like to participate. "vda.linux" or "vda_linux" are my preferred usernames. -- vda From winnie at debian.org Tue Dec 23 12:59:36 2008 From: winnie at debian.org (Patrick Winnertz) Date: Tue, 23 Dec 2008 13:59:36 +0100 Subject: Further Midnight Commander development In-Reply-To: <20081223115625.GA4564@ciampix.net> References: <494997EB.3080006@gmail.com> <200812231124.52385.winnie@debian.org> <20081223115625.GA4564@ciampix.net> Message-ID: <200812231359.44381.winnie@debian.org> Hey, [removed some private stuff] > 1) why not asking for git on savannah? As trac needs a local git. > 2) is it mc on savannah doomed? Well.. the bugtracker there is ugly.. there is too much spam, cvs is very ancient, git is so much better. > 3) Why not officially close it? My intention is to set up a new place to officially develop mc and then ask the people who are responsible for the webpage and the savannah stuff to forward visitors to the trac. And add a big fat note into the cvs that the development has moved into git. Is there something else which have to be done in order to move the development officially into a new place? It would be cool if someone would help me with speaking with savannah and ibiblio.org in order to place there informations that the official site is located now elsewhere. (I'm currently set up the trac, after I'm ready i'll point you to the link) Greetings Winnie -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From winnie at debian.org Wed Dec 24 10:31:30 2008 From: winnie at debian.org (Patrick Winnertz) Date: Wed, 24 Dec 2008 11:31:30 +0100 Subject: commit mailinglist for midnight commander. Message-ID: <200812241131.50826.winnie@debian.org> Hey! As one of the last developers stepped back last week from mc a new development team was formed around mc[1]. In order to organise the development we would like to have a second mailinglist for the midnight commander where we can send commit mails to (e.g. mc-commits at gnome.org). As all other mc related mailinglists are also hosted on gnome.org it would be cool to host this mailinglist also there. Is this possible? Greetings Winnie [1]: This team contains some people who formerly forked mc, and some guys who maintains mc in distributions (e.g. I'm the maintainer of mc in Debian (and in Ubuntu)). -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From INVALID.NOREPLY at gnu.org Thu Dec 18 11:38:45 2008 From: INVALID.NOREPLY at gnu.org (vxcvxc) Date: Thu, 18 Dec 2008 11:38:45 +0000 Subject: [bug #18042] cannot specify port number in shell link In-Reply-To: <20081205-125938.sv71230.34145@savannah.gnu.org> References: <20061017-125118.sv53419.97238@savannah.gnu.org> <20061027-121503.sv13840.75338@savannah.gnu.org> <20061028-144321.sv26390.16214@savannah.gnu.org> <20061030-120454.sv13840.18204@savannah.gnu.org> <20061030-201146.sv53419.53788@savannah.gnu.org> <20081126-141931.sv71018.17806@savannah.gnu.org> <20081126-160744.sv70931.52726@savannah.gnu.org> <20081205-125938.sv71230.34145@savannah.gnu.org> Message-ID: <20081218-113844.sv71439.57726@savannah.gnu.org> Follow-up Comment #8, bug #18042 (project mc): http://bigtitsroundassespic.blogbugs.org/4429334/Blonde-teen-girl-with-big-natural-tits.html Blonde teen girl with big natural tits http://coupleshavingsex.blogtur.com/1532617/Real-couple-having-sex.html Real couple having sex http://lesbianshavingsex.blogtur.com/1532629/Lesbians-in-the-shower.html Lesbians in the shower http://interracialsexvideo.blogtur.com/1532786/Exploited-black-teens.html Exploited black teens http://lesbianshavingsex.blogtur.com lesbians having sex http://freecumshotmovies.blogtur.com/1532625/Cum-filled-pussy-and-face.html Cum filled pussy and face http://bigtitsroundassespic.blogbugs.org Big tits round asses http://coupleshavingsex.blogtur.com/1532616/Amateur-couples-sex-videos-long-tapes.html Amateur couples sex videos long tapes http://freecumshotmovies.blogtur.com/1532624/Girls-covered-in-cum.html Girls covered in cum http://freecumshotmovies.blogtur.com/1532623/Cum-on-my-tits.html Cum on my tits _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Thu Dec 18 11:39:51 2008 From: INVALID.NOREPLY at gnu.org (vxcvxc) Date: Thu, 18 Dec 2008 11:39:51 +0000 Subject: [bug #19721] Aborting a FISH file transfer still causes the FISH layer to consume the whole file In-Reply-To: <20081217-074800.sv71407.32017@savannah.gnu.org> References: <20070427-114045.sv36205.32834@savannah.gnu.org> <20070427-142017.sv41304.77917@savannah.gnu.org> <20070427-163847.sv36205.49379@savannah.gnu.org> <20070502-162029.sv36205.46307@savannah.gnu.org> <20070507-160626.sv36205.38172@savannah.gnu.org> <20070507-181832.sv41304.56007@savannah.gnu.org> <20081119-100741.sv70931.92167@savannah.gnu.org> <20081126-110051.sv71049.25440@savannah.gnu.org> <20081126-160842.sv70931.40005@savannah.gnu.org> <20081205-112214.sv71230.64844@savannah.gnu.org> <20081209-094506.sv71286.62807@savannah.gnu.org> <20081216-162311.sv71407.8025@savannah.gnu.org> <20081217-074800.sv71407.32017@savannah.gnu.org> Message-ID: <20081218-113950.sv71439.57385@savannah.gnu.org> Follow-up Comment #13, bug #19721 (project mc): http://interracialsexvideo.blogtur.com/1532784/Free-interracial-sex-videos.html Free interracial sex videos http://freecumshotmovies.blogtur.com/1532623/Cum-on-my-tits.html Cum on my tits http://lesbianshavingsex.blogtur.com/1532628/Teen-lesbians-squirting.html Teen lesbians squirting http://freecumshotmovies.blogtur.com/1532624/Girls-covered-in-cum.html Girls covered in cum http://interracialsexvideo.blogtur.com/1532785/Free-interracial-porn-movie.html Free interracial porn movie http://freecumshotmovies.blogtur.com/1532621/Girls-who-love-cum.html Girls who love cum http://interracialsexvideo.blogtur.com/1532786/Exploited-black-teens.html Exploited black teens http://lesbianshavingsex.blogtur.com/1532629/Lesbians-in-the-shower.html Lesbians in the shower http://interracialsexvideo.blogtur.com Interracial sex videos http://coupleshavingsex.blogtur.com/1532617/Real-couple-having-sex.html Real couple having sex _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Thu Dec 18 11:40:12 2008 From: INVALID.NOREPLY at gnu.org (vxcvxc) Date: Thu, 18 Dec 2008 11:40:12 +0000 Subject: [bug #22300] Hang on directory change when not run as root In-Reply-To: <20081217-071542.sv71407.83736@savannah.gnu.org> References: <20080213-025719.sv65499.64611@savannah.gnu.org> <20080309-125737.sv36205.18208@savannah.gnu.org> <20080425-165859.sv65499.50134@savannah.gnu.org> <20080426-152107.sv65499.90777@savannah.gnu.org> <20081127-121600.sv71073.94024@savannah.gnu.org> <20081207-184404.sv71230.22098@savannah.gnu.org> <20081217-071542.sv71407.83736@savannah.gnu.org> Message-ID: <20081218-114012.sv71439.13190@savannah.gnu.org> Follow-up Comment #7, bug #22300 (project mc): http://lesbianshavingsex.blogtur.com/1532631/Lesbian-eating-pussy.html Lesbian eating pussy http://coupleshavingsex.blogtur.com/1532613/Couples-making-love-positions.html Couples making love positions http://coupleshavingsex.blogtur.com/1532616/Amateur-couples-sex-videos-long-tapes.html Amateur couples sex videos long tapes http://bigtitsroundassespic.blogbugs.org/4429339/Big-fucking-tits-video.html Big fucking tits video http://freecumshotmovies.blogtur.com/1532623/Cum-on-my-tits.html Cum on my tits http://bigtitsroundassespic.blogbugs.org/4429347/Giant-natural-tits-movie.html Giant natural tits movie http://freecumshotmovies.blogtur.com/1532624/Girls-covered-in-cum.html Girls covered in cum http://lesbianshavingsex.blogtur.com/1532630/Black-lesbians-kissing-and-fucking.html Black lesbians kissing and fucking http://lesbianshavingsex.blogtur.com lesbians having sex http://freecumshotmovies.blogtur.com/1532621/Girls-who-love-cum.html Girls who love cum _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Fri Dec 19 14:29:49 2008 From: INVALID.NOREPLY at gnu.org (dsdsdd) Date: Fri, 19 Dec 2008 14:29:49 +0000 Subject: [bug #18042] cannot specify port number in shell link In-Reply-To: <20081218-113844.sv71439.57726@savannah.gnu.org> References: <20061017-125118.sv53419.97238@savannah.gnu.org> <20061027-121503.sv13840.75338@savannah.gnu.org> <20061028-144321.sv26390.16214@savannah.gnu.org> <20061030-120454.sv13840.18204@savannah.gnu.org> <20061030-201146.sv53419.53788@savannah.gnu.org> <20081126-141931.sv71018.17806@savannah.gnu.org> <20081126-160744.sv70931.52726@savannah.gnu.org> <20081205-125938.sv71230.34145@savannah.gnu.org> <20081218-113844.sv71439.57726@savannah.gnu.org> Message-ID: <20081219-142949.sv71465.81250@savannah.gnu.org> Follow-up Comment #9, bug #18042 (project mc): http://youngteenlesbians.pornlivenews.com/articles/657331/teen-lesbians-licking-pussy Teen lesbians licking pussy http://teencumshotvideo.pornlivenews.com/articles/657365/perfect-female-body Perfect female body http://teencumshotvideo.pornlivenews.com/articles/657358/facial-teen-cumshot Facial teen cumshot http://nudesexycollegegirls.pornlivenews.com/articles/657319/college-girls-gone-wild College girls gone wild http://youngteenlesbians.pornlivenews.com/articles/657326/young-teen-lesbians-show-position-69-in-lovemaking Young teen lesbians show position 69 in lovemaking http://freeteensexvideos.pornlivenews.com/articles/657351/teen-in-the-shower-sex Teen in the shower sex _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Fri Dec 19 14:30:26 2008 From: INVALID.NOREPLY at gnu.org (dsdsdd) Date: Fri, 19 Dec 2008 14:30:26 +0000 Subject: [bug #20182] enter vfs with cmdline buffer In-Reply-To: <20081217-071556.sv71407.48909@savannah.gnu.org> References: <20070616-073643.sv58618.54805@savannah.gnu.org> <20070823-175810.sv36205.81566@savannah.gnu.org> <20070823-160117.sv58618.22731@savannah.gnu.org> <20070824-173408.sv36205.7039@savannah.gnu.org> <20071006-090319.sv58618.72936@savannah.gnu.org> <20081126-105206.sv71049.189@savannah.gnu.org> <20081215-092505.sv71380.20292@savannah.gnu.org> <20081216-162358.sv71407.27812@savannah.gnu.org> <20081217-071556.sv71407.48909@savannah.gnu.org> Message-ID: <20081219-143025.sv71465.14356@savannah.gnu.org> Follow-up Comment #9, bug #20182 (project mc): http://teencumshotvideo.pornlivenews.com/articles/657361/cum-covered-tits Cum covered tits http://freeteensexvideos.pornlivenews.com/articles/657351/teen-in-the-shower-sex Teen in the shower sex http://teencaughtmasturbating.pornlivenews.com/ Teen caught masturbating http://youngfemalemodels.pornlivenews.com/articles/657316/free-thumnails-of-young-school-girls-amateur-models Free thumnails of young school girls amateur models http://youngteenlesbians.pornlivenews.com/ Young Teen Lesbians videos and pictures http://freeteensexvideos.pornlivenews.com/articles/657347/cum-inside-teen-pussy Cum inside teen pussy _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Fri Dec 19 14:30:33 2008 From: INVALID.NOREPLY at gnu.org (dsdsdd) Date: Fri, 19 Dec 2008 14:30:33 +0000 Subject: [bug #21030] "preserve Attributes" unchecked, but chmod errors still there In-Reply-To: <20081216-162402.sv71407.89528@savannah.gnu.org> References: <20070911-093808.sv57722.11718@savannah.gnu.org> <20070913-123531.sv36205.2364@savannah.gnu.org> <20070913-154930.sv36205.94070@savannah.gnu.org> <20070913-143434.sv57722.43298@savannah.gnu.org> <20070917-220346.sv36205.73955@savannah.gnu.org> <20070917-220402.sv36205.63423@savannah.gnu.org> <20081126-141920.sv71018.94976@savannah.gnu.org> <20081205-125529.sv71230.38500@savannah.gnu.org> <20081216-162402.sv71407.89528@savannah.gnu.org> Message-ID: <20081219-143033.sv71465.65429@savannah.gnu.org> Follow-up Comment #8, bug #21030 (project mc): http://youngfemalemodels.pornlivenews.com/articles/657316/free-thumnails-of-young-school-girls-amateur-models Free thumnails of young school girls amateur models http://freeteensexvideos.pornlivenews.com/articles/657347/cum-inside-teen-pussy Cum inside teen pussy http://youngteenlesbians.pornlivenews.com/articles/657329/hot-teen-lesbians-using-anal-beeds Hot teen lesbians using anal beeds http://youngteenlesbians.pornlivenews.com/articles/657336/lesbian-school-girls-photo-and-video Lesbian school girls photo and video http://youngfemalemodels.pornlivenews.com/articles/657315/very-young-cute-male-models Very young cute male models http://freeteensexvideos.pornlivenews.com/ Free teen sex videos _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From weigelt at metux.de Fri Dec 26 00:51:51 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 01:51:51 +0100 Subject: [PATCH] 9P support (via libmvfs+libmixp) Message-ID: <20081226005150.GA24788@nibiru.local> Hi folks, this patch adds 9P support to MC, so you can now easily access 9P fileservers. My future plan is to switch over the extfs stuff to separate 9P servers which are started on-demand. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -------------- next part -------------- Index: src/textconf.c =================================================================== --- src/textconf.c (.../original/mc-4.6.1) (revision 1264) +++ src/textconf.c (.../trunk) (revision 1264) @@ -40,6 +40,9 @@ #ifdef USE_EXT2FSLIB "undelfs", #endif +#ifdef ENABLE_NINEP + "ninepfs", +#endif NULL }; #endif /* USE_VFS */ Index: src/cmd.c =================================================================== --- src/cmd.c (.../original/mc-4.6.1) (revision 1264) +++ src/cmd.c (.../trunk) (revision 1264) @@ -1145,6 +1145,14 @@ "[FIle transfer over SHell filesystem]", "/#sh:", 1); } +#ifdef ENABLE_NINEP +void nineplink_cmd (void) +{ + nice_cd (_(" 9P link to machine "), _(machine_str), + "[Plan9 File System]", "/#9p://", 1); +} +#endif + #ifdef WITH_SMBFS void smblink_cmd (void) { Index: src/cmd.h =================================================================== --- src/cmd.h (.../original/mc-4.6.1) (revision 1264) +++ src/cmd.h (.../trunk) (revision 1264) @@ -1,6 +1,10 @@ #ifndef __CMD_H #define __CMD_H +#ifdef ENABLE_NINEP +void nineplink_cmd (void); +#endif + void netlink_cmd (void); void ftplink_cmd (void); void fishlink_cmd (void); Index: src/main.c =================================================================== --- src/main.c (.../original/mc-4.6.1) (revision 1264) +++ src/main.c (.../trunk) (revision 1264) @@ -809,6 +809,9 @@ #endif {' ', N_("FT&P link..."), 'P', ftplink_cmd}, {' ', N_("S&hell link..."), 'H', fishlink_cmd}, +#ifdef ENABLE_NINEP + {' ', N_("&9P link..."), '9', nineplink_cmd}, +#endif #ifdef WITH_SMBFS {' ', N_("SM&B link..."), 'B', smblink_cmd}, #endif Index: src/Makefile.am =================================================================== --- src/Makefile.am (.../original/mc-4.6.1) (revision 1264) +++ src/Makefile.am (.../trunk) (revision 1264) @@ -37,7 +37,7 @@ endif endif -mc_LDADD = $(EDITLIB) $(SLANGLIB) $(VFSLIB) \ +mc_LDADD = $(EDITLIB) $(SLANGLIB) $(VFSLIB) $(MVFS_LIBS) \ $(INTLLIBS) $(GLIB_LIBS) $(MCLIBS) $(LIBICONV) CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h Index: vfs/9p.c =================================================================== --- vfs/9p.c (.../original/mc-4.6.1) (revision 0) +++ vfs/9p.c (.../trunk) (revision 1264) @@ -0,0 +1,65 @@ +/* Virtual File System: Midnight Commander file system. + + Copyright (C) 1995, 1996, 1997 The Free Software Foundation + + Written by Enrico Weigelt + Derived from smbfs.c + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License + as published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include +#include +#include "mvfs.h" + +static struct vfs_class vfs_ninepfs_ops = +{ + .name = "ninepfs", + .prefix = "9p:", + .flags = VFSF_NOLINKS, + .init = mc_mvfs_init, + .fill_names = mc_mvfs_fill_names, + .open = mc_mvfs_open, + .close = mc_mvfs_close, + .read = mc_mvfs_read, + .write = mc_mvfs_write, + .opendir = mc_mvfs_opendir, + .readdir = mc_mvfs_readdir, + .closedir = mc_mvfs_closedir, + .stat = mc_mvfs_stat, + .lstat = mc_mvfs_lstat, + .fstat = mc_mvfs_fstat, + .chmod = mc_mvfs_chmod, + .chown = mc_mvfs_chown, + .utime = mc_mvfs_utime, + .readlink = mc_mvfs_readlink, + .symlink = mc_mvfs_symlink, + .link = mc_mvfs_link, + .unlink = mc_mvfs_unlink, + .rename = mc_mvfs_rename, + .chdir = mc_mvfs_chdir, + .ferrno = mc_mvfs_errno, + .lseek = mc_mvfs_lseek, + .mknod = mc_mvfs_mknod, + .free = mc_mvfs_free, + .mkdir = mc_mvfs_mkdir, + .rmdir = mc_mvfs_rmdir +// .setctl = mc_mvfs_setctl +}; + +void +init_ninepfs (void) +{ + vfs_register_class (&vfs_ninepfs_ops); +} Index: vfs/vfs.c =================================================================== --- vfs/vfs.c (.../original/mc-4.6.1) (revision 1264) +++ vfs/vfs.c (.../trunk) (revision 1264) @@ -943,7 +943,9 @@ init_mcfs (); #endif /* WITH_MCFS */ #endif /* USE_NETCODE */ - +#ifdef ENABLE_NINEP + init_ninepfs(); +#endif vfs_setup_wd (); } Index: vfs/mvfs.h =================================================================== --- vfs/mvfs.h (.../original/mc-4.6.1) (revision 0) +++ vfs/mvfs.h (.../trunk) (revision 1264) @@ -0,0 +1,60 @@ +/* Virtual File System: Midnight Commander file system. + + Copyright (C) 1995, 1996, 1997 The Free Software Foundation + + Written by Enrico Weigelt + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License + as published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef __MC_MVFS_H +#define __MC_MVFS_H + +#include +#include + +#include "utilvfs.h" +#include "vfs.h" +#include "vfs-impl.h" + +int mc_mvfs_init (struct vfs_class *me); +int mc_mvfs_errno (struct vfs_class *me); +int mc_mvfs_chmod (struct vfs_class *me, const char *path, int mode); +int mc_mvfs_chown (struct vfs_class *me, const char *path, int owner, int group); +int mc_mvfs_utime (struct vfs_class *me, const char *path, struct utimbuf *times); +int mc_mvfs_readlink (struct vfs_class *me, const char *path, char *buf, size_t size); +int mc_mvfs_symlink (struct vfs_class *me, const char *n1, const char *n2); +int mc_mvfs_stat (struct vfs_class *me, const char *path, struct stat *buf); +int mc_mvfs_lstat (struct vfs_class *me, const char *path, struct stat *buf); +int mc_mvfs_mknod (struct vfs_class *me, const char *path, int mode, int dev); +int mc_mvfs_mkdir (struct vfs_class *me, const char *path, mode_t mode); +int mc_mvfs_rmdir (struct vfs_class *me, const char *path); +int mc_mvfs_link (struct vfs_class *me, const char *p1, const char *p2); +int mc_mvfs_rename (struct vfs_class *me, const char *a, const char *b); +void* mc_mvfs_open (struct vfs_class *me, const char *file, int flags, int mode); +void* mc_mvfs_opendir (struct vfs_class *me, const char *dirname); +int mc_mvfs_chdir (struct vfs_class *me, const char *path); +int mc_mvfs_unlink (struct vfs_class *me, const char *path); +int mc_mvfs_read (void *data, char *buffer, int count); +int mc_mvfs_write (void *data, const char *buf, int nbyte); +int mc_mvfs_close (void *data); +void* mc_mvfs_readdir (void *info); +int mc_mvfs_closedir (void *info); +int mc_mvfs_lseek (void *data, off_t offset, int whence); +int mc_mvfs_fstat (void *data, struct stat *buf); +int mc_mvfs_convert_stat (struct stat* buf, MVFS_STAT* s); +void mc_mvfs_free (vfsid id); +void mc_mvfs_fill_names (struct vfs_class *me, fill_names_f func); + +#endif Index: vfs/Makefile.am =================================================================== --- vfs/Makefile.am (.../original/mc-4.6.1) (revision 1264) +++ vfs/Makefile.am (.../trunk) (revision 1264) @@ -12,6 +12,15 @@ AM_CFLAGS = $(GLIB_CFLAGS) endif +# MVFS may be required by multiple FS'ses (eg. 9P) +MVFS_SOURCES=mvfs.c + +if ENABLE_NINEP +BASICFILES_NINEP=9p.c +BASICFILES_MVFS=$(MVFS_SOURCES) +AM_CFLAGS+=$(MVFS_CFLAGS) +endif + BASICFILES = \ cpio.c \ direntry.c \ @@ -21,7 +30,9 @@ tar.c \ sfs.c \ utilvfs.c \ - vfs.c + vfs.c \ + $(BASICFILES_MVFS) \ + $(BASICFILES_NINEP) VFSHDRS = \ ftpfs.h \ Index: vfs/mvfs.c =================================================================== --- vfs/mvfs.c (.../original/mc-4.6.1) (revision 0) +++ vfs/mvfs.c (.../trunk) (revision 1264) @@ -0,0 +1,488 @@ +/* Virtual File System: Midnight Commander file system. + + Copyright (C) 1995, 1996, 1997 The Free Software Foundation + + Written by Enrico Weigelt + Derived from smbfs.c + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License + as published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#include "mvfs.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "utilvfs.h" + +#include "vfs.h" +#include "vfs-impl.h" +#include +#include <9p-mixp/mixp.h> +#include +#include + +// __DEBUG_MVFS + +static MVFS_FILESYSTEM* acfs = NULL; +static MVFS_FILESYSTEM* stack_fs = NULL; +static int my_errno; + +/* stuff that is same with each connection */ +static mode_t myumask = 0755; +static int got_user = 0; +static int got_pass = 0; +static char password[256]; +static char username[256]; + +static inline const char* _translate_filename(const char* file) +{ + if (file==NULL) + return NULL; + const char* s = strchr(file,'#'); + if (s) + return s+1; + return file; +} + +int mc_mvfs_init (struct vfs_class * me) +{ + myumask = umask (0); + umask (myumask); + myumask = ~myumask; + + if (getenv ("USER")) { + char *p; + + strcpy (username, getenv ("USER")); + got_user = 1; +#ifdef __DEBUG_MVFS + fprintf(stderr,"mc_mvfs_init(): $USER:%s\n", username); +#endif + if ((p = strchr (username, '%'))) { + *p = 0; + strcpy (password, p + 1); + got_pass = 1; + memset (strchr (getenv ("USER"), '%') + 1, 'X', strlen (password)); +#ifdef __DEBUG_MVFS + fprintf (stderr,"mc_mvfs_init(): $USER%%pass: %s%%%s\n",username, password); +#endif + } +// strupper (username); + } + if (getenv ("PASSWD")) { + strcpy (password, getenv ("PASSWD")); + got_pass = 1; + } + + acfs = mvfs_autoconnectfs_create(); + stack_fs = mvfs_metacachefs_create_1(acfs); + + return 1; +} + +int mc_mvfs_read (void *data, char *buffer, int count) +{ + MVFS_FILE* fp = (MVFS_FILE*)data; + int ret = mvfs_file_read(fp, buffer, count); + if (ret<0) + { + my_errno = -ret; + return -1; + } + return ret; +} + +int mc_mvfs_write (void *data, const char *buf, int nbyte) +{ + MVFS_FILE* fp = (MVFS_FILE*)data; + int ret = mvfs_file_write(fp, buf, nbyte); + if (ret<0) + { + my_errno = -ret; + return -1; + } + return ret; +} + +int mc_mvfs_close (void *data) +{ + MVFS_FILE* fp = (MVFS_FILE*) data; + mvfs_file_unref(fp); + return 0; // -1 indicates error +} + +int mc_mvfs_errno (struct vfs_class *me) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"mc_mvfs_errno: %s\n", g_strerror(my_errno)); +#endif + return my_errno; +} + +void * mc_mvfs_readdir(void *info) +{ + static union vfs_dirent mc_mvfs_readdir_data; + + MVFS_FILE* fp = (MVFS_FILE*)info; + MVFS_STAT* s = mvfs_file_scan(info); + + if (s==NULL) + return NULL; + + mc_mvfs_readdir_data.dent.d_ino = 0; + mc_mvfs_readdir_data.dent.d_off = 0; + mc_mvfs_readdir_data.dent.d_reclen = -1; // FIXME !!! + mc_mvfs_readdir_data.dent.d_type = 0; + memset(mc_mvfs_readdir_data.dent.d_name, 0, sizeof(mc_mvfs_readdir_data.dent.d_name)); + strncpy(mc_mvfs_readdir_data.dent.d_name, s->name, sizeof(mc_mvfs_readdir_data.dent.d_name)-1); + + compute_namelen(&mc_mvfs_readdir_data.dent); + return &mc_mvfs_readdir_data; +} + +int mc_mvfs_closedir (void *info) +{ + MVFS_FILE* fp = (MVFS_FILE*)info; + mvfs_file_unref(fp); + return 0; +} + +int mc_mvfs_chmod (struct vfs_class *me, const char *path, int mode) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"mc_mvfs_chmod(path:%s, mode:%d)\n", path, mode); +#endif + int ret = mvfs_fs_chmod(stack_fs, _translate_filename(path), mode); + if (ret==0) + return 0; + my_errno = -ret; + return -1; +} + +static inline char* uid2name(uid_t uid) +{ + endpwent(); + struct passwd* pw = getpwuid(uid); + char* n = strdup((pw==NULL) ? "INCOGNITO" : pw->pw_name); + endpwent(); + return n; +} + +static inline char* gid2name(gid_t gid) +{ + endgrent(); + struct group* gr = getgrgid(gid); + char* n = strdup((gr==NULL) ? "INCOGNITO" : gr->gr_name); + endgrent(); + return n; +} + +int mc_mvfs_chown (struct vfs_class *me, const char *path, int owner, int group) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"mc_mvfs_chown(path:%s, owner:%d, group:%d)\n", path, owner, group); +#endif + char* uname = uid2name(owner); + char* gname = gid2name(group); + + int ret = mvfs_fs_chown(stack_fs, _translate_filename(path), uname, gname); + free(uname); + free(gname); + + if (ret<0) + { + my_errno = -ret; + return 0; + } + return 0; +} + +int mc_mvfs_utime (struct vfs_class *me, const char *path, struct utimbuf *times) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"mc_mvfs_utime(path:%s)\n", path); +#endif + my_errno = EOPNOTSUPP; + return -1; +} + +int mc_mvfs_readlink (struct vfs_class *me, const char *path, char *buf, size_t size) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"mc_mvfs_readlink(path:%s, buf:%s, size:%d)\n", path, buf, (int) size); +#endif + if ((buf==0)||(size<3)) + { + my_errno = EFAULT; + return -1; + } + MVFS_SYMLINK l = mvfs_fs_readlink(stack_fs, path); + if (l.errcode != 0) + { + my_errno = l.errcode; + return -1; + } + + my_errno = 0; + strncpy(buf, l.target, size); + return strlen(buf); +} + +int mc_mvfs_symlink (struct vfs_class *me, const char *n1, const char *n2) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"mc_mvfs_symlink(n1:%s, n2:%s)\n", n1, n2); +#endif + int ret = mvfs_fs_symlink(stack_fs, n1, n2); + if (ret<0) + { + my_errno = -ret; + return -1; + } + return ret; +} + +int mc_mvfs_convert_stat(struct stat* buf, MVFS_STAT* s) +{ + if (s==NULL) + { + fprintf(stderr,"mc_mvfs_convert_stat(): NULL stat passed\n"); + memset(buf, 0, sizeof(struct stat)); + return 0; + } + + if (buf==NULL) + { + fprintf(stderr,"mc_mvfs_convert_stat() GOT NO BUFFER !\n"); + return 0; + } + + buf->st_dev = 0; + buf->st_ino = 1; + buf->st_mode = s->mode; + buf->st_nlink = 1; + buf->st_size = s->size; + buf->st_atime = s->atime; + buf->st_mtime = s->mtime; + buf->st_ctime = s->ctime; + + struct passwd* pw = getpwnam(s->uid); + struct group* gr = getgrnam(s->gid); + + buf->st_uid = (pw ? pw->pw_uid : 0); // FIXME: should we use -1 ? + buf->st_gid = (gr ? gr->gr_gid : 0); + + return 1; +} + +int mc_mvfs_stat (struct vfs_class * me, const char *path, struct stat *buf) +{ + MVFS_STAT* s = mvfs_fs_statfile(stack_fs, _translate_filename(path)); + if (!mc_mvfs_convert_stat(buf,s)) + { +#ifdef __DEBUG_MVFS + fprintf(stderr, "mc_mvfs_fstat() failed for %s\n", path); +#endif + my_errno = EFAULT; + return -EFAULT; + } + + mvfs_stat_free(s); + return 0; +} + +// FIXME: should use an separate lstat call, which isn't yet supported by MVFS ;-o +// (currently no special support for symlinks) +int mc_mvfs_lstat (struct vfs_class * me, const char *path, struct stat *buf) +{ + MVFS_STAT* s = mvfs_fs_statfile(stack_fs, _translate_filename(path)); + if (!mc_mvfs_convert_stat(buf,s)) + { +#ifdef __DEBUG_MVFS + fprintf(stderr, "mc_mvfs_fstat() failed for %s\n", path); +#endif + my_errno = EFAULT; + return -EFAULT; + } + + mvfs_stat_free(s); + return 0; +} + +int mc_mvfs_lseek (void *data, off_t offset, int whence) +{ + MVFS_FILE* fp = (MVFS_FILE*)data; + return mvfs_file_seek(fp, offset, whence); +} + +int mc_mvfs_mknod (struct vfs_class *me, const char *path, int mode, int dev) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"9P->mknod(path:%s, mode:%d, dev:%d)\n", path, mode, dev); +#endif + my_errno = EOPNOTSUPP; + return -1; +} + +int mc_mvfs_mkdir (struct vfs_class * me, const char *path, mode_t mode) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"9P->mkdir(path:%s, mode:%d)\n", path, (int) mode); +#endif + int ret = mvfs_fs_mkdir(stack_fs, path, mode); + if (ret!=0) + { + my_errno = -ret; + return -1; + } + return 0; +} + +int mc_mvfs_rmdir (struct vfs_class *me, const char *path) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"9P->rmdir(path:%s)\n", path); +#endif + int ret = mvfs_fs_unlink(stack_fs, path); + if (ret!=0) + { + my_errno = -ret; + return -1; + } + return 0; +} + +int mc_mvfs_link (struct vfs_class *me, const char *p1, const char *p2) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"9P->link(p1:%s, p2:%s)\n", p1, p2); +#endif + my_errno = EOPNOTSUPP; + return -1; +} + +void * mc_mvfs_open (struct vfs_class *me, const char *filename, int flags, int mode) +{ + const char* file = _translate_filename(filename); +#ifdef __DEBUG_MVFS + fprintf(stderr,"mc_mvfs_open: filename=\"%s\" translated=\"%s\"\n", filename, file); +#endif + MVFS_FILE* f = mvfs_fs_openfile(stack_fs, file, mode); + return f; +} + +// FIXME +void * mc_mvfs_opendir (struct vfs_class *me, const char *dirname) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"mc_mvfs_opendir: dirname=\"%s\"\n", dirname); +#endif + return mc_mvfs_open(me,dirname,0,0); +} + +int mc_mvfs_chdir (struct vfs_class *me, const char *path) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"mc_mvfs_chdir: dirname=\"%s\"\n", path); +#endif + MVFS_FILE* f = (MVFS_FILE*) mc_mvfs_opendir(me, path); + if (f) + { + mvfs_file_unref(f); + return 0; + } +#ifdef __DEBUG_MVFS + fprintf(stderr,"mc_mvfs_chdir() failed to open: %s\n", path); +#endif + return -1; // FIXME: be some bite more chdir() conformant ;-O +} + +int mc_mvfs_unlink (struct vfs_class *me, const char *path) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"unlink not supported yet: filename=\"%s\"\n", path); +#endif + my_errno = EOPNOTSUPP; + return -1; +} + +int mc_mvfs_rename (struct vfs_class *me, const char *a, const char *b) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"rename not supported yet\n"); +#endif + my_errno = EOPNOTSUPP; +} + +int mc_mvfs_fstat (void *data, struct stat *buf) +{ + MVFS_STAT* s = mvfs_file_stat((MVFS_FILE*)data); + if (!mc_mvfs_convert_stat(buf,s)) + { +#ifdef __DEBUG_MVFS + fprintf(stderr, "mc_mvfs_fstat() failed\n"); +#endif + my_errno = EFAULT; + return -EFAULT; + } + + mvfs_stat_free(s); + return 0; +} + +void mc_mvfs_free (vfsid id) +{ +#ifdef __DEBUG_MVFS + fprintf(stderr,"9P->free(%p)\n", id); +#endif +} + +void mc_mvfs_fill_names (struct vfs_class *me, fill_names_f func) +{ + char* srvlist = mvfs_autoconnectfs_getconnections(stack_fs); + + if (srvlist == NULL) + return; + + char* walk; + for (walk=srvlist; walk[0]!=0;) + { + char* delim = strchr(walk,'\n'); + if (delim) + { + // we got more + *delim = 0; + if (walk[0]) + (*func)(walk); + walk = delim+1; + } + else + { + if (walk[0]) + (*func)(walk); + // this was the last ... goto out + goto out; + } + } + +out: + free(srvlist); +} Index: config.h.in =================================================================== --- config.h.in (.../original/mc-4.6.1) (revision 1264) +++ config.h.in (.../trunk) (revision 1264) @@ -11,6 +11,9 @@ /* Define if `d_ino' is member of `struct directory' */ #undef D_INO_IN_DIRENT +/* Define to enable 9P */ +#undef ENABLE_NINEP + /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS Index: configure.ac =================================================================== --- configure.ac (.../original/mc-4.6.1) (revision 1264) +++ configure.ac (.../trunk) (revision 1264) @@ -564,6 +564,17 @@ fi fi +dnl +dnl 9P support via libmvfs +dnl +AC_ARG_ENABLE([9p], + [ --enable-9p Support for Plan9 Resource sharing protocol (via libmvfs) [[no]]]) +if test "x$enable_9p" != xno; then + AC_DEFINE(ENABLE_NINEP, 1, [Define to enable 9P]) + PKG_CHECK_MODULES([MVFS],[libmvfs libmixp]) + vfs_flags="$vfs_flags, ninepfs" +fi + ri_GCC_WARNINGS AC_SUBST(CFLAGS) @@ -582,6 +593,7 @@ AC_CONFIG_SUBDIRS([vfs/samba]) fi +AM_CONDITIONAL(ENABLE_NINEP, [test "$enable_9p" = "yes"]) AM_CONDITIONAL(USE_EDIT, [test -n "$use_edit"]) AM_CONDITIONAL(USE_VFS, [test "x$use_vfs" = xyes]) AM_CONDITIONAL(USE_VFS_NET, [test x"$use_net_code" = xtrue]) Index: README.MVFS-9P =================================================================== --- README.MVFS-9P (.../original/mc-4.6.1) (revision 0) +++ README.MVFS-9P (.../trunk) (revision 1264) @@ -0,0 +1,19 @@ + +This branch of mc has support for 9P via the mvfs library. + +To build it you need to have these libs installed: + + * libmixp (http://releases.metux.de/libmixp/) + * libmvfs (http://releases.metux.de/libmvfs/) + +The files added are: + + * mvfs.c the actual mc-vfs -> mvfs bridge'ing + * 9p.c registere ninep:// for the 9P filesystem protocol, going through mvfs + + +In future, several synthetic filesystems will be replaced as 9P servers and started +by mvfs on-demand, so eventually replacing much of the extfs stuff some day ;-O + + + Enrico Weigelt, metux IT service From weigelt at metux.de Fri Dec 26 01:41:34 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 02:41:34 +0100 Subject: Further Midnight Commander development In-Reply-To: <200812231359.44381.winnie@debian.org> References: <494997EB.3080006@gmail.com> <200812231124.52385.winnie@debian.org> <20081223115625.GA4564@ciampix.net> <200812231359.44381.winnie@debian.org> Message-ID: <20081226014133.GB24788@nibiru.local> Hi folks, I think the most important is to have official tree as global reference and release point. Everyone else should work relative to the lastest official release and submit his patches against it. These patches should go to this list, be discussed here and then, if considered good, be applied to the official tree. IMHO we should start with the latest stable release (4.6.1 ?) and apply all the vendor/distro patches floating around step by step (*1). Once that's done, we should make a new official release very soon. If we need a new hosting place, I can offer that (*2). As for the Russian issue: we devs should really agree on one well-spoken language, English. Those who're not yet capable of speaking English, could be proxied by others. That speaking of *development* - end user support is an different issue. cu *1: I'm currently in the process of reviewing Gentoo's patches and sending them to the list. *2: I could use a bit assistance in setting up trac on lighttpd, for some strange reason, authentication refuses to work at my site :( -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Fri Dec 26 01:47:33 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 02:47:33 +0100 Subject: automatic symlink maintenance [WAS: Removing myself from the project] In-Reply-To: <20081217210838.535cca7f@absurd> References: <1229531994.30951.4.camel@dv> <200812172007.58186.winnie@debian.org> <20081217210838.535cca7f@absurd> Message-ID: <20081226014733.GC24788@nibiru.local> * Janek Kozicki schrieb: > Would you be so kind to consider my feature request? > > http://mail.gnome.org/archives/mc-devel/2008-November/msg00003.html IMHO, such a feature clearly doesn't belong into mc itself - it's a filesystem issue ;-P So I suggest writing a little 9P fileserver for that (which then of course can also be used outside of MC) - I've added 9P support for MC several month ago and just sent a patch to the list. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Fri Dec 26 02:19:13 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 03:19:13 +0100 Subject: [PATCH] 7zip support Message-ID: <20081226021913.GD24788@nibiru.local> -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -------------- next part -------------- # # Adds 7zip extfs descriptor # # Source: Gentoo Portage # Reference: mc-4.6.1 # Submit-By: Enrico Weigelt, metux IT service # Submit-Date: 2008-12-26 # State: new # diff -ruN mc-4.6.1.orig/lib/mc.ext.in mc-4.6.1/lib/mc.ext.in --- mc-4.6.1.orig/lib/mc.ext.in 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/lib/mc.ext.in 2008-12-26 03:03:19.000000000 +0100 @@ -246,6 +246,12 @@ shell/.info Open=info -f %f +# 7-Zip, Needs to be before manual page definitions +regex/\.(7z|7Z)$ + View=%view{ascii} 7za l %f 2>/dev/null + Open=%cd %p#u7z + + # Manual page # Exception - .so libraries are not manual pages regex/\.(so|so\.[0-9\.]*)$ diff -ruN mc-4.6.1.orig/vfs/extfs/extfs.ini mc-4.6.1/vfs/extfs/extfs.ini --- mc-4.6.1.orig/vfs/extfs/extfs.ini 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/vfs/extfs/extfs.ini 2008-12-26 03:03:19.000000000 +0100 @@ -7,6 +7,7 @@ ulha urar uha +u7z # For arj usage you need a special patch to unarj (see unarj.diff) uarj From weigelt at metux.de Fri Dec 26 02:19:48 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 03:19:48 +0100 Subject: [PATCH] some bash support fixups Message-ID: <20081226021948.GE24788@nibiru.local> -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -------------- next part -------------- # # Not quite sure what this patch is really about, but it seems to remove # some special bash<2.0.5b magic in subshell_name_quote() # # Source: Gentoo Portage # Reference: mc-4.6.1 # Submit-By: Enrico Weigelt, metux IT service # Submit-Date: 2008-12-25 # State: new # diff -ruN mc-4.6.1.orig/src/subshell.c mc-4.6.1/src/subshell.c --- mc-4.6.1.orig/src/subshell.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/subshell.c 2008-12-26 03:07:32.000000000 +0100 @@ -718,29 +718,13 @@ memcpy (d, cmd_start, len); d += len; - /* - * Print every character in octal format with the leading backslash. - * tcsh and zsh may require 4-digit octals, bash < 2.05b doesn't like them. - */ - if (subshell_type == BASH) { for (; *s; s++) { - /* Must quote numbers, so that they are not glued to octals */ if (isalpha ((unsigned char) *s)) { *d++ = (unsigned char) *s; } else { - sprintf (d, "\\%03o", (unsigned char) *s); - d += 4; - } - } - } else { - for (; *s; s++) { - if (isalnum ((unsigned char) *s)) { - *d++ = (unsigned char) *s; - } else { sprintf (d, "\\0%03o", (unsigned char) *s); d += 5; } - } } memcpy (d, common_end, sizeof (common_end)); From weigelt at metux.de Fri Dec 26 02:20:14 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 03:20:14 +0100 Subject: [PATCH] ebuild syntax file Message-ID: <20081226022014.GF24788@nibiru.local> -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -------------- next part -------------- # # Adds gentoo ebuild file syntax definition # # Source: Gentoo Portage # Reference: mc-4.6.1 # Submit-By: Enrico Weigelt, metux IT service # Submit-Date: 2008-12-26 # State: new # diff -ruN mc-4.6.1.orig/syntax/Makefile.am mc-4.6.1.ebuild-syntax/syntax/Makefile.am --- mc-4.6.1.orig/syntax/Makefile.am 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1.ebuild-syntax/syntax/Makefile.am 2008-12-26 02:19:01.000000000 +0100 @@ -8,6 +8,7 @@ changelog.syntax \ diff.syntax \ dos.syntax \ + ebuild.syntax \ eiffel.syntax \ fortran.syntax \ html.syntax \ diff -ruN mc-4.6.1.orig/syntax/Makefile.in mc-4.6.1.ebuild-syntax/syntax/Makefile.in --- mc-4.6.1.orig/syntax/Makefile.in 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1.ebuild-syntax/syntax/Makefile.in 2008-12-26 02:19:18.000000000 +0100 @@ -222,6 +222,7 @@ changelog.syntax \ diff.syntax \ dos.syntax \ + ebuild.syntax \ eiffel.syntax \ fortran.syntax \ html.syntax \ diff -ruN mc-4.6.1.orig/syntax/Syntax mc-4.6.1.ebuild-syntax/syntax/Syntax --- mc-4.6.1.orig/syntax/Syntax 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1.ebuild-syntax/syntax/Syntax 2008-12-26 02:18:26.000000000 +0100 @@ -144,5 +144,8 @@ file Don_t_match_me Mail\sfolder ^From\s include mail.syntax +file .\*\\.(ebuild|eclass)$ Gentoo\sEbuild +include ebuild.syntax + file .\* unknown include unknown.syntax diff -ruN mc-4.6.1.orig/syntax/Syntax.orig mc-4.6.1.ebuild-syntax/syntax/Syntax.orig --- mc-4.6.1.orig/syntax/Syntax.orig 1970-01-01 01:00:00.000000000 +0100 +++ mc-4.6.1.ebuild-syntax/syntax/Syntax.orig 2005-05-26 09:21:34.000000000 +0200 @@ -0,0 +1,148 @@ +# This file describes which highlighting scheme is applied to a particular +# file in mcedit. +# +# Each entry consists of two lines: a "file" specification and the +# corresponding highlighting definition ("include"). A file specification +# can have two or three fields, each separated by white-space characters. +# +# The first field is a regular expression that is matched against the file +# name. The second field is a description of the file type and is +# currently unused. The third (optional) field is a regular expression +# that is matched against the first line of the file. The first entry +# that matches wins, that is, all the entries below are ignored. +# +# Certain characters must be quoted in these fields. These are space (\s), +# tabs (\t), backslashes(\\), plus (\+) and asterisk (\*). Braces {} and +# brackets [] must not be quoted in this file. +# +# You can use the following colors in the syntax highlighting files: +# black, blue, brightblue, brightcyan, brightgreen, brightmagenta, +# brightred, brown, cyan, gray, green, lightgray, magenta, red, white, +# yellow +# + +file [Ss]yntax$ Syntax\sHighlighting\sdefinitions ^#\ssyntax\srules\sversion\s +include syntax.syntax + +file ..\*\\.(e)$ Eiffel\sSource\sFile +include eiffel.syntax + +file ..\*\\.(diff|rej|patch)$ Diff\sOutput ^(diff|Index:)\s +include diff.syntax + +file ..\*\\.lsm$ LSM\sFile +include lsm.syntax + +file ..\*\\.sh$ Shell\sScript ^#!.\*([\s/]([abd-z]?|ba|pdk)sh|@SH@) +include sh.syntax + +file ..\*\\.(pl|PL|pm|PM)$ Perl\sProgram ^#!.\*([\s/]perl|@PERL@) +include perl.syntax + +file ..\*\\.(py|PY)$ Python\sProgram ^#!.\*([\s/]python|@PYTHON@) +include python.syntax + +file ..\*\\.(rb|RB)$ Ruby\sProgram ^#!.\*([\s/]ruby|@RUBY@) +include ruby.syntax + +file ..\*\\.(man|[0-9n]|[0-9]x)$ NROFF\sSource +include nroff.syntax + +file ..\*\\.(htm|html|HTM|HTML)$ HTML\sFile +include html.syntax + +file ..\*\\.(xml|XML|xsd|XSD|xslt?|XSLT?|dtd|DTD|qpg|qpg.in)$ XML\sdocument (\\?xml\sversion|!DOCTYPE\s) +include xml.syntax + +file ..\*\\.(pp|PP|pas|PAS|dpr|DPR|inc|INC)$ Pascal\sProgram +include pascal.syntax + +file ..\*\\.(ada|adb|ads|ADA|ADB|ADS)$ Ada\sProgram +include ada95.syntax + +file ..\*\\.(tcl|itcl|TCL|ITCL)$ Tcl\sProgram +include tcl.syntax + +file ..\*\\.(sl|SL)$ S-Lang\sProgram +include slang.syntax + +file ..\*\\.tex$ LaTeX\s2.09\sDocument +include latex.syntax + +file ..\*\.(texi|texinfo|TEXI|TEXINFO)$ Texinfo\sDocument +include texinfo.syntax + +file ..\*\\.([chC]|CC|cxx|cc|cpp|CPP|CXX|hxx|h\.in)$ C/C\+\+\sProgram +include c.syntax + +file ..\*\\.[fF]$ Fortran\sProgram +include fortran.syntax + +file ..\*\\.i$ SWIG\sSource +include swig.syntax + +file ..\*\\.(php|PHP)[0-9]?$ PHP\sProgram +include php.syntax + +file ..\*\\.(java|JAVA|Java|jav)$ Java\sProgram +include java.syntax + +file ..\*\\.(cs|CS)$ C\#\sProgram +include cs.syntax + +file ..\*\\.(js|JS)$ JavaScript\sProgram +include js.syntax + +file ..\*\\.(asax|aspx|ascx|asmx|ashx)$ ASPX\sFile +include aspx.syntax + +file ..\*\\.st$ SmallTalk\sProgram +include smalltalk.syntax + +file ..\*\\.(lisp|lsp|el)$ Lisp\sProgram +include lisp.syntax + +file ..\*\\.(ml|mli|mly|mll|mlp)$ ML\sProgram +include ml.syntax + +file ..\*\\.m$ Matlab\sor\sOctave\sFile +include octave.syntax + +file ..\*\\.(sql|SQL)$ SQL\sProgram +include sql.syntax + +file ..\*\\.(spec|spec\.in)$ RPM\sSpecfile +include spec.syntax + +file .\*ChangeLog[\\\.A-Za-z0-9_]\*$ GNU\sChangeLog\sFile +include changelog.syntax + +file (.\*[Mm]akefile[\\\.A-Za-z0-9]\*|..\*\\.mk)$ Makefile +include makefile.syntax + +file (..\*\\.m4$|configure\\.in|configure\\.ac) M4\sMacroprocessor\sSource +include m4.syntax + +file ..\*\\.(bat|cmd)$ DOS\sBatch +include dos.syntax + +file ..\*\\.(po|pot|pox)$ PO\sFile +include po.syntax + +file ..\*\\.([Aa][Ss][Mm]|s|S)$ ASM\sProgram +include assembler.syntax + +file ..\*\\.([Pp][Oo][Vv])$ POV\sScript +include povray.syntax + +file ..\*\\.([lL][uU][aA])$ LUA\sProgram +include lua.syntax + +file ..\*\\.([iI][dD][lL])$ CORBA\sIDL +include idl.syntax + +file Don_t_match_me Mail\sfolder ^From\s +include mail.syntax + +file .\* unknown +include unknown.syntax diff -ruN mc-4.6.1.orig/syntax/ebuild.syntax mc-4.6.1.ebuild-syntax/syntax/ebuild.syntax --- mc-4.6.1.orig/syntax/ebuild.syntax 1970-01-01 01:00:00.000000000 +0100 +++ mc-4.6.1.ebuild-syntax/syntax/ebuild.syntax 2008-04-27 13:05:35.000000000 +0200 @@ -0,0 +1,87 @@ +context default + keyword linestart HOMEPAGE brightcyan + keyword linestart DESCRIPTION brightcyan + keyword linestart SRC_URI brightcyan + keyword linestart LICENSE brightcyan + keyword linestart SLOT brightcyan + keyword linestart KEYWORDS brightcyan + keyword linestart IUSE brightcyan + keyword linestart RESTRICT brightcyan + keyword linestart DEPEND brightcyan + keyword linestart RDEPEND brightcyan + keyword linestart EAPI brightcyan + keyword linestart S brightcyan + + keyword whole local yellow + keyword whole use yellow + keyword whole has_version yellow + keyword whole best_version yellow + keyword whole use_with yellow + keyword whole use_enable yellow + keyword whole keepdir yellow + keyword whole econf yellow + keyword whole einstall yellow + keyword whole die yellow + keyword whole einfo yellow + keyword whole elog yellow + keyword whole emake yellow + keyword whole eerror yellow + keyword whole epatch yellow + keyword whole ebegin yellow + keyword whole eend yellow + keyword whole ewarn yellow + keyword whole unpack yellow + + keyword whole diropts yellow + keyword whole dobin yellow + keyword whole docinto yellow + keyword whole dodir yellow + keyword whole dodoc yellow + keyword whole doexe yellow + keyword whole dohard yellow + keyword whole dohtml yellow + keyword whole doinfo yellow + keyword whole doins yellow + keyword whole dolib.a yellow + keyword whole dolib.so yellow + keyword whole dolib yellow + keyword whole doman yellow + keyword whole dosbin yellow + keyword whole dosym yellow + keyword whole exeinto yellow + keyword whole exeopts yellow + keyword whole fowners yellow + keyword whole fperms yellow + keyword whole insinto yellow + keyword whole insopts yellow + keyword whole into yellow + keyword whole libopts yellow + keyword whole newbin yellow + keyword whole newdoc yellow + keyword whole newexe yellow + keyword whole newins yellow + keyword whole newman yellow + keyword whole newsbin yellow + keyword whole prepall yellow + keyword whole prepalldocs yellow + keyword whole prepallinfo yellow + keyword whole prepallman yellow + + keyword = yellow + keyword : yellow + keyword ${+} brightgreen + + keyword linestart abcdefghijklmnopqrstuvwxyz_\(\) brightmagenta + + keyword *() brightcyan + + keyword { magenta + keyword } magenta + +context linestart inherit \n magenta + keyword whole inherit yellow + +context # \n red + +context " " green + keyword wholeright ${+} brightgreen From weigelt at metux.de Fri Dec 26 02:21:31 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 03:21:31 +0100 Subject: [PATCH] cons.saver: non-blocking console Message-ID: <20081226022130.GI24788@nibiru.local> -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -------------- next part -------------- # # cons.saver: open the console in non-blocking mode # # Source: Gentoo Portage # Reference: 4.6.1 # Submit-By: Enrico Weigelt, metux IT service # Submit-Date: 2008-12-26 # State: new # diff -ruN mc-4.6.1.orig/src/cons.saver.c mc-4.6.1/src/cons.saver.c --- mc-4.6.1.orig/src/cons.saver.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/cons.saver.c 2008-12-26 03:15:34.000000000 +0100 @@ -134,7 +134,7 @@ if (seteuid (uid) < 0) die (); - console_fd = open (tty_name, O_RDONLY); + console_fd = open (tty_name, O_RDONLY | O_NONBLOCK); if (console_fd < 0) die (); if (fstat (console_fd, &st) < 0 || ! S_ISCHR (st.st_mode)) From weigelt at metux.de Fri Dec 26 02:20:37 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 03:20:37 +0100 Subject: [PATCH] largefile fixups Message-ID: <20081226022037.GG24788@nibiru.local> -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -------------- next part -------------- # # Some fixups for large file support (64bit sizes) on 32bit systems # # Source: Gentoo Portage # Reference: 4.6.1 # Submit-By: Enrico Weigelt, metux IT service # Submit-Date: 2008-12-26 # Submit-State: new # diff -Naur mc-4.6.1.orig/intl/loadmsgcat.c mc-4.6.1/intl/loadmsgcat.c --- mc-4.6.1.orig/intl/loadmsgcat.c 2005-07-23 18:52:57.000000000 +0200 +++ mc-4.6.1/intl/loadmsgcat.c 2006-03-19 17:11:14.000000000 +0100 @@ -1002,7 +1002,7 @@ /* The magic number is wrong: not a message catalog file. */ #ifdef HAVE_MMAP if (use_mmap) - munmap ((caddr_t) data, size); + munmap ((void *) data, size); else #endif free (data); @@ -1271,7 +1271,7 @@ free (domain->malloced); #ifdef HAVE_MMAP if (use_mmap) - munmap ((caddr_t) data, size); + munmap ((void *) data, size); else #endif free (data); @@ -1306,7 +1306,7 @@ # ifdef _POSIX_MAPPED_FILES if (domain->use_mmap) - munmap ((caddr_t) domain->data, domain->mmap_size); + munmap ((void *) domain->data, domain->mmap_size); else # endif /* _POSIX_MAPPED_FILES */ free ((void *) domain->data); diff -Naur mc-4.6.1.orig/src/view.c mc-4.6.1/src/view.c --- mc-4.6.1.orig/src/view.c 2005-05-27 16:19:18.000000000 +0200 +++ mc-4.6.1/src/view.c 2006-03-19 17:10:34.000000000 +0100 @@ -76,6 +76,12 @@ #define vwidth (view->widget.cols - (view->have_frame ? 2 : 0)) #define vheight (view->widget.lines - (view->have_frame ? 2 : 0)) +#if GLIB_MAJOR_VERSION >= 2 +# define my_g_malloc g_try_malloc +#else +# define my_g_malloc g_malloc +#endif + /* Offset in bytes into a file */ typedef unsigned long offset_type; #define INVALID_OFFSET ((offset_type) -1) @@ -560,8 +566,8 @@ view->data = mc_mmap (0, view->s.st_size, PROT_READ, MAP_FILE | MAP_SHARED, view->file, 0); else - view->data = (caddr_t) -1; - if ((caddr_t) view->data != (caddr_t) - 1) { + view->data = (void *) -1; + if (view->data != (void *)-1) { /* mmap worked */ view->first = 0; view->bytes_read = view->s.st_size; @@ -573,6 +579,9 @@ /* For the OSes that don't provide mmap call, try to load all the * file into memory (alex at bcs.zaporizhzhe.ua). Also, mmap can fail * for any reason, so we use this as fallback (pavel at ucw.cz) */ + + /* If large file support is enabled, st_size is a 64 bit value and + * will thus on 32 bit platforms possibly be beyond the range of gulong */ /* Make sure view->s.st_size is not truncated when passed to g_malloc */ if ((gulong) view->s.st_size == view->s.st_size) diff -Naur mc-4.6.1.orig/vfs/local.c mc-4.6.1/vfs/local.c --- mc-4.6.1.orig/vfs/local.c 2004-09-25 01:00:18.000000000 +0200 +++ mc-4.6.1/vfs/local.c 2006-03-19 17:00:45.000000000 +0100 @@ -243,8 +243,8 @@ } #ifdef HAVE_MMAP -caddr_t -local_mmap (struct vfs_class *me, caddr_t addr, size_t len, int prot, int flags, void *data, off_t offset) +void * +local_mmap (struct vfs_class *me, void *addr, size_t len, int prot, int flags, void *data, off_t offset) { int fd = * (int *)data; @@ -252,7 +252,7 @@ } int -local_munmap (struct vfs_class *me, caddr_t addr, size_t len, void *data) +local_munmap (struct vfs_class *me, void *addr, size_t len, void *data) { return munmap (addr, len); } diff -Naur mc-4.6.1.orig/vfs/local.h mc-4.6.1/vfs/local.h --- mc-4.6.1.orig/vfs/local.h 2004-08-17 11:17:43.000000000 +0200 +++ mc-4.6.1/vfs/local.h 2006-03-19 17:01:35.000000000 +0100 @@ -13,9 +13,9 @@ extern int local_errno (struct vfs_class *me); extern int local_lseek (void *data, off_t offset, int whence); #ifdef HAVE_MMAP -extern caddr_t local_mmap (struct vfs_class *me, caddr_t addr, size_t len, +extern void *local_mmap (struct vfs_class *me, void *addr, size_t len, int prot, int flags, void *data, off_t offset); -extern int local_munmap (struct vfs_class *me, caddr_t addr, size_t len, void *data); +extern int local_munmap (struct vfs_class *me, void *addr, size_t len, void *data); #endif #endif diff -Naur mc-4.6.1.orig/vfs/samba/lib/util.c mc-4.6.1/vfs/samba/lib/util.c --- mc-4.6.1.orig/vfs/samba/lib/util.c 2005-05-27 16:19:19.000000000 +0200 +++ mc-4.6.1/vfs/samba/lib/util.c 2006-03-19 17:06:39.000000000 +0100 @@ -1836,7 +1836,7 @@ /* Look up the host address in the address list we just got. */ for (i = 0; hp->h_addr_list[i]; i++) { - if (memcmp(hp->h_addr_list[i], (caddr_t) & addr, sizeof(addr)) == 0) + if (memcmp(hp->h_addr_list[i], &addr, sizeof(addr)) == 0) return True; } diff -Naur mc-4.6.1.orig/vfs/vfs.c mc-4.6.1/vfs/vfs.c --- mc-4.6.1.orig/vfs/vfs.c 2005-05-27 16:19:19.000000000 +0200 +++ mc-4.6.1/vfs/vfs.c 2006-03-19 17:03:48.000000000 +0100 @@ -740,27 +740,27 @@ #ifdef HAVE_MMAP static struct mc_mmapping { - caddr_t addr; + void *addr; void *vfs_info; struct vfs_class *vfs; struct mc_mmapping *next; } *mc_mmaparray = NULL; -caddr_t -mc_mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t offset) +void * +mc_mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset) { struct vfs_class *vfs; - caddr_t result; + void *result; struct mc_mmapping *mcm; if (fd == -1) - return (caddr_t) -1; + return (void *) -1; vfs = vfs_op (fd); - result = vfs->mmap ? (*vfs->mmap)(vfs, addr, len, prot, flags, vfs_info (fd), offset) : (caddr_t)-1; - if (result == (caddr_t)-1){ + result = vfs->mmap ? (*vfs->mmap)(vfs, addr, len, prot, flags, vfs_info (fd), offset) : (void *)-1; + if (result == (void *)-1){ errno = ferrno (vfs); - return (caddr_t)-1; + return (void *)-1; } mcm =g_new (struct mc_mmapping, 1); mcm->addr = result; @@ -772,7 +772,7 @@ } int -mc_munmap (caddr_t addr, size_t len) +mc_munmap (void *addr, size_t len) { struct mc_mmapping *mcm, *mcm2 = NULL; diff -Naur mc-4.6.1.orig/vfs/vfs.h mc-4.6.1/vfs/vfs.h --- mc-4.6.1.orig/vfs/vfs.h 2004-11-16 17:16:08.000000000 +0100 +++ mc-4.6.1/vfs/vfs.h 2006-03-19 17:05:57.000000000 +0100 @@ -49,8 +49,8 @@ int mc_ctl (int fd, int ctlop, void *arg); int mc_setctl (const char *path, int ctlop, void *arg); #ifdef HAVE_MMAP -caddr_t mc_mmap (caddr_t, size_t, int, int, int, off_t); -int mc_munmap (caddr_t addr, size_t len); +void *mc_mmap (void *, size_t, int, int, int, off_t); +int mc_munmap (void *addr, size_t len); #endif /* HAVE_MMAP */ /* Operations for mc_ctl - on open file */ diff -Naur mc-4.6.1.orig/vfs/vfs-impl.h mc-4.6.1/vfs/vfs-impl.h --- mc-4.6.1.orig/vfs/vfs-impl.h 2004-09-02 15:57:59.000000000 +0200 +++ mc-4.6.1/vfs/vfs-impl.h 2006-03-19 17:12:01.000000000 +0100 @@ -72,9 +72,9 @@ int (*setctl) (struct vfs_class *me, const char *path, int ctlop, void *arg); #ifdef HAVE_MMAP - caddr_t (*mmap) (struct vfs_class *me, caddr_t addr, size_t len, + void *(*mmap) (struct vfs_class *me, void *addr, size_t len, int prot, int flags, void *vfs_info, off_t offset); - int (*munmap) (struct vfs_class *me, caddr_t addr, size_t len, + int (*munmap) (struct vfs_class *me, void *addr, size_t len, void *vfs_info); #endif }; From weigelt at metux.de Fri Dec 26 02:20:58 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 03:20:58 +0100 Subject: [PATCH] find file fixups Message-ID: <20081226022058.GH24788@nibiru.local> -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -------------- next part -------------- # # This is a patch for the find file stuff, from Gentoo. # # (not completely sure what it *really* does, but it seems to # have something to do w/ case sensitivity) # # Source: Gentoo Portage # Reference: mc-4.6.1 # Submit-By: Enrico Weigelt, metux IT service # Submit-Date: 2008-12-16 # State: new # diff -Naur mc-4.6.1.orig/src/cmd.c mc-4.6.1/src/cmd.c --- mc-4.6.1.orig/src/cmd.c 2005-05-27 16:19:18.000000000 +0200 +++ mc-4.6.1/src/cmd.c 2006-03-19 12:57:00.000000000 +0100 @@ -510,7 +510,7 @@ continue; } c = regexp_match (reg_exp_t, current_panel->dir.list[i].fname, - match_file); + match_file, 0); if (c == -1) { message (1, MSG_ERROR, _(" Malformed regular expression ")); g_free (reg_exp); diff -Naur mc-4.6.1.orig/src/dir.c mc-4.6.1/src/dir.c --- mc-4.6.1.orig/src/dir.c 2005-05-27 16:19:18.000000000 +0200 +++ mc-4.6.1/src/dir.c 2006-03-19 12:58:56.000000000 +0100 @@ -405,7 +405,7 @@ *stale_link = 1; } if (!(S_ISDIR (buf1->st_mode) || *link_to_dir) && filter - && !regexp_match (filter, dp->d_name, match_file)) + && !regexp_match (filter, dp->d_name, match_file, 0)) return 0; /* Need to grow the *list? */ diff -Naur mc-4.6.1.orig/src/ext.c mc-4.6.1/src/ext.c --- mc-4.6.1.orig/src/ext.c 2005-05-27 16:19:18.000000000 +0200 +++ mc-4.6.1/src/ext.c 2006-03-19 13:00:43.000000000 +0100 @@ -394,7 +394,7 @@ } if (content_string[0] - && regexp_match (ptr, content_string + content_shift, match_regex)) { + && regexp_match (ptr, content_string + content_shift, match_regex, 0)) { found = 1; } @@ -534,11 +534,11 @@ /* Do not transform shell patterns, you can use shell/ for * that */ - if (regexp_match (p, filename, match_regex)) + if (regexp_match (p, filename, match_regex, 0)) found = 1; } else if (!strncmp (p, "directory/", 10)) { if (S_ISDIR (mystat.st_mode) - && regexp_match (p + 10, filename, match_regex)) + && regexp_match (p + 10, filename, match_regex, 0)) found = 1; } else if (!strncmp (p, "shell/", 6)) { p += 6; diff -Naur mc-4.6.1.orig/src/find.c mc-4.6.1/src/find.c --- mc-4.6.1.orig/src/find.c 2005-05-27 16:19:18.000000000 +0200 +++ mc-4.6.1/src/find.c 2006-03-19 13:04:10.000000000 +0100 @@ -575,6 +575,7 @@ struct stat tmp_stat; static int pos; static int subdirs_left = 0; + int flags = 0; if (!h) { /* someone forces me to close dirp */ if (dirp) { @@ -586,6 +587,10 @@ dp = 0; return 1; } + + if (!(case_sense->state & C_BOOL)) + flags |= REG_ICASE; + do_search_begin: while (!dp){ @@ -662,7 +667,7 @@ g_free (tmp_name); } - if (regexp_match (find_pattern, dp->d_name, match_file)){ + if (regexp_match (find_pattern, dp->d_name, match_file, flags)){ if (content_pattern) { if (search_content (h, directory, dp->d_name)) { return 1; diff -Naur mc-4.6.1.orig/src/user.c mc-4.6.1/src/user.c --- mc-4.6.1.orig/src/user.c 2005-07-01 17:47:07.000000000 +0200 +++ mc-4.6.1/src/user.c 2006-03-19 13:05:00.000000000 +0100 @@ -412,18 +412,18 @@ break; case 'f': /* file name pattern */ p = extract_arg (p, arg, sizeof (arg)); - *condition = panel && regexp_match (arg, panel->dir.list [panel->selected].fname, match_file); + *condition = panel && regexp_match (arg, panel->dir.list [panel->selected].fname, match_file, 0); break; case 'y': /* syntax pattern */ if (edit_widget && edit_widget->syntax_type) { p = extract_arg (p, arg, sizeof (arg)); *condition = panel && - regexp_match (arg, edit_widget->syntax_type, match_normal); + regexp_match (arg, edit_widget->syntax_type, match_normal, 0); } break; case 'd': p = extract_arg (p, arg, sizeof (arg)); - *condition = panel && regexp_match (arg, panel->cwd, match_file); + *condition = panel && regexp_match (arg, panel->cwd, match_file, 0); break; case 't': p = extract_arg (p, arg, sizeof (arg)); diff -Naur mc-4.6.1.orig/src/util.c mc-4.6.1/src/util.c --- mc-4.6.1.orig/src/util.c 2005-05-27 16:19:18.000000000 +0200 +++ mc-4.6.1/src/util.c 2006-03-19 13:06:58.000000000 +0100 @@ -563,27 +563,30 @@ return g_strdup (pattern); } -int regexp_match (const char *pattern, const char *string, int match_type) +int regexp_match (const char *pattern, const char *string, int match_type, int flags) { static regex_t r; static char *old_pattern = NULL; static int old_type; + static int old_flags; int rval; char *my_pattern; - if (!old_pattern || STRCOMP (old_pattern, pattern) || old_type != match_type){ + if (!old_pattern || STRCOMP (old_pattern, pattern) || old_type != match_type || old_flags != flags){ if (old_pattern){ regfree (&r); g_free (old_pattern); old_pattern = NULL; } my_pattern = convert_pattern (pattern, match_type, 0); - if (regcomp (&r, my_pattern, REG_EXTENDED|REG_NOSUB|MC_ARCH_FLAGS)) { + + if (regcomp (&r, my_pattern, REG_EXTENDED|REG_NOSUB|MC_ARCH_FLAGS|flags)) { g_free (my_pattern); return -1; } old_pattern = my_pattern; old_type = match_type; + old_flags = flags; } rval = !regexec (&r, string, 0, NULL, 0); return rval; diff -Naur mc-4.6.1.orig/src/util.h mc-4.6.1/src/util.h --- mc-4.6.1.orig/src/util.h 2005-01-13 20:20:47.000000000 +0100 +++ mc-4.6.1/src/util.h 2006-03-19 13:07:16.000000000 +0100 @@ -116,7 +116,7 @@ extern int easy_patterns; char *convert_pattern (const char *pattern, int match_type, int do_group); -int regexp_match (const char *pattern, const char *string, int match_type); +int regexp_match (const char *pattern, const char *string, int match_type, int flags); /* Error pipes */ void open_error_pipe (void); From weigelt at metux.de Fri Dec 26 02:23:35 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 03:23:35 +0100 Subject: [PATCH] segfault-on-invalid-mtime fix Message-ID: <20081226022335.GK24788@nibiru.local> -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -------------- next part -------------- # # Invalid timestamps on files caused mc to segfault by passing a null # pointer to strftime. Avoid trying to print the time in this case. # # Source: Gentoo Portage # Reference: mc-4.6.1 # Reported-By: Maxim Britov # Reported-Bug: http://bugs.gentoo.org/184296 # Submit-By: Enrico Weigelt, metux IT service # Submit-Date: 2008-12-26 # State: new # diff -ruN mc-4.6.1.orig/src/util.c mc-4.6.1/src/util.c --- mc-4.6.1.orig/src/util.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/util.c 2008-12-26 03:13:13.000000000 +0100 @@ -717,6 +717,7 @@ static size_t i18n_timelength = 0; static const char *fmtyear, *fmttime; const char *fmt; + struct tm *whentm; if (i18n_timelength == 0){ i18n_timelength = i18n_checktimelength() + 1; @@ -740,7 +741,11 @@ else fmt = fmttime; - strftime (timebuf, i18n_timelength, fmt, localtime(&when)); + whentm = localtime(&when); + if (whentm == NULL) + return "(invalid)"; + + strftime (timebuf, i18n_timelength, fmt, whentm); return timebuf; } From weigelt at metux.de Fri Dec 26 02:22:58 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 03:22:58 +0100 Subject: [PATCH] charset-locale-alias Message-ID: <20081226022258.GJ24788@nibiru.local> -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -------------- next part -------------- # # Not really sure what it does exactly, seems to have something # to do w/ intl + charset.alias file # # Source: Gentoo Portage # Reference: mc-4.6.1 # Submit-By: Enrico Weigelt, metux IT service # Submit-Date: 2008-12-26 # State: new # diff -ruN mc-4.6.1.orig/intl/Makefile.in mc-4.6.1/intl/Makefile.in --- mc-4.6.1.orig/intl/Makefile.in 2007-03-06 22:31:02.000000000 +0300 +++ mc-4.6.1/intl/Makefile.in 2007-03-06 22:38:52.000000000 +0300 @@ -156,12 +156,7 @@ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \ temp=$(DESTDIR)$(libdir)/t-charset.alias; \ dest=$(DESTDIR)$(libdir)/charset.alias; \ - if test -f $(DESTDIR)$(libdir)/charset.alias; then \ - orig=$(DESTDIR)$(libdir)/charset.alias; \ - sed -f ref-add.sed $$orig > $$temp; \ - $(INSTALL_DATA) $$temp $$dest; \ - rm -f $$temp; \ - else \ + if ! test -f $(libdir)/charset.alias; then \ if test @GLIBC21@ = no; then \ orig=charset.alias; \ sed -f ref-add.sed $$orig > $$temp; \ @@ -170,14 +165,14 @@ fi; \ fi; \ $(mkinstalldirs) $(DESTDIR)$(localedir); \ - test -f $(DESTDIR)$(localedir)/locale.alias \ - && orig=$(DESTDIR)$(localedir)/locale.alias \ - || orig=$(srcdir)/locale.alias; \ - temp=$(DESTDIR)$(localedir)/t-locale.alias; \ - dest=$(DESTDIR)$(localedir)/locale.alias; \ - sed -f ref-add.sed $$orig > $$temp; \ - $(INSTALL_DATA) $$temp $$dest; \ - rm -f $$temp; \ + if ! test -f $(localedir)/locale.alias; then \ + orig=$(srcdir)/locale.alias; \ + temp=$(DESTDIR)$(localedir)/t-locale.alias; \ + dest=$(DESTDIR)$(localedir)/locale.alias; \ + sed -f ref-add.sed $$orig > $$temp; \ + $(INSTALL_DATA) $$temp $$dest; \ + rm -f $$temp; \ + fi; \ else \ : ; \ fi From slavazanko at gmail.com Fri Dec 26 11:41:01 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Fri, 26 Dec 2008 13:41:01 +0200 Subject: Further Midnight Commander development In-Reply-To: <20081226014133.GB24788@nibiru.local> References: <494997EB.3080006@gmail.com> <200812231124.52385.winnie@debian.org> <20081223115625.GA4564@ciampix.net> <200812231359.44381.winnie@debian.org> <20081226014133.GB24788@nibiru.local> Message-ID: <4954C2CD.8090504@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Enrico Weigelt wrote: > I think the most important is to have official tree as global reference > and release point. Everyone else should work relative to the lastest > official release and submit his patches against it. These patches should > go to this list, be discussed here and then, if considered good, be applied > to the official tree. > IMHO we should start with the latest stable release (4.6.1 ?) and apply > all the vendor/distro patches floating around step by step (*1). Once > that's done, we should make a new official release very soon. I propose to establish two branches: "stable" and "current" (in git, of course). "Stable" branch will contain all founded patches (Fedora, Debian/Ubuntu, Gentoo,...), new ideas and features. The "stable" branch will provide the solutions that were tested in the "current" tree. The "stable" branch will lag behind in development, but will be secure and stable (for example, good for RHEL/CentOS, SLES, etc). This scheme would not hinder the development of mc, and at the same time will allow a stable release. > If we need a new hosting place, I can offer that (*2). > As for the Russian issue: we devs should really agree on one well-spoken > language, English. Those who're not yet capable of speaking English, > could be proxied by others. That speaking of *development* - end user > support is an different issue. Between developers one language: English (because Esperanto don't all know... ;) BTW, It would be a good idea that the world learned Esperanto in schools... IMHO :) ). National subprojects facilitate communication and reduce the dirt in (English) project (diplicates, invalid bugreports, etc). > *1: I'm currently in the process of reviewing Gentoo's patches and > sending them to the list. It's good. All existing patches are to gather in one place. BTW, look, please, http://www.midnight-commander.org I think that this URL will be the main location for bugreports... WBR, Slavaz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFJVMLIb3oGR6aVLpoRAvWoAJ4r9xWBGWXF8l52I06i0Wcnjwc1bACfX0gs 79oNHmvaeNZbSi0c3OZlUGs= =N796 -----END PGP SIGNATURE----- From slavazanko at gmail.com Fri Dec 26 11:45:08 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Fri, 26 Dec 2008 13:45:08 +0200 Subject: Further Midnight Commander development In-Reply-To: <20081226014133.GB24788@nibiru.local> References: <494997EB.3080006@gmail.com> <200812231124.52385.winnie@debian.org> <20081223115625.GA4564@ciampix.net> <200812231359.44381.winnie@debian.org> <20081226014133.GB24788@nibiru.local> Message-ID: <4954C3C4.7080407@gmail.com> Enrico Weigelt wrote: Ops... sorry my mistake: - - "Stable" branch will contain all founded patches (Fedora, Debian/Ubuntu, - - "Current" branch will contain all founded patches (Fedora, Debian/Ubuntu, Gentoo,...), new ideas and features. Fixed. :) From weigelt at metux.de Fri Dec 26 21:52:17 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 22:52:17 +0100 Subject: Further Midnight Commander development In-Reply-To: <4954C2CD.8090504@gmail.com> References: <494997EB.3080006@gmail.com> <200812231124.52385.winnie@debian.org> <20081223115625.GA4564@ciampix.net> <200812231359.44381.winnie@debian.org> <20081226014133.GB24788@nibiru.local> <4954C2CD.8090504@gmail.com> Message-ID: <20081226215217.GA29139@nibiru.local> * Slava Zanko schrieb: Hi, > I propose to establish two branches: "stable" and "current" (in git, of > course). > "Stable" branch will contain all founded patches (Fedora, Debian/Ubuntu, > Gentoo,...), new ideas and features. > The "stable" branch will provide the solutions that were tested in the > "current" tree. The "stable" branch will lag behind in development, but > will be secure and stable (for example, good for RHEL/CentOS, SLES, etc). > This scheme would not hinder the development of mc, and at the same time > will allow a stable release. ACK. The "stable" branch should be what goes into public release. Everyone who's not actively developing on mc (even those who make small, eventually distro-specific fixes) should exclusively base on that. On the other hand "current" is what's been finished and tested by the subsystem devs. So everyone who likes to develop on mc can use it for testing. "Stable" policy: * get in fixes fast and do minor releases for them frequently (so that distros don't have to maintain their own fixes) * be very careful about adding new features * breaks should be prevented as much as possible "Current" policy: * get in everything that's tested/discussed by the devs for further testing * prepare approved patches for getting into stable. Subprojects (eg. translation, vfs, ...) should have their own trees and submit patches (either against stable or current) to the list for further discussion. Now for the role play: * we need some people resposible for the stable and the current tree, who have full write access - they have to decide (on discussion in the list) what patches to get in and take care of the tree wont be broken * bug wranglers should be the ones who look over new bugs, eventually give some first-aid, fixup naming and bounce them to the right people * suggested sub-projects: -> core -> vfs -> locale -> build-/release engineering > > As for the Russian issue: we devs should really agree on one well-spoken > > language, English. Those who're not yet capable of speaking English, > > could be proxied by others. That speaking of *development* - end user > > support is an different issue. > Between developers one language: English (because Esperanto don't all > know... ;) BTW, It would be a good idea that the world learned Esperanto > in schools... IMHO :) ). Maybe we all should start learning Interlac ;-O > National subprojects facilitate communication and reduce the dirt in > (English) project (diplicates, invalid bugreports, etc). ACK. For example, user support should look carefully what's really a bug or just a help request. Only real bugs should go to the devs, help requests should be handled by the support people. > > *1: I'm currently in the process of reviewing Gentoo's patches and > > sending them to the list. > It's good. All existing patches are to gather in one place. > BTW, look, please, http://www.midnight-commander.org > > I think that this URL will be the main location for bugreports... hmm, should I upload all patches to trac ? Is there a more convenient way to do that, instead of all via web ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Fri Dec 26 22:01:06 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 23:01:06 +0100 Subject: Tree-Maintenance: stable Message-ID: <20081226220106.GB29139@nibiru.local> Hi folks, is anyone already maintaining the current (4.6.1) stable tree (and also willing to continue that work) ? If yes, please provide a short description how to check out and how to submit patches. Otherwise I'd volounteer to do that job. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Fri Dec 26 22:14:18 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 23:14:18 +0100 Subject: Tree-Maintenance: 9P/MVFS Message-ID: <20081226221418.GC29139@nibiru.local> Hi folks, as I'm working on the vfs front (eg. added 9P support via libmvfs) and going to do more in this area (eg. porting several vfs'es to run via external 9P servers, etc), I'm volunteering to maintain the whole vfs stuff. The whole tree can be fetched at: svn://nibiru.metux.de/public/mc-9p/ (username: anonymous, pw: anonymous) Patches please via email to this list (w/ some appropriate subject). If someone wants an own branch, just let me know. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Fri Dec 26 22:14:47 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 23:14:47 +0100 Subject: Tree-Maintenance: current/devel Message-ID: <20081226221447.GA14557@nibiru.local> Hi folks, is anyone already maintaining the current development tree (becoming 4.6.2) ? If yes, please provide a short description how to check out and how to submit patches. Otherwise I'd volounteer to do that job. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From slavazanko at gmail.com Fri Dec 26 22:41:20 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Sat, 27 Dec 2008 00:41:20 +0200 Subject: Tree-Maintenance: current/devel In-Reply-To: <20081226221447.GA14557@nibiru.local> References: <20081226221447.GA14557@nibiru.local> Message-ID: <49555D90.3070001@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Enrico Weigelt wrote: > is anyone already maintaining the current development tree > (becoming 4.6.2) ? Enrico, please don't hurry. Wait please a few days (may be, after New Year). All existing patches need to be collected in one place. This place will git (browse: http://www.midnight-commander.org/browser). It contains the latest cvn changes (plus in near future http://mc.redhat-club.org/svn/trunk as branch). The main branch (master) will change the existing patches. Along with the changes will be made from a branch mc.redhat-club.org. This is necessary for the restoration of the history of the applyingg of patches - many patches in our branch(mc.redhat-club.org) were applyed in one revision, sorry for inconvenience. That will be corrected. Therefore, your job, Enrico is very important (All existing patches are to gather in one place, not only from Gentoo). And I think that the best place to patches is a trac - it was better suited for monitoring the implementation of the work than the mailing list ;) > If yes, please provide a short description how to check out > and how to submit patches. yes, but don't hurry, I ask again :) Just add tickets with patches in trac, please. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAklVXYkACgkQb3oGR6aVLpo2+ACfaghKGxXdfjw7OnOkje7AnB+i YTYAnjsVuqcN8JkStMSfUDpyHSWaGVTg =saCh -----END PGP SIGNATURE----- From slavazanko at gmail.com Sat Dec 27 13:20:52 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Sat, 27 Dec 2008 15:20:52 +0200 Subject: Further Midnight Commander development In-Reply-To: <20081226215217.GA29139@nibiru.local> References: <494997EB.3080006@gmail.com> <200812231124.52385.winnie@debian.org> <20081223115625.GA4564@ciampix.net> <200812231359.44381.winnie@debian.org> <20081226014133.GB24788@nibiru.local> <4954C2CD.8090504@gmail.com> <20081226215217.GA29139@nibiru.local> Message-ID: <49562BB4.9060406@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Enrico Weigelt wrote: >> I propose to establish two branches: "stable" and "current" (in git, of >> course). >> "Stable" branch will contain all founded patches (Fedora, Debian/Ubuntu, >> Gentoo,...), new ideas and features. >> The "stable" branch will provide the solutions that were tested in the >> "current" tree. The "stable" branch will lag behind in development, but >> will be secure and stable (for example, good for RHEL/CentOS, SLES, etc). >> This scheme would not hinder the development of mc, and at the same time >> will allow a stable release. > > ACK. The "stable" branch should be what goes into public release. > Everyone who's not actively developing on mc (even those who make small, > eventually distro-specific fixes) should exclusively base on that. Yes. > On the other hand "current" is what's been finished and tested by the > subsystem devs. So everyone who likes to develop on mc can use it > for testing. Yes. > "Stable" policy: > * get in fixes fast and do minor releases for them frequently > (so that distros don't have to maintain their own fixes) Absolutly yes. Maintainers of distros should not include any patches of security in packages that are based on the stable branch. If any patch of security or stability is included into package (not in repro) - our work is a bad. > * be very careful about adding new features > * breaks should be prevented as much as possible * Patches of security and stability can be transferred from the "current" branch to the "stable" branch > "Current" policy: > * get in everything that's tested/discussed by the devs for > further testing > * prepare approved patches for getting into stable. * Each patch, which will be transported in "stable" branch, will be discussed in the mailing list... or at the forum if it will ever created > > Subprojects (eg. translation, vfs, ...) should have their own trees > and submit patches (either against stable or current) to the list > for further discussion. > Now for the role play: > > * we need some people resposible for the stable and the current tree, > who have full write access - they have to decide (on discussion > in the list) what patches to get in and take care of the tree > wont be broken > > * bug wranglers should be the ones who look over new bugs, eventually > give some first-aid, fixup naming and bounce them to the right people First of all we need to change the attitude towards visitors. Not all visitors to the professionals in the programming. Not everything could be properly explain what they want. We must be more open and friendly. Then the project will evolve. Because it's not a project (and people) for the developers - the project (and developers) for people who enjoy mc. IMHO :) > * suggested sub-projects: > > -> core ^^^^ > -> vfs -> vfs (mcvfs-fs, mcvfs-smb, mcvfs-ssh, mcvfs-ftp, mcvfs-dav, mcvfs-... ) > -> locale > -> build-/release engineering -> mcslang - -> mcglib? - -> mcgettext (may be part of "locale") - >>> As for the Russian issue: we devs should really agree on one well-spoken >>> language, English. Those who're not yet capable of speaking English, >>> could be proxied by others. That speaking of *development* - end user >>> support is an different issue. >> Between developers one language: English (because Esperanto don't all >> know... ;) BTW, It would be a good idea that the world learned Esperanto >> in schools... IMHO :) ). > > Maybe we all should start learning Interlac ;-O :) >>> *1: I'm currently in the process of reviewing Gentoo's patches and >>> sending them to the list. >> It's good. All existing patches are to gather in one place. >> BTW, look, please, http://www.midnight-commander.org >> I think that this URL will be the main location for bugreports... > hmm, should I upload all patches to trac ? > Is there a more convenient way to do that, instead of all via web ? Gmm.. answer: 'yes'. Via trac-xmlrpc plugin (don't nkow, Patrick Winnertz was add this plugin or no) and via using xml-rpc applications (eclipse-mylyn, for example). But if via web you will be uncomfortable, just send patches in maililing list. I will transfer your patches in trac. WBR, Slavaz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAklWK7QACgkQb3oGR6aVLpo5CgCfSc53npEOJcoAvWYrCw+meEn/ DEsAnRNe4jumsCL9CNKvTjbbi6EVcrTs =/ZL/ -----END PGP SIGNATURE----- From weigelt at metux.de Sat Dec 27 18:26:59 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Sat, 27 Dec 2008 19:26:59 +0100 Subject: Further Midnight Commander development In-Reply-To: <49562BB4.9060406@gmail.com> References: <494997EB.3080006@gmail.com> <200812231124.52385.winnie@debian.org> <20081223115625.GA4564@ciampix.net> <200812231359.44381.winnie@debian.org> <20081226014133.GB24788@nibiru.local> <4954C2CD.8090504@gmail.com> <20081226215217.GA29139@nibiru.local> <49562BB4.9060406@gmail.com> Message-ID: <20081227182659.GA16633@nibiru.local> * Slava Zanko schrieb: Hi, > Absolutly yes. Maintainers of distros should not include any patches of > security in packages that are based on the stable branch. If any patch > of security or stability is included into package (not in repro) - our > work is a bad. Glad you understood it :) The folks of many, many other still refuse to - that's why I founded the OSS-QM project (http://oss-qm.metux.de/) years ago, to have a stable overlay virtually any distro can base on (I especially needed it for my embedded projects). > > * be very careful about adding new features > > * breaks should be prevented as much as possible > > * Patches of security and stability can be transferred from the > "current" branch to the "stable" branch ACK. Of course, if we have trivial patches with very high urgence, we *could* skip that path sometimes, but that should be *really* rare. > > "Current" policy: > > * get in everything that's tested/discussed by the devs for > > further testing > > * prepare approved patches for getting into stable. > > * Each patch, which will be transported in "stable" branch, will > be discussed in the mailing list... or at the forum if it will > ever created Actually, I don't like web-forums. Too inconvenient - you always have to visit (and log into) some webapp to see what's happening. Please let's stay in this maillist and eventually connect trac with it. (would be great if patch uploading could be done via a mail robot) > First of all we need to change the attitude towards visitors. Not all > visitors to the professionals in the programming. Not everything could > be properly explain what they want. We must be more open and friendly. > Then the project will evolve. ACK. That's the job of the user support team. Actually I'd like to see more non-coders in the support team, because they have the user's view, not the coder's. > > * suggested sub-projects: > > > > -> core > ^^^^ > > -> vfs > -> vfs (mcvfs-fs, mcvfs-smb, mcvfs-ssh, mcvfs-ftp, > mcvfs-dav, mcvfs-... ) > > -> locale > > -> build-/release engineering > -> mcslang - > -> mcglib? - > -> mcgettext (may be part of "locale") - huh, I'm not sure whether mvc fits in here. Well, if we say "everything's a file" and the model is the vfs (including things like search results represented as filesystem), we could make some steps in this direction :) > > hmm, should I upload all patches to trac ? > > Is there a more convenient way to do that, instead of all via web ? > > Gmm.. answer: 'yes'. Via trac-xmlrpc plugin (don't nkow, Patrick > Winnertz was add this plugin or no) and via using xml-rpc applications > (eclipse-mylyn, for example). But if via web you will be uncomfortable, > just send patches in maililing list. I will transfer your patches in trac. Okay. I've sent out all gentoo patches so far, they're not too many. But for the future it would be cool to have the upload process done automatically - with a local command line would be even better. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Sat Dec 27 20:27:36 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Sat, 27 Dec 2008 21:27:36 +0100 Subject: HAVE_MMAP still necessary ? Message-ID: <20081227202735.GB16633@nibiru.local> Hi folks, I really wonder whether the mmap() stuff is still needed at all. It doesnt seem to be really used anywhere. Should we drop it ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Sat Dec 27 20:43:53 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Sat, 27 Dec 2008 21:43:53 +0100 Subject: HAVE_MMAP still necessary ? In-Reply-To: <20081227202735.GB16633@nibiru.local> References: <20081227202735.GB16633@nibiru.local> Message-ID: <20081227204353.GC16633@nibiru.local> * Enrico Weigelt schrieb: > > Hi folks, > > > I really wonder whether the mmap() stuff is still needed at all. > It doesnt seem to be really used anywhere. Ups, didn't look hard enough (just scanned the vfs subdir) ;-O Okay, there're mainly two mmap()-using places: a) cmd.c: compare_files() - it uses the mmap() call directly (w/o going over mcvfs), and it seems to work on local files only. wouldn't it make sense to let it run via mcvfs ? b) view.c: it tries to mmap() in the file, obviously to let the kernel do all the loading. BUT: do we *really* want mmap() here, or just some "get me that file into memory"()-call (same in cmd.c) ? In case we just want to have an faster way for loading files into memory (in case it's supported), I suggest some new vfs operation for that, let's call it "loadFile()" - it returns some FILE_DATA structure, containing size, buffer ptr and a callback vector for free'ing. Everyone who wants the whole file (or large blocks) just uses this call instead of ugly #ifdef's, and it's up to vfs to decide what to do behind the scenes. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Sat Dec 27 21:25:58 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Sat, 27 Dec 2008 22:25:58 +0100 Subject: Website trouble Message-ID: <20081227212557.GA513@nibiru.local> Hi, the server for http://www.midnight-commander.org/ seems to be running out of memory. > Trac detected an internal error: > > MemoryError: ... > Trac detected an internal error: > > OSError: [Errno 12] Cannot allocate memory ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From slavazanko at gmail.com Sun Dec 28 12:22:03 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Sun, 28 Dec 2008 14:22:03 +0200 Subject: Further Midnight Commander development In-Reply-To: <20081227182659.GA16633@nibiru.local> References: <494997EB.3080006@gmail.com> <200812231124.52385.winnie@debian.org> <20081223115625.GA4564@ciampix.net> <200812231359.44381.winnie@debian.org> <20081226014133.GB24788@nibiru.local> <4954C2CD.8090504@gmail.com> <20081226215217.GA29139@nibiru.local> <49562BB4.9060406@gmail.com> <20081227182659.GA16633@nibiru.local> Message-ID: <49576F6B.7050007@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Enrico Weigelt wrote: > huh, I'm not sure whether mvc fits in here. mcvfs - VIEW; core (signal handling, User events etc) - CONTROLLER, slang,mcslang,ncurses - VIEWs.. Why not? :) > Well, if we say "everything's a file" and the model is the vfs > (including things like search results represented as filesystem), > we could make some steps in this direction :) Yep, everything is a file. Network connects - files too. :) For example: $ cat ~/secret/path/to/my-one-of-many-many-server.mcvfs-ftp host: xxx.xxx.xx port: 12345 user: xxxx passwd: xxxx passv: 1 ... By pressing 'Enter' to the *.mcvfs-ftp file (via mc.ext) ftp session will establish... Is this bad think? > Okay. I've sent out all gentoo patches so far, they're not too many. > But for the future it would be cool to have the upload process > done automatically - with a local command line would be even better. "7zip support" (http://mail.gnome.org/archives/mc-devel/2008-December/msg00061.html) Ticket #92 (http://www.midnight-commander.org/ticket/92) "some bash support fixups" (http://mail.gnome.org/archives/mc-devel/2008-December/msg00062.html) Patch already applied, but not in official branch - in our mc-4.6.3 :) Patches from our branch will transfer to an oficial branch. Adds gentoo ebuild file syntax definition (http://mail.gnome.org/archives/mc-devel/2008-December/msg00063.html) Patch already applied in 4.6.3 cons.saver: non-blocking console (http://mail.gnome.org/archives/mc-devel/2008-December/msg00064.html) Ticket #93 (http://www.midnight-commander.org/ticket/93) Some fixups for large file support (64bit sizes) on 32bit systems (http://mail.gnome.org/archives/mc-devel/2008-December/msg00065.html) Ticket #94 (http://www.midnight-commander.org/ticket/94) find file fixups (http://mail.gnome.org/archives/mc-devel/2008-December/msg00066.html) Ticket #95 (http://www.midnight-commander.org/ticket/95) segfault-on-invalid-mtime fix (http://mail.gnome.org/archives/mc-devel/2008-December/msg00067.html) Ticket #96 (http://www.midnight-commander.org/ticket/96) charset-locale-alias (http://mail.gnome.org/archives/mc-devel/2008-December/msg00068.html) Ticket #97 (http://www.midnight-commander.org/ticket/97) All your published patches now processed. BTW, after applying all gathehing patches, we can assign version 4.7.0-pre1 ;) Because a lot of changes compared to the current 4.6.2-pre1... WBR, Slavaz. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAklXb2QACgkQb3oGR6aVLppyUwCeKtAtPBhx+AEQIoqgkE1s0Tne Nr0Anj4XJdig8+STVkN3YK5cdfLqH5sw =ejav -----END PGP SIGNATURE----- From winnie at debian.org Sun Dec 28 14:51:20 2008 From: winnie at debian.org (Patrick Winnertz) Date: Sun, 28 Dec 2008 15:51:20 +0100 Subject: Website trouble In-Reply-To: <20081227212557.GA513@nibiru.local> References: <20081227212557.GA513@nibiru.local> Message-ID: <200812281551.29630.winnie@debian.org> Am Samstag 27 Dezember 2008 22:25:58 schrieb Enrico Weigelt: > Hi, > > the server for http://www.midnight-commander.org/ seems to be > running out of memory. Well.. there is more than 500MB of Ram available, but I'll have a eye on this. Greetings Winnie -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From bircoph at gmail.com Sun Dec 28 17:04:47 2008 From: bircoph at gmail.com (Andrew Savchenko) Date: Sun, 28 Dec 2008 20:04:47 +0300 Subject: Website trouble In-Reply-To: <200812281551.29630.winnie@debian.org> References: <20081227212557.GA513@nibiru.local> <200812281551.29630.winnie@debian.org> Message-ID: <200812282004.55653.bircoph@gmail.com> Hi, On Sunday 28 December 2008 17:51, Patrick Winnertz wrote: > Am Samstag 27 Dezember 2008 22:25:58 schrieb Enrico Weigelt: > > Hi, > > > > the server for http://www.midnight-commander.org/ seems to be > > running out of memory. > > Well.. there is more than 500MB of Ram available, but I'll have > a eye on this. Perhaps this isn't out of memory problem, but some other kind of error or engine's bug. But this "Memory Error" is *really* annoying, it isn't rare error for me. -- Best regards, Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From weigelt at metux.de Mon Dec 29 00:37:01 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Mon, 29 Dec 2008 01:37:01 +0100 Subject: Further Midnight Commander development In-Reply-To: <49576F6B.7050007@gmail.com> References: <494997EB.3080006@gmail.com> <200812231124.52385.winnie@debian.org> <20081223115625.GA4564@ciampix.net> <200812231359.44381.winnie@debian.org> <20081226014133.GB24788@nibiru.local> <4954C2CD.8090504@gmail.com> <20081226215217.GA29139@nibiru.local> <49562BB4.9060406@gmail.com> <20081227182659.GA16633@nibiru.local> <49576F6B.7050007@gmail.com> Message-ID: <20081229003700.GB513@nibiru.local> * Slava Zanko schrieb: Hi, > > huh, I'm not sure whether mvc fits in here. > > mcvfs - VIEW; core (signal handling, User events etc) - CONTROLLER, > slang,mcslang,ncurses - VIEWs.. Why not? :) you meant: mcvfs = model ? > > Well, if we say "everything's a file" and the model is the vfs > > (including things like search results represented as filesystem), > > we could make some steps in this direction :) > > Yep, everything is a file. Network connects - files too. :) yeah, even sockets: cat tcp://somehost:port/ (I'll add this to libmvfs in the next days ...) > For example: > $ cat ~/secret/path/to/my-one-of-many-many-server.mcvfs-ftp > host: xxx.xxx.xx > port: 12345 > user: xxxx > passwd: xxxx > passv: 1 > ... > > By pressing 'Enter' to the *.mcvfs-ftp file (via mc.ext) ftp session > will establish... Is this bad think? hmm, you suggest something like we know as "desktop shortcuts" from certain certain DE's ? Well, perhaps it would be even better to just directly support well-known DE's shortcut files ? > "some bash support fixups" > (http://mail.gnome.org/archives/mc-devel/2008-December/msg00062.html) > Patch already applied, but not in official branch - in our mc-4.6.3 :) > Patches from our branch will transfer to an oficial branch. What happened to 4.6.2 ? > segfault-on-invalid-mtime fix > (http://mail.gnome.org/archives/mc-devel/2008-December/msg00067.html) > Ticket #96 (http://www.midnight-commander.org/ticket/96) Quite critical, should really go to the next release (4.6.2 ?) > All your published patches now processed. Thx! > BTW, after applying all gathehing patches, we can assign version > 4.7.0-pre1 ;) > Because a lot of changes compared to the current 4.6.2-pre1... hmm, what major changes do you have in mind ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Mon Dec 29 00:38:30 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Mon, 29 Dec 2008 01:38:30 +0100 Subject: Website trouble In-Reply-To: <200812281551.29630.winnie@debian.org> References: <20081227212557.GA513@nibiru.local> <200812281551.29630.winnie@debian.org> Message-ID: <20081229003829.GC513@nibiru.local> * Patrick Winnertz schrieb: > > the server for http://www.midnight-commander.org/ seems to be > > running out of memory. > Well.. there is more than 500MB of Ram available, but I'll have a eye on this. Is this an physical or virtual machine ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From slavazanko at gmail.com Mon Dec 29 13:52:40 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Mon, 29 Dec 2008 15:52:40 +0200 Subject: Further Midnight Commander development In-Reply-To: <20081229003700.GB513@nibiru.local> References: <494997EB.3080006@gmail.com> <200812231124.52385.winnie@debian.org> <20081223115625.GA4564@ciampix.net> <200812231359.44381.winnie@debian.org> <20081226014133.GB24788@nibiru.local> <4954C2CD.8090504@gmail.com> <20081226215217.GA29139@nibiru.local> <49562BB4.9060406@gmail.com> <20081227182659.GA16633@nibiru.local> <49576F6B.7050007@gmail.com> <20081229003700.GB513@nibiru.local> Message-ID: <4958D628.7060303@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Enrico Weigelt wrote: > * Slava Zanko schrieb: > > Hi, > >>> huh, I'm not sure whether mvc fits in here. >> mcvfs - VIEW; core (signal handling, User events etc) - CONTROLLER, >> slang,mcslang,ncurses - VIEWs.. Why not? :) > > you meant: mcvfs = model ? No. model = any data source. mcvfs - one of sources for mc. I think, it is very early to discuss. We need to start their work, rather than drown in the discussions. :) >>> Well, if we say "everything's a file" and the model is the vfs >>> (including things like search results represented as filesystem), >>> we could make some steps in this direction :) >> Yep, everything is a file. Network connects - files too. :) > > yeah, even sockets: > cat tcp://somehost:port/ > (I'll add this to libmvfs in the next days ...) Cool. I'm waiting now this patch. :) > >> For example: >> $ cat ~/secret/path/to/my-one-of-many-many-server.mcvfs-ftp >> host: xxx.xxx.xx >> port: 12345 >> user: xxxx >> passwd: xxxx >> passv: 1 >> ... >> >> By pressing 'Enter' to the *.mcvfs-ftp file (via mc.ext) ftp session >> will establish... Is this bad think? > > hmm, you suggest something like we know as "desktop shortcuts" from May be yes, shorcuts... > certain certain DE's ? Well, perhaps it would be even better to just > directly support well-known DE's shortcut files ? But if file will open by DE, mc don't handle data from 'shorcut'. If mc open 'shotcut' itself, then for example, pressing 'Enter' on *.mcvfs-ftp will display in active panel of mc content of remote ftp-server ('cat *.mcvfs-ftp' may be display content too ;) ) Treat all 'shorcuts' makes no sense - it's set up through mc.ext if needed. I am talking about support in the file mc.ext like this, for example: shell/.mcvfs-ftp Open=mcvfs:ftp shell/.mcvfs-dav Open=mcvfs:dav shell/.mcvfs-ssh Open=mcvfs:ssh Or simular. But it is very early to discuss too, IMHO. We can dream now, but a little... ;) > >> "some bash support fixups" >> (http://mail.gnome.org/archives/mc-devel/2008-December/msg00062.html) >> Patch already applied, but not in official branch - in our mc-4.6.3 :) >> Patches from our branch will transfer to an oficial branch. > What happened to 4.6.2 ? There mc-4.6.3 - is a invalid version (Russian fork). As right, we had to change name (mc+, for example). Sorry. :( >> BTW, after applying all gathehing patches, we can assign version >> 4.7.0-pre1 ;) >> Because a lot of changes compared to the current 4.6.2-pre1... > hmm, what major changes do you have in mind ? First, may will be add UTF-8 support; may will be apply other patches, stabilized in various distributions. Second, there mc-4.6.3... people will be at a loss :( WBR, Slavaz. P.S. To all: With the passing Christmas :) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFJWNYnb3oGR6aVLpoRAkYbAJ9x9fXYQNjdJqk7ZzgbvPSKKL3cIACfcHEh mJ4Y9JQvD7ZImKp1Jw3Tg3g= =OHVX -----END PGP SIGNATURE----- From miguel at novell.com Mon Dec 29 17:33:44 2008 From: miguel at novell.com (Miguel de Icaza) Date: Mon, 29 Dec 2008 12:33:44 -0500 Subject: Further Midnight Commander development In-Reply-To: <20081226014133.GB24788@nibiru.local> References: <494997EB.3080006@gmail.com> <200812231124.52385.winnie@debian.org> <20081223115625.GA4564@ciampix.net> <200812231359.44381.winnie@debian.org> <20081226014133.GB24788@nibiru.local> Message-ID: <1230572024.4220.19.camel@erandi.site> Hellom > IMHO we should start with the latest stable release (4.6.1 ?) and apply > all the vendor/distro patches floating around step by step (*1). Once > that's done, we should make a new official release very soon. I agree with this approach, we should start by reviewing those patches as well, as not every distro patch in packages is suitable for upstream inclusion. I suggest that the patches are posted to the list, in a way similar to other projects so the patches can be peer-reviewed and discussed before they go into the tree. Miguel From miguel at novell.com Mon Dec 29 17:37:53 2008 From: miguel at novell.com (Miguel de Icaza) Date: Mon, 29 Dec 2008 12:37:53 -0500 Subject: [PATCH] segfault-on-invalid-mtime fix In-Reply-To: <20081226022335.GK24788@nibiru.local> References: <20081226022335.GK24788@nibiru.local> Message-ID: <1230572273.4220.21.camel@erandi.site> Hello, This patch looks good, but there are two uses of strftime as well, it might make sense to wrap the use of strftime in a new routine that always make this check (when localtime returns NULL). > mc-4.6.1/src/util.c From miguel at novell.com Mon Dec 29 17:39:16 2008 From: miguel at novell.com (Miguel de Icaza) Date: Mon, 29 Dec 2008 12:39:16 -0500 Subject: [PATCH] some bash support fixups In-Reply-To: <20081226021948.GE24788@nibiru.local> References: <20081226021948.GE24788@nibiru.local> Message-ID: <1230572356.4220.23.camel@erandi.site> Hello, This patch looks pretty dubious, specially considering that MC is used on system other than "latest Linux distro with the latest bash". Do we have more information as to what this patch is trying to fix? From miguel at novell.com Mon Dec 29 17:39:39 2008 From: miguel at novell.com (Miguel de Icaza) Date: Mon, 29 Dec 2008 12:39:39 -0500 Subject: [PATCH] ebuild syntax file In-Reply-To: <20081226022014.GF24788@nibiru.local> References: <20081226022014.GF24788@nibiru.local> Message-ID: <1230572379.4220.25.camel@erandi.site> This patch looks like an extension, it looks harmless and should go into the tree. > > http://patches.metux.de/ From miguel at novell.com Mon Dec 29 17:42:56 2008 From: miguel at novell.com (Miguel de Icaza) Date: Mon, 29 Dec 2008 12:42:56 -0500 Subject: [PATCH] cons.saver: non-blocking console In-Reply-To: <20081226022130.GI24788@nibiru.local> References: <20081226022130.GI24788@nibiru.local> Message-ID: <1230572576.4220.29.camel@erandi.site> Hello, Opening the console in non-blocking mode is a bad idea, as it means that every call that is done later on the console_fd needs to check for EWOULDBLOCK. Most of the time, it would be not return that, it would only return that under unique situations which means that testing this patch would not only be non-trivial, but someone would have to audit all the code paths. Also, this is lacking a ChangeLog explaining why this is needed. But I think that this patch should not be applied, it seems like a workaround that has not been properly implemented. Miguel. From miguel at novell.com Mon Dec 29 17:44:23 2008 From: miguel at novell.com (Miguel de Icaza) Date: Mon, 29 Dec 2008 12:44:23 -0500 Subject: [PATCH] find file fixups In-Reply-To: <20081226022058.GH24788@nibiru.local> References: <20081226022058.GH24788@nibiru.local> Message-ID: <1230572663.4220.31.camel@erandi.site> This patch looks OK to go in. > > _______________________________________________ > Mc-devel mailing list > http://mail.gnome.org/mailman/listinfo/mc-devel From miguel at novell.com Mon Dec 29 17:44:54 2008 From: miguel at novell.com (Miguel de Icaza) Date: Mon, 29 Dec 2008 12:44:54 -0500 Subject: [PATCH] largefile fixups In-Reply-To: <20081226022037.GG24788@nibiru.local> References: <20081226022037.GG24788@nibiru.local> Message-ID: <1230572694.4220.33.camel@erandi.site> This patch looks OK to go in. > > _______________________________________________ > Mc-devel mailing list > http://mail.gnome.org/mailman/listinfo/mc-devel From miguel at novell.com Mon Dec 29 17:47:23 2008 From: miguel at novell.com (Miguel de Icaza) Date: Mon, 29 Dec 2008 12:47:23 -0500 Subject: HAVE_MMAP still necessary ? In-Reply-To: <20081227204353.GC16633@nibiru.local> References: <20081227202735.GB16633@nibiru.local> <20081227204353.GC16633@nibiru.local> Message-ID: <1230572843.4220.36.camel@erandi.site> > a) cmd.c: compare_files() - it uses the mmap() call directly > (w/o going over mcvfs), and it seems to work on local files > only. wouldn't it make sense to let it run via mcvfs ? > > b) view.c: it tries to mmap() in the file, obviously to let the > kernel do all the loading. > BUT: do we *really* want mmap() here, or just some "get me > that file into memory"()-call (same in cmd.c) ? mmap is more efficient, because the kernel can throw those pages out at any time (as it knows what the backing store for the file is), so under memory pressure it can alleviate the system load easily. Loading the file ourselves means that we load it into dirty pages, effectively taking memory, and forcing the kernel to write the data to swap under load, or to keep the data in memory even when not needed. I do not like the idea of dropping mmap. > In case we just want to have an faster way for loading files into > memory (in case it's supported), I suggest some new vfs operation > for that, let's call it "loadFile()" - it returns some FILE_DATA > structure, containing size, buffer ptr and a callback vector for > free'ing. Everyone who wants the whole file (or large blocks) > just uses this call instead of ugly #ifdef's, and it's up to vfs > to decide what to do behind the scenes. You are trying to invent a bloated replacement for something that the kernel can do really well. From ciampix at libero.it Mon Dec 29 18:42:36 2008 From: ciampix at libero.it (Marco Ciampa) Date: Mon, 29 Dec 2008 19:42:36 +0100 Subject: Further Midnight Commander development In-Reply-To: <1230572024.4220.19.camel@erandi.site> References: <494997EB.3080006@gmail.com> <200812231124.52385.winnie@debian.org> <20081223115625.GA4564@ciampix.net> <200812231359.44381.winnie@debian.org> <20081226014133.GB24788@nibiru.local> <1230572024.4220.19.camel@erandi.site> Message-ID: <20081229184236.GA10762@ciampix.net> On Mon, Dec 29, 2008 at 12:33:44PM -0500, Miguel de Icaza wrote: > Hellom > > > IMHO we should start with the latest stable release (4.6.1 ?) and apply > > all the vendor/distro patches floating around step by step (*1). Once > > that's done, we should make a new official release very soon. > > I agree with this approach, we should start by reviewing those patches > as well, as not every distro patch in packages is suitable for upstream > inclusion. > > I suggest that the patches are posted to the list, in a way similar to > other projects so the patches can be peer-reviewed and discussed before > they go into the tree. > > Miguel +1 -- Marco Ciampa +--------------------+ | Linux User #78271 | | FSFE fellow #364 | +--------------------+ From weigelt at metux.de Mon Dec 29 23:16:33 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 30 Dec 2008 00:16:33 +0100 Subject: HAVE_MMAP still necessary ? In-Reply-To: <1230572843.4220.36.camel@erandi.site> References: <20081227202735.GB16633@nibiru.local> <20081227204353.GC16633@nibiru.local> <1230572843.4220.36.camel@erandi.site> Message-ID: <20081229231633.GD513@nibiru.local> * Miguel de Icaza schrieb: Hi, > mmap is more efficient, because the kernel can throw those pages out at > any time (as it knows what the backing store for the file is), so under > memory pressure it can alleviate the system load easily. Absolutely right, but we have to keep in mind, that it's only supported on some filesystems (not even all local ones). So we need some clean way to handle it. The current implementation is quite unclean, sometimes called mcvfs's mmap, sometimes the libc's one. That should really be cleaned up. > > In case we just want to have an faster way for loading files into > > memory (in case it's supported), I suggest some new vfs operation > > for that, let's call it "loadFile()" - it returns some FILE_DATA > > structure, containing size, buffer ptr and a callback vector for > > free'ing. Everyone who wants the whole file (or large blocks) > > just uses this call instead of ugly #ifdef's, and it's up to vfs > > to decide what to do behind the scenes. > > You are trying to invent a bloated replacement for something that the > kernel can do really well. My point being, we probably don't really want to have mmap itself, but an efficient way for getting some file (or large parts of it) into memory - that's a totally different requirement, and using mmap() is just one way to do it (if supported by the underlying fs). For the (mcfs-)clients this is an additional logic, which should be hidden behind the scenes - the individual fs should know best what to do, once we've introduced an appropriate API call. BTW: some fs'es (on certain platforms) might find a more clever way, even if mmap() isn't directly supported (eg. emulating it in userspace ;-P) - we really should leave this to the fs. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Mon Dec 29 23:17:13 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 30 Dec 2008 00:17:13 +0100 Subject: [PATCH] ebuild syntax file In-Reply-To: <1230572379.4220.25.camel@erandi.site> References: <20081226022014.GF24788@nibiru.local> <1230572379.4220.25.camel@erandi.site> Message-ID: <20081229231712.GE513@nibiru.local> * Miguel de Icaza schrieb: > This patch looks like an extension, it looks harmless and should go into > the tree. ACK. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Mon Dec 29 23:19:51 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 30 Dec 2008 00:19:51 +0100 Subject: bundled intl stuff necessary Message-ID: <20081229231950.GF513@nibiru.local> Hi folks, is it necessary to have the intl lib bundled into mc or could it be taken directly from the system ? (I admit, I don't know much about how it really works ;-o) cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Mon Dec 29 23:26:31 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 30 Dec 2008 00:26:31 +0100 Subject: RFC: Workflow for stable branch patches Message-ID: <20081229232630.GG513@nibiru.local> Hi folks, just a little suggestion for the workflow of committing patches to the stable tree: * new patches are sent to the list ("[PATCH]"-prefix) for discussion * if there are no more objections left, they get committed * after commit, the stable tree maintainer drops a note in the appropriate thread I personally always keep the last message of each patch-thread in my mailbox, until it's committed, for better tracking (IMHO better than always having to look at the tracker ;-P). cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Mon Dec 29 23:29:51 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 30 Dec 2008 00:29:51 +0100 Subject: Further Midnight Commander development In-Reply-To: <494A481E.7010503@gmx.de> References: <494997EB.3080006@gmail.com> <200812180826.26025.winnie@debian.org> <20081218112627.GA3480@ciampix.net> <200812181308.20663.winnie@debian.org> <494A481E.7010503@gmx.de> Message-ID: <20081229232950.GH513@nibiru.local> * Roland Illig schrieb: Hi, > I'd like to. If there is some more action in mc development (like in > 2005, when it was great fun), I'm definitely willing to invest some time > into it. :) > Maybe we even get all the different UTF-8 patches incorporated into mc. > If that's possible without #ifdef's in each and every file, I'd like to > work on it. Great :) Perhaps, if you've already have an trac account, we could assign all utf8-related bugs to you. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Mon Dec 29 23:41:38 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 30 Dec 2008 00:41:38 +0100 Subject: autoconf warnings (AC_AIX, ...) Message-ID: <20081229234138.GI513@nibiru.local> Hi folks, while regenerating the autoconf files, I get bunch of warnings: (but ./configure is created nevertheless) configure.ac:105: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS ../../lib/autoconf/specific.m4:389: AC_USE_SYSTEM_EXTENSIONS is expanded from... aclocal.m4:2977: gl_LOCK_EARLY_BODY is expanded from... aclocal.m4:2970: gl_LOCK_EARLY is expanded from... aclocal.m4:3201: gl_LOCK is expanded from... aclocal.m4:1639: gt_INTL_SUBDIR_CORE is expanded from... aclocal.m4:1478: AM_INTL_SUBDIR is expanded from... aclocal.m4:451: AM_GNU_GETTEXT is expanded from... configure.ac:105: the top level configure.ac:105: warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS configure.ac:105: warning: AC_COMPILE_IFELSE was called before AC_GNU_SOURCE ../../lib/autoconf/specific.m4:331: AC_GNU_SOURCE is expanded from... configure.ac:105: warning: AC_RUN_IFELSE was called before AC_GNU_SOURCE A little research on the net showed up that it might have something to do w/ target-specific macros like AC_AIX or AC_MINIX, AC_GNU_SOURCE, which are now obsolete, instead it's suggest to use AC_USE_SYSTEM_EXTENSIONS http://www.archivum.info/autoconf-patches at gnu.org/2008-08/msg00015.html Actually, replacing AC_AIX and AC_MINIX by AC_USE_SYSTEM_EXTENSIONS in configure.ac makes the warning go away. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Tue Dec 30 00:19:31 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 30 Dec 2008 01:19:31 +0100 Subject: [PATCH] segfault-on-invalid-mtime fix In-Reply-To: <1230572273.4220.21.camel@erandi.site> References: <20081226022335.GK24788@nibiru.local> <1230572273.4220.21.camel@erandi.site> Message-ID: <20081230001931.GJ513@nibiru.local> * Miguel de Icaza schrieb: Hi, > This patch looks good, but there are two uses of strftime as well, > it might make sense to wrap the use of strftime in a new routine that > always make this check (when localtime returns NULL). I'm working on that. BTW: we've got some situations where precense of strftime() is checked (HAVE_STRFTIME) and fallback to ctime(), and some where it is NOT. Should we always do the #ifdef or completely drop the fallback ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From slavazanko at gmail.com Tue Dec 30 00:41:41 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Tue, 30 Dec 2008 02:41:41 +0200 Subject: Further Midnight Commander development In-Reply-To: <1230572024.4220.19.camel@erandi.site> References: <494997EB.3080006@gmail.com> <200812231124.52385.winnie@debian.org> <20081223115625.GA4564@ciampix.net> <200812231359.44381.winnie@debian.org> <20081226014133.GB24788@nibiru.local> <1230572024.4220.19.camel@erandi.site> Message-ID: <49596E45.2000708@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Miguel de Icaza wrote: > Hellom > >> IMHO we should start with the latest stable release (4.6.1 ?) and apply >> all the vendor/distro patches floating around step by step (*1). Once >> that's done, we should make a new official release very soon. > I agree with this approach, we should start by reviewing those patches > as well, as not every distro patch in packages is suitable for upstream > inclusion. Is it a good idea to make git-branch "Stable" based on 4.6.1 and git-branch "Current" based of the current cvs-code (4.6.2-pre1)? > I suggest that the patches are posted to the list, in a way similar to > other projects so the patches can be peer-reviewed and discussed before > they go into the tree. Sure. Many patches in different distros is a different too, but a little bit. We need to review the patches and may be based on them to make a few others (summarize) ... or take the best of several similar. And, of course, will apply all accepted the patches to the branch of "Current". Then a lot of people will be able to test patches (even those who do not know how to apply the patches). Also, testing distributions (like Fedora) could include a branch of "Current" in list of packages - this would significantly increase the audience of users and accelerate the stabilization of patches. Then stabilized patches are transferred to the "Stable" branch. I suggest such an arrangement. Does anyone like this? WBR, Slavaz. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAklZbjwACgkQb3oGR6aVLpowgwCdEXyJzFeFkXEp1kyKz/aE39Gw O2QAnAzUlNe2SXatCXN4+Auay4xhQgs5 =K2GR -----END PGP SIGNATURE----- From weigelt at metux.de Tue Dec 30 01:03:53 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 30 Dec 2008 02:03:53 +0100 Subject: [PATCH] some time formatting fixes Message-ID: <49597379.4040701@metux.de> Hi folks, this patch goes a bit deeper into the strftime()+localtime() issue. a) introduce some new shortcut macros and use them in some places b) adds additional checks (where the macros dont fit) cu -- ---------------------------------------------------------------------- Enrico Weigelt, metux IT service -- http://www.metux.de/ cellphone: +49 174 7066481 email: info at metux.de skype: nekrad666 ---------------------------------------------------------------------- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme ---------------------------------------------------------------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: mc-4.6.1-timefmt.diff URL: From weigelt at metux.de Tue Dec 30 01:19:28 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Tue, 30 Dec 2008 02:19:28 +0100 Subject: [PATCH] Fix autoconf warnings on AC_AIX/AC_MINIX Message-ID: <49597720.2080108@metux.de> -- ---------------------------------------------------------------------- Enrico Weigelt, metux IT service -- http://www.metux.de/ cellphone: +49 174 7066481 email: info at metux.de skype: nekrad666 ---------------------------------------------------------------------- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme ---------------------------------------------------------------------- -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: mc-4.6.1-ac-fix-obsolete-ac_aix.diff URL: From winnie at debian.org Tue Dec 30 08:04:59 2008 From: winnie at debian.org (Patrick Winnertz) Date: Tue, 30 Dec 2008 09:04:59 +0100 Subject: Further Midnight Commander development In-Reply-To: <1230572024.4220.19.camel@erandi.site> References: <494997EB.3080006@gmail.com> <20081226014133.GB24788@nibiru.local> <1230572024.4220.19.camel@erandi.site> Message-ID: <200812300905.07144.winnie@debian.org> Am Montag 29 Dezember 2008 18:33:44 schrieb Miguel de Icaza: > Hellom > > > IMHO we should start with the latest stable release (4.6.1 ?) and apply > > all the vendor/distro patches floating around step by step (*1). Once > > that's done, we should make a new official release very soon. > > I agree with this approach, we should start by reviewing those patches > as well, as not every distro patch in packages is suitable for upstream > inclusion. > > I suggest that the patches are posted to the list, in a way similar to > other projects so the patches can be peer-reviewed and discussed before > they go into the tree. > > Miguel +1 > > _______________________________________________ > Mc-devel mailing list > http://mail.gnome.org/mailman/listinfo/mc-devel -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From INVALID.NOREPLY at gnu.org Tue Dec 30 14:54:13 2008 From: INVALID.NOREPLY at gnu.org (vahvah) Date: Tue, 30 Dec 2008 14:54:13 +0000 Subject: [bug #17269] localized headers in .mc/history In-Reply-To: <20081217-071446.sv71407.90717@savannah.gnu.org> References: <20060802-124815.sv20032.51671@savannah.gnu.org> <20060802-151832.sv26390.62487@savannah.gnu.org> <20060802-140908.sv20032.46143@savannah.gnu.org> <20060913-122823.sv36205.28497@savannah.gnu.org> <20060913-100025.sv20032.51449@savannah.gnu.org> <20060913-153817.sv36205.51800@savannah.gnu.org> <20060913-165515.sv36205.54525@savannah.gnu.org> <20060919-112444.sv36205.57809@savannah.gnu.org> <20081119-100155.sv70931.30639@savannah.gnu.org> <20081127-122421.sv71073.8678@savannah.gnu.org> <20081215-092614.sv71380.74753@savannah.gnu.org> <20081217-071446.sv71407.90717@savannah.gnu.org> Message-ID: <20081230-145412.sv71623.23668@savannah.gnu.org> Follow-up Comment #12, bug #17269 (project mc): http://youngfemalemodels.pornlivenews.com/ young female models http://nudesexycollegegirls.pornlivenews.com/ nude sexy college girls http://youngteenlesbians.pornlivenews.com/ young teen lesbians http://freeteensexvideos.pornlivenews.com/ free teen sex videos _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Tue Dec 30 14:54:18 2008 From: INVALID.NOREPLY at gnu.org (vahvah) Date: Tue, 30 Dec 2008 14:54:18 +0000 Subject: [bug #19721] Aborting a FISH file transfer still causes the FISH layer to consume the whole file In-Reply-To: <20081218-113950.sv71439.57385@savannah.gnu.org> References: <20070427-114045.sv36205.32834@savannah.gnu.org> <20070427-142017.sv41304.77917@savannah.gnu.org> <20070427-163847.sv36205.49379@savannah.gnu.org> <20070502-162029.sv36205.46307@savannah.gnu.org> <20070507-160626.sv36205.38172@savannah.gnu.org> <20070507-181832.sv41304.56007@savannah.gnu.org> <20081119-100741.sv70931.92167@savannah.gnu.org> <20081126-110051.sv71049.25440@savannah.gnu.org> <20081126-160842.sv70931.40005@savannah.gnu.org> <20081205-112214.sv71230.64844@savannah.gnu.org> <20081209-094506.sv71286.62807@savannah.gnu.org> <20081216-162311.sv71407.8025@savannah.gnu.org> <20081217-074800.sv71407.32017@savannah.gnu.org> <20081218-113950.sv71439.57385@savannah.gnu.org> Message-ID: <20081230-145418.sv71623.87304@savannah.gnu.org> Follow-up Comment #14, bug #19721 (project mc): http://youngfemalemodels.pornlivenews.com/ young female models http://nudesexycollegegirls.pornlivenews.com/ nude sexy college girls http://youngteenlesbians.pornlivenews.com/ young teen lesbians http://freeteensexvideos.pornlivenews.com/ free teen sex videos _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Tue Dec 30 14:54:23 2008 From: INVALID.NOREPLY at gnu.org (vahvah) Date: Tue, 30 Dec 2008 14:54:23 +0000 Subject: [bug #19436] read (subshell_pty...): No such file or directory (2) on mc compiled with subshel In-Reply-To: <20081217-071635.sv71407.6742@savannah.gnu.org> References: <20070328-120738.sv58080.19234@savannah.gnu.org> <20070329-045007.sv36205.39621@savannah.gnu.org> <20070421-122447.sv36205.39889@savannah.gnu.org> <20081119-113132.sv70934.98921@savannah.gnu.org> <20081124-114626.sv70927.93162@savannah.gnu.org> <20081204-124147.sv71204.28542@savannah.gnu.org> <20081217-071635.sv71407.6742@savannah.gnu.org> Message-ID: <20081230-145422.sv71623.26577@savannah.gnu.org> Follow-up Comment #7, bug #19436 (project mc): http://youngfemalemodels.pornlivenews.com/ young female models http://nudesexycollegegirls.pornlivenews.com/ nude sexy college girls http://youngteenlesbians.pornlivenews.com/ young teen lesbians http://freeteensexvideos.pornlivenews.com/ free teen sex videos _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From winnie at debian.org Tue Dec 30 15:01:29 2008 From: winnie at debian.org (Patrick Winnertz) Date: Tue, 30 Dec 2008 16:01:29 +0100 Subject: Disable cvs/savannah Message-ID: <200812301601.29525.winnie@debian.org> Hey, In order to get everything into shape it would be cool if someone could leave a big fat note in cvs that the new repro can be found at www.midnight- commander.org. The same applies to the savannah bugtracker.. could please someone who has the power disable it (or prevent it from spamming this list? ;)) The last point: Is someone captable to give www.ibiblio.org/mc a new shape? It would be cool if someone could add a redirect to www.midnight-commander.org. thanks in advance Greetings Winnie -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From winnie at debian.org Tue Dec 30 15:26:59 2008 From: winnie at debian.org (Patrick Winnertz) Date: Tue, 30 Dec 2008 16:26:59 +0100 Subject: RFC: Suggestion for workflow on patches Message-ID: <200812301627.15457.winnie@debian.org> Hey, As there is currently no real written down workflow for patches I would like to suggest the following: - Every patch which should be applied to the git should be attached to a bugreport in our ticketsystem. There should be for each patch a own ticket so that we have a good overview. - Every patch that is in the ticket system must be approved by two devs in order to get applied again the working branch (master). - If someone dislikes a patch he should either contact the author of the patch in order to get a updated version (which should again be added to the same bugreport) or fix it himself. In both cases again two developers should give their okay to this patch. This system makes it possible that everytime a patch should be applied to mc at least three people had a look on it (the submitter and two other developers). As every comment in the ticketsystem from trac is send to the mailinglist it should be possible to track things while reading the mailinglist. A feature I will add in some time is that you can answer to the ticketmails and the automatically get added to the ticketsystem of trac, but this doesn't work right now. What do you think? Is this workflow for patches okay? If yes I would write this down somewhere in the wiki in order to make it official. -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From winnie at debian.org Tue Dec 30 15:32:16 2008 From: winnie at debian.org (Patrick Winnertz) Date: Tue, 30 Dec 2008 16:32:16 +0100 Subject: Tree-Maintenance: current/devel In-Reply-To: <20081226221447.GA14557@nibiru.local> References: <20081226221447.GA14557@nibiru.local> Message-ID: <200812301632.17141.winnie@debian.org> Hey folks, As I thought that this is a great idea I set it up in the git. the master branch is the branch where development should go into and there is a stable branch which shouldn't be touched while working on patches/new features. After a patch is tested well enough this patch can be cherry-picked from the mater branch into the stable branch in order to make a release from this branch. There should be only some people who moves patches out from master into stable, but this should be also discussed in the ticketsystem (e.g. the ticket will only be closed when the patch is finally in the stable branch). As I'm intrested in this part and Enrico is also I would suggest that we two works on this. Is this okay for everybody? Greetings Winniie -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From proski at gnu.org Tue Dec 30 20:52:21 2008 From: proski at gnu.org (Pavel Roskin) Date: Tue, 30 Dec 2008 15:52:21 -0500 Subject: Disable cvs/savannah In-Reply-To: <200812301601.29525.winnie@debian.org> References: <200812301601.29525.winnie@debian.org> Message-ID: <1230670341.10311.51.camel@dv> On Tue, 2008-12-30 at 16:01 +0100, Patrick Winnertz wrote: > Hey, > In order to get everything into shape it would be cool if someone could leave > a big fat note in cvs that the new repro can be found at www.midnight- > commander.org. > The same applies to the savannah bugtracker.. could please someone who has the > power disable it (or prevent it from spamming this list? ;)) According to https://savannah.gnu.org/projects/mc, the admins are Miguel de Icaza and Pavel Tsekov. > The last point: Is someone captable to give www.ibiblio.org/mc a new shape? It > would be cool if someone could add a redirect to www.midnight-commander.org. I have access to that site, so I can upload anything. However, www.midnight-commander.org doesn't have any download link, so perhaps a redirect would be premature. However, I can write a short page referring users to www.midnight-commander.org for development and to the file archives on ibiblio for download. -- Regards, Pavel Roskin From weigelt at metux.de Wed Dec 31 01:59:43 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 31 Dec 2008 02:59:43 +0100 Subject: Disable cvs/savannah In-Reply-To: <200812301601.29525.winnie@debian.org> References: <200812301601.29525.winnie@debian.org> Message-ID: <20081231015943.GK513@nibiru.local> * Patrick Winnertz schrieb: Hi, > The same applies to the savannah bugtracker.. could please someone who has the > power disable it (or prevent it from spamming this list? ;)) The spam seems to go to the tracker, hmm, does it have public write access ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Wed Dec 31 02:22:57 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 31 Dec 2008 03:22:57 +0100 Subject: RFC: Suggestion for workflow on patches In-Reply-To: <200812301627.15457.winnie@debian.org> References: <200812301627.15457.winnie@debian.org> Message-ID: <20081231022257.GL513@nibiru.local> * Patrick Winnertz schrieb: Hi, > - Every patch which should be applied to the git should be attached to a > bugreport in our ticketsystem. There should be for each patch a own ticket so > that we have a good overview. hmm, has the drawback, that it's bit unconvenient (as long as we don't have an automatic cmdline tool for that ;-P) moves the talks away from the list. Perhaps only do this for those patches already discussed in the list and found to be stable enough. Of course, an ideal situation would be an gateway between maillist and trac, so new tickets are sent to the list and replies are automatically bounced to the ticket's comments. > - Every patch that is in the ticket system must be approved by two devs in > order to get applied again the working branch (master). Ok, seems reasonable. BTW: does trac have some voting mechanism ? > - If someone dislikes a patch he should either contact the author of the > patch in order to get a updated version (which should again be added to the > same bugreport) or fix it himself. In both cases again two developers should > give their okay to this patch. Yep, if a patch is broken, the token should go back to the submitter, and he has to upload a fixed version (or drop the issue by closing the ticket). > As every comment in the ticketsystem from trac is send to the mailinglist it > should be possible to track things while reading the mailinglist. A feature I > will add in some time is that you can answer to the ticketmails and the > automatically get added to the ticketsystem of trac, but this doesn't work > right now. Great ! Maybe you could also install the xmlrpc plugin, so I can code my own upload tool. > What do you think? Is this workflow for patches okay? If yes I would write this > down somewhere in the wiki in order to make it official. ACK. BTW: may I request write access to the wiki ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Wed Dec 31 07:48:55 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 31 Dec 2008 08:48:55 +0100 Subject: Tree-Maintenance: current/devel In-Reply-To: <49555D90.3070001@gmail.com> References: <20081226221447.GA14557@nibiru.local> <49555D90.3070001@gmail.com> Message-ID: <20081231074854.GM513@nibiru.local> * Slava Zanko schrieb: Hi, > Enrico, please don't hurry. Wait please a few days (may be, after New Year). > All existing patches need to be collected in one place. This place will > git (browse: http://www.midnight-commander.org/browser). It contains the How can I checkout/clone it ? What I need is always the latest status of the next release candidate and perhaps some (semi-)automatic way to synchronize it into my local svn repository. I'd like to base my patches on either the latest release (currently 4.6.2) or the next release candidate (="current"-tree). Perhaps we could write a few lines about that in the wiki. > latest cvn changes (plus in near future > http://mc.redhat-club.org/svn/trunk as branch). Just wrote a little script which fetches that tree and merges it into my local svn ... there're *huge* changes - let's see what we can take over next ;-o > Therefore, your job, Enrico is very important (All existing patches are > to gather in one place, not only from Gentoo). And I think that the > best place to patches is a trac - it was better suited for monitoring > the implementation of the work than the mailing list ;) Ok, having the xmlrpc interface would be a great help. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From slavazanko at gmail.com Wed Dec 31 08:19:33 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Wed, 31 Dec 2008 10:19:33 +0200 Subject: Tree-Maintenance: current/devel In-Reply-To: <20081231074854.GM513@nibiru.local> References: <20081226221447.GA14557@nibiru.local> <49555D90.3070001@gmail.com> <20081231074854.GM513@nibiru.local> Message-ID: <495B2B15.8080306@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Enrico Weigelt wrote: > * Slava Zanko schrieb: > > Hi, > >> Enrico, please don't hurry. Wait please a few days (may be, after New Year). >> All existing patches need to be collected in one place. This place will >> git (browse: http://www.midnight-commander.org/browser). It contains the > > How can I checkout/clone it ? ssh-keygen -f mc-devel mkdir -p ~/.ssh/keys chmod 0700 ~/.ssh/keys mv -f mc-devel ~/.ssh/keys/mc-devel.key mv -f mc-devel.pub ~/.ssh/keys/mc-devel.pub chmod 0600 ~/.ssh/keys/mc-devel.key [ ! -f ~/.ssh/config ] && touch ~/.ssh/config cat >>~/.ssh/config < References: <20081229231950.GF513@nibiru.local> Message-ID: <495B2E76.2020707@gmx.de> Enrico Weigelt schrieb: > Hi folks, > > is it necessary to have the intl lib bundled into mc or could it > be taken directly from the system ? > (I admit, I don't know much about how it really works ;-o) I don't think it is necessary. There are many other projects who have dropped the internal intl/ directory. Roland From weigelt at metux.de Wed Dec 31 08:34:32 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 31 Dec 2008 09:34:32 +0100 Subject: Tree-Maintenance: current/devel In-Reply-To: <495B2B15.8080306@gmail.com> References: <20081226221447.GA14557@nibiru.local> <49555D90.3070001@gmail.com> <20081231074854.GM513@nibiru.local> <495B2B15.8080306@gmail.com> Message-ID: <20081231083432.GN513@nibiru.local> * Slava Zanko schrieb: Hi, > mail ~/.ssh/keys/mc-devel.pub to Patrick Winnertz okay, key's underway ... > Then: > git clone ssh://www.midnight-commander.org:2222/git/mc.git > > Or may be anonymous r/o access: > git clone git://midnight-commander.org/git/mc.git Initialized empty Git repository in /home/crosstool/XXX/mc/.git/ remote: fatal: Out of memory, realloc failed remote: aborting due to possible repository corruption on the remote side. fatal: early EOF fatal: index-pack failed The machine still/again seems to run out of memory :(( cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From weigelt at metux.de Wed Dec 31 08:39:12 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 31 Dec 2008 09:39:12 +0100 Subject: Further Midnight Commander development In-Reply-To: <49596E45.2000708@gmail.com> References: <494997EB.3080006@gmail.com> <200812231124.52385.winnie@debian.org> <20081223115625.GA4564@ciampix.net> <200812231359.44381.winnie@debian.org> <20081226014133.GB24788@nibiru.local> <1230572024.4220.19.camel@erandi.site> <49596E45.2000708@gmail.com> Message-ID: <20081231083912.GO513@nibiru.local> * Slava Zanko schrieb: Hi, > Is it a good idea to make git-branch "Stable" based on 4.6.1 and > git-branch "Current" based of the current cvs-code (4.6.2-pre1)? I'd really suggest forking the stable tree on 4.6.1 release and let it be the rc for 4.6.2, then step by step merge in all the patches/branches floating around the net. > And, of course, will apply all accepted the patches to the branch of > "Current". Then a lot of people will be able to test patches (even those > who do not know how to apply the patches). We'd rather should call that tree "testing", IMHO ;-o cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From slavazanko at gmail.com Wed Dec 31 09:02:56 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Wed, 31 Dec 2008 11:02:56 +0200 Subject: bundled intl stuff necessary In-Reply-To: <495B2E76.2020707@gmx.de> References: <20081229231950.GF513@nibiru.local> <495B2E76.2020707@gmx.de> Message-ID: <495B3540.3030900@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Roland Illig wrote: > Enrico Weigelt schrieb: >> Hi folks, >> >> is it necessary to have the intl lib bundled into mc or could it >> be taken directly from the system ? >> (I admit, I don't know much about how it really works ;-o) > > I don't think it is necessary. There are many other projects who have > dropped the internal intl/ directory. If we started to talk about the source tree... What now: config doc edit lib m4 maint po slang src syntax vfs I think, this not good. lib - in my mind must be sources of library(es) of project. What we see in directory lib? doc - Documentation of project, included: - - man pages - - Users manual - - Developers manual (doxygen?) - - Maintainers manual (how make packages on all known OSes, for example) Now in directory 'doc' only manpages... and README-files at all subdirectoryes. My purpose (in far-near future): doc man (current ${src_root}/doc) contributor (contributor manuals) developer (developers manual) user (all README-files, readme about hotkeys, all other user-related) contrib contrib/extfs (current ${src_root}/vfs/extfs) contrib/hints contrib/lib (current ${src_root}/lib, except mc.hint.* and README.xterm) contrib/maint (current ${src_root}/maint) contrib/syntax (current ${src_root}/syntax) lib lib/edit (current ${src_root}/edit) lib/mcglib (may be, needed as mcslang for embedded systems... Little internal library... but it's only thinks) lib/slang lib/vfs lib/vfs/samba m4 po src WBR, Slavaz. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFJWzU2b3oGR6aVLpoRAhsuAJ914GDP2/6kAPx53GQgzQ86QBFLOQCfXupQ 2WJiflZRaGvsv7CY80Rt/TM= =a/Gh -----END PGP SIGNATURE----- From slavazanko at gmail.com Wed Dec 31 09:19:21 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Wed, 31 Dec 2008 11:19:21 +0200 Subject: Tree-Maintenance: current/devel In-Reply-To: <20081231083432.GN513@nibiru.local> References: <20081226221447.GA14557@nibiru.local> <49555D90.3070001@gmail.com> <20081231074854.GM513@nibiru.local> <495B2B15.8080306@gmail.com> <20081231083432.GN513@nibiru.local> Message-ID: <495B3919.9080900@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Enrico Weigelt wrote: >> Or may be anonymous r/o access: >> git clone git://midnight-commander.org/git/mc.git > > Initialized empty Git repository in /home/crosstool/XXX/mc/.git/ > remote: fatal: Out of memory, realloc failed > remote: aborting due to possible repository corruption on the remote side. > fatal: early EOF > fatal: index-pack failed > The machine still/again seems to run out of memory :(( Hm... try again. :( To Patrick Winnertz: Is time now for migrate to much powerfull server? WBR, Slavaz. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFJWzkUb3oGR6aVLpoRAjUKAJ9mKgw4Y5czAyrDfGMDVvOCdMV4CQCcCvi3 U0HMKFLjc4ICOtk1EA2EYeM= =rm2B -----END PGP SIGNATURE----- From slavazanko at gmail.com Wed Dec 31 09:58:35 2008 From: slavazanko at gmail.com (Slava Zanko) Date: Wed, 31 Dec 2008 11:58:35 +0200 Subject: Happy New Year Message-ID: <495B424B.2010808@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, folks. Happy New Year, have enough money and happiness to you and your family. And many thanks for the wish to further develop of Midhight Commander. Big... no, huge thanks, guys. WBR, Slavaz. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFJW0JDb3oGR6aVLpoRAtiKAJ9L/e1XQzi5h/4msGCdQe1fhFgHHgCdF99r PYpq+2bINpC3UwamRFjsxwg= =0tze -----END PGP SIGNATURE----- From aborodin at vmail.ru Wed Dec 31 11:33:48 2008 From: aborodin at vmail.ru (Andrew Borodin) Date: Wed, 31 Dec 2008 14:33:48 +0300 Subject: Tree-Maintenance: current/devel In-Reply-To: <495B2B15.8080306@gmail.com> References: <20081226221447.GA14557@nibiru.local> <49555D90.3070001@gmail.com> <20081231074854.GM513@nibiru.local> <495B2B15.8080306@gmail.com> Message-ID: On Wed, 31 Dec 2008 10:19:33 +0200 Slava Zanko wrote: > Or may be anonymous r/o access: > git clone git://midnight-commander.org/git/mc.git Is it possible to make an anonymous r/o http access to git for those people who lives behind the corporative proxy? git clone http://midnight-commander.org/git/mc.git Regards, Andrew. From weigelt at metux.de Wed Dec 31 11:34:52 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Wed, 31 Dec 2008 12:34:52 +0100 Subject: Tree-Maintenance: current/devel In-Reply-To: <495B3919.9080900@gmail.com> References: <20081226221447.GA14557@nibiru.local> <49555D90.3070001@gmail.com> <20081231074854.GM513@nibiru.local> <495B2B15.8080306@gmail.com> <20081231083432.GN513@nibiru.local> <495B3919.9080900@gmail.com> Message-ID: <20081231113452.GP513@nibiru.local> * Slava Zanko schrieb: > Hm... try again. :( Okay, got it now. I'm already in process of preparing patches from rhclub to git tree. cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- From pavel at ucw.cz Mon Dec 29 08:40:37 2008 From: pavel at ucw.cz (Pavel Machek) Date: Mon, 29 Dec 2008 09:40:37 +0100 Subject: HAVE_MMAP still necessary ? In-Reply-To: <20081227204353.GC16633@nibiru.local> References: <20081227202735.GB16633@nibiru.local> <20081227204353.GC16633@nibiru.local> Message-ID: <20081229084037.GA1767@ucw.cz> On Sat 2008-12-27 21:43:53, Enrico Weigelt wrote: > * Enrico Weigelt schrieb: > > > > Hi folks, > > > > > > I really wonder whether the mmap() stuff is still needed at all. > > It doesnt seem to be really used anywhere. > > Ups, didn't look hard enough (just scanned the vfs subdir) ;-O > > Okay, there're mainly two mmap()-using places: > > a) cmd.c: compare_files() - it uses the mmap() call directly > (w/o going over mcvfs), and it seems to work on local files > only. wouldn't it make sense to let it run via mcvfs ? > > b) view.c: it tries to mmap() in the file, obviously to let the > kernel do all the loading. > BUT: do we *really* want mmap() here, or just some "get me > that file into memory"()-call (same in cmd.c) ? I believe the idea is to be able to view parts of huge file without loading them to RAM first. (for really big files, they may not even fit in RAM.) -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html From winnie at debian.org Wed Dec 31 15:26:46 2008 From: winnie at debian.org (Patrick Winnertz) Date: Wed, 31 Dec 2008 16:26:46 +0100 Subject: Disable cvs/savannah In-Reply-To: <20081231015943.GK513@nibiru.local> References: <200812301601.29525.winnie@debian.org> <20081231015943.GK513@nibiru.local> Message-ID: <200812311626.46787.winnie@debian.org> Hey > The spam seems to go to the tracker, hmm, does it have public > write access No, you needs to have an account for creating bugs there. so this isn't the issue :) Greetings Winnie -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From winnie at debian.org Wed Dec 31 15:50:29 2008 From: winnie at debian.org (Patrick Winnertz) Date: Wed, 31 Dec 2008 16:50:29 +0100 Subject: RFC: Suggestion for workflow on patches In-Reply-To: <20081231022257.GL513@nibiru.local> References: <200812301627.15457.winnie@debian.org> <20081231022257.GL513@nibiru.local> Message-ID: <200812311650.49973.winnie@debian.org> Hey > > - Every patch which should be applied to the git should be attached to a > > bugreport in our ticketsystem. There should be for each patch a own > > ticket so that we have a good overview. > > hmm, has the drawback, that it's bit unconvenient (as long as we don't have > an automatic cmdline tool for that ;-P) moves the talks away from the list. No not really.. You only post indrect to the list via the ticket system... all things will hit then the mailinglist and can be discussed there if the need is there :) > Of course, an ideal situation would be an gateway between maillist and > trac, so new tickets are sent to the list and replies are automatically > bounced to the ticket's comments. There will be such a gateway. All things which are added to tickets in trac get already bounced to the list. Vice versa is not working atm, I work on this currently. Afterwards you only needs to cc ticket at midnight-commander.org (or something else) and the answer will show up in the corresponding ticket. > > > - Every patch that is in the ticket system must be approved by two devs > > in order to get applied again the working branch (master). > > Ok, seems reasonable. > BTW: does trac have some voting mechanism ? No, sadly not.. at least I found nothing up to now. Bug I'll search further. :) Until there is a solution for this we need to do this by writing something into the ticket ( a defined text for ACK /NACK). Maybe something like this: - XYZ-asdf.patch revision 2 : ACK or: - ABC-fdsa.patch revision 1 : NACK There exists a VotePlugin but as I understand it you can only vote for tickets and not for patches with different revisions... and this doesn't help us in my eyes :S > > Great ! > Maybe you could also install the xmlrpc plugin, so I can code my own upload > tool. I'll have a look on the plugin.. but there seems to be some issues with newest trac (0.11) which is running on www.m-c.org. > > > What do you think? Is this workflow for patches okay? If yes I would > > write this down somewhere in the wiki in order to make it official. > > ACK. > BTW: may I request write access to the wiki ? Should be there now (together with your ssh access). Do you want to write this down in the wiki and link it on the first page? :) Greetings Winnie -- . '' ` . Patrick Winnertz : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~winnie - http://www.der-winnie.de `- Debian - when you have better things to do than fixing systems -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: From trac at midnight-commander.org Tue Dec 30 14:47:52 2008 From: trac at midnight-commander.org (TRAC) Date: Tue, 30 Dec 2008 14:47:52 -0000 Subject: [Midnight Commander] #98: Test: Please ignore Message-ID: <044.04abd14fa93d0cc6ed09c609117383f0@midnight-commander.org> #98: Test: Please ignore ---------------------+------------------------------------------------------ Reporter: winnie | Owner: winnie Type: defect | Status: new Priority: major | Milestone: Component: mc-core | Version: Keywords: | ---------------------+------------------------------------------------------ Hey, You can ignore this email.. this is only to prove that trac can send emails to the list. And we get informed about new tickets and updates on these. -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Tue Dec 30 15:36:46 2008 From: trac at midnight-commander.org (TRAC) Date: Tue, 30 Dec 2008 15:36:46 -0000 Subject: [Midnight Commander] #98: Test: Please ignore In-Reply-To: <044.04abd14fa93d0cc6ed09c609117383f0@midnight-commander.org> References: <044.04abd14fa93d0cc6ed09c609117383f0@midnight-commander.org> Message-ID: <053.7fc6ec9511fa082bdc149e06c21088d6@midnight-commander.org> #98: Test: Please ignore ------------------------------+--------------------------------------------- Reporter: winnie | Owner: winnie Type: defect | Status: closed Priority: major | Milestone: Component: mc-core | Version: Resolution: fixed_in_master | Keywords: ------------------------------+--------------------------------------------- Changes (by winnie): * status: new => closed * resolution: => fixed_in_master -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 11:07:01 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 11:07:01 -0000 Subject: [Midnight Commander] #99: [PATCH] (4.6.1) new homepage in texts Message-ID: <043.19e336f82a0bf8d6443f0cbba326cd92@midnight-commander.org> #99: [PATCH] (4.6.1) new homepage in texts ---------------------+------------------------------------------------------ Reporter: metux | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: mc-core | Version: 4.6.1 Keywords: | Blocking: Blockedby: | ---------------------+------------------------------------------------------ Replaced the homepage address to http://www.midnight-commander.org/ -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 11:07:27 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 11:07:27 -0000 Subject: [Midnight Commander] #100: [PATCH] (git) new homepage in texts Message-ID: <043.7e6722053f719fd3b763e437c89e4589@midnight-commander.org> #100: [PATCH] (git) new homepage in texts ---------------------+------------------------------------------------------ Reporter: metux | Owner: Type: defect | Status: new Priority: major | Milestone: Component: mc-core | Version: git-master Keywords: | Blocking: Blockedby: | ---------------------+------------------------------------------------------ Replaced the homepage address to http://www.midnight-commander.org/ -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 11:20:52 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 11:20:52 -0000 Subject: [Midnight Commander] #101: [PATCH] (git) some new syntax files Message-ID: <043.b41716308df5a96060611026bb3bbc99@midnight-commander.org> #101: [PATCH] (git) some new syntax files -------------------------+-------------------------------------------------- Reporter: metux | Owner: Type: enhancement | Status: new Priority: minor | Milestone: 4.6.2 Component: mcedit | Version: git-master Keywords: | Blocking: Blockedby: | -------------------------+-------------------------------------------------- This patch adds several new syntax files (taken from the rhclub tree) -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 11:22:50 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 11:22:50 -0000 Subject: [Midnight Commander] #102: [PATCH] (git) css syntax update Message-ID: <043.3884c225e03b6428d82cecc83c1ffd6f@midnight-commander.org> #102: [PATCH] (git) css syntax update -------------------------+-------------------------------------------------- Reporter: metux | Owner: Type: enhancement | Status: new Priority: major | Milestone: 4.6.2 Component: mcedit | Version: git-master Keywords: | Blocking: Blockedby: | -------------------------+-------------------------------------------------- taken from rhclub tree -- Ticket URL: Midnight Commander Midnight Development Center From weigelt at metux.de Fri Dec 26 02:42:42 2008 From: weigelt at metux.de (Enrico Weigelt) Date: Fri, 26 Dec 2008 03:42:42 +0100 Subject: [PATCH] utf8 support (taken from Gentoo) Message-ID: <20081226024242.GL24788@nibiru.local> -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ --------------------------------------------------------------------- -------------- next part -------------- # # This is the UTF8 patch taken from Gentoo (with some tiny edits to # make it apply to the official tree). # # Source: Gentoo Portage # Reference: 4.6.1 # Submit-By: Enrico Weigelt, metux IT service # Submit-Date: 2008-12-26 # State: new # diff -ruN mc-4.6.1.orig/edit/edit-widget.h mc-4.6.1/edit/edit-widget.h --- mc-4.6.1.orig/edit/edit-widget.h 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/edit/edit-widget.h 2008-12-26 03:29:15.000000000 +0100 @@ -24,6 +24,11 @@ unsigned char border; }; +struct action { + mc_wchar_t ch; + long flags; +}; + struct WEdit { Widget widget; @@ -36,8 +41,17 @@ /* dynamic buffers and cursor position for editor: */ long curs1; /* position of the cursor from the beginning of the file. */ long curs2; /* position from the end of the file */ +#ifndef UTF8 unsigned char *buffers1[MAXBUFF + 1]; /* all data up to curs1 */ unsigned char *buffers2[MAXBUFF + 1]; /* all data from end of file down to curs2 */ +#else /* UTF8 */ + mc_wchar_t *buffers1[MAXBUFF + 1]; /* all data up to curs1 */ + mc_wchar_t *buffers2[MAXBUFF + 1]; /* all data from end of file down to curs2 */ + + unsigned char charbuf[MB_LEN_MAX]; + int charpoint; +#endif /* UTF8 */ + /* search variables */ long search_start; /* First character to start searching from */ @@ -81,7 +95,7 @@ /* undo stack and pointers */ unsigned long stack_pointer; - long *undo_stack; + struct action *undo_stack; unsigned long stack_size; unsigned long stack_size_mask; unsigned long stack_bottom; diff -ruN mc-4.6.1.orig/edit/edit.c mc-4.6.1/edit/edit.c --- mc-4.6.1.orig/edit/edit.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/edit/edit.c 2008-12-26 03:29:15.000000000 +0100 @@ -93,7 +93,7 @@ #ifndef NO_INLINE_GETBYTE -int edit_get_byte (WEdit * edit, long byte_index) +mc_wchar_t edit_get_byte (WEdit * edit, long byte_index) { unsigned long p; if (byte_index >= (edit->curs1 + edit->curs2) || byte_index < 0) @@ -125,7 +125,7 @@ edit->curs1 = 0; edit->curs2 = 0; - edit->buffers2[0] = g_malloc (EDIT_BUF_SIZE); + edit->buffers2[0] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t)); } /* @@ -152,7 +152,7 @@ } if (!edit->buffers2[buf2]) - edit->buffers2[buf2] = g_malloc (EDIT_BUF_SIZE); + edit->buffers2[buf2] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t)); mc_read (file, (char *) edit->buffers2[buf2] + EDIT_BUF_SIZE - @@ -162,7 +162,7 @@ for (buf = buf2 - 1; buf >= 0; buf--) { /* edit->buffers2[0] is already allocated */ if (!edit->buffers2[buf]) - edit->buffers2[buf] = g_malloc (EDIT_BUF_SIZE); + edit->buffers2[buf] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t)); mc_read (file, (char *) edit->buffers2[buf], EDIT_BUF_SIZE); } @@ -242,9 +242,44 @@ { int c; long i = 0; - while ((c = fgetc (f)) >= 0) { +#ifndef UTF8 + while ((c = fgetc (f)) != EOF) { edit_insert (edit, c); i++; +#else /* UTF8 */ + unsigned char buf[MB_LEN_MAX]; + int charpos = 0; + mbstate_t mbs; + + while ((c = fgetc (f)) != EOF) { + mc_wchar_t wc; + int size; + int j; + + buf[charpos++] = c; + + memset (&mbs, 0, sizeof (mbs)); + size = mbrtowc(&wc, (char *)buf, charpos, &mbs); + + if (size == -2) + continue; /* incomplete */ + + else if (size >= 0) { + edit_insert (edit, wc); + i++; + charpos = 0; + continue; + } + else { + + /* invalid */ +#ifdef __STDC_ISO_10646__ + for (j=0; jlast_byte; i++) if (fputc (edit_get_byte (edit, i), f) < 0) break; +#else /* UTF8 */ + for (i = 0; i < edit->last_byte; i++) { + mc_wchar_t wc = edit_get_byte (edit, i); + int res; + char tmpbuf[MB_LEN_MAX]; + mbstate_t mbs; + + memset (&mbs, 0, sizeof (mbs)); + +#ifdef __STDC_ISO_10646__ + if (wc >= BINARY_CHAR_OFFSET && wc < (BINARY_CHAR_OFFSET + 256)) { + res = 1; + tmpbuf[0] = (char) (wc - BINARY_CHAR_OFFSET); + } else +#endif + res = wcrtomb(tmpbuf, wc, &mbs); + if (res > 0) { + if (fwrite(tmpbuf, res, 1, f) != 1) + break; + } + } +#endif /* UTF8 */ return i; } @@ -294,12 +352,46 @@ int i, file, blocklen; long current = edit->curs1; unsigned char *buf; +#ifdef UTF8 + mbstate_t mbs; + int bufstart = 0; + + memset (&mbs, 0, sizeof (mbs)); +#endif /* UTF8 */ if ((file = mc_open (filename, O_RDONLY | O_BINARY)) == -1) return 0; buf = g_malloc (TEMP_BUF_LEN); +#ifndef UTF8 while ((blocklen = mc_read (file, (char *) buf, TEMP_BUF_LEN)) > 0) { for (i = 0; i < blocklen; i++) edit_insert (edit, buf[i]); +#else /* UTF8 */ + while ((blocklen = mc_read (file, (char *) buf + bufstart, TEMP_BUF_LEN - bufstart)) > 0) { + blocklen += bufstart; + bufstart = 0; + for (i = 0; i < blocklen; ) { + mc_wchar_t wc; + int j; + int size = mbrtowc(&wc, (char *)buf + i, blocklen - i, &mbs); + if (size == -2) { /*incomplete char*/ + bufstart = blocklen - i; + memcpy(buf, buf+i, bufstart); + i = blocklen; + memset (&mbs, 0, sizeof (mbs)); + } + else if (size <= 0) { +#ifdef __STDC_ISO_10646__ + edit_insert (edit, BINARY_CHAR_OFFSET + (mc_wchar_t)buf[i]); +#endif + memset (&mbs, 0, sizeof (mbs)); + i++; /* skip broken char */ + } + else { + edit_insert (edit, wc); + i+=size; + } + } +#endif /* UTF8 */ } edit_cursor_move (edit, current - edit->curs1); g_free (buf); @@ -393,7 +485,11 @@ static int edit_load_file (WEdit *edit) { +#ifndef UTF8 int fast_load = 1; +#else /* UTF8 */ + int fast_load = 0; /* can't be used with multibyte characters */ +#endif /* UTF8 */ /* Cannot do fast load if a filter is used */ if (edit_find_filter (edit->filename) >= 0) @@ -540,7 +636,7 @@ edit_set_filename (edit, filename); edit->stack_size = START_STACK_SIZE; edit->stack_size_mask = START_STACK_SIZE - 1; - edit->undo_stack = g_malloc ((edit->stack_size + 10) * sizeof (long)); + edit->undo_stack = g_malloc ((edit->stack_size + 10) * sizeof (struct action)); if (edit_load_file (edit)) { /* edit_load_file already gives an error message */ if (to_free) @@ -565,7 +661,9 @@ edit_move_display (edit, line - 1); edit_move_to_line (edit, line - 1); } - +#ifdef UTF8 + edit->charpoint = 0; +#endif return edit; } @@ -693,13 +791,23 @@ { unsigned long sp = edit->stack_pointer; unsigned long spm1; - long *t; + + struct action *t; + mc_wchar_t ch = 0; + + if (c == CHAR_INSERT || c == CHAR_INSERT_AHEAD) { + va_list ap; + va_start (ap, c); + ch = va_arg (ap, mc_wint_t); + va_end (ap); + } + /* first enlarge the stack if necessary */ if (sp > edit->stack_size - 10) { /* say */ if (option_max_undo < 256) option_max_undo = 256; if (edit->stack_size < (unsigned long) option_max_undo) { - t = g_realloc (edit->undo_stack, (edit->stack_size * 2 + 10) * sizeof (long)); + t = g_realloc (edit->undo_stack, (edit->stack_size * 2 + 10) * sizeof (struct action)); if (t) { edit->undo_stack = t; edit->stack_size <<= 1; @@ -714,7 +822,7 @@ #ifdef FAST_MOVE_CURSOR if (c == CURS_LEFT_LOTS || c == CURS_RIGHT_LOTS) { va_list ap; - edit->undo_stack[sp] = c == CURS_LEFT_LOTS ? CURS_LEFT : CURS_RIGHT; + edit->undo_stack[sp].flags = c == CURS_LEFT_LOTS ? CURS_LEFT : CURS_RIGHT; edit->stack_pointer = (edit->stack_pointer + 1) & edit->stack_size_mask; va_start (ap, c); c = -(va_arg (ap, int)); @@ -725,12 +833,14 @@ && spm1 != edit->stack_bottom && ((sp - 2) & edit->stack_size_mask) != edit->stack_bottom) { int d; - if (edit->undo_stack[spm1] < 0) { - d = edit->undo_stack[(sp - 2) & edit->stack_size_mask]; - if (d == c) { - if (edit->undo_stack[spm1] > -1000000000) { + mc_wchar_t d_ch; + if (edit->undo_stack[spm1].flags < 0) { + d = edit->undo_stack[(sp - 2) & edit->stack_size_mask].flags; + d_ch = edit->undo_stack[(sp - 2) & edit->stack_size_mask].ch; + if (d == c && d_ch == ch) { + if (edit->undo_stack[spm1].flags > -1000000000) { if (c < KEY_PRESS) /* --> no need to push multiple do-nothings */ - edit->undo_stack[spm1]--; + edit->undo_stack[spm1].flags--; return; } } @@ -738,19 +848,20 @@ #ifndef NO_STACK_CURSMOVE_ANIHILATION else if ((c == CURS_LEFT && d == CURS_RIGHT) || (c == CURS_RIGHT && d == CURS_LEFT)) { /* a left then a right anihilate each other */ - if (edit->undo_stack[spm1] == -2) + if (edit->undo_stack[spm1].flags == -2) edit->stack_pointer = spm1; else - edit->undo_stack[spm1]++; + edit->undo_stack[spm1].flags++; return; } #endif } else { - d = edit->undo_stack[spm1]; - if (d == c) { + d = edit->undo_stack[spm1].flags; + d_ch = edit->undo_stack[spm1].ch; + if (d == c && d_ch == ch) { if (c >= KEY_PRESS) return; /* --> no need to push multiple do-nothings */ - edit->undo_stack[sp] = -2; + edit->undo_stack[sp].flags = -2; goto check_bottom; } #ifndef NO_STACK_CURSMOVE_ANIHILATION @@ -762,7 +873,9 @@ #endif } } - edit->undo_stack[sp] = c; + edit->undo_stack[sp].flags = c; + edit->undo_stack[sp].ch = ch; + check_bottom: edit->stack_pointer = (edit->stack_pointer + 1) & edit->stack_size_mask; @@ -775,10 +888,10 @@ (((unsigned long) c + 1) & edit->stack_size_mask) == edit->stack_bottom) do { edit->stack_bottom = (edit->stack_bottom + 1) & edit->stack_size_mask; - } while (edit->undo_stack[edit->stack_bottom] < KEY_PRESS && edit->stack_bottom != edit->stack_pointer); + } while (edit->undo_stack[edit->stack_bottom].flags < KEY_PRESS && edit->stack_bottom != edit->stack_pointer); /*If a single key produced enough pushes to wrap all the way round then we would notice that the [stack_bottom] does not contain KEY_PRESS. The stack is then initialised: */ - if (edit->stack_pointer != edit->stack_bottom && edit->undo_stack[edit->stack_bottom] < KEY_PRESS) + if (edit->stack_pointer != edit->stack_bottom && edit->undo_stack[edit->stack_bottom].flags < KEY_PRESS) edit->stack_bottom = edit->stack_pointer = 0; } @@ -787,30 +900,30 @@ then the file should be as it was when he loaded up. Then set edit->modified to 0. */ static long -pop_action (WEdit * edit) +pop_action (WEdit * edit, struct action *c) { - long c; unsigned long sp = edit->stack_pointer; if (sp == edit->stack_bottom) { - return STACK_BOTTOM; + c->flags = STACK_BOTTOM; + return c->flags; } sp = (sp - 1) & edit->stack_size_mask; - if ((c = edit->undo_stack[sp]) >= 0) { -/* edit->undo_stack[sp] = '@'; */ + *c = edit->undo_stack[sp]; + if (edit->undo_stack[sp].flags >= 0) { edit->stack_pointer = (edit->stack_pointer - 1) & edit->stack_size_mask; - return c; + return c->flags; } if (sp == edit->stack_bottom) { return STACK_BOTTOM; } - c = edit->undo_stack[(sp - 1) & edit->stack_size_mask]; - if (edit->undo_stack[sp] == -2) { -/* edit->undo_stack[sp] = '@'; */ + *c = edit->undo_stack[(sp - 1) & edit->stack_size_mask]; + + if (edit->undo_stack[sp].flags == -2) { edit->stack_pointer = sp; } else - edit->undo_stack[sp]++; + edit->undo_stack[sp].flags++; - return c; + return c->flags; } /* is called whenever a modification is made by one of the four routines below */ @@ -831,7 +944,7 @@ */ void -edit_insert (WEdit *edit, int c) +edit_insert (WEdit *edit, mc_wchar_t c) { /* check if file has grown to large */ if (edit->last_byte >= SIZE_LIMIT) @@ -869,12 +982,11 @@ /* add a new buffer if we've reached the end of the last one */ if (!(edit->curs1 & M_EDIT_BUF_SIZE)) edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE] = - g_malloc (EDIT_BUF_SIZE); + g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t)); /* perform the insertion */ - edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE][edit-> - curs1 & M_EDIT_BUF_SIZE] - = (unsigned char) c; + edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE] + [edit->curs1 & M_EDIT_BUF_SIZE] = c; /* update file length */ edit->last_byte++; @@ -885,7 +997,7 @@ /* same as edit_insert and move left */ -void edit_insert_ahead (WEdit * edit, int c) +void edit_insert_ahead (WEdit * edit, mc_wchar_t c) { if (edit->last_byte >= SIZE_LIMIT) return; @@ -908,7 +1020,7 @@ edit->last_get_rule += (edit->last_get_rule >= edit->curs1); if (!((edit->curs2 + 1) & M_EDIT_BUF_SIZE)) - edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE); + edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t)); edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - (edit->curs2 & M_EDIT_BUF_SIZE) - 1] = c; edit->last_byte++; @@ -918,7 +1030,7 @@ int edit_delete (WEdit * edit) { - int p; + mc_wint_t p; if (!edit->curs2) return 0; @@ -942,7 +1054,7 @@ edit->total_lines--; edit->force |= REDRAW_AFTER_CURSOR; } - edit_push_action (edit, p + 256); + edit_push_action (edit, CHAR_INSERT_AHEAD, p); if (edit->curs1 < edit->start_display) { edit->start_display--; if (p == '\n') @@ -956,7 +1068,7 @@ static int edit_backspace (WEdit * edit) { - int p; + mc_wint_t p; if (!edit->curs1) return 0; @@ -980,7 +1092,7 @@ edit->total_lines--; edit->force |= REDRAW_AFTER_CURSOR; } - edit_push_action (edit, p); + edit_push_action (edit, CHAR_INSERT, p); if (edit->curs1 < edit->start_display) { edit->start_display--; @@ -993,10 +1105,18 @@ #ifdef FAST_MOVE_CURSOR -static void memqcpy (WEdit * edit, unsigned char *dest, unsigned char *src, int n) +static void memqcpy (WEdit * edit, mc_wchar_t *dest, mc_wchar_t *src, int n) { unsigned long next; +#ifndef UTF8 while ((next = (unsigned long) memccpy (dest, src, '\n', n))) { +#else /* UTF8 */ + while (n) { + next = 0; + while (next < n && src[next]!='\n') next++; + if (next < n) next++; + wmemcpy (dest, src, next) +#endif /* UTF8 */ edit->curs_line--; next -= (unsigned long) dest; n -= next; @@ -1009,7 +1129,7 @@ edit_move_backward_lots (WEdit *edit, long increment) { int r, s, t; - unsigned char *p; + mc_wchar_t *p; if (increment > edit->curs1) increment = edit->curs1; @@ -1049,7 +1169,7 @@ edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] = p; else edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] = - g_malloc (EDIT_BUF_SIZE); + g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t)); } else { g_free (p); } @@ -1087,7 +1207,7 @@ edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] = p; else edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] = - g_malloc (EDIT_BUF_SIZE); + g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t)); } else { g_free (p); } @@ -1119,7 +1239,7 @@ c = edit_get_byte (edit, edit->curs1 - 1); if (!((edit->curs2 + 1) & M_EDIT_BUF_SIZE)) - edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE); + edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t)); edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - (edit->curs2 & M_EDIT_BUF_SIZE) - 1] = c; edit->curs2++; c = edit->buffers1[(edit->curs1 - 1) >> S_EDIT_BUF_SIZE][(edit->curs1 - 1) & M_EDIT_BUF_SIZE]; @@ -1144,7 +1264,7 @@ c = edit_get_byte (edit, edit->curs1); if (!(edit->curs1 & M_EDIT_BUF_SIZE)) - edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE); + edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t)); edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE][edit->curs1 & M_EDIT_BUF_SIZE] = c; edit->curs1++; c = edit->buffers2[(edit->curs2 - 1) >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - ((edit->curs2 - 1) & M_EDIT_BUF_SIZE) - 1]; @@ -1251,7 +1371,7 @@ q = edit->last_byte + 2; for (col = 0, p = current; p < q; p++) { - int c; + mc_wchar_t c; if (cols != -10) { if (col == cols) return p; @@ -1269,7 +1389,7 @@ } else if (c < 32 || c == 127) col += 2; /* Caret notation for control characters */ else - col++; + col += wcwidth(c); } return col; } @@ -1402,7 +1522,7 @@ is_blank (WEdit *edit, long offset) { long s, f; - int c; + mc_wchar_t c; s = edit_bol (edit, offset); f = edit_eol (edit, offset) - 1; while (s <= f) { @@ -1774,13 +1894,13 @@ static void edit_do_undo (WEdit * edit) { - long ac; + struct action ac; long count = 0; edit->stack_disable = 1; /* don't record undo's onto undo stack! */ - while ((ac = pop_action (edit)) < KEY_PRESS) { - switch ((int) ac) { + while (pop_action (edit, &ac) < KEY_PRESS) { + switch ((int) ac.flags) { case STACK_BOTTOM: goto done_undo; case CURS_RIGHT: @@ -1801,31 +1921,33 @@ case COLUMN_OFF: column_highlighting = 0; break; + case CHAR_INSERT: + edit_insert (edit, ac.ch); + break; + case CHAR_INSERT_AHEAD: + edit_insert_ahead (edit, ac.ch); + break; } - if (ac >= 256 && ac < 512) - edit_insert_ahead (edit, ac - 256); - if (ac >= 0 && ac < 256) - edit_insert (edit, ac); - if (ac >= MARK_1 - 2 && ac < MARK_2 - 2) { - edit->mark1 = ac - MARK_1; + if (ac.flags >= MARK_1 - 2 && ac.flags < MARK_2 - 2) { + edit->mark1 = ac.flags - MARK_1; edit->column1 = edit_move_forward3 (edit, edit_bol (edit, edit->mark1), 0, edit->mark1); - } else if (ac >= MARK_2 - 2 && ac < KEY_PRESS) { - edit->mark2 = ac - MARK_2; + } else if (ac.flags >= MARK_2 - 2 && ac.flags < KEY_PRESS) { + edit->mark2 = ac.flags - MARK_2; edit->column2 = edit_move_forward3 (edit, edit_bol (edit, edit->mark2), 0, edit->mark2); } if (count++) edit->force |= REDRAW_PAGE; /* more than one pop usually means something big */ } - if (edit->start_display > ac - KEY_PRESS) { - edit->start_line -= edit_count_lines (edit, ac - KEY_PRESS, edit->start_display); + if (edit->start_display > ac.flags - KEY_PRESS) { + edit->start_line -= edit_count_lines (edit, ac.flags - KEY_PRESS, edit->start_display); edit->force |= REDRAW_PAGE; - } else if (edit->start_display < ac - KEY_PRESS) { - edit->start_line += edit_count_lines (edit, edit->start_display, ac - KEY_PRESS); + } else if (edit->start_display < ac.flags - KEY_PRESS) { + edit->start_line += edit_count_lines (edit, edit->start_display, ac.flags - KEY_PRESS); edit->force |= REDRAW_PAGE; } - edit->start_display = ac - KEY_PRESS; /* see push and pop above */ + edit->start_display = ac.flags - KEY_PRESS; /* see push and pop above */ edit_update_curs_row (edit); done_undo:; @@ -2102,7 +2224,7 @@ * passed as -1. Commands are executed, and char_for_insertion is * inserted at the cursor. */ -void edit_execute_key_command (WEdit *edit, int command, int char_for_insertion) +void edit_execute_key_command (WEdit *edit, int command, mc_wint_t char_for_insertion) { if (command == CK_Begin_Record_Macro) { edit->macro_i = 0; @@ -2137,7 +2259,7 @@ all of them. It also does not check for the Undo command. */ void -edit_execute_cmd (WEdit *edit, int command, int char_for_insertion) +edit_execute_cmd (WEdit *edit, int command, mc_wint_t char_for_insertion) { edit->force |= REDRAW_LINE; @@ -2170,7 +2292,7 @@ } /* An ordinary key press */ - if (char_for_insertion >= 0) { + if (char_for_insertion != (mc_wint_t) -1) { if (edit->overwrite) { if (edit_get_byte (edit, edit->curs1) != '\n') edit_delete (edit); diff -ruN mc-4.6.1.orig/edit/edit.h mc-4.6.1/edit/edit.h --- mc-4.6.1.orig/edit/edit.h 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/edit/edit.h 2008-12-26 03:29:15.000000000 +0100 @@ -39,6 +39,27 @@ #include "../src/global.h" +#include "src/tty.h" + +#ifdef UTF8 +#include +#include + +#define mc_wchar_t wchar_t +#define mc_wint_t wint_t + +#else + +#define mc_wchar_t unsigned char +#define mc_wint_t int + +#endif + + +/* unicode private use area */ +#define BINARY_CHAR_OFFSET 0xFFE00 + + #define N_menus 5 #define SEARCH_DIALOG_OPTION_NO_SCANF 1 @@ -99,6 +120,8 @@ #define START_STACK_SIZE 32 /* Some codes that may be pushed onto or returned from the undo stack */ +#define CHAR_INSERT 65 +#define CHAR_INSERT_AHEAD 66 #define CURS_LEFT 601 #define CURS_RIGHT 602 #define DELCHAR 603 @@ -118,7 +141,7 @@ struct macro { short command; - short ch; + mc_wchar_t ch; }; struct WEdit; @@ -132,26 +155,8 @@ void menu_save_mode_cmd (void); int edit_raw_key_query (const char *heading, const char *query, int cancel); int edit_file (const char *_file, int line); -int edit_translate_key (WEdit *edit, long x_key, int *cmd, int *ch); - -#ifndef NO_INLINE_GETBYTE -int edit_get_byte (WEdit * edit, long byte_index); -#else -static inline int edit_get_byte (WEdit * edit, long byte_index) -{ - unsigned long p; - if (byte_index >= (edit->curs1 + edit->curs2) || byte_index < 0) - return '\n'; - - if (byte_index >= edit->curs1) { - p = edit->curs1 + edit->curs2 - byte_index - 1; - return edit->buffers2[p >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - (p & M_EDIT_BUF_SIZE) - 1]; - } else { - return edit->buffers1[byte_index >> S_EDIT_BUF_SIZE][byte_index & M_EDIT_BUF_SIZE]; - } -} -#endif - +int edit_translate_key (WEdit *edit, long x_key, int *cmd, mc_wint_t *ch); +mc_wchar_t edit_get_byte (WEdit * edit, long byte_index); int edit_count_lines (WEdit * edit, long current, int upto); long edit_move_forward (WEdit * edit, long current, int lines, long upto); long edit_move_forward3 (WEdit * edit, long current, int cols, long upto); @@ -176,11 +181,11 @@ void edit_delete_line (WEdit * edit); int edit_delete (WEdit * edit); -void edit_insert (WEdit * edit, int c); +void edit_insert (WEdit * edit, mc_wchar_t c); int edit_cursor_move (WEdit * edit, long increment); void edit_push_action (WEdit * edit, long c, ...); void edit_push_key_press (WEdit * edit); -void edit_insert_ahead (WEdit * edit, int c); +void edit_insert_ahead (WEdit * edit, mc_wchar_t c); long edit_write_stream (WEdit * edit, FILE * f); char *edit_get_write_filter (const char *writename, const char *filename); int edit_save_confirm_cmd (WEdit * edit); @@ -212,7 +217,7 @@ int eval_marks (WEdit * edit, long *start_mark, long *end_mark); void edit_status (WEdit * edit); void edit_execute_key_command (WEdit *edit, int command, - int char_for_insertion); + mc_wint_t char_for_insertion); void edit_update_screen (WEdit * edit); int edit_print_string (WEdit * e, const char *s); void edit_move_to_line (WEdit * e, long line); @@ -256,7 +261,7 @@ void format_paragraph (WEdit *edit, int force); /* either command or char_for_insertion must be passed as -1 */ -void edit_execute_cmd (WEdit *edit, int command, int char_for_insertion); +void edit_execute_cmd (WEdit *edit, int command, mc_wint_t char_for_insertion); #define get_sys_error(s) (s) diff -ruN mc-4.6.1.orig/edit/editcmd.c mc-4.6.1/edit/editcmd.c --- mc-4.6.1.orig/edit/editcmd.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/edit/editcmd.c 2008-12-26 03:29:15.000000000 +0100 @@ -46,7 +46,7 @@ #define edit_get_save_file(f,h) input_expand_dialog (h, _(" Enter file name: "), f) struct selection { - unsigned char * text; + mc_wchar_t *text; int len; }; @@ -69,12 +69,16 @@ #define MAX_REPL_LEN 1024 static int edit_save_cmd (WEdit *edit); -static unsigned char *edit_get_block (WEdit *edit, long start, +static mc_wchar_t *edit_get_block (WEdit *edit, long start, long finish, int *l); -static inline int my_lower_case (int c) +static inline mc_wchar_t my_lower_case (mc_wchar_t c) { +#ifndef UTF8 return tolower(c & 0xFF); +#else + return towlower(c); +#endif } static const char *strcasechr (const unsigned char *s, int c) @@ -108,11 +112,11 @@ #endif /* !HAVE_MEMMOVE */ /* #define itoa MY_itoa <---- this line is now in edit.h */ -static char * +static mc_wchar_t * MY_itoa (int i) { - static char t[14]; - char *s = t + 13; + static mc_wchar_t t[14]; + mc_wchar_t *s = t + 13; int j = i; *s-- = 0; do { @@ -196,6 +200,48 @@ doupdate(); } +#ifdef UTF8 + +static size_t +wchar_write(int fd, mc_wchar_t *buf, size_t len) +{ + char *tmpbuf = g_malloc(len + MB_LEN_MAX); + mbstate_t mbs; + size_t i; + size_t outlen = 0; + size_t res; + + for (i = 0; i < len; i++) { + if (outlen >= len) { + if ((res = mc_write(fd, tmpbuf, outlen)) != outlen) { + g_free(tmpbuf); + return -1; + } + outlen = 0; + } + memset (&mbs, 0, sizeof (mbs)); +#ifdef __STDC_ISO_10646__ + if (buf[i] >= BINARY_CHAR_OFFSET && buf[i] < (BINARY_CHAR_OFFSET + 256)) { + res = 1; + tmpbuf[outlen] = (char) (buf[i] - BINARY_CHAR_OFFSET); + + } else +#endif + res = wcrtomb(tmpbuf + outlen, buf[i], &mbs); + if (res > 0) { + outlen += res; + } + } + if ((res = mc_write(fd, tmpbuf, outlen)) != outlen) { + g_free(tmpbuf); + return -1; + } + g_free(tmpbuf); + return len; +} + +#endif /* UTF8 */ + /* If 0 (quick save) then a) create/truncate file, b) save to ; if 1 (safe save) then a) save to , @@ -303,32 +349,48 @@ buf = 0; filelen = edit->last_byte; while (buf <= (edit->curs1 >> S_EDIT_BUF_SIZE) - 1) { +#ifndef UTF8 if (mc_write (fd, (char *) edit->buffers1[buf], EDIT_BUF_SIZE) +#else /* UTF8 */ + if (wchar_write (fd, edit->buffers1[buf], EDIT_BUF_SIZE) +#endif /* UTF8 */ != EDIT_BUF_SIZE) { mc_close (fd); goto error_save; } buf++; } +#ifndef UTF8 if (mc_write (fd, (char *) edit->buffers1[buf], +#else /* UTF8 */ + if (wchar_write + (fd, edit->buffers1[buf], +#endif /* UTF8 */ edit->curs1 & M_EDIT_BUF_SIZE) != (edit->curs1 & M_EDIT_BUF_SIZE)) { filelen = -1; } else if (edit->curs2) { edit->curs2--; buf = (edit->curs2 >> S_EDIT_BUF_SIZE); - if (mc_write - (fd, - (char *) edit->buffers2[buf] + EDIT_BUF_SIZE - +#ifndef UTF8 + if (mc_write(fd, (char *) edit->buffers2[buf] + EDIT_BUF_SIZE - +#else /* UTF8 */ + if (wchar_write(fd, edit->buffers2[buf] + EDIT_BUF_SIZE - +#endif /* UTF8 */ (edit->curs2 & M_EDIT_BUF_SIZE) - 1, 1 + (edit->curs2 & M_EDIT_BUF_SIZE)) != 1 + (edit->curs2 & M_EDIT_BUF_SIZE)) { filelen = -1; } else { while (--buf >= 0) { +#ifndef UTF8 if (mc_write (fd, (char *) edit->buffers2[buf], +#else /* UTF8 */ + if (wchar_write + (fd, edit->buffers2[buf], +#endif /* UTF8 */ EDIT_BUF_SIZE) != EDIT_BUF_SIZE) { filelen = -1; break; @@ -643,13 +705,21 @@ if (!n || n == EOF) break; n = 0; +#ifndef UTF8 while (fscanf (f, "%hd %hd, ", ¯o[n].command, ¯o[n].ch)) +#else /* UTF8 */ + while (fscanf (f, "%hd %lu, ", ¯o[n].command, ¯o[n].ch)) +#endif /* UTF8 */ n++; fscanf (f, ";\n"); if (s != k) { fprintf (g, ("key '%d 0': "), s); for (i = 0; i < n; i++) +#ifndef UTF8 fprintf (g, "%hd %hd, ", macro[i].command, macro[i].ch); +#else /* UTF8 */ + fprintf (g, "%hd %lu, ", macro[i].command, macro[i].ch); +#endif /* UTF8 */ fprintf (g, ";\n"); } } @@ -685,7 +755,11 @@ if (f) { fprintf (f, ("key '%d 0': "), s); for (i = 0; i < n; i++) +#ifndef UTF8 fprintf (f, "%hd %hd, ", macro[i].command, macro[i].ch); +#else /* UTF8 */ + fprintf (f, "%hd %lu, ", macro[i].command, macro[i].ch); +#endif /* UTF8 */ fprintf (f, ";\n"); fclose (f); if (saved_macros_loaded) { @@ -734,10 +808,18 @@ saved_macro[i++] = s; if (!found) { *n = 0; +#ifndef UTF8 while (*n < MAX_MACRO_LENGTH && 2 == fscanf (f, "%hd %hd, ", ¯o[*n].command, ¯o[*n].ch)) +#else /* UTF8 */ + while (*n < MAX_MACRO_LENGTH && 2 == fscanf (f, "%hd %lu, ", ¯o[*n].command, ¯o[*n].ch)) +#endif /* UTF8 */ (*n)++; } else { +#ifndef UTF8 while (2 == fscanf (f, "%hd %hd, ", &dummy.command, &dummy.ch)); +#else /* UTF8 */ + while (2 == fscanf (f, "%hd %lu, ", &dummy.command, &dummy.ch)); +#endif /* UTF8 */ } fscanf (f, ";\n"); if (s == k) @@ -886,7 +968,7 @@ #define space_width 1 static void -edit_insert_column_of_text (WEdit * edit, unsigned char *data, int size, int width) +edit_insert_column_of_text (WEdit * edit, mc_wchar_t *data, int size, int width) { long cursor; int i, col; @@ -934,7 +1016,7 @@ { long start_mark, end_mark, current = edit->curs1; int size, x; - unsigned char *copy_buf; + mc_wchar_t *copy_buf; edit_update_curs_col (edit); x = edit->curs_col; @@ -979,7 +1061,7 @@ { long count; long current; - unsigned char *copy_buf; + mc_wchar_t *copy_buf; long start_mark, end_mark; int deleted = 0; int x = 0; @@ -1040,7 +1122,7 @@ edit_push_action (edit, COLUMN_ON); column_highlighting = 0; } else { - copy_buf = g_malloc (end_mark - start_mark); + copy_buf = g_malloc ((end_mark - start_mark) * sizeof(mc_wchar_t)); edit_cursor_move (edit, start_mark - edit->curs1); edit_scroll_screen_over_cursor (edit); count = start_mark; @@ -1371,7 +1453,11 @@ /* This function is a modification of mc-3.2.10/src/view.c:regexp_view_search() */ /* returns -3 on error in pattern, -1 on not found, found_len = 0 if either */ static int +#ifndef UTF8 string_regexp_search (char *pattern, char *string, int len, int match_type, +#else /* UTF8 */ +string_regexp_search (char *pattern, mc_wchar_t *wstring, int match_type, +#endif /* UTF8 */ int match_bol, int icase, int *found_len, void *d) { static regex_t r; @@ -1380,6 +1466,11 @@ regmatch_t *pmatch; static regmatch_t s[1]; +#ifdef UTF8 + char *string; + int i; +#endif /* UTF8 */ + pmatch = (regmatch_t *) d; if (!pmatch) pmatch = s; @@ -1399,13 +1490,51 @@ old_type = match_type; old_icase = icase; } + +#ifdef UTF8 + string = wchar_to_mbstr(wstring); + if (string == NULL) + return -1; +#endif /* UTF8 */ + if (regexec (&r, string, d ? NUM_REPL_ARGS : 1, pmatch, ((match_bol || match_type != match_normal) ? 0 : REG_NOTBOL)) != 0) { *found_len = 0; + +#ifdef UTF8 + g_free(string); +#endif /* UTF8 */ + return -1; } + +#ifdef UTF8 + for (i = 0; i < (d ? NUM_REPL_ARGS : 1); i++) { + char tmp; + int new_o; + + if (pmatch[i].rm_so < 0) + continue; + tmp = string[pmatch[i].rm_so]; + string[pmatch[i].rm_so] = 0; + new_o = mbstrlen(string); + string[pmatch[i].rm_so] = tmp; + pmatch[i].rm_so = new_o; + + if (pmatch[i].rm_eo < 0) + continue; + tmp = string[pmatch[i].rm_eo]; + string[pmatch[i].rm_eo] = 0; + new_o = mbstrlen(string); + string[pmatch[i].rm_eo] = tmp; + pmatch[i].rm_eo = new_o; + } + + g_free(string); +#endif /* UTF8 */ + *found_len = pmatch[0].rm_eo - pmatch[0].rm_so; return (pmatch[0].rm_so); } @@ -1413,13 +1542,29 @@ /* thanks to Liviu Daia for getting this (and the above) routines to work properly - paul */ +#ifndef UTF8 typedef int (*edit_getbyte_fn) (WEdit *, long); +#else /* UTF8 */ +typedef mc_wchar_t (*edit_getbyte_fn) (WEdit *, long); +#endif /* UTF8 */ static long +#ifndef UTF8 edit_find_string (long start, unsigned char *exp, int *len, long last_byte, edit_getbyte_fn get_byte, void *data, int once_only, void *d) +#else /* UTF8 */ +edit_find_string (long start, unsigned char *exp_mb, int *len, long last_byte, edit_getbyte_fn get_byte, void *data, int once_only, void *d) +#endif /* UTF8 */ { long p, q = 0; - long l = strlen ((char *) exp), f = 0; + long f = 0; + +#ifndef UTF8 + long l = strlen ((char *) exp); +#else /* UTF8 */ + mc_wchar_t *exp = mbstr_to_wchar((char *)exp_mb); + mc_wchar_t *exp_backup = exp; + long l = wcslen(exp); +#endif /* UTF8 */ int n = 0; for (p = 0; p < l; p++) /* count conversions... */ @@ -1428,19 +1573,22 @@ n++; if (replace_scanf || replace_regexp) { - int c; - unsigned char *buf; - unsigned char mbuf[MAX_REPL_LEN * 2 + 3]; + mc_wint_t c; + mc_wchar_t *buf; + mc_wchar_t mbuf[MAX_REPL_LEN * 2 + 3]; replace_scanf = (!replace_regexp); /* can't have both */ buf = mbuf; if (replace_scanf) { - unsigned char e[MAX_REPL_LEN]; - if (n >= NUM_REPL_ARGS) - return -3; - + mc_wchar_t e[MAX_REPL_LEN]; + if (n >= NUM_REPL_ARGS) { +#ifdef UTF8 + g_free(exp_backup); +#endif /* UTF8 */ + return -3; + } if (replace_case) { for (p = start; p < last_byte && p < start + MAX_REPL_LEN; p++) buf[p - start] = (*get_byte) (data, p); @@ -1454,20 +1602,36 @@ } buf[(q = p - start)] = 0; +#ifndef UTF8 strcpy ((char *) e, (char *) exp); strcat ((char *) e, "%n"); +#else /* UTF8 */ + wcscpy (e, exp); + wcscat (e, L"%n"); +#endif /* UTF8 */ exp = e; while (q) { *((int *) sargs[n]) = 0; /* --> here was the problem - now fixed: good */ +#ifndef UTF8 if (n == sscanf ((char *) buf, (char *) exp, SCANF_ARGS)) { +#else /* UTF8 */ + if (n == swscanf (buf, exp, SCANF_ARGS)) { +#endif /* UTF8 */ if (*((int *) sargs[n])) { *len = *((int *) sargs[n]); +#ifdef UTF8 + g_free(exp_backup); +#endif /* UTF8 */ return start; } } - if (once_only) + if (once_only) { +#ifdef UTF8 + g_free(exp_backup); +#endif /* UTF8 */ return -2; + } if (q + start < last_byte) { if (replace_case) { buf[q] = (*get_byte) (data, q + start); @@ -1481,7 +1645,11 @@ start++; buf++; /* move the window along */ if (buf == mbuf + MAX_REPL_LEN) { /* the window is about to go past the end of array, so... */ +#ifndef UTF8 memmove (mbuf, buf, strlen ((char *) buf) + 1); /* reset it */ +#else /* UTF8 */ + wmemmove (mbuf, buf, (wcslen (buf) + 1)); /* reset it */ +#endif /* UTF8 */ buf = mbuf; } q--; @@ -1507,10 +1675,17 @@ buf = mbuf; while (q) { +#ifndef UTF8 found_start = string_regexp_search ((char *) exp, (char *) buf, q, match_normal, match_bol, !replace_case, len, d); +#else /* UTF8 */ + found_start = string_regexp_search ((char *) exp_mb, buf, match_normal, match_bol, !replace_case, len, d); +#endif /* UTF8 */ if (found_start <= -2) { /* regcomp/regexec error */ *len = 0; +#ifdef UTF8 + g_free (exp_backup); +#endif /* UTF8 */ return -3; } else if (found_start == -1) /* not found: try next line */ @@ -1521,15 +1696,27 @@ match_bol = 0; continue; } - else /* found */ + else { /* found */ +#ifdef UTF8 + g_free(exp_backup); +#endif /* UTF8 */ return (start + offset - q + found_start); + } } - if (once_only) + if (once_only) { +#ifdef UTF8 + g_free(exp_backup); +#endif /* UTF8 */ return -2; + } if (buf[q - 1] != '\n') { /* incomplete line: try to recover */ buf = mbuf + MAX_REPL_LEN / 2; +#ifndef UTF8 q = strlen ((const char *) buf); +#else /* UTF8 */ + q = wcslen (buf); +#endif /* UTF8 */ memmove (mbuf, buf, q); p = start + q; move_win = 1; @@ -1539,36 +1726,59 @@ } } } else { +#ifndef UTF8 *len = strlen ((const char *) exp); +#else /* UTF8 */ + *len = wcslen (exp); +#endif /* UTF8 */ if (replace_case) { for (p = start; p <= last_byte - l; p++) { - if ((*get_byte) (data, p) == (unsigned char)exp[0]) { /* check if first char matches */ + if ((*get_byte) (data, p) == exp[0]) { /* check if first char matches */ for (f = 0, q = 0; q < l && f < 1; q++) - if ((*get_byte) (data, q + p) != (unsigned char)exp[q]) + if ((*get_byte) (data, q + p) != exp[q]) f = 1; - if (f == 0) + if (f == 0) { +#ifdef UTF8 + g_free (exp_backup); +#endif /* UTF8 */ return p; + } } - if (once_only) + if (once_only) { +#ifdef UTF8 + g_free(exp_backup); +#endif /* UTF8 */ return -2; + } } } else { for (p = 0; exp[p] != 0; p++) exp[p] = my_lower_case (exp[p]); for (p = start; p <= last_byte - l; p++) { - if (my_lower_case ((*get_byte) (data, p)) == (unsigned char)exp[0]) { + if (my_lower_case ((*get_byte) (data, p)) == exp[0]) { for (f = 0, q = 0; q < l && f < 1; q++) - if (my_lower_case ((*get_byte) (data, q + p)) != (unsigned char)exp[q]) + if (my_lower_case ((*get_byte) (data, q + p)) != exp[q]) f = 1; - if (f == 0) + if (f == 0) { +#ifdef UTF8 + g_free (exp_backup); +#endif /* UTF8 */ return p; + } } - if (once_only) + if (once_only) { +#ifdef UTF8 + g_free (exp_backup); +#endif /* UTF8 */ return -2; + } } } } +#ifdef UTF8 + g_free (exp_backup); +#endif /* UTF8 */ return -2; } @@ -1582,9 +1792,14 @@ while ((p = edit_find_string (p, exp, len, last_byte, get_byte, data, once_only, d)) >= 0) { if (replace_whole) { +#ifndef UTF8 /*If the bordering chars are not in option_whole_chars_search then word is whole */ if (!strcasechr (option_whole_chars_search, (*get_byte) (data, p - 1)) && !strcasechr (option_whole_chars_search, (*get_byte) (data, p + *len))) +#else /* UTF8 */ + if (!iswalnum((*get_byte) (data, p - 1)) + && !iswalnum((*get_byte) (data, p + *len))) +#endif /* UTF8 */ return p; if (once_only) return -2; @@ -1616,6 +1831,7 @@ #define is_digit(x) ((x) >= '0' && (x) <= '9') +#ifndef UTF8 #define snprint(v) { \ *p1++ = *p++; \ *p1 = '\0'; \ @@ -1623,33 +1839,48 @@ if (n >= (size_t) (e - s)) goto nospc; \ s += n; \ } +#else /* UTF8 */ +#define snprint(v) { \ + *p1++ = *p++; \ + *p1 = '\0'; \ + n = swprintf(s, e-s, q1,v); \ + if (n >= (size_t) (e - s)) goto nospc; \ + s += n; \ + } +#endif /* UTF8 */ /* this function uses the sprintf command to do a vprintf */ /* it takes pointers to arguments instead of the arguments themselves */ /* The return value is the number of bytes written excluding '\0' if successfull, -1 if the resulting string would be too long and -2 if the format string is errorneous. */ -static int snprintf_p (char *str, size_t size, const char *fmt,...) - __attribute__ ((format (printf, 3, 4))); - -static int snprintf_p (char *str, size_t size, const char *fmt,...) +static int snprintf_p (mc_wchar_t *str, size_t size, const mc_wchar_t *fmt,...) { va_list ap; size_t n; - const char *q, *p; - char *s = str, *e = str + size; - char q1[40]; - char *p1; + const mc_wchar_t *q, *p; + mc_wchar_t *s = str, *e = str + size; + mc_wchar_t q1[40]; + + mc_wchar_t *p1; int nargs = 0; va_start (ap, fmt); p = q = fmt; +#ifndef UTF8 while ((p = strchr (p, '%'))) { +#else /* UTF8 */ + while ((p = wcschr (p, L'%'))) { +#endif /* UTF8 */ n = p - q; if (n >= (size_t) (e - s)) goto nospc; +#ifndef UTF8 memcpy (s, q, n); /* copy stuff between format specifiers */ +#else /* UTF8 */ + wmemcpy (s, q, n); /* copy stuff between format specifiers */ +#endif /* UTF8 */ s += n; q = p; p1 = q1; @@ -1677,45 +1908,78 @@ *p1++ = *p++; if (*p == '*') { p++; +#ifndef UTF8 strcpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace field width with a number */ p1 += strlen (p1); +#else /* UTF8 */ + wcscpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace field width with a number */ + p1 += wcslen (p1); +#endif /* UTF8 */ } else { - while (is_digit (*p) && p1 < q1 + 20) +#ifndef UTF8 + while (is_digit (*p) +#else /* UTF8 */ + while (iswdigit (*p) +#endif /* UTF8 */ + && p1 < q1 + 20) *p1++ = *p++; - if (is_digit (*p)) +#ifndef UTF8 + if (is_digit (*p)) +#else /* UTF8 */ + if (iswdigit (*p)) +#endif /* UTF8 */ goto err; } if (*p == '.') *p1++ = *p++; if (*p == '*') { p++; +#ifndef UTF8 strcpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace precision with a number */ p1 += strlen (p1); +#else /* UTF8 */ + wcscpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace precision with a number */ + p1 += wcslen (p1); +#endif /* UTF8 */ } else { - while (is_digit (*p) && p1 < q1 + 32) +#ifndef UTF8 + while (is_digit (*p) +#else /* UTF8 */ + while (iswdigit (*p) +#endif /* UTF8 */ + && p1 < q1 + 32) *p1++ = *p++; - if (is_digit (*p)) +#ifndef UTF8 + if (is_digit (*p)) +#else /* UTF8 */ + if (iswdigit (*p)) +#endif /* UTF8 */ goto err; } /* flags done, now get argument */ if (*p == 's') { +#ifndef UTF8 snprint (va_arg (ap, char *)); +#else /* UTF8 */ + *p1++ = 'l'; + snprint (va_arg (ap, mc_wchar_t *)); +#endif /* UTF8 */ } else if (*p == 'h') { - if (strchr ("diouxX", *p)) + if (*p < 128 && strchr ("diouxX", *p)) snprint (*va_arg (ap, short *)); } else if (*p == 'l') { *p1++ = *p++; - if (strchr ("diouxX", *p)) + if (*p < 128 && strchr ("diouxX", *p)) snprint (*va_arg (ap, long *)); - } else if (strchr ("cdiouxX", *p)) { + } else if (*p < 128 && strchr ("cdiouxX", *p)) { snprint (*va_arg (ap, int *)); } else if (*p == 'L') { *p1++ = *p++; - if (strchr ("EefgG", *p)) + if (*p < 128 && strchr ("EefgG", *p)) snprint (*va_arg (ap, double *)); /* should be long double */ - } else if (strchr ("EefgG", *p)) { + } else if (*p < 128 && strchr ("EefgG", *p)) { snprint (*va_arg (ap, double *)); - } else if (strchr ("DOU", *p)) { + } else if (*p < 128 && strchr ("DOU", *p)) { snprint (*va_arg (ap, long *)); } else if (*p == 'p') { snprint (*va_arg (ap, void **)); @@ -1724,10 +1988,17 @@ q = p; } va_end (ap); +#ifndef UTF8 n = strlen (q); if (n >= (size_t) (e - s)) return -1; memcpy (s, q, n + 1); +#else /* UTF8 */ + n = wcslen (q); + if (n >= (size_t) (e - s)) + return -1; + wmemcpy (s, q, n + 1); +#endif /* UTF8 */ return s + n - str; nospc: va_end (ap); @@ -1902,8 +2173,11 @@ } } if (replace_yes) { /* delete then insert new */ +#ifdef UTF8 + mc_wchar_t *winput2 = mbstr_to_wchar(exp2); +#endif /* UTF8 */ if (replace_scanf || replace_regexp) { - char repl_str[MAX_REPL_LEN + 2]; + mc_wchar_t repl_str[MAX_REPL_LEN + 2]; int ret = 0; /* we need to fill in sargs just like with scanf */ @@ -1912,17 +2186,25 @@ for (k = 1; k < NUM_REPL_ARGS && pmatch[k].rm_eo >= 0; k++) { +#ifndef UTF8 unsigned char *t; +#else /* UTF8 */ + mc_wchar_t *t; +#endif if (pmatch[k].rm_eo - pmatch[k].rm_so > 255) { ret = -1; break; } +#ifndef UTF8 t = (unsigned char *) &sargs[k - 1][0]; +#else /* UTF8 */ + t = (mc_wchar_t *) &sargs[k - 1][0]; +#endif /* UTF8 */ for (j = 0; j < pmatch[k].rm_eo - pmatch[k].rm_so && j < 255; j++, t++) - *t = (unsigned char) edit_get_byte (edit, + *t = edit_get_byte (edit, edit-> search_start - @@ -1939,13 +2221,22 @@ sargs[k - 1][0] = 0; } if (!ret) +#ifndef UTF8 ret = snprintf_p (repl_str, MAX_REPL_LEN + 2, exp2, PRINTF_ARGS); +#else /* UTF8 */ + ret = snprintf_p (repl_str, MAX_REPL_LEN + 2, winput2, PRINTF_ARGS); +#endif /* UTF8 */ if (ret >= 0) { times_replaced++; while (i--) edit_delete (edit); +#ifndef UTF8 while (repl_str[++i]) edit_insert (edit, repl_str[i]); +#else /* UTF8 */ + while (winput2[++i]) + edit_insert (edit, winput2[i]); +#endif /* UTF8 */ } else { edit_error_dialog (_(" Replace "), ret == -2 @@ -1957,10 +2248,18 @@ times_replaced++; while (i--) edit_delete (edit); +#ifndef UTF8 while (exp2[++i]) edit_insert (edit, exp2[i]); +#else /* UTF8 */ + while (winput2[++i]) + edit_insert (edit, winput2[i]); +#endif } edit->found_len = i; +#ifdef UTF8 + g_free (winput2); +#endif /* UTF8 */ } /* so that we don't find the same string again */ if (replace_backwards) { @@ -2132,16 +2431,17 @@ #define TEMP_BUF_LEN 1024 /* Return a null terminated length of text. Result must be g_free'd */ -static unsigned char * +static mc_wchar_t * edit_get_block (WEdit *edit, long start, long finish, int *l) { - unsigned char *s, *r; - r = s = g_malloc (finish - start + 1); + mc_wchar_t *s, *r; + r = s = g_malloc ((finish - start + 1) * sizeof(mc_wchar_t)); if (column_highlighting) { *l = 0; /* copy from buffer, excluding chars that are out of the column 'margins' */ while (start < finish) { - int c, x; + mc_wchar_t c; + int x; x = edit_move_forward3 (edit, edit_bol (edit, start), 0, start); c = edit_get_byte (edit, start); @@ -2174,11 +2474,15 @@ return 0; if (column_highlighting) { - unsigned char *block, *p; + mc_wchar_t *block, *p; int r; p = block = edit_get_block (edit, start, finish, &len); while (len) { +#ifndef UTF8 r = mc_write (file, p, len); +#else /* UTF8 */ + r = wchar_write (file, p, len); +#endif /* UTF8 */ if (r < 0) break; p += r; @@ -2186,15 +2490,19 @@ } g_free (block); } else { - unsigned char *buf; + mc_wchar_t *buf; int i = start, end; len = finish - start; - buf = g_malloc (TEMP_BUF_LEN); + buf = g_malloc (TEMP_BUF_LEN * sizeof(mc_wchar_t)); while (start != finish) { end = min (finish, start + TEMP_BUF_LEN); for (; i < end; i++) buf[i - start] = edit_get_byte (edit, i); +#ifndef UTF8 len -= mc_write (file, (char *) buf, end - start); +#else /* UTF8 */ + len -= wchar_write (file, buf, end - start); +#endif /* UTF8 */ start = end; } g_free (buf); @@ -2531,17 +2839,20 @@ /* prints at the cursor */ /* returns the number of chars printed */ +#ifndef UTF8 int edit_print_string (WEdit * e, const char *s) +#else /* UTF8 */ +int edit_print_wstring (WEdit * e, mc_wchar_t *s) +#endif /* UTF8 */ { int i = 0; while (s[i]) - edit_execute_cmd (e, -1, (unsigned char) s[i++]); + edit_execute_cmd (e, -1, s[i++]); e->force |= REDRAW_COMPLETELY; edit_update_screen (e); return i; } - static void pipe_mail (WEdit *edit, char *to, char *subject, char *cc) { FILE *p = 0; @@ -2635,15 +2946,20 @@ /* find first character of current word */ static int edit_find_word_start (WEdit *edit, long *word_start, int *word_len) { - int i, c, last; + int i; + mc_wint_t c, last; /* return if at begin of file */ if (edit->curs1 <= 0) return 0; - c = (unsigned char) edit_get_byte (edit, edit->curs1 - 1); + c = edit_get_byte (edit, edit->curs1 - 1); /* return if not at end or in word */ +#ifndef UTF8 if (isspace (c) || !(isalnum (c) || c == '_')) +#else /* UTF8 */ + if (iswspace (c) || !(iswalnum (c) || c == '_')) +#endif /* UTF8 */ return 0; /* search start of word to be completed */ @@ -2653,11 +2969,19 @@ return 0; last = c; - c = (unsigned char) edit_get_byte (edit, edit->curs1 - i); + c = edit_get_byte (edit, edit->curs1 - i); +#ifndef UTF8 if (!(isalnum (c) || c == '_')) { +#else /* UTF8 */ + if (!(iswalnum (c) || c == '_')) { +#endif /* UTF8 */ /* return if word starts with digit */ +#ifndef UTF8 if (isdigit (last)) +#else /* UTF8 */ + if (iswdigit (last)) +#endif /* UTF8 */ return 0; *word_start = edit->curs1 - (i - 1); /* start found */ @@ -2690,7 +3014,7 @@ int *num) { int len, max_len = 0, i, skip; - char *bufpos; + mc_wchar_t *bufpos; /* collect max MAX_WORD_COMPLETIONS completions */ while (*num < MAX_WORD_COMPLETIONS) { @@ -2711,9 +3035,16 @@ buffers1[start >> S_EDIT_BUF_SIZE][start & M_EDIT_BUF_SIZE]; skip = 0; for (i = 0; i < *num; i++) { +#ifndef UTF8 if (strncmp (&compl[i].text[word_len], &bufpos[word_len], - max (len, compl[i].len) - word_len) == 0) { + max (len, +#else /* UTF8 */ + if (wcsncmp + ((wchar_t *) &compl[i].text[word_len], + (wchar_t *) &bufpos[word_len], max (len, +#endif /* UTF8 */ + compl[i].len) - word_len) == 0) { skip = 1; break; /* skip it, already added */ } @@ -2721,7 +3052,7 @@ if (skip) continue; - compl[*num].text = g_malloc (len + 1); + compl[*num].text = g_malloc ((len + 1) * sizeof(mc_wchar_t)); compl[*num].len = len; for (i = 0; i < len; i++) compl[*num].text[i] = *(bufpos + i); @@ -2735,6 +3066,18 @@ return max_len; } +#ifdef UTF8 +int edit_print_string (WEdit * e, const char *s) +{ + int i; + mc_wchar_t *ws = mbstr_to_wchar(s); + i = edit_print_wstring (e, ws); + g_free(ws); + return i; +} + +#endif /* UTF8 */ + /* let the user select its preferred completion */ static void @@ -2747,6 +3090,10 @@ WListbox *compl_list; int compl_dlg_h; /* completion dialog height */ int compl_dlg_w; /* completion dialog width */ +#ifdef UTF8 + char *mbtext; +#endif /* UTF8 */ + /* calculate the dialog metrics */ compl_dlg_h = num_compl + 2; @@ -2782,8 +3129,16 @@ add_widget (compl_dlg, compl_list); /* fill the listbox with the completions */ +#ifndef UTF8 for (i = 0; i < num_compl; i++) listbox_add_item (compl_list, 0, 0, compl[i].text, NULL); +#else /* UTF8 */ + for (i = 0; i < num_compl; i++) { + mbtext = wchar_to_mbstr(compl[i].text); + listbox_add_item (compl_list, 0, 0, mbtext, NULL); + g_free(mbtext); + } +#endif /* UTF8 */ /* pop up the dialog */ run_dlg (compl_dlg); @@ -2791,9 +3146,17 @@ /* apply the choosen completion */ if (compl_dlg->ret_value == B_ENTER) { listbox_get_current (compl_list, &curr, NULL); - if (curr) + if (curr){ +#ifndef UTF8 for (curr += word_len; *curr; curr++) edit_insert (edit, *curr); +#else /* UTF8 */ + mc_wchar_t *wc, *wccurr = mbstr_to_wchar(curr); + for (wc = wccurr + word_len; *wc; wc++) + edit_insert (edit, *wc); + g_free(wccurr); +#endif /* UTF8 */ + } } /* destroy dialog before return */ @@ -2810,8 +3173,9 @@ { int word_len = 0, i, num_compl = 0, max_len; long word_start = 0; - char *bufpos; - char *match_expr; + mc_wchar_t *bufpos; + mc_wchar_t *match_expr; + char *mbmatch_expr; struct selection compl[MAX_WORD_COMPLETIONS]; /* completions */ /* don't want to disturb another search */ @@ -2828,16 +3192,32 @@ /* prepare match expression */ bufpos = &edit->buffers1[word_start >> S_EDIT_BUF_SIZE] [word_start & M_EDIT_BUF_SIZE]; + + match_expr = g_malloc((word_len + 14) * sizeof(mc_wchar_t)); +#ifndef UTF8 match_expr = g_strdup_printf ("%.*s[a-zA-Z_0-9]+", word_len, bufpos); +#else /* UTF8 */ + wcsncpy (match_expr, bufpos, word_len); + match_expr[word_len] = '\0'; + wcscat (match_expr, L"[a-zA-Z_0-9]+"); +#endif /* UTF8 */ /* init search: backward, regexp, whole word, case sensitive */ edit_set_search_parameters (0, 1, 1, 1, 1); /* collect the possible completions */ /* start search from curs1 down to begin of file */ +#ifndef UTF8 max_len = edit_collect_completions (edit, word_start, word_len, match_expr, (struct selection *) &compl, &num_compl); +#else /* UTF8 */ + mbmatch_expr = wchar_to_mbstr(match_expr); + max_len = + edit_collect_completions (edit, word_start, word_len, mbmatch_expr, + (struct selection *) &compl, &num_compl); + g_free(mbmatch_expr); +#endif /* UTF8 */ if (num_compl > 0) { /* insert completed word if there is only one match */ diff -ruN mc-4.6.1.orig/edit/editdraw.c mc-4.6.1/edit/editdraw.c --- mc-4.6.1.orig/edit/editdraw.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/edit/editdraw.c 2008-12-26 03:29:15.000000000 +0100 @@ -48,7 +48,7 @@ static void status_string (WEdit * edit, char *s, int w) { - char byte_str[16]; + char byte_str[32]; /* * If we are at the end of file, print , @@ -56,11 +56,16 @@ * as decimal and as hex. */ if (edit->curs1 < edit->last_byte) { - unsigned char cur_byte = edit_get_byte (edit, edit->curs1); + mc_wchar_t cur_byte = edit_get_byte (edit, edit->curs1); +#ifndef UTF8 g_snprintf (byte_str, sizeof (byte_str), "%c %3d 0x%02X", is_printable (cur_byte) ? cur_byte : '.', - (int) cur_byte, - (unsigned) cur_byte); +#else /* UTF8 */ + g_snprintf (byte_str, sizeof(byte_str), "%lc %3d 0x%02X", + iswprint(cur_byte) ? cur_byte : '.', +#endif /* UTF8 */ + (int) cur_byte, + (unsigned) cur_byte); } else { strcpy (byte_str, ""); } @@ -183,11 +188,16 @@ #define lowlevel_set_color(x) attrset(MY_COLOR_PAIR(color)) #endif +struct line_s { + mc_wchar_t ch; + unsigned int style; +}; + static void print_to_widget (WEdit *edit, long row, int start_col, int start_col_real, - long end_col, unsigned int line[]) + long end_col, struct line_s line[]) { - unsigned int *p; + struct line_s *p; int x = start_col_real + EDIT_TEXT_HORIZONTAL_OFFSET; int x1 = start_col + EDIT_TEXT_HORIZONTAL_OFFSET; @@ -201,9 +211,9 @@ edit_move (x1 + FONT_OFFSET_X, y + FONT_OFFSET_Y); p = line; - while (*p) { + while (p->ch) { int style; - int textchar; + mc_wchar_t textchar; int color; if (cols_to_skip) { @@ -212,9 +222,9 @@ continue; } - style = *p & 0xFF00; - textchar = *p & 0xFF; - color = *p >> 16; + style = p->style & 0xFF00; + textchar = p->ch; + color = p->style >> 16; if (style & MOD_ABNORMAL) { /* Non-printable - use black background */ @@ -228,8 +238,11 @@ } else { lowlevel_set_color (color); } - +#ifdef UTF8 + SLsmg_write_char(textchar); +#else addch (textchar); +#endif p++; } } @@ -239,11 +252,11 @@ edit_draw_this_line (WEdit *edit, long b, long row, long start_col, long end_col) { - static unsigned int line[MAX_LINE_LEN]; - unsigned int *p = line; + struct line_s line[MAX_LINE_LEN]; + struct line_s *p = line; long m1 = 0, m2 = 0, q, c1, c2; int col, start_col_real; - unsigned int c; + mc_wint_t c; int color; int i, book_mark = -1; @@ -265,66 +278,96 @@ if (row <= edit->total_lines - edit->start_line) { while (col <= end_col - edit->start_col) { - *p = 0; + p->ch = 0; + p->style = 0; if (q == edit->curs1) - *p |= MOD_CURSOR; + p->style |= MOD_CURSOR; if (q >= m1 && q < m2) { if (column_highlighting) { int x; x = edit_move_forward3 (edit, b, 0, q); if (x >= c1 && x < c2) - *p |= MOD_MARKED; + p->style |= MOD_MARKED; } else - *p |= MOD_MARKED; + p->style |= MOD_MARKED; } if (q == edit->bracket) - *p |= MOD_BOLD; + p->style |= MOD_BOLD; if (q >= edit->found_start && q < edit->found_start + edit->found_len) - *p |= MOD_BOLD; + p->style |= MOD_BOLD; c = edit_get_byte (edit, q); /* we don't use bg for mc - fg contains both */ if (book_mark == -1) { edit_get_syntax_color (edit, q, &color); - *p |= color << 16; + p->style |= color << 16; } else { - *p |= book_mark << 16; + p->style |= book_mark << 16; } q++; switch (c) { case '\n': col = end_col - edit->start_col + 1; /* quit */ - *(p++) |= ' '; + p->ch = ' '; + p++; break; case '\t': i = TAB_SIZE - ((int) col % TAB_SIZE); - *p |= ' '; - c = *(p++) & ~MOD_CURSOR; + p->ch = ' '; + c = p->style & ~MOD_CURSOR; + p++; col += i; - while (--i) - *(p++) = c; + while (--i) { + p->ch = ' '; p->style = c; + p++; + } break; default: c = convert_to_display_c (c); /* Caret notation for control characters */ if (c < 32) { - *(p++) = '^' | MOD_ABNORMAL; - *(p++) = (c + 0x40) | MOD_ABNORMAL; + p->ch = '^'; + p->style = MOD_ABNORMAL; + p++; + p->ch = c + 0x40; + p->style = MOD_ABNORMAL; col += 2; break; } if (c == 127) { - *(p++) = '^' | MOD_ABNORMAL; - *(p++) = '?' | MOD_ABNORMAL; + p->ch = '^'; + p->style = MOD_ABNORMAL; + p++; + p->ch = '?'; + p->style = MOD_ABNORMAL; + p++; col += 2; break; } - if (is_printable (c)) { - *(p++) |= c; +#ifndef UTF8 + if (is_printable (c) +#else /* UTF8 */ + if (iswprint (c) +#ifdef __STDC_ISO_10646__ + && (c < BINARY_CHAR_OFFSET || c >= (BINARY_CHAR_OFFSET + 256)) +#endif +#endif /* UTF8 */ + ) { + p->ch = c; + p++; + +#ifdef UTF8 + i = wcwidth(c); + if (i > 1) { + col += i - 1; + } +#endif /* UTF8 */ } else { - *(p++) = '.' | MOD_ABNORMAL; + p->ch = '.'; + p->style = MOD_ABNORMAL; + p++; } col++; break; @@ -334,7 +377,7 @@ } else { start_col_real = start_col = 0; } - *p = 0; + p->ch = 0; print_to_widget (edit, row, start_col, start_col_real, end_col, line); } diff -ruN mc-4.6.1.orig/edit/editkeys.c mc-4.6.1/edit/editkeys.c --- mc-4.6.1.orig/edit/editkeys.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/edit/editkeys.c 2008-12-26 03:29:15.000000000 +0100 @@ -162,10 +162,10 @@ * 'command' is one of the editor commands from editcmddef.h. */ int -edit_translate_key (WEdit *edit, long x_key, int *cmd, int *ch) +edit_translate_key (WEdit *edit, long x_key, int *cmd, mc_wint_t *ch) { int command = CK_Insert_Char; - int char_for_insertion = -1; + mc_wint_t char_for_insertion = -1; int i = 0; static const long *key_map; @@ -242,9 +242,30 @@ /* an ordinary insertable character */ if (x_key < 256) { int c = convert_from_input_c (x_key); - +#ifdef UTF8 + mbstate_t mbs; + int res; + mc_wchar_t wc; + + memset (&mbs, 0, sizeof (mbs)); + + if (edit->charpoint >= MB_CUR_MAX) edit->charpoint = 0; + + edit->charbuf[edit->charpoint++] = c; + + res = mbrtowc(&wc, (char *)edit->charbuf, edit->charpoint, &mbs); + if (res < 0) { + if (res != -2) edit->charpoint = 0; /* broken multibyte char, skip */ + return 0; + } + edit->charpoint = 0; + + if (iswprint (wc)) { + char_for_insertion = wc; +#else if (is_printable (c)) { char_for_insertion = c; +#endif /* UTF8 */ goto fin; } } @@ -285,7 +306,7 @@ *cmd = command; *ch = char_for_insertion; - if (command == CK_Insert_Char && char_for_insertion == -1) { + if (command == CK_Insert_Char && char_for_insertion == (mc_wint_t)-1) { /* unchanged, key has no function here */ return 0; } diff -ruN mc-4.6.1.orig/edit/editwidget.c mc-4.6.1/edit/editwidget.c --- mc-4.6.1.orig/edit/editwidget.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/edit/editwidget.c 2008-12-26 03:29:15.000000000 +0100 @@ -337,7 +337,8 @@ case WIDGET_KEY: { - int cmd, ch; + int cmd; + mc_wint_t ch; /* first check alt-f, alt-e, alt-s, etc for drop menus */ if (edit_drop_hotkey_menu (e, parm)) diff -ruN mc-4.6.1.orig/edit/wordproc.c mc-4.6.1/edit/wordproc.c --- mc-4.6.1.orig/edit/wordproc.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/edit/wordproc.c 2008-12-26 03:29:15.000000000 +0100 @@ -24,7 +24,12 @@ #define tab_width option_tab_spacing +#ifndef UTF8 #define NO_FORMAT_CHARS_START "-+*\\,.;:&>" +#else /* UTF8 */ +#define NO_FORMAT_CHARS_START L"-+*\\,.;:&>" +#endif /* UTF8 */ + #define FONT_MEAN_WIDTH 1 static long @@ -41,14 +46,21 @@ p = edit_move_forward (edit, p, line - l, 0); p = edit_bol (edit, p); + +#ifndef UTF8 while (strchr ("\t ", edit_get_byte (edit, p))) +#else /* UTF8 */ + while (wcschr (L"\t ", edit_get_byte (edit, p))) +#endif /* UTF8 */ + p++; return p; } static int bad_line_start (WEdit * edit, long p) { - int c; + mc_wint_t c; + c = edit_get_byte (edit, p); if (c == '.') { /* `...' is acceptable */ if (edit_get_byte (edit, p + 1) == '.') @@ -62,7 +74,13 @@ return 0; /* `---' is acceptable */ return 1; } + +#ifndef UTF8 if (strchr (NO_FORMAT_CHARS_START, c)) +#else /* UTF8 */ + if (wcschr (NO_FORMAT_CHARS_START, c)) +#endif /* UTF8 */ + return 1; return 0; } @@ -115,33 +133,37 @@ i - edit->curs_line, 0)); } -static unsigned char * +static mc_wchar_t * get_paragraph (WEdit *edit, long p, long q, int indent, int *size) { - unsigned char *s, *t; + mc_wchar_t *s, *t; #if 0 - t = g_malloc ((q - p) + 2 * (q - p) / option_word_wrap_line_length + - 10); + t = g_malloc (((q - p) + 2 * (q - p) / option_word_wrap_line_length + + 10) * sizeof(mc_wchar_t)); #else - t = g_malloc (2 * (q - p) + 100); + t = g_malloc ((2 * (q - p) + 100) * sizeof(mc_wchar_t)); #endif if (!t) return 0; for (s = t; p < q; p++, s++) { if (indent) if (edit_get_byte (edit, p - 1) == '\n') +#ifndef UTF8 while (strchr ("\t ", edit_get_byte (edit, p))) +#else /* UTF8 */ + while (wcschr (L"\t ", edit_get_byte (edit, p))) +#endif /* UTF8 */ p++; *s = edit_get_byte (edit, p); } - *size = (unsigned long) s - (unsigned long) t; + *size = s - t; t[*size] = '\n'; return t; } -static void strip_newlines (unsigned char *t, int size) +static void strip_newlines (mc_wchar_t *t, int size) { - unsigned char *p = t; + mc_wchar_t *p = t; while (size--) { *p = *p == '\n' ? ' ' : *p; p++; @@ -158,7 +180,7 @@ { return x += tab_width - x % tab_width; } -static int line_pixel_length (unsigned char *t, long b, int l) +static int line_pixel_length (mc_wchar_t *t, long b, int l) { int x = 0, c, xn = 0; for (;;) { @@ -182,7 +204,7 @@ } /* find the start of a word */ -static int next_word_start (unsigned char *t, int q, int size) +static int next_word_start (mc_wchar_t *t, int q, int size) { int i; for (i = q;; i++) { @@ -203,7 +225,7 @@ } /* find the start of a word */ -static int word_start (unsigned char *t, int q, int size) +static int word_start (mc_wchar_t *t, int q, int size) { int i = q; if (t[q] == ' ' || t[q] == '\t') @@ -222,7 +244,7 @@ } /* replaces ' ' with '\n' to properly format a paragraph */ -static void format_this (unsigned char *t, int size, int indent) +static void format_this (mc_wchar_t *t, int size, int indent) { int q = 0, ww; strip_newlines (t, size); @@ -250,7 +272,7 @@ } } -static void replace_at (WEdit * edit, long q, int c) +static void replace_at (WEdit * edit, long q, mc_wint_t c) { edit_cursor_move (edit, q - edit->curs1); edit_delete (edit); @@ -258,18 +280,27 @@ } /* replaces a block of text */ -static void put_paragraph (WEdit * edit, unsigned char *t, long p, long q, int indent, int size) +static void put_paragraph (WEdit * edit, mc_wchar_t *t, long p, long q, int indent, int size) { long cursor; - int i, c = 0; + int i; + mc_wchar_t c = 0; cursor = edit->curs1; if (indent) +#ifndef UTF8 while (strchr ("\t ", edit_get_byte (edit, p))) +#else /* UTF8 */ + while (wcschr (L"\t ", edit_get_byte (edit, p))) +#endif /* UTF8 */ p++; for (i = 0; i < size; i++, p++) { if (i && indent) { if (t[i - 1] == '\n' && c == '\n') { +#ifndef UTF8 while (strchr ("\t ", edit_get_byte (edit, p))) +#else /* UTF8 */ + while (wcschr (L"\t ", edit_get_byte (edit, p))) +#endif /* UTF8 */ p++; } else if (t[i - 1] == '\n') { long curs; @@ -281,7 +312,11 @@ p = edit->curs1; } else if (c == '\n') { edit_cursor_move (edit, p - edit->curs1); +#ifndef UTF8 while (strchr ("\t ", edit_get_byte (edit, p))) { +#else /* UTF8 */ + while (wcschr (L"\t ", edit_get_byte (edit, p))) { +#endif /* UTF8 */ edit_delete (edit); if (cursor > edit->curs1) cursor--; @@ -314,7 +349,7 @@ { long p, q; int size; - unsigned char *t; + mc_wchar_t *t; int indent = 0; if (option_word_wrap_line_length < 2) return; @@ -324,17 +359,25 @@ q = end_paragraph (edit, force); indent = test_indent (edit, p, q); t = get_paragraph (edit, p, q, indent, &size); - if (!t) + if (!t) return; if (!force) { int i; +#ifndef UTF8 if (strchr (NO_FORMAT_CHARS_START, *t)) { +#else /* UTF8 */ + if (wcschr (NO_FORMAT_CHARS_START, *t)) { +#endif /* UTF8 */ g_free (t); return; } for (i = 0; i < size - 1; i++) { if (t[i] == '\n') { +#ifndef UTF8 if (strchr (NO_FORMAT_CHARS_START "\t ", t[i + 1])) { +#else /* UTF8 */ + if (wcschr (NO_FORMAT_CHARS_START "\t", t[i + 1])) { +#endif /* UTF8 */ g_free (t); return; } diff -ruN mc-4.6.1.orig/src/achown.c mc-4.6.1/src/achown.c --- mc-4.6.1.orig/src/achown.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/achown.c 2008-12-26 03:29:15.000000000 +0100 @@ -583,6 +583,12 @@ b_att[2] = button_new (XTRACT (6)); b_user = button_new (XTRACT (5)); b_group = button_new (XTRACT (4)); +#ifdef UTF8 + if (SLsmg_Is_Unicode) { + b_user->text = g_realloc (b_user->text, MB_CUR_MAX * 15 + 1); + b_group->text = g_realloc (b_group->text, MB_CUR_MAX * 15 + 1); + } +#endif add_widget (ch_dlg, b_group); add_widget (ch_dlg, b_user); diff -ruN mc-4.6.1.orig/src/boxes.c mc-4.6.1/src/boxes.c --- mc-4.6.1.orig/src/boxes.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/boxes.c 2008-12-26 03:29:15.000000000 +0100 @@ -150,23 +150,23 @@ display_title = _(display_title); for (i = 0; i < LIST_TYPES; i++) { displays[i] = _(displays[i]); - if ((l = strlen (displays[i])) > maxlen) + if ((l = mbstrlen (displays[i])) > maxlen) maxlen = l; } - i = strlen (ok_button) + 5; - l = strlen (cancel_button) + 3; + i = mbstrlen (ok_button) + 5; + l = mbstrlen (cancel_button) + 3; l = max (i, l); i = maxlen + l + 16; if (i > DISPLAY_X) DISPLAY_X = i; - i = strlen (user_mini_status) + 13; + i = mbstrlen (user_mini_status) + 13; if (i > DISPLAY_X) DISPLAY_X = i; - i = strlen (display_title) + 10; + i = mbstrlen (display_title) + 10; if (i > DISPLAY_X) DISPLAY_X = i; @@ -285,20 +285,20 @@ int maxlen = 0; for (i = SORT_TYPES - 1; i >= 0; i--) { sort_orders_names[i] = _(sort_orders[i].sort_name); - r = strlen (sort_orders_names[i]); + r = mbstrlen (sort_orders_names[i]); if (r > maxlen) maxlen = r; } check_pos = maxlen + 9; - r = strlen (reverse_label) + 4; - i = strlen (case_label) + 4; + r = mbstrlen (reverse_label) + 4; + i = mbstrlen (case_label) + 4; if (i > r) r = i; - l = strlen (ok_button) + 6; - i = strlen (cancel_button) + 4; + l = mbstrlen (ok_button) + 6; + i = mbstrlen (cancel_button) + 4; if (i > l) l = i; @@ -307,7 +307,7 @@ if (i > SORT_X) SORT_X = i; - i = strlen (sort_title) + 6; + i = mbstrlen (sort_title) + 6; if (i > SORT_X) SORT_X = i; @@ -402,7 +402,7 @@ while (i--) { conf_widgets [i].text = _(conf_widgets [i].text); - l1 = strlen (conf_widgets [i].text) + 3; + l1 = mbstrlen (conf_widgets [i].text) + 3; if (l1 > maxlen) maxlen = l1; } @@ -417,8 +417,8 @@ * And this for the case when buttons with some space to the right * do not fit within 2/6 */ - l1 = strlen (conf_widgets [0].text) + 3; - i = strlen (conf_widgets [1].text) + 5; + l1 = mbstrlen (conf_widgets [0].text) + 3; + i = mbstrlen (conf_widgets [1].text) + 5; if (i > l1) l1 = i; @@ -489,11 +489,11 @@ { display_widgets [i].text = _(display_widgets[i].text); display_bits_str [i] = _(display_bits_str [i]); - l1 = strlen (display_bits_str [i]); + l1 = mbstrlen (display_bits_str [i]); if (l1 > maxlen) maxlen = l1; } - l1 = strlen (display_widgets [2].text); + l1 = mbstrlen (display_widgets [2].text); if (l1 > maxlen) maxlen = l1; @@ -501,8 +501,8 @@ display_bits.xlen = (maxlen + 5) * 6 / 4; /* See above confirm_box */ - l1 = strlen (display_widgets [0].text) + 3; - i = strlen (display_widgets [1].text) + 5; + l1 = mbstrlen (display_widgets [0].text) + 3; + i = mbstrlen (display_widgets [1].text) + 5; if (i > l1) l1 = i; @@ -597,7 +597,7 @@ cpname = _("&Select"); add_widget (dbits_dlg, - button_new (4, DISPX - 8 - strlen (cpname), B_USER, + button_new (4, DISPX - 8 - mbstrlen (cpname), B_USER, NORMAL_BUTTON, cpname, sel_charset_button)); return dbits_dlg; @@ -803,7 +803,7 @@ quick_widgets [1].y_divisions = quick_widgets [0].y_divisions = Quick_input.ylen = 5; - len = strlen (quick_widgets [1].text); + len = mbstrlen (quick_widgets [1].text); quick_widgets [0].relative_x = quick_widgets [1].relative_x + len + 1; @@ -962,7 +962,7 @@ { job_buttons [i].name = _(job_buttons [i].name); - len = strlen (job_buttons [i].name) + 4; + len = mbstrlen (job_buttons [i].name) + 4; JOBS_X = max (JOBS_X, startx + len + 3); job_buttons [i].xpos = startx; @@ -971,7 +971,7 @@ /* Last button - Ok a.k.a. Cancel :) */ job_buttons [n_buttons - 1].xpos = - JOBS_X - strlen (job_buttons [n_buttons - 1].name) - 7; + JOBS_X - mbstrlen (job_buttons [n_buttons - 1].name) - 7; i18n_flag = 1; } @@ -1029,7 +1029,7 @@ while (i--) { - l1 = strlen (labs [i] = _(labs [i])); + l1 = mbstrlen (labs [i] = _(labs [i])); if (l1 > maxlen) maxlen = l1; } @@ -1039,7 +1039,7 @@ for (i = sizeof(buts)/sizeof(buts[0]), l1 = 0; i--; ) { - l1 += strlen (buts [i] = _(buts [i])); + l1 += mbstrlen (buts [i] = _(buts [i])); } l1 += 15; if (l1 > dialog_x) @@ -1048,7 +1048,7 @@ ilen = dialog_x - 7 - maxlen; /* for the case of very long buttons :) */ istart = dialog_x - 3 - ilen; - b2 = dialog_x - (strlen(buts[1]) + 6); + b2 = dialog_x - (mbstrlen(buts[1]) + 6); i18n_flag = 1; } diff -ruN mc-4.6.1.orig/src/dialog.c mc-4.6.1/src/dialog.c --- mc-4.6.1.orig/src/dialog.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/dialog.c 2008-12-26 03:29:15.000000000 +0100 @@ -162,7 +162,7 @@ if (h->title) { attrset (HOT_NORMALC); - dlg_move (h, space, (h->cols - strlen (h->title)) / 2); + dlg_move (h, space, (h->cols - mbstrlen (h->title)) / 2); addstr (h->title); } } diff -ruN mc-4.6.1.orig/src/file.c mc-4.6.1/src/file.c --- mc-4.6.1.orig/src/file.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/file.c 2008-12-26 03:29:15.000000000 +0100 @@ -165,15 +165,20 @@ do_transform_source (FileOpContext *ctx, const unsigned char *source) { size_t j, k, l, len; - unsigned const char *fnsource = x_basename (source); + unsigned const char *fnsource = g_strdup (x_basename (source)); int next_reg; enum CaseConvs case_conv = NO_CONV; static unsigned char fntarget[MC_MAXPATHLEN]; +#ifdef UTF8 + fix_utf8(fnsource); +#endif + len = strlen (fnsource); j = re_match (&ctx->rx, fnsource, len, 0, &ctx->regs); if (j != len) { transform_error = FILE_SKIP; + g_free(fnsource); return NULL; } for (next_reg = 1, j = 0, k = 0; j < strlen (ctx->dest_mask); j++) { @@ -217,6 +222,7 @@ || ctx->regs.start[next_reg] < 0) { message (1, MSG_ERROR, _(" Invalid target mask ")); transform_error = FILE_ABORT; + g_free(fnsource); return NULL; } for (l = (size_t) ctx->regs.start[next_reg]; @@ -231,6 +237,7 @@ } } fntarget[k] = 0; + g_free(fnsource); return fntarget; } diff -ruN mc-4.6.1.orig/src/filegui.c mc-4.6.1/src/filegui.c --- mc-4.6.1.orig/src/filegui.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/filegui.c 2008-12-26 03:29:15.000000000 +0100 @@ -69,6 +69,7 @@ #include "filegui.h" #include "key.h" /* get_event */ #include "util.h" /* strip_password() */ +#include "tty.h" /* }}} */ @@ -564,8 +565,8 @@ * longest of "Overwrite..." labels * (assume "Target date..." are short enough) */ - l1 = max (strlen (rd_widgets[6].text), - strlen (rd_widgets[11].text)); + l1 = max (mbstrlen (rd_widgets[6].text), + mbstrlen (rd_widgets[11].text)); /* longest of button rows */ i = sizeof (rd_widgets) / sizeof (rd_widgets[0]); @@ -576,7 +577,7 @@ l2 = max (l2, l); l = 0; } - l += strlen (rd_widgets[i].text) + 4; + l += mbstrlen (rd_widgets[i].text) + 4; } } l2 = max (l2, l); /* last row */ @@ -594,12 +595,12 @@ l = l1; } rd_widgets[i].xpos = l; - l += strlen (rd_widgets[i].text) + 4; + l += mbstrlen (rd_widgets[i].text) + 4; } } /* Abort button is centered */ rd_widgets[1].xpos = - (rd_xlen - strlen (rd_widgets[1].text) - 3) / 2; + (rd_xlen - mbstrlen (rd_widgets[1].text) - 3) / 2; } #endif /* ENABLE_NLS */ @@ -618,7 +619,7 @@ ADD_RD_LABEL (ui, 0, name_trunc (ui->replace_filename, - rd_trunc - strlen (rd_widgets[0].text)), 0); + rd_trunc - mbstrlen (rd_widgets[0].text)), 0); ADD_RD_BUTTON (1); ADD_RD_BUTTON (2); @@ -805,36 +806,36 @@ if (fmd_widgets[i].text[0] != '\0') fmd_widgets[i].text = _(fmd_widgets[i].text); - len = strlen (fmd_widgets[FMCB11].text) - + strlen (fmd_widgets[FMCB21].text) + 15; + len = mbstrlen (fmd_widgets[FMCB11].text) + + mbstrlen (fmd_widgets[FMCB21].text) + 15; fmd_xlen = max (fmd_xlen, len); - len = strlen (fmd_widgets[FMCB12].text) - + strlen (fmd_widgets[FMCB22].text) + 15; + len = mbstrlen (fmd_widgets[FMCB12].text) + + mbstrlen (fmd_widgets[FMCB22].text) + 15; fmd_xlen = max (fmd_xlen, len); - len = strlen (fmd_widgets[FMBRGT].text) - + strlen (fmd_widgets[FMBLFT].text) + 11; + len = mbstrlen (fmd_widgets[FMBRGT].text) + + mbstrlen (fmd_widgets[FMBLFT].text) + 11; #ifdef FMBMID - len += strlen (fmd_widgets[FMBMID].text) + 6; + len += mbstrlen (fmd_widgets[FMBMID].text) + 6; #endif fmd_xlen = max (fmd_xlen, len + 4); len = (fmd_xlen - (len + 6)) / 2; i = fmd_widgets[FMBLFT].relative_x = len + 3; - i += strlen (fmd_widgets[FMBLFT].text) + 8; + i += mbstrlen (fmd_widgets[FMBLFT].text) + 8; #ifdef FMBMID fmd_widgets[FMBMID].relative_x = i; - i += strlen (fmd_widgets[FMBMID].text) + 6; + i += mbstrlen (fmd_widgets[FMBMID].text) + 6; #endif fmd_widgets[FMBRGT].relative_x = i; #define chkbox_xpos(i) \ - fmd_widgets [i].relative_x = fmd_xlen - strlen (fmd_widgets [i].text) - 6 + fmd_widgets [i].relative_x = fmd_xlen - mbstrlen (fmd_widgets [i].text) - 6 chkbox_xpos (FMCB0); chkbox_xpos (FMCB21); @@ -856,7 +857,7 @@ char * file_mask_dialog (FileOpContext *ctx, FileOperation operation, const char *text, - const char *def_text, int only_one, int *do_background) + const char *def_text_orig, int only_one, int *do_background) { int source_easy_patterns = easy_patterns; char *source_mask, *orig_mask, *dest_dir, *tmpdest; @@ -865,12 +866,20 @@ struct stat buf; int val; QuickDialog Quick_input; - + char *def_text; g_return_val_if_fail (ctx != NULL, NULL); + + def_text = g_strdup(def_text_orig); + #if 0 message (1, __FUNCTION__, "text = `%s' \n def_text = `%s'", text, def_text); #endif + +#ifdef UTF8 + fix_utf8(def_text); +#endif + fmd_init_i18n (FALSE); /* Set up the result pointers */ @@ -929,6 +938,7 @@ orig_mask = source_mask; if (!dest_dir || !*dest_dir) { g_free (source_mask); + g_free(def_text); return dest_dir; } if (source_easy_patterns) { @@ -982,5 +992,6 @@ } if (val == B_USER) *do_background = 1; + g_free(def_text); return dest_dir; } diff -ruN mc-4.6.1.orig/src/find.c mc-4.6.1/src/find.c --- mc-4.6.1.orig/src/find.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/find.c 2008-12-26 03:29:15.000000000 +0100 @@ -205,7 +205,7 @@ int l1, maxlen = 0; while (i--) { - l1 = strlen (labs[i] = _(labs[i])); + l1 = mbstrlen (labs[i] = _(labs[i])); if (l1 > maxlen) maxlen = l1; } @@ -214,7 +214,7 @@ FIND_X = i; for (i = sizeof (buts) / sizeof (buts[0]), l1 = 0; i--;) { - l1 += strlen (buts[i] = _(buts[i])); + l1 += mbstrlen (buts[i] = _(buts[i])); } l1 += 21; if (l1 > FIND_X) @@ -223,8 +223,8 @@ ilen = FIND_X - 7 - maxlen; /* for the case of very long buttons :) */ istart = FIND_X - 3 - ilen; - b1 = b0 + strlen (buts[0]) + 7; - b2 = FIND_X - (strlen (buts[2]) + 6); + b1 = b0 + mbstrlen (buts[0]) + 7; + b2 = FIND_X - (mbstrlen (buts[2]) + 6); i18n_flag = 1; case_label = _(case_label); @@ -813,7 +813,7 @@ if (!i18n_flag) { register int i = sizeof (fbuts) / sizeof (fbuts[0]); while (i--) - fbuts[i].len = strlen (fbuts[i].text = _(fbuts[i].text)) + 3; + fbuts[i].len = mbstrlen (fbuts[i].text = _(fbuts[i].text)) + 3; fbuts[2].len += 2; /* DEFPUSH_BUTTON */ i18n_flag = 1; } diff -ruN mc-4.6.1.orig/src/global.h mc-4.6.1/src/global.h --- mc-4.6.1.orig/src/global.h 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/global.h 2008-12-26 03:29:15.000000000 +0100 @@ -146,6 +146,13 @@ # define N_(String) (String) #endif /* !ENABLE_NLS */ +#include +#if SLANG_VERSION >= 20000 +#define UTF8 1 +#define SLsmg_Is_Unicode SLsmg_is_utf8_mode() +void SLsmg_write_nwchars(wchar_t *s, size_t n); +#endif + #include "fs.h" #include "util.h" diff -ruN mc-4.6.1.orig/src/help.c mc-4.6.1/src/help.c --- mc-4.6.1.orig/src/help.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/help.c 2008-12-26 03:29:15.000000000 +0100 @@ -445,10 +445,28 @@ #ifndef HAVE_SLANG addch (acs_map [c]); #else +#if defined(UTF8) && SLANG_VERSION < 20000 + SLsmg_draw_object (h->y + line + 2, h->x + col + 2, acs_map [c]); +#else SLsmg_draw_object (h->y + line + 2, h->x + col + 2, c); +#endif /* UTF8 */ #endif + } else { +#ifdef UTF8 + if (SLsmg_Is_Unicode) { + int len; + mbstate_t mbs; + wchar_t wc; + memset (&mbs, 0, sizeof (mbs)); + len = mbrtowc(&wc, p, MB_CUR_MAX, &mbs); + if (len <= 0) len = 1; /* skip broken multibyte chars */ + + SLsmg_write_char(wc); + p += len - 1; } else +#endif addch (c); + } col++; break; } @@ -771,6 +789,12 @@ message (1, MSG_ERROR, _(" Cannot open file %s \n %s "), filename ? filename : hlpfile, unix_error_string (errno)); } + else + { + char *conv = utf8_to_local(data); + g_free(data); + data = conv; + } if (!filename) g_free (hlpfile); diff -ruN mc-4.6.1.orig/src/hotlist.c mc-4.6.1/src/hotlist.c --- mc-4.6.1.orig/src/hotlist.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/hotlist.c 2008-12-26 03:29:15.000000000 +0100 @@ -555,7 +555,7 @@ row = hotlist_but [i].y; ++count [row]; - len [row] += strlen (hotlist_but [i].text) + 5; + len [row] += mbstrlen (hotlist_but [i].text) + 5; if (hotlist_but [i].flags == DEFPUSH_BUTTON) len [row] += 2; } @@ -580,12 +580,12 @@ /* not first int the row */ if (!strcmp (hotlist_but [i].text, cancel_but)) hotlist_but [i].x = - cols - strlen (hotlist_but [i].text) - 13; + cols - mbstrlen (hotlist_but [i].text) - 13; else hotlist_but [i].x = cur_x [row]; } - cur_x [row] += strlen (hotlist_but [i].text) + 2 + cur_x [row] += mbstrlen (hotlist_but [i].text) + 2 + (hotlist_but [i].flags == DEFPUSH_BUTTON ? 5 : 3); } } @@ -814,7 +814,7 @@ for (i = 0; i < 3; i++) { qw [i].text = _(qw [i].text); - l[i] = strlen (qw [i].text) + 3; + l[i] = mbstrlen (qw [i].text) + 3; } space = (len - 4 - l[0] - l[1] - l[2]) / 4; @@ -860,7 +860,7 @@ static int i18n_flag = 0; #endif /* ENABLE_NLS */ - len = max (strlen (header), (size_t) msglen (text1, &lines1)); + len = max ((int) mbstrlen (header), (size_t) msglen (text1, &lines1)); len = max (len, (size_t) msglen (text2, &lines2)) + 4; len = max (len, 64); @@ -955,7 +955,7 @@ static int i18n_flag = 0; #endif /* ENABLE_NLS */ - len = max (strlen (header), (size_t) msglen (label, &lines)) + 4; + len = max ((int) mbstrlen (header), (size_t) msglen (label, &lines)) + 4; len = max (len, 64); #ifdef ENABLE_NLS @@ -1011,7 +1011,7 @@ { char *prompt, *label; const char *cp = _("Label for \"%s\":"); - int l = strlen (cp); + int l = mbstrlen (cp); char *label_string = g_strdup (current_panel->cwd); strip_password (label_string, 1); diff -ruN mc-4.6.1.orig/src/layout.c mc-4.6.1/src/layout.c --- mc-4.6.1.orig/src/layout.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/layout.c 2008-12-26 03:29:15.000000000 +0100 @@ -362,36 +362,36 @@ while (i--) { s_split_direction[i] = _(s_split_direction[i]); - l1 = strlen (s_split_direction[i]) + 7; + l1 = mbstrlen (s_split_direction[i]) + 7; if (l1 > first_width) first_width = l1; } for (i = 0; i <= 8; i++) { check_options[i].text = _(check_options[i].text); - l1 = strlen (check_options[i].text) + 7; + l1 = mbstrlen (check_options[i].text) + 7; if (l1 > first_width) first_width = l1; } - l1 = strlen (title1) + 1; + l1 = mbstrlen (title1) + 1; if (l1 > first_width) first_width = l1; - l1 = strlen (title2) + 1; + l1 = mbstrlen (title2) + 1; if (l1 > first_width) first_width = l1; - second_width = strlen (title3) + 1; + second_width = mbstrlen (title3) + 1; for (i = 0; i < 6; i++) { check_options[i].text = _(check_options[i].text); - l1 = strlen (check_options[i].text) + 7; + l1 = mbstrlen (check_options[i].text) + 7; if (l1 > second_width) second_width = l1; } if (console_flag) { - l1 = strlen (output_lines_label) + 13; + l1 = mbstrlen (output_lines_label) + 13; if (l1 > second_width) second_width = l1; } @@ -405,14 +405,14 @@ * * Now the last thing to do - properly space buttons... */ - l1 = 11 + strlen (ok_button) /* 14 - all brackets and inner space */ - +strlen (save_button) /* notice: it is 3 char less because */ - +strlen (cancel_button); /* of '&' char in button text */ + l1 = 11 + mbstrlen (ok_button) /* 14 - all brackets and inner space */ + +mbstrlen (save_button) /* notice: it is 3 char less because */ + +mbstrlen (cancel_button); /* of '&' char in button text */ i = (first_width + second_width - l1) / 4; b1 = 5 + i; - b2 = b1 + strlen (ok_button) + i + 6; - b3 = b2 + strlen (save_button) + i + 4; + b2 = b1 + mbstrlen (ok_button) + i + 6; + b3 = b2 + mbstrlen (save_button) + i + 4; i18n_layt_flag = 1; } @@ -684,7 +684,7 @@ panel_do_cols (0); panel_do_cols (1); - promptl = strlen (prompt); + promptl = mbstrlen (prompt); widget_set_size (&the_menubar->widget, 0, 0, 1, COLS); diff -ruN mc-4.6.1.orig/src/learn.c mc-4.6.1/src/learn.c --- mc-4.6.1.orig/src/learn.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/learn.c 2008-12-26 03:29:15.000000000 +0100 @@ -236,7 +236,7 @@ learn_but[0].x = 78 / 2 + 4; learn_but[1].text = _(learn_but[1].text); - learn_but[1].x = 78 / 2 - (strlen (learn_but[1].text) + 9); + learn_but[1].x = 78 / 2 - (mbstrlen (learn_but[1].text) + 9); learn_title = _(learn_title); i18n_flag = 1; diff -ruN mc-4.6.1.orig/src/main.c mc-4.6.1/src/main.c --- mc-4.6.1.orig/src/main.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/main.c 2008-12-26 03:29:15.000000000 +0100 @@ -1609,7 +1609,11 @@ if (xterm_flag && xterm_title) { p = s = g_strdup (strip_home_and_password (current_panel->cwd)); do { +#ifndef UTF8 if (!is_printable (*s)) +#else /* UTF8 */ + if (*s < ' ') +#endif /* UTF8 */ *s = '?'; } while (*++s); fprintf (stdout, "\33]0;mc - %s\7", p); diff -ruN mc-4.6.1.orig/src/menu.c mc-4.6.1/src/menu.c --- mc-4.6.1.orig/src/menu.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/menu.c 2008-12-26 03:29:15.000000000 +0100 @@ -20,6 +20,8 @@ #include #include #include +#include + #include "global.h" #include "tty.h" #include "menu.h" @@ -50,33 +52,96 @@ { Menu *menu; const char *cp; + int wlen = 0; + mbstate_t s; menu = (Menu *) g_malloc (sizeof (*menu)); menu->count = count; menu->max_entry_len = 20; menu->entries = entries; + menu->name = g_strdup (name); + menu_scan_hotkey (menu); +#ifdef UTF8 + menu->wentries = NULL; + menu->wname = NULL; + if (SLsmg_Is_Unicode) { + const char *str = menu->name; + memset (&s, 0, sizeof (s)); + wlen = mbsrtowcs (NULL, &str, -1, &s); + if (wlen > 0) + ++wlen; + else { + wlen = 0; + memset (&s, 0, sizeof (s)); + } + } +#endif if (entries != (menu_entry*) NULL) { register menu_entry* mp; for (mp = entries; count--; mp++) { if (mp->text[0] != '\0') { + int len; #ifdef ENABLE_NLS mp->text = _(mp->text); #endif /* ENABLE_NLS */ cp = strchr (mp->text,'&'); +#ifdef UTF8 + if (SLsmg_Is_Unicode) { + len = mbstrlen(mp->text) + 1; + wlen += len; + menu->max_entry_len = max (len - 1, menu->max_entry_len); + } else +#endif + len = strlen (mp->text); + if (cp != NULL && *(cp+1) != '\0') { mp->hot_key = tolower (*(cp+1)); - menu->max_entry_len = max ((int) (strlen (mp->text) - 1), - menu->max_entry_len); + menu->max_entry_len = max (len - 1, menu->max_entry_len); } else { - menu->max_entry_len = max ((int) strlen (mp->text), - menu->max_entry_len); + menu->max_entry_len = max (len, menu->max_entry_len); } } } } +#ifdef UTF8 + if (wlen) { + wchar_t *wp; + const char *str; + int len; + + menu->wentries = (wchar_t **) + g_malloc (sizeof (wchar_t *) * menu->count + + wlen * sizeof (wchar_t)); + wp = (wchar_t *) (menu->wentries + menu->count); + str = menu->name; + len = mbsrtowcs (wp, &str, wlen, &s); + if (len > 0) { + menu->wname = wp; + wlen -= len + 1; + wp += len + 1; + } else + memset (&s, 0, sizeof (s)); + if (menu->entries != NULL) + for (count = 0; count < menu->count; ++count) + if (menu->entries[count].text[0] != '\0') { + str = menu->entries[count].text; + menu->wentries[count] = wp; + len = mbsrtowcs (wp, &str, wlen, &s); + if (len > 0) { + wlen -= len + 1; + wp += len + 1; + } else { + memset (&s, 0, sizeof (s)); + *wp++ = L'\0'; + --wlen; + } + } + } +#endif + menu->name = g_strdup (name); menu_scan_hotkey(menu); menu->start_x = 0; @@ -109,8 +174,26 @@ const unsigned char *text; addch((unsigned char)menu->entries [idx].first_letter); - for (text = menu->entries [idx].text; *text; text++) - { +#ifdef UTF8 + if (menu->wentries) { + wchar_t *wtext, *wp; + + for (wtext = wp = menu->wentries [idx]; *wtext; wtext++) { + if (*wtext == L'&') { + if (wtext > wp) + SLsmg_write_nwchars (wp, wtext - wp); + attrset (color == MENU_SELECTED_COLOR ? + MENU_HOTSEL_COLOR : MENU_HOT_COLOR); + SLsmg_write_nwchars (++wtext, 1); + attrset (color); + wp = wtext + 1; + } + } + if (wtext > wp) + SLsmg_write_nwchars (wp, wtext - wp); + } else +#endif + for (text = menu->entries [idx].text; *text; text++) { if (*text != '&') addch(*text); else { @@ -119,7 +202,7 @@ addch(*(++text)); attrset(color); } - } + } } widget_move (&menubar->widget, y, x + 1); } @@ -167,7 +250,13 @@ if (menubar->active) attrset(i == menubar->selected?MENU_SELECTED_COLOR:SELECTED_COLOR); widget_move (&menubar->widget, 0, menubar->menu [i]->start_x); - printw ("%s", menubar->menu [i]->name); +#ifdef UTF8 + if (menubar->menu [i]->wname) + SLsmg_write_nwchars (menubar->menu [i]->wname, + wcslen (menubar->menu [i]->wname)); + else +#endif + printw ("%s", menubar->menu [i]->name); } if (menubar->dropped) @@ -489,7 +578,13 @@ for (i = 0; i < items; i++) { - int len = strlen(menubar->menu[i]->name); + int len; +#ifdef UTF8 + if (menubar->menu[i]->wname) + len = wcslen (menubar->menu[i]->wname); + else +#endif + len = strlen(menubar->menu[i]->name); menubar->menu[i]->start_x = start_x; start_x += len + gap; } @@ -502,7 +597,13 @@ for (i = 0; i < items; i++) { /* preserve length here, to be used below */ - gap -= (menubar->menu[i]->start_x = strlen(menubar->menu[i]->name)); +#ifdef UTF8 + if (menubar->menu[i]->wname) + menubar->menu[i]->start_x = wcslen (menubar->menu[i]->wname); + else +#endif + menubar->menu[i]->start_x = strlen (menubar->menu[i]->name); + gap -= menubar->menu[i]->start_x; } gap /= (items - 1); @@ -526,6 +627,9 @@ void destroy_menu (Menu *menu) { +#ifdef UTF8 + g_free (menu->wentries); +#endif g_free (menu->name); g_free (menu->help_node); g_free (menu); diff -ruN mc-4.6.1.orig/src/menu.h mc-4.6.1/src/menu.h --- mc-4.6.1.orig/src/menu.h 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/menu.h 2008-12-26 03:29:15.000000000 +0100 @@ -21,6 +21,8 @@ menu_entry *entries; int start_x; /* position relative to menubar start */ char *help_node; + wchar_t **wentries; + wchar_t *wname; } Menu; extern int menubar_visible; diff -ruN mc-4.6.1.orig/src/myslang.h mc-4.6.1/src/myslang.h --- mc-4.6.1.orig/src/myslang.h 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/myslang.h 2008-12-26 03:29:15.000000000 +0100 @@ -11,6 +11,10 @@ #endif /* HAVE_SLANG_SLANG_H */ #endif +#ifdef UTF8 +# include +#endif + enum { KEY_BACKSPACE = 400, KEY_END, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, diff -ruN mc-4.6.1.orig/src/option.c mc-4.6.1/src/option.c --- mc-4.6.1.orig/src/option.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/option.c 2008-12-26 03:29:15.000000000 +0100 @@ -124,12 +124,12 @@ title2 = _(" Pause after run... "); title3 = _(" Other options "); - first_width = strlen (title1) + 1; - second_width = strlen (title3) + 1; + first_width = mbstrlen (title1) + 1; + second_width = mbstrlen (title3) + 1; for (i = 0; check_options[i].text; i++) { check_options[i].text = _(check_options[i].text); - l1 = strlen (check_options[i].text) + 7; + l1 = mbstrlen (check_options[i].text) + 7; if (i >= OTHER_OPTIONS) { if (l1 > first_width) first_width = l1; @@ -142,23 +142,23 @@ i = PAUSE_OPTIONS; while (i--) { pause_options[i] = _(pause_options[i]); - l1 = strlen (pause_options[i]) + 7; + l1 = mbstrlen (pause_options[i]) + 7; if (l1 > first_width) first_width = l1; } - l1 = strlen (title2) + 1; + l1 = mbstrlen (title2) + 1; if (l1 > first_width) first_width = l1; - l1 = 11 + strlen (ok_button) - + strlen (save_button) - + strlen (cancel_button); + l1 = 11 + mbstrlen (ok_button) + + mbstrlen (save_button) + + mbstrlen (cancel_button); i = (first_width + second_width - l1) / 4; b1 = 5 + i; - b2 = b1 + strlen (ok_button) + i + 6; - b3 = b2 + strlen (save_button) + i + 4; + b2 = b1 + mbstrlen (ok_button) + i + 6; + b3 = b2 + mbstrlen (save_button) + i + 4; i18n_config_flag = 1; } diff -ruN mc-4.6.1.orig/src/panelize.c mc-4.6.1/src/panelize.c --- mc-4.6.1.orig/src/panelize.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/panelize.c 2008-12-26 03:29:15.000000000 +0100 @@ -127,7 +127,7 @@ i = sizeof (panelize_but) / sizeof (panelize_but[0]); while (i--) { panelize_but[i].text = _(panelize_but[i].text); - maxlen += strlen (panelize_but[i].text) + 5; + maxlen += mbstrlen (panelize_but[i].text) + 5; } maxlen += 10; @@ -136,11 +136,11 @@ panelize_cols = max (panelize_cols, maxlen); panelize_but[2].x = - panelize_but[3].x + strlen (panelize_but[3].text) + 7; + panelize_but[3].x + mbstrlen (panelize_but[3].text) + 7; panelize_but[1].x = - panelize_but[2].x + strlen (panelize_but[2].text) + 5; + panelize_but[2].x + mbstrlen (panelize_but[2].text) + 5; panelize_but[0].x = - panelize_cols - strlen (panelize_but[0].text) - 8 - BX; + panelize_cols - mbstrlen (panelize_but[0].text) - 8 - BX; #endif /* ENABLE_NLS */ diff -ruN mc-4.6.1.orig/src/screen.c mc-4.6.1/src/screen.c --- mc-4.6.1.orig/src/screen.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/screen.c 2008-12-26 03:29:15.000000000 +0100 @@ -169,22 +169,59 @@ static const char * string_file_name (file_entry *fe, int len) { - static char buffer [BUF_SMALL]; size_t i; +#ifdef UTF8 + static char buffer [BUF_SMALL * 4]; + mbstate_t s; + int mbmax = MB_CUR_MAX; + const char *str = fe->fname; - for (i = 0; i < sizeof(buffer) - 1; i++) { - char c; + memset (&s, 0, sizeof (s)); +#else + static char buffer [BUF_SMALL]; +#endif - c = fe->fname[i]; +#ifdef UTF8 + if (SLsmg_Is_Unicode) + for (i = 0; i < sizeof (buffer) - 1; i++) { + wchar_t wc; + int len; - if (!c) - break; + len = mbrtowc (&wc, str, mbmax, &s); + if (!len) + break; + if (len < 0) { + memset (&s, 0, sizeof (s)); + buffer[i] = '?'; + str++; + continue; + } + if (!is_printable (wc)) { + buffer[i] = '?'; + str++; + continue; + } + if (i >= sizeof (buffer) - len) + break; + memcpy (buffer + i, str, len); + i += len - 1; + str += len; + } + else +#endif + for (i = 0; i < sizeof(buffer) - 1; i++) { + char c; - if (!is_printable(c)) - c = '?'; + c = fe->fname[i]; - buffer[i] = c; - } + if (!c) + break; + + if (!is_printable(c)) + c = '?'; + + buffer[i] = c; + } buffer[i] = 0; return buffer; @@ -425,42 +462,6 @@ { "dot", 1, 0, J_RIGHT, " ", 0, string_dot, NULL }, }; -static char * -to_buffer (char *dest, int just_mode, int len, const char *txt) -{ - int txtlen = strlen (txt); - int still, over; - - /* Fill buffer with spaces */ - memset (dest, ' ', len); - - still = (over=(txtlen > len)) ? (txtlen - len) : (len - txtlen); - - switch (HIDE_FIT(just_mode)){ - case J_LEFT: - still = 0; - break; - case J_CENTER: - still /= 2; - break; - case J_RIGHT: - default: - break; - } - - if (over){ - if (IS_FIT(just_mode)) - strcpy (dest, name_trunc(txt, len)); - else - strncpy (dest, txt+still, len); - } else - strncpy (dest+still, txt, txtlen); - - dest[len] = '\0'; - - return (dest + len); -} - static int file_compute_color (int attr, file_entry *fe) { @@ -514,14 +515,18 @@ /* Formats the file number file_index of panel in the buffer dest */ static void -format_file (char *dest, int limit, WPanel *panel, int file_index, int width, int attr, int isstatus) +format_file (WPanel *panel, int file_index, int width, int attr, int isstatus) { int color, length, empty_line; const char *txt; - char *old_pos; - char *cdest = dest; format_e *format, *home; file_entry *fe; +#ifdef UTF8 + char buffer[BUF_MEDIUM * sizeof (wchar_t)]; +#else + char buffer[BUF_MEDIUM]; +#endif + int txtwidth; length = 0; empty_line = (file_index >= panel->count); @@ -539,34 +544,137 @@ break; if (format->string_fn){ - int len; + int len, still, over, perm, txtlen, wide; if (empty_line) txt = " "; else txt = (*format->string_fn)(fe, format->field_len); - old_pos = cdest; - len = format->field_len; if (len + length > width) len = width - length; - if (len + (cdest - dest) > limit) - len = limit - (cdest - dest); + if (len >= BUF_MEDIUM) + len = BUF_MEDIUM - 1; if (len <= 0) break; - cdest = to_buffer (cdest, format->just_mode, len, txt); - length += len; - attrset (color); + perm = 0; + if (permission_mode) { + if (!strcmp(format->id, "perm")) + perm = 1; + else if (!strcmp(format->id, "mode")) + perm = 2; + } + + wide = 0; +#ifdef UTF8 + if (SLsmg_Is_Unicode && !empty_line && !perm) { + mbstate_t s; + const char *str = txt; + + memset (&s, 0, sizeof (s)); + txtlen = mbsrtowcs ((wchar_t *) buffer, &str, + sizeof (buffer) / sizeof (wchar_t), &s); + if (txtlen < 0) { + txt = " "; + txtlen = 1; + } else { + wide = 1; + txtwidth = wcswidth((wchar_t*)buffer, txtlen); + } + } else +#endif + { + txtlen = strlen (txt); + txtwidth = txtlen; + } + + over = txtwidth > len; + still = over ? txtlen - len : len - txtlen; - if (permission_mode && !strcmp(format->id, "perm")) - add_permission_string (old_pos, format->field_len, fe, attr, color, 0); - else if (permission_mode && !strcmp(format->id, "mode")) - add_permission_string (old_pos, format->field_len, fe, attr, color, 1); - else - addstr (old_pos); + switch (HIDE_FIT(format->just_mode)) { + case J_LEFT: + still = 0; + break; + case J_CENTER: + still /= 2; + break; + case J_RIGHT: + default: + break; + } + + attrset (color); + + if (wide) { +#ifdef UTF8 + if (over) { + if (IS_FIT (format->just_mode)) { + int n1 = 0; + int width1 = 0; + int n2 = 0; + int width2 = 0; + int len1 = len / 2; + int len2; + + while (1) { + int w = wcwidth(((wchar_t *) buffer)[n1]); + if (width1 + w <= len1) { + width1 += w; + n1++; + } + else + break; + } + len2 = len - width1 - 1; + + while (1) { + int w = wcwidth(((wchar_t *) buffer)[txtlen - n2 - 1]); + if (width2 + w <= len2) { + width2 += w; + n2++; + } + else + break; + } + + + SLsmg_write_nwchars ((wchar_t *) buffer, n1); + SLsmg_write_nwchars (L"~", 1); + printw ("%*s", len - width1 - width2 - 1, ""); + SLsmg_write_nwchars (((wchar_t *) buffer) + + txtlen - n2, n2); + } else + SLsmg_write_nwchars ((wchar_t *) buffer, len); + } else { + printw ("%*s", still, ""); + SLsmg_write_nwchars ((wchar_t *) buffer, txtlen); + printw ("%*s", len - txtwidth - still, ""); + } +#endif + } else { + if (over) { + if (IS_FIT (format->just_mode)) + strcpy (buffer, name_trunc(txt, len)); + else + memcpy (buffer, txt + still, len); + } else { + memset (buffer, ' ', still); + memcpy (buffer + still, txt, txtlen); + memset (buffer + still + txtlen, ' ', + len - txtlen - still); + } + buffer[len] = '\0'; + if (perm) + add_permission_string (buffer, format->field_len, fe, + attr, color, perm - 1); + else + addstr (buffer); + } + + length += len; } else { if (attr == SELECTED || attr == MARKED_SELECTED) attrset (SELECTED_COLOR); @@ -589,7 +697,6 @@ { int second_column = 0; int width, offset; - char buffer [BUF_MEDIUM]; offset = 0; if (!isstatus && panel->split){ @@ -618,7 +725,7 @@ widget_move (&panel->widget, file_index - panel->top_file + 2, 1); } - format_file (buffer, sizeof(buffer), panel, file_index, width, attr, isstatus); + format_file (panel, file_index, width, attr, isstatus); if (!isstatus && panel->split){ if (second_column) @@ -1068,6 +1175,12 @@ int side, width; const char *txt; +#ifdef UTF8 + char buffer[30 * sizeof (wchar_t)]; + mbstate_t s; + + memset (&s, 0, sizeof (s)); +#endif if (!panel->split) adjust_top_file (panel); @@ -1092,16 +1205,37 @@ if (format->string_fn){ txt = format->title; + attrset (MARKED_COLOR); + width -= format->field_len; +#ifdef UTF8 + if (SLsmg_Is_Unicode) { + const char *str = txt; + header_len = mbsrtowcs ((wchar_t *) buffer, &str, + sizeof (buffer) / sizeof (wchar_t), + &s); + if (header_len < 0) { + memset (&s, 0, sizeof (s)); + printw ("%*s", format->field_len, ""); + continue; + } + if (header_len > format->field_len) + header_len = format->field_len; + spaces = (format->field_len - header_len) / 2; + extra = (format->field_len - header_len) % 2; + printw ("%*s", spaces, ""); + SLsmg_write_nwchars ((wchar_t *) buffer, header_len); + printw ("%*s", spaces + extra, ""); + continue; + } +#endif header_len = strlen (txt); if (header_len > format->field_len) header_len = format->field_len; - attrset (MARKED_COLOR); spaces = (format->field_len - header_len) / 2; extra = (format->field_len - header_len) % 2; printw ("%*s%.*s%*s", spaces, "", header_len, txt, spaces+extra, ""); - width -= 2 * spaces + extra + header_len; } else { attrset (NORMAL_COLOR); one_vline (); diff -ruN mc-4.6.1.orig/src/slint.c mc-4.6.1/src/slint.c --- mc-4.6.1.orig/src/slint.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/slint.c 2008-12-26 03:29:15.000000000 +0100 @@ -180,6 +180,9 @@ struct sigaction act, oact; SLtt_get_terminfo (); +#if SLANG_VERSION >= 20000 + SLutf8_enable (-1); +#endif /* * If the terminal in not in terminfo but begins with a well-known diff -ruN mc-4.6.1.orig/src/util.c mc-4.6.1/src/util.c --- mc-4.6.1.orig/src/util.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/util.c 2008-12-26 03:34:58.000000000 +0100 @@ -32,7 +32,11 @@ #include #include #include +#include +#include +#include +#include "tty.h" #include "global.h" #include "profile.h" #include "main.h" /* mc_home */ @@ -44,9 +48,22 @@ #include "charsets.h" #endif +#ifdef UTF8 +#include +#include +#endif + static const char app_text [] = "Midnight-Commander"; int easy_patterns = 1; +#if SLANG_VERSION >= 20000 +void SLsmg_write_nwchars(wchar_t *s, size_t n) +{ + while(n--) + SLsmg_write_char(*s++); +} +#endif + extern void str_replace(char *s, char from, char to) { for (; *s != '\0'; s++) { @@ -77,9 +94,106 @@ return (c > 31 && c != 127 && c != 155); } +size_t +mbstrlen (const char *str) +{ +#ifdef UTF8 + if (SLsmg_Is_Unicode) { + size_t width = 0; + + for (; *str; str++) { + wchar_t c; + size_t len; + + len = mbrtowc (&c, str, MB_CUR_MAX, NULL); + + if (len == (size_t)(-1) || len == (size_t)(-2)) break; + + if (len > 0) { + int wcsize = wcwidth(c); + width += wcsize > 0 ? wcsize : 0; + str += len-1; + } + } + + return width; + } else +#endif + return strlen (str); +} + +#ifdef UTF8 + +void +fix_utf8(char *str) +{ + mbstate_t mbs; + + char *p = str; + + while (*p) { + int len; + memset (&mbs, 0, sizeof (mbs)); + len = mbrlen(p, MB_CUR_MAX, &mbs); + if (len == -1) { + *p = '?'; + p++; + } else if (len > 0) { + p += len; + } else { + p++; + } + } +} +#endif + + + +#ifdef UTF8 +wchar_t * +mbstr_to_wchar (const char *str) +{ + int len = mbstrlen(str); + wchar_t *buf = g_malloc((len+1) * sizeof(wchar_t)); + mbstate_t mbs; + memset (&mbs, 0, sizeof (mbs)); + mbsrtowcs (buf, &str, len, &mbs); + buf[len] = 0; + return buf; +} + +char * +wchar_to_mbstr (const wchar_t *wstr) +{ + mbstate_t mbs; + const wchar_t *wstr2; + char * string; + int len; + + memset (&mbs, 0, sizeof (mbs)); + wstr2 = wstr; + len = wcsrtombs(NULL, &wstr2, 0, &mbs); + if (len <= 0) + return NULL; + + string = g_malloc(len + 1); + + wstr2 = wstr; + wcsrtombs(string, &wstr2, len, &mbs); + string[len] = 0; + return string; +} +#endif + + + int is_printable (int c) { +#ifdef UTF8 + if (SLsmg_Is_Unicode) + return iswprint (c); +#endif c &= 0xff; #ifdef HAVE_CHARSET @@ -97,7 +211,7 @@ #endif /* !HAVE_CHARSET */ } -/* Returns the message dimensions (lines and columns) */ +/* Returns the message dimensions columns */ int msglen (const char *text, int *lines) { int max = 0; @@ -108,8 +222,18 @@ line_len = 0; (*lines)++; } else { - line_len++; - if (line_len > max) +#ifdef UTF8 + size_t len; + wchar_t c; + + len = mbrtowc (&c, text, MB_CUR_MAX, NULL); + if (len > 0 && len != (size_t)(-1) && len != (size_t)(-2)) { + int wcsize = wcwidth(c); + line_len += wcsize > 0 ? wcsize-1 : -1; + text += len-1; + } +#endif + if (++line_len > max) max = line_len; } } @@ -201,7 +325,24 @@ *d++ = '\\'; break; } +#ifndef UTF8 *d = *s; +#else /* UTF8 */ + { + mbstate_t mbs; + int len; + memset (&mbs, 0, sizeof (mbs)); + len = mbrlen(s, MB_CUR_MAX, &mbs); + if (len > 0) { + while (len-- > 1) + *d++ = *s++; + *d = *s; + } else { + *d = '?'; + } + + } +#endif /* UTF8 */ } *d = '\0'; return ret; @@ -222,25 +363,90 @@ name_trunc (const char *txt, int trunc_len) { static char x[MC_MAXPATHLEN + MC_MAXPATHLEN]; - int txt_len; + int txt_len, first, skip; char *p; + const char *str; if ((size_t) trunc_len > sizeof (x) - 1) { trunc_len = sizeof (x) - 1; } - txt_len = strlen (txt); - if (txt_len <= trunc_len) { - strcpy (x, txt); - } else { - int y = (trunc_len / 2) + (trunc_len % 2); - strncpy (x, txt, y); - strncpy (x + y, txt + txt_len - (trunc_len / 2), trunc_len / 2); - x[y] = '~'; - } - x[trunc_len] = 0; - for (p = x; *p; p++) - if (!is_printable (*p)) - *p = '?'; + txt_len = mbstrlen (txt); + first = 0; + skip = 0; + if (txt_len > trunc_len) { + first = trunc_len / 2; + skip = txt_len - trunc_len + 1; + } + +#ifdef UTF8 + if (SLsmg_Is_Unicode) { + mbstate_t s; + int mbmax; + + str = txt; + memset (&s, 0, sizeof (s)); + mbmax = MB_CUR_MAX; + p = x; + while (p < x + sizeof (x) - 1 && trunc_len) { + wchar_t wc; + int len; + + len = mbrtowc (&wc, str, mbmax, &s); + if (!len) + break; + if (len < 0) { + memset (&s, 0, sizeof (s)); + *p = '?'; + len = 1; + str++; + } else if (!is_printable (wc)) { + *p = '?'; + str += len; + len = 1; + } else if (p >= x + sizeof (x) - len) + break; + else { + memcpy (p, str, len); + str += len; + } + if (first) { + --trunc_len; + --first; + p += len; + if (!first && p < x + sizeof (x) - 1 && trunc_len) { + *p++ = '~'; + --trunc_len; + } + } else if (skip) + --skip; + else { + --trunc_len; + p += len; + } + } + } else +#endif + { + str = txt; + p = x; + while (p < x + sizeof (x) - 1) { + if (*str == '\0') + break; + else if (!is_printable (*str)) + *p++ = '?'; + else + *p++ = *str; + ++str; + if (first) { + --first; + if (!first) { + *p++ = '~'; + str += skip; + } + } + } + } + *p = '\0'; return x; } @@ -650,11 +856,66 @@ } char * +utf8_to_local(char *str) +{ + iconv_t cd; + size_t buflen; + char *output; + int retry = 1; + + if (str == NULL) + return NULL; + else + buflen = strlen(str); + + cd = iconv_open (nl_langinfo(CODESET), "UTF-8"); + if (cd == (iconv_t) -1) { + return g_strdup(str); + } + + output = g_malloc(buflen + 1); + + while (retry) + { + char *wrptr = output; + char *inptr = str; + size_t insize = buflen; + size_t avail = buflen; + size_t nconv; + + nconv = iconv (cd, &inptr, &insize, &wrptr, &avail); + if (nconv == (size_t) -1) + { + if (errno == E2BIG) + { + buflen *= 2; + g_free(output); + output = g_malloc(buflen + 1); + } + else + { + g_free(output); + return g_strdup(str); + } + } + else { + retry = 0; + *wrptr = 0; + } + } + + iconv_close (cd); + + return output; +} + +char * load_mc_home_file (const char *filename, char **allocated_filename) { char *hintfile_base, *hintfile; char *lang; char *data; + char *conv_data; hintfile_base = concat_dir_and_file (mc_home, filename); lang = guess_message_value (); @@ -687,7 +948,10 @@ else g_free (hintfile); - return data; + conv_data = utf8_to_local(data); + g_free(data); + + return conv_data; } /* Check strftime() results. Some systems (i.e. Solaris) have different @@ -695,12 +959,14 @@ size_t i18n_checktimelength (void) { size_t length, a, b; - char buf [MAX_I18NTIMELENGTH + 1]; + char buf [4 * MAX_I18NTIMELENGTH + 1]; time_t testtime = time (NULL); - a = strftime (buf, sizeof(buf)-1, _("%b %e %H:%M"), localtime(&testtime)); - b = strftime (buf, sizeof(buf)-1, _("%b %e %Y"), localtime(&testtime)); - + strftime (buf, sizeof(buf)-1, _("%b %e %H:%M"), localtime(&testtime)); + a = mbstrlen (buf); + strftime (buf, sizeof(buf)-1, _("%b %e %Y"), localtime(&testtime)); + b = mbstrlen (buf); + length = max (a, b); /* Don't handle big differences. Use standard value (email bug, please) */ @@ -712,7 +978,7 @@ const char *file_date (time_t when) { - static char timebuf [MAX_I18NTIMELENGTH + 1]; + static char timebuf [4 * MAX_I18NTIMELENGTH + 1]; // 4* is to have enough place in worst case time_t current_time = time ((time_t) 0); static size_t i18n_timelength = 0; static const char *fmtyear, *fmttime; @@ -739,8 +1005,8 @@ fmt = fmtyear; else fmt = fmttime; - - strftime (timebuf, i18n_timelength, fmt, localtime(&when)); + + strftime (timebuf, sizeof(timebuf)-1, fmt, localtime(&when)); return timebuf; } @@ -863,10 +1129,27 @@ r++; continue; } - +#ifndef UTF8 if (is_printable(*r)) *w++ = *r; ++r; +#else /* UTF8 */ + { + mbstate_t mbs; + int len; + memset (&mbs, 0, sizeof (mbs)); + len = mbrlen(r, MB_CUR_MAX, &mbs); + + if (len > 0 && (unsigned char)*r >= ' ') + while (len--) + *w++ = *r++; + else { + if (len == -1) + *w++ = '?'; + r++; + } + } +#endif /* UTF8 */ } *w = 0; return s; diff -ruN mc-4.6.1.orig/src/util.h mc-4.6.1/src/util.h --- mc-4.6.1.orig/src/util.h 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/util.h 2008-12-26 03:29:15.000000000 +0100 @@ -93,6 +93,13 @@ char *get_group (int); char *get_owner (int); +void fix_utf8(char *str); +size_t mbstrlen (const char *); +wchar_t *mbstr_to_wchar (const char *); +char *wchar_to_mbstr (const wchar_t *); +char *utf8_to_local(char *str); + + #define MAX_I18NTIMELENGTH 14 #define MIN_I18NTIMELENGTH 10 #define STD_I18NTIMELENGTH 12 diff -ruN mc-4.6.1.orig/src/view.c mc-4.6.1/src/view.c --- mc-4.6.1.orig/src/view.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/view.c 2008-12-26 03:29:15.000000000 +0100 @@ -36,6 +36,10 @@ #include #include +#ifdef UTF8 +#include +#endif /* UTF8 */ + #include "global.h" #include "tty.h" #include "cmd.h" /* For view_other_cmd */ @@ -793,7 +797,7 @@ if (!i18n_adjust) { file_label = _("File: %s"); - i18n_adjust = strlen (file_label) - 2; + i18n_adjust = mbstrlen (file_label) - 2; } if (w < i18n_adjust + 6) @@ -849,7 +853,11 @@ widget_erase ((Widget *) view); } +#ifndef UTF8 #define view_add_character(view,c) addch (c) +#else /* UTF8 */ +#define view_add_character(view,c) SLsmg_write_char(c) +#endif /* UTF8 */ #define view_add_one_vline() one_vline() #define view_add_string(view,s) addstr (s) #define view_gotoyx(v,r,c) widget_move (v,r,c) @@ -1071,6 +1079,12 @@ if (view->growing_buffer && from == view->last_byte) get_byte (view, from); for (; row < height && from < view->last_byte; from++) { +#ifdef UTF8 + mbstate_t mbs; + char mbbuf[MB_LEN_MAX]; + int mblen; + wchar_t wc; +#endif /* UTF8 */ c = get_byte (view, from); if ((c == '\n') || (col >= width && view->wrap_mode)) { col = frame_shift; @@ -1084,7 +1098,37 @@ col = ((col - frame_shift) / 8) * 8 + 8 + frame_shift; continue; } +#ifndef UTF8 if (view->viewer_nroff_flag && c == '\b') { +#else /* UTF8 */ + mblen = 1; + mbbuf[0] = convert_to_display_c (c); + + while (mblen < MB_LEN_MAX) { + int res; + memset (&mbs, 0, sizeof (mbs)); + res = mbrtowc (&wc, mbbuf, mblen, &mbs); + if (res <= 0 && res != -2) { + wc = '.'; + mblen = 1; + break; + } + if (res == mblen) + break; + + mbbuf[mblen] = convert_to_display_c (get_byte (view, from + mblen)); + mblen++; + } + + if (mblen == MB_LEN_MAX) { + wc = '.'; + mblen = 1; + } + + from += mblen - 1; + + if (view->viewer_nroff_flag && wc == '\b') { +#endif /* UTF8 */ int c_prev; int c_next; @@ -1122,12 +1166,23 @@ && col < width - view->start_col) { view_gotoyx (view, row, col + view->start_col); +#ifndef UTF8 c = convert_to_display_c (c); - if (!is_printable (c)) c = '.'; - view_add_character (view, c); +#else /* UTF8 */ + if (!iswprint (wc)) + wc = '.'; + view_add_character (view, wc); + + { + int cw = wcwidth(wc); + if (cw > 1) + col+= cw - 1; + } +#endif /* UTF8 */ + } col++; if (boldflag != MARK_NORMAL) { diff -ruN mc-4.6.1.orig/src/widget.c mc-4.6.1/src/widget.c --- mc-4.6.1.orig/src/widget.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/widget.c 2008-12-26 03:29:15.000000000 +0100 @@ -33,6 +33,9 @@ #include #include "global.h" #include "tty.h" +#ifdef UTF8 +#include +#endif /* UTF8 */ #include "color.h" #include "mouse.h" #include "dialog.h" @@ -148,6 +151,11 @@ if (b->hotpos >= 0) { attrset ((b->selected) ? HOT_FOCUSC : HOT_NORMALC); widget_move (&b->widget, 0, b->hotpos + off); +#ifdef UTF8 + if (SLsmg_Is_Unicode) + SLsmg_write_nwchars (&b->hotwc, 1); + else +#endif addch ((unsigned char) b->text[b->hotpos]); } return MSG_HANDLED; @@ -179,7 +187,7 @@ static int button_len (const char *text, unsigned int flags) { - int ret = strlen (text); + int ret = mbstrlen (text); switch (flags){ case DEFPUSH_BUTTON: ret += 6; @@ -202,14 +210,36 @@ * the button text is g_malloc()ed, we can safely change and shorten it. */ static void -button_scan_hotkey (WButton *b) +scan_hotkey (char *text, int *hotposp, int *hotkeyp, wchar_t *hotwcp) { - char *cp = strchr (b->text, '&'); + char *cp = strchr (text, '&'); if (cp != NULL && cp[1] != '\0') { - g_strlcpy (cp, cp + 1, strlen (cp)); - b->hotkey = tolower (*cp); - b->hotpos = cp - b->text; +#ifdef UTF8 + if (SLsmg_Is_Unicode) { + mbstate_t s; + int len; + + *cp = '\0'; + memset (&s, 0, sizeof (s)); + len = mbrtowc (hotwcp, cp + 1, MB_CUR_MAX, &s); + if (len > 0) { + *hotposp = mbstrlen (text); + if (*hotposp < 0) { + *hotposp = -1; + } else { + /* FIXME */ + *hotkeyp = tolower (*hotwcp); + } + } + } else +#endif + { + *hotkeyp = tolower (cp[1]); + *hotposp = cp - text; + } + + memmove (cp, cp + 1, strlen (cp + 1) + 1); } } @@ -231,22 +261,23 @@ widget_want_hotkey (b->widget, 1); b->hotkey = 0; b->hotpos = -1; + b->hotwc = L'\0'; - button_scan_hotkey(b); + scan_hotkey(b->text, &b->hotpos, &b->hotkey, &b->hotwc); return b; } void button_set_text (WButton *b, const char *text) { - g_free (b->text); + g_free (b->text); b->text = g_strdup (text); b->widget.cols = button_len (text, b->flags); - button_scan_hotkey(b); + scan_hotkey(b->text, &b->hotpos, &b->hotkey, &b->hotwc); dlg_redraw (b->widget.parent); } - + /* Radio button widget */ static int radio_event (Gpm_Event *event, WRadio *r); @@ -320,16 +351,37 @@ widget_move (&r->widget, i, 0); printw ("(%c) ", (r->sel == i) ? '*' : ' '); - for (cp = r->texts[i]; *cp; cp++) { - if (*cp == '&') { - attrset ((i == r->pos && msg == WIDGET_FOCUS) - ? HOT_FOCUSC : HOT_NORMALC); - addch (*++cp); - attrset ((i == r->pos - && msg == WIDGET_FOCUS) ? FOCUSC : NORMALC); + cp = strchr (r->texts[i], '&'); + if (cp != NULL) { +#ifdef UTF8 + mbstate_t s; + wchar_t wc; + int len; +#endif + printw ("%.*s", (int) ((char *) cp - r->texts[i]), + r->texts[i]); + attrset ((i == r->pos && msg == WIDGET_FOCUS) + ? HOT_FOCUSC : HOT_NORMALC); +#ifdef UTF8 + if (SLsmg_Is_Unicode) { + memset (&s, 0, sizeof (s)); + len = mbrtowc (&wc, cp + 1, MB_CUR_MAX, &s); + ++cp; + if (len > 0) { + printw ("%.*s", len, cp); + cp += len; + } } else - addch (*cp); - } +#endif + { + addch (*++cp); + ++cp; + } + attrset ((i == r->pos && msg == WIDGET_FOCUS) + ? FOCUSC : NORMALC); + } else + cp = r->texts[i]; + addstr ((char *) cp); } return MSG_HANDLED; @@ -365,7 +417,7 @@ /* Compute the longest string */ max = 0; for (i = 0; i < count; i++){ - m = strlen (texts [i]); + m = mbstrlen (texts [i]); if (m > max) max = m; } @@ -426,6 +478,11 @@ if (c->hotpos >= 0) { attrset ((msg == WIDGET_FOCUS) ? HOT_FOCUSC : HOT_NORMALC); widget_move (&c->widget, 0, +c->hotpos + 4); +#ifdef UTF8 + if (SLsmg_Is_Unicode) + SLsmg_write_nwchars (&c->hotwc, 1); + else +#endif addch ((unsigned char) c->text[c->hotpos]); } return MSG_HANDLED; @@ -460,32 +517,18 @@ check_new (int y, int x, int state, const char *text) { WCheck *c = g_new (WCheck, 1); - const char *s; - char *t; - init_widget (&c->widget, y, x, 1, strlen (text), + init_widget (&c->widget, y, x, 1, mbstrlen (text), (callback_fn)check_callback, (mouse_h) check_event); c->state = state ? C_BOOL : 0; c->text = g_strdup (text); c->hotkey = 0; c->hotpos = -1; + c->hotwc = L'\0'; widget_want_hotkey (c->widget, 1); - /* Scan for the hotkey */ - for (s = text, t = c->text; *s; s++, t++){ - if (*s != '&'){ - *t = *s; - continue; - } - s++; - if (*s){ - c->hotkey = tolower (*s); - c->hotpos = t - c->text; - } - *t = *s; - } - *t = 0; + scan_hotkey (c->text, &c->hotpos, &c->hotkey, &c->hotwc); return c; } @@ -527,7 +570,7 @@ } widget_move (&l->widget, y, 0); printw ("%s", p); - xlen = l->widget.cols - strlen (p); + xlen = l->widget.cols - mbstrlen (p); if (xlen > 0) printw ("%*s", xlen, " "); if (!q) @@ -561,7 +604,7 @@ if (text){ label->text = g_strdup (text); if (label->auto_adjust_cols) { - newcols = strlen (text); + newcols = mbstrlen (text); if (newcols > label->widget.cols) label->widget.cols = newcols; } @@ -585,7 +628,7 @@ if (!text || strchr(text, '\n')) width = 1; else - width = strlen (text); + width = mbstrlen (text); l = g_new (WLabel, 1); init_widget (&l->widget, y, x, 1, width, @@ -734,13 +777,69 @@ /* Pointer to killed data */ static char *kill_buffer = 0; +#ifdef UTF8 +static int +charpos(WInput *in, int idx) +{ + int i, pos, l, len; + mbstate_t mbs; + memset (&mbs, 0, sizeof (mbs)); + i = 0; + pos = 0; + len = strlen(in->buffer); + + while (in->buffer[pos]) { + if (i == idx) + return pos; + l = mbrlen(in->buffer + pos, len - pos, &mbs); + if (l <= 0) + return pos; + pos+=l; + i++; + }; + return pos; +} + +static int +charcolumn(WInput *in, int idx) +{ + int i, pos, l, width, len; + mbstate_t mbs; + memset (&mbs, 0, sizeof (mbs)); + i = 0; + pos = 0; width = 0; + len = strlen(in->buffer); + + while (in->buffer[pos]) { + wchar_t wc; + if (i == idx) + return width; + l = mbrtowc(&wc, in->buffer + pos, len - pos, &mbs); + if (l <= 0) + return width; + pos += l; width += wcwidth(wc); + i++; + }; + return width; +} +#else +#define charpos(in, idx) (idx) +#define charcolumn(in, idx) (idx) +#endif /* UTF8 */ + void update_input (WInput *in, int clear_first) { int has_history = 0; int i, j; - unsigned char c; - int buf_len = strlen (in->buffer); + int buf_len = mbstrlen (in->buffer); +#ifndef UTF8 + unsigned char c; +#else /* UTF8 */ + wchar_t c; + mbstate_t mbs; + memset (&mbs, 0, sizeof (mbs)); +#endif /* UTF8 */ if (should_show_history_button (in)) has_history = HISTORY_BUTTON_WIDTH; @@ -750,7 +849,7 @@ /* Make the point visible */ if ((in->point < in->first_shown) || - (in->point >= in->first_shown+in->field_len - has_history)){ + (charcolumn(in, in->point) >= charcolumn(in, in->first_shown) + in->field_len - has_history)){ in->first_shown = in->point - (in->field_len / 3); if (in->first_shown < 0) in->first_shown = 0; @@ -770,14 +869,29 @@ addch (' '); widget_move (&in->widget, 0, 0); +#ifndef UTF8 for (i = 0, j = in->first_shown; i < in->field_len - has_history && in->buffer [j]; i++){ c = in->buffer [j++]; c = is_printable (c) ? c : '.'; - if (in->is_password) +#else /* UTF8 */ + for (i = 0, j = in->first_shown; (i < in->field_len - has_history) && (j < buf_len); i++,j++){ + char * chp = in->buffer + charpos(in,j); + size_t res = mbrtowc(&c, chp, strlen(chp), &mbs); + c = (res && iswprint (c)) ? 0 : '.'; +#endif /* UTF8 */ + if (in->is_password) c = '*'; +#ifndef UTF8 addch (c); +#else /* UTF8 */ + if (c) { + addch (c); + } + else + SLsmg_write_nchars (chp, res); +#endif /* UTF8 */ } - widget_move (&in->widget, 0, in->point - in->first_shown); + widget_move (&in->widget, 0, charcolumn(in, in->point) - charcolumn(in, in->first_shown)); if (clear_first) in->first = 0; @@ -919,7 +1033,7 @@ show_hist (GList *history, int widget_x, int widget_y) { GList *hi, *z; - size_t maxlen = strlen (i18n_htitle ()), i, count = 0; + size_t maxlen = mbstrlen (i18n_htitle ()), i, count = 0; int x, y, w, h; char *q, *r = 0; Dlg_head *query_dlg; @@ -932,7 +1046,7 @@ z = g_list_first (history); hi = z; while (hi) { - if ((i = strlen ((char *) hi->data)) > maxlen) + if ((i = mbstrlen ((char *) hi->data)) > maxlen) maxlen = i; count++; hi = g_list_next (hi); @@ -1104,35 +1218,83 @@ in->need_push = 1; in->buffer [0] = 0; in->point = 0; + in->charpoint = 0; in->mark = 0; free_completions (in); update_input (in, 0); } +static void +move_buffer_backward (WInput *in, int point) +{ + int i, pos, len; + int str_len = mbstrlen (in->buffer); + if (point >= str_len) return; + + pos = charpos(in,point); + len = charpos(in,point + 1) - pos; + + for (i = pos; in->buffer [i + len - 1]; i++) + in->buffer [i] = in->buffer [i + len]; +} + static cb_ret_t insert_char (WInput *in, int c_code) { size_t i; +#ifdef UTF8 + mbstate_t mbs; + int res; + + memset (&mbs, 0, sizeof (mbs)); +#else + in->charpoint = 0; +#endif /* UTF8 */ if (c_code == -1) return MSG_NOT_HANDLED; +#ifdef UTF8 + if (in->charpoint >= MB_CUR_MAX) return 1; + + in->charbuf[in->charpoint++] = c_code; + + res = mbrlen((char *)in->charbuf, in->charpoint, &mbs); + if (res < 0) { + if (res != -2) in->charpoint = 0; /* broken multibyte char, skip */ + return 1; + } + +#endif /* UTF8 */ in->need_push = 1; - if (strlen (in->buffer)+1 == (size_t) in->current_max_len){ + if (strlen (in->buffer) + 1 + in->charpoint >= (size_t) in->current_max_len){ /* Expand the buffer */ - char *narea = g_realloc (in->buffer, in->current_max_len + in->field_len); + char *narea = g_realloc (in->buffer, in->current_max_len + in->field_len + in->charpoint); if (narea){ in->buffer = narea; - in->current_max_len += in->field_len; + in->current_max_len += in->field_len + in->charpoint; } } +#ifndef UTF8 if (strlen (in->buffer)+1 < (size_t) in->current_max_len){ size_t l = strlen (&in->buffer [in->point]); for (i = l+1; i > 0; i--) in->buffer [in->point+i] = in->buffer [in->point+i-1]; in->buffer [in->point] = c_code; +#else /* UTF8 */ + if (strlen (in->buffer) + in->charpoint < in->current_max_len){ + size_t ins_point = charpos(in,in->point); /* bytes from begin */ + /* move chars */ + size_t rest_bytes = strlen (in->buffer + ins_point); + + for (i = rest_bytes + 1; i > 0; i--) + in->buffer [ins_point + i + in->charpoint - 1] = in->buffer [ins_point + i - 1]; + + memcpy(in->buffer + ins_point, in->charbuf, in->charpoint); +#endif /* UTF8 */ in->point++; } + in->charpoint = 0; return MSG_HANDLED; } @@ -1140,12 +1302,14 @@ beginning_of_line (WInput *in) { in->point = 0; + in->charpoint = 0; } static void end_of_line (WInput *in) { - in->point = strlen (in->buffer); + in->point = mbstrlen (in->buffer); + in->charpoint = 0; } static void @@ -1153,18 +1317,21 @@ { if (in->point) in->point--; + in->charpoint = 0; } static void forward_char (WInput *in) { - if (in->buffer [in->point]) + if (in->buffer [charpos(in,in->point)]) in->point++; + in->charpoint = 0; } static void forward_word (WInput *in) { +#ifndef UTF8 unsigned char *p = in->buffer+in->point; while (*p && (isspace (*p) || ispunct (*p))) @@ -1172,11 +1339,39 @@ while (*p && isalnum (*p)) p++; in->point = p - in->buffer; +#else /* UTF8 */ + mbstate_t mbs; + int len = mbstrlen (in->buffer); + memset (&mbs, 0, sizeof (mbs)); + + while (in->point < len) { + wchar_t c; + char *p = in->buffer + charpos(in,in->point); + size_t res = mbrtowc(&c, p, strlen(p), &mbs); + if (res <= 0 || !(iswspace (c) || iswpunct (c))) + break; + in->point++; + } + + memset (&mbs, 0, sizeof (mbs)); + + while (in->point < len) { + wchar_t c; + char *p = in->buffer + charpos(in,in->point); + size_t res = mbrtowc(&c, p, strlen(p), &mbs); + if (res <= 0 || !iswalnum (c)) + break; + in->point++; + } + + in->charpoint = 0; +#endif /* UTF8 */ } static void backward_word (WInput *in) { +#ifndef UTF8 unsigned char *p = in->buffer+in->point; while (p-1 > in->buffer-1 && (isspace (*(p-1)) || ispunct (*(p-1)))) @@ -1184,6 +1379,32 @@ while (p-1 > in->buffer-1 && isalnum (*(p-1))) p--; in->point = p - in->buffer; +#else /* UTF8 */ + mbstate_t mbs; + + memset (&mbs, 0, sizeof (mbs)); + while (in->point > 0) { + wchar_t c; + char *p = in->buffer + charpos(in,in->point); + size_t res = mbrtowc(&c, p, strlen(p), &mbs); + if (*p && (res <= 0 || !(iswspace (c) || iswpunct (c)))) + break; + in->point--; + } + + memset (&mbs, 0, sizeof (mbs)); + + while (in->point > 0) { + wchar_t c; + char *p = in->buffer + charpos(in,in->point); + size_t res = mbrtowc(&c, p, strlen(p), &mbs); + if (*p && (res <= 0 || !iswalnum (c))) + break; + in->point--; + } + + in->charpoint = 0; +#endif /* UTF8 */ } static void @@ -1216,8 +1437,9 @@ if (!in->point) return; - for (i = in->point; in->buffer [i-1]; i++) - in->buffer [i-1] = in->buffer [i]; + + move_buffer_backward(in, in->point - 1); + in->charpoint = 0; in->need_push = 1; in->point--; } @@ -1225,10 +1447,8 @@ static void delete_char (WInput *in) { - int i; - - for (i = in->point; in->buffer [i]; i++) - in->buffer [i] = in->buffer [i+1]; + move_buffer_backward(in, in->point); + in->charpoint = 0; in->need_push = 1; } @@ -1243,6 +1463,9 @@ g_free (kill_buffer); + first=charpos(in,first); + last=charpos(in,last); + kill_buffer = g_strndup(in->buffer+first,last-first); } @@ -1251,11 +1474,13 @@ { int first = min (x_first, x_last); int last = max (x_first, x_last); - size_t len = strlen (&in->buffer [last]) + 1; + size_t len; in->point = first; in->mark = first; - memmove (&in->buffer [first], &in->buffer [last], len); + len = strlen (&in->buffer [charpos(in,last)]) + 1; + memmove (&in->buffer [charpos(in,first)], &in->buffer [charpos(in,last)], len); + in->charpoint = 0; in->need_push = 1; } @@ -1272,6 +1497,8 @@ copy_region (in, old_point, new_point); delete_region (in, old_point, new_point); in->need_push = 1; + in->charpoint = 0; + in->charpoint = 0; } static void @@ -1315,16 +1542,20 @@ if (!kill_buffer) return; + in->charpoint = 0; for (p = kill_buffer; *p; p++) insert_char (in, *p); + in->charpoint = 0; } static void kill_line (WInput *in) { + int chp = charpos(in,in->point); g_free (kill_buffer); - kill_buffer = g_strdup (&in->buffer [in->point]); - in->buffer [in->point] = 0; + kill_buffer = g_strdup (&in->buffer [chp]); + in->buffer [chp] = 0; + in->charpoint = 0; } void @@ -1334,9 +1565,10 @@ g_free (in->buffer); in->buffer = g_strdup (text); /* was in->buffer->text */ in->current_max_len = strlen (in->buffer) + 1; - in->point = strlen (in->buffer); + in->point = mbstrlen (in->buffer); in->mark = 0; in->need_push = 1; + in->charpoint = 0; } static void @@ -1461,6 +1693,7 @@ *in->buffer = 0; in->point = 0; in->first = 0; + in->charpoint = 0; } cb_ret_t @@ -1489,7 +1722,11 @@ } } if (!input_map [i].fn){ +#ifndef UTF8 if (c_code > 255 || !is_printable (c_code)) +#else /* UTF8 */ + if (c_code > 255) +#endif /* UTF8 */ return MSG_NOT_HANDLED; if (in->first){ port_region_marked_for_delete (in); @@ -1523,6 +1760,9 @@ if (pos != in->point) free_completions (in); in->point = pos; +#ifdef UTF8 + in->charpoint = 0; +#endif /* UTF8 */ update_input (in, 1); } @@ -1562,7 +1802,7 @@ return MSG_HANDLED; case WIDGET_CURSOR: - widget_move (&in->widget, 0, in->point - in->first_shown); + widget_move (&in->widget, 0, charcolumn(in, in->point) - charcolumn(in, in->first_shown)); return MSG_HANDLED; case WIDGET_DESTROY: @@ -1584,7 +1824,7 @@ && should_show_history_button (in)) { do_show_hist (in); } else { - in->point = strlen (in->buffer); + in->point = mbstrlen (in->buffer); if (event->x - in->first_shown - 1 < in->point) in->point = event->x - in->first_shown - 1; if (in->point < 0) @@ -1642,7 +1882,8 @@ in->is_password = 0; strcpy (in->buffer, def_text); - in->point = strlen (in->buffer); + in->point = mbstrlen (in->buffer); + in->charpoint = 0; return in; } diff -ruN mc-4.6.1.orig/src/widget.h mc-4.6.1/src/widget.h --- mc-4.6.1.orig/src/widget.h 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/widget.h 2008-12-26 03:29:15.000000000 +0100 @@ -25,6 +25,7 @@ char *text; /* text of button */ int hotkey; /* hot KEY */ int hotpos; /* offset hot KEY char in text */ + wchar_t hotwc; bcback callback; /* Callback function */ } WButton; @@ -43,6 +44,7 @@ char *text; /* text of check button */ int hotkey; /* hot KEY */ int hotpos; /* offset hot KEY char in text */ + wchar_t hotwc; } WCheck; typedef struct WGauge { @@ -58,16 +60,20 @@ typedef struct { Widget widget; - int point; /* cursor position in the input line */ - int mark; /* The mark position */ - int first_shown; /* Index of the first shown character */ - int current_max_len; /* Maximum length of input line */ - int field_len; /* Length of the editing field */ + int point; /* cursor position in the input line (mb chars) */ + int mark; /* The mark position (mb chars) */ + int first_shown; /* Index of the first shown character (mb chars) */ + int current_max_len; /* Maximum length of input line (bytes) */ + int field_len; /* Length of the editing field (mb chars) */ int color; /* color used */ int first; /* Is first keystroke? */ int disable_update; /* Do we want to skip updates? */ int is_password; /* Is this a password input line? */ unsigned char *buffer; /* pointer to editing buffer */ +#ifdef UTF8 + unsigned char charbuf[MB_LEN_MAX]; +#endif /* UTF8 */ + int charpoint; GList *history; /* The history */ int need_push; /* need to push the current Input on hist? */ char **completions; /* Possible completions array */ diff -ruN mc-4.6.1.orig/src/wtools.c mc-4.6.1/src/wtools.c --- mc-4.6.1.orig/src/wtools.c 2008-12-26 02:19:54.000000000 +0100 +++ mc-4.6.1/src/wtools.c 2008-12-26 03:29:15.000000000 +0100 @@ -48,11 +48,11 @@ /* Adjust sizes */ lines = (lines > LINES - 6) ? LINES - 6 : lines; - if (title && (cols < (len = strlen (title) + 2))) + if (title && (cols < (len = mbstrlen (title) + 2))) cols = len; /* no &, but 4 spaces around button for brackets and such */ - if (cols < (len = strlen (cancel_string) + 3)) + if (cols < (len = mbstrlen (cancel_string) + 3)) cols = len; cols = cols > COLS - 6 ? COLS - 6 : cols; @@ -123,7 +123,7 @@ va_start (ap, count); for (i = 0; i < count; i++) { char *cp = va_arg (ap, char *); - win_len += strlen (cp) + 6; + win_len += mbstrlen (cp) + 6; if (strchr (cp, '&') != NULL) win_len--; } @@ -131,7 +131,7 @@ } /* count coordinates */ - cols = 6 + max (win_len, max ((int) strlen (header), msglen (text, &lines))); + cols = 6 + max (win_len, max ((int) mbstrlen (header), msglen (text, &lines))); lines += 4 + (count > 0 ? 2 : 0); xpos = COLS / 2 - cols / 2; ypos = LINES / 3 - (lines - 3) / 2; @@ -146,7 +146,7 @@ va_start (ap, count); for (i = 0; i < count; i++) { cur_name = va_arg (ap, char *); - xpos = strlen (cur_name) + 6; + xpos = mbstrlen (cur_name) + 6; if (strchr (cur_name, '&') != NULL) xpos--; @@ -457,7 +457,7 @@ g_strlcpy (histname + 3, header, 61); quick_widgets[2].histname = histname; - len = max ((int) strlen (header), msglen (text, &lines)) + 4; + len = max ((int) mbstrlen (header), msglen (text, &lines)) + 4; len = max (len, 64); /* The special value of def_text is used to identify password boxes @@ -477,7 +477,7 @@ */ quick_widgets[0].relative_x = len / 2 + 4; quick_widgets[1].relative_x = - len / 2 - (strlen (_(quick_widgets[1].text)) + 9); + len / 2 - (mbstrlen (_(quick_widgets[1].text)) + 9); quick_widgets[0].x_divisions = quick_widgets[1].x_divisions = len; #endif /* ENABLE_NLS */ From INVALID.NOREPLY at gnu.org Tue Dec 30 14:59:09 2008 From: INVALID.NOREPLY at gnu.org (vahvah) Date: Tue, 30 Dec 2008 14:59:09 +0000 Subject: [bug #19651] x selection in editor In-Reply-To: <20081204-124159.sv71204.55135@savannah.gnu.org> References: <20070421-102544.sv58618.90897@savannah.gnu.org> <20070421-142023.sv36205.61170@savannah.gnu.org> <20070421-134125.sv41304.54957@savannah.gnu.org> <20070422-090825.sv58618.7533@savannah.gnu.org> <20070422-092216.sv58618.48179@savannah.gnu.org> <20070422-123132.sv36205.10601@savannah.gnu.org> <20070422-095004.sv58618.50731@savannah.gnu.org> <20070422-095632.sv58618.64521@savannah.gnu.org> <20070422-213243.sv58618.73168@savannah.gnu.org> <20070426-191610.sv36205.15422@savannah.gnu.org> <20081009-012539.sv70162.91304@savannah.gnu.org> <20081204-124159.sv71204.55135@savannah.gnu.org> Message-ID: <20081230-145909.sv71623.51203@savannah.gnu.org> Follow-up Comment #11, bug #19651 (project mc): http://youngfemalemodels.pornlivenews.com/ young female models http://nudesexycollegegirls.pornlivenews.com/ nude sexy college girls http://youngteenlesbians.pornlivenews.com/ young teen lesbians http://freeteensexvideos.pornlivenews.com/ free teen sex videos _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Tue Dec 30 15:05:09 2008 From: INVALID.NOREPLY at gnu.org (vahvah) Date: Tue, 30 Dec 2008 15:05:09 +0000 Subject: [bug #19651] x selection in editor In-Reply-To: <20081230-145909.sv71623.51203@savannah.gnu.org> References: <20070421-102544.sv58618.90897@savannah.gnu.org> <20070421-142023.sv36205.61170@savannah.gnu.org> <20070421-134125.sv41304.54957@savannah.gnu.org> <20070422-090825.sv58618.7533@savannah.gnu.org> <20070422-092216.sv58618.48179@savannah.gnu.org> <20070422-123132.sv36205.10601@savannah.gnu.org> <20070422-095004.sv58618.50731@savannah.gnu.org> <20070422-095632.sv58618.64521@savannah.gnu.org> <20070422-213243.sv58618.73168@savannah.gnu.org> <20070426-191610.sv36205.15422@savannah.gnu.org> <20081009-012539.sv70162.91304@savannah.gnu.org> <20081204-124159.sv71204.55135@savannah.gnu.org> <20081230-145909.sv71623.51203@savannah.gnu.org> Message-ID: <20081230-150509.sv71623.88140@savannah.gnu.org> Follow-up Comment #12, bug #19651 (project mc): http://asian-sex-videos.pornlivenews.com/ asian sex videos http://hotblondesex.pornlivenews.com/ hot blonde sex http://swingersexvideos.pornlivenews.com/ swinger sex videos http://freelatinaspornvids.pornlivenews.com/ free latinas porn vids _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From INVALID.NOREPLY at gnu.org Tue Dec 30 15:08:20 2008 From: INVALID.NOREPLY at gnu.org (vahvah) Date: Tue, 30 Dec 2008 15:08:20 +0000 Subject: [bug #19651] x selection in editor In-Reply-To: <20081230-150509.sv71623.88140@savannah.gnu.org> References: <20070421-102544.sv58618.90897@savannah.gnu.org> <20070421-142023.sv36205.61170@savannah.gnu.org> <20070421-134125.sv41304.54957@savannah.gnu.org> <20070422-090825.sv58618.7533@savannah.gnu.org> <20070422-092216.sv58618.48179@savannah.gnu.org> <20070422-123132.sv36205.10601@savannah.gnu.org> <20070422-095004.sv58618.50731@savannah.gnu.org> <20070422-095632.sv58618.64521@savannah.gnu.org> <20070422-213243.sv58618.73168@savannah.gnu.org> <20070426-191610.sv36205.15422@savannah.gnu.org> <20081009-012539.sv70162.91304@savannah.gnu.org> <20081204-124159.sv71204.55135@savannah.gnu.org> <20081230-145909.sv71623.51203@savannah.gnu.org> <20081230-150509.sv71623.88140@savannah.gnu.org> Message-ID: <20081230-150820.sv71623.16675@savannah.gnu.org> Follow-up Comment #13, bug #19651 (project mc): http://teencumshotvideo.pornlivenews.com/ teen cumshot video http://teencaughtmasturbating.pornlivenews.com/ teen caught masturbating http://bigfemalebreastphotography.pornlivenews.com/ big female breast photography http://biggestboobsintheworld.pornlivenews.com/ biggest boobs in the world _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ From trac at midnight-commander.org Wed Dec 31 11:24:34 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 11:24:34 -0000 Subject: [Midnight Commander] #103: [PATCH] (git) sh syntax update Message-ID: <043.846d5b63287335485dfe9c710287df5b@midnight-commander.org> #103: [PATCH] (git) sh syntax update --------------------+------------------------------------------------------- Reporter: metux | Owner: Type: defect | Status: new Priority: major | Milestone: 4.6.2 Component: mcedit | Version: git-master Keywords: | Blocking: Blockedby: | --------------------+------------------------------------------------------- taken from rhclub tree -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 11:24:40 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 11:24:40 -0000 Subject: [Midnight Commander] #104: [PATCH] (git) sh syntax update Message-ID: <043.8bff4877a72be81cd2227a30b0165d49@midnight-commander.org> #104: [PATCH] (git) sh syntax update --------------------+------------------------------------------------------- Reporter: metux | Owner: Type: defect | Status: new Priority: major | Milestone: 4.6.2 Component: mcedit | Version: git-master Keywords: | Blocking: Blockedby: | --------------------+------------------------------------------------------- taken from rhclub tree -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 11:26:50 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 11:26:50 -0000 Subject: [Midnight Commander] #105: [PATCH] (git) C syntaxfile update Message-ID: <043.5c63fcec2797fd9833729c8bc4dc84ba@midnight-commander.org> #105: [PATCH] (git) C syntaxfile update -------------------------+-------------------------------------------------- Reporter: metux | Owner: Type: enhancement | Status: new Priority: major | Milestone: 4.6.2 Component: mcedit | Version: git-master Keywords: | Blocking: Blockedby: | -------------------------+-------------------------------------------------- taken from rhclub tree -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 11:29:31 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 11:29:31 -0000 Subject: [Midnight Commander] #92: [PATCH] (4.6.1) Adds 7zip extfs descriptor (was: Adds 7zip extfs descriptor) In-Reply-To: <048.ebb8e9471f93ef10d2ee957e6b043893@midnight-commander.org> References: <048.ebb8e9471f93ef10d2ee957e6b043893@midnight-commander.org> Message-ID: <057.5ac378630a58402f490718d9f91e498a@midnight-commander.org> #92: [PATCH] (4.6.1) Adds 7zip extfs descriptor --------------------------+------------------------------------------------- Reporter: slavazanko | Owner: Type: enhancement | Status: new Priority: major | Milestone: Component: vfs | Version: Resolution: | Keywords: Blocking: | Blockedby: --------------------------+------------------------------------------------- -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 11:30:15 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 11:30:15 -0000 Subject: [Midnight Commander] #93: [PATCH] (4.6.1) cons.saver: open the console in non-blocking mode (was: cons.saver: open the console in non-blocking mode) In-Reply-To: <048.18bb7eb5e8cd2af847648d52301e8e6d@midnight-commander.org> References: <048.18bb7eb5e8cd2af847648d52301e8e6d@midnight-commander.org> Message-ID: <057.54f2fae3fc5794e765da3cfe88116618@midnight-commander.org> #93: [PATCH] (4.6.1) cons.saver: open the console in non-blocking mode --------------------------+------------------------------------------------- Reporter: slavazanko | Owner: Type: enhancement | Status: new Priority: major | Milestone: Component: mc-core | Version: 4.6.1 Resolution: | Keywords: Blocking: | Blockedby: --------------------------+------------------------------------------------- Changes (by metux): * version: => 4.6.1 * type: defect => enhancement -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 11:30:52 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 11:30:52 -0000 Subject: [Midnight Commander] #92: [PATCH] (4.6.1) Adds 7zip extfs descriptor In-Reply-To: <048.ebb8e9471f93ef10d2ee957e6b043893@midnight-commander.org> References: <048.ebb8e9471f93ef10d2ee957e6b043893@midnight-commander.org> Message-ID: <057.67c90196387e0196c7fefd8ff7c6ec68@midnight-commander.org> #92: [PATCH] (4.6.1) Adds 7zip extfs descriptor --------------------------+------------------------------------------------- Reporter: slavazanko | Owner: Type: enhancement | Status: new Priority: major | Milestone: 4.6.2 Component: vfs | Version: 4.6.1 Resolution: | Keywords: Blocking: | Blockedby: --------------------------+------------------------------------------------- Changes (by metux): * version: => 4.6.1 * milestone: => 4.6.2 -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 11:32:11 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 11:32:11 -0000 Subject: [Midnight Commander] #97: [PATCH] Charset-locale-alias (was: Charset-locale-alias) In-Reply-To: <048.a8a0d48021086eeb6641cb35bbf4c8cd@midnight-commander.org> References: <048.a8a0d48021086eeb6641cb35bbf4c8cd@midnight-commander.org> Message-ID: <057.b6e92432193867ac5f60cad2d999d28a@midnight-commander.org> #97: [PATCH] Charset-locale-alias -------------------------+-------------------------------------------------- Reporter: slavazanko | Owner: Type: defect | Status: new Priority: major | Milestone: Component: mc-core | Version: 4.6.1 Resolution: | Keywords: Blocking: | Blockedby: -------------------------+-------------------------------------------------- Changes (by metux): * version: => 4.6.1 -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 11:32:27 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 11:32:27 -0000 Subject: [Midnight Commander] #95: [PATCH] the find file stuff (was: the find file stuff) In-Reply-To: <048.051a318c8c85b7f2c3c62cf986c68ad9@midnight-commander.org> References: <048.051a318c8c85b7f2c3c62cf986c68ad9@midnight-commander.org> Message-ID: <057.a603c1c5ee5a3d4f7af6e56b50c5aa1e@midnight-commander.org> #95: [PATCH] the find file stuff -------------------------+-------------------------------------------------- Reporter: slavazanko | Owner: Type: defect | Status: new Priority: major | Milestone: Component: mc-core | Version: 4.6.1 Resolution: | Keywords: Blocking: | Blockedby: -------------------------+-------------------------------------------------- Changes (by metux): * version: => 4.6.1 -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 11:32:45 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 11:32:45 -0000 Subject: [Midnight Commander] #94: [PATCH] Some fixups for large file support (64bit sizes) on 32bit systems (was: Some fixups for large file support (64bit sizes) on 32bit systems) In-Reply-To: <048.0ebdc144eb7f286c3686f5881b84919b@midnight-commander.org> References: <048.0ebdc144eb7f286c3686f5881b84919b@midnight-commander.org> Message-ID: <057.378ff650e962e1b93be0b9374357cc21@midnight-commander.org> #94: [PATCH] Some fixups for large file support (64bit sizes) on 32bit systems -------------------------+-------------------------------------------------- Reporter: slavazanko | Owner: Type: defect | Status: new Priority: major | Milestone: 4.6.2 Component: mc-core | Version: 4.6.1 Resolution: | Keywords: Blocking: | Blockedby: -------------------------+-------------------------------------------------- Changes (by metux): * version: => 4.6.1 * milestone: => 4.6.2 -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 16:07:28 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 16:07:28 -0000 Subject: [Midnight Commander] #91: [trac] new components: locale, adm, In-Reply-To: <043.e78f2eab138572d41834c5d523258d29@midnight-commander.org> References: <043.e78f2eab138572d41834c5d523258d29@midnight-commander.org> Message-ID: <052.705f4938bb0d678767e0917d13c7d728@midnight-commander.org> #91: [trac] new components: locale, adm, -----------------------+---------------------------------------------------- Reporter: metux | Owner: winnie Type: task | Status: accepted Priority: critical | Milestone: Component: mc-core | Version: Resolution: | Keywords: Blocking: | Blockedby: -----------------------+---------------------------------------------------- Changes (by winnie): * owner: => winnie * status: new => accepted -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 16:14:36 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 16:14:36 -0000 Subject: [Midnight Commander] #91: [trac] new components: locale, adm, In-Reply-To: <043.e78f2eab138572d41834c5d523258d29@midnight-commander.org> References: <043.e78f2eab138572d41834c5d523258d29@midnight-commander.org> Message-ID: <052.88bc0f94849d293dae74166b98be0d68@midnight-commander.org> #91: [trac] new components: locale, adm, -----------------------+---------------------------------------------------- Reporter: metux | Owner: winnie Type: task | Status: testing Priority: critical | Milestone: Component: mc-core | Version: Resolution: fixed | Keywords: Blocking: | Blockedby: -----------------------+---------------------------------------------------- Changes (by winnie): * status: accepted => testing * resolution: => fixed -- Ticket URL: Midnight Commander Midnight Development Center From trac at midnight-commander.org Wed Dec 31 18:22:19 2008 From: trac at midnight-commander.org (TRAC) Date: Wed, 31 Dec 2008 18:22:19 -0000 Subject: [Midnight Commander] #99: enable git checkout via http Message-ID: <044.8ef16225a73f41434d92842760313a70@midnight-commander.org> #99: enable git checkout via http --------------------+------------------------------------------------------- Reporter: winnie | Type: task Status: new | Priority: minor Milestone: | Component: adm Version: | Keywords: Blocking: | Blockedby: --------------------+------------------------------------------------------- Some user can't use git via git protocol, because they are restricted by a firewall.. for these it would be cool to have a possibility to check out the code via http -- Ticket URL: Midnight Commander Midnight Development Center