Re: [PATCH v2 6/7] color: support "italic" attribute
- From
Jeff King <peff@peff.net>
- Date
- Jun 23, 2016, 18:36 UTC
- Message-ID
- <20160623183603.GA32320@sigill.intra.peff.net>
- In-Reply-To
- <xmqqtwgjiwkn.fsf@gitster.mtv.corp.google.com>
On Thu, Jun 23, 2016 at 11:34:00AM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> Jeff King <peff@peff.net> writes:
>
> > We already support bold, underline, and similar attributes.
> > Let's add italic to the mix. According to the Wikipedia
> > page on ANSI colors, this attribute is "not widely
> > supported", but it does seem to work on my xterm.
> > ...
> > @@ -133,6 +133,7 @@ static int parse_attr(const char *name, size_t len)
> > #define ATTR(x, val, neg) { (x), strlen(x), (val), (neg) }
>
> I see this one was from an earlier reroll that did not use sizeof(x)-1;
> easy to fixup, though ;-)Heh, whoops, yeah.
Gcc was actually happy with the `strlen` there, but I suspect that other compilers might not be.
-Peff