1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00
* 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.
This commit is contained in:
Ulrich Drepper
2003-11-29 06:40:52 +00:00
parent bb3f4825c4
commit 37369d1cef
4 changed files with 360 additions and 126 deletions

View File

@ -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. */