Thread (26 messages) flat view 26 messages, 6 authors, 2018-07-10
STALE2960d

Revision rfc of 2 in this series.

Revisions (2)
  1. rfc current
  2. rfc [diff vs current]

[RFC PATCH 3/6] convert.c: replace "\e" escapes with "\033".

From: Beat Bolli <hidden>
Date: 2018-07-08 14:44:15
Subsystem: the rest · Maintainer: Linus Torvalds

The "\e" escape is not defined in ISO C.

While on this line, add a missing space after the comma.

Signed-off-by: Beat Bolli <redacted>
---
 convert.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/convert.c b/convert.c
index 64d0d30e08..edebb946f5 100644
--- a/convert.c
+++ b/convert.c
@@ -334,7 +334,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, "| \033[2m%2i:\033[0m %2x \033[2m%c\033[0m%c",
 			i,
 			(unsigned char) buf[i],
 			(buf[i] > 32 && buf[i] < 127 ? buf[i] : ' '),
-- 
2.15.0.rc1.299.gda03b47c3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help