mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-23 01:53:46 +01:00
Correct a bug in the P function: according to 7th edition UNIX (tm), the
newline must be part of the pattern space i.e. `echo a|sed -e P' must print a a and not aa This is consistent with gnu sed, SunOS, Ultrix (and probably others!)
This commit is contained in:
parent
768483b761
commit
30ad8d9349
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6209
@ -180,7 +180,7 @@ redirect:
|
||||
if (pd)
|
||||
break;
|
||||
if ((p = memchr(ps, '\n', psl)) != NULL) {
|
||||
oldc = *p;
|
||||
oldc = *++p;
|
||||
*p = '\0';
|
||||
}
|
||||
OUT(ps)
|
||||
|
Loading…
Reference in New Issue
Block a user