From 37369d1cefec4d1990e59fbec613d2bc66e68eba Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 29 Nov 2003 06:40:52 +0000 Subject: Update. * misc/mntent_r.c (decode_name): Fix decoding of tab, add decoding of newline. * manual/sysinfo.texi (mtab): Adjust description accordingly. Reported by Andries.Brouwer@cwi.nl. --- misc/mntent_r.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'misc') diff --git a/misc/mntent_r.c b/misc/mntent_r.c index 9bfe8756f1..3a47f61f38 100644 --- a/misc/mntent_r.c +++ b/misc/mntent_r.c @@ -84,12 +84,18 @@ decode_name (char *buf) *wp++ = ' '; rp += 3; } - else if (rp[0] == '\\' && rp[1] == '0' && rp[2] == '1' && rp[3] == '2') + else if (rp[0] == '\\' && rp[1] == '0' && rp[2] == '1' && rp[3] == '1') { /* \012 is a TAB. */ *wp++ = '\t'; rp += 3; } + else if (rp[0] == '\\' && rp[1] == '0' && rp[2] == '1' && rp[3] == '2') + { + /* \012 is a NEWLINE. */ + *wp++ = '\n'; + rp += 3; + } else if (rp[0] == '\\' && rp[1] == '\\') { /* We have to escape \\ to be able to represent all characters. */ -- cgit v1.2.3