GNU bug report logs - #22067
[bug-diffutils] bug#20062: bug#20062: [PATCH] diff: add support for --color

Previous Next

Package: diffutils;

Reported by: Gisle Vanem <gvanem <at> yahoo.no>

Date: Tue, 1 Dec 2015 09:58:02 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Giuseppe Scrivano <gscrivano <at> gnu.org>
To: Gisle Vanem <gvanem <at> yahoo.no>
Cc: 22067 <at> debbugs.gnu.org
Subject: bug#22067: [bug-diffutils] bug#22067: bug#20062: bug#20062: [PATCH] diff: add support for --color
Date: Sat, 30 Jan 2016 11:02:19 +0100
Gisle Vanem <gvanem <at> yahoo.no> writes:

> Jim Meyering wrote:
>
>> Good! Worthwhile after all. Thank you.
>> I have just pushed those commits.
>
> Trying this color-patch on Windows, there are a few issues:
>
> 1) ANSI-sequences are no good on Windows.
> 2) Some signals are not in MSVC, MinGW nor in Gnulib; i.e. SIGTSTP,
>    SIGSTOP etc.
> 3) I'm getting a stack-overflow in handling a SIGINT.
>    AFAICS there is a infinite recursion in process_signals().
>    This function calls 'set_color_context (RESET_CONTEXT)'. But
>    'set_color_context()' again calls 'process_signals()'. How can
>    that *not* stack-fault on any platform?
>
> 1+2) I've patched here to get colors. Although hard-coded; ignoring
> the '--palette' option etc.

Could you share your patch?  I've no Windows machine, altough I am
interested in how that could be done.

Bug 3 is a bug on all platforms, set_color_context should call
process_signals only when color_context != RESET_CONTEXT.  I'll send a
patch for that.

Thanks,
Giuseppe




This bug report was last modified 9 years and 69 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.