diff options
author | marius <marius@FreeBSD.org> | 2010-05-21 19:45:54 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2010-05-21 19:45:54 +0000 |
commit | 4b6158fcf17cf74fb8a82a099c148ce2b6bb90e7 (patch) | |
tree | 1c8756bd736927c71e6f555c12bacd8450b3de2c /usr.bin | |
parent | 9cf8d0fd7471476320cf9ddd31e4073e812867fb (diff) | |
download | FreeBSD-src-4b6158fcf17cf74fb8a82a099c148ce2b6bb90e7.zip FreeBSD-src-4b6158fcf17cf74fb8a82a099c148ce2b6bb90e7.tar.gz |
MFC: r197362
IEEE Std 1003.1, 2004 Edition states:
"The escape sequence '\n' shall match a <newline> embedded in
the pattern space."
It is unclear whether this also applies to a \n embedded in a
character class. Disable the existing handling of \n in a character
class following Mac OS X, GNU sed version 4.1.5 with --posix, and
SunOS 5.10 /usr/bin/sed.
Pointed by: Marius Strobl
Obtained from: Mac OS X
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/sed/compile.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c index 1db7f63..cea8e07 100644 --- a/usr.bin/sed/compile.c +++ b/usr.bin/sed/compile.c @@ -432,8 +432,7 @@ compile_ccl(char **sp, char *t) for (c = *s; (*t = *s) != ']' || c != d; s++, t++) if ((c = *s) == '\0') return NULL; - } else if (*s == '\\' && s[1] == 'n') - *t = '\n', s++; + } return (*s == ']') ? *sp = ++s, ++t : NULL; } |