svn commit: trunk/busybox/libbb

vda at busybox.net vda at busybox.net
Fri Sep 19 23:43:59 UTC 2008


Author: vda
Date: 2008-09-19 16:43:59 -0700 (Fri, 19 Sep 2008)
New Revision: 23443

Log:
libbb: document that we maybe will want to understand \e someday
 (no code changes)



Modified:
   trunk/busybox/libbb/process_escape_sequence.c


Changeset:
Modified: trunk/busybox/libbb/process_escape_sequence.c
===================================================================
--- trunk/busybox/libbb/process_escape_sequence.c	2008-09-19 21:32:51 UTC (rev 23442)
+++ trunk/busybox/libbb/process_escape_sequence.c	2008-09-19 23:43:59 UTC (rev 23443)
@@ -18,17 +18,20 @@
 
 char FAST_FUNC bb_process_escape_sequence(const char **ptr)
 {
+	/* bash builtin "echo -e '\ec'" interprets \e as ESC,
+	 * but coreutils "/bin/echo -e '\ec'" does not.
+	 * manpages tend to support coreutils way. */
 	static const char charmap[] ALIGN1 = {
-		'a',  'b',  'f',  'n',  'r',  't',  'v',  '\\', 0,
-		'\a', '\b', '\f', '\n', '\r', '\t', '\v', '\\', '\\' };
+		'a',  'b', /*'e',*/ 'f',  'n',  'r',  't',  'v',  '\\', 0,
+		'\a', '\b', /*27,*/ '\f', '\n', '\r', '\t', '\v', '\\', '\\' };
 
 	const char *p;
 	const char *q;
-	unsigned int num_digits;
-	unsigned int r;
-	unsigned int n;
-	unsigned int d;
-	unsigned int base;
+	unsigned num_digits;
+	unsigned r;
+	unsigned n;
+	unsigned d;
+	unsigned base;
 
 	num_digits = n = 0;
 	base = 8;




More information about the busybox-cvs mailing list