diff options
author | dds <dds@FreeBSD.org> | 2009-09-20 15:47:31 +0000 |
---|---|---|
committer | dds <dds@FreeBSD.org> | 2009-09-20 15:47:31 +0000 |
commit | 5ce4473a063068c7ec01f5ef5465d2375fa65ce9 (patch) | |
tree | 9476a172ce6dab91adaa99623975642aeb2827b5 /usr.bin | |
parent | 668711df00c430313df2e249177f681be4ccdf02 (diff) | |
download | FreeBSD-src-5ce4473a063068c7ec01f5ef5465d2375fa65ce9.zip FreeBSD-src-5ce4473a063068c7ec01f5ef5465d2375fa65ce9.tar.gz |
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; } |