mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
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.
This commit is contained in:
@ -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. */
|
||||
|
Reference in New Issue
Block a user