Re: mc-4.5.55 is now part of the Cygwin net distribution

Hi, Alexander!

> I built MC from snapshot about 3 months ago and I was having the following
> problems:
> 0. regex.c - fixed by me

Thank you.  It's indeed fixed.

> 1. subshell dies after few Ctrl-O, then mc dies. It happens very quickly
> under rxvt or xterm, but if started from DOS box, it works for quite a
> while, but then it still eventually dies. I doubt this is a cygwin
> problem, because the well known unix "screen" works under cygwin without
> any problems, although it also uses pty's. Maybe it is a good idea to
> see the sources of screen and find out how the subshell must be done.

Yes, I could reproduce it today.  I don't have Windows at home and I don't
have time at work, so a few ideas for you.  Two ways to debug it:

1) There is some error message.  Try ignoring this error in the code and
see what happens.  Maybe the error should result in disabling the
subshell, but it kills mc as well?

2) Add some debug statements that would print the current file and line to
stderr, redirect stderr and see where MC hangs.  My guess it that it's
get_event().  If so, we should not be ignoring exceptions in select(),
since they cause the loop.  The problem that triggers the exception should
be fixed too.

> 2. MC barks on  'pagefile.sys' :
> ************************************************
> File 'pagefile.sys' exists but can not be stat-ed: Permission denied
> ************************************************
> This is actually a general problem, I saw it on unixes as well, but it is
> very annoying under cygwin.

Yes, MC tries to stat() every file and "barks".  Unless you have a clean
and simple solution, it's not going to be fixed soon.  I think MC could
show those ghost-entries using a distinctive color, but avoid any

> 3. editor and viewer don't work properly on filesystem, mounted in text
> mode, editor even corrupts files in DOS encoding.
> The solution is to change mc editor to open all files in binary mode using
> "w+b" method.

That's probably the right thing.

> Even if to do so, there is a problem with ^M's at the ends of lines, which
> are invisible and can be easily mixed up with text and screw up the file.
> This is also common problem with unix if one has to edit files in dos
> encoding.

Right, this is not a Cygwin problem.

> I was having a lot of trouble because of this since all C++ files in our
> clearcase are in DOS encoding.

Try using an external editor for now.

> I saw some remains of code in MC which are supposed to do some CR-LF
> translation, I tried to enable it, but mc just crashed.
> Pavel, any suggestions how this can be fixed properly?

This code is from Cooledit.  I doubt that it ever worked properly.

> 4. The border lines are screwed up while running inside DOS box or rxvt. Not
> a big deal, but not aesthetic.

It's a known problem - using ASCII approximation can only be forced
through a command line option.  Per-terminal settings are not implemented
and not planned to be in the next version.

You could look if it's possible to use pseudographics.  Maybe terminfo
doesn't describe the Cygwin terminal correctly?

> I would be very happy to take part in cygwin port, I will try to fix the
> editor.

Good luck.

Pavel Roskin

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]