Re: [PATCH v1] msvc: fix non-standard escape sequence in source

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

 



On Tue, Jul 24, 2018 at 10:43 AM <git@xxxxxxxxxxxxxxxxx> wrote:
> Replace non-standard "\e" escape sequence with "\x1B".
>
> In commit 7a17918c34f4e83982456ffe22d880c3cda5384f a trace message with
> several "\e" escape sequences was added.  This causes a compiler warning
> under MSVC.

Wrong commit. That code was actually introduced by 541d059cd9
(convert: add tracing for 'working-tree-encoding' attribute,
2018-04-15).

> diff --git a/convert.c b/convert.c
> @@ -335,7 +335,7 @@ static void trace_encoding(const char *context, const char *path,
>         strbuf_addf(&trace, "%s (%s, considered %s):\n", context, path, encoding);
>         for (i = 0; i < len && buf; ++i) {
>                 strbuf_addf(
> -                       &trace,"| \e[2m%2i:\e[0m %2x \e[2m%c\e[0m%c",
> +                       &trace,"| \x1B[2m%2i:\x1B[0m %2x \x1B[2m%c\x1B[0m%c",

In this codebase, ESC is always spelled as octal \033 rather than hex \x1b.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux