console_flag & xterm_flag and their relation to Cygwin

Pavel Roskin proski at gnu.org
Fri Aug 1 18:40:05 UTC 2003


On Thu, 31 Jul 2003, Pavel Tsekov wrote:

> I'm currently preparing a set of patches to MC to enable some existing
> and add some new functionality on the Cygwin platform. Today I've been
> playing with the mouse support and it works quite well. Now before I
> submit a final patch I'd like someone to clarify a part of the MC code
> that I cannot fully understand.

Let me explain what I know.  It's very old code and needs reorganization.
Historically, console_flag means that mc runs on the Linux console and
supports screen saving through cons.saver.  xterm_flag means that mc runs
on xterm or a similar terminal and supports screen saving through the
secondary buffer.

If either console_flag or xterm_flag is set, screen saving is enabled.
Ctrl-O is only disabled is both the subshell is not running and the screen
saving is disabled.

xterm_flag is used for other purposes than screen saving.  Sometimes it's
used to indicate that some xterm specific features can be used, e.g. hints
in the title or xterm mouse support.

console_flag enables partial restoring on the screen, unlike xterm_flag.
This allows "output lines" in the Layout dialog.  The same feature can be
enabled if "rxvt extensions" are detected, but "rxvt extensions" is a hack
and it's not likely to be applied to rxvt in any form because of security
concerns.

The problem is that doing "the right thing" requires massive changes in
the code.  I'm leaving to you to decide what the temporary solution could
be.  I'll try to split xterm_flag and console_flag into semantically
independent variables, but it's not my first priority because of a large
number of patches waiting to applying.

-- 
Regards,
Pavel Roskin



More information about the mc-devel mailing list